{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# read data\n",
    "import pandas as pd\n",
    "rt = pd.read_excel('russiainchina_segall0312.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# select only str longer than 10\n",
    "rtnew = rt[rt['seg_all'].str.len() > 30]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/ming.ma/miniforge3/envs/prq/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n"
     ]
    }
   ],
   "source": [
    "from sentence_transformers import SentenceTransformer\n",
    "modelx = SentenceTransformer(\"BAAI/bge-base-zh-v1.5\")  #infgrad/stella-base-zh-v2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2025-10-14 11:53:04,906 - BERTopic - Embedding - Transforming documents to embeddings.\n",
      "Batches: 100%|██████████| 452/452 [01:58<00:00,  3.82it/s]\n",
      "2025-10-14 11:55:03,313 - BERTopic - Embedding - Completed ✓\n",
      "2025-10-14 11:55:03,313 - BERTopic - Dimensionality - Fitting the dimensionality reduction algorithm\n",
      "2025-10-14 11:55:16,387 - BERTopic - Dimensionality - Completed ✓\n",
      "2025-10-14 11:55:16,388 - BERTopic - Cluster - Start clustering the reduced embeddings\n",
      "2025-10-14 11:55:29,556 - BERTopic - Cluster - Completed ✓\n",
      "2025-10-14 11:55:29,556 - BERTopic - Representation - Extracting topics using c-TF-IDF for topic reduction.\n",
      "2025-10-14 11:55:29,817 - BERTopic - Representation - Completed ✓\n",
      "2025-10-14 11:55:29,817 - BERTopic - Topic reduction - Reducing number of topics\n",
      "2025-10-14 11:55:29,827 - BERTopic - Representation - Fine-tuning topics using representation models.\n",
      "2025-10-14 11:55:30,001 - BERTopic - Representation - Completed ✓\n",
      "2025-10-14 11:55:30,003 - BERTopic - Topic reduction - Reduced number of topics from 236 to 15\n"
     ]
    }
   ],
   "source": [
    "from bertopic import BERTopic\n",
    "from umap import UMAP\n",
    "umap_model = UMAP(n_neighbors=15, n_components=5,\n",
    "                  min_dist=0.0, metric='cosine', random_state=42)\n",
    "from bertopic.vectorizers import ClassTfidfTransformer\n",
    "\n",
    "ctfidf_model = ClassTfidfTransformer(reduce_frequent_words=True)\n",
    "\n",
    "#why?kk\n",
    "topic_model = BERTopic(language= 'chinese (simplified)',\n",
    "                      top_n_words= 10,\n",
    "                       calculate_probabilities= True,\n",
    "                       embedding_model= modelx,\n",
    "                       umap_model=umap_model,\n",
    "                       ctfidf_model=ctfidf_model,\n",
    "                       nr_topics=15,\n",
    "                       verbose= True)\n",
    "rtnew['seg_all'] =rtnew['seg_all'] .astype('str')\n",
    "docs = rtnew['seg_all'].tolist()\n",
    "topics, probs = topic_model.fit_transform(docs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Topic</th>\n",
       "      <th>Count</th>\n",
       "      <th>Name</th>\n",
       "      <th>Representation</th>\n",
       "      <th>Representative_Docs</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1</td>\n",
       "      <td>4821</td>\n",
       "      <td>-1_乌克兰_俄罗斯_中国_美国</td>\n",
       "      <td>[乌克兰, 俄罗斯, 中国, 美国, 国家, 表示, 报道, 普京, 经济, 制裁]</td>\n",
       "      <td>[北约 做好 乌克兰 长期 提供 武器 准备 时间 6 16 北约 秘书长 斯托尔 滕 贝格...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>7071</td>\n",
       "      <td>0_总统_乌克兰_表示_中国</td>\n",
       "      <td>[总统, 乌克兰, 表示, 中国, 俄罗斯, 美国, 拜登, 国家, 北约, 阿富汗]</td>\n",
       "      <td>[拜登 中国 领导人 通话 透露 美国 对台 政策 美国 总统 拜登 中国 国家 主席 通电...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>539</td>\n",
       "      <td>1_新冠_疫苗_病例_接种</td>\n",
       "      <td>[新冠, 疫苗, 病例, 接种, 病毒, 感染, 猴痘, 生物, 新增, 病毒感染]</td>\n",
       "      <td>[俄罗斯 调查 美国 是否 制造 新冠 周四 俄罗斯国防部 新闻 发布会 表示 正在 调查 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>538</td>\n",
       "      <td>2_天然气_石油_能源_北溪</td>\n",
       "      <td>[天然气, 石油, 能源, 北溪, 管道, 供应, 德国, 价格, 卢布, 工业]</td>\n",
       "      <td>[欧盟 不会 俄罗斯 天然气 公司 谈判 新 天然气 协议 保加利亚 副 总理 阿森 瓦西列...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>410</td>\n",
       "      <td>3_火灾_大火_发生_地震</td>\n",
       "      <td>[火灾, 大火, 发生, 地震, 死亡, 洪水, 暴雨, 造成, 森林, 事故]</td>\n",
       "      <td>[印度 多地 暴雨 至少 死亡 近日 报道 印度 喜马偕尔邦 北阿 坎德 邦 奥迪 沙邦 连...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4</td>\n",
       "      <td>237</td>\n",
       "      <td>4_阿桑奇_堕胎_枪击_性别</td>\n",
       "      <td>[阿桑奇, 堕胎, 枪击, 性别, 引渡, 警方, 维基, 解密, 枪击案, 女性]</td>\n",
       "      <td>[参议院 推进 全面 枪支 管制 法案 6 21 两党 安全 社区 法案 64 票 34 票...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5</td>\n",
       "      <td>210</td>\n",
       "      <td>5_马斯克_特斯拉_推特_rt</td>\n",
       "      <td>[马斯克, 特斯拉, 推特, rt, 埃隆, facebook, 黑客, meta, tik...</td>\n",
       "      <td>[俄罗斯 媒体 监管 机构 YouTube 擅自 删除 RT 德语 频道 写信 要求 作出 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6</td>\n",
       "      <td>178</td>\n",
       "      <td>6_机器人_动物园_一只_熊猫</td>\n",
       "      <td>[机器人, 动物园, 一只, 熊猫, 发现, 鹦鹉, 一种, 北极熊, 技术, 动物]</td>\n",
       "      <td>[鹦鹉 酒驾 死亡 澳大利亚 兽医 警告 红翅 鹦鹉 正 富含 酒精 芒果 灌醉 醉酒 这种...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7</td>\n",
       "      <td>163</td>\n",
       "      <td>7_冬奥会_兴奋剂_瓦利_耶娃</td>\n",
       "      <td>[冬奥会, 兴奋剂, 瓦利, 耶娃, 运动员, 北京, 花样滑冰, 金牌, 花滑, 滑雪]</td>\n",
       "      <td>[国际 检测 机构 宣布 俄罗斯 花滑 运动员 瓦利 耶娃 违禁 物质 检测 呈 阳性 是否...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8</td>\n",
       "      <td>110</td>\n",
       "      <td>8_约翰逊_英国首相_保守党_鲍里斯</td>\n",
       "      <td>[约翰逊, 英国首相, 保守党, 鲍里斯, 英国, 特拉斯, 女王, 首相, 辞职, 王子]</td>\n",
       "      <td>[特拉斯 发誓 对抗 TikTok7 26 俄新社 报道 英国首相 选举 决赛圈 两位 候选...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9</td>\n",
       "      <td>98</td>\n",
       "      <td>9_乌波尔_马里_讲述_居民</td>\n",
       "      <td>[乌波尔, 马里, 讲述, 居民, 亚速营, 分子, 火力点, 武装, 亚速, 射击]</td>\n",
       "      <td>[马里 乌波尔 居民 讲述 乌克兰 士兵 射击 平民 ​ ​ ​, 马里 乌波尔 妇女 讲述...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>10</td>\n",
       "      <td>34</td>\n",
       "      <td>10_印度_信徒_印度教_仪式</td>\n",
       "      <td>[印度, 信徒, 印度教, 仪式, 斋月, 蝎子, 鳄鱼, 国防, indian, 蛇节]</td>\n",
       "      <td>[印度 孟买 信徒 叠罗汉 庆祝 传统节日 近日 数千 印度 教徒 聚集 孟买 叠罗汉 庆祝...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>11_博雷利_高级_外交_欧盟</td>\n",
       "      <td>[博雷利, 高级, 外交, 欧盟, 政策, 代表, 安全, 博雷利称, 何塞普, 纯粹]</td>\n",
       "      <td>[欧盟 外交 安全 政策 高级 代表 何塞普 博雷利 丰 特列斯 记者 表示 欧盟 正在 研...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>12</td>\n",
       "      <td>12</td>\n",
       "      <td>12_俱乐部_阿布拉莫维奇_切尔西_足球</td>\n",
       "      <td>[俱乐部, 阿布拉莫维奇, 切尔西, 足球, 贝卢斯科尼, 古斯蒂佩, 球迷, 姆巴, 皮尔...</td>\n",
       "      <td>[贝卢斯科尼 宣布 竞选 意大利 参议员 周三 担任 意大利 四届 总理 政治 重量级 人物...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>13</td>\n",
       "      <td>11</td>\n",
       "      <td>13_博斯普鲁斯海峡_蒙特勒_水雷_物体</td>\n",
       "      <td>[博斯普鲁斯海峡, 蒙特勒, 水雷, 物体, 公约, 土耳其, 海峡, 军舰, 卡尔, 和平时期]</td>\n",
       "      <td>[博斯普鲁斯海峡 入口 出现 类似 水雷 物体 安卡拉 时间 3 26 土耳其 杂志 Sta...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Topic  Count                  Name  \\\n",
       "0      -1   4821      -1_乌克兰_俄罗斯_中国_美国   \n",
       "1       0   7071        0_总统_乌克兰_表示_中国   \n",
       "2       1    539         1_新冠_疫苗_病例_接种   \n",
       "3       2    538        2_天然气_石油_能源_北溪   \n",
       "4       3    410         3_火灾_大火_发生_地震   \n",
       "5       4    237        4_阿桑奇_堕胎_枪击_性别   \n",
       "6       5    210       5_马斯克_特斯拉_推特_rt   \n",
       "7       6    178       6_机器人_动物园_一只_熊猫   \n",
       "8       7    163       7_冬奥会_兴奋剂_瓦利_耶娃   \n",
       "9       8    110    8_约翰逊_英国首相_保守党_鲍里斯   \n",
       "10      9     98        9_乌波尔_马里_讲述_居民   \n",
       "11     10     34       10_印度_信徒_印度教_仪式   \n",
       "12     11     14       11_博雷利_高级_外交_欧盟   \n",
       "13     12     12  12_俱乐部_阿布拉莫维奇_切尔西_足球   \n",
       "14     13     11  13_博斯普鲁斯海峡_蒙特勒_水雷_物体   \n",
       "\n",
       "                                       Representation  \\\n",
       "0          [乌克兰, 俄罗斯, 中国, 美国, 国家, 表示, 报道, 普京, 经济, 制裁]   \n",
       "1         [总统, 乌克兰, 表示, 中国, 俄罗斯, 美国, 拜登, 国家, 北约, 阿富汗]   \n",
       "2          [新冠, 疫苗, 病例, 接种, 病毒, 感染, 猴痘, 生物, 新增, 病毒感染]   \n",
       "3           [天然气, 石油, 能源, 北溪, 管道, 供应, 德国, 价格, 卢布, 工业]   \n",
       "4            [火灾, 大火, 发生, 地震, 死亡, 洪水, 暴雨, 造成, 森林, 事故]   \n",
       "5          [阿桑奇, 堕胎, 枪击, 性别, 引渡, 警方, 维基, 解密, 枪击案, 女性]   \n",
       "6   [马斯克, 特斯拉, 推特, rt, 埃隆, facebook, 黑客, meta, tik...   \n",
       "7         [机器人, 动物园, 一只, 熊猫, 发现, 鹦鹉, 一种, 北极熊, 技术, 动物]   \n",
       "8       [冬奥会, 兴奋剂, 瓦利, 耶娃, 运动员, 北京, 花样滑冰, 金牌, 花滑, 滑雪]   \n",
       "9      [约翰逊, 英国首相, 保守党, 鲍里斯, 英国, 特拉斯, 女王, 首相, 辞职, 王子]   \n",
       "10        [乌波尔, 马里, 讲述, 居民, 亚速营, 分子, 火力点, 武装, 亚速, 射击]   \n",
       "11      [印度, 信徒, 印度教, 仪式, 斋月, 蝎子, 鳄鱼, 国防, indian, 蛇节]   \n",
       "12       [博雷利, 高级, 外交, 欧盟, 政策, 代表, 安全, 博雷利称, 何塞普, 纯粹]   \n",
       "13  [俱乐部, 阿布拉莫维奇, 切尔西, 足球, 贝卢斯科尼, 古斯蒂佩, 球迷, 姆巴, 皮尔...   \n",
       "14  [博斯普鲁斯海峡, 蒙特勒, 水雷, 物体, 公约, 土耳其, 海峡, 军舰, 卡尔, 和平时期]   \n",
       "\n",
       "                                  Representative_Docs  \n",
       "0   [北约 做好 乌克兰 长期 提供 武器 准备 时间 6 16 北约 秘书长 斯托尔 滕 贝格...  \n",
       "1   [拜登 中国 领导人 通话 透露 美国 对台 政策 美国 总统 拜登 中国 国家 主席 通电...  \n",
       "2   [俄罗斯 调查 美国 是否 制造 新冠 周四 俄罗斯国防部 新闻 发布会 表示 正在 调查 ...  \n",
       "3   [欧盟 不会 俄罗斯 天然气 公司 谈判 新 天然气 协议 保加利亚 副 总理 阿森 瓦西列...  \n",
       "4   [印度 多地 暴雨 至少 死亡 近日 报道 印度 喜马偕尔邦 北阿 坎德 邦 奥迪 沙邦 连...  \n",
       "5   [参议院 推进 全面 枪支 管制 法案 6 21 两党 安全 社区 法案 64 票 34 票...  \n",
       "6   [俄罗斯 媒体 监管 机构 YouTube 擅自 删除 RT 德语 频道 写信 要求 作出 ...  \n",
       "7   [鹦鹉 酒驾 死亡 澳大利亚 兽医 警告 红翅 鹦鹉 正 富含 酒精 芒果 灌醉 醉酒 这种...  \n",
       "8   [国际 检测 机构 宣布 俄罗斯 花滑 运动员 瓦利 耶娃 违禁 物质 检测 呈 阳性 是否...  \n",
       "9   [特拉斯 发誓 对抗 TikTok7 26 俄新社 报道 英国首相 选举 决赛圈 两位 候选...  \n",
       "10  [马里 乌波尔 居民 讲述 乌克兰 士兵 射击 平民 ​ ​ ​, 马里 乌波尔 妇女 讲述...  \n",
       "11  [印度 孟买 信徒 叠罗汉 庆祝 传统节日 近日 数千 印度 教徒 聚集 孟买 叠罗汉 庆祝...  \n",
       "12  [欧盟 外交 安全 政策 高级 代表 何塞普 博雷利 丰 特列斯 记者 表示 欧盟 正在 研...  \n",
       "13  [贝卢斯科尼 宣布 竞选 意大利 参议员 周三 担任 意大利 四届 总理 政治 重量级 人物...  \n",
       "14  [博斯普鲁斯海峡 入口 出现 类似 水雷 物体 安卡拉 时间 3 26 土耳其 杂志 Sta...  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "topic_model.get_topic_info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "topics_to_merge = [[2,10] ]\n",
    "topic_model.merge_topics(docs, topics_to_merge)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "custom_topic_labels = {0: 'Russia_Ukraine', 1: 'Sri Lanka', 2: 'Energy', 3: 'Japan_disaster',\n",
    "                       4: 'Pandemic', 5: 'Elon_Musk', 6: 'Zoo', 7: 'Olympics',\n",
    "                       8: 'Weapon', 9: 'China_border', 10: 'EU', 11: 'Exchange_rate', 12: 'Football'}\n",
    "\n",
    "topic_model.set_topic_labels(custom_topic_labels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\n",
       "<head><meta charset=\"utf-8\" /></head>\n",
       "<body>\n",
       "    <div>                        <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
       "        <script type=\"text/javascript\">/**\n",
       "* plotly.js v3.1.1\n",
       "* Copyright 2012-2025, Plotly, Inc.\n",
       "* All rights reserved.\n",
       "* Licensed under the MIT license\n",
       "*/\n",
       "(\n",
       " function(root, factory) {\n",
       "  if (typeof module === \"object\" && module.exports) {\n",
       "   module.exports = factory();\n",
       "  } else {\n",
       "   root.moduleName = factory();\n",
       "  }\n",
       "} (typeof self !== \"undefined\" ? self : this, () => {\n",
       "\"use strict\";var Plotly=(()=>{var Net=Object.create;var ES=Object.defineProperty,Uet=Object.defineProperties,Vet=Object.getOwnPropertyDescriptor,Get=Object.getOwnPropertyDescriptors,Het=Object.getOwnPropertyNames,nee=Object.getOwnPropertySymbols,jet=Object.getPrototypeOf,oee=Object.prototype.hasOwnProperty,Wet=Object.prototype.propertyIsEnumerable;var aee=(e,t,r)=>t in e?ES(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,see=(e,t)=>{for(var r in t||(t={}))oee.call(t,r)&&aee(e,r,t[r]);if(nee)for(var r of nee(t))Wet.call(t,r)&&aee(e,r,t[r]);return e},lee=(e,t)=>Uet(e,Get(t));var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uee=(e,t)=>{for(var r in t)ES(e,r,{get:t[r],enumerable:!0})},cee=(e,t,r,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of Het(t))!oee.call(e,i)&&i!==r&&ES(e,i,{get:()=>t[i],enumerable:!(n=Vet(t,i))||n.enumerable});return e};var Xet=(e,t,r)=>(r=e!=null?Net(jet(e)):{},cee(t||!e||!e.__esModule?ES(r,\"default\",{value:e,enumerable:!0}):r,e)),ab=e=>cee(ES({},\"__esModule\",{value:!0}),e);var o6=ye(fee=>{\"use strict\";fee.version=\"3.1.1\"});var dee=ye((hee,s6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof s6!=\"undefined\"&&s6.exports&&(s6.exports=r[t])})(\"Promise\",typeof window!=\"undefined\"?window:hee,function(){\"use strict\";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!=\"undefined\"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},\"x\",{}),t=function(C,E,A,L){return Object.defineProperty(C,E,{value:A,writable:!0,configurable:L!==!1})}}catch(p){t=function(E,A,L){return E[A]=L,E}}n=function(){var C,E,A;function L(_,k){this.fn=_,this.self=k,this.next=void 0}return{add:function(k,M){A=new L(k,M),E?E.next=A:C=A,E=A,A=void 0},drain:function(){var k=C;for(C=E=r=void 0;k;)k.fn.call(k.self),k=k.next}}}();function o(p,C){n.add(p,C),r||(r=a(n.drain))}function s(p){var C,E=typeof p;return p!=null&&(E==\"object\"||E==\"function\")&&(C=p.then),typeof C==\"function\"?C:!1}function l(){for(var p=0;p<this.chain.length;p++)u(this,this.state===1?this.chain[p].success:this.chain[p].failure,this.chain[p]);this.chain.length=0}function u(p,C,E){var A,L;try{C===!1?E.reject(p.msg):(C===!0?A=p.msg:A=C.call(void 0,p.msg),A===E.promise?E.reject(TypeError(\"Promise-chain cycle\")):(L=s(A))?L.call(A,E.resolve,E.reject):E.resolve(A))}catch(_){E.reject(_)}}function c(p){var C,E=this;if(!E.triggered){E.triggered=!0,E.def&&(E=E.def);try{(C=s(p))?o(function(){var A=new d(E);try{C.call(p,function(){c.apply(A,arguments)},function(){f.apply(A,arguments)})}catch(L){f.call(A,L)}}):(E.msg=p,E.state=1,E.chain.length>0&&o(l,E))}catch(A){f.call(new d(E),A)}}}function f(p){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=p,C.state=2,C.chain.length>0&&o(l,C))}function h(p,C,E,A){for(var L=0;L<C.length;L++)(function(k){p.resolve(C[k]).then(function(g){E(k,g)},A)})(L)}function d(p){this.def=p,this.triggered=!1}function v(p){this.promise=p,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function x(p){if(typeof p!=\"function\")throw TypeError(\"Not a function\");if(this.__NPO__!==0)throw TypeError(\"Not a promise\");this.__NPO__=1;var C=new v(this);this.then=function(A,L){var _={success:typeof A==\"function\"?A:!0,failure:typeof L==\"function\"?L:!1};return _.promise=new this.constructor(function(M,g){if(typeof M!=\"function\"||typeof g!=\"function\")throw TypeError(\"Not a function\");_.resolve=M,_.reject=g}),C.chain.push(_),C.state!==0&&o(l,C),_.promise},this.catch=function(A){return this.then(void 0,A)};try{p.call(void 0,function(A){c.call(C,A)},function(A){f.call(C,A)})}catch(E){f.call(C,E)}}var b=t({},\"constructor\",x,!1);return x.prototype=b,t(b,\"__NPO__\",0,!1),t(x,\"resolve\",function(C){var E=this;return C&&typeof C==\"object\"&&C.__NPO__===1?C:new E(function(L,_){if(typeof L!=\"function\"||typeof _!=\"function\")throw TypeError(\"Not a function\");L(C)})}),t(x,\"reject\",function(C){return new this(function(A,L){if(typeof A!=\"function\"||typeof L!=\"function\")throw TypeError(\"Not a function\");L(C)})}),t(x,\"all\",function(C){var E=this;return i.call(C)!=\"[object Array]\"?E.reject(TypeError(\"Not an array\")):C.length===0?E.resolve([]):new E(function(L,_){if(typeof L!=\"function\"||typeof _!=\"function\")throw TypeError(\"Not a function\");var k=C.length,M=Array(k),g=0;h(E,C,function(T,z){M[T]=z,++g===k&&L(M)},_)})}),t(x,\"race\",function(C){var E=this;return i.call(C)!=\"[object Array]\"?E.reject(TypeError(\"Not an array\")):new E(function(L,_){if(typeof L!=\"function\"||typeof _!=\"function\")throw TypeError(\"Not a function\");h(E,C,function(M,g){L(g)},_)})}),x})});var Oa=ye((ltr,l6)=>{(function(){var e={version:\"3.8.2\"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=se[Te];return Ne}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+\"\")},o.setAttributeNS=function(se,Te,Ne){l.call(this,se,Te,Ne+\"\")},u.setProperty=function(se,Te,Ne){c.call(this,se,Te+\"\",Ne)}}e.ascending=f;function f(X,se){return X<se?-1:X>se?1:X>=se?0:NaN}e.descending=function(X,se){return se<X?-1:se>X?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&He>Ye&&(He=Ye)}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&He>Ye&&(He=Ye)}return He},e.max=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&Ye>He&&(He=Ye)}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&Ye>He&&(He=Ye)}return He},e.extent=function(X,se){var Te=-1,Ne=X.length,He,Ye,Ct;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=Ct=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&(He>Ye&&(He=Ye),Ct<Ye&&(Ct=Ye))}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=Ct=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&(He>Ye&&(He=Ye),Ct<Ye&&(Ct=Ye))}return[He,Ct]};function h(X){return X===null?NaN:+X}function d(X){return!isNaN(X)}e.sum=function(X,se){var Te=0,Ne=X.length,He,Ye=-1;if(arguments.length===1)for(;++Ye<Ne;)d(He=+X[Ye])&&(Te+=He);else for(;++Ye<Ne;)d(He=+se.call(X,X[Ye],Ye))&&(Te+=He);return Te},e.mean=function(X,se){var Te=0,Ne=X.length,He,Ye=-1,Ct=Ne;if(arguments.length===1)for(;++Ye<Ne;)d(He=h(X[Ye]))?Te+=He:--Ct;else for(;++Ye<Ne;)d(He=h(se.call(X,X[Ye],Ye)))?Te+=He:--Ct;if(Ct)return Te/Ct},e.quantile=function(X,se){var Te=(X.length-1)*se+1,Ne=Math.floor(Te),He=+X[Ne-1],Ye=Te-Ne;return Ye?He+Ye*(X[Ne]-He):He},e.median=function(X,se){var Te=[],Ne=X.length,He,Ye=-1;if(arguments.length===1)for(;++Ye<Ne;)d(He=h(X[Ye]))&&Te.push(He);else for(;++Ye<Ne;)d(He=h(se.call(X,X[Ye],Ye)))&&Te.push(He);if(Te.length)return e.quantile(Te.sort(f),.5)},e.variance=function(X,se){var Te=X.length,Ne=0,He,Ye,Ct=0,nt=-1,jt=0;if(arguments.length===1)for(;++nt<Te;)d(He=h(X[nt]))&&(Ye=He-Ne,Ne+=Ye/++jt,Ct+=Ye*(He-Ne));else for(;++nt<Te;)d(He=h(se.call(X,X[nt],nt)))&&(Ye=He-Ne,Ne+=Ye/++jt,Ct+=Ye*(He-Ne));if(jt>1)return Ct/(jt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne<He;){var Ye=Ne+He>>>1;X(se[Ye],Te)<0?Ne=Ye+1:He=Ye}return Ne},right:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne<He;){var Ye=Ne+He>>>1;X(se[Ye],Te)>0?He=Ye:Ne=Ye+1}return Ne}}}var x=v(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Ne=arguments.length)<3&&(Te=X.length,Ne<2&&(se=0));for(var Ne=Te-se,He,Ye;Ne;)Ye=Math.random()*Ne--|0,He=X[Ne+se],X[Ne+se]=X[Ye+se],X[Ye+se]=He;return X},e.permute=function(X,se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=X[se[Te]];return Ne},e.pairs=function(X){for(var se=0,Te=X.length-1,Ne,He=X[0],Ye=new Array(Te<0?0:Te);se<Te;)Ye[se]=[Ne=He,He=X[++se]];return Ye},e.transpose=function(X){if(!(Ye=X.length))return[];for(var se=-1,Te=e.min(X,b),Ne=new Array(Te);++se<Te;)for(var He=-1,Ye,Ct=Ne[se]=new Array(Ye);++He<Ye;)Ct[He]=X[He][se];return Ne};function b(X){return X.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(X){var se=[];for(var Te in X)se.push(Te);return se},e.values=function(X){var se=[];for(var Te in X)se.push(X[Te]);return se},e.entries=function(X){var se=[];for(var Te in X)se.push({key:Te,value:X[Te]});return se},e.merge=function(X){for(var se=X.length,Te,Ne=-1,He=0,Ye,Ct;++Ne<se;)He+=X[Ne].length;for(Ye=new Array(He);--se>=0;)for(Ct=X[se],Te=Ct.length;--Te>=0;)Ye[--He]=Ct[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error(\"infinite range\");var Ne=[],He=C(p(Te)),Ye=-1,Ct;if(X*=He,se*=He,Te*=He,Te<0)for(;(Ct=X+Te*++Ye)>se;)Ne.push(Ct/He);else for(;(Ct=X+Te*++Ye)<se;)Ne.push(Ct/He);return Ne};function C(X){for(var se=1;X*se%1;)se*=10;return se}function E(X,se){for(var Te in se)Object.defineProperty(X.prototype,Te,{value:se[Te],enumerable:!1})}e.map=function(X,se){var Te=new A;if(X instanceof A)X.forEach(function(nt,jt){Te.set(nt,jt)});else if(Array.isArray(X)){var Ne=-1,He=X.length,Ye;if(arguments.length===1)for(;++Ne<He;)Te.set(Ne,X[Ne]);else for(;++Ne<He;)Te.set(se.call(X,Ye=X[Ne],Ne),Ye)}else for(var Ct in X)Te.set(Ct,X[Ct]);return Te};function A(){this._=Object.create(null)}var L=\"__proto__\",_=\"\\0\";E(A,{has:g,get:function(X){return this._[k(X)]},set:function(X,se){return this._[k(X)]=se},remove:P,keys:T,values:function(){var X=[];for(var se in this._)X.push(this._[se]);return X},entries:function(){var X=[];for(var se in this._)X.push({key:M(se),value:this._[se]});return X},size:z,empty:O,forEach:function(X){for(var se in this._)X.call(this,M(se),this._[se])}});function k(X){return(X+=\"\")===L||X[0]===_?_+X:X}function M(X){return(X+=\"\")[0]===_?X.slice(1):X}function g(X){return k(X)in this._}function P(X){return(X=k(X))in this._&&delete this._[X]}function T(){var X=[];for(var se in this._)X.push(M(se));return X}function z(){var X=0;for(var se in this._)++X;return X}function O(){for(var X in this._)return!1;return!0}e.nest=function(){var X={},se=[],Te=[],Ne,He;function Ye(nt,jt,gr){if(gr>=se.length)return He?He.call(X,jt):Ne?jt.sort(Ne):jt;for(var yr=-1,Gr=jt.length,qr=se[gr++],_i,bi,Xr,ni=new A,gi;++yr<Gr;)(gi=ni.get(_i=qr(bi=jt[yr])))?gi.push(bi):ni.set(_i,[bi]);return nt?(bi=nt(),Xr=function(Pi,Ai){bi.set(Pi,Ye(nt,Ai,gr))}):(bi={},Xr=function(Pi,Ai){bi[Pi]=Ye(nt,Ai,gr)}),ni.forEach(Xr),bi}function Ct(nt,jt){if(jt>=se.length)return nt;var gr=[],yr=Te[jt++];return nt.forEach(function(Gr,qr){gr.push({key:Gr,values:Ct(qr,jt)})}),yr?gr.sort(function(Gr,qr){return yr(Gr.key,qr.key)}):gr}return X.map=function(nt,jt){return Ye(jt,nt,0)},X.entries=function(nt){return Ct(Ye(e.map,nt,0),0)},X.key=function(nt){return se.push(nt),X},X.sortKeys=function(nt){return Te[se.length-1]=nt,X},X.sortValues=function(nt){return Ne=nt,X},X.rollup=function(nt){return He=nt,X},X},e.set=function(X){var se=new V;if(X)for(var Te=0,Ne=X.length;Te<Ne;++Te)se.add(X[Te]);return se};function V(){this._=Object.create(null)}E(V,{has:g,add:function(X){return this._[k(X+=\"\")]=!0,X},remove:P,values:T,size:z,empty:O,forEach:function(X){for(var se in this._)X.call(this,M(se))}}),e.behavior={};function G(X){return X}e.rebind=function(X,se){for(var Te=1,Ne=arguments.length,He;++Te<Ne;)X[He=arguments[Te]]=Z(X,se,se[He]);return X};function Z(X,se,Te){return function(){var Ne=Te.apply(se,arguments);return Ne===se?X:Ne}}function H(X,se){if(se in X)return se;se=se.charAt(0).toUpperCase()+se.slice(1);for(var Te=0,Ne=N.length;Te<Ne;++Te){var He=N[Te]+se;if(He in X)return He}}var N=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];function j(){}e.dispatch=function(){for(var X=new re,se=-1,Te=arguments.length;++se<Te;)X[arguments[se]]=oe(X);return X};function re(){}re.prototype.on=function(X,se){var Te=X.indexOf(\".\"),Ne=\"\";if(Te>=0&&(Ne=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Ne):this[X].on(Ne,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Ne,null);return this}};function oe(X){var se=[],Te=new A;function Ne(){for(var He=se,Ye=-1,Ct=He.length,nt;++Ye<Ct;)(nt=He[Ye].on)&&nt.apply(this,arguments);return X}return Ne.on=function(He,Ye){var Ct=Te.get(He),nt;return arguments.length<2?Ct&&Ct.on:(Ct&&(Ct.on=null,se=se.slice(0,nt=se.indexOf(Ct)).concat(se.slice(nt+1)),Te.remove(He)),Ye&&se.push(Te.set(He,{on:Ye})),X)},Ne}e.event=null;function _e(){e.event.preventDefault()}function Me(){for(var X=e.event,se;se=X.sourceEvent;)X=se;return X}function ke(X){for(var se=new re,Te=0,Ne=arguments.length;++Te<Ne;)se[arguments[Te]]=oe(se);return se.of=function(He,Ye){return function(Ct){try{var nt=Ct.sourceEvent=e.event;Ct.target=X,e.event=Ct,se[Ct.type].apply(He,Ye)}finally{e.event=nt}}},se}e.requote=function(X){return X.replace(me,\"\\\\$&\")};var me=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,ie={}.__proto__?function(X,se){X.__proto__=se}:function(X,se){for(var Te in se)X[Te]=se[Te]};function Se(X){return ie(X,Pe),X}var Le=function(X,se){return se.querySelector(X)},Ae=function(X,se){return se.querySelectorAll(X)},De=function(X,se){var Te=X.matches||X[H(X,\"matchesSelector\")];return De=function(Ne,He){return Te.call(Ne,He)},De(X,se)};typeof Sizzle==\"function\"&&(Le=function(X,se){return Sizzle(X,se)[0]||null},Ae=Sizzle,De=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var Pe=e.selection.prototype=[];Pe.select=function(X){var se=[],Te,Ne,He,Ye;X=ge(X);for(var Ct=-1,nt=this.length;++Ct<nt;){se.push(Te=[]),Te.parentNode=(He=this[Ct]).parentNode;for(var jt=-1,gr=He.length;++jt<gr;)(Ye=He[jt])?(Te.push(Ne=X.call(Ye,Ye.__data__,jt,Ct)),Ne&&\"__data__\"in Ye&&(Ne.__data__=Ye.__data__)):Te.push(null)}return Se(se)};function ge(X){return typeof X==\"function\"?X:function(){return Le(X,this)}}Pe.selectAll=function(X){var se=[],Te,Ne;X=Fe(X);for(var He=-1,Ye=this.length;++He<Ye;)for(var Ct=this[He],nt=-1,jt=Ct.length;++nt<jt;)(Ne=Ct[nt])&&(se.push(Te=r(X.call(Ne,Ne.__data__,nt,He))),Te.parentNode=Ne);return Se(se)};function Fe(X){return typeof X==\"function\"?X:function(){return Ae(X,this)}}var ce=\"http://www.w3.org/1999/xhtml\",Ze={svg:\"http://www.w3.org/2000/svg\",xhtml:ce,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};e.ns={prefix:Ze,qualify:function(X){var se=X.indexOf(\":\"),Te=X;return se>=0&&(Te=X.slice(0,se))!==\"xmlns\"&&(X=X.slice(se+1)),Ze.hasOwnProperty(Te)?{space:Ze[Te],local:X}:X}},Pe.attr=function(X,se){if(arguments.length<2){if(typeof X==\"string\"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(ct(se,X[se]));return this}return this.each(ct(X,se))};function ct(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Ne(){this.removeAttributeNS(X.space,X.local)}function He(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function Ct(){var jt=se.apply(this,arguments);jt==null?this.removeAttribute(X):this.setAttribute(X,jt)}function nt(){var jt=se.apply(this,arguments);jt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,jt)}return se==null?X.local?Ne:Te:typeof se==\"function\"?X.local?nt:Ct:X.local?Ye:He}function pt(X){return X.trim().replace(/\\s+/g,\" \")}Pe.classed=function(X,se){if(arguments.length<2){if(typeof X==\"string\"){var Te=this.node(),Ne=(X=st(X)).length,He=-1;if(se=Te.classList){for(;++He<Ne;)if(!se.contains(X[He]))return!1}else for(se=Te.getAttribute(\"class\");++He<Ne;)if(!Wt(X[He]).test(se))return!1;return!0}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function Wt(X){return new RegExp(\"(?:^|\\\\s+)\"+e.requote(X)+\"(?:\\\\s+|$)\",\"g\")}function st(X){return(X+\"\").trim().split(/^|\\s+/)}function lt(X,se){X=st(X).map(Gt);var Te=X.length;function Ne(){for(var Ye=-1;++Ye<Te;)X[Ye](this,se)}function He(){for(var Ye=-1,Ct=se.apply(this,arguments);++Ye<Te;)X[Ye](this,Ct)}return typeof se==\"function\"?He:Ne}function Gt(X){var se=Wt(X);return function(Te,Ne){if(He=Te.classList)return Ne?He.add(X):He.remove(X);var He=Te.getAttribute(\"class\")||\"\";Ne?(se.lastIndex=0,se.test(He)||Te.setAttribute(\"class\",pt(He+\" \"+X))):Te.setAttribute(\"class\",pt(He.replace(se,\" \")))}}Pe.style=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=\"\");for(Te in X)this.each(Nt(Te,X[Te],se));return this}if(Ne<2){var He=this.node();return a(He).getComputedStyle(He,null).getPropertyValue(X)}Te=\"\"}return this.each(Nt(X,se,Te))};function Nt(X,se,Te){function Ne(){this.style.removeProperty(X)}function He(){this.style.setProperty(X,se,Te)}function Ye(){var Ct=se.apply(this,arguments);Ct==null?this.style.removeProperty(X):this.style.setProperty(X,Ct,Te)}return se==null?Ne:typeof se==\"function\"?Ye:He}Pe.property=function(X,se){if(arguments.length<2){if(typeof X==\"string\")return this.node()[X];for(se in X)this.each($t(se,X[se]));return this}return this.each($t(X,se))};function $t(X,se){function Te(){delete this[X]}function Ne(){this[X]=se}function He(){var Ye=se.apply(this,arguments);Ye==null?delete this[X]:this[X]=Ye}return se==null?Te:typeof se==\"function\"?He:Ne}Pe.text=function(X){return arguments.length?this.each(typeof X==\"function\"?function(){var se=X.apply(this,arguments);this.textContent=se==null?\"\":se}:X==null?function(){this.textContent=\"\"}:function(){this.textContent=X}):this.node().textContent},Pe.html=function(X){return arguments.length?this.each(typeof X==\"function\"?function(){var se=X.apply(this,arguments);this.innerHTML=se==null?\"\":se}:X==null?function(){this.innerHTML=\"\"}:function(){this.innerHTML=X}):this.node().innerHTML},Pe.append=function(X){return X=sr(X),this.select(function(){return this.appendChild(X.apply(this,arguments))})};function sr(X){function se(){var Ne=this.ownerDocument,He=this.namespaceURI;return He===ce&&Ne.documentElement.namespaceURI===ce?Ne.createElement(X):Ne.createElementNS(He,X)}function Te(){return this.ownerDocument.createElementNS(X.space,X.local)}return typeof X==\"function\"?X:(X=e.ns.qualify(X)).local?Te:se}Pe.insert=function(X,se){return X=sr(X),se=ge(se),this.select(function(){return this.insertBefore(X.apply(this,arguments),se.apply(this,arguments)||null)})},Pe.remove=function(){return this.each(wr)};function wr(){var X=this.parentNode;X&&X.removeChild(this)}Pe.data=function(X,se){var Te=-1,Ne=this.length,He,Ye;if(!arguments.length){for(X=new Array(Ne=(He=this[0]).length);++Te<Ne;)(Ye=He[Te])&&(X[Te]=Ye.__data__);return X}function Ct(yr,Gr){var qr,_i=yr.length,bi=Gr.length,Xr=Math.min(_i,bi),ni=new Array(bi),gi=new Array(bi),Pi=new Array(_i),Ai,ti;if(se){var Rn=new A,Cn=new Array(_i),Nn;for(qr=-1;++qr<_i;)(Ai=yr[qr])&&(Rn.has(Nn=se.call(Ai,Ai.__data__,qr))?Pi[qr]=Ai:Rn.set(Nn,Ai),Cn[qr]=Nn);for(qr=-1;++qr<bi;)(Ai=Rn.get(Nn=se.call(Gr,ti=Gr[qr],qr)))?Ai!==!0&&(ni[qr]=Ai,Ai.__data__=ti):gi[qr]=ur(ti),Rn.set(Nn,!0);for(qr=-1;++qr<_i;)qr in Cn&&Rn.get(Cn[qr])!==!0&&(Pi[qr]=yr[qr])}else{for(qr=-1;++qr<Xr;)Ai=yr[qr],ti=Gr[qr],Ai?(Ai.__data__=ti,ni[qr]=Ai):gi[qr]=ur(ti);for(;qr<bi;++qr)gi[qr]=ur(Gr[qr]);for(;qr<_i;++qr)Pi[qr]=yr[qr]}gi.update=ni,gi.parentNode=ni.parentNode=Pi.parentNode=yr.parentNode,nt.push(gi),jt.push(ni),gr.push(Pi)}var nt=Ut([]),jt=Se([]),gr=Se([]);if(typeof X==\"function\")for(;++Te<Ne;)Ct(He=this[Te],X.call(He,He.parentNode.__data__,Te));else for(;++Te<Ne;)Ct(He=this[Te],X);return jt.enter=function(){return nt},jt.exit=function(){return gr},jt};function ur(X){return{__data__:X}}Pe.datum=function(X){return arguments.length?this.property(\"__data__\",X):this.property(\"__data__\")},Pe.filter=function(X){var se=[],Te,Ne,He;typeof X!=\"function\"&&(X=Qe(X));for(var Ye=0,Ct=this.length;Ye<Ct;Ye++){se.push(Te=[]),Te.parentNode=(Ne=this[Ye]).parentNode;for(var nt=0,jt=Ne.length;nt<jt;nt++)(He=Ne[nt])&&X.call(He,He.__data__,nt,Ye)&&Te.push(He)}return Se(se)};function Qe(X){return function(){return De(this,X)}}Pe.order=function(){for(var X=-1,se=this.length;++X<se;)for(var Te=this[X],Ne=Te.length-1,He=Te[Ne],Ye;--Ne>=0;)(Ye=Te[Ne])&&(He&&He!==Ye.nextSibling&&He.parentNode.insertBefore(Ye,He),He=Ye);return this},Pe.sort=function(X){X=Et.apply(this,arguments);for(var se=-1,Te=this.length;++se<Te;)this[se].sort(X);return this.order()};function Et(X){return arguments.length||(X=f),function(se,Te){return se&&Te?X(se.__data__,Te.__data__):!se-!Te}}Pe.each=function(X){return er(this,function(se,Te,Ne){X.call(se,se.__data__,Te,Ne)})};function er(X,se){for(var Te=0,Ne=X.length;Te<Ne;Te++)for(var He=X[Te],Ye=0,Ct=He.length,nt;Ye<Ct;Ye++)(nt=He[Ye])&&se(nt,Ye,Te);return X}Pe.call=function(X){var se=r(arguments);return X.apply(se[0]=this,se),this},Pe.empty=function(){return!this.node()},Pe.node=function(){for(var X=0,se=this.length;X<se;X++)for(var Te=this[X],Ne=0,He=Te.length;Ne<He;Ne++){var Ye=Te[Ne];if(Ye)return Ye}return null},Pe.size=function(){var X=0;return er(this,function(){++X}),X};function Ut(X){return ie(X,Ft),X}var Ft=[];e.selection.enter=Ut,e.selection.enter.prototype=Ft,Ft.append=Pe.append,Ft.empty=Pe.empty,Ft.node=Pe.node,Ft.call=Pe.call,Ft.size=Pe.size,Ft.select=function(X){for(var se=[],Te,Ne,He,Ye,Ct,nt=-1,jt=this.length;++nt<jt;){He=(Ye=this[nt]).update,se.push(Te=[]),Te.parentNode=Ye.parentNode;for(var gr=-1,yr=Ye.length;++gr<yr;)(Ct=Ye[gr])?(Te.push(He[gr]=Ne=X.call(Ye.parentNode,Ct.__data__,gr,nt)),Ne.__data__=Ct.__data__):Te.push(null)}return Se(se)},Ft.insert=function(X,se){return arguments.length<2&&(se=bt(this)),Pe.insert.call(this,X,se)};function bt(X){var se,Te;return function(Ne,He,Ye){var Ct=X[Ye].update,nt=Ct.length,jt;for(Ye!=Te&&(Te=Ye,se=0),He>=se&&(se=He+1);!(jt=Ct[se])&&++se<nt;);return jt}}e.select=function(X){var se;return typeof X==\"string\"?(se=[Le(X,n)],se.parentNode=n.documentElement):(se=[X],se.parentNode=i(X)),Se([se])},e.selectAll=function(X){var se;return typeof X==\"string\"?(se=r(Ae(X,n)),se.parentNode=n.documentElement):(se=r(X),se.parentNode=null),Se([se])},Pe.on=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=!1);for(Te in X)this.each(yt(Te,X[Te],se));return this}if(Ne<2)return(Ne=this.node()[\"__on\"+X])&&Ne._;Te=!1}return this.each(yt(X,se,Te))};function yt(X,se,Te){var Ne=\"__on\"+X,He=X.indexOf(\".\"),Ye=lr;He>0&&(X=X.slice(0,He));var Ct=Yt.get(X);Ct&&(X=Ct,Ye=Tr);function nt(){var yr=this[Ne];yr&&(this.removeEventListener(X,yr,yr.$),delete this[Ne])}function jt(){var yr=Ye(se,r(arguments));nt.call(this),this.addEventListener(X,this[Ne]=yr,yr.$=Te),yr._=se}function gr(){var yr=new RegExp(\"^__on([^.]+)\"+e.requote(X)+\"$\"),Gr;for(var qr in this)if(Gr=qr.match(yr)){var _i=this[qr];this.removeEventListener(Gr[1],_i,_i.$),delete this[qr]}}return He?se?jt:nt:se?j:gr}var Yt=e.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});n&&Yt.forEach(function(X){\"on\"+X in n&&Yt.remove(X)});function lr(X,se){return function(Te){var Ne=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Ne}}}function Tr(X,se){var Te=lr(X,se);return function(Ne){var He=this,Ye=Ne.relatedTarget;(!Ye||Ye!==He&&!(Ye.compareDocumentPosition(He)&8))&&Te.call(He,Ne)}}var Rr,ei=0;function Wr(X){var se=\".dragsuppress-\"+ ++ei,Te=\"click\"+se,Ne=e.select(a(X)).on(\"touchmove\"+se,_e).on(\"dragstart\"+se,_e).on(\"selectstart\"+se,_e);if(Rr==null&&(Rr=\"onselectstart\"in X?!1:H(X.style,\"userSelect\")),Rr){var He=i(X).style,Ye=He[Rr];He[Rr]=\"none\"}return function(Ct){if(Ne.on(se,null),Rr&&(He[Rr]=Ye),Ct){var nt=function(){Ne.on(Te,null)};Ne.on(Te,function(){_e(),nt()},!0),setTimeout(nt,0)}}}e.mouse=function(X){return dt(X,Me())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function dt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Ne=Te.createSVGPoint();if(Ur<0){var He=a(X);if(He.scrollX||He.scrollY){Te=e.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\");var Ye=Te[0][0].getScreenCTM();Ur=!(Ye.f||Ye.e),Te.remove()}}return Ur?(Ne.x=se.pageX,Ne.y=se.pageY):(Ne.x=se.clientX,Ne.y=se.clientY),Ne=Ne.matrixTransform(X.getScreenCTM().inverse()),[Ne.x,Ne.y]}var Ct=X.getBoundingClientRect();return[se.clientX-Ct.left-X.clientLeft,se.clientY-Ct.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=Me().changedTouches),se){for(var Ne=0,He=se.length,Ye;Ne<He;++Ne)if((Ye=se[Ne]).identifier===Te)return dt(X,Ye)}},e.behavior.drag=function(){var X=ke(He,\"drag\",\"dragstart\",\"dragend\"),se=null,Te=Ye(j,e.mouse,a,\"mousemove\",\"mouseup\"),Ne=Ye(Ge,e.touch,G,\"touchmove\",\"touchend\");function He(){this.on(\"mousedown.drag\",Te).on(\"touchstart.drag\",Ne)}function Ye(Ct,nt,jt,gr,yr){return function(){var Gr=this,qr=e.event.target.correspondingElement||e.event.target,_i=Gr.parentNode,bi=X.of(Gr,arguments),Xr=0,ni=Ct(),gi=\".drag\"+(ni==null?\"\":\"-\"+ni),Pi,Ai=e.select(jt(qr)).on(gr+gi,Cn).on(yr+gi,Nn),ti=Wr(qr),Rn=nt(_i,ni);se?(Pi=se.apply(Gr,arguments),Pi=[Pi.x-Rn[0],Pi.y-Rn[1]]):Pi=[0,0],bi({type:\"dragstart\"});function Cn(){var ia=nt(_i,ni),Ea,Ia;ia&&(Ea=ia[0]-Rn[0],Ia=ia[1]-Rn[1],Xr|=Ea|Ia,Rn=ia,bi({type:\"drag\",x:ia[0]+Pi[0],y:ia[1]+Pi[1],dx:Ea,dy:Ia}))}function Nn(){nt(_i,ni)&&(Ai.on(gr+gi,null).on(yr+gi,null),ti(Xr),bi({type:\"dragend\"}))}}}return He.origin=function(Ct){return arguments.length?(se=Ct,He):se},e.rebind(He,X,\"on\")};function Ge(){return e.event.changedTouches[0].identifier}e.touches=function(X,se){return arguments.length<2&&(se=Me().touches),se?r(se).map(function(Te){var Ne=dt(X,Te);return Ne.identifier=Te.identifier,Ne}):[]};var Je=1e-6,je=Je*Je,$e=Math.PI,wt=2*$e,Ie=wt-Je,xe=$e/2,Ce=$e/180,vt=180/$e;function nr(X){return X>0?1:X<0?-1:0}function ir(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function pr(X){return X>1?0:X<-1?$e:Math.acos(X)}function oi(X){return X>1?xe:X<-1?-xe:Math.asin(X)}function di(X){return((X=Math.exp(X))-1/X)/2}function Jr(X){return((X=Math.exp(X))+1/X)/2}function fi(X){return((X=Math.exp(2*X))-1)/(X+1)}function Hi(X){return(X=Math.sin(X/2))*X}var Pn=Math.SQRT2,wn=2,pn=4;e.interpolateZoom=function(X,se){var Te=X[0],Ne=X[1],He=X[2],Ye=se[0],Ct=se[1],nt=se[2],jt=Ye-Te,gr=Ct-Ne,yr=jt*jt+gr*gr,Gr,qr;if(yr<je)qr=Math.log(nt/He)/Pn,Gr=function(Pi){return[Te+Pi*jt,Ne+Pi*gr,He*Math.exp(Pn*Pi*qr)]};else{var _i=Math.sqrt(yr),bi=(nt*nt-He*He+pn*yr)/(2*He*wn*_i),Xr=(nt*nt-He*He-pn*yr)/(2*nt*wn*_i),ni=Math.log(Math.sqrt(bi*bi+1)-bi),gi=Math.log(Math.sqrt(Xr*Xr+1)-Xr);qr=(gi-ni)/Pn,Gr=function(Pi){var Ai=Pi*qr,ti=Jr(ni),Rn=He/(wn*_i)*(ti*fi(Pn*Ai+ni)-di(ni));return[Te+Rn*jt,Ne+Rn*gr,He*ti/Jr(Pn*Ai+ni)]}}return Gr.duration=qr*1e3,Gr},e.behavior.zoom=function(){var X={x:0,y:0,k:1},se,Te,Ne,He=[960,500],Ye=Vn,Ct=250,nt=0,jt=\"mousedown.zoom\",gr=\"mousemove.zoom\",yr=\"mouseup.zoom\",Gr,qr=\"touchstart.zoom\",_i,bi=ke(Ai,\"zoomstart\",\"zoom\",\"zoomend\"),Xr,ni,gi,Pi;ea||(ea=\"onwheel\"in n?(kn=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in n?(kn=function(){return e.event.wheelDelta},\"mousewheel\"):(kn=function(){return-e.event.detail},\"MozMousePixelScroll\"));function Ai(Gn){Gn.on(jt,go).on(ea+\".zoom\",Es).on(\"dblclick.zoom\",Zs).on(qr,Rs)}Ai.event=function(Gn){Gn.each(function(){var Ha=bi.of(this,arguments),Fo=X;Bo?e.select(this).transition().each(\"start.zoom\",function(){X=this.__chart__||{x:0,y:0,k:1},Ia(Ha)}).tween(\"zoom:zoom\",function(){var Uo=He[0],Qs=He[1],Ml=Te?Te[0]:Uo/2,bu=Te?Te[1]:Qs/2,vl=e.interpolateZoom([(Ml-X.x)/X.k,(bu-X.y)/X.k,Uo/X.k],[(Ml-Fo.x)/Fo.k,(bu-Fo.y)/Fo.k,Uo/Fo.k]);return function(Sc){var Ee=vl(Sc),xt=Uo/Ee[2];this.__chart__=X={x:Ml-Ee[0]*xt,y:bu-Ee[1]*xt,k:xt},yo(Ha)}}).each(\"interrupt.zoom\",function(){Da(Ha)}).each(\"end.zoom\",function(){Da(Ha)}):(this.__chart__=X,Ia(Ha),yo(Ha),Da(Ha))})},Ai.translate=function(Gn){return arguments.length?(X={x:+Gn[0],y:+Gn[1],k:X.k},Ea(),Ai):[X.x,X.y]},Ai.scale=function(Gn){return arguments.length?(X={x:X.x,y:X.y,k:null},Cn(+Gn),Ea(),Ai):X.k},Ai.scaleExtent=function(Gn){return arguments.length?(Ye=Gn==null?Vn:[+Gn[0],+Gn[1]],Ai):Ye},Ai.center=function(Gn){return arguments.length?(Ne=Gn&&[+Gn[0],+Gn[1]],Ai):Ne},Ai.size=function(Gn){return arguments.length?(He=Gn&&[+Gn[0],+Gn[1]],Ai):He},Ai.duration=function(Gn){return arguments.length?(Ct=+Gn,Ai):Ct},Ai.x=function(Gn){return arguments.length?(ni=Gn,Xr=Gn.copy(),X={x:0,y:0,k:1},Ai):ni},Ai.y=function(Gn){return arguments.length?(Pi=Gn,gi=Gn.copy(),X={x:0,y:0,k:1},Ai):Pi};function ti(Gn){return[(Gn[0]-X.x)/X.k,(Gn[1]-X.y)/X.k]}function Rn(Gn){return[Gn[0]*X.k+X.x,Gn[1]*X.k+X.y]}function Cn(Gn){X.k=Math.max(Ye[0],Math.min(Ye[1],Gn))}function Nn(Gn,Ha){Ha=Rn(Ha),X.x+=Gn[0]-Ha[0],X.y+=Gn[1]-Ha[1]}function ia(Gn,Ha,Fo,Uo){Gn.__chart__={x:X.x,y:X.y,k:X.k},Cn(Math.pow(2,Uo)),Nn(Te=Ha,Fo),Gn=e.select(Gn),Ct>0&&(Gn=Gn.transition().duration(Ct)),Gn.call(Ai.event)}function Ea(){ni&&ni.domain(Xr.range().map(function(Gn){return(Gn-X.x)/X.k}).map(Xr.invert)),Pi&&Pi.domain(gi.range().map(function(Gn){return(Gn-X.y)/X.k}).map(gi.invert))}function Ia(Gn){nt++||Gn({type:\"zoomstart\"})}function yo(Gn){Ea(),Gn({type:\"zoom\",scale:X.k,translate:[X.x,X.y]})}function Da(Gn){--nt||(Gn({type:\"zoomend\"}),Te=null)}function go(){var Gn=this,Ha=bi.of(Gn,arguments),Fo=0,Uo=e.select(a(Gn)).on(gr,bu).on(yr,vl),Qs=ti(e.mouse(Gn)),Ml=Wr(Gn);fa.call(Gn),Ia(Ha);function bu(){Fo=1,Nn(e.mouse(Gn),Qs),yo(Ha)}function vl(){Uo.on(gr,null).on(yr,null),Ml(Fo),Da(Ha)}}function Rs(){var Gn=this,Ha=bi.of(Gn,arguments),Fo={},Uo=0,Qs,Ml=\".zoom-\"+e.event.changedTouches[0].identifier,bu=\"touchmove\"+Ml,vl=\"touchend\"+Ml,Sc=[],Ee=e.select(Gn),xt=Wr(Gn);Ir(),Ia(Ha),Ee.on(jt,null).on(qr,Ir);function zt(){var Vr=e.touches(Gn);return Qs=X.k,Vr.forEach(function(mi){mi.identifier in Fo&&(Fo[mi.identifier]=ti(mi))}),Vr}function Ir(){var Vr=e.event.target;e.select(Vr).on(bu,Hr).on(vl,Br),Sc.push(Vr);for(var mi=e.event.changedTouches,Ni=0,Oi=mi.length;Ni<Oi;++Ni)Fo[mi[Ni].identifier]=null;var Mi=zt(),Hn=Date.now();if(Mi.length===1){if(Hn-_i<500){var Qi=Mi[0];ia(Gn,Qi,Fo[Qi.identifier],Math.floor(Math.log(X.k)/Math.LN2)+1),_e()}_i=Hn}else if(Mi.length>1){var Qi=Mi[0],ji=Mi[1],si=Qi[0]-ji[0],Mr=Qi[1]-ji[1];Uo=si*si+Mr*Mr}}function Hr(){var Vr=e.touches(Gn),mi,Ni,Oi,Mi;fa.call(Gn);for(var Hn=0,Qi=Vr.length;Hn<Qi;++Hn,Mi=null)if(Oi=Vr[Hn],Mi=Fo[Oi.identifier]){if(Ni)break;mi=Oi,Ni=Mi}if(Mi){var ji=(ji=Oi[0]-mi[0])*ji+(ji=Oi[1]-mi[1])*ji,si=Uo&&Math.sqrt(ji/Uo);mi=[(mi[0]+Oi[0])/2,(mi[1]+Oi[1])/2],Ni=[(Ni[0]+Mi[0])/2,(Ni[1]+Mi[1])/2],Cn(si*Qs)}_i=null,Nn(mi,Ni),yo(Ha)}function Br(){if(e.event.touches.length){for(var Vr=e.event.changedTouches,mi=0,Ni=Vr.length;mi<Ni;++mi)delete Fo[Vr[mi].identifier];for(var Oi in Fo)return void zt()}e.selectAll(Sc).on(Ml,null),Ee.on(jt,go).on(qr,Rs),xt(),Da(Ha)}}function Es(){var Gn=bi.of(this,arguments);Gr?clearTimeout(Gr):(fa.call(this),se=ti(Te=Ne||e.mouse(this)),Ia(Gn)),Gr=setTimeout(function(){Gr=null,Da(Gn)},50),_e(),Cn(Math.pow(2,kn()*.002)*X.k),Nn(Te,se),yo(Gn)}function Zs(){var Gn=e.mouse(this),Ha=Math.log(X.k)/Math.LN2;ia(this,Gn,ti(Gn),e.event.shiftKey?Math.ceil(Ha)-1:Math.floor(Ha)+1)}return e.rebind(Ai,bi,\"on\")};var Vn=[0,1/0],kn,ea;e.color=ua;function ua(){}ua.prototype.toString=function(){return this.rgb()+\"\"},e.hsl=Vt;function Vt(X,se,Te){return this instanceof Vt?(this.h=+X,this.s=+se,void(this.l=+Te)):arguments.length<2?X instanceof Vt?new Vt(X.h,X.s,X.l):Ga(\"\"+X,vo,Vt):new Vt(X,se,Te)}var _t=Vt.prototype=new ua;_t.brighter=function(X){return X=Math.pow(.7,arguments.length?X:1),new Vt(this.h,this.s,this.l/X)},_t.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Vt(this.h,this.s,X*this.l)},_t.rgb=function(){return tr(this.h,this.s,this.l)};function tr(X,se,Te){var Ne,He;X=isNaN(X)?0:(X%=360)<0?X+360:X,se=isNaN(se)||se<0?0:se>1?1:se,Te=Te<0?0:Te>1?1:Te,He=Te<=.5?Te*(1+se):Te+se-Te*se,Ne=2*Te-He;function Ye(nt){return nt>360?nt-=360:nt<0&&(nt+=360),nt<60?Ne+(He-Ne)*nt/60:nt<180?He:nt<240?Ne+(He-Ne)*(240-nt)/60:Ne}function Ct(nt){return Math.round(Ye(nt)*255)}return new Wa(Ct(X+120),Ct(X),Ct(X-120))}e.hcl=ar;function ar(X,se,Te){return this instanceof ar?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof ar?new ar(X.h,X.c,X.l):X instanceof ri?Mn(X.l,X.a,X.b):Mn((X=jn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new ar(X,se,Te)}var Er=ar.prototype=new ua;Er.brighter=function(X){return new ar(this.h,this.c,Math.min(100,this.l+$r*(arguments.length?X:1)))},Er.darker=function(X){return new ar(this.h,this.c,Math.max(0,this.l-$r*(arguments.length?X:1)))},Er.rgb=function(){return Zr(this.h,this.c,this.l).rgb()};function Zr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ri(Te,Math.cos(X*=Ce)*se,Math.sin(X)*se)}e.lab=ri;function ri(X,se,Te){return this instanceof ri?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ri?new ri(X.l,X.a,X.b):X instanceof ar?Zr(X.h,X.c,X.l):jn((X=Wa(X)).r,X.g,X.b):new ri(X,se,Te)}var $r=18,zi=.95047,Ji=1,en=1.08883,cn=ri.prototype=new ua;cn.brighter=function(X){return new ri(Math.min(100,this.l+$r*(arguments.length?X:1)),this.a,this.b)},cn.darker=function(X){return new ri(Math.max(0,this.l-$r*(arguments.length?X:1)),this.a,this.b)},cn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Ne=(X+16)/116,He=Ne+se/500,Ye=Ne-Te/200;return He=Ba(He)*zi,Ne=Ba(Ne)*Ji,Ye=Ba(Ye)*en,new Wa(ma(3.2404542*He-1.5371385*Ne-.4985314*Ye),ma(-.969266*He+1.8760108*Ne+.041556*Ye),ma(.0556434*He-.2040259*Ne+1.0572252*Ye))}function Mn(X,se,Te){return X>0?new ar(Math.atan2(Te,se)*vt,Math.sqrt(se*se+Te*Te),X):new ar(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function la(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ga(\"\"+X,Wa,tr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Wo(X){return Fa(X)+\"\"}var da=Wa.prototype=new ua;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Ne=this.b,He=30;return!se&&!Te&&!Ne?new Wa(He,He,He):(se&&se<He&&(se=He),Te&&Te<He&&(Te=He),Ne&&Ne<He&&(Ne=He),new Wa(Math.min(255,se/X),Math.min(255,Te/X),Math.min(255,Ne/X)))},da.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Wa(X*this.r,X*this.g,X*this.b)},da.hsl=function(){return vo(this.r,this.g,this.b)},da.toString=function(){return\"#\"+Wn(this.r)+Wn(this.g)+Wn(this.b)};function Wn(X){return X<16?\"0\"+Math.max(0,X).toString(16):Math.min(255,X).toString(16)}function Ga(X,se,Te){var Ne=0,He=0,Ye=0,Ct,nt,jt;if(Ct=/([a-z]+)\\((.*)\\)/.exec(X=X.toLowerCase()),Ct)switch(nt=Ct[2].split(\",\"),Ct[1]){case\"hsl\":return Te(parseFloat(nt[0]),parseFloat(nt[1])/100,parseFloat(nt[2])/100);case\"rgb\":return se(Cr(nt[0]),Cr(nt[1]),Cr(nt[2]))}return(jt=Qr.get(X))?se(jt.r,jt.g,jt.b):(X!=null&&X.charAt(0)===\"#\"&&!isNaN(jt=parseInt(X.slice(1),16))&&(X.length===4?(Ne=(jt&3840)>>4,Ne=Ne>>4|Ne,He=jt&240,He=He>>4|He,Ye=jt&15,Ye=Ye<<4|Ye):X.length===7&&(Ne=(jt&16711680)>>16,He=(jt&65280)>>8,Ye=jt&255)),se(Ne,He,Ye))}function vo(X,se,Te){var Ne=Math.min(X/=255,se/=255,Te/=255),He=Math.max(X,se,Te),Ye=He-Ne,Ct,nt,jt=(He+Ne)/2;return Ye?(nt=jt<.5?Ye/(He+Ne):Ye/(2-He-Ne),X==He?Ct=(se-Te)/Ye+(se<Te?6:0):se==He?Ct=(Te-X)/Ye+2:Ct=(X-se)/Ye+4,Ct*=60):(Ct=NaN,nt=jt>0&&jt<1?0:Ct),new Vt(Ct,nt,jt)}function jn(X,se,Te){X=St(X),se=St(se),Te=St(Te);var Ne=la((.4124564*X+.3575761*se+.1804375*Te)/zi),He=la((.2126729*X+.7151522*se+.072175*Te)/Ji),Ye=la((.0193339*X+.119192*se+.9503041*Te)/en);return ri(116*He-16,500*(Ne-He),200*(He-Ye))}function St(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Cr(X){var se=parseFloat(X);return X.charAt(X.length-1)===\"%\"?Math.round(se*2.55):se}var Qr=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Qr.forEach(function(X,se){Qr.set(X,Fa(se))});function pi(X){return typeof X==\"function\"?X:function(){return X}}e.functor=pi,e.xhr=fn(G);function fn(X){return function(se,Te,Ne){return arguments.length===2&&typeof Te==\"function\"&&(Ne=Te,Te=null),Sn(se,Te,X,Ne)}}function Sn(X,se,Te,Ne){var He={},Ye=e.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),Ct={},nt=new XMLHttpRequest,jt=null;self.XDomainRequest&&!(\"withCredentials\"in nt)&&/^(http(s)?:)?\\/\\//.test(X)&&(nt=new XDomainRequest),\"onload\"in nt?nt.onload=nt.onerror=gr:nt.onreadystatechange=function(){nt.readyState>3&&gr()};function gr(){var yr=nt.status,Gr;if(!yr&&ki(nt)||yr>=200&&yr<300||yr===304){try{Gr=Te.call(He,nt)}catch(qr){Ye.error.call(He,qr);return}Ye.load.call(He,Gr)}else Ye.error.call(He,nt)}return nt.onprogress=function(yr){var Gr=e.event;e.event=yr;try{Ye.progress.call(He,nt)}finally{e.event=Gr}},He.header=function(yr,Gr){return yr=(yr+\"\").toLowerCase(),arguments.length<2?Ct[yr]:(Gr==null?delete Ct[yr]:Ct[yr]=Gr+\"\",He)},He.mimeType=function(yr){return arguments.length?(se=yr==null?null:yr+\"\",He):se},He.responseType=function(yr){return arguments.length?(jt=yr,He):jt},He.response=function(yr){return Te=yr,He},[\"get\",\"post\"].forEach(function(yr){He[yr]=function(){return He.send.apply(He,[yr].concat(r(arguments)))}}),He.send=function(yr,Gr,qr){if(arguments.length===2&&typeof Gr==\"function\"&&(qr=Gr,Gr=null),nt.open(yr,X,!0),se!=null&&!(\"accept\"in Ct)&&(Ct.accept=se+\",*/*\"),nt.setRequestHeader)for(var _i in Ct)nt.setRequestHeader(_i,Ct[_i]);return se!=null&&nt.overrideMimeType&&nt.overrideMimeType(se),jt!=null&&(nt.responseType=jt),qr!=null&&He.on(\"error\",qr).on(\"load\",function(bi){qr(null,bi)}),Ye.beforesend.call(He,nt),nt.send(Gr==null?null:Gr),He},He.abort=function(){return nt.abort(),He},e.rebind(He,Ye,\"on\"),Ne==null?He:He.get(En(Ne))}function En(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function ki(X){var se=X.responseType;return se&&se!==\"text\"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('[\"'+X+`\n",
       "]`),Ne=X.charCodeAt(0);function He(gr,yr,Gr){arguments.length<3&&(Gr=yr,yr=null);var qr=Sn(gr,se,yr==null?Ye:Ct(yr),Gr);return qr.row=function(_i){return arguments.length?qr.response((yr=_i)==null?Ye:Ct(_i)):yr},qr}function Ye(gr){return He.parse(gr.responseText)}function Ct(gr){return function(yr){return He.parse(yr.responseText,gr)}}He.parse=function(gr,yr){var Gr;return He.parseRows(gr,function(qr,_i){if(Gr)return Gr(qr,_i-1);var bi=function(Xr){for(var ni={},gi=qr.length,Pi=0;Pi<gi;++Pi)ni[qr[Pi]]=Xr[Pi];return ni};Gr=yr?function(Xr,ni){return yr(bi(Xr),ni)}:bi})},He.parseRows=function(gr,yr){var Gr={},qr={},_i=[],bi=gr.length,Xr=0,ni=0,gi,Pi;function Ai(){if(Xr>=bi)return qr;if(Pi)return Pi=!1,Gr;var Rn=Xr;if(gr.charCodeAt(Rn)===34){for(var Cn=Rn;Cn++<bi;)if(gr.charCodeAt(Cn)===34){if(gr.charCodeAt(Cn+1)!==34)break;++Cn}Xr=Cn+2;var Nn=gr.charCodeAt(Cn+1);return Nn===13?(Pi=!0,gr.charCodeAt(Cn+2)===10&&++Xr):Nn===10&&(Pi=!0),gr.slice(Rn+1,Cn).replace(/\"\"/g,'\"')}for(;Xr<bi;){var Nn=gr.charCodeAt(Xr++),ia=1;if(Nn===10)Pi=!0;else if(Nn===13)Pi=!0,gr.charCodeAt(Xr)===10&&(++Xr,++ia);else if(Nn!==Ne)continue;return gr.slice(Rn,Xr-ia)}return gr.slice(Rn)}for(;(gi=Ai())!==qr;){for(var ti=[];gi!==Gr&&gi!==qr;)ti.push(gi),gi=Ai();yr&&(ti=yr(ti,ni++))==null||_i.push(ti)}return _i},He.format=function(gr){if(Array.isArray(gr[0]))return He.formatRows(gr);var yr=new V,Gr=[];return gr.forEach(function(qr){for(var _i in qr)yr.has(_i)||Gr.push(yr.add(_i))}),[Gr.map(jt).join(X)].concat(gr.map(function(qr){return Gr.map(function(_i){return jt(qr[_i])}).join(X)})).join(`\n",
       "`)},He.formatRows=function(gr){return gr.map(nt).join(`\n",
       "`)};function nt(gr){return gr.map(jt).join(X)}function jt(gr){return Te.test(gr)?'\"'+gr.replace(/\\\"/g,'\"\"')+'\"':gr}return He},e.csv=e.dsv(\",\",\"text/csv\"),e.tsv=e.dsv(\"\t\",\"text/tab-separated-values\");var _n,ya,Jn,Ma,_o=this[H(this,\"requestAnimationFrame\")]||function(X){setTimeout(X,17)};e.timer=function(){No.apply(this,arguments)};function No(X,se,Te){var Ne=arguments.length;Ne<2&&(se=0),Ne<3&&(Te=Date.now());var He=Te+se,Ye={c:X,t:He,n:null};return ya?ya.n=Ye:_n=Ye,ya=Ye,Jn||(Ma=clearTimeout(Ma),Jn=1,_o(po)),Ye}function po(){var X=Lo(),se=Co()-X;se>24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),Jn=0):(Jn=1,_o(po))}e.timer.flush=function(){Lo(),Co()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function Co(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t<Te&&(Te=se.t),se=(X=se).n):se=X?X.n=se.n:_n=se.n;return ya=X,Te}e.round=function(X,se){return se?Math.round(X*(se=Math.pow(10,se)))/se:Math.round(X)},e.geom={};function Fs(X){return X[0]}function zs(X){return X[1]}e.geom.hull=function(X){var se=Fs,Te=zs;if(arguments.length)return Ne(X);function Ne(He){if(He.length<3)return[];var Ye=pi(se),Ct=pi(Te),nt,jt=He.length,gr=[],yr=[];for(nt=0;nt<jt;nt++)gr.push([+Ye.call(this,He[nt],nt),+Ct.call(this,He[nt],nt),nt]);for(gr.sort(cl),nt=0;nt<jt;nt++)yr.push([gr[nt][0],-gr[nt][1]]);var Gr=ul(gr),qr=ul(yr),_i=qr[0]===Gr[0],bi=qr[qr.length-1]===Gr[Gr.length-1],Xr=[];for(nt=Gr.length-1;nt>=0;--nt)Xr.push(He[gr[Gr[nt]][2]]);for(nt=+_i;nt<qr.length-bi;++nt)Xr.push(He[gr[qr[nt]][2]]);return Xr}return Ne.x=function(He){return arguments.length?(se=He,Ne):se},Ne.y=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function ul(X){for(var se=X.length,Te=[0,1],Ne=2,He=2;He<se;He++){for(;Ne>1&&ir(X[Te[Ne-2]],X[Te[Ne-1]],X[He])<=0;)--Ne;Te[Ne++]=He}return Te.slice(0,Ne)}function cl(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Ne=this[se-1],He=0;++X<se;)Te=Ne,Ne=this[X],He+=Te[1]*Ne[0]-Te[0]*Ne[1];return He*.5},zl.centroid=function(X){var se=-1,Te=this.length,Ne=0,He=0,Ye,Ct=this[Te-1],nt;for(arguments.length||(X=-1/(6*this.area()));++se<Te;)Ye=Ct,Ct=this[se],nt=Ye[0]*Ct[1]-Ct[0]*Ye[1],Ne+=(Ye[0]+Ct[0])*nt,He+=(Ye[1]+Ct[1])*nt;return[Ne*X,He*X]},zl.clip=function(X){for(var se,Te=Ss(X),Ne=-1,He=this.length-Ss(this),Ye,Ct,nt=this[He-1],jt,gr,yr;++Ne<He;){for(se=X.slice(),X.length=0,jt=this[Ne],gr=se[(Ct=se.length-Te)-1],Ye=-1;++Ye<Ct;)yr=se[Ye],cs(yr,nt,jt)?(cs(gr,nt,jt)||X.push(nl(gr,yr,nt,jt)),X.push(yr)):cs(gr,nt,jt)&&X.push(nl(gr,yr,nt,jt)),gr=yr;Te&&X.push(X[0]),nt=jt}return X};function cs(X,se,Te){return(Te[0]-se[0])*(X[1]-se[1])<(Te[1]-se[1])*(X[0]-se[0])}function nl(X,se,Te,Ne){var He=X[0],Ye=Te[0],Ct=se[0]-He,nt=Ne[0]-Ye,jt=X[1],gr=Te[1],yr=se[1]-jt,Gr=Ne[1]-gr,qr=(nt*(jt-gr)-Gr*(He-Ye))/(Gr*Ct-nt*yr);return[He+qr*Ct,jt+qr*yr]}function Ss(X){var se=X[0],Te=X[X.length-1];return!(se[0]-Te[0]||se[1]-Te[1])}var fl,Js,Os,Io=[],us,Zl,Su=[];function nc(){qs(this),this.edge=this.site=this.circle=null}function ws(X){var se=Io.pop()||new nc;return se.site=X,se}function Fn(X){Oo(X),Os.remove(X),Io.push(X),qs(X)}function _a(X){var se=X.circle,Te=se.x,Ne=se.cy,He={x:Te,y:Ne},Ye=X.P,Ct=X.N,nt=[X];Fn(X);for(var jt=Ye;jt.circle&&p(Te-jt.circle.x)<Je&&p(Ne-jt.circle.cy)<Je;)Ye=jt.P,nt.unshift(jt),Fn(jt),jt=Ye;nt.unshift(jt),Oo(jt);for(var gr=Ct;gr.circle&&p(Te-gr.circle.x)<Je&&p(Ne-gr.circle.cy)<Je;)Ct=gr.N,nt.push(gr),Fn(gr),gr=Ct;nt.push(gr),Oo(gr);var yr=nt.length,Gr;for(Gr=1;Gr<yr;++Gr)gr=nt[Gr],jt=nt[Gr-1],ml(gr.edge,jt.site,gr.site,He);jt=nt[0],gr=nt[yr-1],gr.edge=rf(jt.site,gr.site,null,He),aa(jt),aa(gr)}function Vu(X){for(var se=X.x,Te=X.y,Ne,He,Ye,Ct,nt=Os._;nt;)if(Ye=Ol(nt,Te)-se,Ye>Je)nt=nt.L;else if(Ct=se-xo(nt,Te),Ct>Je){if(!nt.R){Ne=nt;break}nt=nt.R}else{Ye>-Je?(Ne=nt.P,He=nt):Ct>-Je?(Ne=nt,He=nt.N):Ne=He=nt;break}var jt=ws(X);if(Os.insert(Ne,jt),!(!Ne&&!He)){if(Ne===He){Oo(Ne),He=ws(Ne.site),Os.insert(jt,He),jt.edge=He.edge=rf(Ne.site,jt.site),aa(Ne),aa(He);return}if(!He){jt.edge=rf(Ne.site,jt.site);return}Oo(Ne),Oo(He);var gr=Ne.site,yr=gr.x,Gr=gr.y,qr=X.x-yr,_i=X.y-Gr,bi=He.site,Xr=bi.x-yr,ni=bi.y-Gr,gi=2*(qr*ni-_i*Xr),Pi=qr*qr+_i*_i,Ai=Xr*Xr+ni*ni,ti={x:(ni*Pi-_i*Ai)/gi+yr,y:(qr*Ai-Xr*Pi)/gi+Gr};ml(He.edge,gr,bi,ti),jt.edge=rf(gr,X,null,ti),He.edge=rf(X,bi,null,ti),aa(Ne),aa(He)}}function Ol(X,se){var Te=X.site,Ne=Te.x,He=Te.y,Ye=He-se;if(!Ye)return Ne;var Ct=X.P;if(!Ct)return-1/0;Te=Ct.site;var nt=Te.x,jt=Te.y,gr=jt-se;if(!gr)return nt;var yr=nt-Ne,Gr=1/Ye-1/gr,qr=yr/gr;return Gr?(-qr+Math.sqrt(qr*qr-2*Gr*(yr*yr/(-2*gr)-jt+gr/2+He-Ye/2)))/Gr+Ne:(Ne+nt)/2}function xo(X,se){var Te=X.N;if(Te)return Ol(Te,se);var Ne=X.site;return Ne.y===se?Ne.x:1/0}function Yl(X){this.site=X,this.edges=[]}Yl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Us(X){for(var se=X[0][0],Te=X[1][0],Ne=X[0][1],He=X[1][1],Ye,Ct,nt,jt,gr=Js,yr=gr.length,Gr,qr,_i,bi,Xr,ni;yr--;)if(Gr=gr[yr],!(!Gr||!Gr.prepare()))for(_i=Gr.edges,bi=_i.length,qr=0;qr<bi;)ni=_i[qr].end(),nt=ni.x,jt=ni.y,Xr=_i[++qr%bi].start(),Ye=Xr.x,Ct=Xr.y,(p(nt-Ye)>Je||p(jt-Ct)>Je)&&(_i.splice(qr,0,new Zc(Uf(Gr.site,ni,p(nt-se)<Je&&He-jt>Je?{x:se,y:p(Ye-se)<Je?Ct:He}:p(jt-He)<Je&&Te-nt>Je?{x:p(Ct-He)<Je?Ye:Te,y:He}:p(nt-Te)<Je&&jt-Ne>Je?{x:Te,y:p(Ye-Te)<Je?Ct:Ne}:p(jt-Ne)<Je&&nt-se>Je?{x:p(Ct-Ne)<Je?Ye:se,y:Ne}:null),Gr.site,null)),++bi)}function Hl(X,se){return se.angle-X.angle}function ac(){qs(this),this.x=this.y=this.arc=this.site=this.cy=null}function aa(X){var se=X.P,Te=X.N;if(!(!se||!Te)){var Ne=se.site,He=X.site,Ye=Te.site;if(Ne!==Ye){var Ct=He.x,nt=He.y,jt=Ne.x-Ct,gr=Ne.y-nt,yr=Ye.x-Ct,ni=Ye.y-nt,Gr=2*(jt*ni-gr*yr);if(!(Gr>=-je)){var qr=jt*jt+gr*gr,_i=yr*yr+ni*ni,bi=(ni*qr-gr*_i)/Gr,Xr=(jt*_i-yr*qr)/Gr,ni=Xr+nt,gi=Su.pop()||new ac;gi.arc=X,gi.site=He,gi.x=bi+Ct,gi.y=ni+Math.sqrt(bi*bi+Xr*Xr),gi.cy=ni,X.circle=gi;for(var Pi=null,Ai=Zl._;Ai;)if(gi.y<Ai.y||gi.y===Ai.y&&gi.x<=Ai.x)if(Ai.L)Ai=Ai.L;else{Pi=Ai.P;break}else if(Ai.R)Ai=Ai.R;else{Pi=Ai;break}Zl.insert(Pi,gi),Pi||(us=gi)}}}}function Oo(X){var se=X.circle;se&&(se.P||(us=se.N),Zl.remove(se),Su.push(se),qs(se),X.circle=null)}function qo(X,se,Te,Ne){return function(He){var Ye=He.a,Ct=He.b,nt=Ye.x,jt=Ye.y,gr=Ct.x,yr=Ct.y,Gr=0,qr=1,_i=gr-nt,bi=yr-jt,Xr;if(Xr=X-nt,!(!_i&&Xr>0)){if(Xr/=_i,_i<0){if(Xr<Gr)return;Xr<qr&&(qr=Xr)}else if(_i>0){if(Xr>qr)return;Xr>Gr&&(Gr=Xr)}if(Xr=Te-nt,!(!_i&&Xr<0)){if(Xr/=_i,_i<0){if(Xr>qr)return;Xr>Gr&&(Gr=Xr)}else if(_i>0){if(Xr<Gr)return;Xr<qr&&(qr=Xr)}if(Xr=se-jt,!(!bi&&Xr>0)){if(Xr/=bi,bi<0){if(Xr<Gr)return;Xr<qr&&(qr=Xr)}else if(bi>0){if(Xr>qr)return;Xr>Gr&&(Gr=Xr)}if(Xr=Ne-jt,!(!bi&&Xr<0)){if(Xr/=bi,bi<0){if(Xr>qr)return;Xr>Gr&&(Gr=Xr)}else if(bi>0){if(Xr<Gr)return;Xr<qr&&(qr=Xr)}return Gr>0&&(He.a={x:nt+Gr*_i,y:jt+Gr*bi}),qr<1&&(He.b={x:nt+qr*_i,y:jt+qr*bi}),He}}}}}}function ql(X){for(var se=fl,Te=qo(X[0][0],X[0][1],X[1][0],X[1][1]),Ne=se.length,He;Ne--;)He=se[Ne],(!Pc(He,X)||!Te(He)||p(He.a.x-He.b.x)<Je&&p(He.a.y-He.b.y)<Je)&&(He.a=He.b=null,se.splice(Ne,1))}function Pc(X,se){var Te=X.b;if(Te)return!0;var Ne=X.a,He=se[0][0],Ye=se[1][0],Ct=se[0][1],nt=se[1][1],jt=X.l,gr=X.r,yr=jt.x,Gr=jt.y,qr=gr.x,_i=gr.y,bi=(yr+qr)/2,Xr=(Gr+_i)/2,ni,gi;if(_i===Gr){if(bi<He||bi>=Ye)return;if(yr>qr){if(!Ne)Ne={x:bi,y:Ct};else if(Ne.y>=nt)return;Te={x:bi,y:nt}}else{if(!Ne)Ne={x:bi,y:nt};else if(Ne.y<Ct)return;Te={x:bi,y:Ct}}}else if(ni=(yr-qr)/(_i-Gr),gi=Xr-ni*bi,ni<-1||ni>1)if(yr>qr){if(!Ne)Ne={x:(Ct-gi)/ni,y:Ct};else if(Ne.y>=nt)return;Te={x:(nt-gi)/ni,y:nt}}else{if(!Ne)Ne={x:(nt-gi)/ni,y:nt};else if(Ne.y<Ct)return;Te={x:(Ct-gi)/ni,y:Ct}}else if(Gr<_i){if(!Ne)Ne={x:He,y:ni*He+gi};else if(Ne.x>=Ye)return;Te={x:Ye,y:ni*Ye+gi}}else{if(!Ne)Ne={x:Ye,y:ni*Ye+gi};else if(Ne.x<He)return;Te={x:He,y:ni*He+gi}}return X.a=Ne,X.b=Te,!0}function Do(X,se){this.l=X,this.r=se,this.a=this.b=null}function rf(X,se,Te,Ne){var He=new Do(X,se);return fl.push(He),Te&&ml(He,X,se,Te),Ne&&ml(He,se,X,Ne),Js[X.i].edges.push(new Zc(He,X,se)),Js[se.i].edges.push(new Zc(He,se,X)),He}function Uf(X,se,Te){var Ne=new Do(X,null);return Ne.a=se,Ne.b=Te,fl.push(Ne),Ne}function ml(X,se,Te,Ne){!X.a&&!X.b?(X.a=Ne,X.l=se,X.r=Te):X.l===Te?X.b=Ne:X.a=Ne}function Zc(X,se,Te){var Ne=X.a,He=X.b;this.edge=X,this.site=se,this.angle=Te?Math.atan2(Te.y-se.y,Te.x-se.x):X.l===se?Math.atan2(He.x-Ne.x,Ne.y-He.y):Math.atan2(Ne.x-He.x,He.y-Ne.y)}Zc.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function Kl(){this._=null}function qs(X){X.U=X.C=X.L=X.R=X.P=X.N=null}Kl.prototype={insert:function(X,se){var Te,Ne,He;if(X){if(se.P=X,se.N=X.N,X.N&&(X.N.P=se),X.N=se,X.R){for(X=X.R;X.L;)X=X.L;X.L=se}else X.R=se;Te=X}else this._?(X=Cf(this._),se.P=null,se.N=X,X.P=X.L=se,Te=X):(se.P=se.N=null,this._=se,Te=null);for(se.L=se.R=null,se.U=Te,se.C=!0,X=se;Te&&Te.C;)Ne=Te.U,Te===Ne.L?(He=Ne.R,He&&He.C?(Te.C=He.C=!1,Ne.C=!0,X=Ne):(X===Te.R&&(yu(this,Te),X=Te,Te=X.U),Te.C=!1,Ne.C=!0,oc(this,Ne))):(He=Ne.L,He&&He.C?(Te.C=He.C=!1,Ne.C=!0,X=Ne):(X===Te.L&&(oc(this,Te),X=Te,Te=X.U),Te.C=!1,Ne.C=!0,yu(this,Ne))),Te=X.U;this._.C=!1},remove:function(X){X.N&&(X.N.P=X.P),X.P&&(X.P.N=X.N),X.N=X.P=null;var se=X.U,Te,Ne=X.L,He=X.R,Ye,Ct;if(Ne?He?Ye=Cf(He):Ye=Ne:Ye=He,se?se.L===X?se.L=Ye:se.R=Ye:this._=Ye,Ne&&He?(Ct=Ye.C,Ye.C=X.C,Ye.L=Ne,Ne.U=Ye,Ye!==He?(se=Ye.U,Ye.U=X.U,X=Ye.R,se.L=X,Ye.R=He,He.U=Ye):(Ye.U=se,se=Ye,X=Ye.R)):(Ct=X.C,X=Ye),X&&(X.U=se),!Ct){if(X&&X.C){X.C=!1;return}do{if(X===this._)break;if(X===se.L){if(Te=se.R,Te.C&&(Te.C=!1,se.C=!0,yu(this,se),Te=se.R),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.R||!Te.R.C)&&(Te.L.C=!1,Te.C=!0,oc(this,Te),Te=se.R),Te.C=se.C,se.C=Te.R.C=!1,yu(this,se),X=this._;break}}else if(Te=se.L,Te.C&&(Te.C=!1,se.C=!0,oc(this,se),Te=se.L),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.L||!Te.L.C)&&(Te.R.C=!1,Te.C=!0,yu(this,Te),Te=se.L),Te.C=se.C,se.C=Te.L.C=!1,oc(this,se),X=this._;break}Te.C=!0,X=se,se=se.U}while(!X.C);X&&(X.C=!1)}}};function yu(X,se){var Te=se,Ne=se.R,He=Te.U;He?He.L===Te?He.L=Ne:He.R=Ne:X._=Ne,Ne.U=He,Te.U=Ne,Te.R=Ne.L,Te.R&&(Te.R.U=Te),Ne.L=Te}function oc(X,se){var Te=se,Ne=se.L,He=Te.U;He?He.L===Te?He.L=Ne:He.R=Ne:X._=Ne,Ne.U=He,Te.U=Ne,Te.L=Ne.R,Te.L&&(Te.L.U=Te),Ne.R=Te}function Cf(X){for(;X.L;)X=X.L;return X}function sc(X,se){var Te=X.sort(Nh).pop(),Ne,He,Ye;for(fl=[],Js=new Array(X.length),Os=new Kl,Zl=new Kl;;)if(Ye=us,Te&&(!Ye||Te.y<Ye.y||Te.y===Ye.y&&Te.x<Ye.x))(Te.x!==Ne||Te.y!==He)&&(Js[Te.i]=new Yl(Te),Vu(Te),Ne=Te.x,He=Te.y),Te=X.pop();else if(Ye)_a(Ye.arc);else break;se&&(ql(se),Us(se));var Ct={cells:Js,edges:fl};return Os=Zl=fl=Js=null,Ct}function Nh(X,se){return se.y-X.y||se.x-X.x}e.geom.voronoi=function(X){var se=Fs,Te=zs,Ne=se,He=Te,Ye=kf;if(X)return Ct(X);function Ct(jt){var gr=new Array(jt.length),yr=Ye[0][0],Gr=Ye[0][1],qr=Ye[1][0],_i=Ye[1][1];return sc(nt(jt),Ye).cells.forEach(function(bi,Xr){var ni=bi.edges,gi=bi.site,Pi=gr[Xr]=ni.length?ni.map(function(Ai){var ti=Ai.start();return[ti.x,ti.y]}):gi.x>=yr&&gi.x<=qr&&gi.y>=Gr&&gi.y<=_i?[[yr,_i],[qr,_i],[qr,Gr],[yr,Gr]]:[];Pi.point=jt[Xr]}),gr}function nt(jt){return jt.map(function(gr,yr){return{x:Math.round(Ne(gr,yr)/Je)*Je,y:Math.round(He(gr,yr)/Je)*Je,i:yr}})}return Ct.links=function(jt){return sc(nt(jt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:jt[gr.l.i],target:jt[gr.r.i]}})},Ct.triangles=function(jt){var gr=[];return sc(nt(jt)).cells.forEach(function(yr,Gr){for(var qr=yr.site,_i=yr.edges.sort(Hl),bi=-1,Xr=_i.length,ni,gi,Pi=_i[Xr-1].edge,Ai=Pi.l===qr?Pi.r:Pi.l;++bi<Xr;)ni=Pi,gi=Ai,Pi=_i[bi].edge,Ai=Pi.l===qr?Pi.r:Pi.l,Gr<gi.i&&Gr<Ai.i&&fs(qr,gi,Ai)<0&&gr.push([jt[Gr],jt[gi.i],jt[Ai.i]])}),gr},Ct.x=function(jt){return arguments.length?(Ne=pi(se=jt),Ct):se},Ct.y=function(jt){return arguments.length?(He=pi(Te=jt),Ct):Te},Ct.clipExtent=function(jt){return arguments.length?(Ye=jt==null?kf:jt,Ct):Ye===kf?null:Ye},Ct.size=function(jt){return arguments.length?Ct.clipExtent(jt&&[[0,0],jt]):Ye===kf?null:Ye&&Ye[1]},Ct};var kf=[[-1e6,-1e6],[1e6,1e6]];function fs(X,se,Te){return(X.x-Te.x)*(se.y-X.y)-(X.x-se.x)*(Te.y-X.y)}e.geom.delaunay=function(X){return e.geom.voronoi().triangles(X)},e.geom.quadtree=function(X,se,Te,Ne,He){var Ye=Fs,Ct=zs,nt;if(nt=arguments.length)return Ye=nf,Ct=Vf,nt===3&&(He=Te,Ne=se,Te=se=0),jt(X);function jt(gr){var yr,Gr=pi(Ye),qr=pi(Ct),_i,bi,Xr,ni,gi,Pi,Ai,ti;if(se!=null)gi=se,Pi=Te,Ai=Ne,ti=He;else if(Ai=ti=-(gi=Pi=1/0),_i=[],bi=[],ni=gr.length,nt)for(Xr=0;Xr<ni;++Xr)yr=gr[Xr],yr.x<gi&&(gi=yr.x),yr.y<Pi&&(Pi=yr.y),yr.x>Ai&&(Ai=yr.x),yr.y>ti&&(ti=yr.y),_i.push(yr.x),bi.push(yr.y);else for(Xr=0;Xr<ni;++Xr){var Rn=+Gr(yr=gr[Xr],Xr),Cn=+qr(yr,Xr);Rn<gi&&(gi=Rn),Cn<Pi&&(Pi=Cn),Rn>Ai&&(Ai=Rn),Cn>ti&&(ti=Cn),_i.push(Rn),bi.push(Cn)}var Nn=Ai-gi,ia=ti-Pi;Nn>ia?ti=Pi+Nn:Ai=gi+ia;function Ea(Da,go,Rs,Es,Zs,Gn,Ha,Fo){if(!(isNaN(Rs)||isNaN(Es)))if(Da.leaf){var Uo=Da.x,Qs=Da.y;if(Uo!=null)if(p(Uo-Rs)+p(Qs-Es)<.01)Ia(Da,go,Rs,Es,Zs,Gn,Ha,Fo);else{var Ml=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Ml,Uo,Qs,Zs,Gn,Ha,Fo),Ia(Da,go,Rs,Es,Zs,Gn,Ha,Fo)}else Da.x=Rs,Da.y=Es,Da.point=go}else Ia(Da,go,Rs,Es,Zs,Gn,Ha,Fo)}function Ia(Da,go,Rs,Es,Zs,Gn,Ha,Fo){var Uo=(Zs+Ha)*.5,Qs=(Gn+Fo)*.5,Ml=Rs>=Uo,bu=Es>=Qs,vl=bu<<1|Ml;Da.leaf=!1,Da=Da.nodes[vl]||(Da.nodes[vl]=Jl()),Ml?Zs=Uo:Ha=Uo,bu?Gn=Qs:Fo=Qs,Ea(Da,go,Rs,Es,Zs,Gn,Ha,Fo)}var yo=Jl();if(yo.add=function(Da){Ea(yo,Da,+Gr(Da,++Xr),+qr(Da,Xr),gi,Pi,Ai,ti)},yo.visit=function(Da){hl(Da,yo,gi,Pi,Ai,ti)},yo.find=function(Da){return lc(yo,Da[0],Da[1],gi,Pi,Ai,ti)},Xr=-1,se==null){for(;++Xr<ni;)Ea(yo,gr[Xr],_i[Xr],bi[Xr],gi,Pi,Ai,ti);--Xr}else gr.forEach(yo.add);return _i=bi=gr=yr=null,yo}return jt.x=function(gr){return arguments.length?(Ye=gr,jt):Ye},jt.y=function(gr){return arguments.length?(Ct=gr,jt):Ct},jt.extent=function(gr){return arguments.length?(gr==null?se=Te=Ne=He=null:(se=+gr[0][0],Te=+gr[0][1],Ne=+gr[1][0],He=+gr[1][1]),jt):se==null?null:[[se,Te],[Ne,He]]},jt.size=function(gr){return arguments.length?(gr==null?se=Te=Ne=He=null:(se=Te=0,Ne=+gr[0],He=+gr[1]),jt):se==null?null:[Ne-se,He-Te]},jt};function nf(X){return X.x}function Vf(X){return X.y}function Jl(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hl(X,se,Te,Ne,He,Ye){if(!X(se,Te,Ne,He,Ye)){var Ct=(Te+He)*.5,nt=(Ne+Ye)*.5,jt=se.nodes;jt[0]&&hl(X,jt[0],Te,Ne,Ct,nt),jt[1]&&hl(X,jt[1],Ct,Ne,He,nt),jt[2]&&hl(X,jt[2],Te,nt,Ct,Ye),jt[3]&&hl(X,jt[3],Ct,nt,He,Ye)}}function lc(X,se,Te,Ne,He,Ye,Ct){var nt=1/0,jt;return function gr(yr,Gr,qr,_i,bi){if(!(Gr>Ye||qr>Ct||_i<Ne||bi<He)){if(Xr=yr.point){var Xr,ni=se-yr.x,gi=Te-yr.y,Pi=ni*ni+gi*gi;if(Pi<nt){var Ai=Math.sqrt(nt=Pi);Ne=se-Ai,He=Te-Ai,Ye=se+Ai,Ct=Te+Ai,jt=Xr}}for(var ti=yr.nodes,Rn=(Gr+_i)*.5,Cn=(qr+bi)*.5,Nn=se>=Rn,ia=Te>=Cn,Ea=ia<<1|Nn,Ia=Ea+4;Ea<Ia;++Ea)if(yr=ti[Ea&3])switch(Ea&3){case 0:gr(yr,Gr,qr,Rn,Cn);break;case 1:gr(yr,Rn,qr,_i,Cn);break;case 2:gr(yr,Gr,Cn,Rn,bi);break;case 3:gr(yr,Rn,Cn,_i,bi);break}}}(X,Ne,He,Ye,Ct),jt}e.interpolateRgb=Fu;function Fu(X,se){X=e.rgb(X),se=e.rgb(se);var Te=X.r,Ne=X.g,He=X.b,Ye=se.r-Te,Ct=se.g-Ne,nt=se.b-He;return function(jt){return\"#\"+Wn(Math.round(Te+Ye*jt))+Wn(Math.round(Ne+Ct*jt))+Wn(Math.round(He+nt*jt))}}e.interpolateObject=Cs;function Cs(X,se){var Te={},Ne={},He;for(He in X)He in se?Te[He]=bl(X[He],se[He]):Ne[He]=X[He];for(He in se)He in X||(Ne[He]=se[He]);return function(Ye){for(He in Te)Ne[He]=Te[He](Ye);return Ne}}e.interpolateNumber=js;function js(X,se){return X=+X,se=+se,function(Te){return X*(1-Te)+se*Te}}e.interpolateString=Go;function Go(X,se){var Te=gs.lastIndex=uc.lastIndex=0,Ne,He,Ye,Ct=-1,nt=[],jt=[];for(X=X+\"\",se=se+\"\";(Ne=gs.exec(X))&&(He=uc.exec(se));)(Ye=He.index)>Te&&(Ye=se.slice(Te,Ye),nt[Ct]?nt[Ct]+=Ye:nt[++Ct]=Ye),(Ne=Ne[0])===(He=He[0])?nt[Ct]?nt[Ct]+=He:nt[++Ct]=He:(nt[++Ct]=null,jt.push({i:Ct,x:js(Ne,He)})),Te=uc.lastIndex;return Te<se.length&&(Ye=se.slice(Te),nt[Ct]?nt[Ct]+=Ye:nt[++Ct]=Ye),nt.length<2?jt[0]?(se=jt[0].x,function(gr){return se(gr)+\"\"}):function(){return se}:(se=jt.length,function(gr){for(var yr=0,Gr;yr<se;++yr)nt[(Gr=jt[yr]).i]=Gr.x(gr);return nt.join(\"\")})}var gs=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,uc=new RegExp(gs.source,\"g\");e.interpolate=bl;function bl(X,se){for(var Te=e.interpolators.length,Ne;--Te>=0&&!(Ne=e.interpolators[Te](X,se)););return Ne}e.interpolators=[function(X,se){var Te=typeof se;return(Te===\"string\"?Qr.has(se.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(se)?Fu:Go:se instanceof ua?Fu:Array.isArray(se)?Gu:Te===\"object\"&&isNaN(se)?Cs:js)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Ne=[],He=X.length,Ye=se.length,Ct=Math.min(X.length,se.length),nt;for(nt=0;nt<Ct;++nt)Te.push(bl(X[nt],se[nt]));for(;nt<He;++nt)Ne[nt]=X[nt];for(;nt<Ye;++nt)Ne[nt]=se[nt];return function(jt){for(nt=0;nt<Ct;++nt)Ne[nt]=Te[nt](jt);return Ne}}var Bs=function(){return G},ad=e.map({linear:Bs,poly:Gf,quad:function(){return af},cubic:function(){return Hu},sin:function(){return Ic},exp:function(){return mf},circle:function(){return Bl},elastic:_h,back:Qf,bounce:function(){return yf}}),Po=e.map({in:G,out:Yo,\"in-out\":Pa,\"out-in\":function(X){return Pa(Yo(X))}});e.ease=function(X){var se=X.indexOf(\"-\"),Te=se>=0?X.slice(0,se):X,Ne=se>=0?X.slice(se+1):\"in\";return Te=ad.get(Te)||Bs,Ne=Po.get(Ne)||G,od(Ne(Te.apply(null,t.call(arguments,1))))};function od(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Yo(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function wl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Gf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*xe)}function mf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function _h(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/wt*Math.asin(1/X):(X=1,Te=se/4),function(Ne){return 1+X*Math.pow(2,-10*Ne)*Math.sin((Ne-Te)*wt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function yf(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Ne=X.c,He=X.l,Ye=se.h-Te,Ct=se.c-Ne,nt=se.l-He;return isNaN(Ct)&&(Ct=0,Ne=isNaN(Ne)?se.c:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return Zr(Te+Ye*jt,Ne+Ct*jt,He+nt*jt)+\"\"}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Ne=X.s,He=X.l,Ye=se.h-Te,Ct=se.s-Ne,nt=se.l-He;return isNaN(Ct)&&(Ct=0,Ne=isNaN(Ne)?se.s:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return tr(Te+Ye*jt,Ne+Ct*jt,He+nt*jt)+\"\"}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Ne=X.a,He=X.b,Ye=se.l-Te,Ct=se.a-Ne,nt=se.b-He;return function(jt){return yn(Te+Ye*jt,Ne+Ct*jt,He+nt*jt)+\"\"}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,\"g\");return(e.transform=function(Te){if(Te!=null){se.setAttribute(\"transform\",Te);var Ne=se.transform.baseVal.consolidate()}return new Hf(Ne?Ne.matrix:Kc)})(X)};function Hf(X){var se=[X.a,X.b],Te=[X.c,X.d],Ne=of(se),He=cc(se,Te),Ye=of(Nl(Te,se,-He))||0;se[0]*Te[1]<Te[0]*se[1]&&(se[0]*=-1,se[1]*=-1,Ne*=-1,He*=-1),this.rotate=(Ne?Math.atan2(se[1],se[0]):Math.atan2(-Te[0],Te[1]))*vt,this.translate=[X.e,X.f],this.scale=[Ne,Ye],this.skew=Ye?Math.atan2(He,Ye)*vt:0}Hf.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};function cc(X,se){return X[0]*se[0]+X[1]*se[1]}function of(X){var se=Math.sqrt(cc(X,X));return se&&(X[0]/=se,X[1]/=se),se}function Nl(X,se,Te){return X[0]+=Te*se[0],X[1]+=Te*se[1],X}var Kc={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=sf;function Rc(X){return X.length?X.pop()+\",\":\"\"}function ms(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(\"translate(\",null,\",\",null,\")\");Ne.push({i:He-4,x:js(X[0],se[0])},{i:He-2,x:js(X[1],se[1])})}else(se[0]||se[1])&&Te.push(\"translate(\"+se+\")\")}function jf(X,se,Te,Ne){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),Ne.push({i:Te.push(Rc(Te)+\"rotate(\",null,\")\")-2,x:js(X,se)})):se&&Te.push(Rc(Te)+\"rotate(\"+se+\")\")}function Uh(X,se,Te,Ne){X!==se?Ne.push({i:Te.push(Rc(Te)+\"skewX(\",null,\")\")-2,x:js(X,se)}):se&&Te.push(Rc(Te)+\"skewX(\"+se+\")\")}function rh(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(Rc(Te)+\"scale(\",null,\",\",null,\")\");Ne.push({i:He-4,x:js(X[0],se[0])},{i:He-2,x:js(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+\"scale(\"+se+\")\")}function sf(X,se){var Te=[],Ne=[];return X=e.transform(X),se=e.transform(se),ms(X.translate,se.translate,Te,Ne),jf(X.rotate,se.rotate,Te,Ne),Uh(X.skew,se.skew,Te,Ne),rh(X.scale,se.scale,Te,Ne),X=se=null,function(He){for(var Ye=-1,Ct=Ne.length,nt;++Ye<Ct;)Te[(nt=Ne[Ye]).i]=nt.x(He);return Te.join(\"\")}}function xh(X,se){return se=(se-=X=+X)||1/se,function(Te){return(Te-X)/se}}function Mu(X,se){return se=(se-=X=+X)||1/se,function(Te){return Math.max(0,Math.min(1,(Te-X)/se))}}e.layout={},e.layout.bundle=function(){return function(X){for(var se=[],Te=-1,Ne=X.length;++Te<Ne;)se.push(ih(X[Te]));return se}};function ih(X){for(var se=X.source,Te=X.target,Ne=Eu(se,Te),He=[se];se!==Ne;)se=se.parent,He.push(se);for(var Ye=He.length;Te!==Ne;)He.splice(Ye,0,Te),Te=Te.parent;return He}function Ws(X){for(var se=[],Te=X.parent;Te!=null;)se.push(X),X=Te,Te=Te.parent;return se.push(X),se}function Eu(X,se){if(X===se)return X;for(var Te=Ws(X),Ne=Ws(se),He=Te.pop(),Ye=Ne.pop(),Ct=null;He===Ye;)Ct=He,He=Te.pop(),Ye=Ne.pop();return Ct}e.layout.chord=function(){var X={},se,Te,Ne,He,Ye=0,Ct,nt,jt;function gr(){var Gr={},qr=[],_i=e.range(He),bi=[],Xr,ni,gi,Pi,Ai;for(se=[],Te=[],Xr=0,Pi=-1;++Pi<He;){for(ni=0,Ai=-1;++Ai<He;)ni+=Ne[Pi][Ai];qr.push(ni),bi.push(e.range(He)),Xr+=ni}for(Ct&&_i.sort(function(yo,Da){return Ct(qr[yo],qr[Da])}),nt&&bi.forEach(function(yo,Da){yo.sort(function(go,Rs){return nt(Ne[Da][go],Ne[Da][Rs])})}),Xr=(wt-Ye*He)/Xr,ni=0,Pi=-1;++Pi<He;){for(gi=ni,Ai=-1;++Ai<He;){var ti=_i[Pi],Rn=bi[ti][Ai],Cn=Ne[ti][Rn],Nn=ni,ia=ni+=Cn*Xr;Gr[ti+\"-\"+Rn]={index:ti,subindex:Rn,startAngle:Nn,endAngle:ia,value:Cn}}Te[ti]={index:ti,startAngle:gi,endAngle:ni,value:qr[ti]},ni+=Ye}for(Pi=-1;++Pi<He;)for(Ai=Pi-1;++Ai<He;){var Ea=Gr[Pi+\"-\"+Ai],Ia=Gr[Ai+\"-\"+Pi];(Ea.value||Ia.value)&&se.push(Ea.value<Ia.value?{source:Ia,target:Ea}:{source:Ea,target:Ia})}jt&&yr()}function yr(){se.sort(function(Gr,qr){return jt((Gr.source.value+Gr.target.value)/2,(qr.source.value+qr.target.value)/2)})}return X.matrix=function(Gr){return arguments.length?(He=(Ne=Gr)&&Ne.length,se=Te=null,X):Ne},X.padding=function(Gr){return arguments.length?(Ye=Gr,se=Te=null,X):Ye},X.sortGroups=function(Gr){return arguments.length?(Ct=Gr,se=Te=null,X):Ct},X.sortSubgroups=function(Gr){return arguments.length?(nt=Gr,se=null,X):nt},X.sortChords=function(Gr){return arguments.length?(jt=Gr,se&&yr(),X):jt},X.chords=function(){return se||gr(),se},X.groups=function(){return Te||gr(),Te},X},e.layout.force=function(){var X={},se=e.dispatch(\"start\",\"tick\",\"end\"),Te,Ne=[1,1],He,Ye,Ct=.9,nt=al,jt=nh,gr=-30,yr=bh,Gr=.1,qr=.64,_i=[],bi=[],Xr,ni,gi;function Pi(ti){return function(Rn,Cn,Nn,ia){if(Rn.point!==ti){var Ea=Rn.cx-ti.x,Ia=Rn.cy-ti.y,yo=ia-Cn,Da=Ea*Ea+Ia*Ia;if(yo*yo/qr<Da){if(Da<yr){var go=Rn.charge/Da;ti.px-=Ea*go,ti.py-=Ia*go}return!0}if(Rn.point&&Da&&Da<yr){var go=Rn.pointCharge/Da;ti.px-=Ea*go,ti.py-=Ia*go}}return!Rn.charge}}X.tick=function(){if((Ye*=.99)<.005)return Te=null,se.end({type:\"end\",alpha:Ye=0}),!0;var ti=_i.length,Rn=bi.length,Cn,Nn,ia,Ea,Ia,yo,Da,go,Rs;for(Nn=0;Nn<Rn;++Nn)ia=bi[Nn],Ea=ia.source,Ia=ia.target,go=Ia.x-Ea.x,Rs=Ia.y-Ea.y,(yo=go*go+Rs*Rs)&&(yo=Ye*ni[Nn]*((yo=Math.sqrt(yo))-Xr[Nn])/yo,go*=yo,Rs*=yo,Ia.x-=go*(Da=Ea.weight+Ia.weight?Ea.weight/(Ea.weight+Ia.weight):.5),Ia.y-=Rs*Da,Ea.x+=go*(Da=1-Da),Ea.y+=Rs*Da);if((Da=Ye*Gr)&&(go=Ne[0]/2,Rs=Ne[1]/2,Nn=-1,Da))for(;++Nn<ti;)ia=_i[Nn],ia.x+=(go-ia.x)*Da,ia.y+=(Rs-ia.y)*Da;if(gr)for(_u(Cn=e.geom.quadtree(_i),Ye,gi),Nn=-1;++Nn<ti;)(ia=_i[Nn]).fixed||Cn.visit(Pi(ia));for(Nn=-1;++Nn<ti;)ia=_i[Nn],ia.fixed?(ia.x=ia.px,ia.y=ia.py):(ia.x-=(ia.px-(ia.px=ia.x))*Ct,ia.y-=(ia.py-(ia.py=ia.y))*Ct);se.tick({type:\"tick\",alpha:Ye})},X.nodes=function(ti){return arguments.length?(_i=ti,X):_i},X.links=function(ti){return arguments.length?(bi=ti,X):bi},X.size=function(ti){return arguments.length?(Ne=ti,X):Ne},X.linkDistance=function(ti){return arguments.length?(nt=typeof ti==\"function\"?ti:+ti,X):nt},X.distance=X.linkDistance,X.linkStrength=function(ti){return arguments.length?(jt=typeof ti==\"function\"?ti:+ti,X):jt},X.friction=function(ti){return arguments.length?(Ct=+ti,X):Ct},X.charge=function(ti){return arguments.length?(gr=typeof ti==\"function\"?ti:+ti,X):gr},X.chargeDistance=function(ti){return arguments.length?(yr=ti*ti,X):Math.sqrt(yr)},X.gravity=function(ti){return arguments.length?(Gr=+ti,X):Gr},X.theta=function(ti){return arguments.length?(qr=ti*ti,X):Math.sqrt(qr)},X.alpha=function(ti){return arguments.length?(ti=+ti,Ye?ti>0?Ye=ti:(Te.c=null,Te.t=NaN,Te=null,se.end({type:\"end\",alpha:Ye=0})):ti>0&&(se.start({type:\"start\",alpha:Ye=ti}),Te=No(X.tick)),X):Ye},X.start=function(){var ti,Rn=_i.length,Cn=bi.length,Nn=Ne[0],ia=Ne[1],Ea,Ia;for(ti=0;ti<Rn;++ti)(Ia=_i[ti]).index=ti,Ia.weight=0;for(ti=0;ti<Cn;++ti)Ia=bi[ti],typeof Ia.source==\"number\"&&(Ia.source=_i[Ia.source]),typeof Ia.target==\"number\"&&(Ia.target=_i[Ia.target]),++Ia.source.weight,++Ia.target.weight;for(ti=0;ti<Rn;++ti)Ia=_i[ti],isNaN(Ia.x)&&(Ia.x=yo(\"x\",Nn)),isNaN(Ia.y)&&(Ia.y=yo(\"y\",ia)),isNaN(Ia.px)&&(Ia.px=Ia.x),isNaN(Ia.py)&&(Ia.py=Ia.y);if(Xr=[],typeof nt==\"function\")for(ti=0;ti<Cn;++ti)Xr[ti]=+nt.call(this,bi[ti],ti);else for(ti=0;ti<Cn;++ti)Xr[ti]=nt;if(ni=[],typeof jt==\"function\")for(ti=0;ti<Cn;++ti)ni[ti]=+jt.call(this,bi[ti],ti);else for(ti=0;ti<Cn;++ti)ni[ti]=jt;if(gi=[],typeof gr==\"function\")for(ti=0;ti<Rn;++ti)gi[ti]=+gr.call(this,_i[ti],ti);else for(ti=0;ti<Rn;++ti)gi[ti]=gr;function yo(Da,go){if(!Ea){for(Ea=new Array(Rn),Zs=0;Zs<Rn;++Zs)Ea[Zs]=[];for(Zs=0;Zs<Cn;++Zs){var Rs=bi[Zs];Ea[Rs.source.index].push(Rs.target),Ea[Rs.target.index].push(Rs.source)}}for(var Es=Ea[ti],Zs=-1,Gn=Es.length,Ha;++Zs<Gn;)if(!isNaN(Ha=Es[Zs][Da]))return Ha;return Math.random()*go}return X.resume()},X.resume=function(){return X.alpha(.1)},X.stop=function(){return X.alpha(0)},X.drag=function(){if(He||(He=e.behavior.drag().origin(G).on(\"dragstart.force\",Dc).on(\"drag.force\",Ai).on(\"dragend.force\",ks)),!arguments.length)return He;this.on(\"mouseover.force\",bc).on(\"mouseout.force\",hu).call(He)};function Ai(ti){ti.px=e.event.x,ti.py=e.event.y,X.resume()}return e.rebind(X,se,\"on\")};function Dc(X){X.fixed|=2}function ks(X){X.fixed&=-7}function bc(X){X.fixed|=4,X.px=X.x,X.py=X.y}function hu(X){X.fixed&=-5}function _u(X,se,Te){var Ne=0,He=0;if(X.charge=0,!X.leaf)for(var Ye=X.nodes,Ct=Ye.length,nt=-1,jt;++nt<Ct;)jt=Ye[nt],jt!=null&&(_u(jt,se,Te),X.charge+=jt.charge,Ne+=jt.charge*jt.cx,He+=jt.charge*jt.cy);if(X.point){X.leaf||(X.point.x+=Math.random()-.5,X.point.y+=Math.random()-.5);var gr=se*Te[X.point.index];X.charge+=X.pointCharge=gr,Ne+=gr*X.point.x,He+=gr*X.point.y}X.cx=Ne/X.charge,X.cy=He/X.charge}var al=20,nh=1,bh=1/0;e.layout.hierarchy=function(){var X=Lf,se=bd,Te=_f;function Ne(He){var Ye=[He],Ct=[],nt;for(He.depth=0;(nt=Ye.pop())!=null;)if(Ct.push(nt),(gr=se.call(Ne,nt,nt.depth))&&(jt=gr.length)){for(var jt,gr,yr;--jt>=0;)Ye.push(yr=gr[jt]),yr.parent=nt,yr.depth=nt.depth+1;Te&&(nt.value=0),nt.children=gr}else Te&&(nt.value=+Te.call(Ne,nt,nt.depth)||0),delete nt.children;return wc(He,function(Gr){var qr,_i;X&&(qr=Gr.children)&&qr.sort(X),Te&&(_i=Gr.parent)&&(_i.value+=Gr.value)}),Ct}return Ne.sort=function(He){return arguments.length?(X=He,Ne):X},Ne.children=function(He){return arguments.length?(se=He,Ne):se},Ne.value=function(He){return arguments.length?(Te=He,Ne):Te},Ne.revalue=function(He){return Te&&(Fc(He,function(Ye){Ye.children&&(Ye.value=0)}),wc(He,function(Ye){var Ct;Ye.children||(Ye.value=+Te.call(Ne,Ye,Ye.depth)||0),(Ct=Ye.parent)&&(Ct.value+=Ye.value)})),He},Ne};function zu(X,se){return e.rebind(X,se,\"sort\",\"children\",\"value\"),X.nodes=X,X.links=Ou,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(He=X.children)&&(Ne=He.length))for(var Ne,He;--Ne>=0;)Te.push(He[Ne])}function wc(X,se){for(var Te=[X],Ne=[];(X=Te.pop())!=null;)if(Ne.push(X),(Ct=X.children)&&(Ye=Ct.length))for(var He=-1,Ye,Ct;++He<Ye;)Te.push(Ct[He]);for(;(X=Ne.pop())!=null;)se(X)}function bd(X){return X.children}function _f(X){return X.value}function Lf(X,se){return se.value-X.value}function Ou(X){return e.merge(X.map(function(se){return(se.children||[]).map(function(Te){return{source:se,target:Te}})}))}e.layout.partition=function(){var X=e.layout.hierarchy(),se=[1,1];function Te(Ye,Ct,nt,jt){var gr=Ye.children;if(Ye.x=Ct,Ye.y=Ye.depth*jt,Ye.dx=nt,Ye.dy=jt,gr&&(Gr=gr.length)){var yr=-1,Gr,qr,_i;for(nt=Ye.value?nt/Ye.value:0;++yr<Gr;)Te(qr=gr[yr],Ct,_i=qr.value*nt,jt),Ct+=_i}}function Ne(Ye){var Ct=Ye.children,nt=0;if(Ct&&(gr=Ct.length))for(var jt=-1,gr;++jt<gr;)nt=Math.max(nt,Ne(Ct[jt]));return 1+nt}function He(Ye,Ct){var nt=X.call(this,Ye,Ct);return Te(nt[0],0,se[0],se[1]/Ne(nt[0])),nt}return He.size=function(Ye){return arguments.length?(se=Ye,He):se},zu(He,X)},e.layout.pie=function(){var X=Number,se=xf,Te=0,Ne=wt,He=0;function Ye(Ct){var nt=Ct.length,jt=Ct.map(function(Pi,Ai){return+X.call(Ye,Pi,Ai)}),gr=+(typeof Te==\"function\"?Te.apply(this,arguments):Te),yr=(typeof Ne==\"function\"?Ne.apply(this,arguments):Ne)-gr,Gr=Math.min(Math.abs(yr)/nt,+(typeof He==\"function\"?He.apply(this,arguments):He)),qr=Gr*(yr<0?-1:1),_i=e.sum(jt),bi=_i?(yr-nt*qr)/_i:0,Xr=e.range(nt),ni=[],gi;return se!=null&&Xr.sort(se===xf?function(Pi,Ai){return jt[Ai]-jt[Pi]}:function(Pi,Ai){return se(Ct[Pi],Ct[Ai])}),Xr.forEach(function(Pi){ni[Pi]={data:Ct[Pi],value:gi=jt[Pi],startAngle:gr,endAngle:gr+=gi*bi+qr,padAngle:Gr}}),ni}return Ye.value=function(Ct){return arguments.length?(X=Ct,Ye):X},Ye.sort=function(Ct){return arguments.length?(se=Ct,Ye):se},Ye.startAngle=function(Ct){return arguments.length?(Te=Ct,Ye):Te},Ye.endAngle=function(Ct){return arguments.length?(Ne=Ct,Ye):Ne},Ye.padAngle=function(Ct){return arguments.length?(He=Ct,Ye):He},Ye};var xf={};e.layout.stack=function(){var X=G,se=du,Te=Cu,Ne=Vh,He=jl,Ye=lf;function Ct(nt,jt){if(!(bi=nt.length))return nt;var gr=nt.map(function(Pi,Ai){return X.call(Ct,Pi,Ai)}),yr=gr.map(function(Pi){return Pi.map(function(Ai,ti){return[He.call(Ct,Ai,ti),Ye.call(Ct,Ai,ti)]})}),Gr=se.call(Ct,yr,jt);gr=e.permute(gr,Gr),yr=e.permute(yr,Gr);var qr=Te.call(Ct,yr,jt),_i=gr[0].length,bi,Xr,ni,gi;for(ni=0;ni<_i;++ni)for(Ne.call(Ct,gr[0][ni],gi=qr[ni],yr[0][ni][1]),Xr=1;Xr<bi;++Xr)Ne.call(Ct,gr[Xr][ni],gi+=yr[Xr-1][ni][1],yr[Xr][ni][1]);return nt}return Ct.values=function(nt){return arguments.length?(X=nt,Ct):X},Ct.order=function(nt){return arguments.length?(se=typeof nt==\"function\"?nt:Pf.get(nt)||du,Ct):se},Ct.offset=function(nt){return arguments.length?(Te=typeof nt==\"function\"?nt:Ls.get(nt)||Cu,Ct):Te},Ct.x=function(nt){return arguments.length?(He=nt,Ct):He},Ct.y=function(nt){return arguments.length?(Ye=nt,Ct):Ye},Ct.out=function(nt){return arguments.length?(Ne=nt,Ct):Ne},Ct};function jl(X){return X.x}function lf(X){return X.y}function Vh(X,se,Te){X.y0=se,X.y=Te}var Pf=e.map({\"inside-out\":function(X){var se=X.length,Te,Ne,He=X.map(Wf),Ye=X.map(Vs),Ct=e.range(se).sort(function(Gr,qr){return He[Gr]-He[qr]}),nt=0,jt=0,gr=[],yr=[];for(Te=0;Te<se;++Te)Ne=Ct[Te],nt<jt?(nt+=Ye[Ne],gr.push(Ne)):(jt+=Ye[Ne],yr.push(Ne));return yr.reverse().concat(gr)},reverse:function(X){return e.range(X.length).reverse()},default:du}),Ls=e.map({silhouette:function(X){var se=X.length,Te=X[0].length,Ne=[],He=0,Ye,Ct,nt,jt=[];for(Ct=0;Ct<Te;++Ct){for(Ye=0,nt=0;Ye<se;Ye++)nt+=X[Ye][Ct][1];nt>He&&(He=nt),Ne.push(nt)}for(Ct=0;Ct<Te;++Ct)jt[Ct]=(He-Ne[Ct])/2;return jt},wiggle:function(X){var se=X.length,Te=X[0],Ne=Te.length,He,Ye,Ct,nt,jt,gr,yr,Gr,qr,_i=[];for(_i[0]=Gr=qr=0,Ye=1;Ye<Ne;++Ye){for(He=0,nt=0;He<se;++He)nt+=X[He][Ye][1];for(He=0,jt=0,yr=Te[Ye][0]-Te[Ye-1][0];He<se;++He){for(Ct=0,gr=(X[He][Ye][1]-X[He][Ye-1][1])/(2*yr);Ct<He;++Ct)gr+=(X[Ct][Ye][1]-X[Ct][Ye-1][1])/yr;jt+=gr*X[He][Ye][1]}_i[Ye]=Gr-=nt?jt/nt*yr:0,Gr<qr&&(qr=Gr)}for(Ye=0;Ye<Ne;++Ye)_i[Ye]-=qr;return _i},expand:function(X){var se=X.length,Te=X[0].length,Ne=1/se,He,Ye,Ct,nt=[];for(Ye=0;Ye<Te;++Ye){for(He=0,Ct=0;He<se;He++)Ct+=X[He][Ye][1];if(Ct)for(He=0;He<se;He++)X[He][Ye][1]/=Ct;else for(He=0;He<se;He++)X[He][Ye][1]=Ne}for(Ye=0;Ye<Te;++Ye)nt[Ye]=0;return nt},zero:Cu});function du(X){return e.range(X.length)}function Cu(X){for(var se=-1,Te=X[0].length,Ne=[];++se<Te;)Ne[se]=0;return Ne}function Wf(X){for(var se=1,Te=0,Ne=X[0][1],He,Ye=X.length;se<Ye;++se)(He=X[se][1])>Ne&&(Te=se,Ne=He);return Te}function Vs(X){return X.reduce(bf,0)}function bf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=If,Ne=zc;function He(Ye,qr){for(var nt=[],jt=Ye.map(se,this),gr=Te.call(this,jt,qr),yr=Ne.call(this,gr,jt,qr),Gr,qr=-1,_i=jt.length,bi=yr.length-1,Xr=X?1:1/_i,ni;++qr<bi;)Gr=nt[qr]=[],Gr.dx=yr[qr+1]-(Gr.x=yr[qr]),Gr.y=0;if(bi>0)for(qr=-1;++qr<_i;)ni=jt[qr],ni>=gr[0]&&ni<=gr[1]&&(Gr=nt[e.bisect(yr,ni,1,bi)-1],Gr.y+=Xr,Gr.push(Ye[qr]));return nt}return He.value=function(Ye){return arguments.length?(se=Ye,He):se},He.range=function(Ye){return arguments.length?(Te=pi(Ye),He):Te},He.bins=function(Ye){return arguments.length?(Ne=typeof Ye==\"number\"?function(Ct){return Wu(Ct,Ye)}:pi(Ye),He):Ne},He.frequency=function(Ye){return arguments.length?(X=!!Ye,He):X},He};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Ne=+X[0],He=(X[1]-Ne)/se,Ye=[];++Te<=se;)Ye[Te]=He*Te+Ne;return Ye}function If(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Ne;function He(Ye,Ct){var nt=X.call(this,Ye,Ct),jt=nt[0],gr=Te[0],yr=Te[1],Gr=Ne==null?Math.sqrt:typeof Ne==\"function\"?Ne:function(){return Ne};if(jt.x=jt.y=0,wc(jt,function(_i){_i.r=+Gr(_i.value)}),wc(jt,ah),se){var qr=se*(Ne?1:Math.max(2*jt.r/gr,2*jt.r/yr))/2;wc(jt,function(_i){_i.r+=qr}),wc(jt,ah),wc(jt,function(_i){_i.r-=qr})}return Tc(jt,gr/2,yr/2,Ne?1:1/Math.max(2*jt.r/gr,2*jt.r/yr)),nt}return He.size=function(Ye){return arguments.length?(Te=Ye,He):Te},He.radius=function(Ye){return arguments.length?(Ne=Ye==null||typeof Ye==\"function\"?Ye:+Ye,He):Ne},He.padding=function(Ye){return arguments.length?(se=+Ye,He):se},zu(He,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Xf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Ne=se.y-X.y,He=X.r+se.r;return .999*He*He>Te*Te+Ne*Ne}function ah(X){if(!(se=X.children)||!(qr=se.length))return;var se,Te=1/0,Ne=-1/0,He=1/0,Ye=-1/0,Ct,nt,jt,gr,yr,Gr,qr;function _i(ti){Te=Math.min(ti.x-ti.r,Te),Ne=Math.max(ti.x+ti.r,Ne),He=Math.min(ti.y-ti.r,He),Ye=Math.max(ti.y+ti.r,Ye)}if(se.forEach(Zu),Ct=se[0],Ct.x=-Ct.r,Ct.y=0,_i(Ct),qr>1&&(nt=se[1],nt.x=nt.r,nt.y=0,_i(nt),qr>2))for(jt=se[2],Tl(Ct,nt,jt),_i(jt),uf(Ct,jt),Ct._pack_prev=jt,uf(jt,nt),nt=Ct._pack_next,gr=3;gr<qr;gr++){Tl(Ct,nt,jt=se[gr]);var bi=0,Xr=1,ni=1;for(yr=nt._pack_next;yr!==nt;yr=yr._pack_next,Xr++)if(Wl(yr,jt)){bi=1;break}if(bi==1)for(Gr=Ct._pack_prev;Gr!==yr._pack_prev&&!Wl(Gr,jt);Gr=Gr._pack_prev,ni++);bi?(Xr<ni||Xr==ni&&nt.r<Ct.r?Xf(Ct,nt=yr):Xf(Ct=Gr,nt),gr--):(uf(Ct,jt),nt=jt,_i(jt))}var gi=(Te+Ne)/2,Pi=(He+Ye)/2,Ai=0;for(gr=0;gr<qr;gr++)jt=se[gr],jt.x-=gi,jt.y-=Pi,Ai=Math.max(Ai,jt.r+Math.sqrt(jt.x*jt.x+jt.y*jt.y));X.r=Ai,se.forEach(Oc)}function Zu(X){X._pack_next=X._pack_prev=X}function Oc(X){delete X._pack_next,delete X._pack_prev}function Tc(X,se,Te,Ne){var He=X.children;if(X.x=se+=Ne*X.x,X.y=Te+=Ne*X.y,X.r*=Ne,He)for(var Ye=-1,Ct=He.length;++Ye<Ct;)Tc(He[Ye],se,Te,Ne)}function Tl(X,se,Te){var Ne=X.r+Te.r,He=se.x-X.x,Ye=se.y-X.y;if(Ne&&(He||Ye)){var Ct=se.r+Te.r,nt=He*He+Ye*Ye;Ct*=Ct,Ne*=Ne;var jt=.5+(Ne-Ct)/(2*nt),gr=Math.sqrt(Math.max(0,2*Ct*(Ne+nt)-(Ne-=nt)*Ne-Ct*Ct))/(2*nt);Te.x=X.x+jt*He+gr*Ye,Te.y=X.y+jt*Ye-gr*He}else Te.x=X.x+Ne,Te.y=X.y}e.layout.tree=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=null;function He(yr,Gr){var qr=X.call(this,yr,Gr),_i=qr[0],bi=Ye(_i);if(wc(bi,Ct),bi.parent.m=-bi.z,Fc(bi,nt),Ne)Fc(_i,gr);else{var Xr=_i,ni=_i,gi=_i;Fc(_i,function(Rn){Rn.x<Xr.x&&(Xr=Rn),Rn.x>ni.x&&(ni=Rn),Rn.depth>gi.depth&&(gi=Rn)});var Pi=se(Xr,ni)/2-Xr.x,Ai=Te[0]/(ni.x+se(ni,Xr)/2+Pi),ti=Te[1]/(gi.depth||1);Fc(_i,function(Rn){Rn.x=(Rn.x+Pi)*Ai,Rn.y=Rn.depth*ti})}return qr}function Ye(yr){for(var Gr={A:null,children:[yr]},qr=[Gr],_i;(_i=qr.pop())!=null;)for(var bi=_i.children,Xr,ni=0,gi=bi.length;ni<gi;++ni)qr.push((bi[ni]=Xr={_:bi[ni],parent:_i,children:(Xr=bi[ni].children)&&Xr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:ni}).a=Xr);return Gr.children[0]}function Ct(yr){var Gr=yr.children,qr=yr.parent.children,_i=yr.i?qr[yr.i-1]:null;if(Gr.length){Bc(yr);var bi=(Gr[0].z+Gr[Gr.length-1].z)/2;_i?(yr.z=_i.z+se(yr._,_i._),yr.m=yr.z-bi):yr.z=bi}else _i&&(yr.z=_i.z+se(yr._,_i._));yr.parent.A=jt(yr,_i,yr.parent.A||qr[0])}function nt(yr){yr._.x=yr.z+yr.parent.m,yr.m+=yr.parent.m}function jt(yr,Gr,qr){if(Gr){for(var _i=yr,bi=yr,Xr=Gr,ni=_i.parent.children[0],gi=_i.m,Pi=bi.m,Ai=Xr.m,ti=ni.m,Rn;Xr=cf(Xr),_i=qc(_i),Xr&&_i;)ni=qc(ni),bi=cf(bi),bi.a=yr,Rn=Xr.z+Ai-_i.z-gi+se(Xr._,_i._),Rn>0&&(fc(At(Xr,yr,qr),yr,Rn),gi+=Rn,Pi+=Rn),Ai+=Xr.m,gi+=_i.m,ti+=ni.m,Pi+=bi.m;Xr&&!cf(bi)&&(bi.t=Xr,bi.m+=Ai-Pi),_i&&!qc(ni)&&(ni.t=_i,ni.m+=gi-ti,qr=yr)}return qr}function gr(yr){yr.x*=Te[0],yr.y=yr.depth*Te[1]}return He.separation=function(yr){return arguments.length?(se=yr,He):se},He.size=function(yr){return arguments.length?(Ne=(Te=yr)==null?gr:null,He):Ne?null:Te},He.nodeSize=function(yr){return arguments.length?(Ne=(Te=yr)==null?null:gr,He):Ne?Te:null},zu(He,X)};function vu(X,se){return X.parent==se.parent?1:2}function qc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Ne=Te/(se.i-X.i);se.c-=Ne,se.s+=Te,X.c+=Ne,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Ne=X.children,He=Ne.length,Ye;--He>=0;)Ye=Ne[He],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function At(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=!1;function He(Ye,Ct){var nt=X.call(this,Ye,Ct),jt=nt[0],gr,yr=0;wc(jt,function(Xr){var ni=Xr.children;ni&&ni.length?(Xr.x=kr(ni),Xr.y=Xt(ni)):(Xr.x=gr?yr+=se(Xr,gr):0,Xr.y=0,gr=Xr)});var Gr=Ar(jt),qr=Kr(jt),_i=Gr.x-se(Gr,qr)/2,bi=qr.x+se(qr,Gr)/2;return wc(jt,Ne?function(Xr){Xr.x=(Xr.x-jt.x)*Te[0],Xr.y=(jt.y-Xr.y)*Te[1]}:function(Xr){Xr.x=(Xr.x-_i)/(bi-_i)*Te[0],Xr.y=(1-(jt.y?Xr.y/jt.y:1))*Te[1]}),nt}return He.separation=function(Ye){return arguments.length?(se=Ye,He):se},He.size=function(Ye){return arguments.length?(Ne=(Te=Ye)==null,He):Ne?null:Te},He.nodeSize=function(Ye){return arguments.length?(Ne=(Te=Ye)!=null,He):Ne?Te:null},zu(He,X)};function Xt(X){return 1+e.max(X,function(se){return se.y})}function kr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function Ar(X){var se=X.children;return se&&se.length?Ar(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Ne=null,He=Ei,Ye=!1,Ct,nt=\"squarify\",jt=.5*(1+Math.sqrt(5));function gr(Xr,ni){for(var gi=-1,Pi=Xr.length,Ai,ti;++gi<Pi;)ti=(Ai=Xr[gi]).value*(ni<0?0:ni),Ai.area=isNaN(ti)||ti<=0?0:ti}function yr(Xr){var ni=Xr.children;if(ni&&ni.length){var gi=He(Xr),Pi=[],Ai=ni.slice(),ti,Rn=1/0,Cn,Nn=nt===\"slice\"?gi.dx:nt===\"dice\"?gi.dy:nt===\"slice-dice\"?Xr.depth&1?gi.dy:gi.dx:Math.min(gi.dx,gi.dy),ia;for(gr(Ai,gi.dx*gi.dy/Xr.value),Pi.area=0;(ia=Ai.length)>0;)Pi.push(ti=Ai[ia-1]),Pi.area+=ti.area,nt!==\"squarify\"||(Cn=qr(Pi,Nn))<=Rn?(Ai.pop(),Rn=Cn):(Pi.area-=Pi.pop().area,_i(Pi,Nn,gi,!1),Nn=Math.min(gi.dx,gi.dy),Pi.length=Pi.area=0,Rn=1/0);Pi.length&&(_i(Pi,Nn,gi,!0),Pi.length=Pi.area=0),ni.forEach(yr)}}function Gr(Xr){var ni=Xr.children;if(ni&&ni.length){var gi=He(Xr),Pi=ni.slice(),Ai,ti=[];for(gr(Pi,gi.dx*gi.dy/Xr.value),ti.area=0;Ai=Pi.pop();)ti.push(Ai),ti.area+=Ai.area,Ai.z!=null&&(_i(ti,Ai.z?gi.dx:gi.dy,gi,!Pi.length),ti.length=ti.area=0);ni.forEach(Gr)}}function qr(Xr,ni){for(var gi=Xr.area,Pi,Ai=0,ti=1/0,Rn=-1,Cn=Xr.length;++Rn<Cn;)(Pi=Xr[Rn].area)&&(Pi<ti&&(ti=Pi),Pi>Ai&&(Ai=Pi));return gi*=gi,ni*=ni,gi?Math.max(ni*Ai*jt/gi,gi/(ni*ti*jt)):1/0}function _i(Xr,ni,gi,Pi){var Ai=-1,ti=Xr.length,Rn=gi.x,Cn=gi.y,Nn=ni?se(Xr.area/ni):0,ia;if(ni==gi.dx){for((Pi||Nn>gi.dy)&&(Nn=gi.dy);++Ai<ti;)ia=Xr[Ai],ia.x=Rn,ia.y=Cn,ia.dy=Nn,Rn+=ia.dx=Math.min(gi.x+gi.dx-Rn,Nn?se(ia.area/Nn):0);ia.z=!0,ia.dx+=gi.x+gi.dx-Rn,gi.y+=Nn,gi.dy-=Nn}else{for((Pi||Nn>gi.dx)&&(Nn=gi.dx);++Ai<ti;)ia=Xr[Ai],ia.x=Rn,ia.y=Cn,ia.dx=Nn,Cn+=ia.dy=Math.min(gi.y+gi.dy-Cn,Nn?se(ia.area/Nn):0);ia.z=!1,ia.dy+=gi.y+gi.dy-Cn,gi.x+=Nn,gi.dx-=Nn}}function bi(Xr){var ni=Ct||X(Xr),gi=ni[0];return gi.x=gi.y=0,gi.value?(gi.dx=Te[0],gi.dy=Te[1]):gi.dx=gi.dy=0,Ct&&X.revalue(gi),gr([gi],gi.dx*gi.dy/gi.value),(Ct?Gr:yr)(gi),Ye&&(Ct=ni),ni}return bi.size=function(Xr){return arguments.length?(Te=Xr,bi):Te},bi.padding=function(Xr){if(!arguments.length)return Ne;function ni(Ai){var ti=Xr.call(bi,Ai,Ai.depth);return ti==null?Ei(Ai):Wi(Ai,typeof ti==\"number\"?[ti,ti,ti,ti]:ti)}function gi(Ai){return Wi(Ai,Xr)}var Pi;return He=(Ne=Xr)==null?Ei:(Pi=typeof Xr)==\"function\"?ni:(Pi===\"number\"&&(Xr=[Xr,Xr,Xr,Xr]),gi),bi},bi.round=function(Xr){return arguments.length?(se=Xr?Math.round:Number,bi):se!=Number},bi.sticky=function(Xr){return arguments.length?(Ye=Xr,Ct=null,bi):Ye},bi.ratio=function(Xr){return arguments.length?(jt=Xr,bi):jt},bi.mode=function(Xr){return arguments.length?(nt=Xr+\"\",bi):nt},zu(bi,X)};function Ei(X){return{x:X.x,y:X.y,dx:X.dx,dy:X.dy}}function Wi(X,se){var Te=X.x+se[3],Ne=X.y+se[0],He=X.dx-se[1]-se[3],Ye=X.dy-se[0]-se[2];return He<0&&(Te+=He/2,He=0),Ye<0&&(Ne+=Ye/2,Ye=0),{x:Te,y:Ne,dx:He,dy:Ye}}e.random={normal:function(X,se){var Te=arguments.length;return Te<2&&(se=1),Te<1&&(X=0),function(){var Ne,He,Ye;do Ne=Math.random()*2-1,He=Math.random()*2-1,Ye=Ne*Ne+He*He;while(!Ye||Ye>1);return X+se*Ne*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te<X;Te++)se+=Math.random();return se}}},e.scale={};function hn(X){var se=X[0],Te=X[X.length-1];return se<Te?[se,Te]:[Te,se]}function Tn(X){return X.rangeExtent?X.rangeExtent():hn(X.range())}function Bn(X,se,Te,Ne){var He=Te(X[0],X[1]),Ye=Ne(se[0],se[1]);return function(Ct){return Ye(He(Ct))}}function Zi(X,se){var Te=0,Ne=X.length-1,He=X[Te],Ye=X[Ne],Ct;return Ye<He&&(Ct=Te,Te=Ne,Ne=Ct,Ct=He,He=Ye,Ye=Ct),X[Te]=se.floor(He),X[Ne]=se.ceil(Ye),X}function $i(X){return X?{floor:function(se){return Math.floor(se/X)*X},ceil:function(se){return Math.ceil(se/X)*X}}:an}var an={floor:G,ceil:G};function Di(X,se,Te,Ne){var He=[],Ye=[],Ct=0,nt=Math.min(X.length,se.length)-1;for(X[nt]<X[0]&&(X=X.slice().reverse(),se=se.slice().reverse());++Ct<=nt;)He.push(Te(X[Ct-1],X[Ct])),Ye.push(Ne(se[Ct-1],se[Ct]));return function(jt){var gr=e.bisect(X,jt,1,nt)-1;return Ye[gr](He[gr](jt))}}e.scale.linear=function(){return $n([0,1],[0,1],bl,!1)};function $n(X,se,Te,Ne){var He,Ye;function Ct(){var jt=Math.min(X.length,se.length)>2?Di:Bn,gr=Ne?Mu:xh;return He=jt(X,se,gr,Te),Ye=jt(se,X,gr,bl),nt}function nt(jt){return He(jt)}return nt.invert=function(jt){return Ye(jt)},nt.domain=function(jt){return arguments.length?(X=jt.map(Number),Ct()):X},nt.range=function(jt){return arguments.length?(se=jt,Ct()):se},nt.rangeRound=function(jt){return nt.range(jt).interpolate(ju)},nt.clamp=function(jt){return arguments.length?(Ne=jt,Ct()):Ne},nt.interpolate=function(jt){return arguments.length?(Te=jt,Ct()):Te},nt.ticks=function(jt){return Na(X,jt)},nt.tickFormat=function(jt,gr){return d3_scale_linearTickFormat(X,jt,gr)},nt.nice=function(jt){return Ra(X,jt),Ct()},nt.copy=function(){return $n(X,se,Te,Ne)},Ct()}function ka(X,se){return e.rebind(X,se,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Ra(X,se){return Zi(X,$i(La(X,se)[2])),Zi(X,$i(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=hn(X),Ne=Te[1]-Te[0],He=Math.pow(10,Math.floor(Math.log(Ne/se)/Math.LN10)),Ye=se/Ne*He;return Ye<=.15?He*=10:Ye<=.35?He*=5:Ye<=.75&&(He*=2),Te[0]=Math.ceil(Te[0]/He)*He,Te[1]=Math.floor(Te[1]/He)*He+He*.5,Te[2]=He,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Yn={s:1,g:1,p:1,r:1,e:1};function zn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=zn(se[2]);return X in Yn?Math.abs(Te-zn(Math.max(p(se[0]),p(se[1]))))+ +(X!==\"e\"):Te-(X===\"%\")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Ne){function He(nt){return(Te?Math.log(nt<0?0:nt):-Math.log(nt>0?0:-nt))/Math.log(se)}function Ye(nt){return Te?Math.pow(se,nt):-Math.pow(se,-nt)}function Ct(nt){return X(He(nt))}return Ct.invert=function(nt){return Ye(X.invert(nt))},Ct.domain=function(nt){return arguments.length?(Te=nt[0]>=0,X.domain((Ne=nt.map(Number)).map(He)),Ct):Ne},Ct.base=function(nt){return arguments.length?(se=+nt,X.domain(Ne.map(He)),Ct):se},Ct.nice=function(){var nt=Zi(Ne.map(He),Te?Math:Xo);return X.domain(nt),Ne=nt.map(Ye),Ct},Ct.ticks=function(){var nt=hn(Ne),jt=[],gr=nt[0],yr=nt[1],Gr=Math.floor(He(gr)),qr=Math.ceil(He(yr)),_i=se%1?2:se;if(isFinite(qr-Gr)){if(Te){for(;Gr<qr;Gr++)for(var bi=1;bi<_i;bi++)jt.push(Ye(Gr)*bi);jt.push(Ye(Gr))}else for(jt.push(Ye(Gr));Gr++<qr;)for(var bi=_i-1;bi>0;bi--)jt.push(Ye(Gr)*bi);for(Gr=0;jt[Gr]<gr;Gr++);for(qr=jt.length;jt[qr-1]>yr;qr--);jt=jt.slice(Gr,qr)}return jt},Ct.copy=function(){return bo(X.copy(),se,Te,Ne)},ka(Ct,X)}var Xo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ms(e.scale.linear(),1,[0,1])};function Ms(X,se,Te){var Ne=os(se),He=os(1/se);function Ye(Ct){return X(Ne(Ct))}return Ye.invert=function(Ct){return He(X.invert(Ct))},Ye.domain=function(Ct){return arguments.length?(X.domain((Te=Ct.map(Number)).map(Ne)),Ye):Te},Ye.ticks=function(Ct){return Na(Te,Ct)},Ye.tickFormat=function(Ct,nt){return d3_scale_linearTickFormat(Te,Ct,nt)},Ye.nice=function(Ct){return Ye.domain(Ra(Te,Ct))},Ye.exponent=function(Ct){return arguments.length?(Ne=os(se=Ct),He=os(1/se),X.domain(Te.map(Ne)),Ye):se},Ye.copy=function(){return Ms(X.copy(),se,Te)},ka(Ye,X)}function os(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Ts([],{t:\"range\",a:[[]]})};function Ts(X,se){var Te,Ne,He;function Ye(nt){return Ne[((Te.get(nt)||(se.t===\"range\"?Te.set(nt,X.push(nt)):NaN))-1)%Ne.length]}function Ct(nt,jt){return e.range(X.length).map(function(gr){return nt+jt*gr})}return Ye.domain=function(nt){if(!arguments.length)return X;X=[],Te=new A;for(var jt=-1,gr=nt.length,yr;++jt<gr;)Te.has(yr=nt[jt])||Te.set(yr,X.push(yr));return Ye[se.t].apply(Ye,se.a)},Ye.range=function(nt){return arguments.length?(Ne=nt,He=0,se={t:\"range\",a:arguments},Ye):Ne},Ye.rangePoints=function(nt,jt){arguments.length<2&&(jt=0);var gr=nt[0],yr=nt[1],Gr=X.length<2?(gr=(gr+yr)/2,0):(yr-gr)/(X.length-1+jt);return Ne=Ct(gr+Gr*jt/2,Gr),He=0,se={t:\"rangePoints\",a:arguments},Ye},Ye.rangeRoundPoints=function(nt,jt){arguments.length<2&&(jt=0);var gr=nt[0],yr=nt[1],Gr=X.length<2?(gr=yr=Math.round((gr+yr)/2),0):(yr-gr)/(X.length-1+jt)|0;return Ne=Ct(gr+Math.round(Gr*jt/2+(yr-gr-(X.length-1+jt)*Gr)/2),Gr),He=0,se={t:\"rangeRoundPoints\",a:arguments},Ye},Ye.rangeBands=function(nt,jt,gr){arguments.length<2&&(jt=0),arguments.length<3&&(gr=jt);var yr=nt[1]<nt[0],Gr=nt[yr-0],qr=nt[1-yr],_i=(qr-Gr)/(X.length-jt+2*gr);return Ne=Ct(Gr+_i*gr,_i),yr&&Ne.reverse(),He=_i*(1-jt),se={t:\"rangeBands\",a:arguments},Ye},Ye.rangeRoundBands=function(nt,jt,gr){arguments.length<2&&(jt=0),arguments.length<3&&(gr=jt);var yr=nt[1]<nt[0],Gr=nt[yr-0],qr=nt[1-yr],_i=Math.floor((qr-Gr)/(X.length-jt+2*gr));return Ne=Ct(Gr+Math.round((qr-Gr-(X.length-jt)*_i)/2),_i),yr&&Ne.reverse(),He=Math.round(_i*(1-jt)),se={t:\"rangeRoundBands\",a:arguments},Ye},Ye.rangeBand=function(){return He},Ye.rangeExtent=function(){return hn(se.a[0])},Ye.copy=function(){return Ts(X,se)},Ye.domain(X)}e.scale.category10=function(){return e.scale.ordinal().range(Ho)},e.scale.category20=function(){return e.scale.ordinal().range(yl)},e.scale.category20b=function(){return e.scale.ordinal().range(Xs)},e.scale.category20c=function(){return e.scale.ordinal().range(Ps)};var Ho=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Wo),yl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Wo),Xs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Wo),Ps=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Wo);e.scale.quantile=function(){return va([],[])};function va(X,se){var Te;function Ne(){var Ye=0,Ct=se.length;for(Te=[];++Ye<Ct;)Te[Ye-1]=e.quantile(X,Ye/Ct);return He}function He(Ye){if(!isNaN(Ye=+Ye))return se[e.bisect(Te,Ye)]}return He.domain=function(Ye){return arguments.length?(X=Ye.map(h).filter(d).sort(f),Ne()):X},He.range=function(Ye){return arguments.length?(se=Ye,Ne()):se},He.quantiles=function(){return Te},He.invertExtent=function(Ye){return Ye=se.indexOf(Ye),Ye<0?[NaN,NaN]:[Ye>0?Te[Ye-1]:X[0],Ye<Te.length?Te[Ye]:X[X.length-1]]},He.copy=function(){return va(X,se)},Ne()}e.scale.quantize=function(){return no(0,1,[0,1])};function no(X,se,Te){var Ne,He;function Ye(nt){return Te[Math.max(0,Math.min(He,Math.floor(Ne*(nt-X))))]}function Ct(){return Ne=Te.length/(se-X),He=Te.length-1,Ye}return Ye.domain=function(nt){return arguments.length?(X=+nt[0],se=+nt[nt.length-1],Ct()):[X,se]},Ye.range=function(nt){return arguments.length?(Te=nt,Ct()):Te},Ye.invertExtent=function(nt){return nt=Te.indexOf(nt),nt=nt<0?NaN:nt/Ne+X,[nt,nt+1/Ne]},Ye.copy=function(){return no(X,se,Te)},Ct()}e.scale.threshold=function(){return _s([.5],[0,1])};function _s(X,se){function Te(Ne){if(Ne<=Ne)return se[e.bisect(X,Ne)]}return Te.domain=function(Ne){return arguments.length?(X=Ne,Te):X},Te.range=function(Ne){return arguments.length?(se=Ne,Te):se},Te.invertExtent=function(Ne){return Ne=se.indexOf(Ne),[X[Ne-1],X[Ne]]},Te.copy=function(){return _s(X,se)},Te}e.scale.identity=function(){return is([0,1])};function is(X){function se(Te){return+Te}return se.invert=se,se.domain=se.range=function(Te){return arguments.length?(X=Te.map(se),se):X},se.ticks=function(Te){return Na(X,Te)},se.tickFormat=function(Te,Ne){return d3_scale_linearTickFormat(X,Te,Ne)},se.copy=function(){return is(X)},se}e.svg={};function $l(){return 0}e.svg.arc=function(){var X=Yu,se=Nc,Te=$l,Ne=ku,He=pu,Ye=Uc,Ct=xu;function nt(){var gr=Math.max(0,+X.apply(this,arguments)),yr=Math.max(0,+se.apply(this,arguments)),Gr=He.apply(this,arguments)-xe,qr=Ye.apply(this,arguments)-xe,_i=Math.abs(qr-Gr),bi=Gr>qr?0:1;if(yr<gr&&(Xr=yr,yr=gr,gr=Xr),_i>=Ie)return jt(yr,bi)+(gr?jt(gr,1-bi):\"\")+\"Z\";var Xr,ni,gi,Pi,Ai=0,ti=0,Rn,Cn,Nn,ia,Ea,Ia,yo,Da,go=[];if((Pi=(+Ct.apply(this,arguments)||0)/2)&&(gi=Ne===ku?Math.sqrt(gr*gr+yr*yr):+Ne.apply(this,arguments),bi||(ti*=-1),yr&&(ti=oi(gi/yr*Math.sin(Pi))),gr&&(Ai=oi(gi/gr*Math.sin(Pi)))),yr){Rn=yr*Math.cos(Gr+ti),Cn=yr*Math.sin(Gr+ti),Nn=yr*Math.cos(qr-ti),ia=yr*Math.sin(qr-ti);var Rs=Math.abs(qr-Gr-2*ti)<=$e?0:1;if(ti&&Ac(Rn,Cn,Nn,ia)===bi^Rs){var Es=(Gr+qr)/2;Rn=yr*Math.cos(Es),Cn=yr*Math.sin(Es),Nn=ia=null}}else Rn=Cn=0;if(gr){Ea=gr*Math.cos(qr-Ai),Ia=gr*Math.sin(qr-Ai),yo=gr*Math.cos(Gr+Ai),Da=gr*Math.sin(Gr+Ai);var Zs=Math.abs(Gr-qr+2*Ai)<=$e?0:1;if(Ai&&Ac(Ea,Ia,yo,Da)===1-bi^Zs){var Gn=(Gr+qr)/2;Ea=gr*Math.cos(Gn),Ia=gr*Math.sin(Gn),yo=Da=null}}else Ea=Ia=0;if(_i>Je&&(Xr=Math.min(Math.abs(yr-gr)/2,+Te.apply(this,arguments)))>.001){ni=gr<yr^bi?0:1;var Ha=Xr,Fo=Xr;if(_i<$e){var Uo=yo==null?[Ea,Ia]:Nn==null?[Rn,Cn]:nl([Rn,Cn],[yo,Da],[Nn,ia],[Ea,Ia]),Qs=Rn-Uo[0],Ml=Cn-Uo[1],bu=Nn-Uo[0],vl=ia-Uo[1],Sc=1/Math.sin(Math.acos((Qs*bu+Ml*vl)/(Math.sqrt(Qs*Qs+Ml*Ml)*Math.sqrt(bu*bu+vl*vl)))/2),Ee=Math.sqrt(Uo[0]*Uo[0]+Uo[1]*Uo[1]);Fo=Math.min(Xr,(gr-Ee)/(Sc-1)),Ha=Math.min(Xr,(yr-Ee)/(Sc+1))}if(Nn!=null){var xt=Ua(yo==null?[Ea,Ia]:[yo,Da],[Rn,Cn],yr,Ha,bi),zt=Ua([Nn,ia],[Ea,Ia],yr,Ha,bi);Xr===Ha?go.push(\"M\",xt[0],\"A\",Ha,\",\",Ha,\" 0 0,\",ni,\" \",xt[1],\"A\",yr,\",\",yr,\" 0 \",1-bi^Ac(xt[1][0],xt[1][1],zt[1][0],zt[1][1]),\",\",bi,\" \",zt[1],\"A\",Ha,\",\",Ha,\" 0 0,\",ni,\" \",zt[0]):go.push(\"M\",xt[0],\"A\",Ha,\",\",Ha,\" 0 1,\",ni,\" \",zt[0])}else go.push(\"M\",Rn,\",\",Cn);if(yo!=null){var Ir=Ua([Rn,Cn],[yo,Da],gr,-Fo,bi),Hr=Ua([Ea,Ia],Nn==null?[Rn,Cn]:[Nn,ia],gr,-Fo,bi);Xr===Fo?go.push(\"L\",Hr[0],\"A\",Fo,\",\",Fo,\" 0 0,\",ni,\" \",Hr[1],\"A\",gr,\",\",gr,\" 0 \",bi^Ac(Hr[1][0],Hr[1][1],Ir[1][0],Ir[1][1]),\",\",1-bi,\" \",Ir[1],\"A\",Fo,\",\",Fo,\" 0 0,\",ni,\" \",Ir[0]):go.push(\"L\",Hr[0],\"A\",Fo,\",\",Fo,\" 0 0,\",ni,\" \",Ir[0])}else go.push(\"L\",Ea,\",\",Ia)}else go.push(\"M\",Rn,\",\",Cn),Nn!=null&&go.push(\"A\",yr,\",\",yr,\" 0 \",Rs,\",\",bi,\" \",Nn,\",\",ia),go.push(\"L\",Ea,\",\",Ia),yo!=null&&go.push(\"A\",gr,\",\",gr,\" 0 \",Zs,\",\",1-bi,\" \",yo,\",\",Da);return go.push(\"Z\"),go.join(\"\")}function jt(gr,yr){return\"M0,\"+gr+\"A\"+gr+\",\"+gr+\" 0 1,\"+yr+\" 0,\"+-gr+\"A\"+gr+\",\"+gr+\" 0 1,\"+yr+\" 0,\"+gr}return nt.innerRadius=function(gr){return arguments.length?(X=pi(gr),nt):X},nt.outerRadius=function(gr){return arguments.length?(se=pi(gr),nt):se},nt.cornerRadius=function(gr){return arguments.length?(Te=pi(gr),nt):Te},nt.padRadius=function(gr){return arguments.length?(Ne=gr==ku?ku:pi(gr),nt):Ne},nt.startAngle=function(gr){return arguments.length?(He=pi(gr),nt):He},nt.endAngle=function(gr){return arguments.length?(Ye=pi(gr),nt):Ye},nt.padAngle=function(gr){return arguments.length?(Ct=pi(gr),nt):Ct},nt.centroid=function(){var gr=(+X.apply(this,arguments)+ +se.apply(this,arguments))/2,yr=(+He.apply(this,arguments)+ +Ye.apply(this,arguments))/2-xe;return[Math.cos(yr)*gr,Math.sin(yr)*gr]},nt};var ku=\"auto\";function Yu(X){return X.innerRadius}function Nc(X){return X.outerRadius}function pu(X){return X.startAngle}function Uc(X){return X.endAngle}function xu(X){return X&&X.padAngle}function Ac(X,se,Te,Ne){return(X-Te)*se-(se-Ne)*X>0?0:1}function Ua(X,se,Te,Ne,He){var Ye=X[0]-se[0],Ct=X[1]-se[1],nt=(He?Ne:-Ne)/Math.sqrt(Ye*Ye+Ct*Ct),jt=nt*Ct,gr=-nt*Ye,yr=X[0]+jt,Gr=X[1]+gr,qr=se[0]+jt,_i=se[1]+gr,bi=(yr+qr)/2,Xr=(Gr+_i)/2,ni=qr-yr,gi=_i-Gr,Pi=ni*ni+gi*gi,Ai=Te-Ne,ti=yr*_i-qr*Gr,Rn=(gi<0?-1:1)*Math.sqrt(Math.max(0,Ai*Ai*Pi-ti*ti)),Cn=(ti*gi-ni*Rn)/Pi,Nn=(-ti*ni-gi*Rn)/Pi,ia=(ti*gi+ni*Rn)/Pi,Ea=(-ti*ni+gi*Rn)/Pi,Ia=Cn-bi,yo=Nn-Xr,Da=ia-bi,go=Ea-Xr;return Ia*Ia+yo*yo>Da*Da+go*go&&(Cn=ia,Nn=Ea),[[Cn-jt,Nn-gr],[Cn*Te/Ai,Nn*Te/Ai]]}function oo(){return!0}function Vc(X){var se=Fs,Te=zs,Ne=oo,He=Ku,Ye=He.key,Ct=.7;function nt(jt){var gr=[],yr=[],Gr=-1,qr=jt.length,_i,bi=pi(se),Xr=pi(Te);function ni(){gr.push(\"M\",He(X(yr),Ct))}for(;++Gr<qr;)Ne.call(this,_i=jt[Gr],Gr)?yr.push([+bi.call(this,_i,Gr),+Xr.call(this,_i,Gr)]):yr.length&&(ni(),yr=[]);return yr.length&&ni(),gr.length?gr.join(\"\"):null}return nt.x=function(jt){return arguments.length?(se=jt,nt):se},nt.y=function(jt){return arguments.length?(Te=jt,nt):Te},nt.defined=function(jt){return arguments.length?(Ne=jt,nt):Ne},nt.interpolate=function(jt){return arguments.length?(typeof jt==\"function\"?Ye=He=jt:Ye=(He=hc.get(jt)||Ku).key,nt):Ye},nt.tension=function(jt){return arguments.length?(Ct=jt,nt):Ct},nt}e.svg.line=function(){return Vc(G)};var hc=e.map({linear:Ku,\"linear-closed\":ue,step:w,\"step-before\":B,\"step-after\":Q,basis:Tt,\"basis-open\":Kt,\"basis-closed\":Jt,bundle:xr,cardinal:qe,\"cardinal-open\":ee,\"cardinal-closed\":le,monotone:Dt});hc.forEach(function(X,se){se.key=X,se.closed=/-closed$/.test(X)});function Ku(X){return X.length>1?X.join(\"L\"):X+\"Z\"}function ue(X){return X.join(\"L\")+\"Z\"}function w(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"H\",(Ne[0]+(Ne=X[se])[0])/2,\"V\",Ne[1]);return Te>1&&He.push(\"H\",Ne[0]),He.join(\"\")}function B(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"V\",(Ne=X[se])[1],\"H\",Ne[0]);return He.join(\"\")}function Q(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"H\",(Ne=X[se])[0],\"V\",Ne[1]);return He.join(\"\")}function ee(X,se){return X.length<4?Ku(X):X[1]+Xe(X.slice(1,-1),ot(X,se))}function le(X,se){return X.length<3?ue(X):X[0]+Xe((X.push(X[0]),X),ot([X[X.length-2]].concat(X,[X[1]]),se))}function qe(X,se){return X.length<3?Ku(X):X[0]+Xe(X,ot(X,se))}function Xe(X,se){if(se.length<1||X.length!=se.length&&X.length!=se.length+2)return Ku(X);var Te=X.length!=se.length,Ne=\"\",He=X[0],Ye=X[1],Ct=se[0],nt=Ct,jt=1;if(Te&&(Ne+=\"Q\"+(Ye[0]-Ct[0]*2/3)+\",\"+(Ye[1]-Ct[1]*2/3)+\",\"+Ye[0]+\",\"+Ye[1],He=X[1],jt=2),se.length>1){nt=se[1],Ye=X[jt],jt++,Ne+=\"C\"+(He[0]+Ct[0])+\",\"+(He[1]+Ct[1])+\",\"+(Ye[0]-nt[0])+\",\"+(Ye[1]-nt[1])+\",\"+Ye[0]+\",\"+Ye[1];for(var gr=2;gr<se.length;gr++,jt++)Ye=X[jt],nt=se[gr],Ne+=\"S\"+(Ye[0]-nt[0])+\",\"+(Ye[1]-nt[1])+\",\"+Ye[0]+\",\"+Ye[1]}if(Te){var yr=X[jt];Ne+=\"Q\"+(Ye[0]+nt[0]*2/3)+\",\"+(Ye[1]+nt[1]*2/3)+\",\"+yr[0]+\",\"+yr[1]}return Ne}function ot(X,se){for(var Te=[],Ne=(1-se)/2,He,Ye=X[0],Ct=X[1],nt=1,jt=X.length;++nt<jt;)He=Ye,Ye=Ct,Ct=X[nt],Te.push([Ne*(Ct[0]-He[0]),Ne*(Ct[1]-He[1])]);return Te}function Tt(X){if(X.length<3)return Ku(X);var se=1,Te=X.length,Ne=X[0],He=Ne[0],Ye=Ne[1],Ct=[He,He,He,(Ne=X[1])[0]],nt=[Ye,Ye,Ye,Ne[1]],jt=[He,\",\",Ye,\"L\",Pr(Re,Ct),\",\",Pr(Re,nt)];for(X.push(X[Te-1]);++se<=Te;)Ne=X[se],Ct.shift(),Ct.push(Ne[0]),nt.shift(),nt.push(Ne[1]),Be(jt,Ct,nt);return X.pop(),jt.push(\"L\",Ne),jt.join(\"\")}function Kt(X){if(X.length<4)return Ku(X);for(var se=[],Te=-1,Ne=X.length,He,Ye=[0],Ct=[0];++Te<3;)He=X[Te],Ye.push(He[0]),Ct.push(He[1]);for(se.push(Pr(Re,Ye)+\",\"+Pr(Re,Ct)),--Te;++Te<Ne;)He=X[Te],Ye.shift(),Ye.push(He[0]),Ct.shift(),Ct.push(He[1]),Be(se,Ye,Ct);return se.join(\"\")}function Jt(X){for(var se,Te=-1,Ne=X.length,He=Ne+4,Ye,Ct=[],nt=[];++Te<4;)Ye=X[Te%Ne],Ct.push(Ye[0]),nt.push(Ye[1]);for(se=[Pr(Re,Ct),\",\",Pr(Re,nt)],--Te;++Te<He;)Ye=X[Te%Ne],Ct.shift(),Ct.push(Ye[0]),nt.shift(),nt.push(Ye[1]),Be(se,Ct,nt);return se.join(\"\")}function xr(X,se){var Te=X.length-1;if(Te)for(var Ne=X[0][0],He=X[0][1],Ye=X[Te][0]-Ne,Ct=X[Te][1]-He,nt=-1,jt,gr;++nt<=Te;)jt=X[nt],gr=nt/Te,jt[0]=se*jt[0]+(1-se)*(Ne+gr*Ye),jt[1]=se*jt[1]+(1-se)*(He+gr*Ct);return Tt(X)}function Pr(X,se){return X[0]*se[0]+X[1]*se[1]+X[2]*se[2]+X[3]*se[3]}var ve=[0,2/3,1/3,0],be=[0,1/3,2/3,0],Re=[0,1/6,2/3,1/6];function Be(X,se,Te){X.push(\"C\",Pr(ve,se),\",\",Pr(ve,Te),\",\",Pr(be,se),\",\",Pr(be,Te),\",\",Pr(Re,se),\",\",Pr(Re,Te))}function tt(X,se){return(se[1]-X[1])/(se[0]-X[0])}function We(X){for(var se=0,Te=X.length-1,Ne=[],He=X[0],Ye=X[1],Ct=Ne[0]=tt(He,Ye);++se<Te;)Ne[se]=(Ct+(Ct=tt(He=Ye,Ye=X[se+1])))/2;return Ne[se]=Ct,Ne}function it(X){for(var se=[],Te,Ne,He,Ye,Ct=We(X),nt=-1,jt=X.length-1;++nt<jt;)Te=tt(X[nt],X[nt+1]),p(Te)<Je?Ct[nt]=Ct[nt+1]=0:(Ne=Ct[nt]/Te,He=Ct[nt+1]/Te,Ye=Ne*Ne+He*He,Ye>9&&(Ye=Te*3/Math.sqrt(Ye),Ct[nt]=Ye*Ne,Ct[nt+1]=Ye*He));for(nt=-1;++nt<=jt;)Ye=(X[Math.min(jt,nt+1)][0]-X[Math.max(0,nt-1)][0])/(6*(1+Ct[nt]*Ct[nt])),se.push([Ye||0,Ct[nt]*Ye||0]);return se}function Dt(X){return X.length<3?Ku(X):X[0]+Xe(X,it(X))}e.svg.line.radial=function(){var X=Vc(Ht);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Ht(X){for(var se,Te=-1,Ne=X.length,He,Ye;++Te<Ne;)se=X[Te],He=se[0],Ye=se[1]-xe,se[0]=He*Math.cos(Ye),se[1]=He*Math.sin(Ye);return X}function rr(X){var se=Fs,Te=Fs,Ne=0,He=zs,Ye=oo,Ct=Ku,nt=Ct.key,jt=Ct,gr=\"L\",yr=.7;function Gr(qr){var _i=[],bi=[],Xr=[],ni=-1,gi=qr.length,Pi,Ai=pi(se),ti=pi(Ne),Rn=se===Te?function(){return Nn}:pi(Te),Cn=Ne===He?function(){return ia}:pi(He),Nn,ia;function Ea(){_i.push(\"M\",Ct(X(Xr),yr),gr,jt(X(bi.reverse()),yr),\"Z\")}for(;++ni<gi;)Ye.call(this,Pi=qr[ni],ni)?(bi.push([Nn=+Ai.call(this,Pi,ni),ia=+ti.call(this,Pi,ni)]),Xr.push([+Rn.call(this,Pi,ni),+Cn.call(this,Pi,ni)])):bi.length&&(Ea(),bi=[],Xr=[]);return bi.length&&Ea(),_i.length?_i.join(\"\"):null}return Gr.x=function(qr){return arguments.length?(se=Te=qr,Gr):Te},Gr.x0=function(qr){return arguments.length?(se=qr,Gr):se},Gr.x1=function(qr){return arguments.length?(Te=qr,Gr):Te},Gr.y=function(qr){return arguments.length?(Ne=He=qr,Gr):He},Gr.y0=function(qr){return arguments.length?(Ne=qr,Gr):Ne},Gr.y1=function(qr){return arguments.length?(He=qr,Gr):He},Gr.defined=function(qr){return arguments.length?(Ye=qr,Gr):Ye},Gr.interpolate=function(qr){return arguments.length?(typeof qr==\"function\"?nt=Ct=qr:nt=(Ct=hc.get(qr)||Ku).key,jt=Ct.reverse||Ct,gr=Ct.closed?\"M\":\"L\",Gr):nt},Gr.tension=function(qr){return arguments.length?(yr=qr,Gr):yr},Gr}B.reverse=Q,Q.reverse=B,e.svg.area=function(){return rr(G)},e.svg.area.radial=function(){var X=rr(Ht);return X.radius=X.x,delete X.x,X.innerRadius=X.x0,delete X.x0,X.outerRadius=X.x1,delete X.x1,X.angle=X.y,delete X.y,X.startAngle=X.y0,delete X.y0,X.endAngle=X.y1,delete X.y1,X};function dr(X){return X.source}function Sr(X){return X.target}e.svg.chord=function(){var X=dr,se=Sr,Te=Or,Ne=pu,He=Uc;function Ye(yr,Gr){var qr=Ct(this,X,yr,Gr),_i=Ct(this,se,yr,Gr);return\"M\"+qr.p0+jt(qr.r,qr.p1,qr.a1-qr.a0)+(nt(qr,_i)?gr(qr.r,qr.p1,qr.r,qr.p0):gr(qr.r,qr.p1,_i.r,_i.p0)+jt(_i.r,_i.p1,_i.a1-_i.a0)+gr(_i.r,_i.p1,qr.r,qr.p0))+\"Z\"}function Ct(yr,Gr,qr,_i){var bi=Gr.call(yr,qr,_i),Xr=Te.call(yr,bi,_i),ni=Ne.call(yr,bi,_i)-xe,gi=He.call(yr,bi,_i)-xe;return{r:Xr,a0:ni,a1:gi,p0:[Xr*Math.cos(ni),Xr*Math.sin(ni)],p1:[Xr*Math.cos(gi),Xr*Math.sin(gi)]}}function nt(yr,Gr){return yr.a0==Gr.a0&&yr.a1==Gr.a1}function jt(yr,Gr,qr){return\"A\"+yr+\",\"+yr+\" 0 \"+ +(qr>$e)+\",1 \"+Gr}function gr(yr,Gr,qr,_i){return\"Q 0,0 \"+_i}return Ye.radius=function(yr){return arguments.length?(Te=pi(yr),Ye):Te},Ye.source=function(yr){return arguments.length?(X=pi(yr),Ye):X},Ye.target=function(yr){return arguments.length?(se=pi(yr),Ye):se},Ye.startAngle=function(yr){return arguments.length?(Ne=pi(yr),Ye):Ne},Ye.endAngle=function(yr){return arguments.length?(He=pi(yr),Ye):He},Ye};function Or(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Sr,Te=jr;function Ne(He,Ye){var Ct=X.call(this,He,Ye),nt=se.call(this,He,Ye),jt=(Ct.y+nt.y)/2,gr=[Ct,{x:Ct.x,y:jt},{x:nt.x,y:jt},nt];return gr=gr.map(Te),\"M\"+gr[0]+\"C\"+gr[1]+\" \"+gr[2]+\" \"+gr[3]}return Ne.source=function(He){return arguments.length?(X=pi(He),Ne):X},Ne.target=function(He){return arguments.length?(se=pi(He),Ne):se},Ne.projection=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function jr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=jr,Te=X.projection;return X.projection=function(Ne){return arguments.length?Te(ii(se=Ne)):se},X};function ii(X){return function(){var se=X.apply(this,arguments),Te=se[0],Ne=se[1]-xe;return[Te*Math.cos(Ne),Te*Math.sin(Ne)]}}e.svg.symbol=function(){var X=un,se=Li;function Te(Ne,He){return(In.get(X.call(this,Ne,He))||sn)(se.call(this,Ne,He))}return Te.type=function(Ne){return arguments.length?(X=pi(Ne),Te):X},Te.size=function(Ne){return arguments.length?(se=pi(Ne),Te):se},Te};function Li(){return 64}function un(){return\"circle\"}function sn(X){var se=Math.sqrt(X/$e);return\"M0,\"+se+\"A\"+se+\",\"+se+\" 0 1,1 0,\"+-se+\"A\"+se+\",\"+se+\" 0 1,1 0,\"+se+\"Z\"}var In=e.map({circle:sn,cross:function(X){var se=Math.sqrt(X/5)/2;return\"M\"+-3*se+\",\"+-se+\"H\"+-se+\"V\"+-3*se+\"H\"+se+\"V\"+-se+\"H\"+3*se+\"V\"+se+\"H\"+se+\"V\"+3*se+\"H\"+-se+\"V\"+se+\"H\"+-3*se+\"Z\"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return\"M0,\"+-se+\"L\"+Te+\",0 0,\"+se+\" \"+-Te+\",0Z\"},square:function(X){var se=Math.sqrt(X)/2;return\"M\"+-se+\",\"+-se+\"L\"+se+\",\"+-se+\" \"+se+\",\"+se+\" \"+-se+\",\"+se+\"Z\"},\"triangle-down\":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return\"M0,\"+Te+\"L\"+se+\",\"+-Te+\" \"+-se+\",\"+-Te+\"Z\"},\"triangle-up\":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return\"M0,\"+-Te+\"L\"+se+\",\"+Te+\" \"+-se+\",\"+Te+\"Z\"}});e.svg.symbolTypes=In.keys();var Kn=Math.sqrt(3),Aa=Math.tan(30*Ce);Pe.transition=function(X){for(var se=Bo||++mo,Te=To(X),Ne=[],He,Ye,Ct=Is||{time:Date.now(),ease:wl,delay:0,duration:250},nt=-1,jt=this.length;++nt<jt;){Ne.push(He=[]);for(var gr=this[nt],yr=-1,Gr=gr.length;++yr<Gr;)(Ye=gr[yr])&&dl(Ye,yr,Te,se,Ct),He.push(Ye)}return ko(Ne,Te,se)},Pe.interrupt=function(X){return this.each(X==null?fa:$a(To(X)))};var fa=$a(To());function $a(X){return function(){var se,Te,Ne;(se=this[X])&&(Ne=se[Te=se.active])&&(Ne.timer.c=null,Ne.timer.t=NaN,--se.count?delete se[Te]:delete this[X],se.active+=.5,Ne.event&&Ne.event.interrupt.call(this,this.__data__,Ne.index))}}function ko(X,se,Te){return ie(X,Qa),X.namespace=se,X.id=Te,X}var Qa=[],mo=0,Bo,Is;Qa.call=Pe.call,Qa.empty=Pe.empty,Qa.node=Pe.node,Qa.size=Pe.size,e.transition=function(X,se){return X&&X.transition?Bo?X.transition(se):X:e.selection().transition(X)},e.transition.prototype=Qa,Qa.select=function(X){var se=this.id,Te=this.namespace,Ne=[],He,Ye,Ct;X=ge(X);for(var nt=-1,jt=this.length;++nt<jt;){Ne.push(He=[]);for(var gr=this[nt],yr=-1,Gr=gr.length;++yr<Gr;)(Ct=gr[yr])&&(Ye=X.call(Ct,Ct.__data__,yr,nt))?(\"__data__\"in Ct&&(Ye.__data__=Ct.__data__),dl(Ye,yr,Te,se,Ct[Te][se]),He.push(Ye)):He.push(null)}return ko(Ne,Te,se)},Qa.selectAll=function(X){var se=this.id,Te=this.namespace,Ne=[],He,Ye,Ct,nt,jt;X=Fe(X);for(var gr=-1,yr=this.length;++gr<yr;)for(var Gr=this[gr],qr=-1,_i=Gr.length;++qr<_i;)if(Ct=Gr[qr]){jt=Ct[Te][se],Ye=X.call(Ct,Ct.__data__,qr,gr),Ne.push(He=[]);for(var bi=-1,Xr=Ye.length;++bi<Xr;)(nt=Ye[bi])&&dl(nt,bi,Te,se,jt),He.push(nt)}return ko(Ne,Te,se)},Qa.filter=function(X){var se=[],Te,Ne,He;typeof X!=\"function\"&&(X=Qe(X));for(var Ye=0,Ct=this.length;Ye<Ct;Ye++){se.push(Te=[]);for(var Ne=this[Ye],nt=0,jt=Ne.length;nt<jt;nt++)(He=Ne[nt])&&X.call(He,He.__data__,nt,Ye)&&Te.push(He)}return ko(se,this.namespace,this.id)},Qa.tween=function(X,se){var Te=this.id,Ne=this.namespace;return arguments.length<2?this.node()[Ne][Te].tween.get(X):er(this,se==null?function(He){He[Ne][Te].tween.remove(X)}:function(He){He[Ne][Te].tween.set(X,se)})};function As(X,se,Te,Ne){var He=X.id,Ye=X.namespace;return er(X,typeof Te==\"function\"?function(Ct,nt,jt){Ct[Ye][He].tween.set(se,Ne(Te.call(Ct,Ct.__data__,nt,jt)))}:(Te=Ne(Te),function(Ct){Ct[Ye][He].tween.set(se,Te)}))}Qa.attr=function(X,se){if(arguments.length<2){for(se in X)this.attr(se,X[se]);return this}var Te=X==\"transform\"?sf:bl,Ne=e.ns.qualify(X);function He(){this.removeAttribute(Ne)}function Ye(){this.removeAttributeNS(Ne.space,Ne.local)}function Ct(jt){return jt==null?He:(jt+=\"\",function(){var gr=this.getAttribute(Ne),yr;return gr!==jt&&(yr=Te(gr,jt),function(Gr){this.setAttribute(Ne,yr(Gr))})})}function nt(jt){return jt==null?Ye:(jt+=\"\",function(){var gr=this.getAttributeNS(Ne.space,Ne.local),yr;return gr!==jt&&(yr=Te(gr,jt),function(Gr){this.setAttributeNS(Ne.space,Ne.local,yr(Gr))})})}return As(this,\"attr.\"+X,se,Ne.local?nt:Ct)},Qa.attrTween=function(X,se){var Te=e.ns.qualify(X);function Ne(Ye,Ct){var nt=se.call(this,Ye,Ct,this.getAttribute(Te));return nt&&function(jt){this.setAttribute(Te,nt(jt))}}function He(Ye,Ct){var nt=se.call(this,Ye,Ct,this.getAttributeNS(Te.space,Te.local));return nt&&function(jt){this.setAttributeNS(Te.space,Te.local,nt(jt))}}return this.tween(\"attr.\"+X,Te.local?He:Ne)},Qa.style=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=\"\");for(Te in X)this.style(Te,X[Te],se);return this}Te=\"\"}function He(){this.style.removeProperty(X)}function Ye(Ct){return Ct==null?He:(Ct+=\"\",function(){var nt=a(this).getComputedStyle(this,null).getPropertyValue(X),jt;return nt!==Ct&&(jt=bl(nt,Ct),function(gr){this.style.setProperty(X,jt(gr),Te)})})}return As(this,\"style.\"+X,se,Ye)},Qa.styleTween=function(X,se,Te){arguments.length<3&&(Te=\"\");function Ne(He,Ye){var Ct=se.call(this,He,Ye,a(this).getComputedStyle(this,null).getPropertyValue(X));return Ct&&function(nt){this.style.setProperty(X,Ct(nt),Te)}}return this.tween(\"style.\"+X,Ne)},Qa.text=function(X){return As(this,\"text\",X,wo)};function wo(X){return X==null&&(X=\"\"),function(){this.textContent=X}}Qa.remove=function(){var X=this.namespace;return this.each(\"end.transition\",function(){var se;this[X].count<2&&(se=this.parentNode)&&se.removeChild(this)})},Qa.ease=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].ease:(typeof X!=\"function\"&&(X=e.ease.apply(e,arguments)),er(this,function(Ne){Ne[Te][se].ease=X}))},Qa.delay=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].delay:er(this,typeof X==\"function\"?function(Ne,He,Ye){Ne[Te][se].delay=+X.call(Ne,Ne.__data__,He,Ye)}:(X=+X,function(Ne){Ne[Te][se].delay=X}))},Qa.duration=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].duration:er(this,typeof X==\"function\"?function(Ne,He,Ye){Ne[Te][se].duration=Math.max(1,X.call(Ne,Ne.__data__,He,Ye))}:(X=Math.max(1,X),function(Ne){Ne[Te][se].duration=X}))},Qa.each=function(X,se){var Te=this.id,Ne=this.namespace;if(arguments.length<2){var He=Is,Ye=Bo;try{Bo=Te,er(this,function(Ct,nt,jt){Is=Ct[Ne][Te],X.call(Ct,Ct.__data__,nt,jt)})}finally{Is=He,Bo=Ye}}else er(this,function(Ct){var nt=Ct[Ne][Te];(nt.event||(nt.event=e.dispatch(\"start\",\"end\",\"interrupt\"))).on(X,se)});return this},Qa.transition=function(){for(var X=this.id,se=++mo,Te=this.namespace,Ne=[],He,Ye,Ct,nt,jt=0,gr=this.length;jt<gr;jt++){Ne.push(He=[]);for(var Ye=this[jt],yr=0,Gr=Ye.length;yr<Gr;yr++)(Ct=Ye[yr])&&(nt=Ct[Te][X],dl(Ct,yr,Te,se,{time:nt.time,ease:nt.ease,delay:nt.delay+nt.duration,duration:nt.duration})),He.push(Ct)}return ko(Ne,Te,se)};function To(X){return X==null?\"__transition__\":\"__transition_\"+X+\"__\"}function dl(X,se,Te,Ne,He){var Ye=X[Te]||(X[Te]={active:0,count:0}),Ct=Ye[Ne],nt,jt,gr,yr,Gr;function qr(Xr){var ni=Ct.delay;if(jt.t=ni+nt,ni<=Xr)return _i(Xr-ni);jt.c=_i}function _i(Xr){var ni=Ye.active,gi=Ye[ni];gi&&(gi.timer.c=null,gi.timer.t=NaN,--Ye.count,delete Ye[ni],gi.event&&gi.event.interrupt.call(X,X.__data__,gi.index));for(var Pi in Ye)if(+Pi<Ne){var Ai=Ye[Pi];Ai.timer.c=null,Ai.timer.t=NaN,--Ye.count,delete Ye[Pi]}jt.c=bi,No(function(){return jt.c&&bi(Xr||1)&&(jt.c=null,jt.t=NaN),1},0,nt),Ye.active=Ne,Ct.event&&Ct.event.start.call(X,X.__data__,se),Gr=[],Ct.tween.forEach(function(ti,Rn){(Rn=Rn.call(X,X.__data__,se))&&Gr.push(Rn)}),yr=Ct.ease,gr=Ct.duration}function bi(Xr){for(var ni=Xr/gr,gi=yr(ni),Pi=Gr.length;Pi>0;)Gr[--Pi].call(X,gi);if(ni>=1)return Ct.event&&Ct.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Ne]:delete X[Te],1}Ct||(nt=He.time,jt=No(qr,0,nt),Ct=Ye[Ne]={tween:new A,time:nt,timer:jt,delay:He.delay,duration:He.duration,ease:He.ease,index:se},He=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Ne=6,He=3,Ye=[10],Ct=null,nt;function jt(gr){gr.each(function(){var yr=e.select(this),Gr=this.__chart__||X,qr=this.__chart__=X.copy(),_i=Ct==null?qr.ticks?qr.ticks.apply(qr,Ye):qr.domain():Ct,bi=nt==null?qr.tickFormat?qr.tickFormat.apply(qr,Ye):G:nt,Xr=yr.selectAll(\".tick\").data(_i,qr),ni=Xr.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",Je),gi=e.transition(Xr.exit()).style(\"opacity\",Je).remove(),Pi=e.transition(Xr.order()).style(\"opacity\",1),Ai=Math.max(Te,0)+He,ti,Rn=Tn(qr),Cn=yr.selectAll(\".domain\").data([0]),Nn=(Cn.enter().append(\"path\").attr(\"class\",\"domain\"),e.transition(Cn));ni.append(\"line\"),ni.append(\"text\");var ia=ni.select(\"line\"),Ea=Pi.select(\"line\"),Ia=Xr.select(\"text\").text(bi),yo=ni.select(\"text\"),Da=Pi.select(\"text\"),go=se===\"top\"||se===\"left\"?-1:1,Rs,Es,Zs,Gn;if(se===\"bottom\"||se===\"top\"?(ti=au,Rs=\"x\",Zs=\"y\",Es=\"x2\",Gn=\"y2\",Ia.attr(\"dy\",go<0?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),Nn.attr(\"d\",\"M\"+Rn[0]+\",\"+go*Ne+\"V0H\"+Rn[1]+\"V\"+go*Ne)):(ti=$s,Rs=\"y\",Zs=\"x\",Es=\"y2\",Gn=\"x2\",Ia.attr(\"dy\",\".32em\").style(\"text-anchor\",go<0?\"end\":\"start\"),Nn.attr(\"d\",\"M\"+go*Ne+\",\"+Rn[0]+\"H0V\"+Rn[1]+\"H\"+go*Ne)),ia.attr(Gn,go*Te),yo.attr(Zs,go*Ai),Ea.attr(Es,0).attr(Gn,go*Te),Da.attr(Rs,0).attr(Zs,go*Ai),qr.rangeBand){var Ha=qr,Fo=Ha.rangeBand()/2;Gr=qr=function(Uo){return Ha(Uo)+Fo}}else Gr.rangeBand?Gr=qr:gi.call(ti,qr,Gr);ni.call(ti,Gr,qr),Pi.call(ti,qr,qr)})}return jt.scale=function(gr){return arguments.length?(X=gr,jt):X},jt.orient=function(gr){return arguments.length?(se=gr in Lu?gr+\"\":Ul,jt):se},jt.ticks=function(){return arguments.length?(Ye=r(arguments),jt):Ye},jt.tickValues=function(gr){return arguments.length?(Ct=gr,jt):Ct},jt.tickFormat=function(gr){return arguments.length?(nt=gr,jt):nt},jt.tickSize=function(gr){var yr=arguments.length;return yr?(Te=+gr,Ne=+arguments[yr-1],jt):Te},jt.innerTickSize=function(gr){return arguments.length?(Te=+gr,jt):Te},jt.outerTickSize=function(gr){return arguments.length?(Ne=+gr,jt):Ne},jt.tickPadding=function(gr){return arguments.length?(He=+gr,jt):He},jt.tickSubdivide=function(){return arguments.length&&jt},jt};var Ul=\"bottom\",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr(\"transform\",function(Ne){var He=se(Ne);return\"translate(\"+(isFinite(He)?He:Te(Ne))+\",0)\"})}function $s(X,se,Te){X.attr(\"transform\",function(Ne){var He=se(Ne);return\"translate(0,\"+(isFinite(He)?He:Te(Ne))+\")\"})}e.svg.brush=function(){var X=ke(yr,\"brushstart\",\"brush\",\"brushend\"),se=null,Te=null,Ne=[0,0],He=[0,0],Ye,Ct,nt=!0,jt=!0,gr=dc[0];function yr(Xr){Xr.each(function(){var ni=e.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",bi).on(\"touchstart.brush\",bi),gi=ni.selectAll(\".background\").data([0]);gi.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),ni.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var Pi=ni.selectAll(\".resize\").data(gr,G);Pi.exit().remove(),Pi.enter().append(\"g\").attr(\"class\",function(Cn){return\"resize \"+Cn}).style(\"cursor\",function(Cn){return Ql[Cn]}).append(\"rect\").attr(\"x\",function(Cn){return/[ew]$/.test(Cn)?-3:null}).attr(\"y\",function(Cn){return/^[ns]/.test(Cn)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),Pi.style(\"display\",yr.empty()?\"none\":null);var Ai=e.transition(ni),ti=e.transition(gi),Rn;se&&(Rn=Tn(se),ti.attr(\"x\",Rn[0]).attr(\"width\",Rn[1]-Rn[0]),qr(Ai)),Te&&(Rn=Tn(Te),ti.attr(\"y\",Rn[0]).attr(\"height\",Rn[1]-Rn[0]),_i(Ai)),Gr(Ai)})}yr.event=function(Xr){Xr.each(function(){var ni=X.of(this,arguments),gi={x:Ne,y:He,i:Ye,j:Ct},Pi=this.__chart__||gi;this.__chart__=gi,Bo?e.select(this).transition().each(\"start.brush\",function(){Ye=Pi.i,Ct=Pi.j,Ne=Pi.x,He=Pi.y,ni({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var Ai=Gu(Ne,gi.x),ti=Gu(He,gi.y);return Ye=Ct=null,function(Rn){Ne=gi.x=Ai(Rn),He=gi.y=ti(Rn),ni({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){Ye=gi.i,Ct=gi.j,ni({type:\"brush\",mode:\"resize\"}),ni({type:\"brushend\"})}):(ni({type:\"brushstart\"}),ni({type:\"brush\",mode:\"resize\"}),ni({type:\"brushend\"}))})};function Gr(Xr){Xr.selectAll(\".resize\").attr(\"transform\",function(ni){return\"translate(\"+Ne[+/e$/.test(ni)]+\",\"+He[+/^s/.test(ni)]+\")\"})}function qr(Xr){Xr.select(\".extent\").attr(\"x\",Ne[0]),Xr.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",Ne[1]-Ne[0])}function _i(Xr){Xr.select(\".extent\").attr(\"y\",He[0]),Xr.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",He[1]-He[0])}function bi(){var Xr=this,ni=e.select(e.event.target),gi=X.of(Xr,arguments),Pi=e.select(Xr),Ai=ni.datum(),ti=!/^(n|s)$/.test(Ai)&&se,Rn=!/^(e|w)$/.test(Ai)&&Te,Cn=ni.classed(\"extent\"),Nn=Wr(Xr),ia,Ea=e.mouse(Xr),Ia,yo=e.select(a(Xr)).on(\"keydown.brush\",Rs).on(\"keyup.brush\",Es);if(e.event.changedTouches?yo.on(\"touchmove.brush\",Zs).on(\"touchend.brush\",Ha):yo.on(\"mousemove.brush\",Zs).on(\"mouseup.brush\",Ha),Pi.interrupt().selectAll(\"*\").interrupt(),Cn)Ea[0]=Ne[0]-Ea[0],Ea[1]=He[0]-Ea[1];else if(Ai){var Da=+/w$/.test(Ai),go=+/^n/.test(Ai);Ia=[Ne[1-Da]-Ea[0],He[1-go]-Ea[1]],Ea[0]=Ne[Da],Ea[1]=He[go]}else e.event.altKey&&(ia=Ea.slice());Pi.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),e.select(\"body\").style(\"cursor\",ni.style(\"cursor\")),gi({type:\"brushstart\"}),Zs();function Rs(){e.event.keyCode==32&&(Cn||(ia=null,Ea[0]-=Ne[1],Ea[1]-=He[1],Cn=2),_e())}function Es(){e.event.keyCode==32&&Cn==2&&(Ea[0]+=Ne[1],Ea[1]+=He[1],Cn=0,_e())}function Zs(){var Fo=e.mouse(Xr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),Cn||(e.event.altKey?(ia||(ia=[(Ne[0]+Ne[1])/2,(He[0]+He[1])/2]),Ea[0]=Ne[+(Fo[0]<ia[0])],Ea[1]=He[+(Fo[1]<ia[1])]):ia=null),ti&&Gn(Fo,se,0)&&(qr(Pi),Uo=!0),Rn&&Gn(Fo,Te,1)&&(_i(Pi),Uo=!0),Uo&&(Gr(Pi),gi({type:\"brush\",mode:Cn?\"move\":\"resize\"}))}function Gn(Fo,Uo,Qs){var Ml=Tn(Uo),bu=Ml[0],vl=Ml[1],Sc=Ea[Qs],Ee=Qs?He:Ne,xt=Ee[1]-Ee[0],zt,Ir;if(Cn&&(bu-=Sc,vl-=xt+Sc),zt=(Qs?jt:nt)?Math.max(bu,Math.min(vl,Fo[Qs])):Fo[Qs],Cn?Ir=(zt+=Sc)+xt:(ia&&(Sc=Math.max(bu,Math.min(vl,2*ia[Qs]-zt))),Sc<zt?(Ir=zt,zt=Sc):Ir=Sc),Ee[0]!=zt||Ee[1]!=Ir)return Qs?Ct=null:Ye=null,Ee[0]=zt,Ee[1]=Ir,!0}function Ha(){Zs(),Pi.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",yr.empty()?\"none\":null),e.select(\"body\").style(\"cursor\",null),yo.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),Nn(),gi({type:\"brushend\"})}}return yr.x=function(Xr){return arguments.length?(se=Xr,gr=dc[!se<<1|!Te],yr):se},yr.y=function(Xr){return arguments.length?(Te=Xr,gr=dc[!se<<1|!Te],yr):Te},yr.clamp=function(Xr){return arguments.length?(se&&Te?(nt=!!Xr[0],jt=!!Xr[1]):se?nt=!!Xr:Te&&(jt=!!Xr),yr):se&&Te?[nt,jt]:se?nt:Te?jt:null},yr.extent=function(Xr){var ni,gi,Pi,Ai,ti;return arguments.length?(se&&(ni=Xr[0],gi=Xr[1],Te&&(ni=ni[0],gi=gi[0]),Ye=[ni,gi],se.invert&&(ni=se(ni),gi=se(gi)),gi<ni&&(ti=ni,ni=gi,gi=ti),(ni!=Ne[0]||gi!=Ne[1])&&(Ne=[ni,gi])),Te&&(Pi=Xr[0],Ai=Xr[1],se&&(Pi=Pi[1],Ai=Ai[1]),Ct=[Pi,Ai],Te.invert&&(Pi=Te(Pi),Ai=Te(Ai)),Ai<Pi&&(ti=Pi,Pi=Ai,Ai=ti),(Pi!=He[0]||Ai!=He[1])&&(He=[Pi,Ai])),yr):(se&&(Ye?(ni=Ye[0],gi=Ye[1]):(ni=Ne[0],gi=Ne[1],se.invert&&(ni=se.invert(ni),gi=se.invert(gi)),gi<ni&&(ti=ni,ni=gi,gi=ti))),Te&&(Ct?(Pi=Ct[0],Ai=Ct[1]):(Pi=He[0],Ai=He[1],Te.invert&&(Pi=Te.invert(Pi),Ai=Te.invert(Ai)),Ai<Pi&&(ti=Pi,Pi=Ai,Ai=ti))),se&&Te?[[ni,Pi],[gi,Ai]]:se?[ni,gi]:Te&&[Pi,Ai])},yr.clear=function(){return yr.empty()||(Ne=[0,0],He=[0,0],Ye=Ct=null),yr},yr.empty=function(){return!!se&&Ne[0]==Ne[1]||!!Te&&He[0]==He[1]},e.rebind(yr,X,\"on\")};var Ql={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},dc=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]];e.text=fn(function(X){return X.responseText}),e.json=function(X,se){return Sn(X,\"application/json\",Al,se)};function Al(X){return JSON.parse(X.responseText)}e.html=function(X,se){return Sn(X,\"text/html\",Sl,se)};function Sl(X){var se=n.createRange();return se.selectNode(n.body),se.createContextualFragment(X.responseText)}e.xml=fn(function(X){return X.responseXML}),typeof l6==\"object\"&&l6.exports?l6.exports=e:this.d3=e}).apply(self)});var mO=ye((u6,vee)=>{(function(e,t){typeof u6==\"object\"&&typeof vee!=\"undefined\"?t(u6):(e=e||self,t(e.d3=e.d3||{}))})(u6,function(e){\"use strict\";var t=new Date,r=new Date;function n(Qe,Et,er,Ut){function Ft(bt){return Qe(bt=arguments.length===0?new Date:new Date(+bt)),bt}return Ft.floor=function(bt){return Qe(bt=new Date(+bt)),bt},Ft.ceil=function(bt){return Qe(bt=new Date(bt-1)),Et(bt,1),Qe(bt),bt},Ft.round=function(bt){var yt=Ft(bt),Yt=Ft.ceil(bt);return bt-yt<Yt-bt?yt:Yt},Ft.offset=function(bt,yt){return Et(bt=new Date(+bt),yt==null?1:Math.floor(yt)),bt},Ft.range=function(bt,yt,Yt){var lr=[],Tr;if(bt=Ft.ceil(bt),Yt=Yt==null?1:Math.floor(Yt),!(bt<yt)||!(Yt>0))return lr;do lr.push(Tr=new Date(+bt)),Et(bt,Yt),Qe(bt);while(Tr<bt&&bt<yt);return lr},Ft.filter=function(bt){return n(function(yt){if(yt>=yt)for(;Qe(yt),!bt(yt);)yt.setTime(yt-1)},function(yt,Yt){if(yt>=yt)if(Yt<0)for(;++Yt<=0;)for(;Et(yt,-1),!bt(yt););else for(;--Yt>=0;)for(;Et(yt,1),!bt(yt););})},er&&(Ft.count=function(bt,yt){return t.setTime(+bt),r.setTime(+yt),Qe(t),Qe(r),Math.floor(er(t,r))},Ft.every=function(bt){return bt=Math.floor(bt),!isFinite(bt)||!(bt>0)?null:bt>1?Ft.filter(Ut?function(yt){return Ut(yt)%bt===0}:function(yt){return Ft.count(0,yt)%bt===0}):Ft}),Ft}var i=n(function(){},function(Qe,Et){Qe.setTime(+Qe+Et)},function(Qe,Et){return Et-Qe});i.every=function(Qe){return Qe=Math.floor(Qe),!isFinite(Qe)||!(Qe>0)?null:Qe>1?n(function(Et){Et.setTime(Math.floor(Et/Qe)*Qe)},function(Et,er){Et.setTime(+Et+er*Qe)},function(Et,er){return(er-Et)/Qe}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Qe){Qe.setTime(Qe-Qe.getMilliseconds())},function(Qe,Et){Qe.setTime(+Qe+Et*o)},function(Qe,Et){return(Et-Qe)/o},function(Qe){return Qe.getUTCSeconds()}),h=f.range,d=n(function(Qe){Qe.setTime(Qe-Qe.getMilliseconds()-Qe.getSeconds()*o)},function(Qe,Et){Qe.setTime(+Qe+Et*s)},function(Qe,Et){return(Et-Qe)/s},function(Qe){return Qe.getMinutes()}),v=d.range,x=n(function(Qe){Qe.setTime(Qe-Qe.getMilliseconds()-Qe.getSeconds()*o-Qe.getMinutes()*s)},function(Qe,Et){Qe.setTime(+Qe+Et*l)},function(Qe,Et){return(Et-Qe)/l},function(Qe){return Qe.getHours()}),b=x.range,p=n(function(Qe){Qe.setHours(0,0,0,0)},function(Qe,Et){Qe.setDate(Qe.getDate()+Et)},function(Qe,Et){return(Et-Qe-(Et.getTimezoneOffset()-Qe.getTimezoneOffset())*s)/u},function(Qe){return Qe.getDate()-1}),C=p.range;function E(Qe){return n(function(Et){Et.setDate(Et.getDate()-(Et.getDay()+7-Qe)%7),Et.setHours(0,0,0,0)},function(Et,er){Et.setDate(Et.getDate()+er*7)},function(Et,er){return(er-Et-(er.getTimezoneOffset()-Et.getTimezoneOffset())*s)/c})}var A=E(0),L=E(1),_=E(2),k=E(3),M=E(4),g=E(5),P=E(6),T=A.range,z=L.range,O=_.range,V=k.range,G=M.range,Z=g.range,H=P.range,N=n(function(Qe){Qe.setDate(1),Qe.setHours(0,0,0,0)},function(Qe,Et){Qe.setMonth(Qe.getMonth()+Et)},function(Qe,Et){return Et.getMonth()-Qe.getMonth()+(Et.getFullYear()-Qe.getFullYear())*12},function(Qe){return Qe.getMonth()}),j=N.range,re=n(function(Qe){Qe.setMonth(0,1),Qe.setHours(0,0,0,0)},function(Qe,Et){Qe.setFullYear(Qe.getFullYear()+Et)},function(Qe,Et){return Et.getFullYear()-Qe.getFullYear()},function(Qe){return Qe.getFullYear()});re.every=function(Qe){return!isFinite(Qe=Math.floor(Qe))||!(Qe>0)?null:n(function(Et){Et.setFullYear(Math.floor(Et.getFullYear()/Qe)*Qe),Et.setMonth(0,1),Et.setHours(0,0,0,0)},function(Et,er){Et.setFullYear(Et.getFullYear()+er*Qe)})};var oe=re.range,_e=n(function(Qe){Qe.setUTCSeconds(0,0)},function(Qe,Et){Qe.setTime(+Qe+Et*s)},function(Qe,Et){return(Et-Qe)/s},function(Qe){return Qe.getUTCMinutes()}),Me=_e.range,ke=n(function(Qe){Qe.setUTCMinutes(0,0,0)},function(Qe,Et){Qe.setTime(+Qe+Et*l)},function(Qe,Et){return(Et-Qe)/l},function(Qe){return Qe.getUTCHours()}),me=ke.range,ie=n(function(Qe){Qe.setUTCHours(0,0,0,0)},function(Qe,Et){Qe.setUTCDate(Qe.getUTCDate()+Et)},function(Qe,Et){return(Et-Qe)/u},function(Qe){return Qe.getUTCDate()-1}),Se=ie.range;function Le(Qe){return n(function(Et){Et.setUTCDate(Et.getUTCDate()-(Et.getUTCDay()+7-Qe)%7),Et.setUTCHours(0,0,0,0)},function(Et,er){Et.setUTCDate(Et.getUTCDate()+er*7)},function(Et,er){return(er-Et)/c})}var Ae=Le(0),De=Le(1),Pe=Le(2),ge=Le(3),Fe=Le(4),ce=Le(5),Ze=Le(6),ct=Ae.range,pt=De.range,Wt=Pe.range,st=ge.range,lt=Fe.range,Gt=ce.range,Nt=Ze.range,$t=n(function(Qe){Qe.setUTCDate(1),Qe.setUTCHours(0,0,0,0)},function(Qe,Et){Qe.setUTCMonth(Qe.getUTCMonth()+Et)},function(Qe,Et){return Et.getUTCMonth()-Qe.getUTCMonth()+(Et.getUTCFullYear()-Qe.getUTCFullYear())*12},function(Qe){return Qe.getUTCMonth()}),sr=$t.range,wr=n(function(Qe){Qe.setUTCMonth(0,1),Qe.setUTCHours(0,0,0,0)},function(Qe,Et){Qe.setUTCFullYear(Qe.getUTCFullYear()+Et)},function(Qe,Et){return Et.getUTCFullYear()-Qe.getUTCFullYear()},function(Qe){return Qe.getUTCFullYear()});wr.every=function(Qe){return!isFinite(Qe=Math.floor(Qe))||!(Qe>0)?null:n(function(Et){Et.setUTCFullYear(Math.floor(Et.getUTCFullYear()/Qe)*Qe),Et.setUTCMonth(0,1),Et.setUTCHours(0,0,0,0)},function(Et,er){Et.setUTCFullYear(Et.getUTCFullYear()+er*Qe)})};var ur=wr.range;e.timeDay=p,e.timeDays=C,e.timeFriday=g,e.timeFridays=Z,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=j,e.timeSaturday=P,e.timeSaturdays=H,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=A,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=G,e.timeTuesday=_,e.timeTuesdays=O,e.timeWednesday=k,e.timeWednesdays=V,e.timeWeek=A,e.timeWeeks=T,e.timeYear=re,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Gt,e.utcHour=ke,e.utcHours=me,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Me,e.utcMonday=De,e.utcMondays=pt,e.utcMonth=$t,e.utcMonths=sr,e.utcSaturday=Ze,e.utcSaturdays=Nt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=ct,e.utcThursday=Fe,e.utcThursdays=lt,e.utcTuesday=Pe,e.utcTuesdays=Wt,e.utcWednesday=ge,e.utcWednesdays=st,e.utcWeek=Ae,e.utcWeeks=ct,e.utcYear=wr,e.utcYears=ur,Object.defineProperty(e,\"__esModule\",{value:!0})})});var e3=ye((c6,pee)=>{(function(e,t){typeof c6==\"object\"&&typeof pee!=\"undefined\"?t(c6,mO()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(c6,function(e,t){\"use strict\";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,je){return{y:Ge,m:Je,d:je,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,je=Ge.date,$e=Ge.time,wt=Ge.periods,Ie=Ge.days,xe=Ge.shortDays,Ce=Ge.months,vt=Ge.shortMonths,nr=h(wt),ir=d(wt),pr=h(Ie),oi=d(Ie),di=h(xe),Jr=d(xe),fi=h(Ce),Hi=d(Ce),Pn=h(vt),wn=d(vt),pn={a:Ji,A:en,b:cn,B:yn,c:null,d:N,e:N,f:Me,H:j,I:re,j:oe,L:_e,m:ke,M:me,p:Mn,q:Ba,Q:yt,s:Yt,S:ie,u:Se,U:Le,V:Ae,w:De,W:Pe,x:null,X:null,y:ge,Y:Fe,Z:ce,\"%\":bt},Vn={a:la,A:ma,b:Wa,B:Fa,c:null,d:Ze,e:Ze,f:lt,H:ct,I:pt,j:Wt,L:st,m:Gt,M:Nt,p:Wo,q:da,Q:yt,s:Yt,S:$t,u:sr,U:wr,V:ur,w:Qe,W:Et,x:null,X:null,y:er,Y:Ut,Z:Ft,\"%\":bt},kn={a:tr,A:ar,b:Er,B:Zr,c:ri,d:M,e:M,f:V,H:P,I:P,j:g,L:O,m:k,M:T,p:_t,q:_,Q:Z,s:H,S:z,u:x,U:b,V:p,w:v,W:C,x:$r,X:zi,y:A,Y:E,Z:L,\"%\":G};pn.x=ea(je,pn),pn.X=ea($e,pn),pn.c=ea(Je,pn),Vn.x=ea(je,Vn),Vn.X=ea($e,Vn),Vn.c=ea(Je,Vn);function ea(Wn,Ga){return function(vo){var jn=[],St=-1,Cr=0,Qr=Wn.length,pi,fn,Sn;for(vo instanceof Date||(vo=new Date(+vo));++St<Qr;)Wn.charCodeAt(St)===37&&(jn.push(Wn.slice(Cr,St)),(fn=o[pi=Wn.charAt(++St)])!=null?pi=Wn.charAt(++St):fn=pi===\"e\"?\" \":\"0\",(Sn=Ga[pi])&&(pi=Sn(vo,fn)),jn.push(pi),Cr=St+1);return jn.push(Wn.slice(Cr,St)),jn.join(\"\")}}function ua(Wn,Ga){return function(vo){var jn=i(1900,void 0,1),St=Vt(jn,Wn,vo+=\"\",0),Cr,Qr;if(St!=vo.length)return null;if(\"Q\"in jn)return new Date(jn.Q);if(\"s\"in jn)return new Date(jn.s*1e3+(\"L\"in jn?jn.L:0));if(Ga&&!(\"Z\"in jn)&&(jn.Z=0),\"p\"in jn&&(jn.H=jn.H%12+jn.p*12),jn.m===void 0&&(jn.m=\"q\"in jn?jn.q:0),\"V\"in jn){if(jn.V<1||jn.V>53)return null;\"w\"in jn||(jn.w=1),\"Z\"in jn?(Cr=n(i(jn.y,0,1)),Qr=Cr.getUTCDay(),Cr=Qr>4||Qr===0?t.utcMonday.ceil(Cr):t.utcMonday(Cr),Cr=t.utcDay.offset(Cr,(jn.V-1)*7),jn.y=Cr.getUTCFullYear(),jn.m=Cr.getUTCMonth(),jn.d=Cr.getUTCDate()+(jn.w+6)%7):(Cr=r(i(jn.y,0,1)),Qr=Cr.getDay(),Cr=Qr>4||Qr===0?t.timeMonday.ceil(Cr):t.timeMonday(Cr),Cr=t.timeDay.offset(Cr,(jn.V-1)*7),jn.y=Cr.getFullYear(),jn.m=Cr.getMonth(),jn.d=Cr.getDate()+(jn.w+6)%7)}else(\"W\"in jn||\"U\"in jn)&&(\"w\"in jn||(jn.w=\"u\"in jn?jn.u%7:\"W\"in jn?1:0),Qr=\"Z\"in jn?n(i(jn.y,0,1)).getUTCDay():r(i(jn.y,0,1)).getDay(),jn.m=0,jn.d=\"W\"in jn?(jn.w+6)%7+jn.W*7-(Qr+5)%7:jn.w+jn.U*7-(Qr+6)%7);return\"Z\"in jn?(jn.H+=jn.Z/100|0,jn.M+=jn.Z%100,n(jn)):r(jn)}}function Vt(Wn,Ga,vo,jn){for(var St=0,Cr=Ga.length,Qr=vo.length,pi,fn;St<Cr;){if(jn>=Qr)return-1;if(pi=Ga.charCodeAt(St++),pi===37){if(pi=Ga.charAt(St++),fn=kn[pi in o?Ga.charAt(St++):pi],!fn||(jn=fn(Wn,vo,jn))<0)return-1}else if(pi!=vo.charCodeAt(jn++))return-1}return jn}function _t(Wn,Ga,vo){var jn=nr.exec(Ga.slice(vo));return jn?(Wn.p=ir[jn[0].toLowerCase()],vo+jn[0].length):-1}function tr(Wn,Ga,vo){var jn=di.exec(Ga.slice(vo));return jn?(Wn.w=Jr[jn[0].toLowerCase()],vo+jn[0].length):-1}function ar(Wn,Ga,vo){var jn=pr.exec(Ga.slice(vo));return jn?(Wn.w=oi[jn[0].toLowerCase()],vo+jn[0].length):-1}function Er(Wn,Ga,vo){var jn=Pn.exec(Ga.slice(vo));return jn?(Wn.m=wn[jn[0].toLowerCase()],vo+jn[0].length):-1}function Zr(Wn,Ga,vo){var jn=fi.exec(Ga.slice(vo));return jn?(Wn.m=Hi[jn[0].toLowerCase()],vo+jn[0].length):-1}function ri(Wn,Ga,vo){return Vt(Wn,Je,Ga,vo)}function $r(Wn,Ga,vo){return Vt(Wn,je,Ga,vo)}function zi(Wn,Ga,vo){return Vt(Wn,$e,Ga,vo)}function Ji(Wn){return xe[Wn.getDay()]}function en(Wn){return Ie[Wn.getDay()]}function cn(Wn){return vt[Wn.getMonth()]}function yn(Wn){return Ce[Wn.getMonth()]}function Mn(Wn){return wt[+(Wn.getHours()>=12)]}function Ba(Wn){return 1+~~(Wn.getMonth()/3)}function la(Wn){return xe[Wn.getUTCDay()]}function ma(Wn){return Ie[Wn.getUTCDay()]}function Wa(Wn){return vt[Wn.getUTCMonth()]}function Fa(Wn){return Ce[Wn.getUTCMonth()]}function Wo(Wn){return wt[+(Wn.getUTCHours()>=12)]}function da(Wn){return 1+~~(Wn.getUTCMonth()/3)}return{format:function(Wn){var Ga=ea(Wn+=\"\",pn);return Ga.toString=function(){return Wn},Ga},parse:function(Wn){var Ga=ua(Wn+=\"\",!1);return Ga.toString=function(){return Wn},Ga},utcFormat:function(Wn){var Ga=ea(Wn+=\"\",Vn);return Ga.toString=function(){return Wn},Ga},utcParse:function(Wn){var Ga=ua(Wn+=\"\",!0);return Ga.toString=function(){return Wn},Ga}}}var o={\"-\":\"\",_:\" \",0:\"0\"},s=/^\\s*\\d+/,l=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function c(Ge,Je,je){var $e=Ge<0?\"-\":\"\",wt=($e?-Ge:Ge)+\"\",Ie=wt.length;return $e+(Ie<je?new Array(je-Ie+1).join(Je)+wt:wt)}function f(Ge){return Ge.replace(u,\"\\\\$&\")}function h(Ge){return new RegExp(\"^(?:\"+Ge.map(f).join(\"|\")+\")\",\"i\")}function d(Ge){for(var Je={},je=-1,$e=Ge.length;++je<$e;)Je[Ge[je].toLowerCase()]=je;return Je}function v(Ge,Je,je){var $e=s.exec(Je.slice(je,je+1));return $e?(Ge.w=+$e[0],je+$e[0].length):-1}function x(Ge,Je,je){var $e=s.exec(Je.slice(je,je+1));return $e?(Ge.u=+$e[0],je+$e[0].length):-1}function b(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.U=+$e[0],je+$e[0].length):-1}function p(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.V=+$e[0],je+$e[0].length):-1}function C(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.W=+$e[0],je+$e[0].length):-1}function E(Ge,Je,je){var $e=s.exec(Je.slice(je,je+4));return $e?(Ge.y=+$e[0],je+$e[0].length):-1}function A(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.y=+$e[0]+(+$e[0]>68?1900:2e3),je+$e[0].length):-1}function L(Ge,Je,je){var $e=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(Je.slice(je,je+6));return $e?(Ge.Z=$e[1]?0:-($e[2]+($e[3]||\"00\")),je+$e[0].length):-1}function _(Ge,Je,je){var $e=s.exec(Je.slice(je,je+1));return $e?(Ge.q=$e[0]*3-3,je+$e[0].length):-1}function k(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.m=$e[0]-1,je+$e[0].length):-1}function M(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.d=+$e[0],je+$e[0].length):-1}function g(Ge,Je,je){var $e=s.exec(Je.slice(je,je+3));return $e?(Ge.m=0,Ge.d=+$e[0],je+$e[0].length):-1}function P(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.H=+$e[0],je+$e[0].length):-1}function T(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.M=+$e[0],je+$e[0].length):-1}function z(Ge,Je,je){var $e=s.exec(Je.slice(je,je+2));return $e?(Ge.S=+$e[0],je+$e[0].length):-1}function O(Ge,Je,je){var $e=s.exec(Je.slice(je,je+3));return $e?(Ge.L=+$e[0],je+$e[0].length):-1}function V(Ge,Je,je){var $e=s.exec(Je.slice(je,je+6));return $e?(Ge.L=Math.floor($e[0]/1e3),je+$e[0].length):-1}function G(Ge,Je,je){var $e=l.exec(Je.slice(je,je+1));return $e?je+$e[0].length:-1}function Z(Ge,Je,je){var $e=s.exec(Je.slice(je));return $e?(Ge.Q=+$e[0],je+$e[0].length):-1}function H(Ge,Je,je){var $e=s.exec(Je.slice(je));return $e?(Ge.s=+$e[0],je+$e[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function j(Ge,Je){return c(Ge.getHours(),Je,2)}function re(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function Me(Ge,Je){return _e(Ge,Je)+\"000\"}function ke(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function me(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Le(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function Ae(Ge,Je){var je=Ge.getDay();return Ge=je>=4||je===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function De(Ge){return Ge.getDay()}function Pe(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function ge(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function Fe(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?\"-\":(Je*=-1,\"+\"))+c(Je/60|0,\"0\",2)+c(Je%60,\"0\",2)}function Ze(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function ct(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function pt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Wt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function st(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function lt(Ge,Je){return st(Ge,Je)+\"000\"}function Gt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Nt(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function $t(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function sr(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function wr(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function ur(Ge,Je){var je=Ge.getUTCDay();return Ge=je>=4||je===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function Qe(Ge){return Ge.getUTCDay()}function Et(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function er(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Ut(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function Ft(){return\"+0000\"}function bt(){return\"%\"}function yt(Ge){return+Ge}function Yt(Ge){return Math.floor(+Ge/1e3)}var lr;Tr({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});function Tr(Ge){return lr=a(Ge),e.timeFormat=lr.format,e.timeParse=lr.parse,e.utcFormat=lr.utcFormat,e.utcParse=lr.utcParse,lr}var Rr=\"%Y-%m-%dT%H:%M:%S.%LZ\";function ei(Ge){return Ge.toISOString()}var Wr=Date.prototype.toISOString?ei:e.utcFormat(Rr);function Ur(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var dt=+new Date(\"2000-01-01T00:00:00.000Z\")?Ur:e.utcParse(Rr);e.isoFormat=Wr,e.isoParse=dt,e.timeFormatDefaultLocale=Tr,e.timeFormatLocale=a,Object.defineProperty(e,\"__esModule\",{value:!0})})});var yO=ye((f6,gee)=>{(function(e,t){typeof f6==\"object\"&&typeof gee!=\"undefined\"?t(f6):(e=typeof globalThis!=\"undefined\"?globalThis:e||self,t(e.d3=e.d3||{}))})(f6,function(e){\"use strict\";function t(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString(\"en\").replace(/,/g,\"\"):k.toString(10)}function r(k,M){if((g=(k=M?k.toExponential(M-1):k.toExponential()).indexOf(\"e\"))<0)return null;var g,P=k.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+k.slice(g+1)]}function n(k){return k=r(Math.abs(k)),k?k[1]:NaN}function i(k,M){return function(g,P){for(var T=g.length,z=[],O=0,V=k[0],G=0;T>0&&V>0&&(G+V+1>P&&(V=Math.max(1,P-G)),z.push(g.substring(T-=V,T+V)),!((G+=V+1)>P));)V=k[O=(O+1)%k.length];return z.reverse().join(M)}}function a(k){return function(M){return M.replace(/[0-9]/g,function(g){return k[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function s(k){if(!(M=o.exec(k)))throw new Error(\"invalid format: \"+k);var M;return new l({fill:M[1],align:M[2],sign:M[3],symbol:M[4],zero:M[5],width:M[6],comma:M[7],precision:M[8]&&M[8].slice(1),trim:M[9],type:M[10]})}s.prototype=l.prototype;function l(k){this.fill=k.fill===void 0?\" \":k.fill+\"\",this.align=k.align===void 0?\">\":k.align+\"\",this.sign=k.sign===void 0?\"-\":k.sign+\"\",this.symbol=k.symbol===void 0?\"\":k.symbol+\"\",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?\"\":k.type+\"\"}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(this.width===void 0?\"\":Math.max(1,this.width|0))+(this.comma?\",\":\"\")+(this.precision===void 0?\"\":\".\"+Math.max(0,this.precision|0))+(this.trim?\"~\":\"\")+this.type};function u(k){e:for(var M=k.length,g=1,P=-1,T;g<M;++g)switch(k[g]){case\".\":P=T=g;break;case\"0\":P===0&&(P=g),T=g;break;default:if(!+k[g])break e;P>0&&(P=0);break}return P>0?k.slice(0,P)+k.slice(T+1):k}var c;function f(k,M){var g=r(k,M);if(!g)return k+\"\";var P=g[0],T=g[1],z=T-(c=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,O=P.length;return z===O?P:z>O?P+new Array(z-O+1).join(\"0\"):z>0?P.slice(0,z)+\".\"+P.slice(z):\"0.\"+new Array(1-z).join(\"0\")+r(k,Math.max(0,M+z-1))[0]}function h(k,M){var g=r(k,M);if(!g)return k+\"\";var P=g[0],T=g[1];return T<0?\"0.\"+new Array(-T).join(\"0\")+P:P.length>T+1?P.slice(0,T+1)+\".\"+P.slice(T+1):P+new Array(T-P.length+2).join(\"0\")}var d={\"%\":function(k,M){return(k*100).toFixed(M)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+\"\"},d:t,e:function(k,M){return k.toExponential(M)},f:function(k,M){return k.toFixed(M)},g:function(k,M){return k.toPrecision(M)},o:function(k){return Math.round(k).toString(8)},p:function(k,M){return h(k*100,M)},r:h,s:f,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function v(k){return k}var x=Array.prototype.map,b=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xB5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(k){var M=k.grouping===void 0||k.thousands===void 0?v:i(x.call(k.grouping,Number),k.thousands+\"\"),g=k.currency===void 0?\"\":k.currency[0]+\"\",P=k.currency===void 0?\"\":k.currency[1]+\"\",T=k.decimal===void 0?\".\":k.decimal+\"\",z=k.numerals===void 0?v:a(x.call(k.numerals,String)),O=k.percent===void 0?\"%\":k.percent+\"\",V=k.minus===void 0?\"-\":k.minus+\"\",G=k.nan===void 0?\"NaN\":k.nan+\"\";function Z(N){N=s(N);var j=N.fill,re=N.align,oe=N.sign,_e=N.symbol,Me=N.zero,ke=N.width,me=N.comma,ie=N.precision,Se=N.trim,Le=N.type;Le===\"n\"?(me=!0,Le=\"g\"):d[Le]||(ie===void 0&&(ie=12),Se=!0,Le=\"g\"),(Me||j===\"0\"&&re===\"=\")&&(Me=!0,j=\"0\",re=\"=\");var Ae=_e===\"$\"?g:_e===\"#\"&&/[boxX]/.test(Le)?\"0\"+Le.toLowerCase():\"\",De=_e===\"$\"?P:/[%p]/.test(Le)?O:\"\",Pe=d[Le],ge=/[defgprs%]/.test(Le);ie=ie===void 0?6:/[gprs]/.test(Le)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function Fe(ce){var Ze=Ae,ct=De,pt,Wt,st;if(Le===\"c\")ct=Pe(ce)+ct,ce=\"\";else{ce=+ce;var lt=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Pe(Math.abs(ce),ie),Se&&(ce=u(ce)),lt&&+ce==0&&oe!==\"+\"&&(lt=!1),Ze=(lt?oe===\"(\"?oe:V:oe===\"-\"||oe===\"(\"?\"\":oe)+Ze,ct=(Le===\"s\"?b[8+c/3]:\"\")+ct+(lt&&oe===\"(\"?\")\":\"\"),ge){for(pt=-1,Wt=ce.length;++pt<Wt;)if(st=ce.charCodeAt(pt),48>st||st>57){ct=(st===46?T+ce.slice(pt+1):ce.slice(pt))+ct,ce=ce.slice(0,pt);break}}}me&&!Me&&(ce=M(ce,1/0));var Gt=Ze.length+ce.length+ct.length,Nt=Gt<ke?new Array(ke-Gt+1).join(j):\"\";switch(me&&Me&&(ce=M(Nt+ce,Nt.length?ke-ct.length:1/0),Nt=\"\"),re){case\"<\":ce=Ze+ce+ct+Nt;break;case\"=\":ce=Ze+Nt+ce+ct;break;case\"^\":ce=Nt.slice(0,Gt=Nt.length>>1)+Ze+ce+ct+Nt.slice(Gt);break;default:ce=Nt+Ze+ce+ct;break}return z(ce)}return Fe.toString=function(){return N+\"\"},Fe}function H(N,j){var re=Z((N=s(N),N.type=\"f\",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(j)/3)))*3,_e=Math.pow(10,-oe),Me=b[8+oe/3];return function(ke){return re(_e*ke)+Me}}return{format:Z,formatPrefix:H}}var C;E({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"});function E(k){return C=p(k),e.format=C.format,e.formatPrefix=C.formatPrefix,C}function A(k){return Math.max(0,-n(Math.abs(k)))}function L(k,M){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(M)/3)))*3-n(Math.abs(k)))}function _(k,M){return k=Math.abs(k),M=Math.abs(M)-k,Math.max(0,n(M)-n(k))+1}e.FormatSpecifier=l,e.formatDefaultLocale=E,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=A,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,\"__esModule\",{value:!0})})});var yee=ye((utr,mee)=>{\"use strict\";mee.exports=function(e){for(var t=e.length,r,n=0;n<t;n++)if(r=e.charCodeAt(n),(r<9||r>13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((ctr,_ee)=>{\"use strict\";var Zet=yee();_ee.exports=function(e){var t=typeof e;if(t===\"string\"){var r=e;if(e=+e,e===0&&Zet(r))return!1}else if(t!==\"number\")return!1;return e-e<1}});var hs=ye((ftr,xee)=>{\"use strict\";xee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}});var _O=ye((h6,bee)=>{(function(e,t){typeof h6==\"object\"&&typeof bee!=\"undefined\"?t(h6):(e=typeof globalThis!=\"undefined\"?globalThis:e||self,t(e[\"base64-arraybuffer\"]={}))})(h6,function(e){\"use strict\";for(var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",r=typeof Uint8Array==\"undefined\"?[]:new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;var i=function(o){var s=new Uint8Array(o),l,u=s.length,c=\"\";for(l=0;l<u;l+=3)c+=t[s[l]>>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+\"=\":u%3===1&&(c=c.substring(0,c.length-2)+\"==\"),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]===\"=\"&&(s--,o[o.length-2]===\"=\"&&s--);var x=new ArrayBuffer(s),b=new Uint8Array(x);for(u=0;u<l;u+=4)f=r[o.charCodeAt(u)],h=r[o.charCodeAt(u+1)],d=r[o.charCodeAt(u+2)],v=r[o.charCodeAt(u+3)],b[c++]=f<<2|h>>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,\"__esModule\",{value:!0})})});var gy=ye((htr,wee)=>{\"use strict\";wee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)===\"[object Object]\":Object.prototype.toString.call(t)===\"[object Object]\"&&Object.getPrototypeOf(t).hasOwnProperty(\"hasOwnProperty\")}});var vv=ye(mg=>{\"use strict\";var Yet=_O().decode,Ket=gy(),xO=Array.isArray,Jet=ArrayBuffer,$et=DataView;function Tee(e){return Jet.isView(e)&&!(e instanceof $et)}mg.isTypedArray=Tee;function d6(e){return xO(e)||Tee(e)}mg.isArrayOrTypedArray=d6;function Qet(e){return!d6(e[0])}mg.isArray1D=Qet;mg.ensureArray=function(e,t){return xO(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray==\"undefined\"?void 0:Uint8ClampedArray,i1:typeof Int8Array==\"undefined\"?void 0:Int8Array,u1:typeof Uint8Array==\"undefined\"?void 0:Uint8Array,i2:typeof Int16Array==\"undefined\"?void 0:Int16Array,u2:typeof Uint16Array==\"undefined\"?void 0:Uint16Array,i4:typeof Int32Array==\"undefined\"?void 0:Int32Array,u4:typeof Uint32Array==\"undefined\"?void 0:Uint32Array,f4:typeof Float32Array==\"undefined\"?void 0:Float32Array,f8:typeof Float64Array==\"undefined\"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function bO(e){return e.constructor===ArrayBuffer}mg.isArrayBuffer=bO;mg.decodeTypedArraySpec=function(e){var t=[],r=ett(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: \"'+n+'\"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;bO(o)||(o=Yet(o));var s=r.shape===void 0?[o.byteLength/a]:(\"\"+r.shape).split(\",\");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c<u;c++)t[c]=new i(o,d,f),d+=h;else if(l===3){u=+s[1];for(var v=+s[2],x=0;x<v;x++)for(t[x]=[],c=0;c<u;c++)t[x][c]=new i(o,d,f),d+=h}else throw new Error(\"ndim: \"+l+'is not supported with the shape:\"'+r.shape+'\"');return t.bdata=r.bdata,t.dtype=r.dtype,t.shape=s.reverse().join(\",\"),e._inputArray=t,t};mg.isTypedArraySpec=function(e){return Ket(e)&&e.hasOwnProperty(\"dtype\")&&typeof e.dtype==\"string\"&&e.hasOwnProperty(\"bdata\")&&(typeof e.bdata==\"string\"||bO(e.bdata))&&(e.shape===void 0||e.hasOwnProperty(\"shape\")&&(typeof e.shape==\"string\"||typeof e.shape==\"number\"))};function ett(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}mg.concat=function(){var e=[],t=!0,r=0,n,i,a,o,s,l,u,c;for(a=0;a<arguments.length;a++)o=arguments[a],l=o.length,l&&(i?e.push(o):(i=o,s=l),xO(o)?n=!1:(t=!1,r?n!==o.constructor&&(n=!1):n=o.constructor),r+=l);if(!r)return[];if(!e.length)return i;if(t)return i.concat.apply(i,e);if(n){for(u=new n(r),u.set(i),a=0;a<e.length;a++)o=e[a],u.set(o,s),s+=o.length;return u}for(u=new Array(r),c=0;c<i.length;c++)u[c]=i[c];for(a=0;a<e.length;a++){for(o=e[a],c=0;c<o.length;c++)u[s+c]=o[c];s+=c}return u};mg.maxRowLength=function(e){return Aee(e,Math.max,0)};mg.minRowLength=function(e){return Aee(e,Math.min,1/0)};function Aee(e,t,r){if(d6(e))if(d6(e[0])){for(var n=r,i=0;i<e.length;i++)n=t(n,e[i].length);return n}else return e.length;return 0}});var CS=ye((vtr,kee)=>{\"use strict\";var See=Eo(),TO=vv().isArrayOrTypedArray;kee.exports=function(t,r){if(See(r))r=String(r);else if(typeof r!=\"string\"||r.substr(r.length-4)===\"[-1]\")throw\"bad property string\";var n=r.split(\".\"),i,a,o,s;for(s=0;s<n.length;s++)if(String(n[s]).slice(0,2)===\"__\")throw\"bad property string\";for(s=0;s<n.length;){if(i=String(n[s]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/),i){if(i[1])n[s]=i[1];else if(s===0)n.splice(0,1);else throw\"bad property string\";for(a=i[2].substr(1,i[2].length-2).split(\"][\"),o=0;o<a.length;o++)s++,n.splice(s,0,Number(a[o]))}s++}return typeof t!=\"object\"?ntt(t,r,n):{set:Eee(t,n,r),get:Mee(t,n),astr:r,parts:n,obj:t}};function Mee(e,t){return function(r){var n=e,i,a,o,s,l;for(s=0;s<t.length-1;s++){if(i=t[s],i===-1){for(a=!0,o=[],l=0;l<n.length;l++)o[l]=Mee(n[l],t.slice(s+1))(r),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(typeof i==\"number\"&&!TO(n)||(n=n[i],typeof n!=\"object\"||n===null))return}if(!(typeof n!=\"object\"||n===null)&&(o=n[t[s]],!(!r&&o===null)))return o}}var ttt=/(^|\\.)args\\[/;function wO(e,t){return e===void 0||e===null&&!t.match(ttt)}function Eee(e,t,r){return function(n){var i=e,a=\"\",o=[[e,a]],s=wO(n,r),l,u;for(u=0;u<t.length-1;u++){if(l=t[u],typeof l==\"number\"&&!TO(i))throw\"array index but container is not an array\";if(l===-1){if(s=!itt(i,t.slice(u+1),n,r),s)break;return}if(!Cee(i,l,t[u+1],s))break;if(i=i[l],typeof i!=\"object\"||i===null)throw\"container is not an object\";a=rtt(a,l),o.push([i,a])}if(s){if(u===t.length-1&&(delete i[t[u]],Array.isArray(i)&&+t[u]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[t[u]]=n}}function rtt(e,t){var r=t;return See(t)?r=\"[\"+t+\"]\":e&&(r=\".\"+t),e+r}function itt(e,t,r,n){var i=TO(r),a=!0,o=r,s=n.replace(\"-1\",0),l=i?!1:wO(r,s),u=t[0],c;for(c=0;c<e.length;c++)s=n.replace(\"-1\",c),i&&(o=r[c%r.length],l=wO(o,s)),l&&(a=!1),Cee(e,c,u,l)&&Eee(e[c],t,n.replace(\"-1\",c))(o);return a}function Cee(e,t,r,n){if(e[t]===void 0){if(n)return!1;typeof r==\"number\"?e[t]=[]:e[t]={}}return!0}function ntt(e,t,r){return{set:function(){throw\"bad container\"},get:function(){},astr:t,parts:r,obj:e}}});var Ree=ye((ptr,Iee)=>{\"use strict\";var t3=CS(),att=/^\\w*$/,ott=0,Lee=1,v6=2,Pee=3,ob=4;Iee.exports=function(t,r,n,i){n=n||\"name\",i=i||\"value\";var a,o,s,l={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||\"\";var u={};if(o)for(a=0;a<o.length;a++)u[o[a][n]]=a;var c=att.test(i),f={set:function(h,d){var v=d===null?ob:ott;if(!o){if(!s||v===ob)return;o=[],s.set(o)}var x=u[h];if(x===void 0){if(v===ob)return;v=v|Pee,x=o.length,u[h]=x}else d!==(c?o[x][i]:t3(o[x],i).get())&&(v=v|v6);var b=o[x]=o[x]||{};return b[n]=h,c?b[i]=d:t3(b,i).set(d),d!==null&&(v=v&~ob),l[x]=l[x]|v,f},get:function(h){if(o){var d=u[h];if(d!==void 0)return c?o[d][i]:t3(o[d],i).get()}},rename:function(h,d){var v=u[h];return v===void 0||(l[v]=l[v]|Lee,u[d]=v,delete u[h],o[v][n]=d),f},remove:function(h){var d=u[h];if(d===void 0)return f;var v=o[d];if(Object.keys(v).length>2)return l[d]=l[d]|v6,f.set(h,null);if(c){for(a=d;a<o.length;a++)l[a]=l[a]|Pee;for(a=d;a<o.length;a++)u[o[a][n]]--;o.splice(d,1),delete u[h]}else t3(v,i).set(null),l[d]=l[d]|v6|ob;return f},constructUpdate:function(){for(var h,d,v={},x=Object.keys(l),b=0;b<x.length;b++)d=x[b],h=r+\"[\"+d+\"]\",o[d]?(l[d]&Lee&&(v[h+\".\"+n]=o[d][n]),l[d]&v6&&(c?v[h+\".\"+i]=l[d]&ob?null:o[d][i]:v[h+\".\"+i]=l[d]&ob?null:t3(o[d],i).get())):v[h]=null;return v}};return f}});var Fee=ye((gtr,Dee)=>{\"use strict\";var stt=/^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/,ltt=/^[^\\.\\[\\]]+$/;Dee.exports=function(e,t){for(;t;){var r=e.match(stt);if(r)e=r[1];else if(e.match(ltt))e=\"\";else throw new Error(\"bad relativeAttr call:\"+[e,t]);if(t.charAt(0)===\"^\")t=t.slice(1);else break}return e&&t.charAt(0)!==\"[\"?e+\".\"+t:e+t}});var p6=ye((mtr,zee)=>{\"use strict\";var utt=Eo();zee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return utt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Bee=ye((ytr,qee)=>{\"use strict\";var Oee=vv().isArrayOrTypedArray,kS=gy();qee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)===\"_\"||typeof i==\"function\"){if(n in t)continue;t[n]=i}else if(Oee(i)&&Oee(a)&&kS(i[0])){if(n===\"customdata\"||n===\"ids\")continue;for(var o=Math.min(i.length,a.length),s=0;s<o;s++)a[s]!==i[s]&&kS(i[s])&&kS(a[s])&&e(a[s],i[s])}else kS(i)&&kS(a)&&(e(a,i),Object.keys(a).length||delete t[n])}}});var r3=ye((_tr,Nee)=>{\"use strict\";function ctt(e,t){var r=e%t;return r<0?r+t:r}function ftt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Nee.exports={mod:ctt,modHalf:ftt}});var cd=ye((xtr,g6)=>{(function(e){var t=/^\\s+/,r=/\\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(ge,Fe){if(ge=ge||\"\",Fe=Fe||{},ge instanceof l)return ge;if(!(this instanceof l))return new l(ge,Fe);var ce=u(ge);this._originalInput=ge,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=Fe.format||ce.format,this._gradientType=Fe.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ge=this.toRgb();return(ge.r*299+ge.g*587+ge.b*114)/1e3},getLuminance:function(){var ge=this.toRgb(),Fe,ce,Ze,ct,pt,Wt;return Fe=ge.r/255,ce=ge.g/255,Ze=ge.b/255,Fe<=.03928?ct=Fe/12.92:ct=e.pow((Fe+.055)/1.055,2.4),ce<=.03928?pt=ce/12.92:pt=e.pow((ce+.055)/1.055,2.4),Ze<=.03928?Wt=Ze/12.92:Wt=e.pow((Ze+.055)/1.055,2.4),.2126*ct+.7152*pt+.0722*Wt},setAlpha:function(ge){return this._a=N(ge),this._roundA=i(100*this._a)/100,this},toHsv:function(){var ge=d(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,v:ge.v,a:this._a}},toHsvString:function(){var ge=d(this._r,this._g,this._b),Fe=i(ge.h*360),ce=i(ge.s*100),Ze=i(ge.v*100);return this._a==1?\"hsv(\"+Fe+\", \"+ce+\"%, \"+Ze+\"%)\":\"hsva(\"+Fe+\", \"+ce+\"%, \"+Ze+\"%, \"+this._roundA+\")\"},toHsl:function(){var ge=f(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,l:ge.l,a:this._a}},toHslString:function(){var ge=f(this._r,this._g,this._b),Fe=i(ge.h*360),ce=i(ge.s*100),Ze=i(ge.l*100);return this._a==1?\"hsl(\"+Fe+\", \"+ce+\"%, \"+Ze+\"%)\":\"hsla(\"+Fe+\", \"+ce+\"%, \"+Ze+\"%, \"+this._roundA+\")\"},toHex:function(ge){return x(this._r,this._g,this._b,ge)},toHexString:function(ge){return\"#\"+this.toHex(ge)},toHex8:function(ge){return b(this._r,this._g,this._b,this._a,ge)},toHex8String:function(ge){return\"#\"+this.toHex8(ge)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?\"rgb(\"+i(this._r)+\", \"+i(this._g)+\", \"+i(this._b)+\")\":\"rgba(\"+i(this._r)+\", \"+i(this._g)+\", \"+i(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:i(j(this._r,255)*100)+\"%\",g:i(j(this._g,255)*100)+\"%\",b:i(j(this._b,255)*100)+\"%\",a:this._a}},toPercentageRgbString:function(){return this._a==1?\"rgb(\"+i(j(this._r,255)*100)+\"%, \"+i(j(this._g,255)*100)+\"%, \"+i(j(this._b,255)*100)+\"%)\":\"rgba(\"+i(j(this._r,255)*100)+\"%, \"+i(j(this._g,255)*100)+\"%, \"+i(j(this._b,255)*100)+\"%, \"+this._roundA+\")\"},toName:function(){return this._a===0?\"transparent\":this._a<1?!1:Z[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(ge){var Fe=\"#\"+p(this._r,this._g,this._b,this._a),ce=Fe,Ze=this._gradientType?\"GradientType = 1, \":\"\";if(ge){var ct=l(ge);ce=\"#\"+p(ct._r,ct._g,ct._b,ct._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+Ze+\"startColorstr=\"+Fe+\",endColorstr=\"+ce+\")\"},toString:function(ge){var Fe=!!ge;ge=ge||this._format;var ce=!1,Ze=this._a<1&&this._a>=0,ct=!Fe&&Ze&&(ge===\"hex\"||ge===\"hex6\"||ge===\"hex3\"||ge===\"hex4\"||ge===\"hex8\"||ge===\"name\");return ct?ge===\"name\"&&this._a===0?this.toName():this.toRgbString():(ge===\"rgb\"&&(ce=this.toRgbString()),ge===\"prgb\"&&(ce=this.toPercentageRgbString()),(ge===\"hex\"||ge===\"hex6\")&&(ce=this.toHexString()),ge===\"hex3\"&&(ce=this.toHexString(!0)),ge===\"hex4\"&&(ce=this.toHex8String(!0)),ge===\"hex8\"&&(ce=this.toHex8String()),ge===\"name\"&&(ce=this.toName()),ge===\"hsl\"&&(ce=this.toHslString()),ge===\"hsv\"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(ge,Fe){var ce=ge.apply(null,[this].concat([].slice.call(Fe)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(ge,Fe){return ge.apply(null,[this].concat([].slice.call(Fe)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(ge,Fe){if(typeof ge==\"object\"){var ce={};for(var Ze in ge)ge.hasOwnProperty(Ze)&&(Ze===\"a\"?ce[Ze]=ge[Ze]:ce[Ze]=me(ge[Ze]));ge=ce}return l(ge,Fe)};function u(ge){var Fe={r:0,g:0,b:0},ce=1,Ze=null,ct=null,pt=null,Wt=!1,st=!1;return typeof ge==\"string\"&&(ge=De(ge)),typeof ge==\"object\"&&(Ae(ge.r)&&Ae(ge.g)&&Ae(ge.b)?(Fe=c(ge.r,ge.g,ge.b),Wt=!0,st=String(ge.r).substr(-1)===\"%\"?\"prgb\":\"rgb\"):Ae(ge.h)&&Ae(ge.s)&&Ae(ge.v)?(Ze=me(ge.s),ct=me(ge.v),Fe=v(ge.h,Ze,ct),Wt=!0,st=\"hsv\"):Ae(ge.h)&&Ae(ge.s)&&Ae(ge.l)&&(Ze=me(ge.s),pt=me(ge.l),Fe=h(ge.h,Ze,pt),Wt=!0,st=\"hsl\"),ge.hasOwnProperty(\"a\")&&(ce=ge.a)),ce=N(ce),{ok:Wt,format:ge.format||st,r:a(255,o(Fe.r,0)),g:a(255,o(Fe.g,0)),b:a(255,o(Fe.b,0)),a:ce}}function c(ge,Fe,ce){return{r:j(ge,255)*255,g:j(Fe,255)*255,b:j(ce,255)*255}}function f(ge,Fe,ce){ge=j(ge,255),Fe=j(Fe,255),ce=j(ce,255);var Ze=o(ge,Fe,ce),ct=a(ge,Fe,ce),pt,Wt,st=(Ze+ct)/2;if(Ze==ct)pt=Wt=0;else{var lt=Ze-ct;switch(Wt=st>.5?lt/(2-Ze-ct):lt/(Ze+ct),Ze){case ge:pt=(Fe-ce)/lt+(Fe<ce?6:0);break;case Fe:pt=(ce-ge)/lt+2;break;case ce:pt=(ge-Fe)/lt+4;break}pt/=6}return{h:pt,s:Wt,l:st}}function h(ge,Fe,ce){var Ze,ct,pt;ge=j(ge,360),Fe=j(Fe,100),ce=j(ce,100);function Wt(Gt,Nt,$t){return $t<0&&($t+=1),$t>1&&($t-=1),$t<1/6?Gt+(Nt-Gt)*6*$t:$t<1/2?Nt:$t<2/3?Gt+(Nt-Gt)*(2/3-$t)*6:Gt}if(Fe===0)Ze=ct=pt=ce;else{var st=ce<.5?ce*(1+Fe):ce+Fe-ce*Fe,lt=2*ce-st;Ze=Wt(lt,st,ge+1/3),ct=Wt(lt,st,ge),pt=Wt(lt,st,ge-1/3)}return{r:Ze*255,g:ct*255,b:pt*255}}function d(ge,Fe,ce){ge=j(ge,255),Fe=j(Fe,255),ce=j(ce,255);var Ze=o(ge,Fe,ce),ct=a(ge,Fe,ce),pt,Wt,st=Ze,lt=Ze-ct;if(Wt=Ze===0?0:lt/Ze,Ze==ct)pt=0;else{switch(Ze){case ge:pt=(Fe-ce)/lt+(Fe<ce?6:0);break;case Fe:pt=(ce-ge)/lt+2;break;case ce:pt=(ge-Fe)/lt+4;break}pt/=6}return{h:pt,s:Wt,v:st}}function v(ge,Fe,ce){ge=j(ge,360)*6,Fe=j(Fe,100),ce=j(ce,100);var Ze=e.floor(ge),ct=ge-Ze,pt=ce*(1-Fe),Wt=ce*(1-ct*Fe),st=ce*(1-(1-ct)*Fe),lt=Ze%6,Gt=[ce,Wt,pt,pt,st,ce][lt],Nt=[st,ce,ce,Wt,pt,pt][lt],$t=[pt,pt,st,ce,ce,Wt][lt];return{r:Gt*255,g:Nt*255,b:$t*255}}function x(ge,Fe,ce,Ze){var ct=[ke(i(ge).toString(16)),ke(i(Fe).toString(16)),ke(i(ce).toString(16))];return Ze&&ct[0].charAt(0)==ct[0].charAt(1)&&ct[1].charAt(0)==ct[1].charAt(1)&&ct[2].charAt(0)==ct[2].charAt(1)?ct[0].charAt(0)+ct[1].charAt(0)+ct[2].charAt(0):ct.join(\"\")}function b(ge,Fe,ce,Ze,ct){var pt=[ke(i(ge).toString(16)),ke(i(Fe).toString(16)),ke(i(ce).toString(16)),ke(ie(Ze))];return ct&&pt[0].charAt(0)==pt[0].charAt(1)&&pt[1].charAt(0)==pt[1].charAt(1)&&pt[2].charAt(0)==pt[2].charAt(1)&&pt[3].charAt(0)==pt[3].charAt(1)?pt[0].charAt(0)+pt[1].charAt(0)+pt[2].charAt(0)+pt[3].charAt(0):pt.join(\"\")}function p(ge,Fe,ce,Ze){var ct=[ke(ie(Ze)),ke(i(ge).toString(16)),ke(i(Fe).toString(16)),ke(i(ce).toString(16))];return ct.join(\"\")}l.equals=function(ge,Fe){return!ge||!Fe?!1:l(ge).toRgbString()==l(Fe).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})};function C(ge,Fe){Fe=Fe===0?0:Fe||10;var ce=l(ge).toHsl();return ce.s-=Fe/100,ce.s=re(ce.s),l(ce)}function E(ge,Fe){Fe=Fe===0?0:Fe||10;var ce=l(ge).toHsl();return ce.s+=Fe/100,ce.s=re(ce.s),l(ce)}function A(ge){return l(ge).desaturate(100)}function L(ge,Fe){Fe=Fe===0?0:Fe||10;var ce=l(ge).toHsl();return ce.l+=Fe/100,ce.l=re(ce.l),l(ce)}function _(ge,Fe){Fe=Fe===0?0:Fe||10;var ce=l(ge).toRgb();return ce.r=o(0,a(255,ce.r-i(255*-(Fe/100)))),ce.g=o(0,a(255,ce.g-i(255*-(Fe/100)))),ce.b=o(0,a(255,ce.b-i(255*-(Fe/100)))),l(ce)}function k(ge,Fe){Fe=Fe===0?0:Fe||10;var ce=l(ge).toHsl();return ce.l-=Fe/100,ce.l=re(ce.l),l(ce)}function M(ge,Fe){var ce=l(ge).toHsl(),Ze=(ce.h+Fe)%360;return ce.h=Ze<0?360+Ze:Ze,l(ce)}function g(ge){var Fe=l(ge).toHsl();return Fe.h=(Fe.h+180)%360,l(Fe)}function P(ge){var Fe=l(ge).toHsl(),ce=Fe.h;return[l(ge),l({h:(ce+120)%360,s:Fe.s,l:Fe.l}),l({h:(ce+240)%360,s:Fe.s,l:Fe.l})]}function T(ge){var Fe=l(ge).toHsl(),ce=Fe.h;return[l(ge),l({h:(ce+90)%360,s:Fe.s,l:Fe.l}),l({h:(ce+180)%360,s:Fe.s,l:Fe.l}),l({h:(ce+270)%360,s:Fe.s,l:Fe.l})]}function z(ge){var Fe=l(ge).toHsl(),ce=Fe.h;return[l(ge),l({h:(ce+72)%360,s:Fe.s,l:Fe.l}),l({h:(ce+216)%360,s:Fe.s,l:Fe.l})]}function O(ge,Fe,ce){Fe=Fe||6,ce=ce||30;var Ze=l(ge).toHsl(),ct=360/ce,pt=[l(ge)];for(Ze.h=(Ze.h-(ct*Fe>>1)+720)%360;--Fe;)Ze.h=(Ze.h+ct)%360,pt.push(l(Ze));return pt}function V(ge,Fe){Fe=Fe||6;for(var ce=l(ge).toHsv(),Ze=ce.h,ct=ce.s,pt=ce.v,Wt=[],st=1/Fe;Fe--;)Wt.push(l({h:Ze,s:ct,v:pt})),pt=(pt+st)%1;return Wt}l.mix=function(ge,Fe,ce){ce=ce===0?0:ce||50;var Ze=l(ge).toRgb(),ct=l(Fe).toRgb(),pt=ce/100,Wt={r:(ct.r-Ze.r)*pt+Ze.r,g:(ct.g-Ze.g)*pt+Ze.g,b:(ct.b-Ze.b)*pt+Ze.b,a:(ct.a-Ze.a)*pt+Ze.a};return l(Wt)},l.readability=function(ge,Fe){var ce=l(ge),Ze=l(Fe);return(e.max(ce.getLuminance(),Ze.getLuminance())+.05)/(e.min(ce.getLuminance(),Ze.getLuminance())+.05)},l.isReadable=function(ge,Fe,ce){var Ze=l.readability(ge,Fe),ct,pt;switch(pt=!1,ct=Pe(ce),ct.level+ct.size){case\"AAsmall\":case\"AAAlarge\":pt=Ze>=4.5;break;case\"AAlarge\":pt=Ze>=3;break;case\"AAAsmall\":pt=Ze>=7;break}return pt},l.mostReadable=function(ge,Fe,ce){var Ze=null,ct=0,pt,Wt,st,lt;ce=ce||{},Wt=ce.includeFallbackColors,st=ce.level,lt=ce.size;for(var Gt=0;Gt<Fe.length;Gt++)pt=l.readability(ge,Fe[Gt]),pt>ct&&(ct=pt,Ze=l(Fe[Gt]));return l.isReadable(ge,Ze,{level:st,size:lt})||!Wt?Ze:(ce.includeFallbackColors=!1,l.mostReadable(ge,[\"#fff\",\"#000\"],ce))};var G=l.names={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",burntsienna:\"ea7e5d\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"663399\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},Z=l.hexNames=H(G);function H(ge){var Fe={};for(var ce in ge)ge.hasOwnProperty(ce)&&(Fe[ge[ce]]=ce);return Fe}function N(ge){return ge=parseFloat(ge),(isNaN(ge)||ge<0||ge>1)&&(ge=1),ge}function j(ge,Fe){_e(ge)&&(ge=\"100%\");var ce=Me(ge);return ge=a(Fe,o(0,parseFloat(ge))),ce&&(ge=parseInt(ge*Fe,10)/100),e.abs(ge-Fe)<1e-6?1:ge%Fe/parseFloat(Fe)}function re(ge){return a(1,o(0,ge))}function oe(ge){return parseInt(ge,16)}function _e(ge){return typeof ge==\"string\"&&ge.indexOf(\".\")!=-1&&parseFloat(ge)===1}function Me(ge){return typeof ge==\"string\"&&ge.indexOf(\"%\")!=-1}function ke(ge){return ge.length==1?\"0\"+ge:\"\"+ge}function me(ge){return ge<=1&&(ge=ge*100+\"%\"),ge}function ie(ge){return e.round(parseFloat(ge)*255).toString(16)}function Se(ge){return oe(ge)/255}var Le=function(){var ge=\"[-\\\\+]?\\\\d+%?\",Fe=\"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\",ce=\"(?:\"+Fe+\")|(?:\"+ge+\")\",Ze=\"[\\\\s|\\\\(]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")\\\\s*\\\\)?\",ct=\"[\\\\s|\\\\(]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")\\\\s*\\\\)?\";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp(\"rgb\"+Ze),rgba:new RegExp(\"rgba\"+ct),hsl:new RegExp(\"hsl\"+Ze),hsla:new RegExp(\"hsla\"+ct),hsv:new RegExp(\"hsv\"+Ze),hsva:new RegExp(\"hsva\"+ct),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ae(ge){return!!Le.CSS_UNIT.exec(ge)}function De(ge){ge=ge.replace(t,\"\").replace(r,\"\").toLowerCase();var Fe=!1;if(G[ge])ge=G[ge],Fe=!0;else if(ge==\"transparent\")return{r:0,g:0,b:0,a:0,format:\"name\"};var ce;return(ce=Le.rgb.exec(ge))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Le.rgba.exec(ge))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Le.hsl.exec(ge))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Le.hsla.exec(ge))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Le.hsv.exec(ge))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Le.hsva.exec(ge))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Le.hex8.exec(ge))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:Fe?\"name\":\"hex8\"}:(ce=Le.hex6.exec(ge))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:Fe?\"name\":\"hex\"}:(ce=Le.hex4.exec(ge))?{r:oe(ce[1]+\"\"+ce[1]),g:oe(ce[2]+\"\"+ce[2]),b:oe(ce[3]+\"\"+ce[3]),a:Se(ce[4]+\"\"+ce[4]),format:Fe?\"name\":\"hex8\"}:(ce=Le.hex3.exec(ge))?{r:oe(ce[1]+\"\"+ce[1]),g:oe(ce[2]+\"\"+ce[2]),b:oe(ce[3]+\"\"+ce[3]),format:Fe?\"name\":\"hex\"}:!1}function Pe(ge){var Fe,ce;return ge=ge||{level:\"AA\",size:\"small\"},Fe=(ge.level||\"AA\").toUpperCase(),ce=(ge.size||\"small\").toLowerCase(),Fe!==\"AA\"&&Fe!==\"AAA\"&&(Fe=\"AA\"),ce!==\"small\"&&ce!==\"large\"&&(ce=\"small\"),{level:Fe,size:ce}}typeof g6!=\"undefined\"&&g6.exports?g6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(IS=>{\"use strict\";var Uee=gy(),LS=Array.isArray;function htt(e,t){var r,n;for(r=0;r<e.length;r++){if(n=e[r],n!==null&&typeof n==\"object\")return!1;n!==void 0&&(t[r]=n)}return!0}IS.extendFlat=function(){return PS(arguments,!1,!1,!1)};IS.extendDeep=function(){return PS(arguments,!0,!1,!1)};IS.extendDeepAll=function(){return PS(arguments,!0,!0,!1)};IS.extendDeepNoArrays=function(){return PS(arguments,!0,!1,!0)};function PS(e,t,r,n){var i=e[0],a=e.length,o,s,l,u,c,f,h;if(a===2&&LS(i)&&LS(e[1])&&i.length===0){if(h=htt(e[1],i),h)return i;i.splice(0,i.length)}for(var d=1;d<a;d++){o=e[d];for(s in o)l=i[s],u=o[s],n&&LS(u)?i[s]=u:t&&u&&(Uee(u)||(c=LS(u)))?(c?(c=!1,f=l&&LS(l)?l:[]):f=l&&Uee(l)?l:{},i[s]=PS([f,u],t,r,n)):(typeof u!=\"undefined\"||r)&&(i[s]=u)}return i}});var ec=ye((wtr,Vee)=>{\"use strict\";Vee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:\"integer\",min:1,max:1e3,extras:[\"normal\",\"bold\"],dflt:\"normal\"};e.noNumericWeightValues&&(i.valType=\"enumerated\",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:\"string\",noBlank:!0,strict:!0,editType:r},size:{valType:\"number\",min:1,editType:r},color:{valType:\"color\",editType:n},weight:i,style:{editType:r,valType:\"enumerated\",values:[\"normal\",\"italic\"],dflt:\"normal\"},variant:e.noFontVariant?void 0:{editType:r,valType:\"enumerated\",values:t||[\"normal\",\"small-caps\",\"all-small-caps\",\"all-petite-caps\",\"petite-caps\",\"unicase\"],dflt:\"normal\"},textcase:e.noFontTextcase?void 0:{editType:r,valType:\"enumerated\",values:[\"normal\",\"word caps\",\"upper\",\"lower\"],dflt:\"normal\"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:\"flaglist\",flags:[\"under\",\"over\",\"through\"],extras:[\"none\"],dflt:\"none\"},shadow:e.noFontShadow?void 0:{editType:r,valType:\"string\",dflt:e.autoShadowDflt?\"auto\":\"none\"},editType:r};return e.autoSize&&(a.size.dflt=\"auto\"),e.autoColor&&(a.color.dflt=\"auto\"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var RS=ye((Ttr,Gee)=>{\"use strict\";Gee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\"Arial, sans-serif\",HOVERMINTIME:50,HOVERID:\"-hover\"}});var B1=ye((Atr,Wee)=>{\"use strict\";var Hee=RS(),jee=ec(),AO=jee({editType:\"none\"});AO.family.dflt=Hee.HOVERFONT;AO.size.dflt=Hee.HOVERFONTSIZE;Wee.exports={clickmode:{valType:\"flaglist\",flags:[\"event\",\"select\"],dflt:\"event\",editType:\"plot\",extras:[\"none\"]},dragmode:{valType:\"enumerated\",values:[\"zoom\",\"pan\",\"select\",\"lasso\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoversubplots:{valType:\"enumerated\",values:[\"single\",\"overlaying\",\"axis\"],dflt:\"overlaying\",editType:\"none\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:AO,grouptitlefont:jee({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},namelength:{valType:\"integer\",min:-1,dflt:15,editType:\"none\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"none\"},editType:\"none\"},selectdirection:{valType:\"enumerated\",values:[\"h\",\"v\",\"d\",\"any\"],dflt:\"any\",editType:\"none\"}}});var i3=ye((Str,Xee)=>{\"use strict\";var dtt=ec(),DS=B1().hoverlabel,FS=Ao().extendFlat;Xee.exports={hoverlabel:{bgcolor:FS({},DS.bgcolor,{arrayOk:!0}),bordercolor:FS({},DS.bordercolor,{arrayOk:!0}),font:dtt({arrayOk:!0,editType:\"none\"}),align:FS({},DS.align,{arrayOk:!0}),namelength:FS({},DS.namelength,{arrayOk:!0}),showarrow:FS({},DS.showarrow),editType:\"none\"}}});var Gl=ye((Mtr,Zee)=>{\"use strict\";var vtt=ec(),ptt=i3();Zee.exports={type:{valType:\"enumerated\",values:[],dflt:\"scatter\",editType:\"calc+clearAxisTypes\",_noTemplating:!0},visible:{valType:\"enumerated\",values:[!0,!1,\"legendonly\"],dflt:!0,editType:\"calc\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},legend:{valType:\"subplotid\",dflt:\"legend\",editType:\"style\"},legendgroup:{valType:\"string\",dflt:\"\",editType:\"style\"},legendgrouptitle:{text:{valType:\"string\",dflt:\"\",editType:\"style\"},font:vtt({editType:\"style\"}),editType:\"style\"},legendrank:{valType:\"number\",dflt:1e3,editType:\"style\"},legendwidth:{valType:\"number\",min:0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"style\"},name:{valType:\"string\",editType:\"style\"},uid:{valType:\"string\",editType:\"plot\",anim:!0},ids:{valType:\"data_array\",editType:\"calc\",anim:!0},customdata:{valType:\"data_array\",editType:\"calc\"},meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},selectedpoints:{valType:\"any\",editType:\"calc\"},hoverinfo:{valType:\"flaglist\",flags:[\"x\",\"y\",\"z\",\"text\",\"name\"],extras:[\"all\",\"none\",\"skip\"],arrayOk:!0,dflt:\"all\",editType:\"none\"},hoverlabel:ptt.hoverlabel,stream:{token:{valType:\"string\",noBlank:!0,strict:!0,editType:\"calc\"},maxpoints:{valType:\"number\",min:0,max:1e4,dflt:500,editType:\"calc\"},editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"}}});var sb=ye((Etr,Jee)=>{\"use strict\";var gtt=cd(),m6={Greys:[[0,\"rgb(0,0,0)\"],[1,\"rgb(255,255,255)\"]],YlGnBu:[[0,\"rgb(8,29,88)\"],[.125,\"rgb(37,52,148)\"],[.25,\"rgb(34,94,168)\"],[.375,\"rgb(29,145,192)\"],[.5,\"rgb(65,182,196)\"],[.625,\"rgb(127,205,187)\"],[.75,\"rgb(199,233,180)\"],[.875,\"rgb(237,248,217)\"],[1,\"rgb(255,255,217)\"]],Greens:[[0,\"rgb(0,68,27)\"],[.125,\"rgb(0,109,44)\"],[.25,\"rgb(35,139,69)\"],[.375,\"rgb(65,171,93)\"],[.5,\"rgb(116,196,118)\"],[.625,\"rgb(161,217,155)\"],[.75,\"rgb(199,233,192)\"],[.875,\"rgb(229,245,224)\"],[1,\"rgb(247,252,245)\"]],YlOrRd:[[0,\"rgb(128,0,38)\"],[.125,\"rgb(189,0,38)\"],[.25,\"rgb(227,26,28)\"],[.375,\"rgb(252,78,42)\"],[.5,\"rgb(253,141,60)\"],[.625,\"rgb(254,178,76)\"],[.75,\"rgb(254,217,118)\"],[.875,\"rgb(255,237,160)\"],[1,\"rgb(255,255,204)\"]],Bluered:[[0,\"rgb(0,0,255)\"],[1,\"rgb(255,0,0)\"]],RdBu:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(106,137,247)\"],[.5,\"rgb(190,190,190)\"],[.6,\"rgb(220,170,132)\"],[.7,\"rgb(230,145,90)\"],[1,\"rgb(178,10,28)\"]],Reds:[[0,\"rgb(220,220,220)\"],[.2,\"rgb(245,195,157)\"],[.4,\"rgb(245,160,105)\"],[1,\"rgb(178,10,28)\"]],Blues:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(40,60,190)\"],[.5,\"rgb(70,100,245)\"],[.6,\"rgb(90,120,245)\"],[.7,\"rgb(106,137,247)\"],[1,\"rgb(220,220,220)\"]],Picnic:[[0,\"rgb(0,0,255)\"],[.1,\"rgb(51,153,255)\"],[.2,\"rgb(102,204,255)\"],[.3,\"rgb(153,204,255)\"],[.4,\"rgb(204,204,255)\"],[.5,\"rgb(255,255,255)\"],[.6,\"rgb(255,204,255)\"],[.7,\"rgb(255,153,255)\"],[.8,\"rgb(255,102,204)\"],[.9,\"rgb(255,102,102)\"],[1,\"rgb(255,0,0)\"]],Rainbow:[[0,\"rgb(150,0,90)\"],[.125,\"rgb(0,0,200)\"],[.25,\"rgb(0,25,255)\"],[.375,\"rgb(0,152,255)\"],[.5,\"rgb(44,255,150)\"],[.625,\"rgb(151,255,0)\"],[.75,\"rgb(255,234,0)\"],[.875,\"rgb(255,111,0)\"],[1,\"rgb(255,0,0)\"]],Portland:[[0,\"rgb(12,51,131)\"],[.25,\"rgb(10,136,186)\"],[.5,\"rgb(242,211,56)\"],[.75,\"rgb(242,143,56)\"],[1,\"rgb(217,30,30)\"]],Jet:[[0,\"rgb(0,0,131)\"],[.125,\"rgb(0,60,170)\"],[.375,\"rgb(5,255,255)\"],[.625,\"rgb(255,255,0)\"],[.875,\"rgb(250,0,0)\"],[1,\"rgb(128,0,0)\"]],Hot:[[0,\"rgb(0,0,0)\"],[.3,\"rgb(230,0,0)\"],[.6,\"rgb(255,210,0)\"],[1,\"rgb(255,255,255)\"]],Blackbody:[[0,\"rgb(0,0,0)\"],[.2,\"rgb(230,0,0)\"],[.4,\"rgb(230,210,0)\"],[.7,\"rgb(255,255,255)\"],[1,\"rgb(160,200,255)\"]],Earth:[[0,\"rgb(0,0,130)\"],[.1,\"rgb(0,180,180)\"],[.2,\"rgb(40,210,40)\"],[.4,\"rgb(230,230,50)\"],[.6,\"rgb(120,70,20)\"],[1,\"rgb(255,255,255)\"]],Electric:[[0,\"rgb(0,0,0)\"],[.15,\"rgb(30,0,100)\"],[.4,\"rgb(120,0,100)\"],[.6,\"rgb(160,90,0)\"],[.8,\"rgb(230,200,0)\"],[1,\"rgb(255,250,220)\"]],Viridis:[[0,\"#440154\"],[.06274509803921569,\"#48186a\"],[.12549019607843137,\"#472d7b\"],[.18823529411764706,\"#424086\"],[.25098039215686274,\"#3b528b\"],[.3137254901960784,\"#33638d\"],[.3764705882352941,\"#2c728e\"],[.4392156862745098,\"#26828e\"],[.5019607843137255,\"#21918c\"],[.5647058823529412,\"#1fa088\"],[.6274509803921569,\"#28ae80\"],[.6901960784313725,\"#3fbc73\"],[.7529411764705882,\"#5ec962\"],[.8156862745098039,\"#84d44b\"],[.8784313725490196,\"#addc30\"],[.9411764705882353,\"#d8e219\"],[1,\"#fde725\"]],Cividis:[[0,\"rgb(0,32,76)\"],[.058824,\"rgb(0,42,102)\"],[.117647,\"rgb(0,52,110)\"],[.176471,\"rgb(39,63,108)\"],[.235294,\"rgb(60,74,107)\"],[.294118,\"rgb(76,85,107)\"],[.352941,\"rgb(91,95,109)\"],[.411765,\"rgb(104,106,112)\"],[.470588,\"rgb(117,117,117)\"],[.529412,\"rgb(131,129,120)\"],[.588235,\"rgb(146,140,120)\"],[.647059,\"rgb(161,152,118)\"],[.705882,\"rgb(176,165,114)\"],[.764706,\"rgb(192,177,109)\"],[.823529,\"rgb(209,191,102)\"],[.882353,\"rgb(225,204,92)\"],[.941176,\"rgb(243,219,79)\"],[1,\"rgb(255,233,69)\"]]},Yee=m6.RdBu;function mtt(e,t){if(t||(t=Yee),!e)return t;function r(){try{e=m6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e==\"string\"&&(r(),typeof e==\"string\"&&r()),Kee(e)?e:t}function Kee(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var n=e[r];if(n.length!==2||+n[0]<t||!gtt(n[1]).isValid())return!1;t=+n[0]}return!0}function ytt(e){return m6[e]!==void 0?!0:Kee(e)}Jee.exports={scales:m6,defaultScale:Yee,get:mtt,isValid:ytt}});var Eh=ye(lb=>{\"use strict\";lb.defaults=[\"#1f77b4\",\"#ff7f0e\",\"#2ca02c\",\"#d62728\",\"#9467bd\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\",\"#17becf\"];lb.defaultLine=\"#444\";lb.lightLine=\"#eee\";lb.background=\"#fff\";lb.borderLine=\"#BEC8D9\";lb.lightFraction=100*10/11});var Ca=ye((ktr,$ee)=>{\"use strict\";var _p=cd(),_tt=Eo(),xtt=vv().isTypedArray,fd=$ee.exports={},y6=Eh();fd.defaults=y6.defaults;var btt=fd.defaultLine=y6.defaultLine;fd.lightLine=y6.lightLine;var MO=fd.background=y6.background;fd.tinyRGB=function(e){var t=e.toRgb();return\"rgb(\"+Math.round(t.r)+\", \"+Math.round(t.g)+\", \"+Math.round(t.b)+\")\"};fd.rgb=function(e){return fd.tinyRGB(_p(e))};fd.opacity=function(e){return e?_p(e).getAlpha():0};fd.addOpacity=function(e,t){var r=_p(e).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+t+\")\"};fd.combine=function(e,t){var r=_p(e).toRgb();if(r.a===1)return _p(e).toRgbString();var n=_p(t||MO).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return _p(a).toRgbString()};fd.interpolate=function(e,t,r){var n=_p(e).toRgb(),i=_p(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return _p(a).toRgbString()};fd.contrast=function(e,t,r){var n=_p(e);n.getAlpha()!==1&&(n=_p(fd.combine(e,MO)));var i=n.isDark()?t?n.lighten(t):MO:r?n.darken(r):btt;return i.toString()};fd.stroke=function(e,t){var r=_p(t);e.style({stroke:fd.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})};fd.fill=function(e,t){var r=_p(t);e.style({fill:fd.tinyRGB(r),\"fill-opacity\":r.getAlpha()})};fd.clean=function(e){if(!(!e||typeof e!=\"object\")){var t=Object.keys(e),r,n,i,a;for(r=0;r<t.length;r++)if(i=t[r],a=e[i],i.substr(i.length-5)===\"color\")if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=SO(a[n]);else e[i]=SO(a);else if(i.substr(i.length-10)===\"colorscale\"&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=SO(a[n][1]));else if(Array.isArray(a)){var o=a[0];if(!Array.isArray(o)&&o&&typeof o==\"object\")for(n=0;n<a.length;n++)fd.clean(a[n])}else a&&typeof a==\"object\"&&!xtt(a)&&fd.clean(a)}};function SO(e){if(_tt(e)||typeof e!=\"string\")return e;var t=e.trim();if(t.substr(0,3)!==\"rgb\")return e;var r=t.match(/^rgba?\\s*\\(([^()]*)\\)$/);if(!r)return e;var n=r[1].trim().split(/\\s*[\\s,]\\s*/),i=t.charAt(3)===\"a\"&&n.length===4;if(!i&&n.length!==3)return e;for(var a=0;a<n.length;a++){if(!n[a].length||(n[a]=Number(n[a]),!(n[a]>=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+\", \"+Math.round(n[1]*255)+\", \"+Math.round(n[2]*255);return i?\"rgba(\"+o+\", \"+n[3]+\")\":\"rgb(\"+o+\")\"}});var N1=ye((Ltr,Qee)=>{\"use strict\";Qee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=ye(ete=>{\"use strict\";ete.counter=function(e,t,r,n){var i=(t||\"\")+(r?\"\":\"$\"),a=n===!1?\"\":\"^\";return e===\"xy\"?new RegExp(a+\"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?\"+i):new RegExp(a+e+\"([2-9]|[1-9][0-9]+)?\"+i)}});var nte=ye(xp=>{\"use strict\";var EO=Eo(),tte=cd(),rte=Ao().extendFlat,wtt=Gl(),Ttt=sb(),Att=Ca(),Stt=N1().DESELECTDIM,a3=CS(),ite=n3().counter,Mtt=r3().modHalf,dm=vv().isArrayOrTypedArray,U1=vv().isTypedArraySpec,V1=vv().decodeTypedArraySpec;xp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(e)?e:U1(e)?V1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var i=String(r[n]);if(i.charAt(0)===\"/\"&&i.charAt(i.length-1)===\"/\"){var a=new RegExp(i.substr(1,i.length-2));if(a.test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r){e===!0||e===!1?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){U1(e)&&(e=V1(e)),!EO(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}U1(e)&&(e=V1(e)),e%1||!EO(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!=\"string\"){var i=typeof e==\"number\";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),tte(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return tte(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(Ttt.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e===\"auto\"?t.set(\"auto\"):EO(e)?t.set(Mtt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||ite(r);if(typeof e==\"string\"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!=\"string\"?!1:!!ite(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!=\"string\"){t.set(r);return}for(var i=e.split(\"+\"),a=0;a<i.length;){var o=i[a];n.flags.indexOf(o)===-1||i.indexOf(o)<a?i.splice(a,1):a++}i.length?t.set(i.join(\"+\")):t.set(r)}},any:{coerceFunction:function(e,t,r){e===void 0?t.set(r):t.set(U1(e)?V1(e):e)}},info_array:{coerceFunction:function(e,t,r,n){function i(C,E,A){var L,_={set:function(k){L=k}};return A===void 0&&(A=E.dflt),xp.valObjectMeta[E.valType].coerceFunction(C,_,A,E),L}if(U1(e)&&(e=V1(e)),!dm(e)){t.set(r);return}var a=n.dimensions===2||n.dimensions===\"1-2\"&&Array.isArray(e)&&dm(e[0]),o=n.items,s=[],l=Array.isArray(o),u=l&&a&&dm(o[0]),c=a&&l&&!u,f=l&&!c?o.length:e.length,h,d,v,x,b,p;if(r=Array.isArray(r)?r:[],a)for(h=0;h<f;h++)for(s[h]=[],v=dm(e[h])?e[h]:[],c?b=o.length:l?b=o[h].length:b=v.length,d=0;d<b;d++)c?x=o[d]:l?x=o[h][d]:x=o,p=i(v[d],x,(r[h]||[])[d]),p!==void 0&&(s[h][d]=p);else for(h=0;h<f;h++)p=i(e[h],l?o[h]:o,r[h]),p!==void 0&&(s[h]=p);t.set(s)},validateFunction:function(e,t){if(!dm(e))return!1;var r=t.items,n=Array.isArray(r),i=t.dimensions===2;if(!t.freeLength&&e.length!==r.length)return!1;for(var a=0;a<e.length;a++)if(i){if(!dm(e[a])||!t.freeLength&&e[a].length!==r[a].length)return!1;for(var o=0;o<e[a].length;o++)if(!_6(e[a][o],n?r[a][o]:r))return!1}else if(!_6(e[a],n?r[a]:r))return!1;return!0}}};xp.coerce=function(e,t,r,n,i){var a=a3(r,n).get(),o=a3(e,n),s=a3(t,n),l=o.get(),u=t._template;if(l===void 0&&u&&(l=a3(u,n).get(),u=0),i===void 0&&(i=a.dflt),a.arrayOk){if(dm(l))return s.set(l),l;if(U1(l))return l=V1(l),s.set(l),l}var c=xp.valObjectMeta[a.valType].coerceFunction;c(l,s,i,a);var f=s.get();return u&&f===i&&!_6(l,a)&&(l=a3(u,n).get(),c(l,s,i,a),f=s.get()),f};xp.coerce2=function(e,t,r,n,i){var a=a3(e,n),o=xp.coerce(e,t,r,n,i),s=a.get();return s!=null?o:!1};xp.coerceFont=function(e,t,r,n){n||(n={}),r=rte({},r),r=rte(r,n.overrideDflt||{});var i={family:e(t+\".family\",r.family),size:e(t+\".size\",r.size),color:e(t+\".color\",r.color),weight:e(t+\".weight\",r.weight),style:e(t+\".style\",r.style)};if(n.noFontVariant||(i.variant=e(t+\".variant\",r.variant)),n.noFontLineposition||(i.lineposition=e(t+\".lineposition\",r.lineposition)),n.noFontTextcase||(i.textcase=e(t+\".textcase\",r.textcase)),!n.noFontShadow){var a=r.shadow;a===\"none\"&&n.autoShadowDflt&&(a=\"auto\"),i.shadow=e(t+\".shadow\",a)}return i};xp.coercePattern=function(e,t,r,n){var i=e(t+\".shape\"),a;if(i||(a=e(t+\".path\")),i||a){i&&e(t+\".solidity\"),e(t+\".size\");var o=e(t+\".fillmode\"),s=o===\"overlay\";if(!n){var l=e(t+\".bgcolor\",s?r:void 0);e(t+\".fgcolor\",s?Att.contrast(l):r)}e(t+\".fgopacity\",s?.5:1)}};xp.coerceHoverinfo=function(e,t,r){var n=t._module.attributes,i=n.hoverinfo?n:wtt,a=i.hoverinfo,o;if(r._dataLength===1){var s=a.dflt===\"all\"?a.flags.slice():a.dflt.split(\"+\");s.splice(s.indexOf(\"name\"),1),o=s.join(\"+\")}return xp.coerce(e,t,i,\"hoverinfo\",o)};xp.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r=e.marker.opacity;if(r!==void 0){var n,i;!dm(r)&&!e.selected&&!e.unselected&&(n=r,i=Stt*r),t(\"selected.marker.opacity\",n),t(\"unselected.marker.opacity\",i)}}};function _6(e,t){var r=xp.valObjectMeta[t.valType];if(t.arrayOk&&dm(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var n={},i=n,a={set:function(o){i=o}};return r.coerceFunction(e,a,n,t),i!==n}xp.validate=_6});var ub=ye((Rtr,lte)=>{\"use strict\";var ate={staticPlot:{valType:\"boolean\",dflt:!1},typesetMath:{valType:\"boolean\",dflt:!0},plotlyServerURL:{valType:\"string\",dflt:\"\"},editable:{valType:\"boolean\",dflt:!1},edits:{annotationPosition:{valType:\"boolean\",dflt:!1},annotationTail:{valType:\"boolean\",dflt:!1},annotationText:{valType:\"boolean\",dflt:!1},axisTitleText:{valType:\"boolean\",dflt:!1},colorbarPosition:{valType:\"boolean\",dflt:!1},colorbarTitleText:{valType:\"boolean\",dflt:!1},legendPosition:{valType:\"boolean\",dflt:!1},legendText:{valType:\"boolean\",dflt:!1},shapePosition:{valType:\"boolean\",dflt:!1},titleText:{valType:\"boolean\",dflt:!1}},editSelection:{valType:\"boolean\",dflt:!0},autosizable:{valType:\"boolean\",dflt:!1},responsive:{valType:\"boolean\",dflt:!1},fillFrame:{valType:\"boolean\",dflt:!1},frameMargins:{valType:\"number\",dflt:0,min:0,max:.5},scrollZoom:{valType:\"flaglist\",flags:[\"cartesian\",\"gl3d\",\"geo\",\"mapbox\",\"map\"],extras:[!0,!1],dflt:\"gl3d+geo+map\"},doubleClick:{valType:\"enumerated\",values:[!1,\"reset\",\"autosize\",\"reset+autosize\"],dflt:\"reset+autosize\"},doubleClickDelay:{valType:\"number\",dflt:300,min:0},showAxisDragHandles:{valType:\"boolean\",dflt:!0},showAxisRangeEntryBoxes:{valType:\"boolean\",dflt:!0},showTips:{valType:\"boolean\",dflt:!0},showLink:{valType:\"boolean\",dflt:!1},linkText:{valType:\"string\",dflt:\"Edit chart\",noBlank:!0},sendData:{valType:\"boolean\",dflt:!0},showSources:{valType:\"any\",dflt:!1},displayModeBar:{valType:\"enumerated\",values:[\"hover\",!0,!1],dflt:\"hover\"},showSendToCloud:{valType:\"boolean\",dflt:!1},showEditInChartStudio:{valType:\"boolean\",dflt:!1},modeBarButtonsToRemove:{valType:\"any\",dflt:[]},modeBarButtonsToAdd:{valType:\"any\",dflt:[]},modeBarButtons:{valType:\"any\",dflt:!1},toImageButtonOptions:{valType:\"any\",dflt:{}},displaylogo:{valType:\"boolean\",dflt:!0},watermark:{valType:\"boolean\",dflt:!1},plotGlPixelRatio:{valType:\"number\",dflt:2,min:1,max:4},setBackground:{valType:\"any\",dflt:\"transparent\"},topojsonURL:{valType:\"string\",noBlank:!0,dflt:\"https://cdn.plot.ly/un/\"},mapboxAccessToken:{valType:\"string\",dflt:null},logging:{valType:\"integer\",min:0,max:2,dflt:1},notifyOnLogging:{valType:\"integer\",min:0,max:2,dflt:0},queueLength:{valType:\"integer\",min:0,dflt:0},locale:{valType:\"string\",dflt:\"en-US\"},locales:{valType:\"any\",dflt:{}}},ote={};function ste(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),ste(n,t[r]))}}ste(ate,ote);lte.exports={configAttributes:ate,dfltConfig:ote}});var kO=ye((Dtr,ute)=>{\"use strict\";var CO=Oa(),Ett=Eo(),zS=[];ute.exports=function(e,t){if(zS.indexOf(e)!==-1)return;zS.push(e);var r=1e3;Ett(t)?r=t:t===\"long\"&&(r=3e3);var n=CO.select(\"body\").selectAll(\".plotly-notifier\").data([0]);n.enter().append(\"div\").classed(\"plotly-notifier\",!0);var i=n.selectAll(\".notifier-note\").data(zS);function a(o){o.duration(700).style(\"opacity\",0).each(\"end\",function(s){var l=zS.indexOf(s);l!==-1&&zS.splice(l,1),CO.select(this).remove()})}i.enter().append(\"div\").classed(\"notifier-note\",!0).style(\"opacity\",0).each(function(o){var s=CO.select(this);s.append(\"button\").classed(\"notifier-close\",!0).html(\"&times;\").on(\"click\",function(){s.transition().call(a)});for(var l=s.append(\"p\"),u=o.split(/<br\\s*\\/?>/g),c=0;c<u.length;c++)c&&l.append(\"br\"),l.append(\"span\").text(u[c]);t===\"stick\"?s.transition().duration(350).style(\"opacity\",1):s.transition().duration(700).style(\"opacity\",1).transition().delay(r).call(a)})}});var G1=ye((Ftr,cte)=>{\"use strict\";var o3=ub().dfltConfig,LO=kO(),PO=cte.exports={};PO.log=function(){var e;if(o3.logging>1){var t=[\"LOG:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(o3.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);LO(r.join(\"<br>\"),\"long\")}};PO.warn=function(){var e;if(o3.logging>0){var t=[\"WARN:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(o3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);LO(r.join(\"<br>\"),\"stick\")}};PO.error=function(){var e;if(o3.logging>0){var t=[\"ERROR:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(o3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);LO(r.join(\"<br>\"),\"stick\")}}});var x6=ye((ztr,fte)=>{\"use strict\";fte.exports=function(){}});var IO=ye((Otr,hte)=>{\"use strict\";hte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i<t.length;i++)if(t[i]instanceof RegExp&&t[i].toString()===n)return t;t.push(r)}else(r||r===0)&&t.indexOf(r)===-1&&t.push(r);return t}});var vte=ye((qtr,dte)=>{dte.exports=Ctt;function Ctt(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gte=ye((Btr,pte)=>{pte.exports=ktt;function ktt(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var yte=ye((Ntr,mte)=>{mte.exports=Ltt;function Ltt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var RO=ye((Utr,_te)=>{_te.exports=Ptt;function Ptt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var bte=ye((Vtr,xte)=>{xte.exports=Itt;function Itt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Tte=ye((Gtr,wte)=>{wte.exports=Rtt;function Rtt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],x=t[13],b=t[14],p=t[15],C=r*s-n*o,E=r*l-i*o,A=r*u-a*o,L=n*l-i*s,_=n*u-a*s,k=i*u-a*l,M=c*x-f*v,g=c*b-h*v,P=c*p-d*v,T=f*b-h*x,z=f*p-d*x,O=h*p-d*b,V=C*O-E*z+A*T+L*P-_*g+k*M;return V?(V=1/V,e[0]=(s*O-l*z+u*T)*V,e[1]=(i*z-n*O-a*T)*V,e[2]=(x*k-b*_+p*L)*V,e[3]=(h*_-f*k-d*L)*V,e[4]=(l*P-o*O-u*g)*V,e[5]=(r*O-i*P+a*g)*V,e[6]=(b*A-v*k-p*E)*V,e[7]=(c*k-h*A+d*E)*V,e[8]=(o*z-s*P+u*M)*V,e[9]=(n*P-r*z-a*M)*V,e[10]=(v*_-x*A+p*C)*V,e[11]=(f*A-c*_-d*C)*V,e[12]=(s*g-o*T-l*M)*V,e[13]=(r*T-n*g+i*M)*V,e[14]=(x*E-v*L-b*C)*V,e[15]=(c*L-f*E+h*C)*V,e):null}});var Ste=ye((Htr,Ate)=>{Ate.exports=Dtt;function Dtt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],x=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+x*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+x*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+x*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*x)-c*(s*p-u*x)+v*(s*d-u*f),e[9]=-(r*(f*p-d*x)-c*(n*p-a*x)+v*(n*d-a*f)),e[10]=r*(s*p-u*x)-o*(n*p-a*x)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*x)-c*(s*b-l*x)+v*(s*h-l*f)),e[13]=r*(f*b-h*x)-c*(n*b-i*x)+v*(n*h-i*f),e[14]=-(r*(s*b-l*x)-o*(n*b-i*x)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var Ete=ye((jtr,Mte)=>{Mte.exports=Ftt;function Ftt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],x=e[14],b=e[15],p=t*o-r*a,C=t*s-n*a,E=t*l-i*a,A=r*s-n*o,L=r*l-i*o,_=n*l-i*s,k=u*v-c*d,M=u*x-f*d,g=u*b-h*d,P=c*x-f*v,T=c*b-h*v,z=f*b-h*x;return p*z-C*T+E*P+A*g-L*M+_*k}});var kte=ye((Wtr,Cte)=>{Cte.exports=ztt;function ztt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],x=t[12],b=t[13],p=t[14],C=t[15],E=r[0],A=r[1],L=r[2],_=r[3];return e[0]=E*n+A*s+L*f+_*x,e[1]=E*i+A*l+L*h+_*b,e[2]=E*a+A*u+L*d+_*p,e[3]=E*o+A*c+L*v+_*C,E=r[4],A=r[5],L=r[6],_=r[7],e[4]=E*n+A*s+L*f+_*x,e[5]=E*i+A*l+L*h+_*b,e[6]=E*a+A*u+L*d+_*p,e[7]=E*o+A*c+L*v+_*C,E=r[8],A=r[9],L=r[10],_=r[11],e[8]=E*n+A*s+L*f+_*x,e[9]=E*i+A*l+L*h+_*b,e[10]=E*a+A*u+L*d+_*p,e[11]=E*o+A*c+L*v+_*C,E=r[12],A=r[13],L=r[14],_=r[15],e[12]=E*n+A*s+L*f+_*x,e[13]=E*i+A*l+L*h+_*b,e[14]=E*a+A*u+L*d+_*p,e[15]=E*o+A*c+L*v+_*C,e}});var Pte=ye((Xtr,Lte)=>{Lte.exports=Ott;function Ott(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,x,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],x=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=x,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+x*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Rte=ye((Ztr,Ite)=>{Ite.exports=qtt;function qtt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Fte=ye((Ytr,Dte)=>{Dte.exports=Btt;function Btt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,x,b,p,C,E,A,L,_,k,M,g,P,T,z,O,V,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],x=t[4],b=t[5],p=t[6],C=t[7],E=t[8],A=t[9],L=t[10],_=t[11],k=i*i*c+u,M=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,T=a*a*c+u,z=o*a*c+i*l,O=i*o*c+a*l,V=a*o*c-i*l,G=o*o*c+u,e[0]=f*k+x*M+E*g,e[1]=h*k+b*M+A*g,e[2]=d*k+p*M+L*g,e[3]=v*k+C*M+_*g,e[4]=f*P+x*T+E*z,e[5]=h*P+b*T+A*z,e[6]=d*P+p*T+L*z,e[7]=v*P+C*T+_*z,e[8]=f*O+x*V+E*G,e[9]=h*O+b*V+A*G,e[10]=d*O+p*V+L*G,e[11]=v*O+C*V+_*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Ote=ye((Ktr,zte)=>{zte.exports=Ntt;function Ntt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Bte=ye((Jtr,qte)=>{qte.exports=Utt;function Utt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Ute=ye(($tr,Nte)=>{Nte.exports=Vtt;function Vtt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Gte=ye((Qtr,Vte)=>{Vte.exports=Gtt;function Gtt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var jte=ye((err,Hte)=>{Hte.exports=Htt;function Htt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,x=a*u,b=o*s,p=o*l,C=o*u;return e[0]=1-(d+x),e[1]=f+C,e[2]=h-p,e[3]=0,e[4]=f-C,e[5]=1-(c+x),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Xte=ye((trr,Wte)=>{Wte.exports=jtt;function jtt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Yte=ye((rrr,Zte)=>{Zte.exports=Wtt;function Wtt(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Jte=ye((irr,Kte)=>{Kte.exports=Xtt;function Xtt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Qte=ye((nrr,$te)=>{$te.exports=Ztt;function Ztt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var tre=ye((arr,ere)=>{ere.exports=Ytt;function Ytt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var DO=ye((orr,rre)=>{rre.exports=Ktt;function Ktt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,x=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var nre=ye((srr,ire)=>{ire.exports=Jtt;function Jtt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var ore=ye((lrr,are)=>{are.exports=$tt;function $tt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var lre=ye((urr,sre)=>{sre.exports=Qtt;function Qtt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var cre=ye((crr,ure)=>{ure.exports=ert;function ert(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var hre=ye((frr,fre)=>{var trt=RO();fre.exports=rrt;function rrt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],x=t[1],b=t[2],p=n[0],C=n[1],E=n[2],A=r[0],L=r[1],_=r[2];return Math.abs(v-A)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?trt(e):(c=v-A,f=x-L,h=b-_,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=C*h-E*f,a=E*c-p*h,o=p*f-C*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*x+o*b),e[13]=-(s*v+l*x+u*b),e[14]=-(c*v+f*x+h*b),e[15]=1,e)}});var vre=ye((hrr,dre)=>{dre.exports=irt;function irt(e){return\"mat4(\"+e[0]+\", \"+e[1]+\", \"+e[2]+\", \"+e[3]+\", \"+e[4]+\", \"+e[5]+\", \"+e[6]+\", \"+e[7]+\", \"+e[8]+\", \"+e[9]+\", \"+e[10]+\", \"+e[11]+\", \"+e[12]+\", \"+e[13]+\", \"+e[14]+\", \"+e[15]+\")\"}});var FO=ye((drr,pre)=>{pre.exports={create:vte(),clone:gte(),copy:yte(),identity:RO(),transpose:bte(),invert:Tte(),adjoint:Ste(),determinant:Ete(),multiply:kte(),translate:Pte(),scale:Rte(),rotate:Fte(),rotateX:Ote(),rotateY:Bte(),rotateZ:Ute(),fromRotation:Gte(),fromRotationTranslation:jte(),fromScaling:Xte(),fromTranslation:Yte(),fromXRotation:Jte(),fromYRotation:Qte(),fromZRotation:tre(),fromQuat:DO(),frustum:nre(),perspective:ore(),perspectiveFromFieldOfView:lre(),ortho:cre(),lookAt:hre(),str:vre()}});var b6=ye(fh=>{\"use strict\";var nrt=FO();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r};fh.transposeRagged=function(e){var t=0,r=e.length,n,i;for(n=0;n<r;n++)t=Math.max(t,e[n].length);var a=new Array(t);for(n=0;n<t;n++)for(a[n]=new Array(r),i=0;i<r;i++)a[n][i]=e[i][n];return a};fh.dot=function(e,t){if(!(e.length&&t.length)||e.length!==t.length)return null;var r=e.length,n,i;if(e[0].length)for(n=new Array(r),i=0;i<r;i++)n[i]=fh.dot(e[i],t);else if(t[0].length){var a=fh.transposeRagged(t);for(n=new Array(a.length),i=0;i<a.length;i++)n[i]=fh.dot(e,a[i])}else for(n=0,i=0;i<r;i++)n+=e[i]*t[i];return n};fh.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]};fh.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]};fh.rotationXYMatrix=function(e,t,r){return fh.dot(fh.dot(fh.translationMatrix(t,r),fh.rotationMatrix(e)),fh.translationMatrix(-t,-r))};fh.apply3DTransform=function(e){return function(){var t=arguments,r=arguments.length===1?t[0]:[t[0],t[1],t[2]||0];return fh.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}};fh.apply2DTransform=function(e){return function(){var t=arguments;t.length===3&&(t=t[0]);var r=arguments.length===1?t[0]:[t[0],t[1]];return fh.dot(e,[r[0],r[1],1]).slice(0,2)}};fh.apply2DTransform2=function(e){var t=fh.apply2DTransform(e);return function(r){return t(r.slice(0,2)).concat(t(r.slice(2,4)))}};fh.convertCssMatrix=function(e){if(e){var t=e.length;if(t===16)return e;if(t===6)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};fh.inverseTransformMatrix=function(e){var t=[];return nrt.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}});var OS=ye((prr,bre)=>{\"use strict\";var art=Oa(),gre=G1(),ort=b6(),srt=FO();function lrt(e){var t;if(typeof e==\"string\"){if(t=document.getElementById(e),t===null)throw new Error(\"No DOM element with id '\"+e+\"' exists on the page.\");return t}else if(e==null)throw new Error(\"DOM element provided is null or undefined\");return e}function urt(e){var t=art.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed(\"js-plotly-plot\")}function mre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function crt(e,t){yre(\"global\",e,t)}function yre(e,t,r){var n=\"plotly.js-style-\"+e,i=document.getElementById(n);if(!(i&&i.matches(\".no-inline-styles\"))){i||(i=document.createElement(\"style\"),i.setAttribute(\"id\",n),i.appendChild(document.createTextNode(\"\")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+\"{\"+r+\"}\",0):a.addRule?a.addRule(t,r,0):gre.warn(\"addStyleRule failed\"):gre.warn(\"Cannot addRelatedStyleRule, probably due to strict CSP...\")}}function frt(e){var t=\"plotly.js-style-\"+e,r=document.getElementById(t);r&&mre(r)}function hrt(e,t,r,n,i,a){var o=n.split(\":\"),s=i.split(\":\"),l=\"data-btn-style-event-added\";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener(\"mouseenter\",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener(\"mouseleave\",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function drt(e){var t=xre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=_re(n);if(i){var a=ort.convertCssMatrix(i);r=srt.multiply(r,r,a)}}),r}function _re(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue(\"-webkit-transform\")||t.getPropertyValue(\"-moz-transform\")||t.getPropertyValue(\"-ms-transform\")||t.getPropertyValue(\"-o-transform\")||t.getPropertyValue(\"transform\");return r===\"none\"?null:r.replace(\"matrix\",\"\").replace(\"3d\",\"\").slice(1,-1).split(\",\").map(function(n){return+n})}function xre(e){for(var t=[];vrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot==\"function\"&&e instanceof ShadowRoot&&(e=e.host);return t}function vrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function prt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}bre.exports={getGraphDiv:lrt,isPlotDiv:urt,removeElement:mre,addStyleRule:crt,addRelatedStyleRule:yre,deleteRelatedStyleRule:frt,setStyleOnHover:hrt,getFullTransformMatrix:drt,getElementTransformMatrix:_re,getElementAndAncestors:xre,equalDomRects:prt}});var qS=ye((grr,wre)=>{\"use strict\";wre.exports={mode:{valType:\"enumerated\",dflt:\"afterall\",values:[\"immediate\",\"next\",\"afterall\"]},direction:{valType:\"enumerated\",values:[\"forward\",\"reverse\"],dflt:\"forward\"},fromcurrent:{valType:\"boolean\",dflt:!1},frame:{duration:{valType:\"number\",min:0,dflt:500},redraw:{valType:\"boolean\",dflt:!0}},transition:{duration:{valType:\"number\",min:0,dflt:500,editType:\"none\"},easing:{valType:\"enumerated\",dflt:\"cubic-in-out\",values:[\"linear\",\"quad\",\"cubic\",\"sin\",\"exp\",\"circle\",\"elastic\",\"back\",\"bounce\",\"linear-in\",\"quad-in\",\"cubic-in\",\"sin-in\",\"exp-in\",\"circle-in\",\"elastic-in\",\"back-in\",\"bounce-in\",\"linear-out\",\"quad-out\",\"cubic-out\",\"sin-out\",\"exp-out\",\"circle-out\",\"elastic-out\",\"back-out\",\"bounce-out\",\"linear-in-out\",\"quad-in-out\",\"cubic-in-out\",\"sin-in-out\",\"exp-in-out\",\"circle-in-out\",\"elastic-in-out\",\"back-in-out\",\"bounce-in-out\"],editType:\"none\"},ordering:{valType:\"enumerated\",values:[\"layout first\",\"traces first\"],dflt:\"layout first\",editType:\"none\"}}}});var mc=ye((mrr,kre)=>{\"use strict\";var Are=Ao().extendFlat,grt=gy(),Sre={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"clearAxisTypes\",\"plot\",\"style\",\"markerSize\",\"colorbars\"]},Mre={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"plot\",\"legend\",\"ticks\",\"axrange\",\"layoutstyle\",\"modebar\",\"camera\",\"arraydraw\",\"colorbars\"]},mrt=Sre.flags.slice().concat([\"fullReplot\"]),yrt=Mre.flags.slice().concat(\"layoutReplot\");kre.exports={traces:Sre,layout:Mre,traceFlags:function(){return Tre(mrt)},layoutFlags:function(){return Tre(yrt)},update:function(e,t){var r=t.editType;if(r&&r!==\"none\")for(var n=r.split(\"+\"),i=0;i<n.length;i++)e[n[i]]=!0},overrideAll:Ere};function Tre(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function Ere(e,t,r){var n=Are({},e);for(var i in n){var a=n[i];grt(a)&&(n[i]=Cre(a,t,r,i))}return r===\"from-root\"&&(n.editType=t),n}function Cre(e,t,r,n){if(e.valType){var i=Are({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var a=0;a<e.items.length;a++)i.items[a]=Cre(e.items[a],t,\"from-root\")}return i}else return Ere(e,t,n.charAt(0)===\"_\"?\"nested\":\"from-root\")}});var Pd=ye(zO=>{\"use strict\";zO.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"};zO.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},path:{valType:\"string\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}});var OO=ye((_rr,Lre)=>{\"use strict\";Lre.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}});var Qo=ye(BS=>{\"use strict\";var Pre=OO(),_rt=Pre.FORMAT_LINK,xrt=Pre.DATE_FORMAT_LINK;function brt(e){var t=e&&e.supportOther;return[\"Variables are inserted using %{variable},\",'for example \"y: %{y}\"'+(t?\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.\":\".\"),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\".`,_rt,\"for details on the formatting syntax.\",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\".`,xrt,\"for details on the date formatting syntax.\"].join(\" \")}BS.templateFormatStringDescription=brt;function qO(e){var t=e.description?\" \"+e.description:\"\",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]=\"`\"+r[i]+\"`\";t=t+\"Finally, the template string has access to \",r.length===1?t=t+\"variable \"+n[0]:t=t+\"variables \"+n.slice(0,-1).join(\", \")+\" and \"+n.slice(-1)+\".\"}return t}BS.hovertemplateAttrs=function(e,t){e=e||{},t=t||{};var r=qO(t),n={valType:\"string\",dflt:\"\",editType:e.editType||\"none\"};return e.arrayOk!==!1&&(n.arrayOk=!0),n};BS.texttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=qO(t),n={valType:\"string\",dflt:\"\",editType:e.editType||\"calc\"};return e.arrayOk!==!1&&(n.arrayOk=!0),n};BS.shapeTexttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=e.newshape?\"new \":\"\",n=qO(t),i={valType:\"string\",dflt:\"\",editType:e.editType||\"arraydraw\"};return i}});var A6=ye((brr,Ore)=>{\"use strict\";function H1(e,t){return t?t.d2l(e):e}function Ire(e,t){return t?t.l2d(e):e}function wrt(e){return e.x0}function Trt(e){return e.x1}function Art(e){return e.y0}function Srt(e){return e.y1}function Rre(e){return e.x0shift||0}function Dre(e){return e.x1shift||0}function Fre(e){return e.y0shift||0}function zre(e){return e.y1shift||0}function w6(e,t){return H1(e.x1,t)+Dre(e)-H1(e.x0,t)-Rre(e)}function T6(e,t,r){return H1(e.y1,r)+zre(e)-H1(e.y0,r)-Fre(e)}function Mrt(e,t){return Math.abs(w6(e,t))}function Ert(e,t,r){return Math.abs(T6(e,t,r))}function Crt(e,t,r){return e.type!==\"line\"?void 0:Math.sqrt(Math.pow(w6(e,t),2)+Math.pow(T6(e,t,r),2))}function krt(e,t){return Ire((H1(e.x1,t)+Dre(e)+H1(e.x0,t)+Rre(e))/2,t)}function Lrt(e,t,r){return Ire((H1(e.y1,r)+zre(e)+H1(e.y0,r)+Fre(e))/2,r)}function Prt(e,t,r){return e.type!==\"line\"?void 0:T6(e,t,r)/w6(e,t)}Ore.exports={x0:wrt,x1:Trt,y0:Art,y1:Srt,slope:Prt,dx:w6,dy:T6,width:Mrt,height:Ert,length:Crt,xcenter:krt,ycenter:Lrt}});var Nre=ye((wrr,Bre)=>{\"use strict\";var Irt=mc().overrideAll,cb=Gl(),qre=ec(),Rrt=Pd().dash,j1=Ao().extendFlat,Drt=Qo().shapeTexttemplateAttrs,Frt=A6();Bre.exports=Irt({newshape:{visible:j1({},cb.visible,{}),showlegend:{valType:\"boolean\",dflt:!1},legend:j1({},cb.legend,{}),legendgroup:j1({},cb.legendgroup,{}),legendgrouptitle:{text:j1({},cb.legendgrouptitle.text,{}),font:qre({})},legendrank:j1({},cb.legendrank,{}),legendwidth:j1({},cb.legendwidth,{}),line:{color:{valType:\"color\"},width:{valType:\"number\",min:0,dflt:4},dash:j1({},Rrt,{dflt:\"solid\"})},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\"},opacity:{valType:\"number\",min:0,max:1,dflt:1},layer:{valType:\"enumerated\",values:[\"below\",\"above\",\"between\"],dflt:\"above\"},drawdirection:{valType:\"enumerated\",values:[\"ortho\",\"horizontal\",\"vertical\",\"diagonal\"],dflt:\"diagonal\"},name:j1({},cb.name,{}),label:{text:{valType:\"string\",dflt:\"\"},texttemplate:Drt({newshape:!0},{keys:Object.keys(Frt)}),font:qre({}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\",\"start\",\"middle\",\"end\"]},textangle:{valType:\"angle\",dflt:\"auto\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"]},padding:{valType:\"number\",dflt:3,min:0}}},activeshape:{fillcolor:{valType:\"color\",dflt:\"rgb(255,0,255)\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5}}},\"none\",\"from-root\")});var Vre=ye((Trr,Ure)=>{\"use strict\";var zrt=Pd().dash,Ort=Ao().extendFlat;Ure.exports={newselection:{mode:{valType:\"enumerated\",values:[\"immediate\",\"gradual\"],dflt:\"immediate\",editType:\"none\"},line:{color:{valType:\"color\",editType:\"none\"},width:{valType:\"number\",min:1,dflt:1,editType:\"none\"},dash:Ort({},zrt,{dflt:\"dot\",editType:\"none\"}),editType:\"none\"},editType:\"none\"},activeselection:{fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"none\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"none\"},editType:\"none\"}}});var S6=ye((Arr,Gre)=>{\"use strict\";Gre.exports=function(e){var t=e.editType;return{t:{valType:\"number\",dflt:0,editType:t},r:{valType:\"number\",dflt:0,editType:t},b:{valType:\"number\",dflt:0,editType:t},l:{valType:\"number\",dflt:0,editType:t},editType:t}}});var s3=ye((Srr,Xre)=>{\"use strict\";var BO=ec(),qrt=qS(),M6=Eh(),Hre=Nre(),jre=Vre(),Brt=S6(),Wre=Ao().extendFlat,E6=BO({editType:\"calc\"});E6.family.dflt='\"Open Sans\", verdana, arial, sans-serif';E6.size.dflt=12;E6.color.dflt=M6.defaultLine;Xre.exports={font:E6,title:{text:{valType:\"string\",editType:\"layoutstyle\"},font:BO({editType:\"layoutstyle\"}),subtitle:{text:{valType:\"string\",editType:\"layoutstyle\"},font:BO({editType:\"layoutstyle\"}),editType:\"layoutstyle\"},xref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},x:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"layoutstyle\"},y:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"left\",\"center\",\"right\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"layoutstyle\"},pad:Wre(Brt({editType:\"layoutstyle\"}),{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},editType:\"layoutstyle\"},uniformtext:{mode:{valType:\"enumerated\",values:[!1,\"hide\",\"show\"],dflt:!1,editType:\"plot\"},minsize:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"},autosize:{valType:\"boolean\",dflt:!1,editType:\"none\"},width:{valType:\"number\",min:10,dflt:700,editType:\"plot\"},height:{valType:\"number\",min:10,dflt:450,editType:\"plot\"},minreducedwidth:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},minreducedheight:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},margin:{l:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},r:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},t:{valType:\"number\",min:0,dflt:100,editType:\"plot\"},b:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},autoexpand:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},computed:{valType:\"any\",editType:\"none\"},paper_bgcolor:{valType:\"color\",dflt:M6.background,editType:\"plot\"},plot_bgcolor:{valType:\"color\",dflt:M6.background,editType:\"layoutstyle\"},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},separators:{valType:\"string\",editType:\"plot\"},hidesources:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:{valType:\"boolean\",editType:\"legend\"},colorway:{valType:\"colorlist\",dflt:M6.defaults,editType:\"calc\"},datarevision:{valType:\"any\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editrevision:{valType:\"any\",editType:\"none\"},selectionrevision:{valType:\"any\",editType:\"none\"},template:{valType:\"any\",editType:\"calc\"},newshape:Hre.newshape,activeshape:Hre.activeshape,newselection:jre.newselection,activeselection:jre.activeselection,meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},transition:Wre({},qrt.transition,{editType:\"none\"})}});var Zre=ye(()=>{(function(){if(!document.getElementById(\"8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc\")){var e=document.createElement(\"style\");e.id=\"8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc\",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var qa=ye(tl=>{\"use strict\";var l3=G1(),Yre=x6(),Kre=IO(),Nrt=gy(),Urt=OS().addStyleRule,Jre=Ao(),Vrt=Gl(),Grt=s3(),Hrt=Jre.extendFlat,NO=Jre.extendDeepAll;tl.modules={};tl.allCategories={};tl.allTypes=[];tl.subplotsRegistry={};tl.componentsRegistry={};tl.layoutArrayContainers=[];tl.layoutArrayRegexes=[];tl.traceLayoutAttributes={};tl.localeRegistry={};tl.apiMethodRegistry={};tl.collectableSubplotTypes=null;tl.register=function(t){if(tl.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error(\"No argument passed to Plotly.register.\");for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error(\"Invalid module was attempted to be registered!\");switch(n.moduleType){case\"trace\":jrt(n);break;case\"transform\":Zrt(n);break;case\"component\":Xrt(n);break;case\"locale\":Yrt(n);break;case\"apiMethod\":var i=n.name;tl.apiMethodRegistry[i]=n.fn;break;default:throw new Error(\"Invalid module was attempted to be registered!\")}}};tl.getModule=function(e){var t=tl.modules[tie(e)];return t?t._module:!1};tl.traceIs=function(e,t){if(e=tie(e),e===\"various\")return!1;var r=tl.modules[e];return r||(e&&l3.log(\"Unrecognized trace type \"+e+\".\"),r=tl.modules[Vrt.type.dflt]),!!r.categories[t]};tl.getComponentMethod=function(e,t){var r=tl.componentsRegistry[e];return r&&r[t]||Yre};tl.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return tl.apiMethodRegistry[e].apply(null,t)};function jrt(e){var t=e.name,r=e.categories,n=e.meta;if(tl.modules[t]){l3.log(\"Type \"+t+\" already registered\");return}tl.subplotsRegistry[e.basePlotModule.name]||Wrt(e.basePlotModule);for(var i={},a=0;a<r.length;a++)i[r[a]]=!0,tl.allCategories[r[a]]=!0;tl.modules[t]={_module:e,categories:i},n&&Object.keys(n).length&&(tl.modules[t].meta=n),tl.allTypes.push(t);for(var o in tl.componentsRegistry)Qre(o,t);e.layoutAttributes&&Hrt(tl.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,l=s.name;if(l===\"mapbox\"){var u=s.constants.styleRules;for(var c in u)Urt(\".js-plotly-plot .plotly .mapboxgl-\"+c,u[c])}l===\"map\"&&Zre(),(l===\"geo\"||l===\"mapbox\"||l===\"map\")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function Wrt(e){var t=e.name;if(tl.subplotsRegistry[t]){l3.log(\"Plot type \"+t+\" already registered.\");return}$re(e),tl.subplotsRegistry[t]=e;for(var r in tl.componentsRegistry)eie(r,e.name)}function Xrt(e){if(typeof e.name!=\"string\")throw new Error(\"Component module *name* must be a string.\");var t=e.name;tl.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&Kre(tl.layoutArrayContainers,t),$re(e));for(var r in tl.modules)Qre(t,r);for(var n in tl.subplotsRegistry)eie(t,n);e.schema&&e.schema.layout&&NO(Grt,e.schema.layout)}function Zrt(e){if(typeof e.name!=\"string\")throw new Error(\"Transform module *name* must be a string.\");var t=\"Transform module \"+e.name,r=typeof e.transform==\"function\",n=typeof e.calcTransform==\"function\";if(!r&&!n)throw new Error(t+\" is missing a *transform* or *calcTransform* method.\");r&&n&&l3.log([t+\" has both a *transform* and *calcTransform* methods.\",\"Please note that all *transform* methods are executed\",\"before all *calcTransform* methods.\"].join(\" \")),Nrt(e.attributes)||l3.log(t+\" registered without an *attributes* object.\"),typeof e.supplyDefaults!=\"function\"&&l3.log(t+\" registered without a *supplyDefaults* method.\")}function Yrt(e){var t=e.name,r=t.split(\"-\")[0],n=e.dictionary,i=e.format,a=n&&Object.keys(n).length,o=i&&Object.keys(i).length,s=tl.localeRegistry,l=s[t];if(l||(s[t]=l={}),r!==t){var u=s[r];u||(s[r]=u={}),a&&u.dictionary===l.dictionary&&(u.dictionary=n),o&&u.format===l.format&&(u.format=i)}a&&(l.dictionary=n),o&&(l.format=i)}function $re(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)Kre(tl.layoutArrayRegexes,t[r])}}function Qre(e,t){var r=tl.componentsRegistry[e].schema;if(!(!r||!r.traces)){var n=r.traces[t];n&&NO(tl.modules[t]._module.attributes,n)}}function eie(e,t){var r=tl.componentsRegistry[e].schema;if(!(!r||!r.subplots)){var n=tl.subplotsRegistry[t],i=n.layoutAttributes,a=n.attr===\"subplot\"?n.name:n.attr;Array.isArray(a)&&(a=a[0]);var o=r.subplots[a];i&&o&&NO(i,o)}}function tie(e){return typeof e==\"object\"&&(e=e.type),e}});var cie=ye(hh=>{\"use strict\";var Krt=e3().timeFormat,lie=Eo(),UO=G1(),X1=r3().mod,f3=hs(),_0=f3.BADNUM,bp=f3.ONEDAY,NS=f3.ONEHOUR,W1=f3.ONEMIN,c3=f3.ONESEC,US=f3.EPOCHJD,my=qa(),rie=e3().utcFormat,Jrt=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)(-(\\d?\\d)(-(\\d?\\d)([ Tt]([01]?\\d|2[0-3])(:([0-5]\\d)(:([0-5]\\d(\\.\\d+)?))?(Z|z|[+\\-]\\d\\d(:?\\d\\d)?)?)?)?)?)?\\s*$/m,$rt=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)(-(\\d?\\di?)(-(\\d?\\d)([ Tt]([01]?\\d|2[0-3])(:([0-5]\\d)(:([0-5]\\d(\\.\\d+)?))?(Z|z|[+\\-]\\d\\d(:?\\d\\d)?)?)?)?)?)?\\s*$/m,iie=new Date().getFullYear()-70;function yy(e){return e&&my.componentsRegistry.calendars&&typeof e==\"string\"&&e!==\"gregorian\"}hh.dateTick0=function(e,t){var r=Qrt(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=bp*(t-1),hh.ms2DateTime(n,0,e)};function Qrt(e,t){return yy(e)?t?my.getComponentMethod(\"calendars\",\"CANONICAL_SUNDAY\")[e]:my.getComponentMethod(\"calendars\",\"CANONICAL_TICK\")[e]:t?\"2000-01-02\":\"2000-01-01\"}hh.dfltRange=function(e){return yy(e)?my.getComponentMethod(\"calendars\",\"DFLTRANGE\")[e]:[\"2000-01-01\",\"2001-01-01\"]};hh.isJSDate=function(e){return typeof e==\"object\"&&e!==null&&typeof e.getTime==\"function\"};var k6,L6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*W1,n=(e.getUTCMinutes()-e.getMinutes())*W1+(e.getUTCSeconds()-e.getSeconds())*c3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*W1;r=r-i/2+X1(n-r+i/2,i)}return e=Number(e)-r,e>=k6&&e<=L6?e:_0}if(typeof e!=\"string\"&&typeof e!=\"number\")return _0;e=String(e);var a=yy(t),o=e.charAt(0);a&&(o===\"G\"||o===\"g\")&&(e=e.substr(1),t=\"\");var s=a&&t.substr(0,7)===\"chinese\",l=e.match(s?$rt:Jrt);if(!l)return _0;var u=l[1],c=l[3]||\"1\",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var x;try{var b=my.getComponentMethod(\"calendars\",\"getCal\")(t);if(s){var p=c.charAt(c.length-1)===\"i\";c=parseInt(c,10),x=b.newDate(u,b.toMonthIndex(u,c,p),f)}else x=b.newDate(u,Number(c),f)}catch(E){return _0}return x?(x.toJD()-US)*bp+h*NS+d*W1+v*c3:_0}u.length===2?u=(Number(u)+2e3-iie)%100+iie:u=Number(u),c-=1;var C=new Date(Date.UTC(2e3,c,f,h,d));return C.setUTCFullYear(u),C.getUTCMonth()!==c||C.getUTCDate()!==f?_0:C.getTime()+v*c3};k6=hh.MIN_MS=hh.dateTime2ms(\"-9999\");L6=hh.MAX_MS=hh.dateTime2ms(\"9999-12-31 23:59:59.9999\");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var C6=90*bp,nie=3*NS,aie=5*W1;hh.ms2DateTime=function(e,t,r){if(typeof e!=\"number\"||!(e>=k6&&e<=L6))return _0;t||(t=0);var n=Math.floor(X1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(yy(r)){var f=Math.floor(i/bp)+US,h=Math.floor(X1(e,bp));try{a=my.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(f).formatDate(\"yyyy-mm-dd\")}catch(d){a=rie(\"G%Y-%m-%d\")(new Date(i))}if(a.charAt(0)===\"-\")for(;a.length<11;)a=\"-0\"+a.substr(1);else for(;a.length<10;)a=\"0\"+a;o=t<C6?Math.floor(h/NS):0,s=t<C6?Math.floor(h%NS/W1):0,l=t<nie?Math.floor(h%W1/c3):0,u=t<aie?h%c3*10+n:0}else c=new Date(i),a=rie(\"%Y-%m-%d\")(c),o=t<C6?c.getUTCHours():0,s=t<C6?c.getUTCMinutes():0,l=t<nie?c.getUTCSeconds():0,u=t<aie?c.getUTCMilliseconds()*10+n:0;return uie(a,o,s,l,u)};hh.ms2DateTimeLocal=function(e){if(!(e>=k6+bp&&e<=L6-bp))return _0;var t=Math.floor(X1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Krt(\"%Y-%m-%d\")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return uie(n,i,a,o,s)};function uie(e,t,r,n,i){if((t||r||n||i)&&(e+=\" \"+u3(t,2)+\":\"+u3(r,2),(n||i)&&(e+=\":\"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+=\".\"+u3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e==\"number\"&&isFinite(e)){if(yy(r))return UO.error(\"JS Dates and milliseconds are incompatible with world calendars\",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return UO.error(\"unrecognized date\",e),t;return e};var eit=/%\\d?f/g,tit=/%h/g,rit={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};function oie(e,t,r,n){e=e.replace(eit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,\"\")||\"0\";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(tit,function(){return rit[r(\"%q\")(i)]}),yy(n))try{e=my.getComponentMethod(\"calendars\",\"worldCalFmt\")(e,t,n)}catch(a){return\"Invalid\"}return r(e)(i)}var iit=[59,59.9,59.99,59.999,59.9999];function nit(e,t){var r=X1(e+.05,bp),n=u3(Math.floor(r/NS),2)+\":\"+u3(X1(Math.floor(r/W1),60),2);if(t!==\"M\"){lie(t)||(t=0);var i=Math.min(X1(e/c3,60),iit[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=yy(i)&&i,!t)if(r===\"y\")t=a.year;else if(r===\"m\")t=a.month;else if(r===\"d\")t=a.dayMonth+`\n",
       "`+a.year;else return nit(e,r)+`\n",
       "`+oie(a.dayMonthYear,e,n,i);return oie(t,e,n,i)};var sie=3*bp;hh.incrementMonth=function(e,t,r){r=yy(r)&&r;var n=X1(e,bp);if(e=Math.round(e-n),r)try{var i=Math.round(e/bp)+US,a=my.getComponentMethod(\"calendars\",\"getCal\")(r),o=a.fromJD(i);return t%12?a.add(o,t,\"m\"):a.add(o,t/12,\"y\"),(o.toJD()-US)*bp+n}catch(l){UO.error(\"invalid ms \"+e+\" in calendar \"+r)}var s=new Date(e+sie);return s.setUTCMonth(s.getUTCMonth()+t)+n-sie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=yy(t)&&my.getComponentMethod(\"calendars\",\"getCal\")(t),u=0;u<e.length;u++){if(s=e[u],!lie(s)){a++;continue}if(!(s%bp))if(l)try{o=l.fromJD(s/bp+US),o.day()===1?o.month()===1?r++:n++:i++}catch(f){}else o=new Date(s),o.getUTCDate()===1?o.getUTCMonth()===0?r++:n++:i++}n+=r,i+=n;var c=e.length-a;return{exactYears:r/c,exactMonths:n/c,exactDays:i/c}}});var VS=ye((Lrr,fie)=>{\"use strict\";fie.exports=function(t){return t}});var P6=ye(_y=>{\"use strict\";var ait=Eo(),oit=G1(),sit=VS(),lit=hs().BADNUM,VO=1e-9;_y.findBin=function(e,t,r){if(ait(t.start))return r?Math.ceil((e-t.start)/t.size-VO)-1:Math.floor((e-t.start)/t.size+VO);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?uit:cit:l=r?hit:fit,e+=o*VO*(r?-1:1)*(o>=0?1:-1);n<i&&a++<100;)s=Math.floor((n+i)/2),l(t[s],e)?n=s+1:i=s;return a>90&&oit.log(\"Long binary search...\"),n-1};function uit(e,t){return e<t}function cit(e,t){return e<=t}function fit(e,t){return e>t}function hit(e,t){return e>=t}_y.sorterAsc=function(e,t){return e-t};_y.sorterDes=function(e,t){return t-e};_y.distinctVals=function(e){var t=e.slice();t.sort(_y.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===lit;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};_y.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n<i&&o++<100;)a=u((n+i)/2),t[a]<=e?n=a+s:i=a-l;return t[n]};_y.sort=function(e,t){for(var r=0,n=0,i=1;i<e.length;i++){var a=t(e[i],e[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};_y.findIndexOfMin=function(e,t){t=t||sit;for(var r=1/0,n,i=0;i<e.length;i++){var a=t(e[i]);a<r&&(r=a,n=i)}return n}});var Z1=ye((Irr,hie)=>{\"use strict\";hie.exports=function(t){return Object.keys(t).sort()}});var die=ye(dh=>{\"use strict\";var GS=Eo(),dit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),GS(t)||(t=!1),dit(r[0])){for(a=new Array(n),i=0;i<n;i++)a[i]=dh.aggNums(e,t,r[i]);r=a}for(i=0;i<n;i++)GS(t)?GS(r[i])&&(t=e(+t,+r[i])):t=r[i];return t};dh.len=function(e){return dh.aggNums(function(t){return t+1},0,e)};dh.mean=function(e,t){return t||(t=dh.len(e)),dh.aggNums(function(r,n){return r+n},0,e)/t};dh.geometricMean=function(e,t){return t||(t=dh.len(e)),Math.pow(dh.aggNums(function(r,n){return r*n},1,e),1/t)};dh.midRange=function(e){if(!(e===void 0||e.length===0))return(dh.aggNums(Math.max,null,e)+dh.aggNums(Math.min,null,e))/2};dh.variance=function(e,t,r){return t||(t=dh.len(e)),GS(r)||(r=dh.mean(e,t)),dh.aggNums(function(n,i){return n+Math.pow(i-r,2)},0,e)/t};dh.stdev=function(e,t,r){return Math.sqrt(dh.variance(e,t,r))};dh.median=function(e){var t=e.slice().sort();return dh.interp(t,.5)};dh.interp=function(e,t){if(!GS(t))throw\"n should be a finite number\";if(t=t*e.length-.5,t<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var yie=ye((Drr,mie)=>{\"use strict\";var vie=r3(),GO=vie.mod,vit=vie.modHalf,HS=Math.PI,Y1=2*HS;function pit(e){return e/180*HS}function git(e){return e/HS*180}function HO(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function pie(e,t){return vit(t-e,Y1)}function mit(e,t){return Math.abs(pie(e,t))}function gie(e,t){if(HO(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),r=GO(r,Y1),n=GO(n,Y1),r>n&&(n+=Y1);var i=GO(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function yit(e,t,r,n){if(!gie(t,n))return!1;var i,a;return r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),e>=i&&e<=a}function jO(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=HO([r,n]),l,u,c,f,h;s?(l=0,u=HS,c=Y1):r<n?(l=r,c=n):(l=n,c=r),e<t?(f=e,h=t):(f=t,h=e);function d(p,C){return[p*Math.cos(C)+i,a-p*Math.sin(C)]}var v=Math.abs(c-l)<=HS?0:1;function x(p,C,E){return\"A\"+[p,p]+\" \"+[0,v,E]+\" \"+d(p,C)}var b;return s?f===null?b=\"M\"+d(h,l)+x(h,u,0)+x(h,c,0)+\"Z\":b=\"M\"+d(f,l)+x(f,u,0)+x(f,c,0)+\"ZM\"+d(h,l)+x(h,u,1)+x(h,c,1)+\"Z\":f===null?(b=\"M\"+d(h,l)+x(h,c,0),o&&(b+=\"L0,0Z\")):b=\"M\"+d(f,l)+\"L\"+d(h,l)+x(h,c,0)+\"L\"+d(f,c)+x(f,l,1)+\"Z\",b}function _it(e,t,r,n,i){return jO(null,e,t,r,n,i,0)}function xit(e,t,r,n,i){return jO(null,e,t,r,n,i,1)}function bit(e,t,r,n,i,a){return jO(e,t,r,n,i,a,1)}mie.exports={deg2rad:pit,rad2deg:git,angleDelta:pie,angleDist:mit,isFullCircle:HO,isAngleInsideSector:gie,isPtInsideSector:yit,pathArc:_it,pathSector:xit,pathAnnulus:bit}});var _ie=ye(fb=>{\"use strict\";fb.isLeftAnchor=function(t){return t.xanchor===\"left\"||t.xanchor===\"auto\"&&t.x<=1/3};fb.isCenterAnchor=function(t){return t.xanchor===\"center\"||t.xanchor===\"auto\"&&t.x>1/3&&t.x<2/3};fb.isRightAnchor=function(t){return t.xanchor===\"right\"||t.xanchor===\"auto\"&&t.x>=2/3};fb.isTopAnchor=function(t){return t.yanchor===\"top\"||t.yanchor===\"auto\"&&t.y>=2/3};fb.isMiddleAnchor=function(t){return t.yanchor===\"middle\"||t.yanchor===\"auto\"&&t.y>1/3&&t.y<2/3};fb.isBottomAnchor=function(t){return t.yanchor===\"bottom\"||t.yanchor===\"auto\"&&t.y<=1/3}});var wie=ye(hb=>{\"use strict\";var WO=r3().mod;hb.segmentsIntersect=bie;function bie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var x=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,l){if(bie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,x=Math.min(I6(u,c,d,a-t,o-r),I6(u,c,d,s-t,l-r),I6(f,h,v,t-a,r-o),I6(f,h,v,n-a,i-o));return Math.sqrt(x)};function I6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var R6,XO,xie;hb.getTextLocation=function(t,r,n,i){if((t!==XO||i!==xie)&&(R6={},XO=t,xie=i),R6[n])return R6[n];var a=t.getPointAtLength(WO(n-i/2,r)),o=t.getPointAtLength(WO(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(WO(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return R6[n]=f,f};hb.clearLocationCache=function(){XO=null};hb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(x){var b=t.getPointAtLength(x);x===0?f=b:x===u&&(h=b);var p=b.x<i?i-b.x:b.x>a?b.x-a:0,C=b.y<o?o-b.y:b.y>s?b.y-s:0;return Math.sqrt(p*p+C*C)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};hb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u<s;){if(h=(c+f)/2,d=t.getPointAtLength(h),v=d[n]-r,Math.abs(v)<o)return d;l*v>0?f=h:c=h,u++}return d}});var D6=ye(jS=>{\"use strict\";var xy={};jS.throttle=function(t,r,n){var i=xy[t],a=Date.now();if(!i){for(var o in xy)xy[o].ts<a-6e4&&delete xy[o];i=xy[t]={ts:0,timer:null}}Tie(i);function s(){n(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}if(a>i.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};jS.done=function(e){var t=xy[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};jS.clear=function(e){if(e)Tie(xy[e]),delete xy[e];else for(var t in xy)jS.clear(t)};function Tie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Sie=ye((qrr,Aie)=>{\"use strict\";Aie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener(\"resize\",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Mie=ye((Brr,F6)=>{\"use strict\";F6.exports=ZO;F6.exports.isMobile=ZO;F6.exports.default=ZO;var wit=/(android|bb\\d+|meego).+mobile|armv7l|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,Tit=/CrOS/,Ait=/android|ipad|playbook|silk/i;function ZO(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!=\"undefined\"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers[\"user-agent\"]==\"string\"&&(t=t.headers[\"user-agent\"]),typeof t!=\"string\")return!1;let r=wit.test(t)&&!Tit.test(t)||!!e.tablet&&Ait.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf(\"Macintosh\")!==-1&&t.indexOf(\"Safari\")!==-1&&(r=!0),r}});var Cie=ye((Nrr,Eie)=>{\"use strict\";var Sit=Eo(),Mit=Mie();Eie.exports=function(t){var r;if(t&&t.hasOwnProperty(\"userAgent\")?r=t.userAgent:r=Eit(),typeof r!=\"string\")return!0;var n=Mit({ua:{headers:{\"user-agent\":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(\" \"),a=1;a<i.length;a++){var o=i[a];if(o.indexOf(\"Safari\")!==-1)for(var s=a-1;s>-1;s--){var l=i[s];if(l.substr(0,8)===\"Version/\"){var u=l.substr(8).split(\".\")[0];if(Sit(u)&&(u=+u),u>=13)return!0}}}return n};function Eit(){var e;return typeof navigator!=\"undefined\"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers[\"user-agent\"]==\"string\"&&(e=e.headers[\"user-agent\"]),e}});var Lie=ye((Urr,kie)=>{\"use strict\";var Cit=Oa();kie.exports=function(t,r,n){var i=t.selectAll(\"g.\"+n.replace(/\\s/g,\".\")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append(\"g\").attr(\"class\",n),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each(function(o){o[0][a]=Cit.select(this)}),i}});var Iie=ye((Vrr,Pie)=>{\"use strict\";var kit=qa();Pie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=kit.localeRegistry}var u=n.split(\"-\")[0];if(u===n)break;n=u}return r}});var YO=ye((Grr,Rie)=>{\"use strict\";Rie.exports=function(t){for(var r={},n=[],i=0,a=0;a<t.length;a++){var o=t[a];r[o]!==1&&(r[o]=1,n[i++]=o)}return n}});var Fie=ye((Hrr,Die)=>{\"use strict\";Die.exports=function(t){for(var r=Iit(t)?Pit:Lit,n=[],i=0;i<t.length;i++){var a=t[i];r(a)&&n.push(a)}return n};function Lit(e){return e.visible===!0}function Pit(e){var t=e[0].trace;return t.visible===!0&&t._length!==0}function Iit(e){return Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace}});var Oie=ye((jrr,zie)=>{\"use strict\";zie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf(\"e+\")===-1&&(i=+l)}}return i}});var Bie=ye((Wrr,qie)=>{\"use strict\";var Rit=Eo(),Dit=hs().BADNUM,Fit=/^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;qie.exports=function(t){return typeof t==\"string\"&&(t=t.replace(Fit,\"\")),Rit(t)?Number(t):Dit}});var Dr=ye((Xrr,$ie)=>{\"use strict\";var WS=Oa(),zit=e3().utcFormat,Oit=yO().format,jie=Eo(),Wie=hs(),Xie=Wie.FP_SAFE,qit=-Xie,Nie=Wie.BADNUM,Si=$ie.exports={};Si.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:t===\"0.f\"?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var Uie={};Si.warnBadFormat=function(e){var t=String(e);Uie[t]||(Uie[t]=1,Si.warn('encountered bad format: \"'+t+'\"'))};Si.noFormat=function(e){return String(e)};Si.numberFormat=function(e){var t;try{t=Oit(Si.adjustFormat(e))}catch(r){return Si.warnBadFormat(e),Si.noFormat}return t};Si.nestedProperty=CS();Si.keyedContainer=Ree();Si.relativeAttr=Fee();Si.isPlainObject=gy();Si.toLogRange=p6();Si.relinkPrivateKeys=Bee();var K1=vv();Si.isArrayBuffer=K1.isArrayBuffer;Si.isTypedArray=K1.isTypedArray;Si.isArrayOrTypedArray=K1.isArrayOrTypedArray;Si.isArray1D=K1.isArray1D;Si.ensureArray=K1.ensureArray;Si.concat=K1.concat;Si.maxRowLength=K1.maxRowLength;Si.minRowLength=K1.minRowLength;var Zie=r3();Si.mod=Zie.mod;Si.modHalf=Zie.modHalf;var J1=nte();Si.valObjectMeta=J1.valObjectMeta;Si.coerce=J1.coerce;Si.coerce2=J1.coerce2;Si.coerceFont=J1.coerceFont;Si.coercePattern=J1.coercePattern;Si.coerceHoverinfo=J1.coerceHoverinfo;Si.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;Si.validate=J1.validate;var jp=cie();Si.dateTime2ms=jp.dateTime2ms;Si.isDateTime=jp.isDateTime;Si.ms2DateTime=jp.ms2DateTime;Si.ms2DateTimeLocal=jp.ms2DateTimeLocal;Si.cleanDate=jp.cleanDate;Si.isJSDate=jp.isJSDate;Si.formatDate=jp.formatDate;Si.incrementMonth=jp.incrementMonth;Si.dateTick0=jp.dateTick0;Si.dfltRange=jp.dfltRange;Si.findExactDates=jp.findExactDates;Si.MIN_MS=jp.MIN_MS;Si.MAX_MS=jp.MAX_MS;var db=P6();Si.findBin=db.findBin;Si.sorterAsc=db.sorterAsc;Si.sorterDes=db.sorterDes;Si.distinctVals=db.distinctVals;Si.roundUp=db.roundUp;Si.sort=db.sort;Si.findIndexOfMin=db.findIndexOfMin;Si.sortObjectKeys=Z1();var by=die();Si.aggNums=by.aggNums;Si.len=by.len;Si.mean=by.mean;Si.geometricMean=by.geometricMean;Si.median=by.median;Si.midRange=by.midRange;Si.variance=by.variance;Si.stdev=by.stdev;Si.interp=by.interp;var yg=b6();Si.init2dArray=yg.init2dArray;Si.transposeRagged=yg.transposeRagged;Si.dot=yg.dot;Si.translationMatrix=yg.translationMatrix;Si.rotationMatrix=yg.rotationMatrix;Si.rotationXYMatrix=yg.rotationXYMatrix;Si.apply3DTransform=yg.apply3DTransform;Si.apply2DTransform=yg.apply2DTransform;Si.apply2DTransform2=yg.apply2DTransform2;Si.convertCssMatrix=yg.convertCssMatrix;Si.inverseTransformMatrix=yg.inverseTransformMatrix;var vm=yie();Si.deg2rad=vm.deg2rad;Si.rad2deg=vm.rad2deg;Si.angleDelta=vm.angleDelta;Si.angleDist=vm.angleDist;Si.isFullCircle=vm.isFullCircle;Si.isAngleInsideSector=vm.isAngleInsideSector;Si.isPtInsideSector=vm.isPtInsideSector;Si.pathArc=vm.pathArc;Si.pathSector=vm.pathSector;Si.pathAnnulus=vm.pathAnnulus;var d3=_ie();Si.isLeftAnchor=d3.isLeftAnchor;Si.isCenterAnchor=d3.isCenterAnchor;Si.isRightAnchor=d3.isRightAnchor;Si.isTopAnchor=d3.isTopAnchor;Si.isMiddleAnchor=d3.isMiddleAnchor;Si.isBottomAnchor=d3.isBottomAnchor;var v3=wie();Si.segmentsIntersect=v3.segmentsIntersect;Si.segmentDistance=v3.segmentDistance;Si.getTextLocation=v3.getTextLocation;Si.clearLocationCache=v3.clearLocationCache;Si.getVisibleSegment=v3.getVisibleSegment;Si.findPointOnPath=v3.findPointOnPath;var q6=Ao();Si.extendFlat=q6.extendFlat;Si.extendDeep=q6.extendDeep;Si.extendDeepAll=q6.extendDeepAll;Si.extendDeepNoArrays=q6.extendDeepNoArrays;var KO=G1();Si.log=KO.log;Si.warn=KO.warn;Si.error=KO.error;var Bit=n3();Si.counterRegex=Bit.counter;var JO=D6();Si.throttle=JO.throttle;Si.throttleDone=JO.done;Si.clearThrottle=JO.clear;var _g=OS();Si.getGraphDiv=_g.getGraphDiv;Si.isPlotDiv=_g.isPlotDiv;Si.removeElement=_g.removeElement;Si.addStyleRule=_g.addStyleRule;Si.addRelatedStyleRule=_g.addRelatedStyleRule;Si.deleteRelatedStyleRule=_g.deleteRelatedStyleRule;Si.setStyleOnHover=_g.setStyleOnHover;Si.getFullTransformMatrix=_g.getFullTransformMatrix;Si.getElementTransformMatrix=_g.getElementTransformMatrix;Si.getElementAndAncestors=_g.getElementAndAncestors;Si.equalDomRects=_g.equalDomRects;Si.clearResponsive=Sie();Si.preserveDrawingBuffer=Cie();Si.makeTraceGroups=Lie();Si._=Iie();Si.notifier=kO();Si.filterUnique=YO();Si.filterVisible=Fie();Si.pushUnique=IO();Si.increment=Oie();Si.cleanNumber=Bie();Si.ensureNumber=function(t){return jie(t)?(t=Number(t),t>Xie||t<qit?Nie:t):Nie};Si.isIndex=function(e,t){return t!==void 0&&e>=t?!1:jie(e)&&e>=0&&e%1===0};Si.noop=x6();Si.identity=VS();Si.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r};Si.swapAttrs=function(e,t,r,n){r||(r=\"x\"),n||(n=\"y\");for(var i=0;i<t.length;i++){var a=t[i],o=Si.nestedProperty(e,a.replace(\"?\",r)),s=Si.nestedProperty(e,a.replace(\"?\",n)),l=o.get();o.set(s.get()),s.set(l)}};Si.raiseToTop=function(t){t.parentNode.appendChild(t)};Si.cancelTransition=function(e){return e.transition().duration(0)};Si.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Si.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Si.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s<a;s++)o[s]=t(e[s],r,n,i);return o};Si.randstr=function e(t,r,n,i){if(n||(n=16),r===void 0&&(r=24),r<=0)return\"0\";var a=Math.log(Math.pow(2,r))/Math.log(n),o=\"\",s,l,u;for(s=2;a===1/0;s*=2)a=Math.log(Math.pow(2,r/s))/Math.log(n)*s;var c=a-Math.floor(a);for(s=0;s<Math.floor(a);s++)u=Math.floor(Math.random()*n).toString(n),o=u+o;c&&(l=Math.pow(n,c),u=Math.floor(Math.random()*l).toString(n),o=u+o);var f=parseInt(o,n);return t&&t[o]||f!==1/0&&f>=Math.pow(2,r)?i>10?(Si.warn(\"randstr failed uniqueness\"),o):e(t,r,n,(i||0)+1):o};Si.OptionControl=function(e,t){e||(e={}),t||(t=\"opt\");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r[\"_\"+t]=e,r};Si.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s<i;s++)a[s]=(1-Math.cos(Math.PI*(s+1)/t))/(2*t);for(s=0;s<r;s++){for(c=0,l=0;l<i;l++)u=s+l+1-t,u<-r?u-=n*Math.round(u/n):u>=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Si.syncOrAsync=function(e,t,r){var n,i;function a(){return Si.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Si.stripTrailingSlash=function(e){return e.substr(-1)===\"/\"?e.substr(0,e.length-1):e};Si.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a<r.length;a++)o=e[r[a]],o!=null?n=!0:i=!1;if(n&&!i)for(a=0;a<r.length;a++)e[r[a]]=t[r[a]]}};Si.mergeArray=function(e,t,r,n){var i=typeof n==\"function\";if(Si.isArrayOrTypedArray(e))for(var a=Math.min(e.length,t.length),o=0;o<a;o++){var s=e[o];t[o][r]=i?n(s):s}};Si.mergeArrayCastPositive=function(e,t,r){return Si.mergeArray(e,t,r,function(n){var i=+n;return isFinite(i)&&i>0?i:0})};Si.fillArray=function(e,t,r,n){if(n=n||Si.identity,Si.isArrayOrTypedArray(e))for(var i=0;i<t.length;i++)t[i][r]=n(e[i])};Si.castOption=function(e,t,r,n){n=n||Si.identity;var i=Si.nestedProperty(e,r).get();return Si.isArrayOrTypedArray(i)?Array.isArray(t)&&Si.isArrayOrTypedArray(i[t[0]])?n(i[t[0]][t[1]]):n(i[t]):i};Si.extractOption=function(e,t,r,n){if(r in e)return e[r];var i=Si.nestedProperty(t,n).get();if(!Array.isArray(i))return i};function Yie(e){var t={};for(var r in e)for(var n=e[r],i=0;i<n.length;i++)t[n[i]]=+r;return t}Si.tagSelected=function(e,t,r){var n=t.selectedpoints,i=t._indexToPoints,a;i&&(a=Yie(i));function o(f){return f!==void 0&&f<e.length}for(var s=0;s<n.length;s++){var l=n[s];if(Si.isIndex(l)||Si.isArrayOrTypedArray(l)&&Si.isIndex(l[0])&&Si.isIndex(l[1])){var u=a?a[l]:l,c=r?r[u]:u;o(c)&&(e[c].selected=1)}}};Si.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=Yie(r),i=[],a=0;a<t.length;a++){var o=t[a];if(Si.isIndex(o)){var s=n[o];Si.isIndex(s)&&i.push(s)}}return i}else return t};Si.getTargetArray=function(e,t){var r=t.target;if(typeof r==\"string\"&&r){var n=Si.nestedProperty(e,r).get();return Si.isArrayOrTypedArray(n)?n:!1}else if(Si.isArrayOrTypedArray(r))return r;return!1};function Kie(e,t,r){var n={};typeof t!=\"object\"&&(t={});var i=r===\"pieLike\"?-1:3,a=Object.keys(e),o,s,l;for(o=0;o<a.length;o++)s=a[o],l=e[s],!(s.charAt(0)===\"_\"||typeof l==\"function\")&&(s===\"module\"?n[s]=l:Array.isArray(l)?s===\"colorscale\"||i===-1?n[s]=l.slice():n[s]=l.slice(0,i):Si.isTypedArray(l)?i===-1?n[s]=l.subarray():n[s]=l.subarray(0,i):l&&typeof l==\"object\"?n[s]=Kie(e[s],t[s],r):n[s]=l);for(a=Object.keys(t),o=0;o<a.length;o++)s=a[o],l=t[s],(typeof l!=\"object\"||!(s in n)||typeof n[s]!=\"object\")&&(n[s]=l);return n}Si.minExtend=Kie;Si.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)};Si.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])!==-1)return!0;return!1};var Nit=/Version\\/[\\d\\.]+.*Safari/;Si.isSafari=function(){return Nit.test(window.navigator.userAgent)};var Uit=/iPad|iPhone|iPod/;Si.isIOS=function(){return Uit.test(window.navigator.userAgent)};var Vit=/Macintosh.+AppleWebKit.+Gecko\\)$/;Si.isMacWKWebView=()=>Vit.test(window.navigator.userAgent);var Git=/Firefox\\/(\\d+)\\.\\d+/;Si.getFirefoxVersion=function(){var e=Git.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Si.isD3Selection=function(e){return e instanceof WS.selection};Si.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?\".\"+r:\"\"));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Si.ensureSingleById=function(e,t,r,n){var i=e.select(t+\"#\"+r);if(i.size())return i;var a=e.append(t).attr(\"id\",r);return n&&a.call(n),a};Si.objectFromPath=function(e,t){for(var r=e.split(\".\"),n,i=n={},a=0;a<r.length;a++){var o=r[a],s=null,l=r[a].match(/(.*)\\[([0-9]+)\\]/);l?(o=l[1],s=l[2],n=n[o]=[],a===r.length-1?n[s]=t:n[s]={},n=n[s]):(a===r.length-1?n[o]=t:n[o]={},n=n[o])}return i};var Hit=/^([^\\[\\.]+)\\.(.+)?/,jit=/^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;function z6(e){return e.slice(0,2)===\"__\"}Si.expandObjectPaths=function(e){var t,r,n,i,a,o,s;if(typeof e==\"object\"&&!Array.isArray(e)){for(r in e)if(e.hasOwnProperty(r))if(t=r.match(Hit)){if(i=e[r],n=t[1],z6(n))continue;delete e[r],e[n]=Si.extendDeepNoArrays(e[n]||{},Si.objectFromPath(r,Si.expandObjectPaths(i))[n])}else if(t=r.match(jit)){if(i=e[r],n=t[1],z6(n))continue;if(a=parseInt(t[2]),delete e[r],e[n]=e[n]||[],t[3]===\".\")s=t[4],o=e[n][a]=e[n][a]||{},Si.extendDeepNoArrays(o,Si.objectFromPath(s,Si.expandObjectPaths(i)));else{if(z6(n))continue;e[n][a]=Si.expandObjectPaths(i)}}else{if(z6(r))continue;e[r]=Si.expandObjectPaths(e[r])}}return e};Si.numSeparate=function(e,t,r){if(r||(r=!1),typeof t!=\"string\"||t.length===0)throw new Error(\"Separator string required for formatting!\");typeof e==\"number\"&&(e=String(e));var n=/(\\d+)(\\d{3})/,i=t.charAt(0),a=t.charAt(1),o=e.split(\".\"),s=o[0],l=o.length>1?i+o[1]:\"\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\"$1\"+a+\"$2\");return s+l};Si.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var Jie=/^\\w*$/;Si.templateString=function(e,t){var r={};return e.replace(Si.TEMPLATE_STRING_REGEX,function(n,i){var a;return Jie.test(i)?a=t[i]:(r[i]=r[i]||Si.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:\"\"})};var Wit={max:10,count:0,name:\"hovertemplate\"};Si.hovertemplateString=function(){return $O.apply(Wit,arguments)};var Xit={max:10,count:0,name:\"texttemplate\"};Si.texttemplateString=function(){return $O.apply(Xit,arguments)};var Zit=/^(\\S+)([\\*\\/])(-?\\d+(\\.\\d+)?)$/;function Yit(e){var t=e.match(Zit);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Kit={max:10,count:0,name:\"texttemplate\",parseMultDiv:!0};Si.texttemplateStringForShapes=function(){return $O.apply(Kit,arguments)};var Vie=/^[:|\\|]/;function $O(e,t,r){var n=this,i=arguments;return t||(t={}),e.replace(Si.TEMPLATE_STRING_REGEX,function(a,o,s){var l=o===\"xother\"||o===\"yother\",u=o===\"_xother\"||o===\"_yother\",c=o===\"_xother_\"||o===\"_yother_\",f=o===\"xother_\"||o===\"yother_\",h=l||u||f||c,d=o;(u||c)&&(d=d.substring(1)),(f||c)&&(d=d.substring(0,d.length-1));var v=null,x=null;if(n.parseMultDiv){var b=Yit(d);d=b.key,v=b.op,x=b.number}var p;if(h){if(p=t[d],p===void 0)return\"\"}else{var C,E;for(E=3;E<i.length;E++)if(C=i[E],!!C){if(C.hasOwnProperty(d)){p=C[d];break}if(Jie.test(d)||(p=Si.nestedProperty(C,d).get(!0)),p!==void 0)break}}if(p!==void 0&&(v===\"*\"&&(p*=x),v===\"/\"&&(p/=x)),p===void 0&&n)return n.count<n.max&&(Si.warn(\"Variable '\"+d+\"' in \"+n.name+\" could not be found!\"),p=a),n.count===n.max&&Si.warn(\"Too many \"+n.name+\" warnings - additional warnings will be suppressed\"),n.count++,a;if(s){var A;if(s[0]===\":\"&&(A=r?r.numberFormat:Si.numberFormat,p!==\"\"&&(p=A(s.replace(Vie,\"\"))(p))),s[0]===\"|\"){A=r?r.timeFormat:zit;var L=Si.dateTime2ms(p);p=Si.formatDate(L,s.replace(Vie,\"\"),!1,A)}}else{var _=d+\"Label\";t.hasOwnProperty(_)&&(p=t[_])}return h&&(p=\"(\"+p+\")\",(u||c)&&(p=\" \"+p),(f||c)&&(p=p+\" \")),p})}var O6=48,Gie=57;Si.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,i=0,a=0;a<r;a++){var o=e.charCodeAt(a)||0,s=t.charCodeAt(a)||0,l=o>=O6&&o<=Gie,u=s>=O6&&s<=Gie;if(l&&(n=10*n+o-O6),u&&(i=10*i+s-O6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;Si.seedPseudoRandom=function(){h3=2e9};Si.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?Si.pseudoRandom():h3/4294967296};Si.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Si.extractOption(e,t,\"htx\",\"hovertext\");if(Si.isValidTextValue(i))return n(i);var a=Si.extractOption(e,t,\"tx\",\"text\");if(Si.isValidTextValue(a))return n(a)};Si.isValidTextValue=function(e){return e||e===0};Si.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+\"%\",n=0;n<t;n++)r.indexOf(\".\")!==-1&&(r=r.replace(\"0%\",\"%\"),r=r.replace(\".%\",\"%\"));return r};Si.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||t===\"none\"};Si.strTranslate=function(e,t){return e||t?\"translate(\"+e+\",\"+t+\")\":\"\"};Si.strRotate=function(e){return e?\"rotate(\"+e+\")\":\"\"};Si.strScale=function(e){return e!==1?\"scale(\"+e+\")\":\"\"};Si.getTextTransform=function(e){var t=e.noCenter,r=e.textX,n=e.textY,i=e.targetX,a=e.targetY,o=e.anchorX||0,s=e.anchorY||0,l=e.rotate,u=e.scale;return u?u>1&&(u=1):u=0,Si.strTranslate(i-u*(r+o),a-u*(n+s))+Si.strScale(u)+(l?\"rotate(\"+l+(t?\"\":\" \"+r+\" \"+n)+\")\":\"\")};Si.setTransormAndDisplay=function(e,t){e.attr(\"transform\",Si.getTextTransform(t)),e.style(\"display\",t.scale?null:\"none\")};Si.ensureUniformFontSize=function(e,t){var r=Si.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Si.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Si.bigFont=function(e){return Math.round(1.2*e)};var Hie=Si.getFirefoxVersion(),Jit=Hie!==null&&Hie<86;Si.getPositionFromD3Event=function(){return Jit?[WS.event.layerX,WS.event.layerY]:[WS.event.offsetX,WS.event.offsetY]}});var tne=ye(()=>{\"use strict\";var $it=Dr(),Qie={\"X,X div\":'direction:ltr;font-family:\"Open Sans\",verdana,arial,sans-serif;margin:0;padding:0;',\"X input,X button\":'font-family:\"Open Sans\",verdana,arial,sans-serif;',\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg a\":\"fill:#447adb;\",\"X svg a:hover\":\"fill:#3c6dc5;\",\"X .main-svg\":\"position:absolute;top:0;left:0;pointer-events:none;\",\"X .main-svg .draglayer\":\"pointer-events:all;\",\"X .cursor-default\":\"cursor:default;\",\"X .cursor-pointer\":\"cursor:pointer;\",\"X .cursor-crosshair\":\"cursor:crosshair;\",\"X .cursor-move\":\"cursor:move;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .cursor-grab\":\"cursor:-webkit-grab;cursor:grab;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;\",\"X .ease-bg\":\"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;\",\"X .modebar--hover>:not(.watermark)\":\"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;\",\"X:hover .modebar--hover .modebar-group\":\"opacity:1;\",\"X:focus-within .modebar--hover .modebar-group\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-group a\":\"display:grid;place-content:center;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);\",\"X .modebar-btn svg\":\"position:relative;\",\"X .modebar-btn:focus-visible\":\"outline:1px solid #000;outline-offset:1px;border-radius:3px;\",\"X .modebar.vertical\":\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\",\"X .modebar.vertical svg\":\"top:-1px;\",\"X .modebar.vertical .modebar-group\":\"display:block;float:none;padding-left:0px;padding-bottom:8px;\",\"X .modebar.vertical .modebar-group .modebar-btn\":\"display:block;text-align:center;\",\"X [data-title]:before,X [data-title]:after\":\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":'content:\"\";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',\"X [data-title]:after\":\"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\",\"X .vertical [data-title]:before,X .vertical [data-title]:after\":\"top:0%;right:200%;\",\"X .vertical [data-title]:before\":\"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;\",Y:'font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',\"Y p\":\"margin:0;\",\"Y .notifier-note\":\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\",\"Y .notifier-close\":\"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\",\"Y .notifier-close:hover\":\"color:#444;text-decoration:none;cursor:pointer;\"};for(QO in Qie)ene=QO.replace(/^,/,\" ,\").replace(/X/g,\".js-plotly-plot .plotly\").replace(/Y/g,\".plotly-notifier\"),$it.addStyleRule(ene,Qie[QO]);var ene,QO});var eq=ye((Krr,rne)=>{rne.exports=!0});var rq=ye((Jrr,ine)=>{\"use strict\";var Qit=eq(),tq;typeof window.matchMedia==\"function\"?tq=!window.matchMedia(\"(hover: none)\").matches:tq=Qit;ine.exports=tq});var vb=ye(($rr,iq)=>{\"use strict\";var p3=typeof Reflect==\"object\"?Reflect:null,nne=p3&&typeof p3.apply==\"function\"?p3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},B6;p3&&typeof p3.ownKeys==\"function\"?B6=p3.ownKeys:Object.getOwnPropertySymbols?B6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:B6=function(t){return Object.getOwnPropertyNames(t)};function ent(e){console&&console.warn&&console.warn(e)}var one=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}iq.exports=Jc;iq.exports.once=nnt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var ane=10;function N6(e){if(typeof e!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,\"defaultMaxListeners\",{enumerable:!0,get:function(){return ane},set:function(e){if(typeof e!=\"number\"||e<0||one(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");ane=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||one(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this};function sne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return sne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t===\"error\",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l==\"function\")nne(l,this,r);else for(var u=l.length,c=hne(l,u),n=0;n<u;++n)nne(c[n],this,r);return!0};function lne(e,t,r,n){var i,a,o;if(N6(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(\"newListener\",t,r.listener?r.listener:r),a=e._events),o=a[t]),o===void 0)o=a[t]=r,++e._eventsCount;else if(typeof o==\"function\"?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=sne(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error(\"Possible EventEmitter memory leak detected. \"+o.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");s.name=\"MaxListenersExceededWarning\",s.emitter=e,s.type=t,s.count=o.length,ent(s)}return e}Jc.prototype.addListener=function(t,r){return lne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return lne(this,t,r,!0)};function tnt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function une(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=tnt.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return N6(r),this.on(t,une(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return N6(r),this.prependListener(t,une(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(N6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit(\"removeListener\",t,n.listener||r));else if(typeof n!=\"function\"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():rnt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit(\"removeListener\",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i<a.length;++i)o=a[i],o!==\"removeListener\"&&this.removeAllListeners(o);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r==\"function\")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function cne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i==\"function\"?r?[i.listener||i]:[i]:r?int(i):hne(i,i.length)}Jc.prototype.listeners=function(t){return cne(this,t,!0)};Jc.prototype.rawListeners=function(t){return cne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount==\"function\"?e.listenerCount(t):fne.call(e,t)};Jc.prototype.listenerCount=fne;function fne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r==\"function\")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?B6(this._events):[]};function hne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function rnt(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function int(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function nnt(e,t){return new Promise(function(r,n){function i(o){e.removeListener(t,a),n(o)}function a(){typeof e.removeListener==\"function\"&&e.removeListener(\"error\",i),r([].slice.call(arguments))}dne(e,t,a,{once:!0}),t!==\"error\"&&ant(e,i,{once:!0})})}function ant(e,t,r){typeof e.on==\"function\"&&dne(e,\"error\",t,r)}function dne(e,t,r,n){if(typeof e.on==\"function\")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener==\"function\")e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)});else throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof e)}});var g3=ye((Qrr,vne)=>{\"use strict\";var nq=vb().EventEmitter,ont={init:function(e){if(e._ev instanceof nq)return e;var t=new nq,r=new nq;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener==\"function\"&&e.addEventListener(\"wheel\",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s<a.length-1;s++)o(a[s]);return n=o(a[s]),n},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};vne.exports=ont});var mne=ye((eir,gne)=>{\"use strict\";var pne=Dr(),snt=ub().dfltConfig;function lnt(e,t){for(var r=[],n,i=0;i<t.length;i++)n=t[i],n===e?r[i]=n:typeof n==\"object\"?r[i]=Array.isArray(n)?pne.extendDeep([],n):pne.extendDeepAll({},n):r[i]=n;return r}var wy={};wy.add=function(e,t,r,n,i){var a,o;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},o=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(o,e.undoQueue.queue.length-o,a),e.undoQueue.index+=1):a=e.undoQueue.queue[o-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(i)),e.undoQueue.queue.length>snt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wy.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.undo.calls.length;n++)wy.plotDo(t,r.undo.calls[n],r.undo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1}};wy.redo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.redo.calls.length;n++)wy.plotDo(t,r.redo.calls[n],r.redo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}};wy.plotDo=function(e,t,r){e.autoplay=!0,r=lnt(e,r),t.apply(null,r)};gne.exports=wy});var aq=ye((tir,yne)=>{\"use strict\";yne.exports={_isLinkedToArray:\"frames_entry\",group:{valType:\"string\"},name:{valType:\"string\"},traces:{valType:\"any\"},baseframe:{valType:\"string\"},data:{valType:\"any\"},layout:{valType:\"any\"}}});var _3=ye(Yh=>{\"use strict\";var x0=qa(),XS=Dr(),V6=Gl(),oq=s3(),unt=aq(),cnt=qS(),fnt=ub().configAttributes,_ne=mc(),xg=XS.extendDeepAll,m3=XS.isPlainObject,hnt=XS.isArrayOrTypedArray,G6=XS.nestedProperty,dnt=XS.valObjectMeta,sq=\"_isSubplotObj\",H6=\"_isLinkedToArray\",vnt=\"_arrayAttrRegexps\",bne=\"_deprecated\",lq=[sq,H6,vnt,bne];Yh.IS_SUBPLOT_OBJ=sq;Yh.IS_LINKED_TO_ARRAY=H6;Yh.DEPRECATED=bne;Yh.UNDERSCORE_ATTRS=lq;Yh.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=gnt(t)}),{defs:{valObjects:dnt,metaKeys:lq.concat([\"description\",\"role\",\"editType\",\"impliedEdits\"]),editType:{traces:_ne.traces,layout:_ne.layout},impliedEdits:{}},traces:e,layout:mnt(),frames:ynt(),animation:y3(cnt),config:y3(fnt)}};Yh.crawl=function(e,t,r,n){var i=r||0;n=n||\"\",Object.keys(e).forEach(function(a){var o=e[a];if(lq.indexOf(a)===-1){var s=(n?n+\".\":\"\")+a;t(o,a,e,i,s),!Yh.isValObject(o)&&m3(o)&&a!==\"impliedEdits\"&&Yh.crawl(o,t,i+1,s)}})};Yh.isValObject=function(e){return e&&e.valType!==void 0};Yh.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType===\"data_array\"||l.arrayOk===!0)&&!(r[f-1]===\"colorbar\"&&(u===\"ticktext\"||u===\"tickvals\"));h&&s(i,0,\"\")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)hnt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d<f.length;d++)m3(f[d])&&s(f[d],u+1,h+\"[\"+d+\"].\")}else m3(f)&&s(f,u+1,h+\".\")}return i=e,a=\"\",Yh.crawl(V6,o),e._module&&e._module.attributes&&Yh.crawl(e._module.attributes,o),t};Yh.getTraceValObject=function(e,t){var r=t[0],n=1,i,a,o=e._module;if(o||(o=(x0.modules[e.type||V6.type.dflt]||{})._module),!o)return!1;if(i=o.attributes,a=i&&i[r],!a){var s=o.basePlotModule;s&&s.attributes&&(a=s.attributes[r])}return a||(a=V6[r]),wne(a,t,n)};Yh.getLayoutValObject=function(e,t){var r=pnt(e,t[0]);return wne(r,t,1)};function pnt(e,t){var r,n,i,a,o=e._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if(i=o[r],i.attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!s&&i.layoutAttributes&&(s=i.layoutAttributes)}var l=i.baseLayoutAttrOverrides;if(l&&t in l)return l[t]}if(s)return s}var u=e._modules;if(u){for(r=0;r<u.length;r++)if(a=u[r].layoutAttributes,a&&t in a)return a[t]}for(n in x0.componentsRegistry){if(i=x0.componentsRegistry[n],i.name===\"colorscale\"&&t.indexOf(\"coloraxis\")===0)return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in oq?oq[t]:!1}function wne(e,t,r){if(!e)return!1;if(e._isLinkedToArray){if(U6(t[r]))r++;else if(r<t.length)return!1}for(;r<t.length;r++){var n=e[t[r]];if(m3(n))e=n;else break;if(r===t.length-1)break;if(e._isLinkedToArray){if(r++,!U6(t[r]))return!1}else if(e.valType===\"info_array\"){r++;var i=t[r];if(!U6(i))return!1;var a=e.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!U6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function U6(e){return e===Math.round(e)&&e>=0}function gnt(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xg({},V6),a=xg({},t.attributes);Yh.crawl(a,function(l,u,c,f,h){G6(i,h).set(void 0),l===void 0&&G6(a,h).set(void 0)}),xg(n,i),x0.traceIs(e,\"noOpacity\")&&delete n.opacity,x0.traceIs(e,\"showLegend\")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,\"noHover\")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,xg(n,a),r.attributes&&xg(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:y3(n)};if(t.layoutAttributes){var s={};xg(s,t.layoutAttributes),o.layoutAttributes=y3(s)}return t.animatable||Yh.crawl(o,function(l){Yh.isValObject(l)&&\"anim\"in l&&delete l.anim}),o}function mnt(){var e={},t,r;xg(e,oq);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n<r.attr.length;n++)xne(e,r,r.attr[n]);else{var i=r.attr===\"subplot\"?r.name:r.attr;xne(e,r,i)}for(t in x0.componentsRegistry){r=x0.componentsRegistry[t];var a=r.schema;if(a&&(a.subplots||a.layout)){var o=a.subplots;if(o&&o.xaxis&&!o.yaxis)for(var s in o.xaxis)delete e.yaxis[s];delete e.xaxis.shift,delete e.xaxis.autoshift}else r.name===\"colorscale\"?xg(e,r.layoutAttributes):r.layoutAttributes&&wnt(e,r.layoutAttributes,r.name)}return{layoutAttributes:y3(e)}}function ynt(){var e={frames:xg({},unt)};return y3(e),e.frames}function y3(e){return _nt(e),xnt(e),bnt(e),e}function _nt(e){function t(n){return{valType:\"string\",editType:\"none\"}}function r(n,i,a){Yh.isValObject(n)?(n.arrayOk===!0||n.valType===\"data_array\")&&(a[i+\"src\"]=t(i)):m3(n)&&(n.role=\"object\")}Yh.crawl(e,r)}function xnt(e){function t(r,n,i){if(r){var a=r[H6];a&&(delete r[H6],i[n]={items:{}},i[n].items[a]=r,i[n].role=\"object\")}}Yh.crawl(e,t)}function bnt(e){function t(r){for(var n in r)if(m3(r[n]))t(r[n]);else if(Array.isArray(r[n]))for(var i=0;i<r[n].length;i++)t(r[n][i]);else r[n]instanceof RegExp&&(r[n]=r[n].toString())}t(e)}function xne(e,t,r){var n=G6(e,r),i=xg({},t.layoutAttributes);i[sq]=!0,n.set(i)}function wnt(e,t,r){var n=G6(e,r);n.set(xg(n.get()||{},t))}});var pl=ye(pb=>{\"use strict\";var x3=Dr(),Tnt=Gl(),$1=\"templateitemname\",uq={name:{valType:\"string\",editType:\"none\"}};uq[$1]={valType:\"string\",editType:\"calc\"};pb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=uq.name,t[$1]=uq[$1],t};pb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=x3.coerce(a,{},Tnt,\"type\");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};pb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};pb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Ane(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[$1]=u[$1];if(!Tne(f))return c._template=i,c;for(var h=0;h<a.length;h++){var d=a[h];if(d.name===f)return o[f]=1,c._template=d,c}return c[r]=u[r]||!1,c._template=!1,c}function l(){for(var u=[],c=0;c<a.length;c++){var f=a[c],h=f.name;if(Tne(h)&&!o[h]){var d={_template:f,name:h,_input:{_templateitemname:h}};d[$1]=f[$1],u.push(d),o[h]=1}}return u}return{newItem:s,defaultItems:l}};function Tne(e){return e&&typeof e==\"string\"}function Ane(e){var t=e.length-1;return e.charAt(t)!==\"s\"&&x3.warn(\"bad argument to arrayDefaultKey: \"+e),e.substr(0,e.length-1)+\"defaults\"}pb.arrayDefaultKey=Ane;pb.arrayEditor=function(e,t,r){var n=(x3.nestedProperty(e,t).get()||[]).length,i=r._index,a=i>=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+\"[\"+i+\"]\",s;function l(){s={},a&&(s[o]={},s[o][$1]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?x3.nestedProperty(s[o],d).set(v):s[o+\".\"+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var x=f();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var hd=ye((nir,Sne)=>{\"use strict\";var ZS=n3().counter;Sne.exports={idRegex:{x:ZS(\"x\",\"( domain)?\"),y:ZS(\"y\",\"( domain)?\")},attrRegex:ZS(\"[xy]axis\"),xAxisMatch:ZS(\"xaxis\"),yAxisMatch:ZS(\"yaxis\"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:\"hour\",WEEKDAY_PATTERN:\"day of week\",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\"imagelayer\",\"heatmaplayer\",\"contourcarpetlayer\",\"contourlayer\",\"funnellayer\",\"waterfalllayer\",\"barlayer\",\"carpetlayer\",\"violinlayer\",\"boxlayer\",\"ohlclayer\",\"scattercarpetlayer\",\"scatterlayer\"],clipOnAxisFalseQuery:[\".scatterlayer\",\".barlayer\",\".funnellayer\",\".waterfalllayer\"],layerValue2layerClass:{\"above traces\":\"above\",\"below traces\":\"below\"},zindexSeparator:\"z\"}});var hf=ye(wp=>{\"use strict\";var Ant=qa(),cq=hd();wp.id2name=function(t){if(!(typeof t!=\"string\"||!t.match(cq.AX_ID_PATTERN))){var r=t.split(\" \")[0].substr(1);return r===\"1\"&&(r=\"\"),t.charAt(0)+\"axis\"+r}};wp.name2id=function(t){if(t.match(cq.AX_NAME_PATTERN)){var r=t.substr(5);return r===\"1\"&&(r=\"\"),t.charAt(0)+r}};wp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!=\"string\"||!t.match(cq.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(\" \")[0].substr(1).replace(/^0+/,\"\");return a===\"1\"&&(a=\"\"),t.charAt(0)+a+(i&&n?\" domain\":\"\")}};wp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=wp.listIds(e,t),a=new Array(i.length),o;for(o=0;o<i.length;o++){var s=i[o];a[o]=n[s.charAt(0)+\"axis\"+s.substr(1)]}if(!r){var l=n._subplots.gl3d||[];for(o=0;o<l.length;o++){var u=n[l[o]];t?a.push(u[t+\"axis\"]):a.push(u.xaxis,u.yaxis,u.zaxis)}}return a};wp.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+\"axis\"]:n.xaxis.concat(n.yaxis)};wp.getFromId=function(e,t,r){var n=e._fullLayout;return t=t===void 0||typeof t!=\"string\"?t:t.replace(\" domain\",\"\"),r===\"x\"?t=t.replace(/y[0-9]*/,\"\"):r===\"y\"&&(t=t.replace(/x[0-9]*/,\"\")),n[wp.id2name(t)]};wp.getFromTrace=function(e,t,r){var n=e._fullLayout,i=null;if(Ant.traceIs(t,\"gl3d\")){var a=t.scene;a.substr(0,5)===\"scene\"&&(i=n[a][r+\"axis\"])}else i=wp.getFromId(e,t[r+\"axis\"]||r);return i};wp.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};wp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(\" \")[0]:!1};function Mne(e,t){if(t&&t.length){for(var r=0;r<t.length;r++)if(t[r][e])return!0}return!1}wp.isLinked=function(e,t){return Mne(t,e._axisMatchGroups)||Mne(t,e._axisConstraintGroups)}});var Q1=ye((oir,Ene)=>{\"use strict\";function Snt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(\".outline-controllers\").remove()}function Mnt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(\".select-outline\").remove(),e._fullLayout._outlining=!1}Ene.exports={clearOutlineControllers:Snt,clearOutline:Mnt}});var j6=ye((sir,Cne)=>{\"use strict\";Cne.exports={scattermode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},scattergap:{valType:\"number\",min:0,max:1,editType:\"calc\"}}});var Id=ye(X6=>{\"use strict\";var W6=qa(),lir=hd().SUBPLOT_PATTERN;X6.getSubplotCalcData=function(e,t,r){var n=W6.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o<e.length;o++){var s=e[o],l=s[0].trace;l[i]===r&&a.push(s)}return a};X6.getModuleCalcData=function(e,t,r){var n=[],i=[],a;if(typeof t==\"string\"?a=W6.getModule(t).plot:typeof t==\"function\"?a=t:a=t.plot,!a)return[n,e];for(var o=r,s=0;s<e.length;s++){var l=e[s],u=l[0].trace,c=u.zorder!==void 0;u.visible!==!0||u._length===0||(u._module&&u._module.plot===a&&(!c||u.zorder===o)?n.push(l):i.push(l))}return[n,i]};X6.getSubplotData=function(t,r,n){if(!W6.subplotsRegistry[r])return[];for(var i=W6.subplotsRegistry[r].attr,a=[],o,s,l,u=0;u<t.length;u++)o=t[u],o[i]===n&&a.push(o);return a}});var Ine=ye(gb=>{\"use strict\";var Ent=qa(),b3=Dr();gb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=gb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){kne(e,o,i.cache),i.check=function(){if(a){var c=kne(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],l=0;l<s.length;l++)e._internalOn(s[l],i.check);i.remove=function(){for(var u=0;u<s.length;u++)e._removeInternalListener(s[u],i.check)}}else b3.log(\"Unable to automatically bind plot updates to API command\"),i.lookupTable={},i.remove=function(){};return i.disable=function(){a=!1},i.enable=function(){a=!0},t&&(t._commandObserver=i),i};gb.hasSimpleAPICommandBindings=function(e,t,r){var n,i=t.length,a;for(n=0;n<i;n++){var o,s=t[n],l=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!l)return!1;var c=gb.computeAPICommandBindings(e,l,u);if(c.length!==1)return!1;if(!a)a=c[0],Array.isArray(a.traces)&&a.traces.sort();else{if(o=c[0],o.type!==a.type||o.prop!==a.prop)return!1;if(Array.isArray(a.traces))if(Array.isArray(o.traces)){o.traces.sort();for(var f=0;f<a.traces.length;f++)if(a.traces[f]!==o.traces[f])return!1}else return!1;else if(o.prop!==a.prop)return!1}o=c[0];var h=o.value;if(Array.isArray(h))if(h.length===1)h=h[0];else return!1;r&&(r[h]=n)}return a};function kne(e,t,r){var n,i,a,o=!1;if(t.type===\"data\")n=e._fullData[t.traces!==null?t.traces[0]:0];else if(t.type===\"layout\")n=e._fullLayout;else return!1;return i=b3.nestedProperty(n,t.prop).get(),a=r[t.type]=r[t.type]||{},a.hasOwnProperty(t.prop)&&a[t.prop]!==i&&(o=!0),a[t.prop]=i,{changed:o,value:i}}gb.executeAPICommand=function(e,t,r){if(t===\"skip\")return Promise.resolve();var n=Ent.apiMethodRegistry[t],i=[e];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)i.push(r[a]);return n.apply(null,i).catch(function(o){return b3.warn(\"API call to Plotly.\"+t+\" rejected.\",o),Promise.reject(o)})};gb.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case\"restyle\":n=Pne(e,r);break;case\"relayout\":n=Lne(e,r);break;case\"update\":n=Pne(e,[r[0],r[2]]).concat(Lne(e,[r[1]]));break;case\"animate\":n=Cnt(e,r);break;default:n=[]}return n};function Cnt(e,t){return Array.isArray(t[0])&&t[0].length===1&&[\"string\",\"number\"].indexOf(typeof t[0][0])!==-1?[{type:\"layout\",prop:\"_currentFrame\",value:t[0][0].toString()}]:[]}function Lne(e,t){var r=[],n=t[0],i={};if(typeof n==\"string\")i[n]=t[1];else if(b3.isPlainObject(n))i=n;else return r;return fq(i,function(a,o,s){r.push({type:\"layout\",prop:a,value:s})},\"\",0),r}function Pne(e,t){var r,n,i,a,o=[];if(n=t[0],i=t[1],r=t[2],a={},typeof n==\"string\")a[n]=i;else if(b3.isPlainObject(n))a=n,r===void 0&&(r=i);else return o;return r===void 0&&(r=null),fq(a,function(s,l,u){var c,f;if(Array.isArray(u)){f=u.slice();var h=Math.min(f.length,e.data.length);r&&(h=Math.min(h,r.length)),c=[];for(var d=0;d<h;d++)c[d]=r?r[d]:d}else f=u,c=r?r.slice():null;if(c===null)Array.isArray(f)&&(f=f[0]);else if(Array.isArray(c)){if(!Array.isArray(f)){var v=f;f=[];for(var x=0;x<c.length;x++)f[x]=v}f.length=Math.min(c.length,f.length)}o.push({type:\"data\",prop:s,traces:c,value:f})},\"\",0),o}function fq(e,t,r,n){Object.keys(e).forEach(function(i){var a=e[i];if(i[0]!==\"_\"){var o=r+(n>0?\".\":\"\")+i;b3.isPlainObject(a)?fq(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((fir,Wne)=>{\"use strict\";var Bne=Oa(),knt=e3().timeFormatLocale,Lnt=yO().formatLocale,YS=Eo(),Pnt=_O(),Xl=qa(),Nne=_3(),Int=pl(),ja=Dr(),Une=Ca(),Rne=hs().BADNUM,Tp=hf(),Rnt=Q1().clearOutline,Dnt=j6(),hq=qS(),Fnt=aq(),znt=Id().getModuleCalcData,Dne=ja.relinkPrivateKeys,mb=ja._,ba=Wne.exports={};ja.extendFlat(ba,Xl);ba.attributes=Gl();ba.attributes.type.values=ba.allTypes;ba.fontAttrs=ec();ba.layoutAttributes=s3();var Y6=Ine();ba.executeAPICommand=Y6.executeAPICommand;ba.computeAPICommandBindings=Y6.computeAPICommandBindings;ba.manageCommandObserver=Y6.manageCommandObserver;ba.hasSimpleAPICommandBindings=Y6.hasSimpleAPICommandBindings;ba.redrawText=function(e){return e=ja.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod(\"annotations\",\"draw\")(e),Xl.getComponentMethod(\"legend\",\"draw\")(e),Xl.getComponentMethod(\"colorbar\",\"draw\")(e),t(ba.previousPromises(e)))},300)})};ba.resize=function(e){e=ja.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||ja.isHidden(e))&&i(new Error(\"Resize must be passed a displayed plot div element.\")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||ja.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call(\"relayout\",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};ba.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};ba.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=ja.ensureSingle(t._paper,\"text\",\"js-plot-link-container\",function(l){l.style({\"font-family\":'\"Open Sans\", Arial, sans-serif',\"font-size\":\"12px\",fill:Une.defaultLine,\"pointer-events\":\"all\"}).each(function(){var u=Bne.select(this);u.append(\"tspan\").classed(\"js-link-to-tool\",!0),u.append(\"tspan\").classed(\"js-link-spacer\",!0),u.append(\"tspan\").classed(\"js-sourcelinks\",!0)})}),n=r.node(),i={y:t._paper.attr(\"height\")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i[\"text-anchor\"]=\"start\",i.x=5):(i[\"text-anchor\"]=\"end\",i.x=t._paper.attr(\"width\")-7),r.attr(i);var a=r.select(\".js-link-to-tool\"),o=r.select(\".js-link-spacer\"),s=r.select(\".js-sourcelinks\");e._context.showSources&&e._context.showSources(e),e._context.showLink&&Ont(e,a),o.text(a.text()&&s.text()?\" - \":\"\")}};function Ont(e,t){t.text(\"\");var r=t.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(e._context.linkText+\" \\xBB\");if(e._context.sendData)r.on(\"click\",function(){ba.sendDataToCloud(e)});else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}ba.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit(\"plotly_beforeexport\");var r=Bne.select(e).append(\"div\").attr(\"id\",\"hiddenform\").style(\"display\",\"none\"),n=r.append(\"form\").attr({action:t+\"/external\",method:\"post\",target:\"_blank\"}),i=n.append(\"input\").attr({type:\"text\",name:\"data\"});return i.node().value=ba.graphJson(e,!1,\"keepdata\"),n.node().submit(),r.remove(),e.emit(\"plotly_afterexport\"),!1}};var qnt=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],Bnt=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];ba.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||ba.createTransitionData(e),i._dfltTitle={plot:mb(e,\"Click to enter Plot title\"),subtitle:mb(e,\"Click to enter Plot subtitle\"),x:mb(e,\"Click to enter X axis title\"),y:mb(e,\"Click to enter Y axis title\"),colorbar:mb(e,\"Click to enter Colorscale title\"),annotation:mb(e,\"new text\")},i._traceWord=mb(e,\"trace\");var h=Fne(e,qnt);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;ba.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),ba.sanitizeMargins(i)}else{ba.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,p=c.autosizable,C=x&&(b||p);C?ba.plotAutoSize(e,a,i):x&&ba.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=Vnt(h,i.separators),i._extraFormat=Fne(e,Bnt),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=Unt(),A=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Nnt(o,l),ba.supplyDataDefaults(l,s,a,i);var _=Object.keys(A.x),k=Object.keys(A.y);if(_.length>1&&k.length>1){for(Xl.getComponentMethod(\"grid\",\"sizeDefaults\")(a,i),f=0;f<_.length;f++)ja.pushUnique(E.xaxis,_[f]);for(f=0;f<k.length;f++)ja.pushUnique(E.yaxis,k[f]);for(var M in L)ja.pushUnique(E.cartesian,M)}if(i._has=ba._hasPlotType.bind(i),o.length===s.length)for(f=0;f<s.length;f++)Dne(s[f],o[f]);ba.supplyLayoutModuleDefaults(a,i,s,e._transitionData);var g=i._visibleModules,P=[];for(f=0;f<g.length;f++){var T=g[f].crossTraceDefaults;T&&ja.pushUnique(P,T)}for(f=0;f<P.length;f++)P[f](s,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name===\"splom\"&&_.length>15&&k.length>15&&i.shapes.length===0&&i.images.length===0,ba.linkSubplots(s,i,o,n),ba.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has(\"cartesian\")),O=!!(i._has&&i._has(\"cartesian\")),V=z,G=O;V&&!G?n._bgLayer.remove():G&&!V&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&Rnt({_fullLayout:n}),Gnt(s,i),Dne(i,n),Xl.getComponentMethod(\"colorscale\",\"crossTraceDefaults\")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,H={},N;for(N in Z)H[N]=\"old\";for(f=0;f<s.length;f++)N=s[f]._fullInput.uid,H[N]||(Z[N]={}),H[N]=\"new\";for(N in H)H[N]===\"old\"&&delete Z[N];Vne(i),Xl.getComponentMethod(\"rangeslider\",\"makeData\")(i),!r&&u.length===s.length&&ba.supplyDefaultsUpdateCalc(u,s)};ba.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=(e[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o=a._arrayAttrs,s,l,u;for(s=0;s<o.length;s++)l=o[s],u=ja.nestedProperty(a,l).get().slice(),ja.nestedProperty(n,l).set(u)}i.trace=n}}};function Nnt(e,t){var r=t.length,n=[],i,a;for(i=0;i<e.length;i++){var o=e[i]._fullInput;o!==a&&n.push(o),a=o}var s=n.length,l=new Array(r),u={};function c(d,v){l[v]=d,u[d]=1}function f(d,v){if(d&&typeof d==\"string\"&&!u[d])return c(d,v),!0}for(i=0;i<r;i++){var h=t[i].uid;typeof h==\"number\"&&(h=String(h)),!f(h,i)&&(i<s&&f(n[i].uid,i)||c(ja.randstr(u),i))}return l}function Unt(){var e=Xl.collectableSubplotTypes,t={},r,n;if(!e){e=[];var i=Xl.subplotsRegistry;for(var a in i){var o=i[a],s=o.attr;if(s&&(e.push(a),Array.isArray(s)))for(n=0;n<s.length;n++)ja.pushUnique(e,s[n])}}for(r=0;r<e.length;r++)t[e[r]]=[];return t}function Fne(e,t){var r=e._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(f){for(var h=!0,d=0;d<t.length;d++){var v=t[d];i[v]||(f[v]?i[v]=f[v]:h=!1)}h&&(n=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,l=0;l<2;l++){var u=(s[r]||{}).format;if(u&&(a(u),n))break;s=Xl.localeRegistry}var c=r.split(\"-\")[0];if(n||c===r)break;r=c}return n||a(Xl.localeRegistry.en.format),i}function Vnt(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(r){try{r=Lnt(e).format(ja.adjustFormat(r))}catch(n){return ja.warnBadFormat(r),ja.noFormat}return r},timeFormat:knt(e).utcFormat}}function Gnt(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i<e.length;i++){var a=e[i];a.meta?n[a.index]=a._meta={meta:a.meta}:t.meta&&(a._meta={meta:t.meta}),t.meta&&(a._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}ba.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])};ba._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var i=n[t].name;if(i===e)return!0;var a=Xl.modules[i];if(a&&a.categories[e])return!0}return!1};ba.cleanPlot=function(e,t,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(e,t,r,n)}var l=n._has&&n._has(\"gl\"),u=t._has&&t._has(\"gl\");l&&!u&&n._glcontainer!==void 0&&(n._glcontainer.selectAll(\".gl-canvas\").remove(),n._glcontainer.selectAll(\".no-webgl\").remove(),n._glcanvas=null);var c=!!n._infolayer;e:for(i=0;i<r.length;i++){var f=r[i],h=f.uid;for(a=0;a<e.length;a++){var d=e[a];if(h===d.uid)continue e}c&&n._infolayer.select(\".cb\"+h).remove()}};ba.linkSubplots=function(e,t,r,n){var i,a,o=n._plots||{},s=t._plots={},l=t._subplots,u={_fullData:e,_fullLayout:t},c=l.cartesian||[];for(i=0;i<c.length;i++){var f=c[i],h=o[f],d=Tp.getFromId(u,f,\"x\"),v=Tp.getFromId(u,f,\"y\"),x;for(h?x=s[f]=h:(x=s[f]={},x.id=f),d._counterAxes.push(v._id),v._counterAxes.push(d._id),d._subplotsWith.push(f),v._subplotsWith.push(f),x.xaxis=d,x.yaxis=v,x._hasClipOnAxisFalse=!1,a=0;a<e.length;a++){var b=e[a];if(b.xaxis===x.xaxis._id&&b.yaxis===x.yaxis._id&&b.cliponaxis===!1){x._hasClipOnAxisFalse=!0;break}}}var p=Tp.list(u,null,!0),C;for(i=0;i<p.length;i++){C=p[i];var E=null;C.overlaying&&(E=Tp.getFromId(u,C.overlaying),E&&E.overlaying&&(C.overlaying=!1,E=null)),C._mainAxis=E||C,E&&(C.domain=E.domain.slice()),C._anchorAxis=C.anchor===\"free\"?null:Tp.getFromId(u,C.anchor)}for(i=0;i<p.length;i++)if(C=p[i],C._counterAxes.sort(Tp.idSort),C._subplotsWith.sort(ja.subplotSort),C._mainSubplot=Hnt(C,t),C._counterAxes.length&&(C.spikemode&&C.spikemode.indexOf(\"across\")!==-1||C.automargin&&C.mirror&&C.anchor!==\"free\"||Xl.getComponentMethod(\"rangeslider\",\"isVisible\")(C))){var A=1,L=0;for(a=0;a<C._counterAxes.length;a++){var _=Tp.getFromId(u,C._counterAxes[a]);A=Math.min(A,_.domain[0]),L=Math.max(L,_.domain[1])}A<L&&(C._counterDomainMin=A,C._counterDomainMax=L)}};function Hnt(e,t){var r={_fullLayout:t},n=e._id.charAt(0)===\"x\",i=e._mainAxis._anchorAxis,a=\"\",o=\"\",s=\"\";if(i&&(s=i._mainAxis._id,a=n?e._id+s:s+e._id),!a||!t._plots[a]){a=\"\";for(var l=e._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?e._id+c:c+e._id;o||(o=f);var h=Tp.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}ba.clearExpandedTraceDefaultColors=function(e){var t,r,n;function i(o,s,l,u){r[u]=s,r.length=u+1,o.valType===\"color\"&&o.dflt===void 0&&t.push(r.join(\".\"))}for(r=[],t=e._module._colorAttrs,t||(e._module._colorAttrs=t=[],Nne.crawl(e._module.attributes,i)),n=0;n<t.length;n++){var a=ja.nestedProperty(e,\"_input.\"+t[n]);a.get()||ja.nestedProperty(e,t[n]).set(null)}};ba.supplyDataDefaults=function(e,t,r,n){var i=n._modules,a=n._visibleModules,o=n._basePlotModules,s=0,l=0,u,c,f;n._transformModules=[];function h(C){t.push(C);var E=C._module;E&&(ja.pushUnique(i,E),C.visible===!0&&ja.pushUnique(a,E),ja.pushUnique(o,C._module.basePlotModule),s++,C._input.visible!==!1&&l++)}var d={},v=[],x=(r.template||{}).data||{},b=Int.traceTemplater(x);for(u=0;u<e.length;u++)f=e[u],c=b.newTrace(f),c.uid=n._traceUids[u],ba.supplyTraceDefaults(f,c,l,n,u),c.index=u,c._input=f,c._fullInput=c,h(c),Xl.traceIs(c,\"carpetAxis\")&&(d[c.carpet]=c),Xl.traceIs(c,\"carpetDependent\")&&v.push(u);for(u=0;u<v.length;u++)if(c=t[v[u]],!!c.visible){var p=d[c.carpet];if(c._carpet=p,!p||!p.visible){c.visible=!1;continue}c.xaxis=p.xaxis,c.yaxis=p.yaxis}};ba.supplyAnimationDefaults=function(e){e=e||{};var t,r={};function n(i,a){return ja.coerce(e||{},r,hq,i,a)}if(n(\"mode\"),n(\"direction\"),n(\"fromcurrent\"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=ba.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=ba.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=ba.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=ba.supplyAnimationTransitionDefaults(e.transition||{});return r};ba.supplyAnimationFrameDefaults=function(e){var t={};function r(n,i){return ja.coerce(e||{},t,hq.frame,n,i)}return r(\"duration\"),r(\"redraw\"),t};ba.supplyAnimationTransitionDefaults=function(e){var t={};function r(n,i){return ja.coerce(e||{},t,hq.transition,n,i)}return r(\"duration\"),r(\"easing\"),t};ba.supplyFrameDefaults=function(e){var t={};function r(n,i){return ja.coerce(e,t,Fnt,n,i)}return r(\"group\"),r(\"name\"),r(\"traces\"),r(\"baseframe\"),r(\"data\"),r(\"layout\"),t};ba.supplyTraceDefaults=function(e,t,r,n,i){var a=n.colorway||Une.defaults,o=a[r%a.length],s;function l(E,A){return ja.coerce(e,t,ba.attributes,E,A)}var u=l(\"visible\");l(\"type\"),l(\"name\",n._traceWord+\" \"+i),l(\"uirevision\",n.uirevision);var c=ba.getModule(t);if(t._module=c,c){var f=c.basePlotModule,h=f.attr,d=f.attributes;if(h&&d){var v=n._subplots,x=\"\";if(Array.isArray(h))for(s=0;s<h.length;s++){var b=h[s],p=ja.coerce(e,t,d,b);v[b]&&ja.pushUnique(v[b],p),x+=p}else x=ja.coerce(e,t,d,h);v[f.name]&&ja.pushUnique(v[f.name],x)}}if(u&&(l(\"customdata\"),l(\"ids\"),l(\"meta\"),Xl.traceIs(t,\"showLegend\")?(ja.coerce(e,t,c.attributes.showlegend?c.attributes:ba.attributes,\"showlegend\"),l(\"legend\"),l(\"legendwidth\"),l(\"legendgroup\"),l(\"legendgrouptitle.text\"),l(\"legendrank\"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,c&&c.supplyDefaults(e,t,o,n),Xl.traceIs(t,\"noOpacity\")||l(\"opacity\"),Xl.traceIs(t,\"notLegendIsolatable\")&&(t.visible=!!t.visible),Xl.traceIs(t,\"noHover\")||(t.hovertemplate||ja.coerceHoverinfo(e,t,n),t.type!==\"parcats\"&&Xl.getComponentMethod(\"fx\",\"supplyDefaults\")(e,t,o,n)),c&&c.selectPoints)){var C=l(\"selectedpoints\");ja.isTypedArray(C)&&(t.selectedpoints=Array.from(C))}return t};ba.supplyLayoutGlobalDefaults=function(e,t,r){function n(f,h){return ja.coerce(e,t,ba.layoutAttributes,f,h)}var i=e.template;ja.isPlainObject(i)&&(t.template=i,t._template=i.layout,t._dataTemplate=i.data),n(\"autotypenumbers\");var a=ja.coerceFont(n,\"font\"),o=a.size;ja.coerceFont(n,\"title.font\",a,{overrideDflt:{size:Math.round(o*1.4)}}),n(\"title.text\",t._dfltTitle.plot),n(\"title.xref\");var s=n(\"title.yref\");n(\"title.pad.t\"),n(\"title.pad.r\"),n(\"title.pad.b\"),n(\"title.pad.l\");var l=n(\"title.automargin\");n(\"title.x\"),n(\"title.xanchor\"),n(\"title.y\"),n(\"title.yanchor\"),n(\"title.subtitle.text\",t._dfltTitle.subtitle),ja.coerceFont(n,\"title.subtitle.font\",a,{overrideDflt:{size:Math.round(t.title.font.size*.7)}}),l&&(s===\"paper\"&&(t.title.y!==0&&(t.title.y=1),t.title.yanchor===\"auto\"&&(t.title.yanchor=t.title.y===0?\"top\":\"bottom\")),s===\"container\"&&(t.title.y===\"auto\"&&(t.title.y=1),t.title.yanchor===\"auto\"&&(t.title.yanchor=t.title.y<.5?\"bottom\":\"top\")));var u=n(\"uniformtext.mode\");u&&n(\"uniformtext.minsize\"),n(\"autosize\",!(e.width&&e.height)),n(\"width\"),n(\"height\"),n(\"minreducedwidth\"),n(\"minreducedheight\"),n(\"margin.l\"),n(\"margin.r\"),n(\"margin.t\"),n(\"margin.b\"),n(\"margin.pad\"),n(\"margin.autoexpand\"),e.width&&e.height&&ba.sanitizeMargins(t),Xl.getComponentMethod(\"grid\",\"sizeDefaults\")(e,t),n(\"paper_bgcolor\"),n(\"separators\",r.decimal+r.thousands),n(\"hidesources\"),n(\"colorway\"),n(\"datarevision\");var c=n(\"uirevision\");n(\"editrevision\",c),n(\"selectionrevision\",c),Xl.getComponentMethod(\"modebar\",\"supplyLayoutDefaults\")(e,t),Xl.getComponentMethod(\"shapes\",\"supplyDrawNewShapeDefaults\")(e,t,n),Xl.getComponentMethod(\"selections\",\"supplyDrawNewSelectionDefaults\")(e,t,n),n(\"meta\"),ja.isPlainObject(e.transition)&&(n(\"transition.duration\"),n(\"transition.easing\"),n(\"transition.ordering\")),Xl.getComponentMethod(\"calendars\",\"handleDefaults\")(e,t,\"calendar\"),Xl.getComponentMethod(\"fx\",\"supplyLayoutGlobalDefaults\")(e,t,n),ja.coerce(e,t,Dnt,\"scattermode\")};function Z6(e){return typeof e==\"string\"&&e.substr(e.length-2)===\"px\"&&parseFloat(e)}ba.plotAutoSize=function(t,r,n){var i=t._context||{},a=i.frameMargins,o,s,l=ja.isPlotDiv(t);if(l&&t.emit(\"plotly_autosize\"),i.fillFrame)o=window.innerWidth,s=window.innerHeight,document.body.style.overflow=\"hidden\";else{var u=l?window.getComputedStyle(t):{};if(o=Z6(u.width)||Z6(u.maxWidth)||n.width,s=Z6(u.height)||Z6(u.maxHeight)||n.height,YS(a)&&a>0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=ba.layoutAttributes.width.min,h=ba.layoutAttributes.height.min;o<f&&(o=f),s<h&&(s=h);var d=!r.width&&Math.abs(n.width-o)>1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),ba.sanitizeMargins(n)};ba.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has(\"cartesian\")&&(Xl.getComponentMethod(\"grid\",\"contentDefaults\")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(ja.subplotSort);for(s=0;s<a.length;s++)l=a[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var f=t._modules;for(s=0;s<f.length;s++)l=f[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var h=t._transformModules;for(s=0;s<h.length;s++)l=h[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r,n);for(o in i)l=i[o],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r)};ba.purge=function(e){var t=e._fullLayout||{};t._glcontainer!==void 0&&(t._glcontainer.selectAll(\".gl-canvas\").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),ja.clearThrottle(),ja.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()};ba.style=function(e){var t=e._fullLayout._visibleModules,r=[],n;for(n=0;n<t.length;n++){var i=t[n];i.style&&ja.pushUnique(r,i.style)}for(n=0;n<r.length;n++)r[n](e)};ba.sanitizeMargins=function(e){if(!(!e||!e.margin)){var t=e.width,r=e.height,n=e.margin,i=t-(n.l+n.r),a=r-(n.t+n.b),o;i<0&&(o=(t-1)/(n.l+n.r),n.l=Math.floor(o*n.l),n.r=Math.floor(o*n.r)),a<0&&(o=(r-1)/(n.t+n.b),n.t=Math.floor(o*n.t),n.b=Math.floor(o*n.b))}};ba.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}};ba.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};function Vne(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={}),e._reservedMargin||(e._reservedMargin={})}var Gne=2,Hne=2;ba.autoMargin=function(e,t,r){var n=e._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=ja.constrain(i-o.l-o.r,Gne,s),c=ja.constrain(a-o.t-o.b,Hne,l),f=Math.max(0,i-u),h=Math.max(0,a-c),d=n._pushmargin,v=n._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete d[t],delete v[t];else{var x=r.pad;if(x===void 0&&(x=Math.min(12,o.l,o.r,o.t,o.b)),f){var b=(r.l+r.r)/f;b>1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var C=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,A=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:C,size:r.l+x},r:{val:E,size:r.r+x},b:{val:L,size:r.b+x},t:{val:A,size:r.t+x}},v[t]=1}if(!n._replotting)return ba.doAutoMargin(e)}};function jnt(e){if(\"_redrawFromAutoMarginCount\"in e._fullLayout)return!1;var t=Tp.list(e,\"\",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}ba.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Vne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=ja.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var C in p)for(var E in p[C]){var A=p[C][E];o[E]=Math.max(o[E],A)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var _=0;for(var k in h)k!==\"base\"&&YS(h[k][L].size)&&(_=h[k][L].size>_?h[k][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var g in h){var P=h[g].l||{},T=h[g].b||{},z=P.val,O=P.size,V=T.val,G=T.size,Z=r-o.r-o.l,H=n-o.t-o.b;for(var N in h){if(YS(O)&&h[N].r){var j=h[N].r.val,re=h[N].r.size;if(j>z){var oe=(O*j+(re-Z)*z)/(j-z),_e=(re*(1-z)+(O-Z)*(1-j))/(j-z);oe+_e>l+u&&(l=oe,u=_e)}}if(YS(G)&&h[N].t){var Me=h[N].t.val,ke=h[N].t.size;if(Me>V){var me=(G*Me+(ke-H)*V)/(Me-V),ie=(ke*(1-V)+(G-H)*(1-Me))/(Me-V);me+ie>f+c&&(f=me,c=ie)}}}}}var Se=ja.constrain(r-a.l-a.r,Gne,v),Le=ja.constrain(n-a.t-a.b,Hne,x),Ae=Math.max(0,r-Se),De=Math.max(0,n-Le);if(Ae){var Pe=(l+u)/Ae;Pe>1&&(l/=Pe,u/=Pe)}if(De){var ge=(f+c)/De;ge>1&&(f/=ge,c/=ge)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(ba.didMarginChange(s,i)||jnt(e))){\"_redrawFromAutoMarginCount\"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Fe=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount<Fe)return Xl.call(\"_doPlot\",e);t._size=s,ja.warn(\"Too many auto-margin redraws.\")}Wnt(e)};function Wnt(e){var t=Tp.list(e,\"\",!0);[\"_adjustTickLabelsOverflow\",\"_hideCounterAxisInsideTickLabels\"].forEach(function(r){for(var n=0;n<t.length;n++){var i=t[n][r];i&&i()}})}var zne=[\"l\",\"r\",\"t\",\"b\",\"p\",\"w\",\"h\"];ba.didMarginChange=function(e,t){for(var r=0;r<zne.length;r++){var n=zne[r],i=e[n],a=t[n];if(!YS(i)||Math.abs(a-i)>1)return!0}return!1};ba.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&ba.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h==\"function\")return d?\"_function_\":null;if(ja.isPlainObject(h)){var v={},x;return Object.keys(h).sort().forEach(function(E){if([\"_\",\"[\"].indexOf(E.charAt(0))===-1){if(typeof h[E]==\"function\"){d&&(v[E]=\"_function\");return}if(r===\"keepdata\"){if(E.substr(E.length-3)===\"src\")return}else if(r===\"keepstream\"){if(x=h[E+\"src\"],typeof x==\"string\"&&x.indexOf(\":\")>0&&!ja.isPlainObject(h.stream))return}else if(r!==\"keepall\"&&(x=h[E+\"src\"],typeof x==\"string\"&&x.indexOf(\":\")>0))return;v[E]=u(h[E],d)}}),v}var b=Array.isArray(h),p=ja.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var C=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:ja.isArrayBuffer(C)?Pnt.encode(C):C},d)}return b?h.map(function(E){return u(E,d)}):p?ja.simpleMap(h,ja.identity):ja.isJSDate(h)?ja.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n===\"object\"?c:JSON.stringify(c)};ba.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch(n=t[r],n.type){case\"replace\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\"insert\":i=n.value,o[i.name]=i,a.splice(n.index,0,i);break;case\"delete\":i=a[n.index],delete o[i.name],a.splice(n.index,1);break}return Promise.resolve()};ba.computeFrame=function(e,t){var r=e._transitionData._frameHash,n,i,a,o;if(!t)throw new Error(\"computeFrame must be given a string frame name\");var s=r[t.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=r[s.baseframe.toString()])&&u.indexOf(s.name)===-1;)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=ba.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),i=s.traces,!i)for(i=[],n=0;n<s.data.length;n++)i[n]=n;for(c.traces||(c.traces=[]),n=0;n<s.data.length;n++)a=i[n],a!=null&&(o=c.traces.indexOf(a),o===-1&&(o=c.data.length,c.traces[o]=a),c.data[o]=ba.extendTrace(c.data[o],s.data[n]))}return c};ba.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(t[i.name]=i)}};ba.extendObjectWithContainers=function(e,t,r){var n,i,a,o,s,l,u,c,f=ja.extendDeepNoArrays({},t||{}),h=ja.expandObjectPaths(f),d={};if(r&&r.length)for(a=0;a<r.length;a++)n=ja.nestedProperty(h,r[a]),i=n.get(),i===void 0?ja.nestedProperty(d,r[a]).set(null):(n.set(null),ja.nestedProperty(d,r[a]).set(i));if(e=ja.extendDeepNoArrays(e||{},h),r&&r.length){for(a=0;a<r.length;a++)if(s=ja.nestedProperty(d,r[a]),u=s.get(),!!u){for(l=ja.nestedProperty(e,r[a]),c=l.get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<u.length;o++){var v=u[o];v===null?c[o]=null:c[o]=ba.extendObjectWithContainers(c[o],v)}l.set(c)}}return e};ba.dataArrayContainers=[\"transforms\",\"dimensions\"];ba.layoutArrayContainers=Xl.layoutArrayContainers;ba.extendTrace=function(e,t){return ba.extendObjectWithContainers(e,t,ba.dataArrayContainers)};ba.extendLayout=function(e,t){return ba.extendObjectWithContainers(e,t,ba.layoutArrayContainers)};ba.transition=function(e,t,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var u=Array.isArray(t)?t.length:0,c=n.slice(0,u),f=0;f<c.length;f++){var h=c[f],d=e._fullData[h],v=d._module;if(v){if(v.animatable){var x=v.basePlotModule.name;s[x]||(s[x]=[]),s[x].push(h)}e.data[c[f]]=ba.extendTrace(e.data[c[f]],t[f])}}var b=ja.expandObjectPaths(ja.extendDeepNoArrays({},r)),p=/^[xy]axis[0-9]*$/;for(var C in b)p.test(C)&&delete b[C].range;ba.extendLayout(e.layout,b),delete e.calcdata,ba.supplyDefaults(e),ba.doCalcdata(e);var E=ja.expandObjectPaths(r);if(E){var A=e._fullLayout._plots;for(var L in A){var _=A[L],k=_.xaxis,M=_.yaxis,g=k.range.slice(),P=M.range.slice(),T=null,z=null,O=null,V=null;Array.isArray(E[k._name+\".range\"])?T=E[k._name+\".range\"].slice():Array.isArray((E[k._name]||{}).range)&&(T=E[k._name].range.slice()),Array.isArray(E[M._name+\".range\"])?z=E[M._name+\".range\"].slice():Array.isArray((E[M._name]||{}).range)&&(z=E[M._name].range.slice()),g&&T&&(k.r2l(g[0])!==k.r2l(T[0])||k.r2l(g[1])!==k.r2l(T[1]))&&(O={xr0:g,xr1:T}),P&&z&&(M.r2l(P[0])!==M.r2l(z[0])||M.r2l(P[1])!==M.r2l(z[1]))&&(V={yr0:P,yr1:z}),(O||V)&&l.push(ja.extendFlat({plotinfo:_},O,V))}}return Promise.resolve()},o.runFn=function(u){var c,f=e._fullLayout._basePlotModules,h=l.length,d;if(r)for(d=0;d<f.length;d++)f[d].transitionAxes&&f[d].transitionAxes(e,l,a,u);h?(c=ja.extendFlat({},a),c.duration=0,delete s.cartesian):c=a;for(var v in s){var x=s[v],b=e._fullData[x[0]]._module;b.basePlotModule.plot(e,x,c,u)}},jne(e,a,o)};ba.transitionFromReact=function(e,t,r,n){var i=e._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var l=i._plots;o.redraw=!1,t.anim===\"some\"&&(o.redraw=!0),r.anim===\"some\"&&(o.redraw=!0);for(var u in l){var c=l[u],f=c.xaxis,h=c.yaxis,d=n[f._name].range.slice(),v=n[h._name].range.slice(),x=f.range.slice(),b=h.range.slice();f.setScale(),h.setScale();var p=null,C=null;(f.r2l(d[0])!==f.r2l(x[0])||f.r2l(d[1])!==f.r2l(x[1]))&&(p={xr0:d,xr1:x}),(h.r2l(v[0])!==h.r2l(b[0])||h.r2l(v[1])!==h.r2l(b[1]))&&(C={yr0:v,yr1:b}),(p||C)&&s.push(ja.extendFlat({plotinfo:c},p,C))}return Promise.resolve()},o.runFn=function(l){for(var u=e._fullData,c=e._fullLayout,f=c._basePlotModules,h,d,v,x=[],b=0;b<u.length;b++)x.push(b);function p(){if(e._fullLayout)for(var E=0;E<f.length;E++)f[E].transitionAxes&&f[E].transitionAxes(e,s,h,l)}function C(){if(e._fullLayout)for(var E=0;E<f.length;E++)f[E].plot(e,v,d,l)}s.length&&t.anim?a.ordering===\"traces first\"?(h=ja.extendFlat({},a,{duration:0}),v=x,d=a,setTimeout(p,a.duration),C()):(h=a,v=null,d=ja.extendFlat({},a,{duration:0}),setTimeout(C,h.duration),p()):s.length?(h=a,p()):t.anim&&(v=x,d=a,C())},jne(e,a,o)};function jne(e,t,r){var n=!1;function i(f){var h=Promise.resolve();if(!f)return h;for(;f.length;)h=h.then(f.shift());return h}function a(f){if(f)for(;f.length;)f.shift()}function o(){return e.emit(\"plotly_transitioning\",[]),new Promise(function(f){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call(\"redraw\",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit(\"plotly_transitioninterrupted\",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call(\"redraw\",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit(\"plotly_transitioned\",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[ba.previousPromises,l,r.prepareFn,ba.rehover,ba.reselect,o],c=ja.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}ba.doCalcdata=function(e,t){var r=Tp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s<n.length;s++)if(Array.isArray(t)&&t.indexOf(s)===-1){u[s]=c[s];continue}for(s=0;s<n.length;s++)a=n[s],a._arrayAttrs=Nne.findArrayAttributes(a),a._extremes={};var f=i._subplots.polar||[];for(s=0;s<f.length;s++)r.push(i[f[s]].radialaxis,i[f[s]].angularaxis);for(var h in i._colorAxes){var d=i[h];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var v=!1;function x(C){if(a=n[C],o=a._module,a.visible===!0&&a.transforms){if(o&&o.calc){var E=o.calc(e,a);E[0]&&E[0].t&&E[0].t._scene&&delete E[0].t._scene.dirty}for(l=0;l<a.transforms.length;l++){var A=a.transforms[l];o=transformsRegistry[A.type],o&&o.calcTransform&&(a._hasCalcTransform=!0,v=!0,o.calcTransform(e,a,A))}}}function b(C,E){if(a=n[C],o=a._module,!!o.isContainer===E){var A=[];if(a.visible===!0&&a._length!==0){delete a._indexToPoints;var L=a.transforms||[];for(l=L.length-1;l>=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(A=o.calc(e,a))}(!Array.isArray(A)||!A[0])&&(A=[{x:Rne,y:Rne}]),A[0].t||(A[0].t={}),A[0].trace=a,u[C]=A}}for(One(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)x(s);for(v&&One(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)b(s,!1);qne(e);var p=Znt(r,e);if(p.length){for(i._numBoxes=0,i._numViolins=0,s=0;s<p.length;s++)b(p[s],!0);for(s=0;s<p.length;s++)b(p[s],!1);qne(e)}Xl.getComponentMethod(\"fx\",\"calc\")(e),Xl.getComponentMethod(\"errorbars\",\"calc\")(e)};var Xnt=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function Znt(e,t){var r=[],n,i,a,o,s;function l(N,j,re){var oe=j._id.charAt(0);if(N===\"histogram2dcontour\"){var _e=j._counterAxes[0],Me=Tp.getFromId(t,_e),ke=oe===\"x\"||_e===\"x\"&&Me.type===\"category\",me=oe===\"y\"||_e===\"y\"&&Me.type===\"category\";return function(ie,Se){return ie===0||Se===0||ke&&ie===re[Se].length-1||me&&Se===re.length-1?-1:(oe===\"y\"?Se:ie)-1}}else return function(ie,Se){return oe===\"y\"?Se:ie}}var u={min:function(N){return ja.aggNums(Math.min,null,N)},max:function(N){return ja.aggNums(Math.max,null,N)},sum:function(N){return ja.aggNums(function(j,re){return j+re},null,N)},total:function(N){return ja.aggNums(function(j,re){return j+re},null,N)},mean:function(N){return ja.mean(N)},\"geometric mean\":function(N){return ja.geometricMean(N)},median:function(N){return ja.median(N)}};function c(N,j){return N[1]-j[1]}function f(N,j){return j[1]-N[1]}for(n=0;n<e.length;n++){var h=e[n];if(h.type===\"category\"){var d=h.categoryorder.match(Xnt);if(d){var v=d[1],x=d[2],b=h._id.charAt(0),p=b===\"x\",C=[];for(i=0;i<h._categories.length;i++)C.push([h._categories[i],[]]);for(i=0;i<h._traceIndices.length;i++){var E=h._traceIndices[i],A=t._fullData[E];if(A.visible===!0){var L=A.type;Xl.traceIs(A,\"histogram\")&&(delete A._xautoBinFinished,delete A._yautoBinFinished);var _=L===\"splom\",k=L===\"scattergl\",M=t.calcdata[E];for(a=0;a<M.length;a++){var g=M[a],P,T;if(_){var z=A._axesDim[h._id];if(!p){var O=A._diag[z][0];O&&(h=t._fullLayout[Tp.id2name(O)])}var V=g.trace.dimensions[z].values;for(o=0;o<V.length;o++)for(P=h._categoriesMap[V[o]],s=0;s<g.trace.dimensions.length;s++)if(s!==z){var G=g.trace.dimensions[s];C[P][1].push(G.values[o])}}else if(k){for(o=0;o<g.t.x.length;o++)p?(P=g.t.x[o],T=g.t.y[o]):(P=g.t.y[o],T=g.t.x[o]),C[P][1].push(T);g.t&&g.t._scene&&delete g.t._scene.dirty}else if(g.hasOwnProperty(\"z\")){T=g.z;var Z=l(A.type,h,T);for(o=0;o<T.length;o++)for(s=0;s<T[o].length;s++)P=Z(s,o),P+1&&C[P][1].push(T[o][s])}else for(P=g.p,P===void 0&&(P=g[b]),T=g.s,T===void 0&&(T=g.v),T===void 0&&(T=p?g.y:g.x),Array.isArray(T)||(T===void 0?T=[]:T=[T]),o=0;o<T.length;o++)C[P][1].push(T[o])}}}h._categoriesValue=C;var H=[];for(i=0;i<C.length;i++)H.push([C[i][0],u[v](C[i][1])]);H.sort(x===\"descending\"?f:c),h._categoriesAggregatedValue=H,h._initialCategories=H.map(function(N){return N[0]}),r=r.concat(h.sortByInitialCategories())}}}return r}function One(e,t,r){var n={};function i(l){l.clearCalc(),l.type===\"multicategory\"&&l.setupMultiCategory(t),n[l._id]=1}ja.simpleMap(e,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[Tp.id2name(s)])}function qne(e){var t=e._fullLayout,r=t._visibleModules,n={},i,a,o;for(a=0;a<r.length;a++){var s=r[a],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;n[u]?ja.pushUnique(n[u],l):n[u]=[l]}}for(o in n){var c=n[o],f=t._subplots[o];if(Array.isArray(f))for(i=0;i<f.length;i++){var h=f[i],d=o===\"cartesian\"?t._plots[h]:t[h];for(a=0;a<c.length;a++)c[a](e,d,h)}else for(a=0;a<c.length;a++)c[a](e)}}ba.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()};ba.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()};ba.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,n=t._previousSelections;t._previousSelections=r;var i=t._reselect||JSON.stringify(r)!==JSON.stringify(n);Xl.getComponentMethod(\"selections\",\"reselect\")(e,i)};ba.generalUpdatePerTraceModule=function(e,t,r,n){var i=t.traceHash,a={},o;for(o=0;o<r.length;o++){var s=r[o],l=s[0].trace;l.visible&&(a[l.type]=a[l.type]||[],a[l.type].push(s))}for(var u in i)if(!a[u]){var c=i[u][0],f=c[0].trace;f.visible=!1,a[u]=[c]}for(var h in a){var d=a[h],v=d[0][0].trace._module;v.plot(e,t,ja.filterVisible(d),n)}t.traceHash=a};ba.plotBasePlot=function(e,t,r,n,i){var a=Xl.getModule(e),o=znt(t.calcdata,a)[0];a.plot(t,o,n,i)};ba.cleanBasePlot=function(e,t,r,n,i){var a=i._has&&i._has(e),o=r._has&&r._has(e);a&&!o&&i[\"_\"+e+\"layer\"].selectAll(\"g.trace\").remove()}});var Wp=ye(yb=>{\"use strict\";yb.xmlns=\"http://www.w3.org/2000/xmlns/\";yb.svg=\"http://www.w3.org/2000/svg\";yb.xlink=\"http://www.w3.org/1999/xlink\";yb.svgAttrs={xmlns:yb.svg,\"xmlns:xlink\":yb.xlink}});var Kh=ye((dir,Xne)=>{\"use strict\";Xne.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}});var ru=ye(b0=>{\"use strict\";var Ch=Oa(),Ty=Dr(),Ynt=Ty.strTranslate,dq=Wp(),Knt=Kh().LINE_SPACING,Jnt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr(\"data-notex\")&&t&&t._context.typesetMath&&typeof MathJax!=\"undefined\"&&n.match(Jnt),a=Ch.select(e.node().parentNode);if(a.empty())return;var o=e.attr(\"class\")?e.attr(\"class\").split(\" \")[0]:\"text\";o+=\"-math\",a.selectAll(\"svg.\"+o).remove(),a.selectAll(\"g.\"+o+\"-group\").remove(),e.style(\"display\",null).attr({\"data-unformatted\":n,\"data-math\":\"N\"});function s(){a.empty()||(o=e.attr(\"class\")+\"-math\",a.select(\"svg.\"+o).remove()),e.text(\"\").style(\"white-space\",\"pre\");var l=cat(e.node(),n);l&&e.style(\"pointer-events\",\"all\"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style(\"display\",\"none\");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};tat(i[2],c,function(f,h,d){a.selectAll(\"svg.\"+o).remove(),a.selectAll(\"g.\"+o+\"-group\").remove();var v=f&&f.select(\"svg\");if(!v||!v.node()){s(),l();return}var x=a.append(\"g\").classed(o+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":n,\"data-math\":\"Y\"});x.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var C=e.node().style.fill||\"black\",E=v.select(\"g\");E.attr({fill:C,stroke:C});var A=E.node().getBoundingClientRect(),L=A.width,_=A.height;(L>b||_>p)&&(v.style(\"overflow\",\"hidden\"),A=v.node().getBoundingClientRect(),L=A.width,_=A.height);var k=+e.attr(\"x\"),M=+e.attr(\"y\"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]===\"y\")x.attr({transform:\"rotate(\"+[-90,k,M]+\")\"+Ynt(-L/2,P-_/2)});else if(o[0]===\"l\")M=P-_/2;else if(o[0]===\"a\"&&o.indexOf(\"atitle\")!==0)k=0,M=P;else{var T=e.attr(\"text-anchor\");k=k-L*(T===\"middle\"?.5:T===\"end\"?1:0),M=M+P-_/2}v.attr({x:k,y:M}),r&&r.call(e,x),l(x)})})):s(),e};var $nt=/(<|&lt;|&#60;)/g,Qnt=/(>|&gt;|&#62;)/g;function eat(e){return e.replace($nt,\"\\\\lt \").replace(Qnt,\"\\\\gt \")}var Zne=[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]];function tat(e,t,r){var n=parseInt((MathJax.version||\"\").split(\".\")[0]);if(n!==2&&n!==3){Ty.warn(\"No MathJax version:\",MathJax.version);return}var i,a,o,s,l=function(){return a=Ty.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\"none\",tex2jax:{inlineMath:Zne},displayAlign:\"left\"})},u=function(){a=Ty.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zne},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!==\"SVG\")return MathJax.Hub.setRenderer(\"SVG\")},f=function(){i=MathJax.config.startup.output,i!==\"svg\"&&(MathJax.config.startup.output=\"svg\")},h=function(){var C=\"math-output-\"+Ty.randstr({},64);s=Ch.select(\"body\").append(\"div\").attr({id:C}).style({visibility:\"hidden\",position:\"absolute\",\"font-size\":t.fontSize+\"px\"}).text(eat(e));var E=s.node();return n===2?MathJax.Hub.Typeset(E):MathJax.typeset([E])},d=function(){var C=s.select(n===2?\".MathJax_SVG\":\".MathJax\"),E=!C.empty()&&s.select(\"svg\").node();if(!E)Ty.log(\"There was an error in the tex syntax.\",e),r();else{var A=E.getBoundingClientRect(),L;n===2?L=Ch.select(\"body\").select(\"#MathJax_SVG_glyphs\"):L=C.select(\"defs\"),r(C,L,A)}s.remove()},v=function(){if(i!==\"SVG\")return MathJax.Hub.setRenderer(i)},x=function(){i!==\"svg\"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),x(),p()}))}var $ne={sup:\"font-size:70%\",sub:\"font-size:70%\",s:\"text-decoration:line-through\",u:\"text-decoration:underline\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},rat={sub:\"0.3em\",sup:\"-0.6em\"},iat={sub:\"-0.21em\",sup:\"0.42em\"},Yne=\"\\u200B\",Kne=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],Qne=b0.NEWLINES=/(\\r\\n?|\\n)/g,pq=/(<[^<>]*>)/,gq=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,nat=/<br(\\s+.*)?>/i;b0.BR_TAG_ALL=/<br(\\s+.*)?>/gi;var eae=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,tae=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,rae=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,aat=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&K6(n)}var oat=/(^|;)\\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:[\"br\"],i=\"...\",a=i.length,o=e.split(pq),s=[],l=\"\",u=0,c=0;c<o.length;c++){var f=o[c],h=f.match(gq),d=h&&h[2].toLowerCase();if(d)n.indexOf(d)!==-1&&(s.push(f),l=d);else{var v=f.length;if(u+v<r)s.push(f),u+=v;else if(u<r){var x=r-u;l&&(l!==\"br\"||x<=a||v<=a)&&s.pop(),r>a?s.push(f.substr(0,x-a)+i):s.push(f.substr(0,x));break}l=\"\"}}return s.join(\"\")};var sat={mu:\"\\u03BC\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xA0\",times:\"\\xD7\",plusmn:\"\\xB1\",deg:\"\\xB0\"},lat=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function K6(e){return e.replace(lat,function(t,r){var n;return r.charAt(0)===\"#\"?n=uat(r.charAt(1)===\"x\"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=sat[r],n||t})}b0.convertEntities=K6;function uat(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function cat(e,t){t=t.replace(Qne,\" \");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(dq.svg,\"tspan\");Ch.select(_).attr({class:\"line\",dy:a*Knt+\"em\"}),e.appendChild(_),i=_;var k=n;if(n=[{node:_}],k.length>1)for(var M=1;M<k.length;M++)s(k[M])}function s(_){var k=_.type,M={},g;if(k===\"a\"){g=\"a\";var P=_.target,T=_.href,z=_.popup;T&&(M={\"xlink:xlink:show\":P===\"_blank\"||P.charAt(0)!==\"_\"?\"new\":\"replace\",target:P,\"xlink:xlink:href\":T},z&&(M.onclick='window.open(this.href.baseVal,this.target.baseVal,\"'+z+'\");return false;'))}else g=\"tspan\";_.style&&(M.style=_.style);var O=document.createElementNS(dq.svg,g);if(k===\"sup\"||k===\"sub\"){l(i,Yne),i.appendChild(O);var V=document.createElementNS(dq.svg,\"tspan\");l(V,Yne),Ch.select(V).attr(\"dy\",iat[k]),M.dy=rat[k],i.appendChild(O),i.appendChild(V)}else i.appendChild(O);Ch.select(O).attr(M),i=_.node=O,n.push(_)}function l(_,k){_.appendChild(document.createTextNode(k))}function u(_){if(n.length===1){Ty.log(\"Ignoring unexpected end tag </\"+_+\">.\",t);return}var k=n.pop();_!==k.type&&Ty.log(\"Start tag <\"+k.type+\"> doesnt match end tag <\"+_+\">. Pretending it did match.\",t),i=n[n.length-1].node}var c=nat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(pq),h=0;h<f.length;h++){var d=f[h],v=d.match(gq),x=v&&v[2].toLowerCase(),b=$ne[x];if(x===\"br\")o();else if(b===void 0)l(i,K6(d));else if(v[1])u(x);else{var p=v[4],C={type:x},E=_b(p,eae);if(E?(E=E.replace(oat,\"$1 fill:\"),b&&(E+=\";\"+b)):b&&(E=b),E&&(C.style=E),x===\"a\"){r=!0;var A=_b(p,tae);if(A){var L=iae(A);L&&(C.href=L,C.target=_b(p,rae)||\"_blank\",C.popup=_b(p,aat))}}s(C)}}return r}function iae(e){var t=encodeURI(decodeURI(e)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return Kne.indexOf(i)!==-1&&Kne.indexOf(a)!==-1?t:\"\"}b0.sanitizeHTML=function(t){t=t.replace(Qne,\" \");for(var r=document.createElement(\"p\"),n=r,i=[],a=t.split(pq),o=0;o<a.length;o++){var s=a[o],l=s.match(gq),u=l&&l[2].toLowerCase();if(u in $ne)if(l[1])i.length&&(n=i.pop());else{var c=l[4],f=_b(c,eae),h=f?{style:f}:{};if(u===\"a\"){var d=_b(c,tae);if(d){var v=iae(d);if(v){h.href=v;var x=_b(c,rae);x&&(h.target=x)}}}var b=document.createElement(u);n.appendChild(b),Ch.select(b).attr(h),n=b,i.push(b)}else n.appendChild(document.createTextNode(K6(s)))}var p=\"innerHTML\";return r[p]};b0.lineCount=function(t){return t.selectAll(\"tspan.line\").size()||1};b0.positionText=function(t,r,n){return t.each(function(){var i=Ch.select(this);function a(l,u){return u===void 0?(u=i.attr(l),u===null&&(i.attr(l,0),u=0)):i.attr(l,u),u}var o=a(\"x\",r),s=a(\"y\",n);this.nodeName===\"text\"&&i.selectAll(\"tspan.line\").attr({x:o,y:s})})};function Jne(e,t,r){var n=r.horizontalAlign,i=r.verticalAlign||\"top\",a=e.node().getBoundingClientRect(),o=t.node().getBoundingClientRect(),s,l,u;return i===\"bottom\"?l=function(){return a.bottom-s.height}:i===\"middle\"?l=function(){return a.top+(a.height-s.height)/2}:l=function(){return a.top},n===\"right\"?u=function(){return a.right-s.width}:n===\"center\"?u=function(){return a.left+(a.width-s.width)/2}:u=function(){return a.left},function(){s=this.node().getBoundingClientRect();var c=u()-o.left,f=l()-o.top,h=r.gd||{};if(r.gd){h._fullLayout._calcInverseTransform(h);var d=Ty.apply3DTransform(h._fullLayout._invTransform)(c,f);c=d[0],f=d[1]}return this.style({top:f+\"px\",left:c+\"px\",\"z-index\":1e3}),this}}var vq=\"1px \";b0.makeTextShadow=function(e){var t=vq,r=vq,n=vq;return t+r+n+e+\", -\"+t+\"-\"+r+n+e+\", \"+t+\"-\"+r+n+e+\", -\"+t+r+n+e};b0.makeEditable=function(e,t){var r=t.gd,n=t.delegate,i=Ch.dispatch(\"edit\",\"input\",\"cancel\"),a=n||e;if(e.style({\"pointer-events\":n?\"none\":\"all\"}),e.size()!==1)throw new Error(\"boo\");function o(){l(),e.style({opacity:0});var u=a.attr(\"class\"),c;u?c=\".\"+u.split(\" \")[0]+\"-math-group\":c=\"[class*=-math-group]\",c&&Ch.select(e.node().parentNode).select(c).style({opacity:0})}function s(u){var c=u.node(),f=document.createRange();f.selectNodeContents(c);var h=window.getSelection();h.removeAllRanges(),h.addRange(f),c.focus()}function l(){var u=Ch.select(r),c=u.select(\".svg-container\"),f=c.append(\"div\"),h=e.node().style,d=parseFloat(h.fontSize||12),v=t.text;v===void 0&&(v=e.attr(\"data-unformatted\")),f.classed(\"plugin-editable editable\",!0).style({position:\"absolute\",\"font-family\":h.fontFamily||\"Arial\",\"font-size\":d,color:t.fill||h.fill||\"black\",opacity:1,\"background-color\":t.background||\"transparent\",outline:\"#ffffff33 1px solid\",margin:[-d/8+1,0,0,-1].join(\"px \")+\"px\",padding:\"0\",\"box-sizing\":\"border-box\"}).attr({contenteditable:!0}).text(v).call(Jne(e,c,t)).on(\"blur\",function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var x=Ch.select(this).attr(\"class\"),b;x?b=\".\"+x.split(\" \")[0]+\"-math-group\":b=\"[class*=-math-group]\",b&&Ch.select(e.node().parentNode).select(b).style({opacity:0});var p=this.textContent;Ch.select(this).transition().duration(0).remove(),Ch.select(document).on(\"mouseup\",null),i.edit.call(e,p)}).on(\"focus\",function(){var x=this;r._editing=!0,Ch.select(document).on(\"mouseup\",function(){if(Ch.event.target===x)return!1;document.activeElement===f.node()&&f.node().blur()})}).on(\"keyup\",function(){Ch.event.which===27?(r._editing=!1,e.style({opacity:1}),Ch.select(this).style({opacity:0}).on(\"blur\",function(){return!1}).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),Ch.select(this).call(Jne(e,c,t)))}).on(\"keydown\",function(){Ch.event.which===13&&this.blur()}).call(s)}return t.immediate?o():a.on(\"click\",o),Ch.rebind(e,i,\"on\")}});var pv=ye((pir,fae)=>{\"use strict\";var fat=Oa(),$6=cd(),JS=Eo(),J6=Dr(),nae=Ca(),hat=sb().isValid;function dat(e,t,r){var n=t?J6.nestedProperty(e,t).get()||{}:e,i=n[r||\"color\"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(J6.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(JS(i[o])){a=!0;break}}return J6.isPlainObject(n)&&(a||n.showscale===!0||JS(n.cmin)&&JS(n.cmax)||hat(n.colorscale)||J6.isPlainObject(n.colorbar))}var aae=[\"showscale\",\"autocolorscale\",\"colorscale\",\"reversescale\",\"colorbar\"],KS=[\"min\",\"max\",\"mid\",\"auto\"];function sae(e){var t=e._colorAx,r=t||e,n={},i,a,o;for(a=0;a<aae.length;a++)o=aae[a],n[o]=r[o];if(t)for(i=\"c\",a=0;a<KS.length;a++)o=KS[a],n[o]=r[\"c\"+o];else{var s;for(a=0;a<KS.length;a++){if(o=KS[a],s=\"c\"+o,s in r){n[o]=r[s];continue}s=\"z\"+o,s in r&&(n[o]=r[s])}i=s.charAt(0)}return n._sync=function(l,u){var c=KS.indexOf(l)!==-1?i+l:l;r[c]=r[\"_\"+c]=u},n}function lae(e){for(var t=sae(e),r=t.min,n=t.max,i=t.reversescale?uae(t.colorscale):t.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function uae(e){for(var t=e.length,r=new Array(t),n=t-1,i=0;n>=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function cae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o<i;o++){var s=$6(n[o]).toRgb();a[o]=[s.r,s.g,s.b,s.a]}var l=fat.scale.linear().domain(r).range(a).clamp(!0),u=t.noNumericCheck,c=t.returnArray,f;return u&&c?f=l:u?f=function(h){return oae(l(h))}:c?f=function(h){return JS(h)?l(h):$6(h).isValid()?h:nae.defaultLine}:f=function(h){return JS(h)?oae(l(h)):$6(h).isValid()?h:nae.defaultLine},f.domain=l.domain,f.range=function(){return n},f}function vat(e,t){return cae(lae(e),t)}function oae(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return $6(t).toRgbString()}fae.exports={hasColorscale:dat,extractOpts:sae,extractScale:lae,flipScale:uae,makeColorScaleFunc:cae,makeColorScaleFuncFromTrace:vat}});var df=ye((gir,vae)=>{\"use strict\";var hae=OO(),pat=hae.FORMAT_LINK,gat=hae.DATE_FORMAT_LINK;function mat(e,t){return{valType:\"string\",dflt:\"\",editType:\"none\",description:(t?mq:dae)(\"hover text\",e)+[\"By default the values are formatted using \"+(t?\"generic number format\":\"`\"+e+\"axis.hoverformat`\")+\".\"].join(\" \")}}function mq(e,t){return[\"Sets the \"+e+\" formatting rule\"+(t?\"for `\"+t+\"` \":\"\"),\"using d3 formatting mini-languages\",\"which are very similar to those in Python. For numbers, see: \"+pat+\".\"].join(\" \")}function dae(e,t){return mq(e,t)+[\" And for dates see: \"+gat+\".\",\"We add two items to d3's date formatter:\",\"*%h* for half of the year as a decimal number as well as\",\"*%{n}f* for fractional seconds\",\"with n digits. For example, *2016-10-13 09:15:23.456* with tickformat\",\"*%H~%M~%S.%2f* would display *09~15~23.46*\"].join(\" \")}vae.exports={axisHoverFormat:mat,descriptionOnlyNumbers:mq,descriptionWithDates:dae}});var Rd=ye((yir,Pae)=>{\"use strict\";var pae=ec(),w3=Eh(),Lae=Pd().dash,_q=Ao().extendFlat,gae=pl().templatedArray,mir=Qo().templateFormatStringDescription,mae=df().descriptionWithDates,yat=hs().ONEDAY,pm=hd(),_at=pm.HOUR_PATTERN,xat=pm.WEEKDAY_PATTERN,yq={valType:\"enumerated\",values:[\"auto\",\"linear\",\"array\"],editType:\"ticks\",impliedEdits:{tick0:void 0,dtick:void 0}},bat=_q({},yq,{values:yq.values.slice().concat([\"sync\"])});function yae(e){return{valType:\"integer\",min:0,dflt:e?5:0,editType:\"ticks\"}}var _ae={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},xae={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},bae={valType:\"data_array\",editType:\"ticks\"},wae={valType:\"enumerated\",values:[\"outside\",\"inside\",\"\"],editType:\"ticks\"};function Tae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=5),t}function Aae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=1),t}var Sae={valType:\"color\",dflt:w3.defaultLine,editType:\"ticks\"},Mae={valType:\"color\",dflt:w3.lightLine,editType:\"ticks\"};function Eae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=1),t}var Cae=_q({},Lae,{editType:\"ticks\"}),kae={valType:\"boolean\",editType:\"ticks\"};Pae.exports={visible:{valType:\"boolean\",editType:\"plot\"},color:{valType:\"color\",dflt:w3.defaultLine,editType:\"ticks\"},title:{text:{valType:\"string\",editType:\"ticks\"},font:pae({editType:\"ticks\"}),standoff:{valType:\"number\",min:0,editType:\"ticks\"},editType:\"ticks\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"log\",\"date\",\"category\",\"multicategory\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\",\"min reversed\",\"max reversed\",\"min\",\"max\"],dflt:!0,editType:\"axrange\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},autorangeoptions:{minallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},maxallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},clipmin:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},clipmax:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},include:{valType:\"any\",arrayOk:!0,editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},editType:\"plot\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0},{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0}],editType:\"axrange\",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},maxallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},modebardisable:{valType:\"flaglist\",flags:[\"autoscale\",\"zoominout\"],extras:[\"none\"],dflt:\"none\",editType:\"modebar\"},insiderange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},scaleanchor:{valType:\"enumerated\",values:[pm.idRegex.x.toString(),pm.idRegex.y.toString(),!1],editType:\"plot\"},scaleratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},constrain:{valType:\"enumerated\",values:[\"range\",\"domain\"],editType:\"plot\"},constraintoward:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\",\"top\",\"middle\",\"bottom\"],editType:\"plot\"},matches:{valType:\"enumerated\",values:[pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:\"calc\"},rangebreaks:gae(\"rangebreak\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},bounds:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},pattern:{valType:\"enumerated\",values:[xat,_at,\"\"],editType:\"calc\"},values:{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"any\",editType:\"calc\"}},dvalue:{valType:\"number\",editType:\"calc\",min:0,dflt:yat},editType:\"calc\"}),tickmode:bat,nticks:yae(),tick0:_ae,dtick:xae,ticklabelstep:{valType:\"integer\",min:1,dflt:1,editType:\"ticks\"},tickvals:bae,ticktext:{valType:\"data_array\",editType:\"ticks\"},ticks:wae,tickson:{valType:\"enumerated\",values:[\"labels\",\"boundaries\"],dflt:\"labels\",editType:\"ticks\"},ticklabelmode:{valType:\"enumerated\",values:[\"instant\",\"period\"],dflt:\"instant\",editType:\"ticks\"},ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\",editType:\"calc\"},ticklabeloverflow:{valType:\"enumerated\",values:[\"allow\",\"hide past div\",\"hide past domain\"],editType:\"calc\"},ticklabelshift:{valType:\"integer\",dflt:0,editType:\"ticks\"},ticklabelstandoff:{valType:\"integer\",dflt:0,editType:\"ticks\"},ticklabelindex:{valType:\"integer\",arrayOk:!0,editType:\"calc\"},mirror:{valType:\"enumerated\",values:[!0,\"ticks\",!1,\"all\",\"allticks\"],dflt:!1,editType:\"ticks+layoutstyle\"},ticklen:Tae(),tickwidth:Aae(),tickcolor:Sae,showticklabels:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},labelalias:{valType:\"any\",dflt:!1,editType:\"ticks\"},automargin:{valType:\"flaglist\",flags:[\"height\",\"width\",\"left\",\"right\",\"top\",\"bottom\"],extras:[!0,!1],dflt:!1,editType:\"ticks\"},showspikes:{valType:\"boolean\",dflt:!1,editType:\"modebar\"},spikecolor:{valType:\"color\",dflt:null,editType:\"none\"},spikethickness:{valType:\"number\",dflt:3,editType:\"none\"},spikedash:_q({},Lae,{dflt:\"dash\",editType:\"none\"}),spikemode:{valType:\"flaglist\",flags:[\"toaxis\",\"across\",\"marker\"],dflt:\"toaxis\",editType:\"none\"},spikesnap:{valType:\"enumerated\",values:[\"data\",\"cursor\",\"hovered data\"],dflt:\"hovered data\",editType:\"none\"},tickfont:pae({editType:\"ticks\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"ticks\"},autotickangles:{valType:\"info_array\",freeLength:!0,items:{valType:\"angle\"},dflt:[0,30,90],editType:\"ticks\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"ticks\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"ticks\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"ticks\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"ticks\",description:mae(\"tick label\")},tickformatstops:gae(\"tickformatstop\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dtickrange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"ticks\"},{valType:\"any\",editType:\"ticks\"}],editType:\"ticks\"},value:{valType:\"string\",dflt:\"\",editType:\"ticks\"},editType:\"ticks\"}),hoverformat:{valType:\"string\",dflt:\"\",editType:\"none\",description:mae(\"hover text\")},unifiedhovertitle:{text:{valType:\"string\",dflt:\"\",editType:\"none\"},editType:\"none\"},showline:{valType:\"boolean\",dflt:!1,editType:\"ticks+layoutstyle\"},linecolor:{valType:\"color\",dflt:w3.defaultLine,editType:\"layoutstyle\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks+layoutstyle\"},showgrid:kae,gridcolor:Mae,gridwidth:Eae(),griddash:Cae,zeroline:{valType:\"boolean\",editType:\"ticks\"},zerolinecolor:{valType:\"color\",dflt:w3.defaultLine,editType:\"ticks\"},zerolinelayer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"below traces\",editType:\"plot\"},zerolinewidth:{valType:\"number\",dflt:1,editType:\"ticks\"},showdividers:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dividercolor:{valType:\"color\",dflt:w3.defaultLine,editType:\"ticks\"},dividerwidth:{valType:\"number\",dflt:1,editType:\"ticks\"},anchor:{valType:\"enumerated\",values:[\"free\",pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],editType:\"plot\"},overlaying:{valType:\"enumerated\",values:[\"free\",pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:\"plot\"},minor:{tickmode:yq,nticks:yae(\"minor\"),tick0:_ae,dtick:xae,tickvals:bae,ticks:wae,ticklen:Tae(\"minor\"),tickwidth:Aae(\"minor\"),tickcolor:Sae,gridcolor:Mae,gridwidth:Eae(\"minor\"),griddash:Cae,showgrid:kae,editType:\"ticks\"},minorloglabels:{valType:\"enumerated\",values:[\"small digits\",\"complete\",\"none\"],dflt:\"small digits\",editType:\"calc\"},layer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"above traces\",editType:\"plot\"},domain:{valType:\"info_array\",items:[{valType:\"number\",min:0,max:1,editType:\"plot\"},{valType:\"number\",min:0,max:1,editType:\"plot\"}],dflt:[0,1],editType:\"plot\"},position:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},autoshift:{valType:\"boolean\",dflt:!1,editType:\"plot\"},shift:{valType:\"number\",editType:\"plot\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\",\"total ascending\",\"total descending\",\"min ascending\",\"min descending\",\"max ascending\",\"max descending\",\"sum ascending\",\"sum descending\",\"mean ascending\",\"mean descending\",\"geometric mean ascending\",\"geometric mean descending\",\"median ascending\",\"median descending\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"}});var Q6=ye((_ir,Dae)=>{\"use strict\";var $c=Rd(),Iae=ec(),Rae=Ao().extendFlat,wat=mc().overrideAll;Dae.exports=wat({orientation:{valType:\"enumerated\",values:[\"h\",\"v\"],dflt:\"v\"},thicknessmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\"},thickness:{valType:\"number\",min:0,dflt:30},lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\"},xref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"]},xpad:{valType:\"number\",min:0,dflt:10},y:{valType:\"number\"},yref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"]},ypad:{valType:\"number\",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:\"number\",min:0,dflt:0},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Rae({},$c.ticks,{dflt:\"\"}),ticklabeloverflow:Rae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Iae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:\"string\"},font:Iae({}),side:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"]}}},\"colorbars\",\"from-root\")});var Tu=ye((bir,zae)=>{\"use strict\";var Tat=Q6(),Aat=n3().counter,Sat=Z1(),Fae=sb().scales,xir=Sat(Fae);function eL(e){return\"`\"+e+\"`\"}zae.exports=function(t,r){t=t||\"\",r=r||{};var n=r.cLetter||\"c\",i=\"onlyIfNumerical\"in r?r.onlyIfNumerical:!!t,a=\"noScale\"in r?r.noScale:t===\"marker.line\",o=\"showScaleDflt\"in r?r.showScaleDflt:n===\"z\",s=typeof r.colorscaleDflt==\"string\"?Fae[r.colorscaleDflt]:null,l=r.editTypeOverride||\"\",u=t?t+\".\":\"\",c,f;\"colorAttr\"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:\"z\",c:\"color\"}[n],f=\"in \"+eL(u+c));var h=i?\" Has an effect only if \"+f+\" is set to a numerical array.\":\"\",d=n+\"auto\",v=n+\"min\",x=n+\"max\",b=n+\"mid\",p=eL(u+d),C=eL(u+v),E=eL(u+x),A=C+\" and \"+E,L={};L[v]=L[x]=void 0;var _={};_[d]=!1;var k={};return c===\"color\"&&(k.color={valType:\"color\",arrayOk:!0,editType:l||\"style\"},r.anim&&(k.color.anim=!0)),k[d]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:L},k[v]={valType:\"number\",dflt:null,editType:l||\"plot\",impliedEdits:_},k[x]={valType:\"number\",dflt:null,editType:l||\"plot\",impliedEdits:_},k[b]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:L},k.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:s,impliedEdits:{autocolorscale:!1}},k.autocolorscale={valType:\"boolean\",dflt:r.autoColorDflt!==!1,editType:\"calc\",impliedEdits:{colorscale:void 0}},k.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},a||(k.showscale={valType:\"boolean\",dflt:o,editType:\"calc\"},k.colorbar=Tat),r.noColorAxis||(k.coloraxis={valType:\"subplotid\",regex:Aat(\"coloraxis\"),dflt:null,editType:\"calc\"}),k}});var bq=ye((wir,Oae)=>{\"use strict\";var Mat=Ao().extendFlat,Eat=Tu(),xq=sb().scales;Oae.exports={editType:\"calc\",colorscale:{editType:\"calc\",sequential:{valType:\"colorscale\",dflt:xq.Reds,editType:\"calc\"},sequentialminus:{valType:\"colorscale\",dflt:xq.Blues,editType:\"calc\"},diverging:{valType:\"colorscale\",dflt:xq.RdBu,editType:\"calc\"}},coloraxis:Mat({_isSubplotObj:!0,editType:\"calc\"},Eat(\"\",{colorAttr:\"corresponding trace color array(s)\",noColorAxis:!0,showScaleDflt:!0}))}});var wq=ye((Tir,qae)=>{\"use strict\";var Cat=Dr();qae.exports=function(t){return Cat.isPlainObject(t.colorbar)}});var Sq=ye(Aq=>{\"use strict\";var Tq=Eo(),Bae=Dr(),Nae=hs(),kat=Nae.ONEDAY,Lat=Nae.ONEWEEK;Aq.dtick=function(e,t){var r=t===\"log\",n=t===\"date\",i=t===\"category\",a=n?kat:1;if(!e)return a;if(Tq(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!=\"string\"||!(n||r))return a;var o=e.charAt(0),s=e.substr(1);return s=Tq(s)?Number(s):0,s<=0||!(n&&o===\"M\"&&s===Math.round(s)||r&&o===\"L\"||r&&o===\"D\"&&(s===1||s===2))?a:e};Aq.tick0=function(e,t,r,n){if(t===\"date\")return Bae.cleanDate(e,Bae.dateTick0(r,n%Lat===0?1:0));if(!(n===\"D1\"||n===\"D2\"))return Tq(e)?Number(e):0}});var xb=ye((Sir,Vae)=>{\"use strict\";var Uae=Sq(),Pat=Dr().isArrayOrTypedArray,Iat=vv().isTypedArraySpec,Rat=vv().decodeTypedArraySpec;Vae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?\"minor.\":\"\";function c(C){var E=s[C];return Iat(E)&&(E=Rat(E)),E!==void 0?E:(l._template||{})[C]}var f=c(\"tick0\"),h=c(\"dtick\"),d=c(\"tickvals\"),v=Pat(d)?\"array\":h?\"linear\":\"auto\",x=n(u+\"tickmode\",v);if(x===\"auto\"||x===\"sync\")n(u+\"nticks\");else if(x===\"linear\"){var b=l.dtick=Uae.dtick(h,i);l.tick0=Uae.tick0(f,i,r.calendar,b)}else if(i!==\"multicategory\"){var p=n(u+\"tickvals\");p===void 0?l.tickmode=\"auto\":o||n(\"ticktext\")}}});var T3=ye((Mir,Hae)=>{\"use strict\";var Mq=Dr(),Gae=Rd();Hae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Gae.minor:Gae,u=a?\"minor.\":\"\",c=Mq.coerce2(o,s,l,\"ticklen\",a?(r.ticklen||5)*.6:void 0),f=Mq.coerce2(o,s,l,\"tickwidth\",a?r.tickwidth||1:void 0),h=Mq.coerce2(o,s,l,\"tickcolor\",(a?r.tickcolor:void 0)||s.color),d=n(u+\"ticks\",!a&&i.outerTicks||c||f||h?\"outside\":\"\");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var Eq=ye((Eir,jae)=>{\"use strict\";jae.exports=function(t){var r=[\"showexponent\",\"showtickprefix\",\"showticksuffix\"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Yd=ye((Cir,Wae)=>{\"use strict\";var tL=Dr(),Dat=pl();Wae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||\"visible\",o=r[i],s=tL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=Dat.arrayTemplater(r,i,a),c,f;for(c=0;c<s.length;c++){var h=s[c];tL.isPlainObject(h)?f=u.newItem(h):(f=u.newItem({}),f[a]=!1),f._index=c,f[a]!==!1&&n.handleItemDefaults(h,f,r,n),l.push(f)}var d=u.defaultItems();for(c=0;c<d.length;c++)f=d[c],f._index=l.length,n.handleItemDefaults({},f,r,n,{}),l.push(f);if(tL.isArrayOrTypedArray(o)){var v=Math.min(o.length,l.length);for(c=0;c<v;c++)tL.relinkPrivateKeys(l[c],o[c])}return l}});var e_=ye((kir,Zae)=>{\"use strict\";var Cq=Dr(),Fat=Ca().contrast,Xae=Rd(),zat=Eq(),Oat=Yd();Zae.exports=function(t,r,n,i,a){a||(a={});var o=n(\"labelalias\");Cq.isPlainObject(o)||delete r.labelalias;var s=zat(t),l=n(\"showticklabels\");if(l){a.noTicklabelshift||n(\"ticklabelshift\"),a.noTicklabelstandoff||n(\"ticklabelstandoff\");var u=a.font||{},c=r.color,f=r.ticklabelposition||\"\",h=f.indexOf(\"inside\")!==-1?Fat(a.bgColor):c&&c!==Xae.color.dflt?c:u.color;if(Cq.coerceFont(n,\"tickfont\",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!==\"multicategory\"&&i!==\"log\"&&n(\"ticklabelstep\"),!a.noAng){var d=n(\"tickangle\");!a.noAutotickangles&&d===\"auto\"&&n(\"autotickangles\")}if(i!==\"category\"){var v=n(\"tickformat\");Oat(t,r,{name:\"tickformatstops\",inclusionAttr:\"enabled\",handleItemDefaults:qat}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!==\"date\"&&(n(\"showexponent\",s),n(\"exponentformat\"),n(\"minexponent\"),n(\"separatethousands\"))}!a.noMinorloglabels&&i===\"log\"&&n(\"minorloglabels\")}};function qat(e,t){function r(i,a){return Cq.coerce(e,t,Xae.tickformatstops,i,a)}var n=r(\"enabled\");n&&(r(\"dtickrange\"),r(\"value\"))}});var t_=ye((Lir,Yae)=>{\"use strict\";var Bat=Eq();Yae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=Bat(t),l=n(\"tickprefix\");l&&n(\"showtickprefix\",s);var u=n(\"ticksuffix\",o);u&&n(\"showticksuffix\",s)}});var kq=ye((Pir,Kae)=>{\"use strict\";var r_=Dr(),Nat=pl(),Uat=xb(),Vat=T3(),Gat=e_(),Hat=t_(),jat=Q6();Kae.exports=function(t,r,n){var i=Nat.newContainer(r,\"colorbar\"),a=t.colorbar||{};function o(T,z){return r_.coerce(a,i,jat,T,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o(\"orientation\"),f=c===\"v\",h=o(\"thicknessmode\");o(\"thickness\",h===\"fraction\"?30/(f?l:u):30);var d=o(\"lenmode\");o(\"len\",d===\"fraction\"?1:f?u:l);var v=o(\"yref\"),x=o(\"xref\"),b=v===\"paper\",p=x===\"paper\",C,E,A,L=\"left\";f?(A=\"middle\",L=p?\"left\":\"right\",C=p?1.02:1,E=.5):(A=b?\"bottom\":\"top\",L=\"center\",C=.5,E=b?1.02:1),r_.coerce(a,i,{x:{valType:\"number\",min:p?-2:0,max:p?3:1,dflt:C}},\"x\"),r_.coerce(a,i,{y:{valType:\"number\",min:b?-2:0,max:b?3:1,dflt:E}},\"y\"),o(\"xanchor\",L),o(\"xpad\"),o(\"yanchor\",A),o(\"ypad\"),r_.noneOrAll(a,i,[\"x\",\"y\"]),o(\"outlinecolor\"),o(\"outlinewidth\"),o(\"bordercolor\"),o(\"borderwidth\"),o(\"bgcolor\");var _=r_.coerce(a,i,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:f?[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]:[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]}},\"ticklabelposition\");o(\"ticklabeloverflow\",_.indexOf(\"inside\")!==-1?\"hide past domain\":\"hide past div\"),Uat(a,i,o,\"linear\");var k=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:k};_.indexOf(\"inside\")!==-1&&(M.bgColor=\"black\"),Hat(a,i,o,\"linear\",M),Gat(a,i,o,\"linear\",M),Vat(a,i,o,\"linear\",M),o(\"title.text\",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:k,P=r_.extendFlat({},k,{family:g.family,size:r_.bigFont(g.size)});r_.coerceFont(o,\"title.font\",P),o(\"title.side\",f?\"top\":\"right\")}});var Jh=ye((Iir,Qae)=>{\"use strict\";var Jae=Eo(),Pq=Dr(),Wat=wq(),Xat=kq(),$ae=sb().isValid,Zat=qa().traceIs;function Lq(e,t){var r=t.slice(0,t.length-1);return t?Pq.nestedProperty(e,r).get()||{}:e}Qae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l=\"_module\"in r,u=Lq(t,o),c=Lq(r,o),f=Lq(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+\"coloraxis\");if(v){var x=Zat(r,\"contour\")&&Pq.nestedProperty(r,\"contours.coloring\").get()||\"heatmap\",b=d[v];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,Pq.warn([\"Ignoring coloraxis:\",v,\"setting\",\"as it is linked to incompatible colorscales.\"].join(\" \")))):d[v]=[x,r,[h]];return}}var p=u[s+\"min\"],C=u[s+\"max\"],E=Jae(p)&&Jae(C)&&p<C,A=i(o+s+\"auto\",!E);A?i(o+s+\"mid\"):(i(o+s+\"min\"),i(o+s+\"max\"));var L=u.colorscale,_=f.colorscale,k;if(L!==void 0&&(k=!$ae(L)),_!==void 0&&(k=!$ae(_)),i(o+\"autocolorscale\",k),i(o+\"colorscale\"),i(o+\"reversescale\"),o!==\"marker.line.\"){var M;o&&l&&(M=Wat(u));var g=i(o+\"showscale\",M);g&&(o&&f&&(c._template=f),Xat(u,c,n))}}});var ioe=ye((Rir,roe)=>{\"use strict\";var eoe=Dr(),Yat=pl(),toe=bq(),Kat=Jh();roe.exports=function(t,r){function n(f,h){return eoe.coerce(t,r,toe,f,h)}n(\"colorscale.sequential\"),n(\"colorscale.sequentialminus\"),n(\"colorscale.diverging\");var i=r._colorAxes,a,o;function s(f,h){return eoe.coerce(a,o,toe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Yat.newContainer(r,l,\"coloraxis\"),o._name=l,Kat(a,o,r,s,{prefix:\"\",cLetter:\"c\"});else{for(var c=0;c<u[2].length;c++)u[2][c]();delete r._colorAxes[l]}}}});var aoe=ye((Dir,noe)=>{\"use strict\";var Jat=Dr(),$at=pv().hasColorscale,Qat=pv().extractOpts;noe.exports=function(t,r){function n(c,f){var h=c[\"_\"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?Jat.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Qat(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,\"colorscale\")}}for(var a=0;a<t.length;a++){var o=t[a],s=o._module.colorbar;if(s)if(Array.isArray(s))for(var l=0;l<s.length;l++)i(o,s[l]);else i(o,s);$at(o,\"marker.line\")&&i(o,{container:\"marker.line\",min:\"cmin\",max:\"cmax\"})}for(var u in r._colorAxes)i(r[u],{min:\"cmin\",max:\"cmax\"})}});var gv=ye((Fir,soe)=>{\"use strict\";var ooe=Eo(),Iq=Dr(),eot=pv().extractOpts;soe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?Iq.nestedProperty(r,o).get():r,l=eot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return Iq.aggNums(Math.min,null,a)},v=function(){return Iq.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&ooe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&ooe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h<h-c&&(f=h+(h-c))),c===f&&(c-=.5,f+=.5),l._sync(\"min\",c),l._sync(\"max\",f),l.autocolorscale){var x;c*f<0?x=i.colorscale.diverging:c>=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,l._sync(\"colorscale\",x)}}});var tc=ye((zir,loe)=>{\"use strict\";var rL=sb(),A3=pv();loe.exports={moduleType:\"component\",name:\"colorscale\",attributes:Tu(),layoutAttributes:bq(),supplyLayoutDefaults:ioe(),handleDefaults:Jh(),crossTraceDefaults:aoe(),calc:gv(),scales:rL.scales,defaultScale:rL.defaultScale,getScale:rL.get,isValidScale:rL.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var Ru=ye((Oir,coe)=>{\"use strict\";var uoe=Dr(),tot=vv().isTypedArraySpec;coe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf(\"lines\")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf(\"markers\")!==-1||e.type===\"splom\")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf(\"text\")!==-1},isBubble:function(e){var t=e.marker;return uoe.isPlainObject(t)&&(uoe.isArrayOrTypedArray(t.size)||tot(t.size))}}});var S3=ye((qir,foe)=>{\"use strict\";var rot=Eo();foe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode===\"area\"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return rot(l)&&l>0?Math.max(l,a):0}}});var rp=ye(mv=>{\"use strict\";var hoe=Dr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type===\"splom\"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i<r.length;i++)for(var a=0;a<n.length;a++)if(t.indexOf(r[i]+n[a])!==-1)return!0;return!1}return t.indexOf(mv.getSubplot(e))!==-1};mv.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r};mv.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r};mv.getDistanceFunction=function(e,t,r,n){return e===\"closest\"?n||mv.quadrature(t,r):e.charAt(0)===\"x\"?t:r};mv.getClosest=function(e,t,r){if(r.index!==!1)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=1/0,i=e.length,a=0;a<i;a++)n=t(e[a]),n<=r.distance&&(r.index=a,r.distance=n);return r};mv.inbox=function(e,t,r){return e*t<0||e===0?r:1/0};mv.quadrature=function(e,t){return function(r){var n=e(r),i=t(r);return Math.sqrt(n*n+i*i)}};mv.makeEventData=function(e,t,r){var n=\"index\"in e?e.index:e.pointNumber,i={data:t._input,fullData:t,curveNumber:t.index,pointNumber:n};if(t._indexToPoints){var a=t._indexToPoints[n];a.length===1?i.pointIndex=a[0]:i.pointIndices=a}else i.pointIndex=n;return t._module.eventData?i=t._module.eventData(i,e,t,r,n):(\"xVal\"in e?i.x=e.xVal:\"x\"in e&&(i.x=e.x),\"yVal\"in e?i.y=e.yVal:\"y\"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),e.zLabelVal!==void 0&&(i.z=e.zLabelVal)),mv.appendArrayPointValue(i,t,n),i};mv.appendArrayPointValue=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=doe(a);if(e[o]===void 0){var s=hoe.nestedProperty(t,a).get(),l=voe(s,r);l!==void 0&&(e[o]=l)}}};mv.appendArrayMultiPointValues=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=doe(a);if(e[o]===void 0){for(var s=hoe.nestedProperty(t,a).get(),l=new Array(r.length),u=0;u<r.length;u++)l[u]=voe(s,r[u]);e[o]=l}}};var iot={ids:\"id\",locations:\"location\",labels:\"label\",values:\"value\",\"marker.colors\":\"color\",parents:\"parent\"};function doe(e){return iot[e]||e}function voe(e,t){if(Array.isArray(t)){if(Array.isArray(e)&&Array.isArray(e[t[0]]))return e[t[0]][t[1]]}else return e[t]}var not={x:!0,y:!0},aot={\"x unified\":!0,\"y unified\":!0};mv.isUnifiedHover=function(e){return typeof e!=\"string\"?!1:!!aot[e]};mv.isXYhover=function(e){return typeof e!=\"string\"?!1:!!not[e]}});var $S=ye((Nir,poe)=>{poe.exports=sot;var Rq={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},oot=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function sot(e){var t=[];return e.replace(oot,function(r,n,i){var a=n.toLowerCase();for(i=uot(i),a==\"m\"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a=\"l\",n=n==\"m\"?\"l\":\"L\");;){if(i.length==Rq[a])return i.unshift(n),t.push(i);if(i.length<Rq[a])throw new Error(\"malformed path data\");t.push([n].concat(i.splice(0,Rq[a])))}}),t}var lot=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig;function uot(e){var t=e.match(lot);return t?t.map(Number):[]}});var woe=ye((Uir,boe)=>{\"use strict\";var cot=$S(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},ds=\"M0,0Z\",goe=Math.sqrt(2),i_=Math.sqrt(3),Dq=Math.PI,Fq=Math.cos,zq=Math.sin;boe.exports={circle:{n:0,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\";return r?ps(t,r,i):i}},square:{n:1,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")}},diamond:{n:2,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.3,2);return ps(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"Z\")}},cross:{n:3,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.4,2),i=ca(e*1.2,2);return ps(t,r,\"M\"+i+\",\"+n+\"H\"+n+\"V\"+i+\"H-\"+n+\"V\"+n+\"H-\"+i+\"V-\"+n+\"H-\"+n+\"V-\"+i+\"H\"+n+\"V-\"+n+\"H\"+i+\"Z\")}},x:{n:4,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.8/goe,2),i=\"l\"+n+\",\"+n,a=\"l\"+n+\",-\"+n,o=\"l-\"+n+\",-\"+n,s=\"l-\"+n+\",\"+n;return ps(t,r,\"M0,\"+n+i+a+o+a+o+s+o+s+i+s+i+\"Z\")}},\"triangle-up\":{n:5,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return ps(t,r,\"M-\"+n+\",\"+i+\"H\"+n+\"L0,-\"+a+\"Z\")}},\"triangle-down\":{n:6,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return ps(t,r,\"M-\"+n+\",-\"+i+\"H\"+n+\"L0,\"+a+\"Z\")}},\"triangle-left\":{n:7,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return ps(t,r,\"M\"+i+\",-\"+n+\"V\"+n+\"L-\"+a+\",0Z\")}},\"triangle-right\":{n:8,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return ps(t,r,\"M-\"+i+\",-\"+n+\"V\"+n+\"L\"+a+\",0Z\")}},\"triangle-ne\":{n:9,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.6,2),i=ca(e*1.2,2);return ps(t,r,\"M-\"+i+\",-\"+n+\"H\"+n+\"V\"+i+\"Z\")}},\"triangle-se\":{n:10,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.6,2),i=ca(e*1.2,2);return ps(t,r,\"M\"+n+\",-\"+i+\"V\"+n+\"H-\"+i+\"Z\")}},\"triangle-sw\":{n:11,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.6,2),i=ca(e*1.2,2);return ps(t,r,\"M\"+i+\",\"+n+\"H-\"+n+\"V-\"+i+\"Z\")}},\"triangle-nw\":{n:12,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.6,2),i=ca(e*1.2,2);return ps(t,r,\"M-\"+n+\",\"+i+\"V-\"+n+\"H\"+i+\"Z\")}},pentagon:{n:13,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return ps(t,r,\"M\"+n+\",\"+o+\"L\"+i+\",\"+s+\"H-\"+i+\"L-\"+n+\",\"+o+\"L0,\"+a+\"Z\")}},hexagon:{n:14,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e/2,2),a=ca(e*i_/2,2);return ps(t,r,\"M\"+a+\",-\"+i+\"V\"+i+\"L0,\"+n+\"L-\"+a+\",\"+i+\"V-\"+i+\"L0,-\"+n+\"Z\")}},hexagon2:{n:15,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e/2,2),a=ca(e*i_/2,2);return ps(t,r,\"M-\"+i+\",\"+a+\"H\"+i+\"L\"+n+\",0L\"+i+\",-\"+a+\"H-\"+i+\"L-\"+n+\",0Z\")}},octagon:{n:16,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.924,2),i=ca(e*.383,2);return ps(t,r,\"M-\"+i+\",-\"+n+\"H\"+i+\"L\"+n+\",-\"+i+\"V\"+i+\"L\"+i+\",\"+n+\"H-\"+i+\"L-\"+n+\",\"+i+\"V-\"+i+\"Z\")}},star:{n:17,f:function(e,t,r){if(vs(t))return ds;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return ps(t,r,\"M\"+i+\",\"+u+\"H\"+a+\"L\"+o+\",\"+c+\"L\"+s+\",\"+f+\"L0,\"+h+\"L-\"+s+\",\"+f+\"L-\"+o+\",\"+c+\"L-\"+a+\",\"+u+\"H-\"+i+\"L0,\"+l+\"Z\")}},hexagram:{n:18,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return ps(t,r,\"M-\"+a+\",0l-\"+i+\",-\"+n+\"h\"+a+\"l\"+i+\",-\"+n+\"l\"+i+\",\"+n+\"h\"+a+\"l-\"+i+\",\"+n+\"l\"+i+\",\"+n+\"h-\"+a+\"l-\"+i+\",\"+n+\"l-\"+i+\",-\"+n+\"h-\"+a+\"Z\")}},\"star-triangle-up\":{n:19,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*i_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return ps(t,r,\"M-\"+n+\",\"+i+s+n+\",\"+i+s+\"0,-\"+a+s+\"-\"+n+\",\"+i+\"Z\")}},\"star-triangle-down\":{n:20,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*i_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return ps(t,r,\"M\"+n+\",-\"+i+s+\"-\"+n+\",-\"+i+s+\"0,\"+a+s+n+\",-\"+i+\"Z\")}},\"star-square\":{n:21,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.1,2),i=ca(e*2,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return ps(t,r,\"M-\"+n+\",-\"+n+a+\"-\"+n+\",\"+n+a+n+\",\"+n+a+n+\",-\"+n+a+\"-\"+n+\",-\"+n+\"Z\")}},\"star-diamond\":{n:22,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.4,2),i=ca(e*1.9,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return ps(t,r,\"M-\"+n+\",0\"+a+\"0,\"+n+a+n+\",0\"+a+\"0,-\"+n+a+\"-\"+n+\",0Z\")}},\"diamond-tall\":{n:23,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*.7,2),i=ca(e*1.4,2);return ps(t,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},\"diamond-wide\":{n:24,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.4,2),i=ca(e*.7,2);return ps(t,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},hourglass:{n:25,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"H-\"+n+\"L\"+n+\",-\"+n+\"H-\"+n+\"Z\")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"V-\"+n+\"L-\"+n+\",\"+n+\"V-\"+n+\"Z\")},noDot:!0},\"circle-cross\":{n:27,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"circle-x\":{n:28,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e/goe,2);return ps(t,r,\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"square-cross\":{n:29,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"square-x\":{n:30,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"diamond-cross\":{n:31,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.3,2);return ps(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM0,-\"+n+\"V\"+n+\"M-\"+n+\",0H\"+n)},needLine:!0,noDot:!0},\"diamond-x\":{n:32,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.3,2),i=ca(e*.65,2);return ps(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM-\"+i+\",-\"+i+\"L\"+i+\",\"+i+\"M-\"+i+\",\"+i+\"L\"+i+\",-\"+i)},needLine:!0,noDot:!0},\"cross-thin\":{n:33,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.4,2);return ps(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"x-thin\":{n:34,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.2,2),i=ca(e*.85,2);return ps(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(vs(t))return ds;var n=ca(e/2,2),i=ca(e,2);return ps(t,r,\"M\"+n+\",\"+i+\"V-\"+i+\"M\"+(n-i)+\",-\"+i+\"V\"+i+\"M\"+i+\",\"+n+\"H-\"+i+\"M-\"+i+\",\"+(n-i)+\"H\"+i)},needLine:!0,noFill:!0},\"y-up\":{n:37,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return ps(t,r,\"M-\"+n+\",\"+a+\"L0,0M\"+n+\",\"+a+\"L0,0M0,-\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-down\":{n:38,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return ps(t,r,\"M-\"+n+\",-\"+a+\"L0,0M\"+n+\",-\"+a+\"L0,0M0,\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-left\":{n:39,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return ps(t,r,\"M\"+a+\",\"+n+\"L0,0M\"+a+\",-\"+n+\"L0,0M-\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-right\":{n:40,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return ps(t,r,\"M-\"+a+\",\"+n+\"L0,0M-\"+a+\",-\"+n+\"L0,0M\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"line-ew\":{n:41,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.4,2);return ps(t,r,\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ns\":{n:42,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*1.4,2);return ps(t,r,\"M0,\"+n+\"V-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ne\":{n:43,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-nw\":{n:44,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2);return ps(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"arrow-up\":{n:45,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e*2,2);return ps(t,r,\"M0,0L-\"+n+\",\"+i+\"H\"+n+\"Z\")},backoff:1,noDot:!0},\"arrow-down\":{n:46,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e*2,2);return ps(t,r,\"M0,0L-\"+n+\",-\"+i+\"H\"+n+\"Z\")},noDot:!0},\"arrow-left\":{n:47,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2,2),i=ca(e,2);return ps(t,r,\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-right\":{n:48,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2,2),i=ca(e,2);return ps(t,r,\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-bar-up\":{n:49,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e*2,2);return ps(t,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",\"+i+\"H\"+n+\"Z\")},backoff:1,needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(e,t,r){if(vs(t))return ds;var n=ca(e,2),i=ca(e*2,2);return ps(t,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",-\"+i+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2,2),i=ca(e,2);return ps(t,r,\"M0,-\"+i+\"V\"+i+\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(e,t,r){if(vs(t))return ds;var n=ca(e*2,2),i=ca(e,2);return ps(t,r,\"M0,-\"+i+\"V\"+i+\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(vs(t))return ds;var n=Dq/2.5,i=2*e*Fq(n),a=2*e*zq(n);return ps(t,r,\"M0,0L\"+-i+\",\"+a+\"L\"+i+\",\"+a+\"Z\")},backoff:.9,noDot:!0},\"arrow-wide\":{n:54,f:function(e,t,r){if(vs(t))return ds;var n=Dq/4,i=2*e*Fq(n),a=2*e*zq(n);return ps(t,r,\"M0,0L\"+-i+\",\"+a+\"A \"+2*e+\",\"+2*e+\" 0 0 1 \"+i+\",\"+a+\"Z\")},backoff:.4,noDot:!0}};function vs(e){return e===null}var moe,yoe,_oe,xoe;function ps(e,t,r){if((!e||e%360===0)&&!t)return r;if(_oe===e&&xoe===t&&moe===r)return yoe;_oe=e,xoe=t,moe=r;function n(b,p){var C=Fq(b),E=zq(b),A=p[0],L=p[1]+(t||0);return[A*C-L*E,A*E+L*C]}for(var i=e/180*Dq,a=0,o=0,s=cot(r),l=\"\",u=0;u<s.length;u++){var c=s[u],f=c[0],h=a,d=o;if(f===\"M\"||f===\"L\")a=+c[1],o=+c[2];else if(f===\"m\"||f===\"l\")a+=+c[1],o+=+c[2];else if(f===\"H\")a=+c[1];else if(f===\"h\")a+=+c[1];else if(f===\"V\")o=+c[1];else if(f===\"v\")o+=+c[1];else if(f===\"A\"){a=+c[1],o=+c[2];var v=n(i,[+c[6],+c[7]]);c[6]=v[0],c[7]=v[1],c[3]=+c[3]+e}(f===\"H\"||f===\"V\")&&(f=\"L\"),(f===\"h\"||f===\"v\")&&(f=\"l\"),(f===\"m\"||f===\"l\")&&(a-=h,o-=d);var x=n(i,[a,o]);(f===\"H\"||f===\"V\")&&(f=\"L\"),(f===\"M\"||f===\"L\"||f===\"m\"||f===\"l\")&&(c[1]=x[0],c[2]=x[1]),c[0]=f,l+=c[0]+c.slice(1).join(\",\")}return yoe=l,l}});var So=ye((Vir,Voe)=>{\"use strict\";var dd=Oa(),Du=Dr(),fot=Du.numberFormat,Ab=Eo(),Vq=cd(),nL=qa(),Kd=Ca(),hot=tc(),eM=Du.strTranslate,aL=ru(),dot=Wp(),vot=Kh(),pot=vot.LINE_SPACING,Ioe=N1().DESELECTDIM,got=Ru(),mot=S3(),yot=rp().appendArrayPointValue,Sa=Voe.exports={};Sa.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style(\"font-family\",s),o+1&&e.style(\"font-size\",o+\"px\"),a&&e.call(Kd.fill,a),i&&e.style(\"font-weight\",i),n&&e.style(\"font-style\",n),r&&e.style(\"font-variant\",r),c&&e.style(\"text-transform\",Oq(xot(c))),l&&e.style(\"text-shadow\",l===\"auto\"?aL.makeTextShadow(Kd.contrast(a)):Oq(l)),u&&e.style(\"text-decoration-line\",Oq(bot(u)))};function Oq(e){return e===\"none\"?void 0:e}var _ot={normal:\"none\",lower:\"lowercase\",upper:\"uppercase\",\"word caps\":\"capitalize\"};function xot(e){return _ot[e]}function bot(e){return e.replace(\"under\",\"underline\").replace(\"over\",\"overline\").replace(\"through\",\"line-through\").split(\"+\").join(\" \")}Sa.setPosition=function(e,t,r){e.attr(\"x\",t).attr(\"y\",r)};Sa.setSize=function(e,t,r){e.attr(\"width\",t).attr(\"height\",r)};Sa.setRect=function(e,t,r,n,i){e.call(Sa.setPosition,t,r).call(Sa.setSize,n,i)};Sa.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName===\"text\"?t.attr(\"x\",i).attr(\"y\",a):t.attr(\"transform\",eM(i,a));else return!1;return!0};Sa.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Sa.translatePoint(n,i,t,r)})};Sa.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr(\"display\",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:\"none\")};Sa.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=nL.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";e.selectAll(l).each(function(u){Sa.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Sa.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Sa.singleLineStyle=function(e,t,r,n,i){t.style(\"fill\",\"none\");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";Kd.stroke(t,n||a.color),Sa.dashLine(t,s,o)};Sa.lineGroupStyle=function(e,t,r,n){e.style(\"fill\",\"none\").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||\"\";dd.select(this).call(Kd.stroke,r||a.color).call(Sa.dashLine,s,o)})};Sa.dashLine=function(e,t,r){r=+r||0,t=Sa.dashStyle(t,r),e.style({\"stroke-dasharray\":t,\"stroke-width\":r+\"px\"})};Sa.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e===\"solid\"?e=\"\":e===\"dot\"?e=r+\"px,\"+r+\"px\":e===\"dash\"?e=3*r+\"px,\"+3*r+\"px\":e===\"longdash\"?e=5*r+\"px,\"+5*r+\"px\":e===\"dashdot\"?e=3*r+\"px,\"+r+\"px,\"+r+\"px,\"+r+\"px\":e===\"longdashdot\"&&(e=5*r+\"px,\"+2*r+\"px,\"+r+\"px,\"+2*r+\"px\"),e};function Roe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Sa.getPatternAttr,s=i&&(o(i.shape,0,\"\")||o(i.path,0,\"\"));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Sa.pattern(e,\"point\",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!==\"none\"){var v=a.type,x=\"scatterfill-\"+t.uid;if(n&&(x=\"legendfill-\"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v===\"horizontal\"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v===\"vertical\"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(zoe,r,x,\"linear\",a.colorscale,\"fill\",b,p,!0,!1)}else v===\"horizontal\"&&(v=v+\"reversed\"),e.call(Sa.gradient,r,x,v,a.colorscale,\"fill\")}else t.fillcolor&&e.call(Kd.fill,t.fillcolor)}Sa.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Roe(e,i,t,!1)};Sa.fillGroupStyle=function(e,t,r){e.style(\"stroke-width\",0).each(function(n){var i=dd.select(this);n[0].trace&&Roe(i,n[0].trace,t,r)})};var Toe=woe();Sa.symbolNames=[];Sa.symbolFuncs=[];Sa.symbolBackOffs=[];Sa.symbolNeedLines={};Sa.symbolNoDot={};Sa.symbolNoFill={};Sa.symbolList=[];Object.keys(Toe).forEach(function(e){var t=Toe[e],r=t.n;Sa.symbolList.push(r,String(r),e,r+100,String(r+100),e+\"-open\"),Sa.symbolNames[r]=e,Sa.symbolFuncs[r]=t.f,Sa.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Sa.symbolNeedLines[r]=!0),t.noDot?Sa.symbolNoDot[r]=!0:Sa.symbolList.push(r+200,String(r+200),e+\"-dot\",r+300,String(r+300),e+\"-open-dot\"),t.noFill&&(Sa.symbolNoFill[r]=!0)});var wot=Sa.symbolNames.length,Tot=\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\";Sa.symbolNumber=function(e){if(Ab(e))e=+e;else if(typeof e==\"string\"){var t=0;e.indexOf(\"-open\")>0&&(t=100,e=e.replace(\"-open\",\"\")),e.indexOf(\"-dot\")>0&&(t+=200,e=e.replace(\"-dot\",\"\")),e=Sa.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=wot||e>=400?0:Math.floor(Math.max(e,0))};function Doe(e,t,r,n){var i=e%100;return Sa.symbolFuncs[i](t,r,n)+(e>=200?Tot:\"\")}var Aoe=fot(\"~f\"),Foe={radial:{type:\"radial\"},radialreversed:{type:\"radial\",reversed:!0},horizontal:{type:\"linear\",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:\"linear\",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:\"linear\",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:\"linear\",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Sa.gradient=function(e,t,r,n,i,a){var o=Foe[n];return zoe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function zoe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n===\"linear\"?f={node:\"linearGradient\",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?\"userSpaceOnUse\":\"objectBoundingBox\"},reversed:u}:n===\"radial\"&&(f={node:\"radialGradient\",reversed:u});for(var h=new Array(c),d=0;d<c;d++)f.reversed?h[c-1-d]=[Aoe((1-i[d][0])*100),i[d][1]]:h[d]=[Aoe(i[d][0]*100),i[d][1]];var v=t._fullLayout,x=\"g\"+v._uid+\"-\"+r,b=v._defs.select(\".gradients\").selectAll(\"#\"+x).data([n+h.join(\";\")],Du.identity);b.exit().remove(),b.enter().append(f.node).each(function(){var p=dd.select(this);f.attrs&&p.attr(f.attrs),p.attr(\"id\",x);var C=p.selectAll(\"stop\").data(h);C.exit().remove(),C.enter().append(\"stop\"),C.each(function(E){var A=Vq(E[1]);dd.select(this).attr({offset:E[0]+\"%\",\"stop-color\":Kd.tinyRGB(A),\"stop-opacity\":A.getAlpha()})})}),e.style(a,Gq(x,t)).style(a+\"-opacity\",null),e.classed(\"gradient_filled\",!0)}Sa.pattern=function(e,t,r,n,i,a,o,s,l,u,c,f){var h=t===\"legend\";s&&(l===\"overlay\"?(u=s,c=Kd.contrast(u)):(u=void 0,c=s));var d=r._fullLayout,v=\"p\"+d._uid+\"-\"+n,x,b,p=function(O,V,G,Z,H){return Z+(H-Z)*(O-V)/(G-V)},C,E,A,L,_={},k=Vq(c),M=Kd.tinyRGB(k),g=k.getAlpha(),P=f*g;switch(i){case\"/\":x=a*Math.sqrt(2),b=a*Math.sqrt(2),C=\"M-\"+x/4+\",\"+b/4+\"l\"+x/2+\",-\"+b/2+\"M0,\"+b+\"L\"+x+\",0M\"+x/4*3+\",\"+b/4*5+\"l\"+x/2+\",-\"+b/2,E=o*a,L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"\\\\\":x=a*Math.sqrt(2),b=a*Math.sqrt(2),C=\"M\"+x/4*3+\",-\"+b/4+\"l\"+x/2+\",\"+b/2+\"M0,0L\"+x+\",\"+b+\"M-\"+x/4+\",\"+b/4*3+\"l\"+x/2+\",\"+b/2,E=o*a,L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"x\":x=a*Math.sqrt(2),b=a*Math.sqrt(2),C=\"M-\"+x/4+\",\"+b/4+\"l\"+x/2+\",-\"+b/2+\"M0,\"+b+\"L\"+x+\",0M\"+x/4*3+\",\"+b/4*5+\"l\"+x/2+\",-\"+b/2+\"M\"+x/4*3+\",-\"+b/4+\"l\"+x/2+\",\"+b/2+\"M0,0L\"+x+\",\"+b+\"M-\"+x/4+\",\"+b/4*3+\"l\"+x/2+\",\"+b/2,E=a-a*Math.sqrt(1-o),L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"|\":x=a,b=a,L=\"path\",C=\"M\"+x/2+\",0L\"+x/2+\",\"+b,E=o*a,L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"-\":x=a,b=a,L=\"path\",C=\"M0,\"+b/2+\"L\"+x+\",\"+b/2,E=o*a,L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"+\":x=a,b=a,L=\"path\",C=\"M\"+x/2+\",0L\"+x/2+\",\"+b+\"M0,\"+b/2+\"L\"+x+\",\"+b/2,E=a-a*Math.sqrt(1-o),L=\"path\",_={d:C,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\".\":x=a,b=a,o<Math.PI/4?A=Math.sqrt(o*a*a/Math.PI):A=p(o,Math.PI/4,1,a/2,a/Math.sqrt(2)),L=\"circle\",_={cx:x/2,cy:b/2,r:A,opacity:P,fill:M};break;default:x=a,b=a,L=\"path\",_={d:i,opacity:P,fill:M};break}var T=[i||\"noSh\",u||\"noBg\",c||\"noFg\",a,o].join(\";\"),z=d._defs.select(\".patterns\").selectAll(\"#\"+v).data([T],Du.identity);z.exit().remove(),z.enter().append(\"pattern\").each(function(){var O=dd.select(this);if(O.attr({id:v,width:x+\"px\",height:b+\"px\",patternUnits:\"userSpaceOnUse\",patternTransform:h?\"scale(0.8)\":\"\"}),u){var V=Vq(u),G=Kd.tinyRGB(V),Z=V.getAlpha(),H=O.selectAll(\"rect\").data([0]);H.exit().remove(),H.enter().append(\"rect\").attr({width:x+\"px\",height:b+\"px\",fill:G,\"fill-opacity\":Z})}var N=O.selectAll(L).data([0]);N.exit().remove(),N.enter().append(L).attr(_)}),e.style(\"fill\",Gq(v,r)).style(\"fill-opacity\",null),e.classed(\"pattern_filled\",!0)};Sa.initGradients=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,\"g\",\"gradients\");r.selectAll(\"linearGradient,radialGradient\").remove(),dd.select(e).selectAll(\".gradient_filled\").classed(\"gradient_filled\",!1)};Sa.initPatterns=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,\"g\",\"patterns\");r.selectAll(\"pattern\").remove(),dd.select(e).selectAll(\".pattern_filled\").classed(\"pattern_filled\",!1)};Sa.getPatternAttr=function(e,t,r){return e&&Du.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e};Sa.pointStyle=function(e,t,r,n){if(e.size()){var i=Sa.makePointStyleFns(t);e.each(function(a){Sa.singlePointStyle(a,dd.select(this),t,i,r,n)})}};Sa.singlePointStyle=function(e,t,r,n,i,a){var o=r.marker,s=o.line;if(a&&a.i>=0&&e.i===void 0&&(e.i=a.i),t.style(\"opacity\",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms===\"various\"||o.size===\"various\"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Sa.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=jq(e,r),f=Hq(e,r);t.attr(\"d\",Doe(u,l,c,f))}var h=!1,d,v,x;if(e.so)x=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,\"mlc\"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Kd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Kd.defaultLine,h=!0),\"mc\"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||\"rgba(0,0,0,0)\",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(Kd.stroke,d).style({\"stroke-width\":(x||1)+\"px\",fill:\"none\"});else{t.style(\"stroke-width\",(e.isBlank?0:x)+\"px\");var p=o.gradient,C=e.mgt;C?h=!0:C=p&&p.type,Du.isArrayOrTypedArray(C)&&(C=C[0],Foe[C]||(C=0));var E=o.pattern,A=Sa.getPatternAttr,L=E&&(A(E.shape,e.i,\"\")||A(E.path,e.i,\"\"));if(C&&C!==\"none\"){var _=e.mgc;_?h=!0:_=p.color;var k=r.uid;h&&(k+=\"-\"+e.i),Sa.gradient(t,i,k,C,[[0,_],[1,d]],\"fill\")}else if(L){var M=!1,g=E.fgcolor;!g&&a&&a.color&&(g=a.color,M=!0);var P=A(g,e.i,a&&a.color||null),T=A(E.bgcolor,e.i,null),z=E.fgopacity,O=A(E.size,e.i,8),V=A(E.solidity,e.i,.3);M=M||e.mcc||Du.isArrayOrTypedArray(E.shape)||Du.isArrayOrTypedArray(E.path)||Du.isArrayOrTypedArray(E.bgcolor)||Du.isArrayOrTypedArray(E.fgcolor)||Du.isArrayOrTypedArray(E.size)||Du.isArrayOrTypedArray(E.solidity);var G=r.uid;M&&(G+=\"-\"+e.i),Sa.pattern(t,\"point\",i,G,L,O,V,e.mcc,E.fillmode,T,P,z)}else Du.isArrayOrTypedArray(d)?Kd.fill(t,d[e.i]):Kd.fill(t,d);x&&Kd.stroke(t,v)}};Sa.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Sa.tryColorscale(r,\"\"),t.lineScale=Sa.tryColorscale(r,\"line\"),nL.traceIs(e,\"symbols\")&&(t.ms2mrc=got.isBubble(e)?mot(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Sa.makeSelectedPointStyleFns(e)),t};Sa.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(A){var L=A.mo===void 0?i.opacity:A.mo;return A.selected?c?l:L:f?u:Ioe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(A){var L=A.mcc||h;return A.selected?d||L:v||L});var x=i.size,b=a.size,p=o.size,C=b!==void 0,E=p!==void 0;return nL.traceIs(e,\"symbols\")&&(C||E)&&(t.selectedSizeFn=function(A){var L=A.mrc||x/2;return A.selected?C?b/2:L:E?p/2:L}),t};Sa.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Kd.addOpacity(f,Ioe))},t};Sa.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Sa.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style(\"opacity\",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Kd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr(\"d\",Doe(Sa.symbolNumber(s),l,jq(o,t),Hq(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s<i.length;s++)i[s](o,a)})}};Sa.tryColorscale=function(e,t){var r=t?Du.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&Du.isArrayOrTypedArray(n))return hot.makeColorScaleFuncFromTrace(r)}return Du.identity};var qq={start:1,end:-1,middle:0,bottom:1,top:-1};function Ooe(e,t,r,n,i){var a=dd.select(e.node().parentNode),o=t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\",s=t.indexOf(\"left\")!==-1?\"end\":t.indexOf(\"right\")!==-1?\"start\":\"middle\",l=n?n/.8+1:0,u=(aL.lineCount(e)-1)*pot+1,c=qq[s]*l,f=r*.75+qq[o]*l+(qq[o]-1)*u*r/2;e.attr(\"text-anchor\",s),i||a.attr(\"transform\",eM(c,f))}function qoe(e,t){var r=e.ts||t.textfont.size;return Ab(r)&&r>0?r:0}Sa.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Sa.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,\"txt\",\"texttemplate\"):Du.extractOption(s,t,\"tx\",\"text\");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};yot(h,t,s.i);var d=t._meta||{};u=Du.texttemplateString(u,f,o._d3locale,h,s,d)}var v=s.tp||t.textposition,x=qoe(s,t),b=n?n(s):s.tc||t.textfont.color;l.call(Sa.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:x,color:b}).text(u).call(aL.convertToTspans,r).call(Ooe,v,x,s.mrc)})}};Sa.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Sa.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=qoe(n,t);Kd.fill(i,a);var l=nL.traceIs(t,\"bar-like\");Ooe(i,o,s,n.mrc2||n.mrc,l)})}};var Soe=.5;Sa.smoothopen=function(e,t){if(e.length<3)return\"M\"+e.join(\"L\");var r=\"M\"+e[0],n=[],i;for(i=1;i<e.length-1;i++)n.push(iL(e[i-1],e[i],e[i+1],t));for(r+=\"Q\"+n[0][0]+\" \"+e[1],i=2;i<e.length-1;i++)r+=\"C\"+n[i-2][1]+\" \"+n[i-1][0]+\" \"+e[i];return r+=\"Q\"+n[e.length-3][1]+\" \"+e[e.length-1],r};Sa.smoothclosed=function(e,t){if(e.length<3)return\"M\"+e.join(\"L\")+\"Z\";var r=\"M\"+e[0],n=e.length-1,i=[iL(e[n],e[0],e[1],t)],a;for(a=1;a<n;a++)i.push(iL(e[a-1],e[a],e[a+1],t));for(i.push(iL(e[n-1],e[n],e[0],t)),a=1;a<=n;a++)r+=\"C\"+i[a-1][1]+\" \"+i[a][0]+\" \"+e[a];return r+=\"C\"+i[n][1]+\" \"+i[0][0]+\" \"+e[0]+\"Z\",r};var Boe,Noe;function M3(e,t,r){return r&&(e=Uoe(e)),t?Tb(e[1]):wb(e[0])}function wb(e){var t=dd.round(e,2);return Boe=t,t}function Tb(e){var t=dd.round(e,2);return Noe=t,t}function iL(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,Soe/2),u=Math.pow(o*o+s*s,Soe/2),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),d=3*l*(l+u);return[[wb(t[0]+(h&&c/h)),Tb(t[1]+(h&&f/h))],[wb(t[0]-(d&&c/d)),Tb(t[1]-(d&&f/d))]]}var Aot={hv:function(e,t,r){return\"H\"+wb(t[0])+\"V\"+M3(t,1,r)},vh:function(e,t,r){return\"V\"+Tb(t[1])+\"H\"+M3(t,0,r)},hvh:function(e,t,r){return\"H\"+wb((e[0]+t[0])/2)+\"V\"+Tb(t[1])+\"H\"+M3(t,0,r)},vhv:function(e,t,r){return\"V\"+Tb((e[1]+t[1])/2)+\"H\"+wb(t[0])+\"V\"+M3(t,1,r)}},Sot=function(e,t,r){return\"L\"+M3(t,0,r)+\",\"+M3(t,1,r)};Sa.steps=function(e){var t=Aot[e]||Sot;return function(r){for(var n=\"M\"+wb(r[0][0])+\",\"+Tb(r[0][1]),i=r.length,a=1;a<i;a++)n+=t(r[a-1],r[a],a===i-1);return n}};function Uoe(e,t){var r=e.backoff,n=e.trace,i=e.d,a=e.i;if(r&&n&&n.marker&&n.marker.angle%360===0&&n.line&&n.line.shape!==\"spline\"){var o=Du.isArrayOrTypedArray(r),s=e,l=t?t[0]:Boe||0,u=t?t[1]:Noe||0,c=s[0],f=s[1],h=c-l,d=f-u,v=Math.atan2(d,h),x=o?r[a]:r;if(x===\"auto\"){var b=s.i;n.type===\"scatter\"&&b--;var p=s.marker,C=p.symbol;Du.isArrayOrTypedArray(C)&&(C=C[b]);var E=p.size;Du.isArrayOrTypedArray(E)&&(E=E[b]),x=p?Sa.symbolBackOffs[Sa.symbolNumber(C)]*E:0,x+=Sa.getMarkerStandoff(i[b],n)||0}var A=c-x*Math.cos(v),L=f-x*Math.sin(v);(A<=c&&A>=l||A>=c&&A<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[A,L])}return e}Sa.applyBackoff=Uoe;Sa.makeTester=function(){var e=Du.ensureSingleById(dd.select(\"body\"),\"svg\",\"js-plotly-tester\",function(r){r.attr(dot.svgAttrs).style({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",width:\"9000px\",height:\"9000px\",\"z-index\":\"1\"})}),t=Du.ensureSingle(e,\"path\",\"js-reference-point\",function(r){r.attr(\"d\",\"M0,0H1V1H0Z\").style({\"stroke-width\":0,fill:\"black\"})});Sa.tester=e,Sa.testref=t};Sa.savedBBoxes={};var Bq=0,Mot=1e4;Sa.bBox=function(e,t,r){r||(r=Moe(e));var n;if(r){if(n=Sa.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Moe(i),r){var a=+i.getAttribute(\"x\")||0,o=+i.getAttribute(\"y\")||0,s=i.getAttribute(\"transform\");if(!s){var l=Sa.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+=\"~\"+a+\"~\"+o+\"~\"+s,n=Sa.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Sa.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr(\"transform\",null).call(aL.positionText,0,0);var f=u.getBoundingClientRect(),h=Sa.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return Bq>=Mot&&(Sa.savedBBoxes={},Bq=0),r&&(Sa.savedBBoxes[r]=d),Bq++,Du.extendFlat({},d)};function Moe(e){var t=e.getAttribute(\"data-unformatted\");if(t!==null)return t+e.getAttribute(\"data-math\")+e.getAttribute(\"text-anchor\")+e.getAttribute(\"style\")}Sa.setClipUrl=function(e,t,r){e.attr(\"clip-path\",Gq(t,r))};function Gq(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?\"\":r._baseUrl||\"\";return n?\"url('\"+n+\"#\"+e+\"')\":\"url(#\"+e+\")\"}Sa.getTranslate=function(e){var t=/.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/,r=e.attr?\"attr\":\"getAttribute\",n=e[r](\"transform\")||\"\",i=n.replace(t,function(a,o,s){return[o,s].join(\" \")}).split(\" \");return{x:+i[0]||0,y:+i[1]||0}};Sa.setTranslate=function(e,t,r){var n=/(\\btranslate\\(.*?\\);?)/,i=e.attr?\"attr\":\"getAttribute\",a=e.attr?\"attr\":\"setAttribute\",o=e[i](\"transform\")||\"\";return t=t||0,r=r||0,o=o.replace(n,\"\").trim(),o+=eM(t,r),o=o.trim(),e[a](\"transform\",o),o};Sa.getScale=function(e){var t=/.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/,r=e.attr?\"attr\":\"getAttribute\",n=e[r](\"transform\")||\"\",i=n.replace(t,function(a,o,s){return[o,s].join(\" \")}).split(\" \");return{x:+i[0]||1,y:+i[1]||1}};Sa.setScale=function(e,t,r){var n=/(\\bscale\\(.*?\\);?)/,i=e.attr?\"attr\":\"getAttribute\",a=e.attr?\"attr\":\"setAttribute\",o=e[i](\"transform\")||\"\";return t=t||1,r=r||1,o=o.replace(n,\"\").trim(),o+=\"scale(\"+t+\",\"+r+\")\",o=o.trim(),e[a](\"transform\",o),o};var Eot=/\\s*sc.*/;Sa.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?\"\":\"scale(\"+t+\",\"+r+\")\";e.each(function(){var i=(this.getAttribute(\"transform\")||\"\").replace(Eot,\"\");i+=n,i=i.trim(),this.setAttribute(\"transform\",i)})}};var Cot=/translate\\([^)]*\\)\\s*$/;Sa.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select(\"text\");if(a.node()){var o=parseFloat(a.attr(\"x\")||0),s=parseFloat(a.attr(\"y\")||0),l=(i.attr(\"transform\")||\"\").match(Cot);t===1&&r===1?n=[]:n=[eM(o,s),\"scale(\"+t+\",\"+r+\")\",eM(-o,-s)],l&&n.push(l),i.attr(\"transform\",n.join(\"\"))}})};function Hq(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Sa.getMarkerStandoff=Hq;var QS=Math.atan2,bb=Math.cos,E3=Math.sin;function Eoe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var Coe,koe,Loe,Poe,Nq,Uq;function jq(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a===\"previous\"||a===\"north\"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=QS(h[1]-i,h[0]-n),v=QS(f[1]-i,f[0]-n),x;if(a===\"north\")x=r/180*Math.PI;else if(a===\"previous\"){var b=u/180*Math.PI,p=c/180*Math.PI,C=Coe/180*Math.PI,E=koe/180*Math.PI,A=C-b,L=bb(E)*E3(A),_=E3(E)*bb(p)-bb(E)*E3(p)*bb(A);x=-QS(L,_)-Math.PI,Coe=u,koe=c}var k=Eoe(d,[bb(x),0]),M=Eoe(v,[E3(x),0]);r=QS(k[1]+M[1],k[0]+M[0])/Math.PI*180,a===\"previous\"&&!(Uq===t.uid&&e.i===Nq+1)&&(r=null)}if(a===\"previous\"&&!t._geo)if(Uq===t.uid&&e.i===Nq+1&&Ab(n)&&Ab(i)){var g=n-Loe,P=i-Poe,T=t.line&&t.line.shape||\"\",z=T.slice(T.length-1);z===\"h\"&&(P=0),z===\"v\"&&(g=0),r+=QS(P,g)/Math.PI*180+90}else r=null}return Loe=n,Poe=i,Nq=e.i,Uq=t.uid,r}Sa.getMarkerAngle=jq});var Mb=ye((Gir,Woe)=>{\"use strict\";var C3=Oa(),kot=Eo(),Lot=Mc(),Wq=qa(),Sb=Dr(),Goe=Sb.strTranslate,oL=So(),sL=Ca(),k3=ru(),Hoe=N1(),Pot=Kh().OPPOSITE_SIDE,joe=/ [XY][0-9]* /,Xq=1.6,Zq=1.6;function Iot(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:\"\").trim(),x=!1,b=d&&d.font?d.font:{},p=b.family,C=b.size,E=b.color,A=b.weight,L=b.style,_=b.variant,k=b.textcase,M=b.lineposition,g=b.shadow,P=r.subtitlePropName,T=!!P,z=r.subtitlePlaceholder,O=(i.title||{}).subtitle||{text:\"\",font:{}},V=O.text.trim(),G=!1,Z=1,H=O.font,N=H.family,j=H.size,re=H.color,oe=H.weight,_e=H.style,Me=H.variant,ke=H.textcase,me=H.lineposition,ie=H.shadow,Se;a===\"title.text\"?Se=\"titleText\":a.indexOf(\"axis\")!==-1?Se=\"axisTitleText\":a.indexOf(\"colorbar\")!==-1&&(Se=\"colorbarTitleText\");var Le=e._context.edits[Se];function Ae(Nt,$t){return Nt===void 0||$t===void 0?!1:Nt.replace(joe,\" % \")===$t.replace(joe,\" % \")}v===\"\"?h=0:Ae(v,o)&&(Le||(v=\"\"),h=.2,x=!0),T&&(V===\"\"?Z=0:Ae(V,z)&&(Le||(V=\"\"),Z=.2,G=!0)),r._meta?v=Sb.templateString(v,r._meta):n._meta&&(v=Sb.templateString(v,n._meta));var De=v||V||Le,Pe;f||(f=Sb.ensureSingle(n._infolayer,\"g\",\"g-\"+t),Pe=n._hColorbarMoveTitle);var ge=f.selectAll(\"text.\"+t).data(De?[0]:[]);ge.enter().append(\"text\"),ge.text(v).attr(\"class\",t),ge.exit().remove();var Fe=null,ce=t+\"-subtitle\",Ze=V||Le;if(T&&Ze&&(Fe=f.selectAll(\"text.\"+ce).data(Ze?[0]:[]),Fe.enter().append(\"text\"),Fe.text(V).attr(\"class\",ce),Fe.exit().remove()),!De)return f;function ct(Nt,$t){Sb.syncOrAsync([pt,Wt],{title:Nt,subtitle:$t})}function pt(Nt){var $t=Nt.title,sr=Nt.subtitle,wr;!c&&Pe&&(c={}),c?(wr=\"\",c.rotate&&(wr+=\"rotate(\"+[c.rotate,u.x,u.y]+\")\"),(c.offset||Pe)&&(wr+=Goe(0,(c.offset||0)-(Pe||0)))):wr=null,$t.attr(\"transform\",wr);function ur(bt){if(bt){var yt=C3.select(bt.node().parentNode).select(\".\"+ce);if(!yt.empty()){var Yt=bt.node().getBBox();if(Yt.height){var lr=Yt.y+Yt.height+Xq*j;yt.attr(\"y\",lr)}}}}if($t.style(\"opacity\",h*sL.opacity(E)).call(oL.font,{color:sL.rgb(E),size:C3.round(C,2),family:p,weight:A,style:L,variant:_,textcase:k,shadow:g,lineposition:M}).attr(u).call(k3.convertToTspans,e,ur),sr){var Qe=f.select(\".\"+t+\"-math-group\"),Et=$t.node().getBBox(),er=Qe.node()?Qe.node().getBBox():void 0,Ut=er?er.y+er.height+Xq*j:Et.y+Et.height+Zq*j,Ft=Sb.extendFlat({},u,{y:Ut});sr.attr(\"transform\",wr),sr.style(\"opacity\",Z*sL.opacity(re)).call(oL.font,{color:sL.rgb(re),size:C3.round(j,2),family:N,weight:oe,style:_e,variant:Me,textcase:ke,shadow:ie,lineposition:me}).attr(Ft).call(k3.convertToTspans,e)}return Lot.previousPromises(e)}function Wt(Nt){var $t=Nt.title,sr=C3.select($t.node().parentNode);if(l&&l.selection&&l.side&&v){sr.attr(\"transform\",null);var wr=Pot[l.side],ur=l.side===\"left\"||l.side===\"top\"?-1:1,Qe=kot(l.pad)?l.pad:2,Et=oL.bBox(sr.node()),er={t:0,b:0,l:0,r:0},Ut=e._fullLayout._reservedMargin;for(var Ft in Ut)for(var bt in Ut[Ft]){var yt=Ut[Ft][bt];er[bt]=Math.max(er[bt],yt)}var Yt={left:er.l,top:er.t,right:n.width-er.r,bottom:n.height-er.b},lr=l.maxShift||ur*(Yt[l.side]-Et[l.side]),Tr=0;if(lr<0)Tr=lr;else{var Rr=l.offsetLeft||0,ei=l.offsetTop||0;Et.left-=Rr,Et.right-=Rr,Et.top-=ei,Et.bottom-=ei,l.selection.each(function(){var Ur=oL.bBox(this);Sb.bBoxIntersect(Et,Ur,Qe)&&(Tr=Math.max(Tr,ur*(Ur[l.side]-Et[wr])+Qe))}),Tr=Math.min(lr,Tr),i._titleScoot=Math.abs(Tr)}if(Tr>0||lr<0){var Wr={left:[-Tr,0],right:[Tr,0],top:[0,-Tr],bottom:[0,Tr]}[l.side];sr.attr(\"transform\",Goe(Wr[0],Wr[1]))}}}ge.call(ct,Fe);function st(Nt,$t){Nt.text($t).on(\"mouseover.opacity\",function(){C3.select(this).transition().duration(Hoe.SHOW_PLACEHOLDER).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){C3.select(this).transition().duration(Hoe.HIDE_PLACEHOLDER).style(\"opacity\",0)})}if(Le&&(v?ge.on(\".opacity\",null):(st(ge,o),x=!0),ge.call(k3.makeEditable,{gd:e}).on(\"edit\",function(Nt){s!==void 0?Wq.call(\"_guiRestyle\",e,a,Nt,s):Wq.call(\"_guiRelayout\",e,a,Nt)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(ct)}).on(\"input\",function(Nt){this.text(Nt||\" \").call(k3.positionText,u.x,u.y)}),T)){if(T&&!v){var lt=ge.node().getBBox(),Gt=lt.y+lt.height+Zq*j;Fe.attr(\"y\",Gt)}V?Fe.on(\".opacity\",null):(st(Fe,z),G=!0),Fe.call(k3.makeEditable,{gd:e}).on(\"edit\",function(Nt){Wq.call(\"_guiRelayout\",e,\"title.subtitle.text\",Nt)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(ct)}).on(\"input\",function(Nt){this.text(Nt||\" \").call(k3.positionText,Fe.attr(\"x\"),Fe.attr(\"y\"))})}return ge.classed(\"js-placeholder\",x),Fe&&Fe.classed(\"js-placeholder\",G),f}Woe.exports={draw:Iot,SUBTITLE_PADDING_EM:Zq,SUBTITLE_PADDING_MATHJAX_EM:Xq}});var ym=ye((Hir,Joe)=>{\"use strict\";var Rot=Oa(),Dot=e3().utcFormat,yc=Dr(),Fot=yc.numberFormat,gm=Eo(),n_=yc.cleanNumber,zot=yc.ms2DateTime,Xoe=yc.dateTime2ms,mm=yc.ensureNumber,Zoe=yc.isArrayOrTypedArray,a_=hs(),lL=a_.FP_SAFE,bg=a_.BADNUM,Oot=a_.LOG_CLIP,qot=a_.ONEWEEK,uL=a_.ONEDAY,cL=a_.ONEHOUR,Yoe=a_.ONEMIN,Koe=a_.ONESEC,fL=hf(),vL=hd(),hL=vL.HOUR_PATTERN,dL=vL.WEEKDAY_PATTERN;function tM(e){return Math.pow(10,e)}function Yq(e){return e!=null}Joe.exports=function(t,r){r=r||{};var n=t._id||\"x\",i=n.charAt(0);function a(A,L){if(A>0)return Math.log(A)/Math.LN10;if(A<=0&&L&&t.range&&t.range.length===2){var _=t.range[0],k=t.range[1];return .5*(_+k-2*Oot*Math.abs(_-k))}else return bg}function o(A,L,_,k){if((k||{}).msUTC&&gm(A))return+A;var M=Xoe(A,_||t.calendar);if(M===bg)if(gm(A)){A=+A;var g=Math.floor(yc.mod(A+.05,1)*10),P=Math.round(A-g/10);M=Xoe(new Date(P))+g/10}else return bg;return M}function s(A,L,_){return zot(A,L,_||t.calendar)}function l(A){return t._categories[Math.round(A)]}function u(A){if(Yq(A)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[A]!==void 0)return t._categoriesMap[A];t._categories.push(typeof A==\"number\"?String(A):A);var L=t._categories.length-1;return t._categoriesMap[A]=L,L}return bg}function c(A,L){for(var _=new Array(L),k=0;k<L;k++){var M=(A[0]||[])[k],g=(A[1]||[])[k];_[k]=f([M,g])}return _}function f(A){if(t._categoriesMap)return t._categoriesMap[A]}function h(A){var L=f(A);if(L!==void 0)return L;if(gm(A))return+A}function d(A){return gm(A)?+A:f(A)}function v(A,L,_){return Rot.round(_+L*A,2)}function x(A,L,_){return(A-_)/L}var b=function(L){return gm(L)?v(L,t._m,t._b):bg},p=function(A){return x(A,t._m,t._b)};if(t.rangebreaks){var C=i===\"y\";b=function(A){if(!gm(A))return bg;var L=t._rangebreaks.length;if(!L)return v(A,t._m,t._b);var _=C;t.range[0]>t.range[1]&&(_=!_);for(var k=_?-1:1,M=k*A,g=0,P=0;P<L;P++){var T=k*t._rangebreaks[P].min,z=k*t._rangebreaks[P].max;if(M<T)break;if(M>z)g=P+1;else{g=M<(T+z)/2?P:P+1;break}}var O=t._B[g]||0;return isFinite(O)?v(A,t._m2,O):0},p=function(A){var L=t._rangebreaks.length;if(!L)return x(A,t._m,t._b);for(var _=0,k=0;k<L&&!(A<t._rangebreaks[k].pmin);k++)A>t._rangebreaks[k].pmax&&(_=k+1);return x(A,t._m2,t._B[_])}}t.c2l=t.type===\"log\"?a:mm,t.l2c=t.type===\"log\"?tM:mm,t.l2p=b,t.p2l=p,t.c2p=t.type===\"log\"?function(A,L){return b(a(A,L))}:b,t.p2c=t.type===\"log\"?function(A){return tM(p(A))}:p,[\"linear\",\"-\"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=n_,t.c2d=t.c2r=t.l2d=t.l2r=mm,t.d2p=t.r2p=function(A){return t.l2p(n_(A))},t.p2d=t.p2r=p,t.cleanPos=mm):t.type===\"log\"?(t.d2r=t.d2l=function(A,L){return a(n_(A),L)},t.r2d=t.r2c=function(A){return tM(n_(A))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=tM,t.d2p=function(A,L){return t.l2p(t.d2r(A,L))},t.p2d=function(A){return tM(p(A))},t.r2p=function(A){return t.l2p(n_(A))},t.p2r=p,t.cleanPos=mm):t.type===\"date\"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(A,L,_){return t.l2p(o(A,0,_))},t.p2d=t.p2r=function(A,L,_){return s(p(A),L,_)},t.cleanPos=function(A){return yc.cleanDate(A,bg,t.calendar)}):t.type===\"category\"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=d(A);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return l(p(A))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(A){return typeof A==\"string\"&&A!==\"\"?A:mm(A)}):t.type===\"multicategory\"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=h(A);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return l(p(A))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(A){return Array.isArray(A)||typeof A==\"string\"&&A!==\"\"?A:mm(A)},t.setupMultiCategory=function(A){var L=t._traceIndices,_,k,M=t._matchGroup;if(M&&t._categories.length===0){for(var g in M)if(g!==n){var P=r[fL.id2name(g)];L=L.concat(P._traceIndices)}}var T=[[0,{}],[0,{}]],z=[];for(_=0;_<L.length;_++){var O=A[L[_]];if(i in O){var V=O[i],G=O._length||yc.minRowLength(V);if(Zoe(V[0])&&Zoe(V[1]))for(k=0;k<G;k++){var Z=V[0][k],H=V[1][k];Yq(Z)&&Yq(H)&&(z.push([Z,H]),Z in T[0][1]||(T[0][1][Z]=T[0][0]++),H in T[1][1]||(T[1][1][H]=T[1][0]++))}}}for(z.sort(function(N,j){var re=T[0][1],oe=re[N[0]]-re[j[0]];if(oe)return oe;var _e=T[1][1];return _e[N[1]]-_e[j[1]]}),_=0;_<z.length;_++)u(z[_])}),t.fraction2r=function(A){var L=t.r2l(t.range[0]),_=t.r2l(t.range[1]);return t.l2r(L+A*(_-L))},t.r2fraction=function(A){var L=t.r2l(t.range[0]),_=t.r2l(t.range[1]);return(t.r2l(A)-L)/(_-L)},t.limitRange=function(A){var L=t.minallowed,_=t.maxallowed;if(!(L===void 0&&_===void 0)){A||(A=\"range\");var k=yc.nestedProperty(t,A).get(),M=yc.simpleMap(k,t.r2l),g=M[1]<M[0];g&&M.reverse();var P=yc.simpleMap([L,_],t.r2l);if(L!==void 0&&M[0]<P[0]&&(k[g?1:0]=L),_!==void 0&&M[1]>P[1]&&(k[g?0:1]=_),k[0]===k[1]){var T=t.l2r(L),z=t.l2r(_);if(L!==void 0){var O=T+1;_!==void 0&&(O=Math.min(O,z)),k[g?1:0]=O}if(_!==void 0){var V=z+1;L!==void 0&&(V=Math.max(V,T)),k[g?0:1]=V}}}},t.cleanRange=function(A,L){t._cleanRange(A,L),t.limitRange(A)},t._cleanRange=function(A,L){L||(L={}),A||(A=\"range\");var _=yc.nestedProperty(t,A).get(),k,M;if(t.type===\"date\"?M=yc.dfltRange(t.calendar):i===\"y\"?M=vL.DFLTRANGEY:t._name===\"realaxis\"?M=[0,1]:M=L.dfltRange||vL.DFLTRANGEX,M=M.slice(),(t.rangemode===\"tozero\"||t.rangemode===\"nonnegative\")&&(M[0]=0),!_||_.length!==2){yc.nestedProperty(t,A).set(M);return}var g=_[0]===null,P=_[1]===null;for(t.type===\"date\"&&!t.autorange&&(_[0]=yc.cleanDate(_[0],bg,t.calendar),_[1]=yc.cleanDate(_[1],bg,t.calendar)),k=0;k<2;k++)if(t.type===\"date\"){if(!yc.isDateTime(_[k],t.calendar)){t[A]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=yc.constrain(t.r2l(_[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!gm(_[k]))if(!(g||P)&&gm(_[1-k]))_[k]=_[1-k]*(k?10:.1);else{t[A]=M;break}if(_[k]<-lL?_[k]=-lL:_[k]>lL&&(_[k]=lL),_[0]===_[1]){var z=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=z,_[1]+=z}}},t.setScale=function(A){var L=r._size;if(t.overlaying){var _=fL.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var k=A&&t._r?\"_r\":\"range\",M=t.calendar;t.cleanRange(k);var g=t.r2l(t[k][0],M),P=t.r2l(t[k][1],M),T=i===\"y\";if(T?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,O;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],t._lBreaks+=Math.abs(O.max-O.min);var V=T;g>P&&(V=!V),V&&t._rangebreaks.reverse();var G=V?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(T?P:g)),z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],t._B.push(t._B[t._B.length-1]-G*t._m2*(O.max-O.min));for(z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],O.pmin=b(O.min),O.pmax=b(O.max)}}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw r._replotting=!1,new Error(\"Something went wrong with axis scaling\")},t.maskBreaks=function(A){var L=t.rangebreaks||[],_,k,M,g,P;L._cachedPatterns||(L._cachedPatterns=L.map(function(re){return re.enabled&&re.bounds?yc.simpleMap(re.bounds,re.pattern?n_:t.d2c):null})),L._cachedValues||(L._cachedValues=L.map(function(re){return re.enabled&&re.values?yc.simpleMap(re.values,t.d2c).sort(yc.sorterAsc):null}));for(var T=0;T<L.length;T++){var z=L[T];if(z.enabled){if(z.bounds){var O=z.pattern;switch(_=L._cachedPatterns[T],k=_[0],M=_[1],O){case dL:P=new Date(A),g=P.getUTCDay(),k>M&&(M+=7,g<k&&(g+=7));break;case hL:P=new Date(A);var V=P.getUTCHours(),G=P.getUTCMinutes(),Z=P.getUTCSeconds(),H=P.getUTCMilliseconds();g=V+(G/60+Z/3600+H/36e5),k>M&&(M+=24,g<k&&(g+=24));break;case\"\":g=A;break}if(g>=k&&g<M)return bg}else for(var N=L._cachedValues[T],j=0;j<N.length;j++)if(k=N[j],M=k+z.dvalue,A>=k&&A<M)return bg}}return A},t.locateBreaks=function(A,L){var _,k,M,g,P=[];if(!t.rangebreaks)return P;var T=t.rangebreaks.slice().sort(function(_e,Me){return _e.pattern===dL&&Me.pattern===hL?-1:Me.pattern===dL&&_e.pattern===hL?1:0}),z=function(_e,Me){if(_e=yc.constrain(_e,A,L),Me=yc.constrain(Me,A,L),_e!==Me){for(var ke=!0,me=0;me<P.length;me++){var ie=P[me];_e<ie.max&&Me>=ie.min&&(_e<ie.min&&(ie.min=_e),Me>ie.max&&(ie.max=Me),ke=!1)}ke&&P.push({min:_e,max:Me})}};for(_=0;_<T.length;_++){var O=T[_];if(O.enabled)if(O.bounds){var V=A,G=L;O.pattern&&(V=Math.floor(V)),k=yc.simpleMap(O.bounds,O.pattern?n_:t.r2l),M=k[0],g=k[1];var Z=new Date(V),H,N;switch(O.pattern){case dL:N=qot,H=((g<M?7:0)+(g-M))*uL,V+=M*uL-(Z.getUTCDay()*uL+Z.getUTCHours()*cL+Z.getUTCMinutes()*Yoe+Z.getUTCSeconds()*Koe+Z.getUTCMilliseconds());break;case hL:N=uL,H=((g<M?24:0)+(g-M))*cL,V+=M*cL-(Z.getUTCHours()*cL+Z.getUTCMinutes()*Yoe+Z.getUTCSeconds()*Koe+Z.getUTCMilliseconds());break;default:V=Math.min(k[0],k[1]),G=Math.max(k[0],k[1]),N=G-V,H=N}for(var j=V;j<G;j+=N)z(j,j+H)}else for(var re=yc.simpleMap(O.values,t.d2c),oe=0;oe<re.length;oe++)M=re[oe],g=M+O.dvalue,z(M,g)}return P.sort(function(_e,Me){return _e.min-Me.min}),P},t.makeCalcdata=function(A,L,_){var k,M,g,P,T=t.type,z=T===\"date\"&&A[L+\"calendar\"];if(L in A){if(k=A[L],P=A._length||yc.minRowLength(k),yc.isTypedArray(k)&&(T===\"linear\"||T===\"log\")){if(P===k.length)return k;if(k.subarray)return k.subarray(0,P)}if(T===\"multicategory\")return c(k,P);for(M=new Array(P),g=0;g<P;g++)M[g]=t.d2c(k[g],0,z,_)}else{var O=L+\"0\"in A?t.d2c(A[L+\"0\"],0,z):0,V=A[\"d\"+L]?Number(A[\"d\"+L]):1;for(k=A[{x:\"y\",y:\"x\"}[L]],P=A._length||k.length,M=new Array(P),g=0;g<P;g++)M[g]=O+g*V}if(t.rangebreaks)for(g=0;g<P;g++)M[g]=t.maskBreaks(M[g]);return M},t.isValidRange=function(A,L){return Array.isArray(A)&&A.length===2&&(L&&A[0]===null||gm(t.r2l(A[0])))&&(L&&A[1]===null||gm(t.r2l(A[1])))},t.getAutorangeDflt=function(A,L){var _=!t.isValidRange(A,\"nullOk\");return _&&L&&L.reverseDflt?_=\"reversed\":A&&(A[0]===null&&A[1]===null?_=!0:A[0]===null&&A[1]!==null?_=\"min\":A[0]!==null&&A[1]===null&&(_=\"max\")),_},t.isReversed=function(){var A=t.autorange;return A===\"reversed\"||A===\"min reversed\"||A===\"max reversed\"},t.isPtWithinRange=function(A,L){var _=t.c2l(A[i],null,L),k=t.r2l(t.range[0]),M=t.r2l(t.range[1]);return k<M?k<=_&&_<=M:M<=_&&_<=k},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var A=t._matchGroup;if(A){var L=null,_=null;for(var k in A){var M=r[fL.id2name(k)];if(M._categories){L=M._categories,_=M._categoriesMap;break}}L&&_?(t._categories=L,t._categoriesMap=_):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var g=0;g<t._initialCategories.length;g++)u(t._initialCategories[g])},t.sortByInitialCategories=function(){var A=[];if(t._emptyCategories(),t._initialCategories)for(var L=0;L<t._initialCategories.length;L++)u(t._initialCategories[L]);A=A.concat(t._traceIndices);var _=t._matchGroup;for(var k in _)if(n!==k){var M=r[fL.id2name(k)];M._categories=t._categories,M._categoriesMap=t._categoriesMap,A=A.concat(M._traceIndices)}return A};var E=r._d3locale;t.type===\"date\"&&(t._dateFormat=E?E.timeFormat:Dot,t._extraFormat=r._extraFormat),t._separators=r.separators,t._numFormat=E?E.numberFormat:Fot,delete t._minDtick,delete t._forceTick0}});var L3=ye((jir,tse)=>{\"use strict\";var $oe=Eo(),Kq=Dr(),Bot=hs().BADNUM,pL=Kq.isArrayOrTypedArray,Not=Kq.isDateTime,Uot=Kq.cleanNumber,Qoe=Math.round;tse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(pL(i)&&!i.length)return\"-\";if(!a&&Wot(i))return\"multicategory\";if(a&&Array.isArray(i[0])){for(var o=[],s=0;s<i.length;s++)if(pL(i[s]))for(var l=0;l<i[s].length;l++)o.push(i[s][l]);i=o}if(Hot(i,r))return\"date\";var u=n.autotypenumbers!==\"strict\";return jot(i,u)?\"category\":Got(i,u)?\"linear\":\"-\"};function Vot(e,t){return t?$oe(e):typeof e==\"number\"}function Got(e,t){for(var r=e.length,n=0;n<r;n++)if(Vot(e[n],t))return!0;return!1}function Hot(e,t){for(var r=e.length,n=ese(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=Qoe(s),u=e[l],c=String(u);o[c]||(o[c]=1,Not(u,t)&&i++,$oe(u)&&a++)}return i>a*2}function ese(e){return Math.max(1,(e-1)/1e3)}function jot(e,t){for(var r=e.length,n=ese(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=Qoe(s),u=e[l],c=String(u);if(!o[c]){o[c]=1;var f=typeof u;f===\"boolean\"?a++:(t?Uot(u)!==Bot:f===\"number\")?i++:f===\"string\"&&a++}}return a>i*2}function Wot(e){return pL(e[0])&&pL(e[1])}});var wg=ye((Wir,use)=>{\"use strict\";var Xot=Oa(),ase=Eo(),o_=Dr(),gL=hs().FP_SAFE,Zot=qa(),Yot=So(),ose=hf(),Kot=ose.getFromId,Jot=ose.isLinked;use.exports={applyAutorangeOptions:lse,getAutoRange:Jq,makePadFn:$q,doAutoRange:Qot,findExtremes:est,concatExtremes:tB};function Jq(e,t){var r,n,i=[],a=e._fullLayout,o=$q(a,t,0),s=$q(a,t,1),l=tB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return o_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r<u.length&&f===h;r++)f=Math.min(f,u[r].val);for(r=1;r<c.length&&f===h;r++)h=Math.max(h,c[r].val);var d=t.autorange,v=d===\"reversed\"||d===\"min reversed\"||d===\"max reversed\";if(!v&&t.range){var x=o_.simpleMap(t.range,t.r2l);v=x[1]<x[0]}t.autorange===\"reversed\"&&(t.autorange=!0);var b=t.rangemode,p=b===\"tozero\",C=b===\"nonnegative\",E=t._length,A=E/10,L=0,_,k,M,g,P,T;for(r=0;r<u.length;r++)for(_=u[r],n=0;n<c.length;n++)k=c[n],T=k.val-_.val-rse(t,_.val,k.val),T>0&&(P=E-o(_)-s(k),P>A?T/P>L&&(M=_,g=k,L=T/P):T/E>L&&(M={val:_.val,nopad:1},g={val:k.val,nopad:1},L=T/E));function z(H,N){return Math.max(H,s(N))}if(f===h){var O=f-1,V=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/E));i=f>0?[0,Z]:[Z,0]}else C?i=[Math.max(0,O),Math.max(1,V)]:i=[O,V]}else p?(M.val>=0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):C&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-M.val-rse(t,_.val,k.val))/(E-o(M)-s(g)),i=[M.val-L*o(M),g.val+L*s(g)];return i=lse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function rse(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function $q(e,t,r){var n=.05*t._length,i=t._anchorAxis||{};if((t.ticklabelposition||\"\").indexOf(\"inside\")!==-1||(i.ticklabelposition||\"\").indexOf(\"inside\")!==-1){var a=t.isReversed();if(!a){var o=o_.simpleMap(t.range,t.r2l);a=o[1]<o[0]}a&&(r=!r)}var s=0;return Jot(e,t._id)||(s=$ot(e,t,r)),n=Math.max(s,n),t.constrain===\"domain\"&&t._inputDomain&&(n*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(u){return u.nopad?0:u.pad+(u.extrapad?n:s)}}var ise=3;function $ot(e,t,r){var n=0,i=t._id.charAt(0)===\"x\";for(var a in e._plots){var o=e._plots[a];if(!(t._id!==o.xaxis._id&&t._id!==o.yaxis._id)){var s=(i?o.yaxis:o.xaxis)||{};if((s.ticklabelposition||\"\").indexOf(\"inside\")!==-1&&(!r&&(s.side===\"left\"||s.side===\"bottom\")||r&&(s.side===\"top\"||s.side===\"right\"))){if(s._vals){var l=o_.deg2rad(s._tickAngles[s._id+\"tick\"]||0),u=Math.abs(Math.cos(l)),c=Math.abs(Math.sin(l));if(!s._vals[0].bb){var f=s._id+\"tick\",h=s._selections[f];h.each(function(C){var E=Xot.select(this),A=E.select(\".text-math-group\");A.empty()&&(C.bb=Yot.bBox(E.node()))})}for(var d=0;d<s._vals.length;d++){var v=s._vals[d],x=v.bb;if(x){var b=2*ise+x.width,p=2*ise+x.height;n=Math.max(n,i?Math.max(b*u,p*c):Math.max(p*u,b*c))}}}s.ticks===\"inside\"&&s.ticklabelposition===\"inside\"&&(n+=s.ticklen||0)}}}return n}function tB(e,t,r){var n=t._id,i=e._fullData,a=e._fullLayout,o=[],s=[],l,u,c;function f(b,p){for(l=0;l<p.length;l++){var C=b[p[l]],E=(C._extremes||{})[n];if(C.visible===!0&&E){for(u=0;u<E.min.length;u++)c=E.min[u],Qq(o,c.val,c.pad,{extrapad:c.extrapad});for(u=0;u<E.max.length;u++)c=E.max[u],eB(s,c.val,c.pad,{extrapad:c.extrapad})}}}if(f(i,t._traceIndices),f(a.annotations||[],t._annIndices||[]),f(a.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r){for(var h in t._matchGroup)if(h!==t._id){var d=Kot(e,h),v=tB(e,d,!0),x=t._length/d._length;for(u=0;u<v.min.length;u++)c=v.min[u],Qq(o,c.val,c.pad*x,{extrapad:c.extrapad});for(u=0;u<v.max.length;u++)c=v.max[u],eB(s,c.val,c.pad*x,{extrapad:c.extrapad})}}return{min:o,max:s}}function Qot(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():Jq(e,t),t._r=t.range.slice(),t._rl=o_.simpleMap(t._r,t.r2l);var n=t._input,i={};i[t._attr+\".range\"]=t.range,i[t._attr+\".autorange\"]=t.autorange,Zot.call(\"_storeDirectGUIEdit\",e.layout,e._fullLayout._preGUI,i),n.range=t.range.slice(),n.autorange=t.autorange}var a=t._anchorAxis;if(a&&a.rangeslider){var o=a.rangeslider[t._name];o&&o.rangemode===\"auto\"&&(o.range=Jq(e,t)),a._input.rangeslider[t._name]=o_.extendFlat({},o)}}function est(e,t,r){r||(r={}),e._m||e.setScale();var n=[],i=[],a=t.length,o=r.padded||!1,s=r.tozero&&(e.type===\"linear\"||e.type===\"-\"),l=e.type===\"log\",u=!1,c=r.vpadLinearized||!1,f,h,d,v,x,b,p,C,E;function A(z){if(Array.isArray(z))return u=!0,function(V){return Math.max(Number(z[V]||0),0)};var O=Math.max(Number(z||0),0);return function(){return O}}var L=A((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),k=A(r.vpadplus||r.vpad),M=A(r.vpadminus||r.vpad);if(!u){if(C=1/0,E=-1/0,l)for(f=0;f<a;f++)h=t[f],h<C&&h>0&&(C=h),h>E&&h<gL&&(E=h);else for(f=0;f<a;f++)h=t[f],h<C&&h>-gL&&(C=h),h>E&&h<gL&&(E=h);t=[C,E],a=2}var g={tozero:s,extrapad:o};function P(z){d=t[z],ase(d)&&(b=L(z),p=_(z),c?(v=e.c2l(d)-M(z),x=e.c2l(d)+k(z)):(C=d-M(z),E=d+k(z),l&&C<E/10&&(C=E/10),v=e.c2l(C),x=e.c2l(E)),s&&(v=Math.min(0,v),x=Math.max(0,x)),nse(v)&&Qq(n,v,p,g),nse(x)&&eB(i,x,b,g))}var T=Math.min(6,a);for(f=0;f<T;f++)P(f);for(f=a-1;f>=T;f--)P(f);return{min:n,max:i,opts:r}}function Qq(e,t,r,n){sse(e,t,r,n,tst)}function eB(e,t,r,n){sse(e,t,r,n,rst)}function sse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<e.length&&s;l++){var u=e[l];if(i(u.val,t)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function nse(e){return ase(e)&&Math.abs(e)<gL}function tst(e,t){return e<=t}function rst(e,t){return e>=t}function ist(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&mL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&mL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function nst(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&mL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&mL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function mL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t<r):!0}function lse(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(i!==void 0){var a=t.d2l(r),o=t.d2l(n);o_.isArrayOrTypedArray(i)||(i=[i]);for(var s=0;s<i.length;s++){var l=t.d2l(i[s]);a>=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=ist(r,t),n=nst(n,t),[r,n]}});var ho=ye((Xir,Pse)=>{\"use strict\";var w0=Oa(),kh=Eo(),P3=Mc(),iM=qa(),Jo=Dr(),I3=Jo.strTranslate,Eb=ru(),ast=Mb(),nM=Ca(),Xp=So(),ost=Rd(),cse=Sq(),Jd=hs(),sst=Jd.ONEMAXYEAR,xL=Jd.ONEAVGYEAR,bL=Jd.ONEMINYEAR,lst=Jd.ONEMAXQUARTER,aB=Jd.ONEAVGQUARTER,wL=Jd.ONEMINQUARTER,ust=Jd.ONEMAXMONTH,R3=Jd.ONEAVGMONTH,TL=Jd.ONEMINMONTH,Zp=Jd.ONEWEEK,zv=Jd.ONEDAY,s_=zv/2,xm=Jd.ONEHOUR,aM=Jd.ONEMIN,AL=Jd.ONESEC,cst=Jd.ONEMILLI,fst=Jd.ONEMICROSEC,Cb=Jd.MINUS_SIGN,EL=Jd.BADNUM,oB={K:\"zeroline\"},sB={K:\"gridline\",L:\"path\"},lB={K:\"minor-gridline\",L:\"path\"},bse={K:\"tick\",L:\"path\"},fse={K:\"tick\",L:\"text\"},hse={width:[\"x\",\"r\",\"l\",\"xl\",\"xr\"],height:[\"y\",\"t\",\"b\",\"yt\",\"yb\"],right:[\"r\",\"xr\"],left:[\"l\",\"xl\"],top:[\"t\",\"yt\"],bottom:[\"b\",\"yb\"]},CL=Kh(),rM=CL.MID_SHIFT,kb=CL.CAP_SHIFT,oM=CL.LINE_SPACING,hst=CL.OPPOSITE_SIDE,SL=3,Qn=Pse.exports={};Qn.setConvert=ym();var dst=L3(),Ay=hf(),vst=Ay.idSort,pst=Ay.isLinked;Qn.id2name=Ay.id2name;Qn.name2id=Ay.name2id;Qn.cleanId=Ay.cleanId;Qn.list=Ay.list;Qn.listIds=Ay.listIds;Qn.getFromId=Ay.getFromId;Qn.getFromTrace=Ay.getFromTrace;var wse=wg();Qn.getAutoRange=wse.getAutoRange;Qn.findExtremes=wse.findExtremes;var gst=1e-4;function hB(e){var t=(e[1]-e[0])*gst;return[e[0]-t,e[1]+t]}Qn.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+\"axis\"],l=n+\"ref\",u={};return i||(i=s[0]||(typeof a==\"string\"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+\" domain\"})),u[l]={valType:\"enumerated\",values:s.concat(a?typeof a==\"string\"?[a]:a:[]),dflt:i},Jo.coerce(e,t,u,l)};Qn.getRefType=function(e){return e===void 0?e:e===\"paper\"?\"paper\":e===\"pixel\"?\"pixel\":/( domain)$/.test(e)?\"domain\":\"range\"};Qn.coercePosition=function(e,t,r,n,i,a){var o,s,l=Qn.getRefType(n);if(l!==\"range\")o=Jo.ensureNumber,s=r(i,a);else{var u=Qn.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};Qn.cleanPosition=function(e,t,r){var n=r===\"paper\"||r===\"pixel\"?Jo.ensureNumber:Qn.getFromId(t,r).cleanPos;return n(e)};Qn.redrawComponents=function(e,t){t=t||Qn.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=iM.getComponentMethod(i,a),u={},c=0;c<t.length;c++)for(var f=r[Qn.id2name(t[c])],h=f[o],d=0;d<h.length;d++){var v=h[d];if(!u[v]&&(l(e,v),u[v]=1,s))return}}n(\"annotations\",\"drawOne\",\"_annIndices\"),n(\"shapes\",\"drawOne\",\"_shapeIndices\"),n(\"images\",\"draw\",\"_imgIndices\",!0),n(\"selections\",\"drawOne\",\"_selectionIndices\")};var mst=Qn.getDataConversions=function(e,t,r,n){var i,a=r===\"x\"||r===\"y\"||r===\"z\"?r:n;if(Jo.isArrayOrTypedArray(a)){if(i={type:dst(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},Qn.setConvert(i),i.type===\"category\")for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=Qn.getFromTrace(e,t,a);return i?{d2c:i.d2c,c2d:i.c2d}:a===\"ids\"?{d2c:vse,c2d:vse}:{d2c:dse,c2d:dse}};function dse(e){return+e}function vse(e){return String(e)}Qn.getDataToCoordFunc=function(e,t,r,n){return mst(e,t,r,n).d2c};Qn.counterLetter=function(e){var t=e.charAt(0);if(t===\"x\")return\"y\";if(t===\"y\")return\"x\"};Qn.minDtick=function(e,t,r,n){[\"log\",\"category\",\"multicategory\"].indexOf(e.type)!==-1||!n?e._minDtick=0:e._minDtick===void 0?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Qn.saveRangeInitial=function(e,t){for(var r=Qn.list(e,\"\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=a._rangeInitial0===void 0&&a._rangeInitial1===void 0,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&l!==!0||t&&s)&&(a._rangeInitial0=l===\"min\"||l===\"max reversed\"?void 0:a.range[0],a._rangeInitial1=l===\"max\"||l===\"min reversed\"?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n};Qn.saveShowSpikeInitial=function(e,t){for(var r=Qn.list(e,\"\",!0),n=!1,i=\"on\",a=0;a<r.length;a++){var o=r[a],s=o._showSpikeInitial===void 0,l=s||o.showspikes!==o._showspikes;(s||t&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),i===\"on\"&&!o.showspikes&&(i=\"off\")}return e._fullLayout._cartesianSpikesEnabled=i,n};Qn.autoBin=function(e,t,r,n,i,a){var o=Jo.aggNums(Math.min,null,e),s=Jo.aggNums(Math.max,null,e);if(t.type===\"category\"||t.type===\"multicategory\")return{start:o-.5,end:s+.5,size:Math.max(1,Math.round(a)||1),_dataSpan:s-o};i||(i=t.calendar);var l;if(t.type===\"log\"?l={type:\"linear\",range:[o,s]}:l={type:t.type,range:Jo.simpleMap([o,s],t.c2r,0,i),calendar:i},Qn.setConvert(l),a=a&&cse.dtick(a,l.type),a)l.dtick=a,l.tick0=cse.tick0(void 0,l.type,i);else{var u;if(r)u=(s-o)/r;else{var c=Jo.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),h=f*Jo.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(h,2*Jo.stdev(e)/Math.pow(e.length,n?.25:.4)),kh(u)||(u=1)}Qn.autoTicks(l,u)}var d=l.dtick,v=Qn.tickIncrement(Qn.tickFirst(l),d,\"reverse\",i),x,b;if(typeof d==\"number\")v=yst(v,e,l,o,s),b=1+Math.floor((s-v)/d),x=v+b*d;else for(l.dtick.charAt(0)===\"M\"&&(v=_st(v,e,d,o,i)),x=v,b=0;x<=s;)x=Qn.tickIncrement(x,d,!1,i),b++;return{start:t.c2r(v,0,i),end:t.c2r(x,0,i),size:d,_dataSpan:s-o}};function yst(e,t,r,n,i){var a=0,o=0,s=0,l=0;function u(d){return(1+(d-e)*100/r.dtick)%100<2}for(var c=0;c<t.length;c++)t[c]%1===0?s++:kh(t[c])||l++,u(t[c])&&a++,u(t[c]+r.dtick/2)&&o++;var f=t.length-l;if(s===f&&r.type!==\"date\")r.dtick<1?e=n-.5*r.dtick:(e-=.5,e+r.dtick<n&&(e+=r.dtick));else if(o<f*.1&&(a>f*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}function _st(e,t,r,n,i){var a=Jo.findExactDates(t,i),o=.8;if(a.exactDays>o){var s=Number(r.substr(1));a.exactYears>o&&s%12===0?e=Qn.tickIncrement(e,\"M6\",\"reverse\")+zv*1.5:a.exactMonths>o?e=Qn.tickIncrement(e,\"M1\",\"reverse\")+zv*15.5:e-=s_;var l=Qn.tickIncrement(e,r);if(l<=n)return l}return e}Qn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&kh(t._tmin),i;if(n){var a=Qn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Jo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Jo.simpleMap(i,t.l2r),e._isMinor=!0,Qn.prepTicks(e,r),n){var s=kh(t.dtick),l=kh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?rB(u,c)?u===2*Zp&&c===2*zv&&(e.dtick=Zp):u===2*Zp&&c===3*zv?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=zv:pse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)===\"M\"?l?e.dtick=\"M1\":rB(u,c)?u>=12&&c===2&&(e.dtick=\"M3\"):e.dtick=t.dtick:String(e.dtick).charAt(0)===\"L\"?String(t.dtick).charAt(0)===\"L\"?rB(u,c)||(e.dtick=pse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick=\"D1\":e.dtick===\"D2\"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function rB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function pse(e,t){return Math.abs(e/t-1)<.001}Qn.prepTicks=function(e,t){var r=Jo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode===\"auto\"||!e.dtick){var n=e.nticks,i;n||(e.type===\"category\"||e.type===\"multicategory\"?(i=e.tickfont?Jo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)===\"y\"?40:80,n=Jo.constrain(e._length/i,4,9)+1),e._name===\"radialaxis\"&&(n*=2)),e.minor&&e.minor.tickmode!==\"array\"||e.tickmode===\"array\"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Qn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<e._minDtick*2&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.ticklabelmode===\"period\"&&xst(e),e.tick0||(e.tick0=e.type===\"date\"?\"2000-01-01\":0),e.type===\"date\"&&e.dtick<.1&&(e.dtick=.1),Mse(e)};function iB(e){return+e.substring(1)}function xst(e){var t;function r(){return!(kh(e.dtick)||e.dtick.charAt(0)!==\"M\")}var n=r(),i=Qn.getTickFormat(e);if(i){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=xm,a&&!n&&e.dtick<xm&&(e.dtick=xm)):/%p/.test(i)?(t=s_,a&&!n&&e.dtick<s_&&(e.dtick=s_)):/%[Aadejuwx]/.test(i)?(t=zv,a&&!n&&e.dtick<zv&&(e.dtick=zv)):/%[UVW]/.test(i)?(t=Zp,a&&!n&&e.dtick<Zp&&(e.dtick=Zp)):/%[Bbm]/.test(i)?(t=R3,a&&(n?iB(e.dtick)<1:e.dtick<TL)&&(e.dtick=\"M1\")):/%[q]/.test(i)?(t=aB,a&&(n?iB(e.dtick)<3:e.dtick<wL)&&(e.dtick=\"M3\")):/%[Yy]/.test(i)&&(t=xL,a&&(n?iB(e.dtick)<12:e.dtick<bL)&&(e.dtick=\"M12\")))}n=r(),n&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}function bst(e,t,r){for(var n=0;n<e.length;n++){var i=e[n].value,a=n,o=n+1;n<e.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=bL?u>=bL&&u<=sst?f=u:f=xL:r===aB&&c>=wL?u>=wL&&u<=lst?f=u:f=aB:c>=TL?u>=TL&&u<=ust?f=u:f=R3:r===Zp&&c>=Zp?f=Zp:c>=zv?f=zv:r===s_&&c>=s_?f=s_:r===xm&&c>=xm&&(f=xm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,x=0,b=0;b<v;b++){var p=(b+.5)/v;t.maskBreaks(i*(1-p)+p*d)!==EL&&x++}f*=x/v,f||(e[n].drop=!0),h&&u>Zp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}Qn.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode===\"period\",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Jo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Jo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]<u[0],f=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d=Math.max(1e3,t._length||0),v=[],x=[],b=[],p=[],C=[],E=t.minor&&(t.minor.ticks||t.minor.showgrid),A=1;A>=(E?0:1);A--){var L=!A;A?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var _=A?t:Jo.extendFlat({},t,t.minor);if(L?Qn.prepMinorTicks(_,t,r):Qn.prepTicks(_,r),_.tickmode===\"array\"){A?(b=[],v=gse(t,!L)):(p=[],x=gse(t,!L));continue}if(_.tickmode===\"sync\"){b=[],v=wst(t);continue}var k=hB(u),M=k[0],g=k[1],P=kh(_.dtick),T=n===\"log\"&&!(P||_.dtick.charAt(0)===\"L\"),z=Qn.tickFirst(_,r);if(A){if(t._tmin=z,z<M!==c)break;(n===\"category\"||n===\"multicategory\")&&(g=c?Math.max(-.5,g):Math.min(t._categories.length-.5,g))}var O=null,V=z,G;if(A){var Z;P?Z=t.dtick:n===\"date\"?typeof t.dtick==\"string\"&&t.dtick.charAt(0)===\"M\"&&(Z=R3*t.dtick.substring(1)):Z=t._roughDTick,G=Math.round((t.r2l(V)-t.r2l(t.tick0))/Z)-1}var H=_.dtick;for(_.rangebreaks&&_._tick0Init!==_.tick0&&(V=nB(V,t),c||(V=Qn.tickIncrement(V,H,!c,i))),A&&o&&(V=Qn.tickIncrement(V,H,!c,i),G--);c?V>=g:V<=g;V=Qn.tickIncrement(V,H,c,i)){if(A&&G++,_.rangebreaks&&!c){if(V<M)continue;if(_.maskBreaks(V)===EL&&nB(V,_)>=h)break}if(b.length>d||V===O)break;O=V;var N={value:V};A?(T&&V!==(V|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var j=(p[1].value-p[0].value)*(s?-1:1);Wst(j,t.tickformat)||(l=!1)}if(!l)C=b;else{var re=b.concat(p);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Gt,Nt){return Gt.value-Nt.value}).filter(function(Gt,Nt,$t){return Nt===0||Gt.value!==$t[Nt-1].value});var oe=re.map(function(Gt,Nt){return Gt.minor===void 0&&!Gt.skipLabel?Nt:null}).filter(function(Gt){return Gt!==null});oe.forEach(function(Gt){l.map(function(Nt){var $t=Gt+Nt;$t>=0&&$t<re.length&&Jo.pushUnique(C,re[$t])})})}if(E){var _e=t.minor.ticks===\"inside\"&&t.ticks===\"outside\"||t.minor.ticks===\"outside\"&&t.ticks===\"inside\";if(!_e){for(var Me=b.map(function(Gt){return Gt.value}),ke=[],me=0;me<p.length;me++){var ie=p[me],Se=ie.value;if(Me.indexOf(Se)===-1){for(var Le=!1,Ae=0;!Le&&Ae<b.length;Ae++)1e7+b[Ae].value===1e7+Se&&(Le=!0);Le||ke.push(ie)}}p=ke}}o&&bst(C,t,t._definedDelta);var De;if(t.rangebreaks){var Pe=t._id.charAt(0)===\"y\",ge=1;t.tickmode===\"auto\"&&(ge=t.tickfont?t.tickfont.size:12);var Fe=NaN;for(De=b.length-1;De>-1;De--){if(b[De].drop){b.splice(De,1);continue}b[De].value=nB(b[De].value,t);var ce=t.c2p(b[De].value);(Pe?Fe>ce-ge:Fe<ce+ge)?b.splice(c?De+1:De,1):Fe=ce}}pB(t)&&Math.abs(u[1]-u[0])===360&&b.pop(),t._tmax=(b[b.length-1]||{}).value,t._prevDateHead=\"\",t._inCalcTicks=!0;var Ze,ct=function(Gt){Gt.text=\"\",t._prevDateHead=Ze};b=b.concat(p);function pt(Gt,Nt){var $t=Qn.tickText(Gt,Nt.value,!1,Nt.simpleLabel),sr=Nt.periodX;return sr!==void 0&&($t.periodX=sr,(sr>h||sr<f)&&(sr>h&&($t.periodX=h),sr<f&&($t.periodX=f),ct($t))),$t}var Wt;for(De=0;De<b.length;De++){var st=b[De].minor,lt=b[De].value;st?(l&&C.indexOf(b[De])!==-1?Wt=pt(t,b[De]):Wt={x:lt},Wt.minor=!0,x.push(Wt)):(Ze=t._prevDateHead,Wt=pt(t,b[De]),(b[De].skipLabel||l&&C.indexOf(b[De])===-1)&&ct(Wt),v.push(Wt))}return v=v.concat(x),t._inCalcTicks=!1,o&&v.length&&(v[0].noTick=!0),v};function Tse(e,t){return e.rangebreaks&&(t=t.filter(function(r){return e.maskBreaks(r.x)!==EL})),t}function wst(e){var t=e._mainAxis,r=[];if(t._vals){for(var n=0;n<t._vals.length;n++)if(!t._vals[n].noTick){var i=t.l2p(t._vals[n].x),a=e.p2l(i),o=Qn.tickText(e,a);t._vals[n].minor&&(o.minor=!0,o.text=\"\"),r.push(o)}}return r=Tse(e,r),r}function gse(e,t){var r=Jo.simpleMap(e.range,e.r2l),n=hB(r),i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=e.type===\"category\"?e.d2l_noadd:e.d2l;e.type===\"log\"&&String(e.dtick).charAt(0)!==\"L\"&&(e.dtick=\"L\"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(t!==void 0&&(t&&l||t===!1&&!l))&&!(l&&!e.minor)){var u=l?e.minor.tickvals:e.tickvals,c=l?[]:e.ticktext;if(u){Jo.isArrayOrTypedArray(c)||(c=[]);for(var f=0;f<u.length;f++){var h=o(u[f]);if(h>i&&h<a){var d=Qn.tickText(e,h,!1,String(c[f]));l&&(d.minor=!0,d.text=\"\"),s.push(d)}}}}return s=Tse(e,s),s}var yL=[2,5,10],mse=[1,2,3,6,12],yse=[1,2,5,10,15,30],Tst=[1,2,3,7,14],Ase=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Sse=[-.301,0,.301,.699,1],Ast=[15,30,45,90,180];function _m(e,t,r){return t*Jo.roundUp(e/t,r)}Qn.autoTicks=function(e,t,r){var n;function i(f){return Math.pow(f,Math.floor(Math.log(t)/Math.LN10))}if(e.type===\"date\"){e.tick0=Jo.dateTick0(e.calendar,0);var a=2*t;if(a>xL)t/=xL,n=i(10),e.dtick=\"M\"+12*_m(t,n,yL);else if(a>R3)t/=R3,e.dtick=\"M\"+_m(t,1,mse);else if(a>zv){if(e.dtick=_m(t,zv,e._hasDayOfWeekBreaks?[1,2,7,14]:Tst),!r){var o=Qn.getTickFormat(e),s=e.ticklabelmode===\"period\";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Jo.dateTick0(e.calendar,2):e.tick0=Jo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,mse):a>aM?e.dtick=_m(t,aM,yse):a>AL?e.dtick=_m(t,AL,yse):(n=i(10),e.dtick=_m(t,n,yL))}else if(e.type===\"log\"){e.tick0=0;var l=Jo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick=\"L\"+_m(t,n,yL)}else e.dtick=t>.3?\"D2\":\"D1\"}else e.type===\"category\"||e.type===\"multicategory\"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):pB(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,Ast)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,yL));if(e.dtick===0&&(e.dtick=1),!kh(e.dtick)&&typeof e.dtick!=\"string\"){var c=e.dtick;throw e.dtick=1,\"ax.dtick error: \"+String(c)}};function Mse(e){var t=e.dtick;if(e._tickexponent=0,!kh(t)&&typeof t!=\"string\"&&(t=1),(e.type===\"category\"||e.type===\"multicategory\")&&(e._tickround=null),e.type===\"date\"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,\"\"),i=n.length;if(String(t).charAt(0)===\"M\")i>10||n.substr(5)!==\"01-01\"?e._tickround=\"d\":e._tickround=+t.substr(1)%12===0?\"y\":\"m\";else if(t>=zv&&i<=10||t>=zv*15)e._tickround=\"d\";else if(t>=aM&&i<=16||t>=xm)e._tickround=\"M\";else if(t>=AL&&i<=19||t>=aM)e._tickround=\"S\";else{var a=e.l2r(r+t).replace(/^-/,\"\").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(kh(t)||t.charAt(0)===\"L\"){var o=e.range.map(e.r2d||Number);kh(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(ML(e.exponentformat)&&!dB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Qn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(kh(t))return Jo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a===\"M\")return Jo.incrementMonth(e,o,n);if(a===\"L\")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a===\"D\"){var s=t===\"D2\"?Sse:Ase,l=e+i*.01,u=Jo.roundUp(Jo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw\"unrecognized dtick \"+String(t)};Qn.tickFirst=function(e,t){var r=e.r2l||Number,n=Jo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]<n[0],a=i?Math.floor:Math.ceil,o=hB(n)[0],s=e.dtick,l=r(e.tick0);if(kh(s)){var u=a((o-l)/s)*s+l;return(e.type===\"category\"||e.type===\"multicategory\")&&(u=Jo.constrain(u,0,e._categories.length-1)),u}var c=s.charAt(0),f=Number(s.substr(1));if(c===\"M\"){for(var h=0,d=l,v,x,b;h<10;){if(v=Qn.tickIncrement(d,s,i,e.calendar),(v-o)*(d-o)<=0)return i?Math.min(d,v):Math.max(d,v);x=(o-(d+v)/2)/(v-d),b=c+(Math.abs(Math.round(x))||1)*f,d=Qn.tickIncrement(d,b,x<0?!i:i,e.calendar),h++}return Jo.error(\"tickFirst did not converge\",e),d}else{if(c===\"L\")return Math.log(a((Math.pow(10,o)-l)/f)*f+l)/Math.LN10;if(c===\"D\"){var p=s===\"D2\"?Sse:Ase,C=Jo.roundUp(Jo.mod(o,1),p,i);return Math.floor(o)+Math.log(w0.round(Math.pow(10,C),1))/Math.LN10}else throw\"unrecognized dtick \"+String(s)}};Qn.tickText=function(e,t,r,n){var i=Ese(e,t),a=e.tickmode===\"array\",o=r||a,s=e.type,l=s===\"category\"?e.d2l_noadd:e.d2l,u,c=function(b){var p=e.l2p(b);return p>=0&&p<=e._length?b:null};if(a&&Jo.isArrayOrTypedArray(e.ticktext)){var f=Jo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u<e.ticktext.length&&!(Math.abs(t-l(e.tickvals[u]))<h);u++);if(u<e.ticktext.length)return i.text=String(e.ticktext[u]),i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)],i}function d(b){if(b===void 0)return!0;if(r)return b===\"none\";var p={first:e._tmin,last:e._tmax}[b];return b!==\"all\"&&t!==p}var v=r?\"never\":e.exponentformat!==\"none\"&&d(e.showexponent)?\"hide\":\"\";if(s===\"date\"?Sst(e,i,r,o):s===\"log\"?Mst(e,i,r,o,v):s===\"category\"?Est(e,i):s===\"multicategory\"?Cst(e,i,r):pB(e)?Lst(e,i,r,o,v):kst(e,i,r,o,v),n||(e.tickprefix&&!d(e.showtickprefix)&&(i.text=e.tickprefix+i.text),e.ticksuffix&&!d(e.showticksuffix)&&(i.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(i.text)){var x=e.labelalias[i.text];typeof x==\"string\"&&(i.text=x)}return(e.tickson===\"boundaries\"||e.showdividers)&&(i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)]),i};Qn.hoverLabelText=function(e,t,r){r&&(e=Jo.extendFlat({},e,{hoverformat:r}));var n=Jo.isArrayOrTypedArray(t)?t[0]:t,i=Jo.isArrayOrTypedArray(t)?t[1]:void 0;if(i!==void 0&&i!==n)return Qn.hoverLabelText(e,n,r)+\" - \"+Qn.hoverLabelText(e,i,r);var a=e.type===\"log\"&&n<=0,o=Qn.tickText(e,e.c2l(a?-n:n),\"hover\").text;return a?n===0?\"0\":Cb+o:o};function Ese(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||\"\",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}function Sst(e,t,r,n){var i=e._tickround,a=r&&e.hoverformat||Qn.getTickFormat(e);n=!a&&n,n&&(kh(i)?i=4:i={y:\"m\",m:\"d\",d:\"M\",M:\"S\",S:4}[i]);var o=Jo.formatDate(t.x,a,i,e._dateFormat,e.calendar,e._extraFormat),s,l=o.indexOf(`\n",
       "`);if(l!==-1&&(s=o.substr(l+1),o=o.substr(0,l)),n&&(s!==void 0&&(o===\"00:00:00\"||o===\"00:00\")?(o=s,s=\"\"):o.length===8&&(o=o.replace(/:00$/,\"\"))),s)if(r)i===\"d\"?o+=\", \"+s:o=s+(o?\", \"+o:\"\");else if(!e._inCalcTicks||e._prevDateHead!==s)e._prevDateHead=s,o+=\"<br>\"+s;else{var u=lM(e),c=e._trueSide||e.side;(!u&&c===\"top\"||u&&c===\"bottom\")&&(o+=\"<br> \")}t.text=o}function Mst(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a==\"string\"&&a.charAt(0);if(i===\"never\"&&(i=\"\"),n&&l!==\"L\"&&(a=\"L3\",l=\"L\"),s||l===\"L\")t.text=sM(Math.pow(10,o),e,i,n);else if(kh(a)||l===\"D\"&&(e.minorloglabels===\"complete\"||Jo.mod(o+.01,1)<.1)){var u;e.minorloglabels===\"complete\"&&!(Jo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split(\"e\"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v===\"power\"||ML(v)&&dB(h)?(t.text=f[0],d>0&&(t.text+=\"x10\"),t.text===\"1x10\"&&(t.text=\"10\"),h!==0&&h!==1&&(t.text+=\"<sup>\"+(h>0?\"\":Cb)+d+\"</sup>\"),t.fontSize*=1.25):(v===\"e\"||v===\"E\")&&d>2?t.text=f[0]+v+(h>0?\"+\":Cb)+d:(t.text=sM(Math.pow(10,o),e,\"\",\"fakehover\"),a===\"D1\"&&e._id.charAt(0)===\"y\"&&(t.dy-=t.fontSize/6))}else if(l===\"D\")t.text=e.minorloglabels===\"none\"?\"\":String(Math.round(Math.pow(10,Jo.mod(o,1)))),t.fontSize*=.75;else throw\"unrecognized dtick \"+String(a);if(e.dtick===\"D1\"){var x=String(t.text).charAt(0);(x===\"0\"||x===\"1\")&&(e._id.charAt(0)===\"y\"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function Est(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=\"\"),t.text=String(r)}function Cst(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?\"\":String(i[1]),o=i[0]===void 0?\"\":String(i[0]);r?t.text=o+\" - \"+a:(t.text=a,t.text2=o)}function kst(e,t,r,n,i){i===\"never\"?i=\"\":e.showexponent===\"all\"&&Math.abs(t.x/e.dtick)<1e-6&&(i=\"hide\"),t.text=sM(t.x,e,i,n)}function Lst(e,t,r,n,i){if(e.thetaunit===\"radians\"&&!r){var a=t.x/180;if(a===0)t.text=\"0\";else{var o=Pst(a);if(o[1]>=100)t.text=sM(Jo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text=\"\\u03C0\":t.text=o[0]+\"\\u03C0\":t.text=[\"<sup>\",o[0],\"</sup>\",\"\\u2044\",\"<sub>\",o[1],\"</sub>\",\"\\u03C0\"].join(\"\"),s&&(t.text=Cb+t.text)}}}else t.text=sM(t.x,e,i,n)}function Pst(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var Ist=[\"f\",\"p\",\"n\",\"\\u03BC\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ML(e){return e===\"SI\"||e===\"B\"}function dB(e){return e>14||e<-15}function sM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||\"B\",s=t._tickexponent,l=Qn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent===\"none\"?t.dtick:kh(e)&&Math.abs(e)||1,range:t.showexponent===\"none\"?t.range.map(t.r2d):[0,e||1]};Mse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Cb);var f=Math.pow(10,-a)/2;if(o===\"none\"&&(s=0),e=Math.abs(e),e<f)e=\"0\",i=!1;else{if(e+=f,s&&(e*=Math.pow(10,-s),a+=s),a===0)e=String(Math.floor(e));else if(a<0){e=String(Math.round(e)),e=e.substr(0,e.length+a);for(var h=a;h<0;h++)e+=\"0\"}else{e=String(e);var d=e.indexOf(\".\")+1;d&&(e=e.substr(0,d+a).replace(/\\.?0+$/,\"\"))}e=Jo.numSeparate(e,t._separators,u)}if(s&&o!==\"hide\"){ML(o)&&dB(s)&&(o=\"power\");var v;s<0?v=Cb+-s:o!==\"power\"?v=\"+\"+s:v=String(s),o===\"e\"||o===\"E\"?e+=o+v:o===\"power\"?e+=\"\\xD710<sup>\"+v+\"</sup>\":o===\"B\"&&s===9?e+=\"B\":ML(o)&&(e+=Ist[s/3+5])}return i?Cb+e:e}Qn.getTickFormat=function(e){var t;function r(l){return typeof l!=\"string\"?l:Number(l.replace(\"M\",\"\"))*R3}function n(l,u){var c=[\"L\",\"D\"];if(typeof l==typeof u){if(typeof l==\"number\")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,\"\"))-Number(u.replace(/(L|D)/g,\"\")):f-h}else return typeof l==\"number\"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!=\"number\"||f(h)<=f(l))&&(!d&&typeof d!=\"number\"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case\"date\":case\"linear\":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&i(e.dtick,s.dtickrange,r)){o=s;break}break}case\"log\":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&a(e.dtick,s.dtickrange)){o=s;break}break}default:}return o?o.value:e.tickformat};Qn.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=t?Qn.findSubplotsWithAxis(n,t):n;return i.sort(function(a,o){var s=a.substr(1).split(\"y\"),l=o.substr(1).split(\"y\");return s[0]===l[0]?+s[1]-+l[1]:+s[0]-+l[0]}),i};Qn.findSubplotsWithAxis=function(e,t){for(var r=new RegExp(t._id.charAt(0)===\"x\"?\"^\"+t._id+\"y\":t._id+\"$\"),n=[],i=0;i<e.length;i++){var a=e[i];r.test(a)&&n.push(a)}return n};Qn.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r={_offset:0,_length:t.width,_id:\"\"},n={_offset:0,_length:t.height,_id:\"\"},i=Qn.list(e,\"x\",!0),a=Qn.list(e,\"y\",!0),o=[],s,l;for(s=0;s<i.length;s++)for(o.push({x:i[s],y:n}),l=0;l<a.length;l++)s===0&&o.push({x:r,y:a[l]}),o.push({x:i[s],y:a[l]});var u=t._clips.selectAll(\".axesclip\").data(o,function(c){return c.x._id+c.y._id});u.enter().append(\"clipPath\").classed(\"axesclip\",!0).attr(\"id\",function(c){return\"clip\"+t._uid+c.x._id+c.y._id}).append(\"rect\"),u.exit().remove(),u.each(function(c){w0.select(this).select(\"rect\").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Qn.draw=function(e,t,r){var n=e._fullLayout;t===\"redraw\"&&n._paper.selectAll(\"g.subplot\").each(function(l){var u=l[0],c=n._plots[u];if(c){var f=c.xaxis,h=c.yaxis;c.xaxislayer.selectAll(\".\"+f._id+\"tick\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"tick\").remove(),c.xaxislayer.selectAll(\".\"+f._id+\"tick2\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"tick2\").remove(),c.xaxislayer.selectAll(\".\"+f._id+\"divider\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"divider\").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll(\"path\").remove(),c.gridlayer&&c.gridlayer.selectAll(\"path\").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll(\"path\").remove(),c.zerolinelayerAbove&&c.zerolinelayerAbove.selectAll(\"path\").remove(),n._infolayer.select(\".g-\"+f._id+\"title\").remove(),n._infolayer.select(\".g-\"+h._id+\"title\").remove()}});var i=!t||t===\"redraw\"?Qn.listIds(e):t,a=Qn.list(e),o=a.filter(function(l){return l.autoshift}).map(function(l){return l.overlaying});i.map(function(l){var u=Qn.getFromId(e,l);if(u.tickmode===\"sync\"&&u.overlaying){var c=i.findIndex(function(f){return f===u.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Jo.syncOrAsync(i.map(function(l){return function(){if(l){var u=Qn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Qn.drawOne(e,u,r);return u._shiftPusher&&fB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Jo.simpleMap(u._r,u.r2l),c}}}))};Qn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Qn.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer===\"above traces\";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor===\"free\"){var v=t.linewidth/2||0;t.ticks===\"inside\"&&(v+=t.ticklen),fB(t,v,n,!0),fB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=jst(t,n));var x=h[c+\"axislayer\"],b=t._mainLinePosition,p=b+=t._shift,C=t._mainMirrorPosition,E=t._vals=Qn.calcTicks(t),A=[t.mirror,p,C].join(\"_\");for(a=0;a<E.length;a++)E[a].axInfo=A;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var L={};function _(lt){var Gt=u+(lt||\"tick\");return L[Gt]||(L[Gt]=zst(t,Gt,p)),L[Gt]}if(t.visible){var k=Qn.makeTransTickFn(t),M=Qn.makeTransTickLabelFn(t),g,P,T=t.ticks===\"inside\",z=t.ticks===\"outside\";if(t.tickson===\"boundaries\"){var O=Rst(t,E);P=Qn.clipEnds(t,O),g=T?P:O}else P=Qn.clipEnds(t,E),g=T&&t.ticklabelmode!==\"period\"?P:E;var V=t._gridVals=P,G=Fst(t,E);if(!l._hasOnlyLargeSploms){var Z=t._subplotsWith,H={};for(a=0;a<Z.length;a++){o=Z[a],s=l._plots[o];var N=s[f+\"axis\"],j=N._mainAxis._id;if(!H[j]){H[j]=1;var re=c===\"x\"?\"M0,\"+N._offset+\"v\"+N._length:\"M\"+N._offset+\",0h\"+N._length;Qn.drawGrid(e,t,{vals:V,counterAxis:N,layer:s.gridlayer.select(\".\"+u),minorLayer:s.minorGridlayer.select(\".\"+u),path:re,transFn:k}),Qn.drawZeroLine(e,t,{counterAxis:N,layer:d?s.zerolinelayerAbove:s.zerolinelayer,path:re,transFn:k})}}}var oe,_e=Qn.getTickSigns(t),Me=Qn.getTickSigns(t,\"minor\");if(t.ticks||t.minor&&t.minor.ticks){var ke=Qn.makeTickPath(t,p,_e[2]),me=Qn.makeTickPath(t,p,Me[2],{minor:!0}),ie,Se,Le,Ae;if(t._anchorAxis&&t.mirror&&t.mirror!==!0?(ie=Qn.makeTickPath(t,C,_e[3]),Se=Qn.makeTickPath(t,C,Me[3],{minor:!0}),Le=ke+ie,Ae=me+Se):(ie=\"\",Se=\"\",Le=ke,Ae=me),t.showdividers&&z&&t.tickson===\"boundaries\"){var De={};for(a=0;a<G.length;a++)De[G[a].x]=1;oe=function(lt){return De[lt.x]?ie:Le}}else oe=function(lt){return lt.minor?Ae:Le}}if(Qn.drawTicks(e,t,{vals:g,layer:x,path:oe,transFn:k}),t.mirror===\"allticks\"){var Pe=Object.keys(t._linepositions||{});for(a=0;a<Pe.length;a++){o=Pe[a],s=l._plots[o];var ge=t._linepositions[o]||[],Fe=ge[0],ce=ge[1],Ze=ge[2],ct=Qn.makeTickPath(t,Fe,Ze?_e[0]:Me[0],{minor:Ze})+Qn.makeTickPath(t,ce,Ze?_e[1]:Me[1],{minor:Ze});Qn.drawTicks(e,t,{vals:g,layer:s[c+\"axislayer\"],path:ct,transFn:k})}}var pt=[];if(pt.push(function(){return Qn.drawLabels(e,t,{vals:E,layer:x,plotinfo:s,transFn:M,labelFns:Qn.makeLabelFns(t,p)})}),t.type===\"multicategory\"){var Wt={x:2,y:10}[c];pt.push(function(){var lt={x:\"height\",y:\"width\"}[c],Gt=_()[lt]+Wt+(t._tickAngles[u+\"tick\"]?t.tickfont.size*oM:0);return Qn.drawLabels(e,t,{vals:Dst(t,E),layer:x,cls:u+\"tick2\",repositionOnUpdate:!0,secondary:!0,transFn:k,labelFns:Qn.makeLabelFns(t,p+Gt*_e[4])})}),pt.push(function(){return t._depth=_e[4]*(_(\"tick2\")[t.side]-p),qst(e,t,{vals:G,layer:x,path:Qn.makeTickPath(t,p,_e[4],{len:t._depth}),transFn:k})})}else t.title.hasOwnProperty(\"standoff\")&&pt.push(function(){t._depth=_e[4]*(_()[t.side]-p)});var st=iM.getComponentMethod(\"rangeslider\",\"isVisible\")(t);return!r.skipTitle&&!(st&&t.side===\"bottom\")&&pt.push(function(){return Bst(e,t)}),pt.push(function(){var lt=t.side.charAt(0),Gt=hst[t.side].charAt(0),Nt=Qn.getPxPosition(e,t),$t=z?t.ticklen:0,sr,wr,ur,Qe;(t.automargin||st||t._shiftPusher)&&(t.type===\"multicategory\"?sr=_(\"tick2\"):(sr=_(),c===\"x\"&&lt===\"b\"&&(t._depth=Math.max(sr.width>0?sr.bottom-Nt:0,$t))));var Et=0,er=0;if(t._shiftPusher&&(Et=Math.max($t,sr.height>0?lt===\"l\"?Nt-sr.left:sr.right-Nt:0),t.title.text!==l._dfltTitle[c]&&(er=(t._titleStandoff||0)+(t._titleScoot||0),lt===\"l\"&&(er+=xse(t))),t._fullDepth=Math.max(Et,er)),t.automargin){wr={x:0,y:0,r:0,l:0,t:0,b:0};var Ut=[0,1],Ft=typeof t._shift==\"number\"?t._shift:0;if(c===\"x\"){if(lt===\"b\"?wr[lt]=t._depth:(wr[lt]=t._depth=Math.max(sr.width>0?Nt-sr.top:0,$t),Ut.reverse()),sr.width>0){var bt=sr.right-(t._offset+t._length);bt>0&&(wr.xr=1,wr.r=bt);var yt=t._offset-sr.left;yt>0&&(wr.xl=0,wr.l=yt)}}else if(lt===\"l\"?(t._depth=Math.max(sr.height>0?Nt-sr.left:0,$t),wr[lt]=t._depth-Ft):(t._depth=Math.max(sr.height>0?sr.right-Nt:0,$t),wr[lt]=t._depth+Ft,Ut.reverse()),sr.height>0){var Yt=sr.bottom-(t._offset+t._length);Yt>0&&(wr.yb=0,wr.b=Yt);var lr=t._offset-sr.top;lr>0&&(wr.yt=1,wr.t=lr)}wr[f]=t.anchor===\"free\"?t.position:t._anchorAxis.domain[Ut[0]],t.title.text!==l._dfltTitle[c]&&(wr[lt]+=xse(t)+(t.title.standoff||0)),t.mirror&&t.anchor!==\"free\"&&(ur={x:0,y:0,r:0,l:0,t:0,b:0},ur[Gt]=t.linewidth,t.mirror&&t.mirror!==!0&&(ur[Gt]+=$t),t.mirror===!0||t.mirror===\"ticks\"?ur[f]=t._anchorAxis.domain[Ut[1]]:(t.mirror===\"all\"||t.mirror===\"allticks\")&&(ur[f]=[t._counterDomainMin,t._counterDomainMax][Ut[1]]))}st&&(Qe=iM.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(e,t)),typeof t.automargin==\"string\"&&(_se(wr,t.automargin),_se(ur,t.automargin)),P3.autoMargin(e,vB(t),wr),P3.autoMargin(e,kse(t),ur),P3.autoMargin(e,Lse(t),Qe)}),Jo.syncOrAsync(pt)}};function _se(e,t){if(e){var r=Object.keys(hse).reduce(function(n,i){return t.indexOf(i)!==-1&&hse[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function Rst(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Jo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;n<t.length;n++)i(t[n],0);i(t[n-1],1)}return r}function Dst(e,t){for(var r=[],n={},i=0;i<t.length;i++){var a=t[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(Ese(e,Jo.interp(n[o],.5),o));return r}function Fst(e,t){var r=[],n,i,a=t.length&&t[t.length-1].x<t[0].x,o=function(l,u){var c=l.xbnd[u];c!==null&&r.push(Jo.extendFlat({},l,{x:c}))};if(e.showdividers&&t.length){for(n=0;n<t.length;n++){var s=t[n];s.text2!==i&&o(s,a?1:0),i=s.text2}o(t[n-1],a?0:1)}return r}function zst(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var l=cB(this);if(l.node().style.display!==\"none\"){var u=Xp.bBox(l.node().parentNode);n=Math.min(n,u.top),i=Math.max(i,u.bottom),a=Math.min(a,u.left),o=Math.max(o,u.right)}});else{var s=Qn.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}Qn.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:\"top\",y:\"right\"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i],o=t?(e.minor||{}).ticks:e.ticks;return o!==\"inside\"==(r===\"x\")&&(a=a.map(function(s){return-s})),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a};Qn.makeTransTickFn=function(e){return e._id.charAt(0)===\"x\"?function(t){return I3(e._offset+e.l2p(t.x),0)}:function(t){return I3(0,e._offset+e.l2p(t.x))}};Qn.makeTransTickLabelFn=function(e){var t=Ost(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf(\"inside\")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c===\"top\"||c===\"left\")||l&&(c===\"bottom\"||c===\"right\")?1:-1;n=n*f}return e._id.charAt(0)===\"x\"?function(h){return I3(i+e._offset+e.l2p(uB(h))+r,a+n)}:function(h){return I3(a+n,i+e._offset+e.l2p(uB(h))+r)}};function uB(e){return e.periodX!==void 0?e.periodX:e.x}function Ost(e){var t=e.ticklabelposition||\"\",r=e.tickson||\"\",n=function(v){return t.indexOf(v)!==-1},i=n(\"top\"),a=n(\"left\"),o=n(\"right\"),s=n(\"bottom\"),l=n(\"inside\"),u=r!==\"boundaries\"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=SL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*kb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=SL),l&&c===\"top\"&&(h-=d*(1-kb)),(a||i)&&(f=-f),(c===\"bottom\"||c===\"right\")&&(h=-h),[u?f:0,l?h:0]}Qn.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return\"\";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o===\"x\"?\"M0,\"+(t+s*r)+\"v\"+a*r:\"M\"+(t+s*r)+\",0h\"+a*r};Qn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||\"\",i=e.tickson||\"\",a=function(O){return n.indexOf(O)!==-1},o=a(\"top\"),s=a(\"left\"),l=a(\"right\"),u=a(\"bottom\"),c=i!==\"boundaries\"&&(u||s||o||l),f=a(\"inside\"),h=n===\"inside\"&&e.ticks===\"inside\"||!f&&e.ticks===\"outside\"&&i!==\"boundaries\",d=0,v=0,x=h?e.ticklen:0;if(f?x*=-1:c&&(x=0),h&&(d+=x,r)){var b=Jo.deg2rad(r);d=x*Math.cos(b)+1,v=x*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},C,E,A,L,_=0,k=e.side,M=e._id.charAt(0),g=e.tickangle,P;if(M===\"x\")P=!f&&k===\"bottom\"||f&&k===\"top\",L=P?1:-1,f&&(L*=-1),C=v*L,E=t+d*L,A=P?1:-.2,Math.abs(g)===90&&(f?A+=rM:g===-90&&k===\"bottom\"?A=kb:g===90&&k===\"top\"?A=rM:A=.5,_=rM/2*(g/90)),p.xFn=function(O){return O.dx+C+_*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*A},p.anchorFn=function(O,V){if(c){if(s)return\"end\";if(l)return\"start\"}return!kh(V)||V===0||V===180?\"middle\":V*L<0!==f?\"end\":\"start\"},p.heightFn=function(O,V,G){return V<-60||V>60?-.5*G:e.side===\"top\"!==f?-G:0};else if(M===\"y\"){if(P=!f&&k===\"left\"||f&&k===\"right\",L=P?1:-1,f&&(L*=-1),C=d,E=v*L,A=0,!f&&Math.abs(g)===90&&(g===-90&&k===\"left\"||g===90&&k===\"right\"?A=kb:A=.5),f){var T=kh(g)?+g:0;if(T!==0){var z=Jo.deg2rad(T);_=Math.abs(Math.sin(z))*kb*L,A=0}}p.xFn=function(O){return O.dx+t-(C+O.fontSize*A)*L+_*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*rM},p.anchorFn=function(O,V){return kh(V)&&Math.abs(V)===90?\"middle\":P?\"end\":\"start\"},p.heightFn=function(O,V,G){return e.side===\"right\"&&(V*=-1),V<-30?-G:V<30?-.5*G:0}}return p};function kL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join(\"_\")}Qn.drawTicks=function(e,t,r){r=r||{};var n=t._id+\"tick\",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll(\"path.\"+n).data(i,kL);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",r.crisp!==!1).each(function(o){return nM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style(\"stroke-width\",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+\"px\"}).attr(\"d\",r.path).style(\"display\",null),LL(t,[bse]),a.attr(\"transform\",r.transFn)};Qn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!==\"sync\"){var n=t._id+\"grid\",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&Qn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode===\"array\",u=0;u<o.length;u++){var c=o[u].x;if(l?!c:Math.abs(c)<t.dtick/100)if(o=o.slice(0,u).concat(o.slice(u+1)),l)u--;else break}t._gw=Xp.crispRound(e,t.gridwidth,1);for(var f=i?Xp.crispRound(e,t.minor.gridwidth,1):0,h=r.layer,d=r.minorLayer,v=1;v>=0;v--){var x=v?h:d;if(x){var b=x.selectAll(\"path.\"+n).data(v?o:a,kL);b.exit().remove(),b.enter().append(\"path\").classed(n,1).classed(\"crisp\",r.crisp!==!1),b.attr(\"transform\",r.transFn).attr(\"d\",r.path).each(function(p){return nM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||\"#ddd\")}).style(\"stroke-dasharray\",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style(\"stroke-width\",function(p){return(p.minor?f:t._gw)+\"px\"}).style(\"display\",null),typeof r.path==\"function\"&&b.attr(\"d\",r.path)}}LL(t,[sB,lB])}};Qn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+\"zl\",i=Qn.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll(\"path.\"+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"zl\",1).classed(\"crisp\",r.crisp!==!1).each(function(){r.layer.selectAll(\"path\").sort(function(o,s){return vst(o.id,s.id)})}),a.attr(\"transform\",r.transFn).attr(\"d\",r.path).call(nM.stroke,t.zerolinecolor||nM.defaultLine).style(\"stroke-width\",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+\"px\").style(\"display\",null),LL(t,[oB])};Qn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer===\"above traces\",o=r.cls||i+\"tick\",s=r.vals.filter(function(j){return j.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll(\"g.\"+o).data(t.showticklabels?s:[],kL),h=[];f.enter().append(\"g\").classed(o,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(j){var re=w0.select(this),oe=e._promises.length;re.call(Eb.positionText,l.xFn(j),l.yFn(j)).call(Xp.font,{family:j.font,size:j.fontSize,color:j.fontColor,weight:j.fontWeight,style:j.fontStyle,variant:j.fontVariant,textcase:j.fontTextcase,lineposition:j.fontLineposition,shadow:j.fontShadow}).text(j.text).call(Eb.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(re,u)})):d(re,u)}),LL(t,[fse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(j){w0.select(this).select(\"text\").call(Eb.positionText,l.xFn(j),l.yFn(j))});function d(j,re){j.each(function(oe){var _e=w0.select(this),Me=_e.select(\".text-math-group\"),ke=l.anchorFn(oe,re),me=r.transFn.call(_e.node(),oe)+(kh(re)&&+re!=0?\" rotate(\"+re+\",\"+l.xFn(oe)+\",\"+(l.yFn(oe)-oe.fontSize/2)+\")\":\"\"),ie=Eb.lineCount(_e),Se=oM*oe.fontSize,Le=l.heightFn(oe,kh(re)?+re:0,(ie-1)*Se);if(Le&&(me+=I3(0,Le)),Me.empty()){var Ae=_e.select(\"text\");Ae.attr({transform:me,\"text-anchor\":ke}),Ae.style(\"display\",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var De=Xp.bBox(Me.node()).width,Pe=De*{end:-.5,start:.5}[ke];Me.attr(\"transform\",me+I3(Pe,0))}})}t._adjustTickLabelsOverflow=function(){var j=t.ticklabeloverflow;if(!(!j||j===\"allow\")){var re=j.indexOf(\"hide\")!==-1,oe=t._id.charAt(0)===\"x\",_e=0,Me=oe?e._fullLayout.width:e._fullLayout.height;if(j.indexOf(\"domain\")!==-1){var ke=Jo.simpleMap(t.range,t.r2l);_e=t.l2p(ke[0])+t._offset,Me=t.l2p(ke[1])+t._offset}var me=Math.min(_e,Me),ie=Math.max(_e,Me),Se=t.side,Le=1/0,Ae=-1/0;f.each(function(Fe){var ce=w0.select(this),Ze=ce.select(\".text-math-group\");if(Ze.empty()){var ct=Xp.bBox(ce.node()),pt=0;oe?(ct.right>ie||ct.left<me)&&(pt=1):(ct.bottom>ie||ct.top+(t.tickangle?0:Fe.fontSize/4)<me)&&(pt=1);var Wt=ce.select(\"text\");pt?re&&Wt.style(\"display\",\"none\"):Wt.node().style.display!==\"none\"&&(Wt.style(\"display\",null),Se===\"bottom\"||Se===\"right\"?Le=Math.min(Le,oe?ct.top:ct.left):Le=-1/0,Se===\"top\"||Se===\"left\"?Ae=Math.max(Ae,oe?ct.bottom:ct.right):Ae=1/0)}});for(var De in n._plots){var Pe=n._plots[De];if(!(t._id!==Pe.xaxis._id&&t._id!==Pe.yaxis._id)){var ge=oe?Pe.yaxis:Pe.xaxis;ge&&(ge[\"_visibleLabelMin_\"+t._id]=Le,ge[\"_visibleLabelMax_\"+t._id]=Ae)}}}},t._hideCounterAxisInsideTickLabels=function(j){var re=t._id.charAt(0)===\"x\",oe=[];for(var _e in n._plots){var Me=n._plots[_e];t._id!==Me.xaxis._id&&t._id!==Me.yaxis._id||oe.push(re?Me.yaxis:Me.xaxis)}oe.forEach(function(ke,me){ke&&lM(ke)&&(j||[oB,lB,sB,bse,fse]).forEach(function(ie){var Se=ie.K===\"tick\"&&ie.L===\"text\"&&t.ticklabelmode===\"period\",Le=n._plots[t._mainSubplot],Ae;if(ie.K===oB.K){var De=a?Le.zerolinelayerAbove:Le.zerolinelayer;Ae=De.selectAll(\".\"+t._id+\"zl\")}else ie.K===lB.K?Ae=Le.minorGridlayer.selectAll(\".\"+t._id):ie.K===sB.K?Ae=Le.gridlayer.selectAll(\".\"+t._id):Ae=Le[t._id.charAt(0)+\"axislayer\"];Ae.each(function(){var Pe=w0.select(this);ie.L&&(Pe=Pe.selectAll(ie.L)),Pe.each(function(ge){var Fe=t.l2p(Se?uB(ge):ge.x)+t._offset,ce=w0.select(this);Fe<t[\"_visibleLabelMax_\"+ke._id]&&Fe>t[\"_visibleLabelMin_\"+ke._id]?ce.style(\"display\",\"none\"):ie.K===\"tick\"&&!me&&ce.node().style.display!==\"none\"&&ce.style(\"display\",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var x=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!==\"log\"||String(t.dtick).charAt(0)!==\"D\")){x=t.autotickangles[0];var j=0,re=[],oe,_e=1;f.each(function(wr){j=Math.max(j,wr.fontSize);var ur=t.l2p(wr.x),Qe=cB(this),Et=Xp.bBox(Qe.node());_e=Math.max(_e,Eb.lineCount(Qe)),re.push({top:0,bottom:10,height:10,left:ur-Et.width/2,right:ur+Et.width/2+2,width:Et.width+2})});var Me=(t.tickson===\"boundaries\"||t.showdividers)&&!r.secondary,ke=s.length,me=Math.abs((s[ke-1].x-s[0].x)*t._m)/(ke-1),ie=Me?me/2:me,Se=Me?t.ticklen:j*1.25*_e,Le=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),Ae=ie/Le,De=t.autotickangles.map(function(wr){return wr*Math.PI/180}),Pe=De.find(function(wr){return Math.abs(Math.cos(wr))<=Ae});Pe===void 0&&(Pe=De.reduce(function(wr,ur){return Math.abs(Math.cos(wr))<Math.abs(Math.cos(ur))?wr:ur},De[0]));var ge=Pe*(180/Math.PI);if(Me){var Fe=2;for(t.ticks&&(Fe+=t.tickwidth/2),oe=0;oe<re.length;oe++){var ce=s[oe].xbnd,Ze=re[oe];if(ce[0]!==null&&Ze.left-t.l2p(ce[0])<Fe||ce[1]!==null&&t.l2p(ce[1])-Ze.right<Fe){x=ge;break}}}else{var ct=t.ticklabelposition||\"\",pt=t.tickson||\"\",Wt=function(wr){return ct.indexOf(wr)!==-1},st=Wt(\"top\"),lt=Wt(\"left\"),Gt=Wt(\"right\"),Nt=Wt(\"bottom\"),$t=pt!==\"boundaries\"&&(Nt||lt||st||Gt),sr=$t?(t.tickwidth||0)+2*SL:0;for(oe=0;oe<re.length-1;oe++)if(Jo.bBoxIntersect(re[oe],re[oe+1],sr)){x=ge;break}}x&&d(f,x)}}t._selections&&(t._selections[o]=f);var p=[v];t.automargin&&n._redrawFromAutoMarginCount&&c===90?(x=c,p.push(function(){d(f,c)})):p.push(b),t._tickAngles&&p.push(function(){t._tickAngles[o]=x===null?kh(u)?u:0:x});var C=function(){var j=0,re=0;return f.each(function(oe,_e){var Me=cB(this),ke=Me.select(\".text-math-group\");if(ke.empty()){var me;t._vals[_e]&&(me=t._vals[_e].bb||Xp.bBox(Me.node()),t._vals[_e].bb=me),j=Math.max(j,me.width),re=Math.max(re,me.height)}}),{labelsMaxW:j,labelsMaxH:re}},E=t._anchorAxis;if(E&&(E.autorange||E.insiderange)&&lM(t)&&!pst(n,t._id)&&(n._insideTickLabelsUpdaterange||(n._insideTickLabelsUpdaterange={}),E.autorange&&(n._insideTickLabelsUpdaterange[E._name+\".autorange\"]=E.autorange,p.push(C)),E.insiderange)){var A=C(),L=t._id.charAt(0)===\"y\"?A.labelsMaxW:A.labelsMaxH;L+=2*SL,t.ticklabelposition===\"inside\"&&(L+=t.ticklen||0);var _=t.side===\"right\"||t.side===\"top\"?1:-1,k=_===1?1:0,M=_===1?0:1,g=[];g[M]=E.range[M];var P=E.range,T=E.r2p(P[k]),z=E.r2p(P[M]),O=n._insideTickLabelsUpdaterange[E._name+\".range\"];if(O){var V=E.r2p(O[k]),G=E.r2p(O[M]),Z=_*(t._id.charAt(0)===\"y\"?1:-1);Z*T<Z*V&&(T=V,g[k]=P[k]=O[k]),Z*z>Z*G&&(z=G,g[M]=P[M]=O[M])}var H=Math.abs(z-T);H-L>0?(H-=L,L*=1+L/H):L=0,t._id.charAt(0)!==\"y\"&&(L=-L),g[k]=E.p2r(E.r2p(P[k])+_*L),E.autorange===\"min\"||E.autorange===\"max reversed\"?(g[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange===\"max\"||E.autorange===\"min reversed\")&&(g[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+\".range\"]=g}var N=Jo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function qst(e,t,r){var n=t._id+\"divider\",i=r.vals,a=r.layer.selectAll(\"path.\"+n).data(i,kL);a.exit().remove(),a.enter().insert(\"path\",\":first-child\").classed(n,1).classed(\"crisp\",1).call(nM.stroke,t.dividercolor).style(\"stroke-width\",Xp.crispRound(e,t.dividerwidth,1)+\"px\"),a.attr(\"transform\",r.transFn).attr(\"d\",r.path)}Qn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!==\"free\"?a=t._anchorAxis:n===\"x\"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n===\"y\"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i===\"top\"||i===\"left\")return a._offset;if(i===\"bottom\"||i===\"right\")return a._offset+a._length};function xse(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty(\"standoff\")?t*(kb+r*oM):r?t*(r+1)*oM:t}function Bst(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty(\"standoff\"))t.side===\"bottom\"||t.side===\"right\"?o=t._depth+t.title.standoff+a*kb:(t.side===\"top\"||t.side===\"left\")&&(o=t._depth+t.title.standoff+a*(rM+s*oM));else{var l=lM(t);if(t.type===\"multicategory\")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks===\"outside\"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i===\"x\"?o+=t.side===\"top\"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side===\"right\"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Qn.getPxPosition(e,t),f,h,d;i===\"x\"?(h=t._offset+t._length/2,d=t.side===\"top\"?c-o:c+o):(d=t._offset+t._length/2,h=t.side===\"right\"?c+o:c-o,f={rotate:\"-90\",offset:0});var v;if(t.type!==\"multicategory\"){var x=t._selections[t._id+\"tick\"];if(v={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xp.getTranslate(x.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty(\"standoff\")&&(v.pad=0)}return t._titleStandoff=o,ast.draw(e,n+\"title\",{propContainer:t,propName:t._name+\".title.text\",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,\"text-anchor\":\"middle\"}})}Qn.shouldShowZeroLine=function(e,t,r){var n=Jo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type===\"linear\"||t.type===\"-\")&&!(t.rangebreaks&&t.maskBreaks(0)===EL)&&(Cse(t,0)||!Nst(e,t,r,n)||Ust(e,t))};Qn.clipEnds=function(e,t){return t.filter(function(r){return Cse(e,r.x)})};function Cse(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function Nst(e,t,r,n){var i=r._mainAxis;if(!i)return;var a=e._fullLayout,o=t._id.charAt(0),s=Qn.counterLetter(t._id),l=t._offset+(Math.abs(n[0])<Math.abs(n[1])==(o===\"x\")?0:t._length);function u(v){if(!v.showline||!v.linewidth)return!1;var x=Math.max((v.linewidth+t.zerolinewidth)/2,1);function b(E){return typeof E==\"number\"&&Math.abs(E-l)<x}if(b(v._mainLinePosition)||b(v._mainMirrorPosition))return!0;var p=v._linepositions||{};for(var C in p)if(b(p[C][0])||b(p[C][1]))return!0}var c=a._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return u(r,l);for(var f=Qn.list(e,s),h=0;h<f.length;h++){var d=f[h];if(d._mainAxis===i&&u(d,l))return!0}}function Ust(e,t){for(var r=e._fullData,n=t._mainSubplot,i=t._id.charAt(0),a=0;a<r.length;a++){var o=r[a];if(o.visible===!0&&o.xaxis+o.yaxis===n&&(iM.traceIs(o,\"bar-like\")&&o.orientation==={x:\"h\",y:\"v\"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function cB(e){var t=w0.select(e),r=t.select(\".text-math-group\");return r.empty()?t.select(\"text\"):r}Qn.allowAutoMargin=function(e){for(var t=Qn.list(e,\"\",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(P3.allowAutoMargin(e,vB(n)),n.mirror&&P3.allowAutoMargin(e,kse(n))),iM.getComponentMethod(\"rangeslider\",\"isVisible\")(n)&&P3.allowAutoMargin(e,Lse(n))}};function vB(e){return e._id+\".automargin\"}function kse(e){return vB(e)+\".mirror\"}function Lse(e){return e._id+\".rangeslider\"}Qn.swap=function(e,t){for(var r=Vst(e,t),n=0;n<r.length;n++)Gst(e,r[n].x,r[n].y)};function Vst(e,t){var r=[],n,i;for(n=0;n<t.length;n++){var a=[],o=e._fullData[t[n]].xaxis,s=e._fullData[t[n]].yaxis;if(!(!o||!s)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(s)!==-1)&&a.push(i);if(!a.length){r.push({x:[o],y:[s]});continue}var l=r[a[0]],u;if(a.length>1)for(i=1;i<a.length;i++)u=r[a[i]],_L(l.x,u.x),_L(l.y,u.y);_L(l.x,[o]),_L(l.y,[s])}}return r}function _L(e,t){for(var r=0;r<t.length;r++)e.indexOf(t[r])===-1&&e.push(t[r])}function Gst(e,t,r){var n=[],i=[],a=e.layout,o,s;for(o=0;o<t.length;o++)n.push(Qn.getFromId(e,t[o]));for(o=0;o<r.length;o++)i.push(Qn.getFromId(e,r[o]));var l=Object.keys(ost),u=[\"anchor\",\"domain\",\"overlaying\",\"position\",\"side\",\"tickangle\",\"editType\"],c=[\"linear\",\"log\"];for(o=0;o<l.length;o++){var f=l[o],h=n[0][f],d=i[0][f],v=!0,x=!1,b=!1;if(!(f.charAt(0)===\"_\"||typeof h==\"function\"||u.indexOf(f)!==-1)){for(s=1;s<n.length&&v;s++){var p=n[s][f];f===\"type\"&&c.indexOf(h)!==-1&&c.indexOf(p)!==-1&&h!==p?x=!0:p!==h&&(v=!1)}for(s=1;s<i.length&&v;s++){var C=i[s][f];f===\"type\"&&c.indexOf(d)!==-1&&c.indexOf(C)!==-1&&d!==C?b=!0:i[s][f]!==d&&(v=!1)}v&&(x&&(a[n[0]._name].type=\"linear\"),b&&(a[i[0]._name].type=\"linear\"),Hst(a,f,n,i,e._fullLayout._dfltTitle))}}for(o=0;o<e._fullLayout.annotations.length;o++){var E=e._fullLayout.annotations[o];t.indexOf(E.xref)!==-1&&r.indexOf(E.yref)!==-1&&Jo.swapAttrs(a.annotations[o],[\"?\"])}}function Hst(e,t,r,n,i){var a=Jo.nestedProperty,o=a(e[r[0]._name],t).get(),s=a(e[n[0]._name],t).get(),l;for(t===\"title\"&&(o&&o.text===i.x&&(o.text=i.y),s&&s.text===i.y&&(s.text=i.x)),l=0;l<r.length;l++)a(e,r[l]._name+\".\"+t).set(s);for(l=0;l<n.length;l++)a(e,n[l]._name+\".\"+t).set(o)}function pB(e){return e._id===\"angularaxis\"}function nB(e,t){for(var r=t._rangebreaks.length,n=0;n<r;n++){var i=t._rangebreaks[n];if(e>=i.min&&e<i.max)return i.max}return e}function lM(e){return(e.ticklabelposition||\"\").indexOf(\"inside\")!==-1}function LL(e,t){lM(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function fB(e,t,r,n){var i=e.anchor!==\"free\"&&(e.overlaying===void 0||e.overlaying===!1)?e._id:e.overlaying,a;n?a=e.side===\"right\"?t:-t:a=t,i in r||(r[i]={}),e.side in r[i]||(r[i][e.side]=0),r[i][e.side]+=a}function jst(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}function Wst(e,t){return/%f/.test(t)?e>=fst:/%L/.test(t)?e>=cst:/%[SX]/.test(t)?e>=AL:/%M/.test(t)?e>=aM:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=zv:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=TL:/%[q]/.test(t)?e>=wL:/%[Yy]/.test(t)?e>=bL:!0}});var gB=ye((Zir,Ise)=>{\"use strict\";Ise.exports=function(t,r,n){var i,a;if(n){var o=r===\"reversed\"||r===\"min reversed\"||r===\"max reversed\";i=n[o?1:0],a=n[o?0:1]}var s=t(\"autorangeoptions.minallowed\",a===null?i:void 0),l=t(\"autorangeoptions.maxallowed\",i===null?a:void 0);s===void 0&&t(\"autorangeoptions.clipmin\"),l===void 0&&t(\"autorangeoptions.clipmax\"),t(\"autorangeoptions.include\")}});var mB=ye((Yir,Rse)=>{\"use strict\";var Xst=gB();Rse.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||\"-\";n(\"minallowed\"),n(\"maxallowed\");var s=n(\"range\");if(!s){var l;!i.noInsiderange&&o!==\"log\"&&(l=n(\"insiderange\"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n(\"range\",l)))}var u=r.getAutorangeDflt(s,i),c=n(\"autorange\",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c===\"reversed\"||c===!0)||s[0]!==null&&(c===\"min\"||c===\"max reversed\")||s[1]!==null&&(c===\"max\"||c===\"min reversed\"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n(\"autorange\",u)),c&&(Xst(n,c,s),(o===\"linear\"||o===\"-\")&&n(\"rangemode\")),r.cleanRange()}});var Fse=ye((Kir,Dse)=>{var Zst={left:0,top:0};Dse.exports=Yst;function Yst(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=Kst(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Kst(e){return e===window||e===document||e===document.body?Zst:e.getBoundingClientRect()}});var PL=ye((Jir,zse)=>{\"use strict\";var Jst=eq();function $st(){var e=!1;try{var t=Object.defineProperty({},\"passive\",{get:function(){e=!0}});window.addEventListener(\"test\",null,t),window.removeEventListener(\"test\",null,t)}catch(r){e=!1}return e}zse.exports=Jst&&$st()});var qse=ye(($ir,Ose)=>{\"use strict\";Ose.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a===\"left\"||a===\"bottom\"?o:a===\"center\"||a===\"middle\"?l:a===\"right\"||a===\"top\"?s:o<2/3-l?o:s>4/3-l?s:l}});var Use=ye((Qir,Nse)=>{\"use strict\";var Bse=Dr(),Qst=[[\"sw-resize\",\"s-resize\",\"se-resize\"],[\"w-resize\",\"move\",\"e-resize\"],[\"nw-resize\",\"n-resize\",\"ne-resize\"]];Nse.exports=function(t,r,n,i){return n===\"left\"?t=0:n===\"center\"?t=1:n===\"right\"?t=2:t=Bse.constrain(Math.floor(t*3),0,2),i===\"bottom\"?r=0:i===\"middle\"?r=1:i===\"top\"?r=2:r=Bse.constrain(Math.floor(r*3),0,2),Qst[r][t]}});var Gse=ye((enr,Vse)=>{\"use strict\";var elt=g3(),tlt=D6(),rlt=OS().getGraphDiv,ilt=RS(),yB=Vse.exports={};yB.wrapped=function(e,t,r){e=rlt(e),e._fullLayout&&tlt.clear(e._fullLayout._uid+ilt.HOVERID),yB.raw(e,t,r)};yB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&elt.triggerHandler(t,\"plotly_beforehover\",r)===!1)&&(n._hoverlayer.selectAll(\"g\").remove(),n._hoverlayer.selectAll(\"line\").remove(),n._hoverlayer.selectAll(\"circle\").remove(),t._hoverdata=void 0,r.target&&i&&t.emit(\"plotly_unhover\",{event:r,points:i}))}});var yv=ye((tnr,Xse)=>{\"use strict\";var nlt=Fse(),_B=rq(),alt=PL(),olt=Dr().removeElement,slt=hd(),Lb=Xse.exports={};Lb.align=qse();Lb.getCursor=Use();var jse=Gse();Lb.unhover=jse.wrapped;Lb.unhoverRaw=jse.raw;Lb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents=\"all\",a.onmousedown=b,alt?(a._ontouchstart&&a.removeEventListener(\"touchstart\",a._ontouchstart),a._ontouchstart=b,a.addEventListener(\"touchstart\",b,{passive:!1})):a.ontouchstart=b;function v(E,A,L){return Math.abs(E)<L&&(E=0),Math.abs(A)<L&&(A=0),[E,A]}var x=t.clampFn||v;function b(E){r._dragged=!1,r._dragging=!0;var A=Hse(E);o=A[0],s=A[1],h=E.target,f=E,d=E.buttons===2||E.ctrlKey,typeof E.clientX==\"undefined\"&&typeof E.clientY==\"undefined\"&&(E.clientX=o,E.clientY=s),l=new Date().getTime(),l-r._mouseDownTime<i?n+=1:(n=1,r._mouseDownTime=l),t.prepFn&&t.prepFn(E,o,s),_B&&!d?(c=Wse(),c.style.cursor=window.getComputedStyle(a).cursor):_B||(c=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(a).cursor),document.addEventListener(\"mouseup\",C),document.addEventListener(\"touchend\",C),t.dragmode!==!1&&(E.preventDefault(),document.addEventListener(\"mousemove\",p),document.addEventListener(\"touchmove\",p,{passive:!1}))}function p(E){E.preventDefault();var A=Hse(E),L=t.minDrag||slt.MINDRAG,_=x(A[0]-o,A[1]-s,L),k=_[0],M=_[1];(k||M)&&(r._dragged=!0,Lb.unhover(r,E)),r._dragged&&t.moveFn&&!d&&(r._dragdata={element:a,dx:k,dy:M},t.moveFn(k,M))}function C(E){if(delete r._dragdata,t.dragmode!==!1&&(E.preventDefault(),document.removeEventListener(\"mousemove\",p),document.removeEventListener(\"touchmove\",p)),document.removeEventListener(\"mouseup\",C),document.removeEventListener(\"touchend\",C),_B?olt(c):u&&(c.documentElement.style.cursor=u,u=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var A;f.target===h?A=f:(A={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var _=f[L];!A[L]&&typeof _!=\"function\"&&(A[L]=_)})),t.clickFn&&t.clickFn(n,A),d||h.dispatchEvent(new MouseEvent(\"click\",E))}r._dragging=!1,r._dragged=!1}};function Wse(){var e=document.createElement(\"div\");e.className=\"dragcover\";var t=e.style;return t.position=\"fixed\",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background=\"none\",document.body.appendChild(e),e}Lb.coverSlip=Wse;function Hse(e){return nlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Tg=ye((rnr,Zse)=>{\"use strict\";Zse.exports=function(t,r){(t.attr(\"class\")||\"\").split(\" \").forEach(function(n){n.indexOf(\"cursor-\")===0&&t.classed(n,!1)}),r&&t.classed(\"cursor-\"+r,!0)}});var Jse=ye((inr,Kse)=>{\"use strict\";var xB=Tg(),uM=\"data-savedcursor\",Yse=\"!!\";Kse.exports=function(t,r){var n=t.attr(uM);if(r){if(!n){for(var i=(t.attr(\"class\")||\"\").split(\" \"),a=0;a<i.length;a++){var o=i[a];o.indexOf(\"cursor-\")===0&&t.attr(uM,o.substr(7)).classed(o,!1)}t.attr(uM)||t.attr(uM,Yse)}xB(t,r)}else n&&(t.attr(uM,null),n===Yse?xB(t):xB(t,n))}});var wB=ye((nnr,$se)=>{\"use strict\";var bB=ec(),llt=Eh();$se.exports={_isSubplotObj:!0,visible:{valType:\"boolean\",dflt:!0,editType:\"legend\"},bgcolor:{valType:\"color\",editType:\"legend\"},bordercolor:{valType:\"color\",dflt:llt.defaultLine,editType:\"legend\"},maxheight:{valType:\"number\",min:0,editType:\"legend\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"legend\"},font:bB({editType:\"legend\"}),grouptitlefont:bB({editType:\"legend\"}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"v\",editType:\"legend\"},traceorder:{valType:\"flaglist\",flags:[\"reversed\",\"grouped\"],extras:[\"normal\"],editType:\"legend\"},tracegroupgap:{valType:\"number\",min:0,dflt:10,editType:\"legend\"},entrywidth:{valType:\"number\",min:0,editType:\"legend\"},entrywidthmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\",editType:\"legend\"},indentation:{valType:\"number\",min:-15,dflt:0,editType:\"legend\"},itemsizing:{valType:\"enumerated\",values:[\"trace\",\"constant\"],dflt:\"trace\",editType:\"legend\"},itemwidth:{valType:\"number\",min:30,dflt:30,editType:\"legend\"},itemclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggle\",editType:\"legend\"},itemdoubleclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggleothers\",editType:\"legend\"},groupclick:{valType:\"enumerated\",values:[\"toggleitem\",\"togglegroup\"],dflt:\"togglegroup\",editType:\"legend\"},x:{valType:\"number\",editType:\"legend\"},xref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"legend\"},y:{valType:\"number\",editType:\"legend\"},yref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"legend\"},uirevision:{valType:\"any\",editType:\"none\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"legend\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"legend\"},font:bB({editType:\"legend\"}),side:{valType:\"enumerated\",values:[\"top\",\"left\",\"top left\",\"top center\",\"top right\"],editType:\"legend\"},editType:\"legend\"},editType:\"legend\"}});var RL=ye(IL=>{\"use strict\";IL.isGrouped=function(t){return(t.traceorder||\"\").indexOf(\"grouped\")!==-1};IL.isVertical=function(t){return t.orientation!==\"h\"};IL.isReversed=function(t){return(t.traceorder||\"\").indexOf(\"reversed\")!==-1}});var SB=ye((onr,Qse)=>{\"use strict\";var TB=qa(),Yp=Dr(),ult=pl(),clt=Gl(),flt=wB(),hlt=s3(),AB=RL();function dlt(e,t,r,n){var i=t[e]||{},a=ult.newContainer(r,e);function o(H,N){return Yp.coerce(i,a,flt,H,N)}var s=Yp.coerceFont(o,\"font\",r.font);o(\"bgcolor\",r.paper_bgcolor),o(\"bordercolor\");var l=o(\"visible\");if(l){for(var u,c=function(H,N){var j=u._input,re=u;return Yp.coerce(j,re,clt,H,N)},f=r.font||{},h=Yp.coerceFont(o,\"grouptitlefont\",f,{overrideDflt:{size:Math.round(f.size*1.1)}}),d=0,v=!1,x=\"normal\",b=(r.shapes||[]).filter(function(H){return H.showlegend}),p=n.concat(b).filter(function(H){return e===(H.legend||\"legend\")}),C=0;C<p.length;C++)if(u=p[C],!!u.visible){var E=u._isShape;(u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&u._module.attributes.showlegend.dflt===!1))&&(d++,u.showlegend&&(v=!0,(!E&&TB.traceIs(u,\"pie-like\")||u._input.showlegend===!0)&&d++),Yp.coerceFont(c,\"legendgrouptitle.font\",h)),(!E&&TB.traceIs(u,\"bar\")&&r.barmode===\"stack\"||[\"tonextx\",\"tonexty\"].indexOf(u.fill)!==-1)&&(x=AB.isGrouped({traceorder:x})?\"grouped+reversed\":\"reversed\"),u.legendgroup!==void 0&&u.legendgroup!==\"\"&&(x=AB.isReversed({traceorder:x})?\"reversed+grouped\":\"grouped\")}var A=Yp.coerce(t,r,hlt,\"showlegend\",v&&d>(e===\"legend\"?1:0));if(A===!1&&(r[e]=void 0),!(A===!1&&!i.uirevision)&&(o(\"uirevision\",r.uirevision),A!==!1)){o(\"borderwidth\");var L=o(\"orientation\"),_=o(\"yref\"),k=o(\"xref\"),M=L===\"h\",g=_===\"paper\",P=k===\"paper\",T,z,O,V=\"left\";M?(T=0,TB.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?g?(z=1.1,O=\"bottom\"):(z=1,O=\"top\"):g?(z=-.1,O=\"top\"):(z=0,O=\"bottom\")):(z=1,O=\"auto\",P?T=1.02:(T=1,V=\"right\")),Yp.coerce(i,a,{x:{valType:\"number\",editType:\"legend\",min:P?-2:0,max:P?3:1,dflt:T}},\"x\"),Yp.coerce(i,a,{y:{valType:\"number\",editType:\"legend\",min:g?-2:0,max:g?3:1,dflt:z}},\"y\"),o(\"traceorder\",x),AB.isGrouped(r[e])&&o(\"tracegroupgap\"),o(\"entrywidth\"),o(\"entrywidthmode\"),o(\"indentation\"),o(\"itemsizing\"),o(\"itemwidth\"),o(\"itemclick\"),o(\"itemdoubleclick\"),o(\"groupclick\"),o(\"xanchor\",V),o(\"yanchor\",O),o(\"maxheight\"),o(\"valign\"),Yp.noneOrAll(i,a,[\"x\",\"y\"]);var G=o(\"title.text\");if(G){o(\"title.side\",M?\"left\":\"top\");var Z=Yp.extendFlat({},s,{size:Yp.bigFont(s.size)});Yp.coerceFont(o,\"title.font\",Z)}}}}Qse.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i<o.length;i++){var s=o[i];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=[\"legend\"];for(i=0;i<a.length;i++)Yp.pushUnique(u,a[i].legend);for(r._legends=[],i=0;i<u.length;i++){var c=u[i];dlt(c,t,r,a),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}}});var tle=ye((snr,ele)=>{\"use strict\";var D3=qa(),EB=Dr(),vlt=EB.pushUnique,MB=!0;ele.exports=function(t,r,n){var i=r._fullLayout;if(r._dragged||r._editing)return;var a=i.legend.itemclick,o=i.legend.itemdoubleclick,s=i.legend.groupclick;n===1&&a===\"toggle\"&&o===\"toggleothers\"&&MB&&r.data&&r._context.showTips&&EB.notifier(EB._(r,\"Double-click on legend to isolate one trace\"),\"long\"),MB=!1;var l;if(n===1?l=a:n===2&&(l=o),!l)return;var u=s===\"togglegroup\",c=i.hiddenlabels?i.hiddenlabels.slice():[],f=t.data()[0][0];if(f.groupTitle&&f.noClick)return;var h=r._fullData,d=(i.shapes||[]).filter(function(Gt){return Gt.showlegend}),v=h.concat(d),x=f.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,p,C,E,A,L,_,k={},M=[],g=[],P=[];function T(Gt,Nt){var $t=M.indexOf(Gt),sr=k.visible;return sr||(sr=k.visible=[]),M.indexOf(Gt)===-1&&(M.push(Gt),$t=M.length-1),sr[$t]=Nt,$t}var z=(i.shapes||[]).map(function(Gt){return Gt._input}),O=!1;function V(Gt,Nt){z[Gt].visible=Nt,O=!0}function G(Gt,Nt){if(!(f.groupTitle&&!u)){var $t=Gt._fullInput||Gt,sr=$t._isShape,wr=$t.index;wr===void 0&&(wr=$t._index);var ur=$t.visible===!1?!1:Nt;sr?V(wr,ur):T(wr,ur)}}var Z=x.legend,H=x._fullInput,N=H&&H._isShape;if(!N&&D3.traceIs(x,\"pie-like\")){var j=f.label,re=c.indexOf(j);if(l===\"toggle\")re===-1?c.push(j):c.splice(re,1);else if(l===\"toggleothers\"){var oe=re!==-1,_e=[];for(p=0;p<r.calcdata.length;p++){var Me=r.calcdata[p];for(C=0;C<Me.length;C++){var ke=Me[C],me=ke.label;Z===Me[0].trace.legend&&j!==me&&(c.indexOf(me)===-1&&(oe=!0),vlt(c,me),_e.push(me))}}if(!oe)for(var ie=0;ie<_e.length;ie++){var Se=c.indexOf(_e[ie]);Se!==-1&&c.splice(Se,1)}}D3.call(\"_guiRelayout\",r,\"hiddenlabels\",c)}else{var Le=b&&b.length,Ae=[],De;if(Le)for(p=0;p<v.length;p++)De=v[p],De.visible&&De.legendgroup===b&&Ae.push(p);if(l===\"toggle\"){var Pe;switch(x.visible){case!0:Pe=\"legendonly\";break;case!1:Pe=!1;break;case\"legendonly\":Pe=!0;break}if(Le)if(u)for(p=0;p<v.length;p++){var ge=v[p];ge.visible!==!1&&ge.legendgroup===b&&G(ge,Pe)}else G(x,Pe);else G(x,Pe)}else if(l===\"toggleothers\"){var Fe,ce,Ze,ct,pt,Wt=!0;for(p=0;p<v.length;p++)if(pt=v[p],Fe=pt===x,Ze=pt.showlegend!==!0,!(Fe||Ze)&&(ce=Le&&pt.legendgroup===b,!ce&&pt.legend===Z&&pt.visible===!0&&!D3.traceIs(pt,\"notLegendIsolatable\"))){Wt=!1;break}for(p=0;p<v.length;p++)if(pt=v[p],!(pt.visible===!1||pt.legend!==Z)&&!D3.traceIs(pt,\"notLegendIsolatable\"))switch(x.visible){case\"legendonly\":G(pt,!0);break;case!0:ct=Wt?!0:\"legendonly\",Fe=pt===x,Ze=pt.showlegend!==!0&&!pt.legendgroup,ce=Fe||Le&&pt.legendgroup===b,G(pt,ce||Ze?!0:ct);break}}for(p=0;p<g.length;p++)if(E=g[p],!!E){var st=E.constructUpdate(),lt=Object.keys(st);for(C=0;C<lt.length;C++)A=lt[C],_=k[A]=k[A]||[],_[P[p]]=st[A]}for(L=Object.keys(k),p=0;p<L.length;p++)for(A=L[p],C=0;C<M.length;C++)k[A].hasOwnProperty(C)||(k[A][C]=void 0);O?D3.call(\"_guiUpdate\",r,k,{shapes:z},M):D3.call(\"_guiRestyle\",r,k,M)}}});var CB=ye((lnr,rle)=>{\"use strict\";rle.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:\"#808BA4\",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var ale=ye((unr,nle)=>{\"use strict\";var ile=qa(),kB=RL();nle.exports=function(t,r,n){var i=r._inHover,a=kB.isGrouped(r),o=kB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function x(H,N,j){if(r.visible!==!1&&!(n&&H!==r._id))if(N===\"\"||!kB.isGrouped(r)){var re=\"~~i\"+f;l.push(re),s[re]=[j],f++}else l.indexOf(N)===-1?(l.push(N),u=!0,s[N]=[j]):s[N].push(j)}for(d=0;d<t.length;d++){var b=t[d],p=b[0],C=p.trace,E=C.legend,A=C.legendgroup;if(!(!i&&(!C.visible||!C.showlegend)))if(ile.traceIs(C,\"pie-like\"))for(c[A]||(c[A]={}),v=0;v<b.length;v++){var L=b[v].label;c[A][L]||(x(E,A,{label:L,color:b[v].color,i:b[v].i,trace:C,pts:b[v].pts}),c[A][L]=!0,h=Math.max(h,(L||\"\").length))}else x(E,A,p),h=Math.max(h,(C.name||\"\").length)}if(!l.length)return[];var _=!u||!a,k=[];for(d=0;d<l.length;d++){var M=s[l[d]];_?k.push(M[0]):k.push(M)}for(_&&(k=[k]),d=0;d<k.length;d++){var g=1/0;for(v=0;v<k[d].length;v++){var P=k[d][v].trace.legendrank;g>P&&(g=P)}k[d][0]._groupMinRank=g,k[d][0]._preGroupSort=d}var T=function(H,N){return H[0]._groupMinRank-N[0]._groupMinRank||H[0]._preGroupSort-N[0]._preGroupSort},z=function(H,N){return H.trace.legendrank-N.trace.legendrank||H._preSort-N._preSort};for(k.forEach(function(H,N){H[0]._preGroupSort=N}),k.sort(T),d=0;d<k.length;d++){k[d].forEach(function(H,N){H._preSort=N}),k[d].sort(z);var O=k[d][0].trace,V=null;for(v=0;v<k[d].length;v++){var G=k[d][v].trace.legendgrouptitle;if(G&&G.text){V=G,i&&(G.font=r._groupTitleFont);break}}if(o&&k[d].reverse(),V){var Z=!1;for(v=0;v<k[d].length;v++)if(ile.traceIs(k[d][v].trace,\"pie-like\")){Z=!0;break}k[d].unshift({i:-1,groupTitle:V,noClick:Z,trace:{showlegend:O.showlegend,legendgroup:O.legendgroup,visible:r.groupclick===\"toggleitem\"?!0:O.visible}})}for(v=0;v<k[d].length;v++)k[d][v]=[k[d][v]]}return r._lgroupsLength=k.length,r._maxNameLength=h,k}});var l_=ye(Pb=>{\"use strict\";var DL=Dr();function ole(e){return e.indexOf(\"e\")!==-1?e.replace(/[.]?0+e/,\"e\"):e.indexOf(\".\")!==-1?e.replace(/[.]?0+$/,\"\"):e}Pb.formatPiePercent=function(t,r){var n=ole((t*100).toPrecision(3));return DL.numSeparate(n,r)+\"%\"};Pb.formatPieValue=function(t,r){var n=ole(t.toPrecision(10));return DL.numSeparate(n,r)};Pb.getFirstFilled=function(t,r){if(DL.isArrayOrTypedArray(t))for(var n=0;n<r.length;n++){var i=t[r[n]];if(i||i===0||i===\"\")return i}};Pb.castOption=function(t,r){if(DL.isArrayOrTypedArray(t))return Pb.getFirstFilled(t,r);if(t)return t};Pb.getRotationAngle=function(e){return(e===\"auto\"?0:e)*Math.PI/180}});var lle=ye((fnr,sle)=>{\"use strict\";var plt=So(),glt=Ca();sle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?plt.pointStyle(t,n,i,r):glt.fill(t,r.color)}});var F3=ye((hnr,fle)=>{\"use strict\";var ule=Ca(),cle=l_().castOption,mlt=lle();fle.exports=function(t,r,n,i){var a=n.marker.line,o=cle(a.color,r.pts)||ule.defaultLine,s=cle(a.width,r.pts)||0;t.call(mlt,r,n,i).style(\"stroke-width\",s).call(ule.stroke,o)}});var RB=ye((dnr,mle)=>{\"use strict\";var Ov=Oa(),LB=qa(),_v=Dr(),hle=_v.strTranslate,Kp=So(),T0=Ca(),PB=pv().extractOpts,FL=Ru(),ylt=F3(),_lt=l_().castOption,xlt=CB(),dle=12,vle=5,Ib=2,blt=10,z3=5;mle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing===\"constant\",o=n.itemwidth,s=(o+xlt.itemGap*2)/2,l=hle(s,0),u=function(k,M,g,P){var T;if(k+1)T=k;else if(M&&M.width>0)T=M.width;else return 0;return a?P:Math.min(T,g)};t.each(function(k){var M=Ov.select(this),g=_v.ensureSingle(M,\"g\",\"layers\");g.style(\"opacity\",k[0].trace.opacity);var P=n.indentation,T=n.valign,z=k[0].lineHeight,O=k[0].height;if(T===\"middle\"&&P===0||!z||!O)g.attr(\"transform\",null);else{var V={top:1,bottom:-1}[T],G=V*(.5*(z-O+3))||0,Z=n.indentation;g.attr(\"transform\",hle(Z,G))}var H=g.selectAll(\"g.legendfill\").data([k]);H.enter().append(\"g\").classed(\"legendfill\",!0);var N=g.selectAll(\"g.legendlines\").data([k]);N.enter().append(\"g\").classed(\"legendlines\",!0);var j=g.selectAll(\"g.legendsymbols\").data([k]);j.enter().append(\"g\").classed(\"legendsymbols\",!0),j.selectAll(\"g.legendpoints\").data([k]).enter().append(\"g\").classed(\"legendpoints\",!0)}).each(_).each(h).each(v).each(d).each(b).each(A).each(E).each(c).each(f).each(p).each(C);function c(k){var M=ple(k),g=M.showFill,P=M.showLine,T=M.showGradientLine,z=M.showGradientFill,O=M.anyFill,V=M.anyLine,G=k[0],Z=G.trace,H,N,j=PB(Z),re=j.colorscale,oe=j.reversescale,_e=function(Ae){if(Ae.size())if(g)Kp.fillGroupStyle(Ae,r,!0);else{var De=\"legendfill-\"+Z.uid;Kp.gradient(Ae,r,De,IB(oe),re,\"fill\")}},Me=function(Ae){if(Ae.size()){var De=\"legendline-\"+Z.uid;Kp.lineGroupStyle(Ae),Kp.gradient(Ae,r,De,IB(oe),re,\"stroke\")}},ke=FL.hasMarkers(Z)||!O?\"M5,0\":V?\"M5,-2\":\"M5,-3\",me=Ov.select(this),ie=me.select(\".legendfill\").selectAll(\"path\").data(g||z?[k]:[]);if(ie.enter().append(\"path\").classed(\"js-fill\",!0),ie.exit().remove(),ie.attr(\"d\",ke+\"h\"+o+\"v6h-\"+o+\"z\").call(_e),P||T){var Se=u(void 0,Z.line,blt,vle);N=_v.minExtend(Z,{line:{width:Se}}),H=[_v.minExtend(G,{trace:N})]}var Le=me.select(\".legendlines\").selectAll(\"path\").data(P||T?[H]:[]);Le.enter().append(\"path\").classed(\"js-line\",!0),Le.exit().remove(),Le.attr(\"d\",ke+(T?\"l\"+o+\",0.0001\":\"h\"+o)).call(P?Kp.lineGroupStyle:Me)}function f(k){var M=ple(k),g=M.anyFill,P=M.anyLine,T=M.showLine,z=M.showMarker,O=k[0],V=O.trace,G=!z&&!P&&!g&&FL.hasText(V),Z,H;function N(ie,Se,Le,Ae){var De=_v.nestedProperty(V,ie).get(),Pe=_v.isArrayOrTypedArray(De)&&Se?Se(De):De;if(a&&Pe&&Ae!==void 0&&(Pe=Ae),Le){if(Pe<Le[0])return Le[0];if(Pe>Le[1])return Le[1]}return Pe}function j(ie){return O._distinct&&O.index&&ie[O.index]?ie[O.index]:ie[0]}if(z||G||T){var re={},oe={};if(z){re.mc=N(\"marker.color\",j),re.mx=N(\"marker.symbol\",j),re.mo=N(\"marker.opacity\",_v.mean,[.2,1]),re.mlc=N(\"marker.line.color\",j),re.mlw=N(\"marker.line.width\",_v.mean,[0,5],Ib),oe.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var _e=N(\"marker.size\",_v.mean,[2,16],dle);re.ms=_e,oe.marker.size=_e}T&&(oe.line={width:N(\"line.width\",j,[0,10],vle)}),G&&(re.tx=\"Aa\",re.tp=N(\"textposition\",j),re.ts=10,re.tc=N(\"textfont.color\",j),re.tf=N(\"textfont.family\",j),re.tw=N(\"textfont.weight\",j),re.ty=N(\"textfont.style\",j),re.tv=N(\"textfont.variant\",j),re.tC=N(\"textfont.textcase\",j),re.tE=N(\"textfont.lineposition\",j),re.tS=N(\"textfont.shadow\",j)),Z=[_v.minExtend(O,re)],H=_v.minExtend(V,oe),H.selectedpoints=null,H.texttemplate=null}var Me=Ov.select(this).select(\"g.legendpoints\"),ke=Me.selectAll(\"path.scatterpts\").data(z?Z:[]);ke.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",l),ke.exit().remove(),ke.call(Kp.pointStyle,H,r),z&&(Z[0].mrc=3);var me=Me.selectAll(\"g.pointtext\").data(G?Z:[]);me.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",l),me.exit().remove(),me.selectAll(\"text\").call(Kp.textPointStyle,H,r)}function h(k){var M=k[0].trace,g=M.type===\"waterfall\";if(k[0]._distinct&&g){var P=k[0].trace[k[0].dir].marker;return k[0].mc=P.color,k[0].mlw=P.line.width,k[0].mlc=P.line.color,x(k,this,\"waterfall\")}var T=[];M.visible&&g&&(T=k[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var z=Ov.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(T);z.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",l).style(\"stroke-miterlimit\",1),z.exit().remove(),z.each(function(O){var V=Ov.select(this),G=M[O[0]].marker,Z=u(void 0,G.line,z3,Ib);V.attr(\"d\",O[1]).style(\"stroke-width\",Z+\"px\").call(T0.fill,G.color),Z&&V.call(T0.stroke,G.line.color)})}function d(k){x(k,this)}function v(k){x(k,this,\"funnel\")}function x(k,M,g){var P=k[0].trace,T=P.marker||{},z=T.line||{},O=T.cornerradius?\"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z\":\"M6,6H-6V-6H6Z\",V=g?P.visible&&P.type===g:LB.traceIs(P,\"bar\"),G=Ov.select(M).select(\"g.legendpoints\").selectAll(\"path.legend\"+g).data(V?[k]:[]);G.enter().append(\"path\").classed(\"legend\"+g,!0).attr(\"d\",O).attr(\"transform\",l),G.exit().remove(),G.each(function(Z){var H=Ov.select(this),N=Z[0],j=u(N.mlw,T.line,z3,Ib);H.style(\"stroke-width\",j+\"px\");var re=N.mcc;if(!n._inHover&&\"mc\"in N){var oe=PB(T),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),re=Kp.tryColorscale(T,\"\")(_e)}var Me=re||N.mc||T.color,ke=T.pattern,me=Kp.getPatternAttr,ie=ke&&(me(ke.shape,0,\"\")||me(ke.path,0,\"\"));if(ie){var Se=me(ke.bgcolor,0,null),Le=me(ke.fgcolor,0,null),Ae=ke.fgopacity,De=gle(ke.size,8,10),Pe=gle(ke.solidity,.5,1),ge=\"legend-\"+P.uid;H.call(Kp.pattern,\"legend\",r,ge,ie,De,Pe,re,ke.fillmode,Se,Le,Ae)}else H.call(T0.fill,Me);j&&T0.stroke(H,N.mlc||z.color)})}function b(k){var M=k[0].trace,g=Ov.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(M.visible&&LB.traceIs(M,\"box-violin\")?[k]:[]);g.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",l),g.exit().remove(),g.each(function(){var P=Ov.select(this);if((M.boxpoints===\"all\"||M.points===\"all\")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=_v.minExtend(M,{marker:{size:a?dle:_v.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});g.call(Kp.pointStyle,T,r)}else{var z=u(void 0,M.line,z3,Ib);P.style(\"stroke-width\",z+\"px\").call(T0.fill,M.fillcolor),z&&T0.stroke(P,M.line.color)}})}function p(k){var M=k[0].trace,g=Ov.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(M.visible&&M.type===\"candlestick\"?[k,k]:[]);g.enter().append(\"path\").classed(\"legendcandle\",!0).attr(\"d\",function(P,T){return T?\"M-15,0H-8M-8,6V-6H8Z\":\"M15,0H8M8,-6V6H-8Z\"}).attr(\"transform\",l).style(\"stroke-miterlimit\",1),g.exit().remove(),g.each(function(P,T){var z=Ov.select(this),O=M[T?\"increasing\":\"decreasing\"],V=u(void 0,O.line,z3,Ib);z.style(\"stroke-width\",V+\"px\").call(T0.fill,O.fillcolor),V&&T0.stroke(z,O.line.color)})}function C(k){var M=k[0].trace,g=Ov.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(M.visible&&M.type===\"ohlc\"?[k,k]:[]);g.enter().append(\"path\").classed(\"legendohlc\",!0).attr(\"d\",function(P,T){return T?\"M-15,0H0M-8,-6V0\":\"M15,0H0M8,6V0\"}).attr(\"transform\",l).style(\"stroke-miterlimit\",1),g.exit().remove(),g.each(function(P,T){var z=Ov.select(this),O=M[T?\"increasing\":\"decreasing\"],V=u(void 0,O.line,z3,Ib);z.style(\"fill\",\"none\").call(Kp.dashLine,O.line.dash,V),V&&T0.stroke(z,O.line.color)})}function E(k){L(k,this,\"pie\")}function A(k){L(k,this,\"funnelarea\")}function L(k,M,g){var P=k[0],T=P.trace,z=g?T.visible&&T.type===g:LB.traceIs(T,g),O=Ov.select(M).select(\"g.legendpoints\").selectAll(\"path.legend\"+g).data(z?[k]:[]);if(O.enter().append(\"path\").classed(\"legend\"+g,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",l),O.exit().remove(),O.size()){var V=T.marker||{},G=u(_lt(V.line.width,P.pts),V.line,z3,Ib),Z=\"pieLike\",H=_v.minExtend(T,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:H},Z);ylt(O,N,H,r)}}function _(k){var M=k[0].trace,g,P=[];if(M.visible)switch(M.type){case\"histogram2d\":case\"heatmap\":P=[[\"M-15,-2V4H15V-2Z\"]],g=!0;break;case\"choropleth\":case\"choroplethmapbox\":case\"choroplethmap\":P=[[\"M-6,-6V6H6V-6Z\"]],g=!0;break;case\"densitymapbox\":case\"densitymap\":P=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],g=\"radial\";break;case\"cone\":P=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],g=!1;break;case\"streamtube\":P=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],g=!1;break;case\"surface\":P=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],g=!0;break;case\"mesh3d\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],g=!1;break;case\"volume\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],g=!0;break;case\"isosurface\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],g=!1;break}var T=Ov.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(P);T.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",l).style(\"stroke-miterlimit\",1),T.exit().remove(),T.each(function(z,O){var V=Ov.select(this),G=PB(M),Z=G.colorscale,H=G.reversescale,N=function(_e){if(_e.size()){var Me=\"legendfill-\"+M.uid;Kp.gradient(_e,r,Me,IB(H,g===\"radial\"),Z,\"fill\")}},j;if(Z){if(!g){var oe=Z.length;j=O===0?Z[H?oe-1:0][1]:O===1?Z[H?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;j=_v.isArrayOrTypedArray(re)?re[O]||re[0]:re}V.attr(\"d\",z[0]),j?V.call(T0.fill,j):V.call(N)})}};function IB(e,t){var r=t?\"radial\":\"horizontal\";return r+(e?\"\":\"reversed\")}function ple(e){var t=e[0].trace,r=t.contours,n=FL.hasLines(t),i=FL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!==\"none\",o=!1,s=!1;if(r){var l=r.coloring;l===\"lines\"?o=!0:n=l===\"none\"||l===\"heatmap\"||r.showlines,r.type===\"constraint\"?a=r._operation!==\"=\":(l===\"fill\"||l===\"heatmap\")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function gle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var OB=ye((vnr,Ele)=>{\"use strict\";var Ap=Oa(),Lh=Dr(),FB=Mc(),B3=qa(),yle=g3(),DB=yv(),Ph=So(),OL=Ca(),Rb=ru(),_le=tle(),$h=CB(),zB=Kh(),Sle=zB.LINE_SPACING,q3=zB.FROM_TL,xle=zB.FROM_BR,ble=ale(),wlt=RB(),wle=RL(),O3=1,Tlt=/^legend[0-9]*$/;Ele.exports=function(t,r){if(r)Tle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^=\"legend\"]');a.each(function(){var u=Ap.select(this),c=u.attr(\"class\"),f=c.split(\" \")[0];f.match(Tlt)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o<i.length;o++){var s=i[o],l=t._fullLayout[s];Tle(t,l)}}};function Alt(e,t,r){if(!(t.title.side!==\"top center\"&&t.title.side!==\"top right\")){var n=t.title.font,i=n.size*Sle,a=0,o=e.node(),s=Ph.bBox(o).width;t.title.side===\"top center\"?a=.5*(t._width-2*r-2*$h.titlePad-s):t.title.side===\"top right\"&&(a=t._width-2*r-2*$h.titlePad-s),Rb.positionText(e,r+$h.titlePad+a,r+i)}}function Tle(e,t){var r=t||{},n=e._fullLayout,i=UL(r),a,o,s=r._inHover;if(s?(o=r.layer,a=\"hover\"):(o=n._infolayer,a=i),!!o){a+=n._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0);var l;if(s){if(!r.entries)return;l=ble(r.entries,r)}else{for(var u=(e.calcdata||[]).slice(),c=n.shapes,f=0;f<c.length;f++){var h=c[f];if(h.showlegend){var d={_isShape:!0,_fullInput:h,index:h._index,name:h.name||h.label.text||\"shape \"+h._index,legend:h.legend,legendgroup:h.legendgroup,legendgrouptitle:h.legendgrouptitle,legendrank:h.legendrank,legendwidth:h.legendwidth,showlegend:h.showlegend,visible:h.visible,opacity:h.opacity,mode:h.type===\"line\"?\"lines\":\"markers\",line:h.line,marker:{line:h.line,color:h.fillcolor,size:12,symbol:h.type===\"rect\"?\"square\":h.type===\"circle\"?\"circle\":\"hexagon2\"}};u.push([{trace:d}])}}l=n.showlegend&&ble(u,r,n._legends.length>1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll(\".\"+i).remove(),n._topdefs.select(\"#\"+a).remove(),FB.autoMargin(e,i);var x=Lh.ensureSingle(o,\"g\",i,function(M){s||M.attr(\"pointer-events\",\"all\")}),b=Lh.ensureSingleById(n._topdefs,\"clipPath\",a,function(M){M.append(\"rect\")}),p=Lh.ensureSingle(x,\"rect\",\"bg\",function(M){M.attr(\"shape-rendering\",\"crispEdges\")});p.call(OL.stroke,r.bordercolor).call(OL.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\");var C=Lh.ensureSingle(x,\"g\",\"scrollbox\"),E=r.title;r._titleWidth=0,r._titleHeight=0;var A;E.text?(A=Lh.ensureSingle(C,\"text\",i+\"titletext\"),A.attr(\"text-anchor\",\"start\").call(Ph.font,E.font).text(E.text),qL(A,C,e,r,O3)):C.selectAll(\".\"+i+\"titletext\").remove();var L=Lh.ensureSingle(x,\"rect\",\"scrollbar\",function(M){M.attr($h.scrollBarEnterAttrs).call(OL.fill,$h.scrollBarColor)}),_=C.selectAll(\"g.groups\").data(l);_.enter().append(\"g\").attr(\"class\",\"groups\"),_.exit().remove();var k=_.selectAll(\"g.traces\").data(Lh.identity);k.enter().append(\"g\").attr(\"class\",\"traces\"),k.exit().remove(),k.style(\"opacity\",function(M){var g=M[0].trace;return B3.traceIs(g,\"pie-like\")?v.indexOf(M[0].label)!==-1?.5:1:g.visible===\"legendonly\"?.5:1}).each(function(){Ap.select(this).call(Slt,e,r)}).call(wlt,e,r).each(function(){s||Ap.select(this).call(Mlt,e,i)}),Lh.syncOrAsync([FB.previousPromises,function(){return klt(e,_,k,r)},function(){var M=n._size,g=r.borderwidth,P=r.xref===\"paper\",T=r.yref===\"paper\";if(E.text&&Alt(A,r,g),!s){var z,O;P?z=M.l+M.w*r.x-q3[BL(r)]*r._width:z=n.width*r.x-q3[BL(r)]*r._width,T?O=M.t+M.h*(1-r.y)-q3[NL(r)]*r._effHeight:O=n.height*(1-r.y)-q3[NL(r)]*r._effHeight;var V=Llt(e,i,z,O);if(V)return;if(n.margin.autoexpand){var G=z,Z=O;z=P?Lh.constrain(z,0,n.width-r._width):G,O=T?Lh.constrain(O,0,n.height-r._effHeight):Z,z!==G&&Lh.log(\"Constrain \"+i+\".x to make legend fit inside graph\"),O!==Z&&Lh.log(\"Constrain \"+i+\".y to make legend fit inside graph\")}Ph.setTranslate(x,z,O)}if(L.on(\".drag\",null),x.on(\"wheel\",null),s||r._height<=r._maxHeight||e._context.staticPlot){var H=r._effHeight;s&&(H=r._height),p.attr({width:r._width-g,height:H-g,x:g/2,y:g/2}),Ph.setTranslate(C,0,0),b.select(\"rect\").attr({width:r._width-2*g,height:H-2*g,x:g,y:g}),Ph.setClipUrl(C,a,e),Ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max($h.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),j=r._effHeight-N-2*$h.scrollBarMargin,re=r._height-r._effHeight,oe=j/re,_e=Math.min(r._scrollY||0,re);p.attr({width:r._width-2*g+$h.scrollBarWidth+$h.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select(\"rect\").attr({width:r._width-2*g+$h.scrollBarWidth+$h.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),Ph.setClipUrl(C,a,e),De(_e,N,oe),x.on(\"wheel\",function(){_e=Lh.constrain(r._scrollY+Ap.event.deltaY/j*re,0,re),De(_e,N,oe),_e!==0&&_e!==re&&Ap.event.preventDefault()});var Me,ke,me,ie=function(Ze,ct,pt){var Wt=(pt-ct)/oe+Ze;return Lh.constrain(Wt,0,re)},Se=function(Ze,ct,pt){var Wt=(ct-pt)/oe+Ze;return Lh.constrain(Wt,0,re)},Le=Ap.behavior.drag().on(\"dragstart\",function(){var Ze=Ap.event.sourceEvent;Ze.type===\"touchstart\"?Me=Ze.changedTouches[0].clientY:Me=Ze.clientY,me=_e}).on(\"drag\",function(){var Ze=Ap.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Ze.type===\"touchmove\"?ke=Ze.changedTouches[0].clientY:ke=Ze.clientY,_e=ie(me,Me,ke),De(_e,N,oe))});L.call(Le);var Ae=Ap.behavior.drag().on(\"dragstart\",function(){var Ze=Ap.event.sourceEvent;Ze.type===\"touchstart\"&&(Me=Ze.changedTouches[0].clientY,me=_e)}).on(\"drag\",function(){var Ze=Ap.event.sourceEvent;Ze.type===\"touchmove\"&&(ke=Ze.changedTouches[0].clientY,_e=Se(me,Me,ke),De(_e,N,oe))});C.call(Ae)}function De(Ze,ct,pt){r._scrollY=e._fullLayout[i]._scrollY=Ze,Ph.setTranslate(C,0,-Ze),Ph.setRect(L,r._width,$h.scrollBarMargin+Ze*pt,$h.scrollBarWidth,ct),b.select(\"rect\").attr(\"y\",g+Ze)}if(e._context.edits.legendPosition){var Pe,ge,Fe,ce;x.classed(\"cursor-move\",!0),DB.init({element:x.node(),gd:e,prepFn:function(Ze){if(Ze.target!==L.node()){var ct=Ph.getTranslate(x);Fe=ct.x,ce=ct.y}},moveFn:function(Ze,ct){if(Fe!==void 0&&ce!==void 0){var pt=Fe+Ze,Wt=ce+ct;Ph.setTranslate(x,pt,Wt),Pe=DB.align(pt,r._width,M.l,M.l+M.w,r.xanchor),ge=DB.align(Wt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Pe!==void 0&&ge!==void 0){var Ze={};Ze[i+\".x\"]=Pe,Ze[i+\".y\"]=ge,B3.call(\"_guiRelayout\",e,Ze)}},clickFn:function(Ze,ct){var pt=o.selectAll(\"g.traces\").filter(function(){var Wt=this.getBoundingClientRect();return ct.clientX>=Wt.left&&ct.clientX<=Wt.right&&ct.clientY>=Wt.top&&ct.clientY<=Wt.bottom});pt.size()>0&&Mle(e,x,pt,Ze,ct)}})}}],e)}}function zL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a===\"fraction\"?t._maxWidth*o:r+(o||i)}function Mle(e,t,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};a._group&&(o.group=a._group),B3.traceIs(a,\"pie-like\")&&(o.label=r.datum()[0].label);var s=yle.triggerHandler(e,\"plotly_legendclick\",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&_le(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var l=yle.triggerHandler(e,\"plotly_legenddoubleclick\",o);l!==!1&&s!==!1&&_le(r,e,n)}}function Slt(e,t,r){var n=UL(r),i=e.data()[0][0],a=i.trace,o=B3.traceIs(a,\"pie-like\"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=Lh.templateString(u,a._meta))));var f=Lh.ensureSingle(e,\"text\",n+\"text\");f.attr(\"text-anchor\",\"start\").call(Ph.font,c).text(s?Ale(u,l):u);var h=r.indentation+r.itemwidth+$h.itemGap*2;Rb.positionText(f,h,0),s?f.call(Rb.makeEditable,{gd:t,text:u}).call(qL,e,t,r).on(\"edit\",function(d){this.text(Ale(d,l)).call(qL,e,t,r);var v=i.trace._fullInput||{},x={};return x.name=d,v._isShape?B3.call(\"_guiRelayout\",t,\"shapes[\"+a.index+\"].name\",x.name):B3.call(\"_guiRestyle\",t,x,a.index)}):qL(f,e,t,r)}function Ale(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||\"\";for(var n=r-e.length;n>0;n--)e+=\" \";return e}function Mlt(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=Lh.ensureSingle(e,\"rect\",r+\"toggle\",function(s){t._context.staticPlot||s.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),s.call(OL.fill,\"rgba(0,0,0,0)\")});t._context.staticPlot||(o.on(\"mousedown\",function(){i=new Date().getTime(),i-t._legendMouseDownTime<n?a+=1:(a=1,t._legendMouseDownTime=i)}),o.on(\"mouseup\",function(){if(!(t._dragged||t._editing)){var s=t._fullLayout[r];new Date().getTime()-t._legendMouseDownTime>n&&(a=Math.max(a-1,1)),Mle(t,s,e,a,Ap.event)}}))}function qL(e,t,r,n,i){n._inHover&&e.attr(\"data-notex\",!0),Rb.convertToTspans(e,r,function(){Elt(t,r,n,i)})}function Elt(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select(\"g[class*=math-group]\"),o=a.node(),s=UL(r);r||(r=t._fullLayout[s]);var l=r.borderwidth,u;n===O3?u=r.title.font:i.groupTitle?u=i.groupTitle.font:u=r.font;var c=u.size*Sle,f,h;if(o){var d=Ph.bBox(o);f=d.height,h=d.width,n===O3?Ph.setTranslate(a,l,l+f*.75):Ph.setTranslate(a,0,f*.25)}else{var v=\".\"+s+(n===O3?\"title\":\"\")+\"text\",x=e.select(v),b=Rb.lineCount(x),p=x.node();if(f=c*b,h=p?Ph.bBox(p).width:0,n===O3)r.title.side===\"left\"&&(h+=$h.itemGap*2),Rb.positionText(x,l+$h.titlePad,l+c);else{var C=$h.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(C=$h.itemGap,h-=r.indentation+r.itemwidth),Rb.positionText(x,C,-c*((b-1)/2-.3))}}n===O3?(r._titleWidth=h,r._titleHeight=f):(i.lineHeight=c,i.height=Math.max(f,16)+3,i.width=h)}function Clt(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf(\"left\")!==-1&&(t=e._titleWidth),n.indexOf(\"top\")!==-1&&(r=e._titleHeight)),[t,r]}function klt(e,t,r,n){var i=e._fullLayout,a=UL(n);n||(n=i[a]);var o=i._size,s=wle.isVertical(n),l=wle.isGrouped(n),u=n.entrywidthmode===\"fraction\",c=n.borderwidth,f=2*c,h=$h.itemGap,d=n.indentation+n.itemwidth+h*2,v=2*(c+h),x=NL(n),b=n.y<0||n.y===0&&x===\"top\",p=n.y>1||n.y===1&&x===\"bottom\",C=n.tracegroupgap,E={};let{orientation:A,yref:L}=n,{maxheight:_}=n,k=b||p||A!==\"v\"||L!==\"paper\";_||(_=k?.5:1);let M=k?i.height:o.h;n._maxHeight=Math.max(_>1?_:_*M,30);var g=0;n._width=0,n._height=0;var P=Clt(n);if(s)r.each(function(De){var Pe=De[0].height;Ph.setTranslate(this,c+P[0],c+P[1]+n._height+Pe/2+h),n._height+=Pe,n._width=Math.max(n._width,De[0].width)}),g=d+n._width,n._width+=h+d+f,n._height+=v,l&&(t.each(function(De,Pe){Ph.setTranslate(this,0,Pe*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var T=BL(n),z=n.x<0||n.x===0&&T===\"right\",O=n.x>1||n.x===1&&T===\"left\",V=p||b,G=i.width/2;n._maxWidth=Math.max(z?V&&T===\"left\"?o.l+o.w:G:O?V&&T===\"right\"?o.r+o.w:G:o.w,2*d);var Z=0,H=0;r.each(function(De){var Pe=zL(De,n,d);Z=Math.max(Z,Pe),H+=Pe}),g=null;var N=0;if(l){var j=0,re=0,oe=0;t.each(function(){var De=0,Pe=0;Ap.select(this).selectAll(\"g.traces\").each(function(Fe){var ce=zL(Fe,n,d),Ze=Fe[0].height;Ph.setTranslate(this,P[0],P[1]+c+h+Ze/2+Pe),Pe+=Ze,De=Math.max(De,ce),E[Fe[0].trace.legendgroup]=De});var ge=De+h;re>0&&ge+c+re>n._maxWidth?(N=Math.max(N,re),re=0,oe+=j+C,j=Pe):j=Math.max(j,Pe),Ph.setTranslate(this,re,oe),re+=ge}),n._width=Math.max(N,re)+c,n._height=oe+j+v}else{var _e=r.size(),Me=H+f+(_e-1)*h<n._maxWidth,ke=0,me=0,ie=0,Se=0;r.each(function(De){var Pe=De[0].height,ge=zL(De,n,d,l),Fe=Me?ge:Z;u||(Fe+=h),Fe+c+me-h>=n._maxWidth&&(N=Math.max(N,Se),me=0,ie+=ke,n._height+=ke,ke=0),Ph.setTranslate(this,P[0]+c+me,P[1]+c+ie+Pe/2+h),Se=me+ge+h,me+=Fe,ke=Math.max(ke,Pe)}),Me?(n._width=me+f,n._height=ke+v):(n._width=Math.max(N,Se)+f,n._height+=ke+v)}}n._width=Math.ceil(Math.max(n._width+P[0],n._titleWidth+2*(c+$h.titlePad))),n._height=Math.ceil(Math.max(n._height+P[1],n._titleHeight+2*(c+$h.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Le=e._context.edits,Ae=Le.legendText||Le.legendPosition;r.each(function(De){var Pe=Ap.select(this).select(\".\"+a+\"toggle\"),ge=De[0].height,Fe=De[0].trace.legendgroup,ce=zL(De,n,d);l&&Fe!==\"\"&&(ce=E[Fe]);var Ze=Ae?d:g||ce;!s&&!u&&(Ze+=h/2),Ph.setRect(Pe,0,-ge/2,Ze,ge)})}function Llt(e,t,r,n){var i=e._fullLayout,a=i[t],o=BL(a),s=NL(a),l=a.xref===\"paper\",u=a.yref===\"paper\";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?\"b\":\"t\",f=a.x<.5?\"l\":\"r\",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return FB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*q3[o],r:a._width*xle[o],b:a._effHeight*xle[s],t:a._effHeight*q3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation===\"v\"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function BL(e){return Lh.isRightAnchor(e)?\"right\":Lh.isCenterAnchor(e)?\"center\":\"left\"}function NL(e){return Lh.isBottomAnchor(e)?\"bottom\":Lh.isMiddleAnchor(e)?\"middle\":\"top\"}function UL(e){return e._id||\"legend\"}});var UB=ye(NB=>{\"use strict\";var Db=Oa(),Sy=Eo(),Cle=cd(),Ff=Dr(),Plt=Ff.pushUnique,qB=Ff.strTranslate,Ilt=Ff.strRotate,Rlt=g3(),A0=ru(),Dlt=Jse(),bm=So(),vd=Ca(),VL=yv(),wm=ho(),Flt=hd().zindexSeparator,U3=qa(),Ag=rp(),Fb=RS(),zlt=SB(),Olt=OB(),zle=Fb.YANGLE,BB=Math.PI*zle/180,qlt=1/Math.sin(BB),Blt=Math.cos(BB),Nlt=Math.sin(BB),Qc=Fb.HOVERARROWSIZE,ll=Fb.HOVERTEXTPAD,kle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Ult={scatter:!0,scattergl:!0,splom:!0};function Lle(e,t){return e.distance-t.distance}NB.hover=function(t,r,n,i){t=Ff.getGraphDiv(t);var a=r.target;Ff.throttle(t._fullLayout._uid+Fb.HOVERID,Fb.HOVERMINTIME,function(){Vlt(t,r,n,i,a)})};NB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ule(i),o=Vle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,C=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,A=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(p,C),k=Math.max(p,C),M=Math.min(E,A),g=Math.max(E,A),P=b.trace;if(U3.traceIs(P,\"gl3d\")){var T=i._fullLayout[P.scene]._scene.container,z=T.offsetLeft,O=T.offsetTop;_+=z,k+=z,M+=O,g+=O}L.bbox={x0:_+o,x1:k+o,y0:M+a,y1:g+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=qle(s,{gd:i,hovermode:\"closest\",rotateLabels:l,bgColor:r.bgColor||vd.background,container:Db.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var C=b.y0-b.by/2;C-f<h?b.offset=h-C+f:b.offset=0,h=C+b.by+b.offset,p===r.anchorIndex&&(d=b.offset)}).each(function(b){b.offset-=d});var v=i._fullLayout._invScaleX,x=i._fullLayout._invScaleY;return Nle(c,l,v,x),n?c:c.node()};function Vlt(e,t,r,n,i){r||(r=\"xy\"),typeof r==\"string\"&&(r=r.split(Flt)[0]);var a=Array.isArray(r)?r:[r],o,s=e._fullLayout,l=s.hoversubplots,u=s._plots||[],c=u[r],f=s._has(\"cartesian\"),h=t.hovermode||s.hovermode,d=(h||\"\").charAt(0)===\"x\",v=(h||\"\").charAt(0)===\"y\",x,b;if(f&&(d||v)&&l===\"axis\"){for(var p=a.length,C=0;C<p;C++)if(o=a[C],u[o]){x=wm.getFromId(e,o,\"x\"),b=wm.getFromId(e,o,\"y\");var E=(d?x:b)._subplotsWith;if(E&&E.length)for(var A=0;A<E.length;A++)Plt(a,E[A])}}if(c&&l!==\"single\"){var L=c.overlays.map(function(pn){return pn.id});a=a.concat(L)}for(var _=a.length,k=new Array(_),M=new Array(_),g=!1,P=0;P<_;P++)if(o=a[P],u[o])g=!0,k[P]=u[o].xaxis,M[P]=u[o].yaxis;else if(s[o]&&s[o]._subplot){var T=s[o]._subplot;k[P]=T.xaxis,M[P]=T.yaxis}else{Ff.warn(\"Unrecognized subplot: \"+o);return}if(h&&!g&&(h=\"closest\"),[\"x\",\"y\",\"closest\",\"x unified\",\"y unified\"].indexOf(h)===-1||!e.calcdata||e.querySelector(\".zoombox\")||e._dragging)return VL.unhoverRaw(e,t);var z=s.hoverdistance;z===-1&&(z=1/0);var O=s.spikedistance;O===-1&&(O=1/0);var V=[],G=[],Z,H,N,j,re,oe,_e,Me,ke,me,ie,Se,Le,Ae={hLinePoint:null,vLinePoint:null},De=!1;if(Array.isArray(t))for(h=\"array\",N=0;N<t.length;N++)re=e.calcdata[t[N].curveNumber||0],re&&(oe=re[0].trace,re[0].trace.hoverinfo!==\"skip\"&&(G.push(re),oe.orientation===\"h\"&&(De=!0)));else{var Pe=e.calcdata.slice();for(Pe.sort(function(pn,Vn){var kn=pn[0].trace.zorder||0,ea=Vn[0].trace.zorder||0;return kn-ea}),j=0;j<Pe.length;j++)re=Pe[j],oe=re[0].trace,oe.hoverinfo!==\"skip\"&&Ag.isTraceInSubplots(oe,a)&&(G.push(re),oe.orientation===\"h\"&&(De=!0));var ge=!i,Fe,ce;if(ge)\"xpx\"in t?Fe=t.xpx:Fe=k[0]._length/2,\"ypx\"in t?ce=t.ypx:ce=M[0]._length/2;else{if(Rlt.triggerHandler(e,\"plotly_beforehover\",t)===!1)return;var Ze=i.getBoundingClientRect();Fe=t.clientX-Ze.left,ce=t.clientY-Ze.top,s._calcInverseTransform(e);var ct=Ff.apply3DTransform(s._invTransform)(Fe,ce);if(Fe=ct[0],ce=ct[1],Fe<0||Fe>k[0]._length||ce<0||ce>M[0]._length)return VL.unhoverRaw(e,t)}if(t.pointerX=Fe+k[0]._offset,t.pointerY=ce+M[0]._offset,\"xval\"in t?Z=Ag.flat(a,t.xval):Z=Ag.p2c(k,Fe),\"yval\"in t?H=Ag.flat(a,t.yval):H=Ag.p2c(M,ce),!Sy(Z[0])||!Sy(H[0]))return Ff.warn(\"Fx.hover failed\",t,e),VL.unhoverRaw(e,t)}var pt=1/0;function Wt(pn,Vn){for(j=0;j<G.length;j++)if(re=G[j],!(!re||!re[0]||!re[0].trace)&&(oe=re[0].trace,!(oe.visible!==!0||oe._length===0)&&[\"carpet\",\"contourcarpet\"].indexOf(oe._module.name)===-1)){if(ke=h,Ag.isUnifiedHover(ke)&&(ke=ke.charAt(0)),oe.type===\"splom\"?(Me=0,_e=a[Me]):(_e=Ag.getSubplot(oe),Me=a.indexOf(_e)),Se={cd:re,trace:oe,xa:k[Me],ya:M[Me],maxHoverDistance:z,maxSpikeDistance:O,index:!1,distance:Math.min(pt,z),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:vd.defaultLine,name:oe.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},s[_e]&&(Se.subplot=s[_e]._subplot),s._splomScenes&&s._splomScenes[oe.uid]&&(Se.scene=s._splomScenes[oe.uid]),ke===\"array\"){var kn=t[j];\"pointNumber\"in kn?(Se.index=kn.pointNumber,ke=\"closest\"):(ke=\"\",\"xval\"in kn&&(me=kn.xval,ke=\"x\"),\"yval\"in kn&&(ie=kn.yval,ke=ke?\"closest\":\"y\"))}else pn!==void 0&&Vn!==void 0?(me=pn,ie=Vn):(me=Z[Me],ie=H[Me]);if(Le=V.length,z!==0)if(oe._module&&oe._module.hoverPoints){var ea=oe._module.hoverPoints(Se,me,ie,ke,{finiteRange:!0,hoverLayer:s._hoverlayer,hoversubplots:l,gd:e});if(ea)for(var ua,Vt=0;Vt<ea.length;Vt++)ua=ea[Vt],Sy(ua.x0)&&Sy(ua.y0)&&V.push(Wlt(ua,h))}else Ff.log(\"Unrecognized trace type in hover:\",oe);if(h===\"closest\"&&V.length>Le&&(V.splice(0,Le),pt=V[0].distance),f&&O!==0&&V.length===0){Se.distance=O,Se.index=!1;var _t=oe._module.hoverPoints(Se,me,ie,\"closest\",{hoverLayer:s._hoverlayer});if(_t&&(_t=_t.filter(function($r){return $r.spikeDistance<=O})),_t&&_t.length){var tr,ar=_t.filter(function($r){return $r.xa.showspikes&&$r.xa.spikesnap!==\"hovered data\"});if(ar.length){var Er=ar[0];Sy(Er.x0)&&Sy(Er.y0)&&(tr=lt(Er),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>tr.spikeDistance)&&(Ae.vLinePoint=tr))}var Zr=_t.filter(function($r){return $r.ya.showspikes&&$r.ya.spikesnap!==\"hovered data\"});if(Zr.length){var ri=Zr[0];Sy(ri.x0)&&Sy(ri.y0)&&(tr=lt(ri),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>tr.spikeDistance)&&(Ae.hLinePoint=tr))}}}}}Wt();function st(pn,Vn,kn){for(var ea=null,ua=1/0,Vt,_t=0;_t<pn.length;_t++)x&&x._id!==pn[_t].xa._id||b&&b._id!==pn[_t].ya._id||(Vt=pn[_t].spikeDistance,kn&&_t===0&&(Vt=-1/0),Vt<=ua&&Vt<=Vn&&(ea=pn[_t],ua=Vt));return ea}function lt(pn){return pn?{xa:pn.xa,ya:pn.ya,x:pn.xSpike!==void 0?pn.xSpike:(pn.x0+pn.x1)/2,y:pn.ySpike!==void 0?pn.ySpike:(pn.y0+pn.y1)/2,distance:pn.distance,spikeDistance:pn.spikeDistance,curveNumber:pn.trace.index,color:pn.color,pointNumber:pn.index}:null}var Gt={fullLayout:s,container:s._hoverlayer,event:t},Nt=e._spikepoints,$t={vLinePoint:Ae.vLinePoint,hLinePoint:Ae.hLinePoint};e._spikepoints=$t;var sr=function(){var pn=V.filter(function(kn){return x&&x._id===kn.xa._id&&b&&b._id===kn.ya._id}),Vn=V.filter(function(kn){return!(x&&x._id===kn.xa._id&&b&&b._id===kn.ya._id)});pn.sort(Lle),Vn.sort(Lle),V=pn.concat(Vn),V=Zlt(V,h)};sr();var wr=h.charAt(0),ur=(wr===\"x\"||wr===\"y\")&&V[0]&&Ult[V[0].trace.type];if(f&&O!==0&&V.length!==0){var Qe=V.filter(function(pn){return pn.ya.showspikes}),Et=st(Qe,O,ur);Ae.hLinePoint=lt(Et);var er=V.filter(function(pn){return pn.xa.showspikes}),Ut=st(er,O,ur);Ae.vLinePoint=lt(Ut)}if(V.length===0){var Ft=VL.unhoverRaw(e,t);return f&&(Ae.hLinePoint!==null||Ae.vLinePoint!==null)&&Rle(Nt)&&Ile(e,Ae,Gt),Ft}if(f&&Rle(Nt)&&Ile(e,Ae,Gt),Ag.isXYhover(ke)&&V[0].length!==0&&V[0].trace.type!==\"splom\"){var bt=V[0];kle[bt.trace.type]?V=V.filter(function(pn){return pn.trace.index===bt.trace.index}):V=[bt];var yt=V.length,Yt=Fle(\"x\",bt,s),lr=Fle(\"y\",bt,s);Wt(Yt,lr);var Tr=[],Rr={},ei=0,Wr=function(pn){var Vn=kle[pn.trace.type]?Ole(pn):pn.trace.index;if(!Rr[Vn])ei++,Rr[Vn]=ei,Tr.push(pn);else{var kn=Rr[Vn]-1,ea=Tr[kn];kn>0&&Math.abs(pn.distance)<Math.abs(ea.distance)&&(Tr[kn]=pn)}},Ur;for(Ur=0;Ur<yt;Ur++)Wr(V[Ur]);for(Ur=V.length-1;Ur>yt-1;Ur--)Wr(V[Ur]);V=Tr,sr()}var dt=e._hoverdata,Ge=[],Je=Ule(e),je=Vle(e);for(N=0;N<V.length;N++){var $e=V[N],wt=Ag.makeEventData($e,$e.trace,$e.cd);if($e.hovertemplate!==!1){var Ie=!1;$e.cd[$e.index]&&$e.cd[$e.index].ht&&(Ie=$e.cd[$e.index].ht),$e.hovertemplate=Ie||$e.trace.hovertemplate||!1}if($e.xa&&$e.ya){var xe=$e.x0+$e.xa._offset,Ce=$e.x1+$e.xa._offset,vt=$e.y0+$e.ya._offset,nr=$e.y1+$e.ya._offset,ir=Math.min(xe,Ce),pr=Math.max(xe,Ce),oi=Math.min(vt,nr),di=Math.max(vt,nr);wt.bbox={x0:ir+je,x1:pr+je,y0:oi+Je,y1:di+Je}}$e.eventData=[wt],Ge.push(wt)}e._hoverdata=Ge;var Jr=h===\"y\"&&(G.length>1||V.length>1)||h===\"closest\"&&De&&V.length>1,fi=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),Hi=qle(V,{gd:e,hovermode:h,rotateLabels:Jr,bgColor:fi,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Pn=Hi.hoverLabels;if(Ag.isUnifiedHover(h)||(Hlt(Pn,Jr,s,Hi.commonLabelBoundingBox),Nle(Pn,Jr,s._invScaleX,s._invScaleY)),i&&i.tagName){var wn=U3.getComponentMethod(\"annotations\",\"hasClickToShow\")(e,Ge);Dlt(Db.select(i),wn?\"pointer\":\"\")}!i||n||!Xlt(e,t,dt)||(dt&&e.emit(\"plotly_unhover\",{event:t,points:dt}),e.emit(\"plotly_hover\",{event:t,points:e._hoverdata,xaxes:k,yaxes:M,xvals:Z,yvals:H}))}function Ole(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:\"\",e.ya?e.ya._id:\"\"].join(\",\")}var Glt=/<extra>([\\s\\S]*)<\\/extra>/;function qle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Fb.HOVERFONT,f=t.fontSize||Fb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,C=e[0],E=C.xa,A=C.ya,L=i.charAt(0),_=L+\"Label\",k=C[_];if(k===void 0&&E.type===\"multicategory\")for(var M=0;M<e.length&&(k=e[M][_],k===void 0);M++);var g=N3(r,l),P=g.top,T=g.width,z=g.height,O=k!==void 0&&C.distance<=t.hoverdistance&&(i===\"x\"||i===\"y\");if(O){var V=!0,G,Z;for(G=0;G<e.length;G++)if(V&&e[G].zLabel===void 0&&(V=!1),Z=e[G].hoverinfo||e[G].trace.hoverinfo,Z){var H=Array.isArray(Z)?Z:Z.split(\"+\");if(H.indexOf(\"all\")===-1&&H.indexOf(i)===-1){O=!1;break}}V&&(O=!1)}var N=s.selectAll(\"g.axistext\").data(O?[0]:[]);N.enter().append(\"g\").classed(\"axistext\",!0),N.exit().remove();var j={minX:0,maxX:0,minY:0,maxY:0};if(N.each(function(){var bt=Db.select(this),yt=Ff.ensureSingle(bt,\"path\",\"\",function(di){di.style({\"stroke-width\":\"1px\"})}),Yt=Ff.ensureSingle(bt,\"text\",\"\",function(di){di.attr(\"data-notex\",1)}),lr=u.bgcolor||vd.defaultLine,Tr=u.bordercolor||vd.contrast(lr),Rr=vd.contrast(lr),ei=u.font,Wr={weight:ei.weight||h,style:ei.style||d,variant:ei.variant||v,textcase:ei.textcase||x,lineposition:ei.lineposition||b,shadow:ei.shadow||p,family:ei.family||c,size:ei.size||f,color:ei.color||Rr};yt.style({fill:lr,stroke:Tr}),Yt.text(k).call(bm.font,Wr).call(A0.positionText,0,0).call(A0.convertToTspans,r),bt.attr(\"transform\",\"\");var Ur=N3(r,Yt.node()),dt,Ge;if(i===\"x\"){var Je=E.side===\"top\"?\"-\":\"\";Yt.attr(\"text-anchor\",\"middle\").call(A0.positionText,0,E.side===\"top\"?P-Ur.bottom-Qc-ll:P-Ur.top+Qc+ll),dt=E._offset+(C.x0+C.x1)/2,Ge=A._offset+(E.side===\"top\"?0:A._length);var je=Ur.width/2+ll,$e=dt;dt<je?$e=je:dt>n.width-je&&($e=n.width-je),yt.attr(\"d\",\"M\"+(dt-$e)+\",0L\"+(dt-$e+Qc)+\",\"+Je+Qc+\"H\"+je+\"v\"+Je+(ll*2+Ur.height)+\"H\"+-je+\"V\"+Je+Qc+\"H\"+(dt-$e-Qc)+\"Z\"),dt=$e,j.minX=dt-je,j.maxX=dt+je,E.side===\"top\"?(j.minY=Ge-(ll*2+Ur.height),j.maxY=Ge-ll):(j.minY=Ge+ll,j.maxY=Ge+(ll*2+Ur.height))}else{var wt,Ie,xe;A.side===\"right\"?(wt=\"start\",Ie=1,xe=\"\",dt=E._offset+E._length):(wt=\"end\",Ie=-1,xe=\"-\",dt=E._offset),Ge=A._offset+(C.y0+C.y1)/2,Yt.attr(\"text-anchor\",wt),yt.attr(\"d\",\"M0,0L\"+xe+Qc+\",\"+Qc+\"V\"+(ll+Ur.height/2)+\"h\"+xe+(ll*2+Ur.width)+\"V-\"+(ll+Ur.height/2)+\"H\"+xe+Qc+\"V-\"+Qc+\"Z\"),j.minY=Ge-(ll+Ur.height/2),j.maxY=Ge+(ll+Ur.height/2),A.side===\"right\"?(j.minX=dt+Qc,j.maxX=dt+Qc+(ll*2+Ur.width)):(j.minX=dt-Qc-(ll*2+Ur.width),j.maxX=dt-Qc);var Ce=Ur.height/2,vt=P-Ur.top-Ce,nr=\"clip\"+n._uid+\"commonlabel\"+A._id,ir;if(dt<Ur.width+2*ll+Qc){ir=\"M-\"+(Qc+ll)+\"-\"+Ce+\"h-\"+(Ur.width-ll)+\"V\"+Ce+\"h\"+(Ur.width-ll)+\"Z\";var pr=Ur.width-dt+ll;A0.positionText(Yt,pr,vt),wt===\"end\"&&Yt.selectAll(\"tspan\").each(function(){var di=Db.select(this),Jr=bm.tester.append(\"text\").text(di.text()).call(bm.font,Wr),fi=N3(r,Jr.node());Math.round(fi.width)<Math.round(Ur.width)&&di.attr(\"x\",pr-fi.width),Jr.remove()})}else A0.positionText(Yt,Ie*(ll+Qc),vt),ir=null;var oi=n._topclips.selectAll(\"#\"+nr).data(ir?[0]:[]);oi.enter().append(\"clipPath\").attr(\"id\",nr).append(\"path\"),oi.exit().remove(),oi.select(\"path\").attr(\"d\",ir),bm.setClipUrl(Yt,ir?nr:null,r)}bt.attr(\"transform\",qB(dt,Ge))}),Ag.isUnifiedHover(i)){s.selectAll(\"g.hovertext\").remove();var re=e.filter(function(bt){return bt.hoverinfo!==\"none\"});if(re.length===0)return[];var oe=n.hoverlabel,_e=oe.font,Me=re[0],ke=((i===\"x unified\"?Me.xa:Me.ya).unifiedhovertitle||{}).text,me=ke?Ff.hovertemplateString(ke,{},n._d3locale,i===\"x unified\"?{xa:Me.xa,x:Me.xVal}:{ya:Me.ya,y:Me.yVal}):k,ie={showlegend:!0,legend:{title:{text:me,font:_e},font:_e,bgcolor:oe.bgcolor,bordercolor:oe.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:\"v\"}},Se={font:_e};zlt(ie,Se,r._fullData);var Le=Se.legend;Le.entries=[];for(var Ae=0;Ae<re.length;Ae++){var De=re[Ae];if(De.hoverinfo!==\"none\"){var Pe=Ple(De,!0,i,n,k),ge=Pe[0],Fe=Pe[1];De.name=Fe,Fe!==\"\"?De.text=Fe+\" : \"+ge:De.text=ge;var ce=De.cd[De.index];ce&&(ce.mc&&(De.mc=ce.mc),ce.mcc&&(De.mc=ce.mcc),ce.mlc&&(De.mlc=ce.mlc),ce.mlcc&&(De.mlc=ce.mlcc),ce.mlw&&(De.mlw=ce.mlw),ce.mrc&&(De.mrc=ce.mrc),ce.dir&&(De.dir=ce.dir)),De._distinct=!0,Le.entries.push([De])}}Le.entries.sort(function(bt,yt){return bt[0].trace.index-yt[0].trace.index}),Le.layer=s,Le._inHover=!0,Le._groupTitleFont=oe.grouptitlefont,Olt(r,Le);var Ze=s.select(\"g.legend\"),ct=N3(r,Ze.node()),pt=ct.width+2*ll,Wt=ct.height+2*ll,st=re[0],lt=(st.x0+st.x1)/2,Gt=(st.y0+st.y1)/2,Nt=!(U3.traceIs(st.trace,\"bar-like\")||U3.traceIs(st.trace,\"box-violin\")),$t,sr;L===\"y\"?Nt?(sr=Gt-ll,$t=Gt+ll):(sr=Math.min.apply(null,re.map(function(bt){return Math.min(bt.y0,bt.y1)})),$t=Math.max.apply(null,re.map(function(bt){return Math.max(bt.y0,bt.y1)}))):sr=$t=Ff.mean(re.map(function(bt){return(bt.y0+bt.y1)/2}))-Wt/2;var wr,ur;L===\"x\"?Nt?(wr=lt+ll,ur=lt-ll):(wr=Math.max.apply(null,re.map(function(bt){return Math.max(bt.x0,bt.x1)})),ur=Math.min.apply(null,re.map(function(bt){return Math.min(bt.x0,bt.x1)}))):wr=ur=Ff.mean(re.map(function(bt){return(bt.x0+bt.x1)/2}))-pt/2;var Qe=E._offset,Et=A._offset;$t+=Et,wr+=Qe,ur+=Qe-pt,sr+=Et-Wt;var er,Ut;return wr+pt<T&&wr>=0?er=wr:ur+pt<T&&ur>=0?er=ur:Qe+pt<T?er=Qe:wr-lt<lt-ur+pt?er=T-pt:er=0,er+=ll,$t+Wt<z&&$t>=0?Ut=$t:sr+Wt<z&&sr>=0?Ut=sr:Et+Wt<z?Ut=Et:$t-Gt<Gt-sr+Wt?Ut=z-Wt:Ut=0,Ut+=ll,Ze.attr(\"transform\",qB(er-1,Ut-1)),Ze}var Ft=s.selectAll(\"g.hovertext\").data(e,function(bt){return Ole(bt)});return Ft.enter().append(\"g\").classed(\"hovertext\",!0).each(function(){var bt=Db.select(this);bt.append(\"rect\").call(vd.fill,vd.addOpacity(o,.8)),bt.append(\"text\").classed(\"name\",!0),bt.append(\"path\").style(\"stroke-width\",\"1px\"),bt.append(\"text\").classed(\"nums\",!0).call(bm.font,{weight:h,style:d,variant:v,textcase:x,lineposition:b,shadow:p,family:c,size:f})}),Ft.exit().remove(),Ft.each(function(bt){var yt=Db.select(this).attr(\"transform\",\"\"),Yt=bt.color;Array.isArray(Yt)&&(Yt=Yt[bt.eventData[0].pointNumber]);var lr=bt.bgcolor||Yt,Tr=vd.combine(vd.opacity(lr)?lr:vd.defaultLine,o),Rr=vd.combine(vd.opacity(Yt)?Yt:vd.defaultLine,o),ei=bt.borderColor||vd.contrast(Tr),Wr=Ple(bt,O,i,n,k,yt),Ur=Wr[0],dt=Wr[1],Ge=yt.select(\"text.nums\").call(bm.font,{family:bt.fontFamily||c,size:bt.fontSize||f,color:bt.fontColor||ei,weight:bt.fontWeight||h,style:bt.fontStyle||d,variant:bt.fontVariant||v,textcase:bt.fontTextcase||x,lineposition:bt.fontLineposition||b,shadow:bt.fontShadow||p}).text(Ur).attr(\"data-notex\",1).call(A0.positionText,0,0).call(A0.convertToTspans,r),Je=yt.select(\"text.name\"),je=0,$e=0;if(dt&&dt!==Ur){Je.call(bm.font,{family:bt.fontFamily||c,size:bt.fontSize||f,color:Rr,weight:bt.fontWeight||h,style:bt.fontStyle||d,variant:bt.fontVariant||v,textcase:bt.fontTextcase||x,lineposition:bt.fontLineposition||b,shadow:bt.fontShadow||p}).text(dt).attr(\"data-notex\",1).call(A0.positionText,0,0).call(A0.convertToTspans,r);var wt=N3(r,Je.node());je=wt.width+2*ll,$e=wt.height+2*ll}else Je.remove(),yt.select(\"rect\").remove();yt.select(\"path\").style({fill:Tr,stroke:ei});var Ie=bt.xa._offset+(bt.x0+bt.x1)/2,xe=bt.ya._offset+(bt.y0+bt.y1)/2,Ce=Math.abs(bt.x1-bt.x0),vt=Math.abs(bt.y1-bt.y0),nr=N3(r,Ge.node()),ir=nr.width/n._invScaleX,pr=nr.height/n._invScaleY;bt.ty0=(P-nr.top)/n._invScaleY,bt.bx=ir+2*ll,bt.by=Math.max(pr+2*ll,$e),bt.anchor=\"start\",bt.txwidth=ir,bt.tx2width=je,bt.offset=0;var oi=(ir+Qc+ll+je)*n._invScaleX,di,Jr;if(a)bt.pos=Ie,di=xe+vt/2+oi<=z,Jr=xe-vt/2-oi>=0,(bt.idealAlign===\"top\"||!di)&&Jr?(xe-=vt/2,bt.anchor=\"end\"):di?(xe+=vt/2,bt.anchor=\"start\"):bt.anchor=\"middle\",bt.crossPos=xe;else{if(bt.pos=xe,di=Ie+Ce/2+oi<=T,Jr=Ie-Ce/2-oi>=0,(bt.idealAlign===\"left\"||!di)&&Jr)Ie-=Ce/2,bt.anchor=\"end\";else if(di)Ie+=Ce/2,bt.anchor=\"start\";else{bt.anchor=\"middle\";var fi=oi/2,Hi=Ie+fi-T,Pn=Ie-fi;Hi>0&&(Ie-=Hi),Pn<0&&(Ie+=-Pn)}bt.crossPos=Ie}Ge.attr(\"text-anchor\",bt.anchor),je&&Je.attr(\"text-anchor\",bt.anchor),yt.attr(\"transform\",qB(Ie,xe)+(a?Ilt(zle):\"\"))}),{hoverLabels:Ft,commonLabelBoundingBox:j}}function Ple(e,t,r,n,i,a){var o=\"\",s=\"\";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Ff.templateString(e.name,e.trace._meta)),o=Dle(e.name,e.nameLength));var l=r.charAt(0),u=l===\"x\"?\"y\":\"x\";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+=\"x: \"+e.xLabel+\"<br>\"),e.yLabel!==void 0&&(s+=\"y: \"+e.yLabel+\"<br>\"),e.trace.type!==\"choropleth\"&&e.trace.type!==\"choroplethmapbox\"&&e.trace.type!==\"choroplethmap\"&&(s+=(s?\"z: \":\"\")+e.zLabel)):t&&e[l+\"Label\"]===i?s=e[u+\"Label\"]||\"\":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!==\"scattercarpet\"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s=\"(\"+e.xLabel+\", \"+e.yLabel+\")\",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?\"<br>\":\"\")+e.text),e.extraText!==void 0&&(s+=(s?\"<br>\":\"\")+e.extraText),a&&s===\"\"&&!e.hovertemplate&&(o===\"\"&&a.remove(),s=o);var c=e.hovertemplate||!1;if(c){var f=e.hovertemplateLabels||e;e[l+\"Label\"]!==i&&(f[l+\"other\"]=f[l+\"Val\"],f[l+\"otherLabel\"]=f[l+\"Label\"]),s=Ff.hovertemplateString(c,f,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(Glt,function(h,d){return o=Dle(d,e.nameLength),\"\"})}return[s,o]}function Hlt(e,t,r,n){var i=t?\"xa\":\"ya\",a=t?\"ya\":\"xa\",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,x=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var H=Z[i],N=Z[a],j=H._id.charAt(0)===\"x\",re=H.range;c===0&&re&&re[0]>re[1]!==j&&(s=-1);var oe=0,_e=j?r.width:r.height;if(r.hovermode===\"x\"||r.hovermode===\"y\"){var Me=Ble(Z,t),ke=Z.anchor,me=ke===\"end\"?-1:1,ie,Se;if(ke===\"middle\")ie=Z.crossPos+(j?b(Me.y-Z.by/2):x(Z.bx/2+Z.tx2width/2)),Se=ie+(j?b(Z.by):x(Z.bx));else if(j)ie=Z.crossPos+b(Qc+Me.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Le=x(me*Qc+Me.x),Ae=Le+x(me*Z.bx);ie=Z.crossPos+Math.min(Le,Ae),Se=Z.crossPos+Math.max(Le,Ae)}j?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side===\"left\"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side===\"top\"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(j?qlt:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,H){return Z[0].posref-H[0].posref||s*(H[0].traceIndex-Z[0].traceIndex)});var p,C,E,A,L,_,k;function M(Z){var H=Z[0],N=Z[Z.length-1];if(C=H.pmin-H.pos-H.dp+H.size,E=N.pos+N.dp+N.size-H.pmax,C>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=C;p=!1}if(!(E<.01)){if(C<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=E;p=!1}if(p){var j=0;for(A=0;A<Z.length;A++)_=Z[A],_.pos+_.dp+_.size>H.pmax&&j++;for(A=Z.length-1;A>=0&&!(j<=0);A--)_=Z[A],_.pos>H.pmax-1&&(_.del=!0,j--);for(A=0;A<Z.length&&!(j<=0);A++)if(_=Z[A],_.pos<H.pmin+1)for(_.del=!0,j--,E=_.size*2,L=Z.length-1;L>=0;L--)Z[L].dp-=E;for(A=Z.length-1;A>=0&&!(j<=0);A--)_=Z[A],_.pos+_.dp+_.size>H.pmax&&(_.del=!0,j--)}}}for(;!p&&o<=l;){for(o++,p=!0,A=0;A<u.length-1;){var g=u[A],P=u[A+1],T=g[g.length-1],z=P[0];if(C=T.pos+T.dp+T.size-z.pos-z.dp+z.size,C>.01){for(L=P.length-1;L>=0;L--)P[L].dp+=C;for(g.push.apply(g,P),u.splice(A+1,1),k=0,L=g.length-1;L>=0;L--)k+=g[L].dp;for(E=k/g.length,L=g.length-1;L>=0;L--)g[L].dp-=E;p=!1}else A++}u.forEach(M)}for(A=u.length-1;A>=0;A--){var O=u[A];for(L=O.length-1;L>=0;L--){var V=O[L],G=V.datum;G.offset=V.dp,G.del=V.del}}}function Ble(e,t){var r=0,n=e.offset;return t&&(n*=-Nlt,r=e.offset*Blt),{x:r,y:n}}function jlt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+ll),n=r+t*(e.txwidth+ll),i=e.anchor===\"middle\";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+ll),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Nle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Db.select(this);if(o.del)return s.remove();var l=s.select(\"text.nums\"),u=o.anchor,c=u===\"end\"?-1:1,f=jlt(o),h=Ble(o,t),d=h.x,v=h.y,x=u===\"middle\",b=\"hoverlabel\"in o.trace?o.trace.hoverlabel.showarrow:!0,p;x?p=\"M-\"+i(o.bx/2+o.tx2width/2)+\",\"+a(v-o.by/2)+\"h\"+i(o.bx)+\"v\"+a(o.by)+\"h-\"+i(o.bx)+\"Z\":b?p=\"M0,0L\"+i(c*Qc+d)+\",\"+a(Qc+v)+\"v\"+a(o.by/2-Qc)+\"h\"+i(c*o.bx)+\"v-\"+a(o.by)+\"H\"+i(c*Qc+d)+\"V\"+a(v-Qc)+\"Z\":p=\"M\"+i(c*Qc+d)+\",\"+a(v-o.by/2)+\"h\"+i(c*o.bx)+\"v\"+a(o.by)+\"h\"+i(-c*o.bx)+\"Z\",s.select(\"path\").attr(\"d\",p);var C=d+f.textShiftX,E=v+o.ty0-o.by/2+ll,A=o.textAlign||\"auto\";A!==\"auto\"&&(A===\"left\"&&u!==\"start\"?(l.attr(\"text-anchor\",\"start\"),C=x?-o.bx/2-o.tx2width/2+ll:-o.bx-ll):A===\"right\"&&u!==\"end\"&&(l.attr(\"text-anchor\",\"end\"),C=x?o.bx/2-o.tx2width/2-ll:o.bx+ll)),l.call(A0.positionText,i(C),a(E)),o.tx2width&&(s.select(\"text.name\").call(A0.positionText,i(f.text2ShiftX+f.alignShift*ll+d),a(v+o.ty0-o.by/2+ll)),s.select(\"rect\").call(bm.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Wlt(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sy(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=Ff.castOption(i,r,h);return o(v)?v:Ff.extractOption({},n,\"\",d)}:function(h,d){return Ff.extractOption(a,n,h,d)};function l(h,d,v){var x=s(d,v);o(x)&&(e[h]=x)}if(l(\"hoverinfo\",\"hi\",\"hoverinfo\"),l(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),l(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),l(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),l(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),l(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),l(\"fontWeight\",\"htw\",\"hoverlabel.font.weight\"),l(\"fontStyle\",\"hty\",\"hoverlabel.font.style\"),l(\"fontVariant\",\"htv\",\"hoverlabel.font.variant\"),l(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),l(\"textAlign\",\"hta\",\"hoverlabel.align\"),e.posref=t===\"y\"||t===\"closest\"&&n.orientation===\"h\"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Ff.constrain(e.x0,0,e.xa._length),e.x1=Ff.constrain(e.x1,0,e.xa._length),e.y0=Ff.constrain(e.y0,0,e.ya._length),e.y1=Ff.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel=\"xLabel\"in e?e.xLabel:wm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel=\"yLabel\"in e?e.yLabel:wm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type===\"log\"&&e.xerr<=0)){var u=wm.tickText(e.xa,e.xa.c2l(e.xerr),\"hover\").text;e.xerrneg!==void 0?e.xLabel+=\" +\"+u+\" / -\"+wm.tickText(e.xa,e.xa.c2l(e.xerrneg),\"hover\").text:e.xLabel+=\" \\xB1 \"+u,t===\"x\"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type===\"log\"&&e.yerr<=0)){var c=wm.tickText(e.ya,e.ya.c2l(e.yerr),\"hover\").text;e.yerrneg!==void 0?e.yLabel+=\" +\"+c+\" / -\"+wm.tickText(e.ya,e.ya.c2l(e.yerrneg),\"hover\").text:e.yLabel+=\" \\xB1 \"+c,t===\"y\"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!==\"all\"&&(f=Array.isArray(f)?f:f.split(\"+\"),f.indexOf(\"x\")===-1&&(e.xLabel=void 0),f.indexOf(\"y\")===-1&&(e.yLabel=void 0),f.indexOf(\"z\")===-1&&(e.zLabel=void 0),f.indexOf(\"text\")===-1&&(e.text=void 0),f.indexOf(\"name\")===-1&&(e.name=void 0)),e}function Ile(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(\".spikeline\").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var x=c.spikesnap;x===\"cursor\"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Cle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,C=c.spikethickness,E=c.spikecolor||b,A=wm.getPxPosition(e,c),L,_;if(p.indexOf(\"toaxis\")!==-1||p.indexOf(\"across\")!==-1){if(p.indexOf(\"toaxis\")!==-1&&(L=A,_=d),p.indexOf(\"across\")!==-1){var k=c._counterDomainMin,M=c._counterDomainMax;c.anchor===\"free\"&&(k=Math.min(k,c.position),M=Math.max(M,c.position)),L=a.l+k*a.w,_=a.l+M*a.w}n.insert(\"line\",\":first-child\").attr({x1:L,x2:_,y1:v,y2:v,\"stroke-width\":C,stroke:E,\"stroke-dasharray\":bm.dashStyle(c.spikedash,C)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),n.insert(\"line\",\":first-child\").attr({x1:L,x2:_,y1:v,y2:v,\"stroke-width\":C+2,stroke:f}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}p.indexOf(\"marker\")!==-1&&n.insert(\"circle\",\":first-child\").attr({cx:A+(c.side!==\"right\"?C:-C),cy:v,r:C,fill:E}).classed(\"spikeline\",!0)}if(l){var g=t.vLinePoint,P,T;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z===\"cursor\"?(P=o.pointerX,T=o.pointerY):(P=u._offset+g.x,T=c._offset+g.y);var O=Cle.readability(g.color,f)<1.5?vd.contrast(f):g.color,V=u.spikemode,G=u.spikethickness,Z=u.spikecolor||O,H=wm.getPxPosition(e,u),N,j;if(V.indexOf(\"toaxis\")!==-1||V.indexOf(\"across\")!==-1){if(V.indexOf(\"toaxis\")!==-1&&(N=H,j=T),V.indexOf(\"across\")!==-1){var re=u._counterDomainMin,oe=u._counterDomainMax;u.anchor===\"free\"&&(re=Math.min(re,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,j=a.t+(1-re)*a.h}n.insert(\"line\",\":first-child\").attr({x1:P,x2:P,y1:N,y2:j,\"stroke-width\":G,stroke:Z,\"stroke-dasharray\":bm.dashStyle(u.spikedash,G)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),n.insert(\"line\",\":first-child\").attr({x1:P,x2:P,y1:N,y2:j,\"stroke-width\":G+2,stroke:f}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}V.indexOf(\"marker\")!==-1&&n.insert(\"circle\",\":first-child\").attr({cx:P,cy:H-(u.side!==\"top\"?G:-G),r:G,fill:Z}).classed(\"spikeline\",!0)}}}function Xlt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Rle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Dle(e,t){return A0.plainText(e||\"\",{len:t,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\",\"s\",\"u\"]})}function Zlt(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o<e.length;o++){var s=e[o];U3.traceIs(s.trace,\"bar-like\")||U3.traceIs(s.trace,\"box-violin\")?a.push(s):s.trace[r+\"period\"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}function Fle(e,t,r){var n=t[e+\"a\"],i=t[e+\"Val\"],a=t.cd[0];if(n.type===\"category\"||n.type===\"multicategory\")i=n._categoriesMap[i];else if(n.type===\"date\"){var o=t.trace[e+\"periodalignment\"];if(o){var s=t.cd[t.index],l=s[e+\"Start\"];l===void 0&&(l=s[e]);var u=s[e+\"End\"];u===void 0&&(u=s[e]);var c=u-l;o===\"end\"?i+=c:o===\"middle\"&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(r.boxmode===\"group\"||r.violinmode===\"group\")&&(i+=a.t.dPos),i}function Ule(e){return e.offsetTop+e.clientTop}function Vle(e){return e.offsetLeft+e.clientLeft}function N3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=Ff.apply3DTransform(r._invTransform)(i,a),u=Ff.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var cM=ye((gnr,Gle)=>{\"use strict\";var Ylt=Dr(),Klt=Ca(),Jlt=rp().isUnifiedHover;Gle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&Jlt(r.hovermode)&&(i.font||(i.font={}),o(\"size\"),o(\"family\"),o(\"color\"),o(\"weight\"),o(\"style\"),o(\"variant\"),a?(i.bgcolor||(i.bgcolor=Klt.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n(\"hoverlabel.bgcolor\",i.bgcolor),n(\"hoverlabel.bordercolor\",i.bordercolor),n(\"hoverlabel.namelength\",i.namelength),n(\"hoverlabel.showarrow\",i.showarrow),Ylt.coerceFont(n,\"hoverlabel.font\",i.font),n(\"hoverlabel.align\",i.align)}});var jle=ye((mnr,Hle)=>{\"use strict\";var $lt=Dr(),Qlt=cM(),eut=B1();Hle.exports=function(t,r){function n(i,a){return $lt.coerce(t,r,eut,i,a)}Qlt(t,r,n)}});var Zle=ye((ynr,Xle)=>{\"use strict\";var Wle=Dr(),tut=i3(),rut=cM();Xle.exports=function(t,r,n,i){function a(s,l){return Wle.coerce(t,r,tut,s,l)}var o=Wle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),rut(t,r,a,o)}});var VB=ye((_nr,Yle)=>{\"use strict\";var iut=Dr(),nut=B1();Yle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:iut.coerce(t,r,nut,i,a)}return n(\"clickmode\"),n(\"hoversubplots\"),n(\"hovermode\")}});var $le=ye((xnr,Jle)=>{\"use strict\";var Kle=Dr(),aut=B1(),out=VB(),sut=cM();Jle.exports=function(t,r){function n(c,f){return Kle.coerce(t,r,aut,c,f)}var i=out(t,r);i&&(n(\"hoverdistance\"),n(\"spikedistance\"));var a=n(\"dragmode\");a===\"select\"&&n(\"selectdirection\");var o=r._has(\"mapbox\"),s=r._has(\"map\"),l=r._has(\"geo\"),u=r._basePlotModules.length;r.dragmode===\"zoom\"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode=\"pan\"),sut(t,r,n),Kle.coerceFont(n,\"hoverlabel.grouptitlefont\",r.hoverlabel.font)}});var tue=ye((bnr,eue)=>{\"use strict\";var GB=Dr(),Qle=qa();eue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return GB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a<r.length;a++){var o=r[a],s=o[0].trace;if(!Qle.traceIs(s,\"pie-like\")){var l=Qle.traceIs(s,\"2dMap\")?lut:GB.fillArray;l(s.hoverinfo,o,\"hi\",i(s)),s.hovertemplate&&l(s.hovertemplate,o,\"ht\"),s.hoverlabel&&(l(s.hoverlabel.bgcolor,o,\"hbg\"),l(s.hoverlabel.bordercolor,o,\"hbc\"),l(s.hoverlabel.font.size,o,\"hts\"),l(s.hoverlabel.font.color,o,\"htc\"),l(s.hoverlabel.font.family,o,\"htf\"),l(s.hoverlabel.font.weight,o,\"htw\"),l(s.hoverlabel.font.style,o,\"hty\"),l(s.hoverlabel.font.variant,o,\"htv\"),l(s.hoverlabel.namelength,o,\"hnl\"),l(s.hoverlabel.align,o,\"hta\"),l(s.hoverlabel.showarrow,o,\"htsa\"))}}};function lut(e,t,r,n){n=n||GB.identity,Array.isArray(e)&&(t[0][r]=n(e))}});var iue=ye((wnr,rue)=>{\"use strict\";var uut=qa(),cut=UB().hover;rue.exports=function(t,r,n){var i=uut.getComponentMethod(\"annotations\",\"onClick\")(t,t._hoverdata);n!==void 0&&cut(t,r,n,!0);function a(){t.emit(\"plotly_click\",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(i&&i.then?i.then(a):a(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Tnr,oue)=>{\"use strict\";var fut=Oa(),GL=Dr(),hut=yv(),fM=rp(),nue=B1(),aue=UB();oue.exports={moduleType:\"component\",name:\"fx\",constants:RS(),schema:{layout:nue},attributes:i3(),layoutAttributes:nue,supplyLayoutGlobalDefaults:jle(),supplyDefaults:Zle(),supplyLayoutDefaults:$le(),calc:tue(),getDistanceFunction:fM.getDistanceFunction,getClosest:fM.getClosest,inbox:fM.inbox,quadrature:fM.quadrature,appendArrayPointValue:fM.appendArrayPointValue,castHoverOption:vut,castHoverinfo:put,hover:aue.hover,unhover:hut.unhover,loneHover:aue.loneHover,loneUnhover:dut,click:iue()};function dut(e){var t=GL.isD3Selection(e)?e:fut.select(e);t.selectAll(\"g.hovertext\").remove(),t.selectAll(\".spikeline\").remove()}function vut(e,t,r){return GL.castOption(e,t,\"hoverlabel.\"+r)}function put(e,t,r){function n(i){return GL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return GL.castOption(e,r,\"hoverinfo\",n)}});var Sg=ye(My=>{\"use strict\";My.selectMode=function(e){return e===\"lasso\"||e===\"select\"};My.drawMode=function(e){return e===\"drawclosedpath\"||e===\"drawopenpath\"||e===\"drawline\"||e===\"drawrect\"||e===\"drawcircle\"};My.openMode=function(e){return e===\"drawline\"||e===\"drawopenpath\"};My.rectMode=function(e){return e===\"select\"||e===\"drawline\"||e===\"drawrect\"||e===\"drawcircle\"};My.freeMode=function(e){return e===\"lasso\"||e===\"drawclosedpath\"||e===\"drawopenpath\"};My.selectingOrDrawing=function(e){return My.freeMode(e)||My.rectMode(e)}});var hM=ye((Snr,sue)=>{\"use strict\";sue.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var HL=ye((Mnr,lue)=>{\"use strict\";lue.exports={undo:{width:857.1,height:1e3,path:\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\",transform:\"matrix(1 0 0 -1 0 850)\"},home:{width:928.6,height:1e3,path:\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"camera-retro\":{width:1e3,height:1e3,path:\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoombox:{width:1e3,height:1e3,path:\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\",transform:\"matrix(1 0 0 -1 0 850)\"},pan:{width:1e3,height:1e3,path:\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_plus:{width:875,height:1e3,path:\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_minus:{width:875,height:1e3,path:\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\",transform:\"matrix(1 0 0 -1 0 850)\"},autoscale:{width:1e3,height:1e3,path:\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_basic:{width:1500,height:1e3,path:\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_compare:{width:1125,height:1e3,path:\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\",transform:\"matrix(1 0 0 -1 0 850)\"},plotlylogo:{width:1542,height:1e3,path:\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"z-axis\":{width:1e3,height:1e3,path:\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"3d_rotate\":{width:1e3,height:1e3,path:\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\",transform:\"matrix(1 0 0 -1 0 850)\"},camera:{width:1e3,height:1e3,path:\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\",transform:\"matrix(1 0 0 -1 0 850)\"},movie:{width:1e3,height:1e3,path:\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\",transform:\"matrix(1 0 0 -1 0 850)\"},question:{width:857.1,height:1e3,path:\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\",transform:\"matrix(1 0 0 -1 0 850)\"},disk:{width:857.1,height:1e3,path:\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\",transform:\"matrix(1 0 0 -1 0 850)\"},drawopenpath:{width:70,height:70,path:\"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawclosedpath:{width:90,height:90,path:\"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z\",transform:\"matrix(1 0 0 1 -5 -5)\"},lasso:{width:1031,height:1e3,path:\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\",transform:\"matrix(1 0 0 -1 0 850)\"},selectbox:{width:1e3,height:1e3,path:\"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z\",transform:\"matrix(1 0 0 -1 0 850)\"},drawline:{width:70,height:70,path:\"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawrect:{width:80,height:80,path:\"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},drawcircle:{width:80,height:80,path:\"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},eraseshape:{width:80,height:80,path:\"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},spikeline:{width:1e3,height:1e3,path:\"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z\",transform:\"matrix(1.5 0 0 -1.5 0 850)\"},pencil:{width:1792,height:1792,path:\"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z\",transform:\"matrix(1 0 0 1 0 1)\"},newplotlylogo:{name:\"newplotlylogo\",svg:[\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>\",\" <title>plotly-logomark</title>\",\" <g id='symbol'>\",\"  <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>\",\"  <circle fill='#9EF' cx='102' cy='30' r='6'/>\",\"  <circle fill='#BAC' cx='78' cy='30' r='6'/>\",\"  <circle fill='#BAC' cx='78' cy='54' r='6'/>\",\"  <circle fill='#D69' cx='54' cy='30' r='6'/>\",\"  <circle fill='#F26' cx='30' cy='30' r='6'/>\",\"  <circle fill='#F26' cx='30' cy='54' r='6'/>\",\"  <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>\",\"  <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>\",\"  <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>\",\"  <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>\",\" </g>\",\"</svg>\"].join(\"\")}}});var WL=ye((Enr,uue)=>{\"use strict\";var jL=32;uue.exports={CIRCLE_SIDES:jL,i000:0,i090:jL/4,i180:jL/2,i270:jL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var XL=ye((Cnr,fue)=>{\"use strict\";var gut=Dr().strTranslate;function cue(e,t){switch(e.type){case\"log\":return e.p2d(t);case\"date\":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function mut(e,t){switch(e.type){case\"log\":return e.d2p(t);case\"date\":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function yut(e){var t=e._id.charAt(0)===\"y\"?1:0;return function(r){return cue(e,r[t])}}function _ut(e){return gut(e.xaxis._offset,e.yaxis._offset)}fue.exports={p2r:cue,r2p:mut,axValue:yut,getTransform:_ut}});var u_=ye(Ey=>{\"use strict\";var xut=$S(),vue=WL(),V3=vue.CIRCLE_SIDES,HB=vue.SQRT2,pue=XL(),hue=pue.p2r,due=pue.r2p,but=[0,3,4,5,6,1,2],wut=[0,3,4,1,2];Ey.writePaths=function(e){var t=e.length;if(!t)return\"M0,0Z\";for(var r=\"\",n=0;n<t;n++)for(var i=e[n].length,a=0;a<i;a++){var o=e[n][a][0];if(o===\"Z\")r+=\"Z\";else for(var s=e[n][a].length,l=0;l<s;l++){var u=l;o===\"Q\"||o===\"S\"?u=wut[l]:o===\"C\"&&(u=but[l]),r+=e[n][a][u],l>0&&l<s-1&&(r+=\",\")}}return r};Ey.readPaths=function(e,t,r,n){var i=xut(e),a=[],o=-1,s=function(){o++,a[o]=[]},l,u=0,c=0,f,h,d=function(){f=u,h=c};d();for(var v=0;v<i.length;v++){var x=[],b,p,C,E,A=i[v][0],L=A;switch(A){case\"M\":s(),u=+i[v][1],c=+i[v][2],x.push([L,u,c]),d();break;case\"Q\":case\"S\":b=+i[v][1],C=+i[v][2],u=+i[v][3],c=+i[v][4],x.push([L,u,c,b,C]);break;case\"C\":b=+i[v][1],C=+i[v][2],p=+i[v][3],E=+i[v][4],u=+i[v][5],c=+i[v][6],x.push([L,u,c,b,C,p,E]);break;case\"T\":case\"L\":u=+i[v][1],c=+i[v][2],x.push([L,u,c]);break;case\"H\":L=\"L\",u=+i[v][1],x.push([L,u,c]);break;case\"V\":L=\"L\",c=+i[v][1],x.push([L,u,c]);break;case\"A\":L=\"L\";var _=+i[v][1],k=+i[v][2];+i[v][4]||(_=-_,k=-k);var M=u-_,g=c;for(l=1;l<=V3/2;l++){var P=2*Math.PI*l/V3;x.push([L,M+_*Math.cos(P),g+k*Math.sin(P)])}break;case\"Z\":(u!==f||c!==h)&&(u=f,c=h,x.push([L,u,c]));break}for(var T=(r||{}).domain,z=t._fullLayout._size,O=r&&r.xsizemode===\"pixel\",V=r&&r.ysizemode===\"pixel\",G=n===!1,Z=0;Z<x.length;Z++){for(l=0;l+2<7;l+=2){var H=x[Z][l+1],N=x[Z][l+2];H===void 0||N===void 0||(u=H,c=N,r&&(r.xaxis&&r.xaxis.p2r?(G&&(H-=r.xaxis._offset),O?H=due(r.xaxis,r.xanchor)+H:H=hue(r.xaxis,H)):(G&&(H-=z.l),T?H=T.x[0]+H/z.w:H=H/z.w),r.yaxis&&r.yaxis.p2r?(G&&(N-=r.yaxis._offset),V?N=due(r.yaxis,r.yanchor)-N:N=hue(r.yaxis,N)):(G&&(N-=z.t),T?N=T.y[1]-N/z.h:N=1-N/z.h)),x[Z][l+1]=H,x[Z][l+2]=N)}a[o].push(x[Z].slice())}}return a};function dM(e,t){return Math.abs(e-t)<=1e-6}function ZL(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}Ey.pointsOnRectangle=function(e){var t=e.length;if(t!==5)return!1;for(var r=1;r<3;r++){var n=e[0][r]-e[1][r],i=e[3][r]-e[2][r];if(!dM(n,i))return!1;var a=e[0][r]-e[3][r],o=e[1][r]-e[2][r];if(!dM(a,o))return!1}return!dM(e[0][1],e[1][1])&&!dM(e[0][1],e[3][1])?!1:!!(ZL(e[0],e[1])*ZL(e[0],e[3]))};Ey.pointsOnEllipse=function(e){var t=e.length;if(t!==V3+1)return!1;t=V3;for(var r=0;r<t;r++){var n=(t*2-r)%t,i=(t/2+n)%t,a=(t/2+r)%t;if(!dM(ZL(e[r],e[a]),ZL(e[n],e[i])))return!1}return!0};Ey.handleEllipse=function(e,t,r){if(!e)return[t,r];var n=Ey.ellipseOver({x0:t[0],y0:t[1],x1:r[0],y1:r[1]}),i=(n.x1+n.x0)/2,a=(n.y1+n.y0)/2,o=(n.x1-n.x0)/2,s=(n.y1-n.y0)/2;o||(o=s=s/HB),s||(s=o=o/HB);for(var l=[],u=0;u<V3;u++){var c=u*2*Math.PI/V3;l.push([i+o*Math.cos(c),a+s*Math.sin(c)])}return l};Ey.ellipseOver=function(e){var t=e.x0,r=e.y0,n=e.x1,i=e.y1,a=n-t,o=i-r;t-=a,r-=o;var s=(t+n)/2,l=(r+i)/2,u=HB;return a*=u,o*=u,{x0:s-a,y0:l-o,x1:s+a,y1:l+o}};Ey.fixDatesForPaths=function(e,t,r){var n=t.type===\"date\",i=r.type===\"date\";if(!n&&!i)return e;for(var a=0;a<e.length;a++)for(var o=0;o<e[a].length;o++)for(var s=0;s+2<e[a][o].length;s+=2)n&&(e[a][o][s+1]=e[a][o][s+1].replace(\" \",\"_\")),i&&(e[a][o][s+2]=e[a][o][s+2].replace(\" \",\"_\"));return e}});var JL=ye((Lnr,Aue)=>{\"use strict\";var gue=hf(),bue=Sg(),Tut=bue.drawMode,Aut=bue.openMode,G3=WL(),mue=G3.i000,yue=G3.i090,_ue=G3.i180,xue=G3.i270,Sut=G3.cos45,Mut=G3.sin45,wue=XL(),YL=wue.p2r,c_=wue.r2p,Eut=Q1(),Cut=Eut.clearOutline,KL=u_(),kut=KL.readPaths,Lut=KL.writePaths,Put=KL.ellipseOver,Iut=KL.fixDatesForPaths;function Rut(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!Tut(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s<o.length)switch(n._fullLayout.shapes[s].type){case\"rect\":a=\"drawrect\";break;case\"circle\":a=\"drawcircle\";break;case\"line\":a=\"drawline\";break;case\"path\":var l=o[s].path||\"\";l[l.length-1]===\"Z\"?a=\"drawclosedpath\":a=\"drawopenpath\";break}}var u=Tue(e,t,a);Cut(n);for(var c=t.editHelpers,f=(c||{}).modifyItem,h=[],d=0;d<o.length;d++){var v=n._fullLayout.shapes[d];if(h[d]=v._input,i!==void 0&&d===n._fullLayout._activeShapeIndex){var x=u;switch(v.type){case\"line\":case\"rect\":case\"circle\":var b=gue.getFromId(n,v.xref);v.xref.charAt(0)===\"x\"&&b.type.includes(\"category\")?(f(\"x0\",x.x0-(v.x0shift||0)),f(\"x1\",x.x1-(v.x1shift||0))):(f(\"x0\",x.x0),f(\"x1\",x.x1));var p=gue.getFromId(n,v.yref);v.yref.charAt(0)===\"y\"&&p.type.includes(\"category\")?(f(\"y0\",x.y0-(v.y0shift||0)),f(\"y1\",x.y1-(v.y1shift||0))):(f(\"y0\",x.y0),f(\"y1\",x.y1));break;case\"path\":f(\"path\",x.path);break}}}return i===void 0?(h.push(u),h):c?c.getUpdateObj():{}}}}function Tue(e,t,r){var n=e[0][0],i=t.gd,a=n.getAttribute(\"d\"),o=i._fullLayout.newshape,s=t.plotinfo,l=t.isActiveShape,u=s.xaxis,c=s.yaxis,f=!!s.domain||!s.xaxis,h=!!s.domain||!s.yaxis,d=Aut(r),v=kut(a,i,s,l),x={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:f?\"paper\":u._id,yref:h?\"paper\":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};d||(x.fillcolor=o.fillcolor,x.fillrule=o.fillrule);var b;if(v.length===1&&(b=v[0]),b&&b.length===5&&r===\"drawrect\")x.type=\"rect\",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[2][1],x.y1=b[2][2];else if(b&&r===\"drawline\")x.type=\"line\",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[1][1],x.y1=b[1][2];else if(b&&r===\"drawcircle\"){x.type=\"circle\";var p=b[mue][1],C=b[yue][1],E=b[_ue][1],A=b[xue][1],L=b[mue][2],_=b[yue][2],k=b[_ue][2],M=b[xue][2],g=s.xaxis&&(s.xaxis.type===\"date\"||s.xaxis.type===\"log\"),P=s.yaxis&&(s.yaxis.type===\"date\"||s.yaxis.type===\"log\");g&&(p=c_(s.xaxis,p),C=c_(s.xaxis,C),E=c_(s.xaxis,E),A=c_(s.xaxis,A)),P&&(L=c_(s.yaxis,L),_=c_(s.yaxis,_),k=c_(s.yaxis,k),M=c_(s.yaxis,M));var T=(C+A)/2,z=(L+k)/2,O=(A-C+E-p)/2,V=(M-_+k-L)/2,G=Put({x0:T,y0:z,x1:T+O*Sut,y1:z+V*Mut});g&&(G.x0=YL(s.xaxis,G.x0),G.x1=YL(s.xaxis,G.x1)),P&&(G.y0=YL(s.yaxis,G.y0),G.y1=YL(s.yaxis,G.y1)),x.x0=G.x0,x.y0=G.y0,x.x1=G.x1,x.y1=G.y1}else x.type=\"path\",u&&c&&Iut(v,u,c),x.path=Lut(v),b=null;return x}Aue.exports={newShapes:Rut,createShapeObj:Tue}});var WB=ye((Pnr,Sue)=>{\"use strict\";var Dut=Sg(),Fut=Dut.selectMode,zut=Q1(),Out=zut.clearOutline,jB=u_(),qut=jB.readPaths,But=jB.writePaths,Nut=jB.fixDatesForPaths;Sue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute(\"d\"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!Fut(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d<h.length)switch(a._fullLayout.selections[d].type){case\"rect\":f=\"select\";break;case\"path\":f=\"lasso\";break}}var v=qut(i,a,s,c),x={xref:l._id,yref:u._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},b;v.length===1&&(b=v[0]),b&&b.length===5&&f===\"select\"?(x.type=\"rect\",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[2][1],x.y1=b[2][2]):(x.type=\"path\",l&&u&&Nut(v,l,u),x.path=But(v),b=null),Out(a);for(var p=r.editHelpers,C=(p||{}).modifyItem,E=[],A=0;A<h.length;A++){var L=a._fullLayout.selections[A];if(!L){E[A]=L;continue}if(E[A]=L._input,c!==void 0&&A===a._fullLayout._activeSelectionIndex){var _=x;switch(L.type){case\"rect\":C(\"x0\",_.x0),C(\"x1\",_.x1),C(\"y0\",_.y0),C(\"y1\",_.y1);break;case\"path\":C(\"path\",_.path);break}}}return c===void 0?(E.push(x),E):p?p.getUpdateObj():{}}}}});var vM=ye((Inr,Mue)=>{\"use strict\";Mue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var f_=ye(Dd=>{\"use strict\";var zb=vM(),Eue=Dr(),$L=ho();Dd.rangeToShapePosition=function(e){return e.type===\"log\"?e.r2d:function(t){return t}};Dd.shapePositionToRange=function(e){return e.type===\"log\"?e.d2r:function(t){return t}};Dd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace(\"_\",\" \")),e(t)}};Dd.encodeDate=function(e){return function(t){return e(t).replace(\" \",\"_\")}};Dd.extractPathCoords=function(e,t,r){var n=[],i=e.match(zb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(zb.paramRE);if(!(!s||s.length<o)){var l=s[o],u=r?l:Eue.cleanNumber(l);n.push(u)}}}),n};Dd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i===\"domain\")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Dd.shapePositionToRange(t);o=function(l){var u=pM(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type===\"date\"&&(o=Dd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Dd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n===\"domain\")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Dd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Dd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Dd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!==\"paper\"&&(n.xaxis=e._fullLayout[r.xref+\"axis\"]),r.yref&&r.yref!==\"paper\"&&(n.yaxis=e._fullLayout[r.yref+\"axis\"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Dd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+\"axis\"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+\"axis\"])),{options:r,plotinfo:n}};Dd.getPathString=function(e,t){var r=t.type,n=$L.getRefType(t.xref),i=$L.getRefType(t.yref),a=$L.getFromId(e,t.xref),o=$L.getFromId(e,t.yref),s=e._fullLayout._size,l,u,c,f,h=pM(a,t.x0shift),d=pM(a,t.x1shift),v=pM(o,t.y0shift),x=pM(o,t.y1shift),b,p,C,E;if(a?n===\"domain\"?u=function(O){return a._offset+a._length*O}:(l=Dd.shapePositionToRange(a),u=function(O){return a._offset+a.r2p(l(O,!0))}):u=function(O){return s.l+s.w*O},o?i===\"domain\"?f=function(O){return o._offset+o._length*(1-O)}:(c=Dd.shapePositionToRange(o),f=function(O){return o._offset+o.r2p(c(O,!0))}):f=function(O){return s.t+s.h*(1-O)},r===\"path\")return a&&a.type===\"date\"&&(u=Dd.decodeDate(u)),o&&o.type===\"date\"&&(f=Dd.decodeDate(f)),Uut(t,u,f);if(t.xsizemode===\"pixel\"){var A=u(t.xanchor);b=A+t.x0+h,p=A+t.x1+d}else b=u(t.x0)+h,p=u(t.x1)+d;if(t.ysizemode===\"pixel\"){var L=f(t.yanchor);C=L-t.y0+v,E=L-t.y1+x}else C=f(t.y0)+v,E=f(t.y1)+x;if(r===\"line\")return\"M\"+b+\",\"+C+\"L\"+p+\",\"+E;if(r===\"rect\")return\"M\"+b+\",\"+C+\"H\"+p+\"V\"+E+\"H\"+b+\"Z\";var _=(b+p)/2,k=(C+E)/2,M=Math.abs(_-b),g=Math.abs(k-C),P=\"A\"+M+\",\"+g,T=_+M+\",\"+k,z=_+\",\"+(k-g);return\"M\"+T+P+\" 0 1,1 \"+z+P+\" 0 0,1 \"+T+\"Z\"};function Uut(e,t,r){var n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor;return n.replace(zb.segmentRE,function(l){var u=0,c=l.charAt(0),f=zb.paramIsX[c],h=zb.paramIsY[c],d=zb.numParams[c],v=l.substr(1).replace(zb.paramRE,function(x){return f[u]?i===\"pixel\"?x=t(o)+Number(x):x=t(x):h[u]&&(a===\"pixel\"?x=r(s)-Number(x):x=r(x)),u++,u>d&&(x=\"X\"),x});return u>d&&(v=v.replace(/[\\s,]*X.*/,\"\"),Eue.log(\"Ignoring extra params in segment \"+l)),c+v})}function pM(e,t){t=t||0;var r=0;return t&&e&&(e.type===\"category\"||e.type===\"multicategory\")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var ZB=ye((Dnr,Pue)=>{\"use strict\";var Vut=Dr(),H3=ho(),Cue=ru(),kue=So(),Gut=u_().readPaths,XB=f_(),Hut=XB.getPathString,Lue=A6(),jut=Kh().FROM_TL;Pue.exports=function(t,r,n,i){if(i.selectAll(\".shape-label\").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!==\"path\"){var s=H3.getFromId(t,n.xref),l=H3.getFromId(t,n.yref);for(var u in Lue){var c=Lue[u](n,s,l);c!==void 0&&(o[u]=c)}}a=Vut.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}else a=n.label.text;var f={\"data-index\":r},h=n.label.font,d={\"data-notex\":1},v=i.append(\"g\").attr(f).classed(\"shape-label\",!0),x=v.append(\"text\").attr(d).classed(\"shape-label-text\",!0).text(a),b,p,C,E;if(n.path){var A=Hut(t,n),L=Gut(A,t);b=1/0,C=1/0,p=-1/0,E=-1/0;for(var _=0;_<L.length;_++)for(var k=0;k<L[_].length;k++)for(var M=L[_][k],g=1;g<M.length;g+=2){var P=M[g],T=M[g+1];b=Math.min(b,P),p=Math.max(p,P),C=Math.min(C,T),E=Math.max(E,T)}}else{var z=H3.getFromId(t,n.xref),O=n.x0shift,V=n.x1shift,G=H3.getRefType(n.xref),Z=H3.getFromId(t,n.yref),H=n.y0shift,N=n.y1shift,j=H3.getRefType(n.yref),re=function(Le,Ae){var De=XB.getDataToPixel(t,z,Ae,!1,G);return De(Le)},oe=function(Le,Ae){var De=XB.getDataToPixel(t,Z,Ae,!0,j);return De(Le)};b=re(n.x0,O),p=re(n.x1,V),C=oe(n.y0,H),E=oe(n.y1,N)}var _e=n.label.textangle;_e===\"auto\"&&(n.type===\"line\"?_e=Wut(b,C,p,E):_e=0),x.call(function(Le){return Le.call(kue.font,h).attr({}),Cue.convertToTspans(Le,t),Le});var Me=kue.bBox(x.node()),ke=Xut(b,C,p,E,n,_e,Me),me=ke.textx,ie=ke.texty,Se=ke.xanchor;x.attr({\"text-anchor\":{left:\"start\",center:\"middle\",right:\"end\"}[Se],y:ie,x:me,transform:\"rotate(\"+_e+\",\"+me+\",\"+ie+\")\"}).call(Cue.positionText,me,ie)}};function Wut(e,t,r,n){var i,a;return a=Math.abs(r-e),r>=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Xut(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,x=i.label.yanchor,b,p,C,E;if(c===\"line\"){s===\"start\"?(b=e,p=t):s===\"end\"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v===\"auto\"&&(s===\"start\"?l===\"auto\"?r>e?v=\"left\":r<e?v=\"right\":v=\"center\":r>e?v=\"right\":r<e?v=\"left\":v=\"center\":s===\"end\"?l===\"auto\"?r>e?v=\"right\":r<e?v=\"left\":v=\"center\":r>e?v=\"left\":r<e?v=\"right\":v=\"center\":v=\"center\");var A={left:1,center:0,right:-1},L={bottom:-1,middle:0,top:1};if(l===\"auto\"){var _=L[x];C=-u*h*_,E=u*d*_}else{var k=A[v],M=L[x];C=u*k,E=u*M}b=b+C,p=p+E}else C=u+3,s.indexOf(\"right\")!==-1?(b=Math.max(e,r)-C,v===\"auto\"&&(v=\"right\")):s.indexOf(\"left\")!==-1?(b=Math.min(e,r)+C,v===\"auto\"&&(v=\"left\")):(b=(e+r)/2,v===\"auto\"&&(v=\"center\")),s.indexOf(\"top\")!==-1?p=Math.min(t,n):s.indexOf(\"bottom\")!==-1?p=Math.max(t,n):p=(t+n)/2,E=u,x===\"bottom\"?p=p-E:x===\"top\"&&(p=p+E);var g=jut[x],P=i.label.font.size,T=o.height,z=(T*g-P)*h,O=-(T*g-P)*d;return{textx:b+z,texty:p+O,xanchor:v}}});var tP=ye((Fnr,Bue)=>{\"use strict\";var Zut=Dr(),Yut=Zut.strTranslate,Iue=yv(),Fue=Sg(),Kut=Fue.drawMode,zue=Fue.selectMode,Oue=qa(),Rue=Ca(),eP=WL(),Jut=eP.i000,$ut=eP.i090,Qut=eP.i180,ect=eP.i270,tct=Q1(),que=tct.clearOutlineControllers,KB=u_(),QL=KB.pointsOnRectangle,YB=KB.pointsOnEllipse,rct=KB.writePaths,ict=JL().newShapes,nct=JL().createShapeObj,act=WB(),oct=ZB();Bue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(YB(t[0])||n.hasText)&&s({redrawing:!0})}function s(H){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=ict(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=act(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Oue.call((H||{}).redrawing?\"relayout\":\"_guiRelayout\",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Kut(c),h=zue(c);(f||h)&&(a._fullLayout._outlining=!0),que(a),r.attr(\"d\",rct(t));var d,v,x,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=sct([],t);var C=u.append(\"g\").attr(\"class\",\"outline-controllers\");P(C),Z()}if(f&&n.hasText){var E=u.select(\".label-temp\"),A=nct(r,n,n.dragmode);oct(a,\"label-temp\",A,E)}function L(H){x=+H.srcElement.getAttribute(\"data-i\"),b=+H.srcElement.getAttribute(\"data-j\"),d[x][b].moveFn=_}function _(H,N){if(t.length){var j=p[x][b][1],re=p[x][b][2],oe=t[x],_e=oe.length;if(QL(oe)){var Me=H,ke=N;if(n.isActiveSelection){var me=Due(oe,b);me[1]===oe[b][1]?ke=0:Me=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=j+Me),Se[2]===oe[b][2]&&(Se[2]=re+ke)}if(oe[b][1]=j+Me,oe[b][2]=re+ke,!QL(oe))for(var Le=0;Le<_e;Le++)for(var Ae=0;Ae<oe[Le].length;Ae++)oe[Le][Ae]=p[x][Le][Ae]}else oe[b][1]=j+H,oe[b][2]=re+N;o()}}function k(){s()}function M(){if(t.length&&t[x]&&t[x].length){for(var H=[],N=0;N<t[x].length;N++)N!==b&&H.push(t[x][N]);H.length>1&&!(H.length===2&&H[1][0]===\"Z\")&&(b===0&&(H[0][0]=\"M\"),t[x]=H,o(),s())}}function g(H,N){if(H===2){x=+N.srcElement.getAttribute(\"data-i\"),b=+N.srcElement.getAttribute(\"data-j\");var j=t[x];!QL(j)&&!YB(j)&&M()}}function P(H){d=[];for(var N=0;N<t.length;N++){var j=t[N],re=QL(j),oe=!re&&YB(j);d[N]=[];for(var _e=j.length,Me=0;Me<_e;Me++)if(j[Me][0]!==\"Z\"&&!(oe&&Me!==Jut&&Me!==$ut&&Me!==Qut&&Me!==ect)){var ke=re&&n.isActiveSelection,me;ke&&(me=Due(j,Me));var ie=j[Me][1],Se=j[Me][2],Le=H.append(ke?\"rect\":\"circle\").attr(\"data-i\",N).attr(\"data-j\",Me).style({fill:Rue.background,stroke:Rue.defaultLine,\"stroke-width\":1,\"shape-rendering\":\"crispEdges\"});if(ke){var Ae=me[1]-ie,De=me[2]-Se,Pe=De?5:Math.max(Math.min(25,Math.abs(Ae)-5),5),ge=Ae?5:Math.max(Math.min(25,Math.abs(De)-5),5);Le.classed(De?\"cursor-ew-resize\":\"cursor-ns-resize\",!0).attr(\"width\",Pe).attr(\"height\",ge).attr(\"x\",ie-Pe/2).attr(\"y\",Se-ge/2).attr(\"transform\",Yut(Ae/2,De/2))}else Le.classed(\"cursor-grab\",!0).attr(\"r\",5).attr(\"cx\",ie).attr(\"cy\",Se);d[N][Me]={element:Le.node(),gd:a,prepFn:L,doneFn:k,clickFn:g},Iue.init(d[N][Me])}}}function T(H,N){if(t.length)for(var j=0;j<t.length;j++)for(var re=0;re<t[j].length;re++)for(var oe=0;oe+2<t[j][re].length;oe+=2)t[j][re][oe+1]=p[j][re][oe+1]+H,t[j][re][oe+2]=p[j][re][oe+2]+N}function z(H,N){T(H,N),o()}function O(H){x=+H.srcElement.getAttribute(\"data-i\"),x||(x=0),v[x].moveFn=z}function V(){s()}function G(H){H===2&&lct(a)}function Z(){if(v=[],!!t.length){var H=0;v[H]={element:r[0][0],gd:a,prepFn:O,doneFn:V,clickFn:G},Iue.init(v[H])}}};function sct(e,t){for(var r=0;r<t.length;r++){var n=t[r];e[r]=[];for(var i=0;i<n.length;i++){e[r][i]=[];for(var a=0;a<n[i].length;a++)e[r][i][a]=n[i][a]}}return e}function Due(e,t){var r=e[t][1],n=e[t][2],i=e.length,a,o,s;return a=(t+1)%i,o=e[a][1],s=e[a][2],o===r&&s===n&&(a=(t+2)%i,o=e[a][1],s=e[a][2]),[a,o,s]}function lct(e){if(zue(e._fullLayout.dragmode)){que(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);delete e._fullLayout._activeSelectionIndex;var a=e._fullLayout.selections[t];e._fullLayout._deselect={xref:a.xref,yref:a.yref},Oue.call(\"_guiRelayout\",e,{selections:n})}}}});var aP=ye((znr,Yue)=>{\"use strict\";var uct=Oa(),jue=qa(),Nue=Dr(),j3=ho(),cct=u_().readPaths,fct=tP(),iP=ZB(),Wue=Q1().clearOutlineControllers,JB=Ca(),QB=So(),hct=pl().arrayEditor,Uue=yv(),Vue=Tg(),Ob=vM(),Sp=f_(),$B=Sp.getPathString;Yue.exports={draw:eN,drawOne:Xue,eraseActiveShape:pct,drawLabel:iP};function eN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll(\"path\").remove(),t._shapeLowerLayer.selectAll(\"path\").remove(),t._shapeUpperLayer.selectAll(\"text\").remove(),t._shapeLowerLayer.selectAll(\"text\").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll(\"path\").remove(),n.selectAll(\"text\").remove())}for(var i=0;i<t.shapes.length;i++)t.shapes[i].visible===!0&&Xue(e,i)}function rP(e){return!!e._fullLayout._outlining}function nP(e){return!e._context.edits.shapePosition}function Xue(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\"'+t+'\"]').remove();var r=Sp.makeShapesOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input||n.visible!==!0)return;if(n.layer===\"above\")o(e._fullLayout._shapeUpperLayer);else if(n.xref===\"paper\"||n.yref===\"paper\")o(e._fullLayout._shapeLowerLayer);else if(n.layer===\"between\")o(i.shapelayerBetween);else if(i._hadPlotinfo){var a=i.mainplotinfo||i;o(a.shapelayer)}else o(e._fullLayout._shapeLowerLayer);function o(s){var l=$B(e,n),u={\"data-index\":t,\"fill-rule\":n.fillrule,d:l},c=n.opacity,f=n.fillcolor,h=n.line.width?n.line.color:\"rgba(0,0,0,0)\",d=n.line.width,v=n.line.dash;!d&&n.editable===!0&&(d=5,v=\"solid\");var x=l[l.length-1]!==\"Z\",b=nP(e)&&n.editable&&e._fullLayout._activeShapeIndex===t;b&&(f=x?\"rgba(0,0,0,0)\":e._fullLayout.activeshape.fillcolor,c=e._fullLayout.activeshape.opacity);var p=s.append(\"g\").classed(\"shape-group\",!0).attr({\"data-index\":t}),C=p.append(\"path\").attr(u).style(\"opacity\",c).call(JB.stroke,h).call(JB.fill,f).call(QB.dashLine,v,d);Zue(p,e,n),iP(e,t,n,p);var E;if((b||e._context.edits.shapePosition)&&(E=hct(e.layout,\"shapes\",n)),b){C.style({cursor:\"move\"});var A={element:C.node(),plotinfo:i,gd:e,editHelpers:E,hasText:n.label.text||n.label.texttemplate,isActiveShape:!0},L=cct(l,e);fct(L,C,A)}else e._context.edits.shapePosition?dct(e,C,n,t,s,E):n.editable===!0&&C.style(\"pointer-events\",x||JB.opacity(f)*c<=.5?\"stroke\":\"all\");C.node().addEventListener(\"click\",function(){return vct(e,C)})}}function Zue(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");QB.setClipUrl(e,n?\"clip\"+t._fullLayout._uid+n:null,t)}function dct(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode===\"pixel\",u=r.ysizemode===\"pixel\",c=r.type===\"line\",f=r.type===\"path\",h=a.modifyItem,d,v,x,b,p,C,E,A,L,_,k,M,g,P,T,z=uct.select(t.node().parentNode),O=j3.getFromId(e,r.xref),V=j3.getRefType(r.xref),G=j3.getFromId(e,r.yref),Z=j3.getRefType(r.yref),H=r.x0shift,N=r.x1shift,j=r.y0shift,re=r.y1shift,oe=function(st,lt){var Gt=Sp.getDataToPixel(e,O,lt,!1,V);return Gt(st)},_e=function(st,lt){var Gt=Sp.getDataToPixel(e,G,lt,!0,Z);return Gt(st)},Me=Sp.getPixelToData(e,O,!1,V),ke=Sp.getPixelToData(e,G,!0,Z),me=Le(),ie={element:me.node(),gd:e,prepFn:Pe,doneFn:ge,clickFn:Fe},Se;Uue.init(ie),me.node().onmousemove=De;function Le(){return c?Ae():t}function Ae(){var st=10,lt=Math.max(r.line.width,st),Gt=i.append(\"g\").attr(\"data-index\",n).attr(\"drag-helper\",!0);Gt.append(\"path\").attr(\"d\",t.attr(\"d\")).style({cursor:\"move\",\"stroke-width\":lt,\"stroke-opacity\":\"0\"});var Nt={\"fill-opacity\":\"0\"},$t=Math.max(lt/2,st);return Gt.append(\"circle\").attr({\"data-line-point\":\"start-point\",cx:l?oe(r.xanchor)+r.x0:oe(r.x0,H),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,j),r:$t}).style(Nt).classed(\"cursor-grab\",!0),Gt.append(\"circle\").attr({\"data-line-point\":\"end-point\",cx:l?oe(r.xanchor)+r.x1:oe(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,re),r:$t}).style(Nt).classed(\"cursor-grab\",!0),Gt}function De(st){if(rP(e)){Se=null;return}if(c)st.target.tagName===\"path\"?Se=\"move\":Se=st.target.attributes[\"data-line-point\"].value===\"start-point\"?\"resize-over-start-point\":\"resize-over-end-point\";else{var lt=ie.element.getBoundingClientRect(),Gt=lt.right-lt.left,Nt=lt.bottom-lt.top,$t=st.clientX-lt.left,sr=st.clientY-lt.top,wr=!f&&Gt>o&&Nt>s&&!st.shiftKey?Uue.getCursor($t/Gt,1-sr/Nt):\"move\";Vue(t,wr),Se=wr.split(\"-\")[0]}}function Pe(st){rP(e)||(l&&(p=oe(r.xanchor)),u&&(C=_e(r.yanchor)),r.type===\"path\"?T=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),x=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),d<x?(L=d,g=\"x0\",_=x,P=\"x1\"):(L=x,g=\"x1\",_=d,P=\"x0\"),!u&&v<b||u&&v>b?(E=v,k=\"y0\",A=b,M=\"y1\"):(E=b,k=\"y1\",A=v,M=\"y0\"),De(st),ct(i,r),Wt(t,r,e),ie.moveFn=Se===\"move\"?ce:Ze,ie.altKey=st.altKey)}function ge(){rP(e)||(Vue(t),pt(i),Zue(t,e,r),jue.call(\"_guiRelayout\",e,a.getUpdateObj()))}function Fe(){rP(e)||pt(i)}function ce(st,lt){if(r.type===\"path\"){var Gt=function(sr){return sr},Nt=Gt,$t=Gt;l?h(\"xanchor\",r.xanchor=Me(p+st)):(Nt=function(wr){return Me(oe(wr)+st)},O&&O.type===\"date\"&&(Nt=Sp.encodeDate(Nt))),u?h(\"yanchor\",r.yanchor=ke(C+lt)):($t=function(wr){return ke(_e(wr)+lt)},G&&G.type===\"date\"&&($t=Sp.encodeDate($t))),h(\"path\",r.path=Gue(T,Nt,$t))}else l?h(\"xanchor\",r.xanchor=Me(p+st)):(h(\"x0\",r.x0=Me(d+st)),h(\"x1\",r.x1=Me(x+st))),u?h(\"yanchor\",r.yanchor=ke(C+lt)):(h(\"y0\",r.y0=ke(v+lt)),h(\"y1\",r.y1=ke(b+lt)));t.attr(\"d\",$B(e,r)),ct(i,r),iP(e,n,r,z)}function Ze(st,lt){if(f){var Gt=function(Rr){return Rr},Nt=Gt,$t=Gt;l?h(\"xanchor\",r.xanchor=Me(p+st)):(Nt=function(ei){return Me(oe(ei)+st)},O&&O.type===\"date\"&&(Nt=Sp.encodeDate(Nt))),u?h(\"yanchor\",r.yanchor=ke(C+lt)):($t=function(ei){return ke(_e(ei)+lt)},G&&G.type===\"date\"&&($t=Sp.encodeDate($t))),h(\"path\",r.path=Gue(T,Nt,$t))}else if(c){if(Se===\"resize-over-start-point\"){var sr=d+st,wr=u?v-lt:v+lt;h(\"x0\",r.x0=l?sr:Me(sr)),h(\"y0\",r.y0=u?wr:ke(wr))}else if(Se===\"resize-over-end-point\"){var ur=x+st,Qe=u?b-lt:b+lt;h(\"x1\",r.x1=l?ur:Me(ur)),h(\"y1\",r.y1=u?Qe:ke(Qe))}}else{var Et=function(Rr){return Se.indexOf(Rr)!==-1},er=Et(\"n\"),Ut=Et(\"s\"),Ft=Et(\"w\"),bt=Et(\"e\"),yt=er?E+lt:E,Yt=Ut?A+lt:A,lr=Ft?L+st:L,Tr=bt?_+st:_;u&&(er&&(yt=E-lt),Ut&&(Yt=A-lt)),(!u&&Yt-yt>s||u&&yt-Yt>s)&&(h(k,r[k]=u?yt:ke(yt)),h(M,r[M]=u?Yt:ke(Yt))),Tr-lr>o&&(h(g,r[g]=l?lr:Me(lr)),h(P,r[P]=l?Tr:Me(Tr)))}t.attr(\"d\",$B(e,r)),ct(i,r),iP(e,n,r,z)}function ct(st,lt){(l||u)&&Gt();function Gt(){var Nt=lt.type!==\"path\",$t=st.selectAll(\".visual-cue\").data([0]),sr=1;$t.enter().append(\"path\").attr({fill:\"#fff\",\"fill-rule\":\"evenodd\",stroke:\"#000\",\"stroke-width\":sr}).classed(\"visual-cue\",!0);var wr=oe(l?lt.xanchor:Nue.midRange(Nt?[lt.x0,lt.x1]:Sp.extractPathCoords(lt.path,Ob.paramIsX))),ur=_e(u?lt.yanchor:Nue.midRange(Nt?[lt.y0,lt.y1]:Sp.extractPathCoords(lt.path,Ob.paramIsY)));if(wr=Sp.roundPositionForSharpStrokeRendering(wr,sr),ur=Sp.roundPositionForSharpStrokeRendering(ur,sr),l&&u){var Qe=\"M\"+(wr-1-sr)+\",\"+(ur-1-sr)+\"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z\";$t.attr(\"d\",Qe)}else if(l){var Et=\"M\"+(wr-1-sr)+\",\"+(ur-9-sr)+\"v18 h2 v-18 Z\";$t.attr(\"d\",Et)}else{var er=\"M\"+(wr-9-sr)+\",\"+(ur-1-sr)+\"h18 v2 h-18 Z\";$t.attr(\"d\",er)}}}function pt(st){st.selectAll(\".visual-cue\").remove()}function Wt(st,lt,Gt){var Nt=lt.xref,$t=lt.yref,sr=j3.getFromId(Gt,Nt),wr=j3.getFromId(Gt,$t),ur=\"\";Nt!==\"paper\"&&!sr.autorange&&(ur+=Nt),$t!==\"paper\"&&!wr.autorange&&(ur+=$t),QB.setClipUrl(st,ur?\"clip\"+Gt._fullLayout._uid+ur:null,Gt)}}function Gue(e,t,r){return e.replace(Ob.segmentRE,function(n){var i=0,a=n.charAt(0),o=Ob.paramIsX[a],s=Ob.paramIsY[a],l=Ob.numParams[a],u=n.substr(1).replace(Ob.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function vct(e,t){if(nP(e)){var r=t.node(),n=+r.getAttribute(\"data-index\");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Hue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Hue,eN(e)}}}function Hue(e){if(nP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Wue(e),delete e._fullLayout._activeShapeIndex,eN(e))}}function pct(e){if(nP(e)){Wue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);return delete e._fullLayout._activeShapeIndex,jue.call(\"_guiRelayout\",e,{shapes:n})}}}});var iN=ye((Onr,nce)=>{\"use strict\";var S0=qa(),Kue=Mc(),Jue=hf(),Pl=HL(),gct=aP().eraseActiveShape,oP=Dr(),rl=oP._,Il=nce.exports={};Il.toImage={name:\"toImage\",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||\"png\";return r===\"png\"?rl(e,\"Download plot as a PNG\"):rl(e,\"Download plot\")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||\"png\"};oP.notifier(rl(e,\"Taking snapshot - this may take a few seconds\"),\"long\"),[\"filename\",\"width\",\"height\",\"scale\"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call(\"downloadImage\",e,r).then(function(n){oP.notifier(rl(e,\"Snapshot succeeded\")+\" - \"+n,\"long\")}).catch(function(){oP.notifier(rl(e,\"Sorry, there was a problem downloading your snapshot!\"),\"long\")})}};Il.sendDataToCloud={name:\"sendDataToCloud\",title:function(e){return rl(e,\"Edit in Chart Studio\")},icon:Pl.disk,click:function(e){Kue.sendDataToCloud(e)}};Il.editInChartStudio={name:\"editInChartStudio\",title:function(e){return rl(e,\"Edit in Chart Studio\")},icon:Pl.pencil,click:function(e){Kue.sendDataToCloud(e)}};Il.zoom2d={name:\"zoom2d\",_cat:\"zoom\",title:function(e){return rl(e,\"Zoom\")},attr:\"dragmode\",val:\"zoom\",icon:Pl.zoombox,click:qv};Il.pan2d={name:\"pan2d\",_cat:\"pan\",title:function(e){return rl(e,\"Pan\")},attr:\"dragmode\",val:\"pan\",icon:Pl.pan,click:qv};Il.select2d={name:\"select2d\",_cat:\"select\",title:function(e){return rl(e,\"Box Select\")},attr:\"dragmode\",val:\"select\",icon:Pl.selectbox,click:qv};Il.lasso2d={name:\"lasso2d\",_cat:\"lasso\",title:function(e){return rl(e,\"Lasso Select\")},attr:\"dragmode\",val:\"lasso\",icon:Pl.lasso,click:qv};Il.drawclosedpath={name:\"drawclosedpath\",title:function(e){return rl(e,\"Draw closed freeform\")},attr:\"dragmode\",val:\"drawclosedpath\",icon:Pl.drawclosedpath,click:qv};Il.drawopenpath={name:\"drawopenpath\",title:function(e){return rl(e,\"Draw open freeform\")},attr:\"dragmode\",val:\"drawopenpath\",icon:Pl.drawopenpath,click:qv};Il.drawline={name:\"drawline\",title:function(e){return rl(e,\"Draw line\")},attr:\"dragmode\",val:\"drawline\",icon:Pl.drawline,click:qv};Il.drawrect={name:\"drawrect\",title:function(e){return rl(e,\"Draw rectangle\")},attr:\"dragmode\",val:\"drawrect\",icon:Pl.drawrect,click:qv};Il.drawcircle={name:\"drawcircle\",title:function(e){return rl(e,\"Draw circle\")},attr:\"dragmode\",val:\"drawcircle\",icon:Pl.drawcircle,click:qv};Il.eraseshape={name:\"eraseshape\",title:function(e){return rl(e,\"Erase active shape\")},icon:Pl.eraseshape,click:gct};Il.zoomIn2d={name:\"zoomIn2d\",_cat:\"zoomin\",title:function(e){return rl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:qv};Il.zoomOut2d={name:\"zoomOut2d\",_cat:\"zoomout\",title:function(e){return rl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:qv};Il.autoScale2d={name:\"autoScale2d\",_cat:\"autoscale\",title:function(e){return rl(e,\"Autoscale\")},attr:\"zoom\",val:\"auto\",icon:Pl.autoscale,click:qv};Il.resetScale2d={name:\"resetScale2d\",_cat:\"resetscale\",title:function(e){return rl(e,\"Reset axes\")},attr:\"zoom\",val:\"reset\",icon:Pl.home,click:qv};Il.hoverClosestCartesian={name:\"hoverClosestCartesian\",_cat:\"hoverclosest\",title:function(e){return rl(e,\"Show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:Pl.tooltip_basic,gravity:\"ne\",click:qv};Il.hoverCompareCartesian={name:\"hoverCompareCartesian\",_cat:\"hoverCompare\",title:function(e){return rl(e,\"Compare data on hover\")},attr:\"hovermode\",val:function(e){return e._fullLayout._isHoriz?\"y\":\"x\"},icon:Pl.tooltip_compare,gravity:\"ne\",click:qv};function qv(e,t){var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout,o={},s=Jue.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n===\"zoom\"){var f=i===\"in\"?.5:2,h=(1+f)/2,d=(1-f)/2,v,x;for(c=0;c<s.length;c++)if(u=s[c],x=u.modebardisable===\"none\"||u.modebardisable.indexOf(i===\"auto\"||i===\"reset\"?\"autoscale\":\"zoominout\")===-1,x&&!u.fixedrange)if(v=u._name,i===\"auto\")o[v+\".autorange\"]=!0;else if(i===\"reset\")u._rangeInitial0===void 0&&u._rangeInitial1===void 0?o[v+\".autorange\"]=!0:u._rangeInitial0===void 0?(o[v+\".autorange\"]=u._autorangeInitial,o[v+\".range\"]=[null,u._rangeInitial1]):u._rangeInitial1===void 0?(o[v+\".range\"]=[u._rangeInitial0,null],o[v+\".autorange\"]=u._autorangeInitial):o[v+\".range\"]=[u._rangeInitial0,u._rangeInitial1],u._showSpikeInitial!==void 0&&(o[v+\".showspikes\"]=u._showSpikeInitial,l===\"on\"&&!u._showSpikeInitial&&(l=\"off\"));else{var b=[u.r2l(u.range[0]),u.r2l(u.range[1])],p=[h*b[0]+d*b[1],h*b[1]+d*b[0]];o[v+\".range[0]\"]=u.l2r(p[0]),o[v+\".range[1]\"]=u.l2r(p[1])}}else n===\"hovermode\"&&(i===\"x\"||i===\"y\")&&(i=a._isHoriz?\"y\":\"x\",r.setAttribute(\"data-val\",i)),o[n]=i;a._cartesianSpikesEnabled=l,S0.call(\"_guiRelayout\",e,o)}Il.zoom3d={name:\"zoom3d\",_cat:\"zoom\",title:function(e){return rl(e,\"Zoom\")},attr:\"scene.dragmode\",val:\"zoom\",icon:Pl.zoombox,click:sP};Il.pan3d={name:\"pan3d\",_cat:\"pan\",title:function(e){return rl(e,\"Pan\")},attr:\"scene.dragmode\",val:\"pan\",icon:Pl.pan,click:sP};Il.orbitRotation={name:\"orbitRotation\",title:function(e){return rl(e,\"Orbital rotation\")},attr:\"scene.dragmode\",val:\"orbit\",icon:Pl[\"3d_rotate\"],click:sP};Il.tableRotation={name:\"tableRotation\",title:function(e){return rl(e,\"Turntable rotation\")},attr:\"scene.dragmode\",val:\"turntable\",icon:Pl[\"z-axis\"],click:sP};function sP(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout._subplots.gl3d||[],o={},s=n.split(\".\"),l=0;l<a.length;l++)o[a[l]+\".\"+s[1]]=i;var u=i===\"pan\"?i:\"zoom\";o.dragmode=u,S0.call(\"_guiRelayout\",e,o)}Il.resetCameraDefault3d={name:\"resetCameraDefault3d\",_cat:\"resetCameraDefault\",title:function(e){return rl(e,\"Reset camera to default\")},attr:\"resetDefault\",icon:Pl.home,click:tN};Il.resetCameraLastSave3d={name:\"resetCameraLastSave3d\",_cat:\"resetCameraLastSave\",title:function(e){return rl(e,\"Reset camera to last save\")},attr:\"resetLastSave\",icon:Pl.movie,click:tN};function tN(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=n===\"resetLastSave\",a=n===\"resetDefault\",o=e._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c=s[u],f=c+\".camera\",h=c+\".aspectratio\",d=c+\".aspectmode\",v=o[c]._scene,x;i?(l[f+\".up\"]=v.viewInitial.up,l[f+\".eye\"]=v.viewInitial.eye,l[f+\".center\"]=v.viewInitial.center,x=!0):a&&(l[f+\".up\"]=null,l[f+\".eye\"]=null,l[f+\".center\"]=null,x=!0),x&&(l[h+\".x\"]=v.viewInitial.aspectratio.x,l[h+\".y\"]=v.viewInitial.aspectratio.y,l[h+\".z\"]=v.viewInitial.aspectratio.z,l[d]=v.viewInitial.aspectmode)}S0.call(\"_guiRelayout\",e,l)}Il.hoverClosest3d={name:\"hoverClosest3d\",_cat:\"hoverclosest\",title:function(e){return rl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:mct};function $ue(e,t){var r=t.currentTarget,n=r._previousVal,i=e._fullLayout,a=i._subplots.gl3d||[],o=[\"xaxis\",\"yaxis\",\"zaxis\"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=i[c],h=c+\".hovermode\";s[h]=f.hovermode,l[h]=!1;for(var d=0;d<3;d++){var v=o[d],x=c+\".\"+v+\".showspikes\";l[x]=!1,s[x]=f[v].showspikes}}r._previousVal=s}return l}function mct(e,t){var r=$ue(e,t);S0.call(\"_guiRelayout\",e,r)}Il.zoomInGeo={name:\"zoomInGeo\",_cat:\"zoomin\",title:function(e){return rl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:rN};Il.zoomOutGeo={name:\"zoomOutGeo\",_cat:\"zoomout\",title:function(e){return rl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:rN};Il.resetGeo={name:\"resetGeo\",_cat:\"reset\",title:function(e){return rl(e,\"Reset\")},attr:\"reset\",val:null,icon:Pl.autoscale,click:rN};Il.hoverClosestGeo={name:\"hoverClosestGeo\",_cat:\"hoverclosest\",title:function(e){return rl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:ece};function rN(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout,o=a._subplots.geo||[],s=0;s<o.length;s++){var l=o[s],u=a[l];if(n===\"zoom\"){var c=u.projection.scale,f=i===\"in\"?2*c:.5*c;S0.call(\"_guiRelayout\",e,l+\".projection.scale\",f)}}n===\"reset\"&&W3(e,\"geo\")}Il.hoverClosestPie={name:\"hoverClosestPie\",_cat:\"hoverclosest\",title:function(e){return rl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:Pl.tooltip_basic,gravity:\"ne\",click:ece};function Que(e){var t=e._fullLayout;return t.hovermode?!1:t._has(\"cartesian\")?t._isHoriz?\"y\":\"x\":\"closest\"}function ece(e){var t=Que(e);S0.call(\"_guiRelayout\",e,\"hovermode\",t)}Il.resetViewSankey={name:\"resetSankeyGroup\",title:function(e){return rl(e,\"Reset view\")},icon:Pl.home,click:function(e){for(var t={\"node.groups\":[],\"node.x\":[],\"node.y\":[]},r=0;r<e._fullData.length;r++){var n=e._fullData[r]._viewInitial;t[\"node.groups\"].push(n.node.groups.slice()),t[\"node.x\"].push(n.node.x.slice()),t[\"node.y\"].push(n.node.y.slice())}S0.call(\"restyle\",e,t)}};Il.toggleHover={name:\"toggleHover\",title:function(e){return rl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:function(e,t){var r=$ue(e,t);r.hovermode=Que(e),S0.call(\"_guiRelayout\",e,r)}};Il.resetViews={name:\"resetViews\",title:function(e){return rl(e,\"Reset views\")},icon:Pl.home,click:function(e,t){var r=t.currentTarget;r.setAttribute(\"data-attr\",\"zoom\"),r.setAttribute(\"data-val\",\"reset\"),qv(e,t),r.setAttribute(\"data-attr\",\"resetLastSave\"),tN(e,t),W3(e,\"geo\"),W3(e,\"mapbox\"),W3(e,\"map\")}};Il.toggleSpikelines={name:\"toggleSpikelines\",title:function(e){return rl(e,\"Toggle Spike Lines\")},icon:Pl.spikeline,attr:\"_cartesianSpikesEnabled\",val:\"on\",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled=r===\"on\"?\"off\":\"on\",S0.call(\"_guiRelayout\",e,yct(e))}};function yct(e){for(var t=e._fullLayout,r=t._cartesianSpikesEnabled===\"on\",n=Jue.list(e,null,!0),i={},a=0;a<n.length;a++){var o=n[a];i[o._name+\".showspikes\"]=r?!0:o._showSpikeInitial}return i}Il.resetViewMapbox={name:\"resetViewMapbox\",_cat:\"resetView\",title:function(e){return rl(e,\"Reset view\")},attr:\"reset\",icon:Pl.home,click:function(e){W3(e,\"mapbox\")}};Il.resetViewMap={name:\"resetViewMap\",_cat:\"resetView\",title:function(e){return rl(e,\"Reset view\")},attr:\"reset\",icon:Pl.home,click:function(e){W3(e,\"map\")}};Il.zoomInMapbox={name:\"zoomInMapbox\",_cat:\"zoomin\",title:function(e){return rl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:tce};Il.zoomInMap={name:\"zoomInMap\",_cat:\"zoomin\",title:function(e){return rl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:rce};Il.zoomOutMapbox={name:\"zoomOutMapbox\",_cat:\"zoomout\",title:function(e){return rl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:tce};Il.zoomOutMap={name:\"zoomOutMap\",_cat:\"zoomout\",title:function(e){return rl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:rce};function tce(e,t){ice(e,t,\"mapbox\")}function rce(e,t){ice(e,t,\"map\")}function ice(e,t,r){for(var n=t.currentTarget,i=n.getAttribute(\"data-val\"),a=e._fullLayout,o=a._subplots[r]||[],s=1.05,l={},u=0;u<o.length;u++){var c=o[u],f=a[c].zoom,h=i===\"in\"?s*f:f/s;l[c+\".zoom\"]=h}S0.call(\"_guiRelayout\",e,l)}function W3(e,t){for(var r=e._fullLayout,n=r._subplots[t]||[],i={},a=0;a<n.length;a++)for(var o=n[a],s=r[o]._subplot,l=s.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];i[o+\".\"+f]=l[f]}S0.call(\"_guiRelayout\",e,i)}});var nN=ye((qnr,lce)=>{\"use strict\";var ace=iN(),_ct=Object.keys(ace),oce=[\"drawline\",\"drawopenpath\",\"drawclosedpath\",\"drawcircle\",\"drawrect\",\"eraseshape\"],sce=[\"v1hovermode\",\"hoverclosest\",\"hovercompare\",\"togglehover\",\"togglespikelines\"].concat(oce),X3=[],xct=function(e){if(sce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();X3.indexOf(t)===-1&&X3.push(t),X3.indexOf(r)===-1&&X3.push(r)}};_ct.forEach(function(e){xct(ace[e])});X3.sort();lce.exports={DRAW_MODES:oce,backButtons:sce,foreButtons:X3}});var aN=ye((Nnr,uce)=>{\"use strict\";var Bnr=nN();uce.exports={editType:\"modebar\",orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"modebar\"},bgcolor:{valType:\"color\",editType:\"modebar\"},color:{valType:\"color\",editType:\"modebar\"},activecolor:{valType:\"color\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}});var fce=ye((Unr,cce)=>{\"use strict\";var bct=Dr(),gM=Ca(),wct=pl(),Tct=aN();cce.exports=function(t,r){var n=t.modebar||{},i=wct.newContainer(r,\"modebar\");function a(s,l){return bct.coerce(n,i,Tct,s,l)}a(\"orientation\"),a(\"bgcolor\",gM.addOpacity(r.paper_bgcolor,.5));var o=gM.contrast(gM.rgb(r.modebar.bgcolor));a(\"color\",gM.addOpacity(o,.3)),a(\"activecolor\",gM.addOpacity(o,.7)),a(\"uirevision\",r.uirevision),a(\"add\"),a(\"remove\")}});var pce=ye((Vnr,vce)=>{\"use strict\";var oN=Oa(),Act=Eo(),lP=Dr(),hce=HL(),Sct=o6().version,Mct=new DOMParser;function dce(e){this.container=e.container,this.element=document.createElement(\"div\"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=dce.prototype;Tm.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i=\"modebar-\"+n._uid;this.element.setAttribute(\"id\",i),this.element.setAttribute(\"role\",\"toolbar\"),this._uid=i,this.element.className=\"modebar modebar--custom\",r.displayModeBar===\"hover\"&&(this.element.className+=\" modebar--hover ease-bg\"),n.modebar.orientation===\"v\"&&(this.element.className+=\" vertical\",t=t.reverse());var a=n.modebar,o=\"#\"+i+\" .modebar-group\";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+\" watermark\"),n.modebar.orientation===\"v\"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),lP.setStyleOnHover(\"#\"+i+\" .modebar-btn\",\".active\",\".icon path\",\"fill: \"+a.activecolor,\"fill: \"+a.color,this.element)};Tm.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error(\"must provide button 'name' in button config\");if(t.buttonsNames.indexOf(a)!==-1)throw new Error(\"button name '\"+a+\"' is taken\");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};Tm.createGroup=function(){var e=document.createElement(\"div\");e.className=\"modebar-group\";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Tm.createButton=function(e){var t=this,r=document.createElement(\"button\");r.setAttribute(\"type\",\"button\"),r.setAttribute(\"rel\",\"tooltip\"),r.className=\"modebar-btn\";var n=e.title;n===void 0?n=e.name:typeof n==\"function\"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute(\"data-title\",n),r.setAttribute(\"aria-label\",n)),e.attr!==void 0&&r.setAttribute(\"data-attr\",e.attr);var i=e.val;i!==void 0&&(typeof i==\"function\"&&(i=i(this.graphInfo)),r.setAttribute(\"data-val\",i));var a=e.click;if(typeof a!=\"function\")throw new Error(\"must provide button 'click' function in button config\");r.addEventListener(\"click\",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute(\"data-toggle\",e.toggle||!1),e.toggle&&oN.select(r).classed(\"active\",!0);var o=e.icon;return typeof o==\"function\"?r.appendChild(o()):r.appendChild(this.createIcon(o||hce.question)),r.setAttribute(\"data-gravity\",e.gravity||\"n\"),r};Tm.createIcon=function(e){var t=Act(e.height)?Number(e.height):e.ascent-e.descent,r=\"http://www.w3.org/2000/svg\",n;if(e.path){n=document.createElementNS(r,\"svg\"),n.setAttribute(\"viewBox\",[0,0,e.width,t].join(\" \")),n.setAttribute(\"class\",\"icon\");var i=document.createElementNS(r,\"path\");i.setAttribute(\"d\",e.path),e.transform?i.setAttribute(\"transform\",e.transform):e.ascent!==void 0&&i.setAttribute(\"transform\",\"matrix(1 0 0 -1 0 \"+e.ascent+\")\"),n.appendChild(i)}if(e.svg){var a=Mct.parseFromString(e.svg,\"application/xml\");n=a.childNodes[0]}return n.setAttribute(\"height\",\"1em\"),n.setAttribute(\"width\",\"1em\"),n};Tm.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute(\"data-attr\"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute(\"data-val\")||!0,a=n.getAttribute(\"data-attr\"),o=n.getAttribute(\"data-toggle\")===\"true\",s=oN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(\".icon path\");v&&(h||f.matches(\":hover\")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed(\"active\");s.classed(\"active\",u),l(n,u)}}else{var c=a===null?a:lP.nestedProperty(t,a).get();s.classed(\"active\",c===i),l(n,c===i)}})};Tm.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0};function Ect(e){return e+\" (v\"+Sct+\")\"}Tm.getLogo=function(){var e=this.createGroup(),t=document.createElement(\"a\");return t.href=\"https://plotly.com/\",t.target=\"_blank\",t.setAttribute(\"data-title\",Ect(lP._(this.graphInfo,\"Produced with Plotly.js\"))),t.className=\"modebar-btn plotlyjsicon modebar-btn--logo\",t.appendChild(this.createIcon(hce.newplotlylogo)),e.appendChild(t),e};Tm.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Tm.destroy=function(){lP.removeElement(this.container.querySelector(\".modebar\"))};function Cct(e,t){var r=e._fullLayout,n=new dce({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&oN.select(n.element).append(\"span\").classed(\"badge-private float--left\",!0).text(\"PRIVATE\"),n}vce.exports=Cct});var yce=ye((Gnr,mce)=>{\"use strict\";var kct=hf(),gce=Ru(),sN=qa(),Lct=rp().isUnifiedHover,Pct=pce(),uP=iN(),Ict=nN().DRAW_MODES,Rct=Dr().extendDeep;mce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error([\"*modeBarButtonsToRemove* configuration options\",\"must be an array.\"].join(\" \"));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error([\"*modeBarButtonsToAdd* configuration options\",\"must be an array.\"].join(\" \"));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Bct(a):!n.displayModeBar&&n.watermark?o=[]:o=Dct(t),i?i.update(t,o):r._modeBar=Pct(t,o)};function Dct(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,j){if(typeof j==\"string\"){if(j.toLowerCase()===N.toLowerCase())return!0}else{var re=j.name,oe=j._cat||j.name;if(re===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a==\"string\"&&(a=[a]);var o=t.modebar.remove;typeof o==\"string\"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var j=0;j<n.modeBarButtonsToRemove.length;j++)if(i(N,n.modeBarButtonsToRemove[j]))return!1;return!0})),l=n.modeBarButtonsToRemove.concat(o.filter(function(N){for(var j=0;j<n.modeBarButtonsToAdd.length;j++)if(i(N,n.modeBarButtonsToAdd[j]))return!1;return!0})),u=t._has(\"cartesian\"),c=t._has(\"gl3d\"),f=t._has(\"geo\"),h=t._has(\"pie\"),d=t._has(\"funnelarea\"),v=t._has(\"ternary\"),x=t._has(\"mapbox\"),b=t._has(\"map\"),p=t._has(\"polar\"),C=t._has(\"smith\"),E=t._has(\"sankey\"),A=Fct(t),L=Lct(t.hovermode),_=[];function k(N){if(N.length){for(var j=[],re=0;re<N.length;re++){for(var oe=N[re],_e=uP[oe],Me=_e.name.toLowerCase(),ke=(_e._cat||_e.name).toLowerCase(),me=!1,ie=0;ie<l.length;ie++){var Se=l[ie].toLowerCase();if(Se===Me||Se===ke){me=!0;break}}me||j.push(uP[oe])}_.push(j)}}var M=[\"toImage\"];n.showEditInChartStudio?M.push(\"editInChartStudio\"):n.showSendToCloud&&M.push(\"sendDataToCloud\"),k(M);var g=[],P=[],T=[],z=[];(u||h||d||v)+f+c+x+b+p+C>1?(P=[\"toggleHover\"],T=[\"resetViews\"]):f?(g=[\"zoomInGeo\",\"zoomOutGeo\"],P=[\"hoverClosestGeo\"],T=[\"resetGeo\"]):c?(P=[\"hoverClosest3d\"],T=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):x?(g=[\"zoomInMapbox\",\"zoomOutMapbox\"],P=[\"toggleHover\"],T=[\"resetViewMapbox\"]):b?(g=[\"zoomInMap\",\"zoomOutMap\"],P=[\"toggleHover\"],T=[\"resetViewMap\"]):h?P=[\"hoverClosestPie\"]:E?(P=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],T=[\"resetViewSankey\"]):P=[\"toggleHover\"],u&&P.push(\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"),(Oct(r)||L)&&(P=[]),u&&!A&&(g=[\"zoomIn2d\",\"zoomOut2d\",\"autoScale2d\"],T[0]!==\"resetViews\"&&(T=[\"resetScale2d\"])),c?z=[\"zoom3d\",\"pan3d\",\"orbitRotation\",\"tableRotation\"]:u&&!A||v?z=[\"zoom2d\",\"pan2d\"]:x||b||f?z=[\"pan2d\"]:p&&(z=[\"zoom2d\"]),zct(r)&&z.push(\"select2d\",\"lasso2d\");var O=[],V=function(N){O.indexOf(N)===-1&&P.indexOf(N)!==-1&&O.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z<s.length;Z++){var H=s[Z];typeof H==\"string\"?(H=H.toLowerCase(),Ict.indexOf(H)!==-1?(t._has(\"mapbox\")||t._has(\"map\")||t._has(\"cartesian\"))&&z.push(H):H===\"togglespikelines\"?V(\"toggleSpikelines\"):H===\"togglehover\"?V(\"toggleHover\"):H===\"hovercompare\"?V(\"hoverCompareCartesian\"):H===\"hoverclosest\"?(V(\"hoverClosestCartesian\"),V(\"hoverClosestGeo\"),V(\"hoverClosest3d\"),V(\"hoverClosestPie\")):H===\"v1hovermode\"&&(V(\"hoverClosestCartesian\"),V(\"hoverCompareCartesian\"),V(\"hoverClosestGeo\"),V(\"hoverClosest3d\"),V(\"hoverClosestPie\"))):G.push(H)}s=G}return k(z),k(g.concat(T)),k(O),qct(_,s)}function Fct(e){for(var t=kct.list({_fullLayout:e},null,!0),r=0;r<t.length;r++){var n=t[r].modebardisable;if(!t[r].fixedrange&&n!==\"autoscale+zoominout\"&&n!==\"zoominout+autoscale\")return!1}return!0}function zct(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];!n._module||!n._module.selectPoints||(sN.traceIs(n,\"scatter-like\")?(gce.hasMarkers(n)||gce.hasText(n))&&(t=!0):sN.traceIs(n,\"box-violin\")?(n.boxpoints===\"all\"||n.points===\"all\")&&(t=!0):t=!0)}return t}function Oct(e){for(var t=0;t<e.length;t++)if(!sN.traceIs(e[t],\"noHover\"))return!1;return!0}function qct(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}function Bct(e){for(var t=Rct([],e),r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;i++){var a=n[i];if(typeof a==\"string\")if(uP[a]!==void 0)t[r][i]=uP[a];else throw new Error([\"*modeBarButtons* configuration options\",\"invalid button name\"].join(\" \"))}return t}});var lN=ye((Hnr,_ce)=>{\"use strict\";_ce.exports={moduleType:\"component\",name:\"modebar\",layoutAttributes:aN(),supplyLayoutDefaults:fce(),manage:yce()}});var uN=ye((jnr,xce)=>{\"use strict\";var Nct=Kh().FROM_BL;xce.exports=function(t,r,n){n===void 0&&(n=Nct[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Bb=ye(mM=>{\"use strict\";var qb=Dr(),cN=wg(),Mg=hf().id2name,Uct=Rd(),bce=uN(),Vct=ym(),Gct=hs().ALMOST_EQUAL,Hct=Kh().FROM_BL;mM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;s<n.length;s++)c=Mg(n[s]),f=e[c],h=t[c],jct(f,h,{axIds:n,layoutOut:t,hasImage:i[c]});function x(M,g){for(s=0;s<M.length;s++){l=M[s];for(u in l)t[Mg(u)][g]=l}}for(x(o,\"_matchGroup\"),s=0;s<a.length;s++){l=a[s];for(u in l)if(h=t[Mg(u)],h.fixedrange){for(var b in l){var p=Mg(b);(e[p]||{}).fixedrange===!1&&qb.warn(\"fixedrange was specified as false for axis \"+p+\" but was overridden because another axis in its constraint group has fixedrange true\"),t[p].fixedrange=!0}break}}for(s=0;s<a.length;){l=a[s];for(u in l){h=t[Mg(u)],h._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(l).length&&(a.splice(s,1),s--);break}s++}x(a,\"_constraintGroup\");var C=[\"constrain\",\"range\",\"autorange\",\"rangemode\",\"rangebreaks\",\"categoryorder\",\"categoryarray\"],E=!1,A=!1;function L(){v=h[d],d===\"rangebreaks\"&&(A=h._hasDayOfWeekBreaks)}for(s=0;s<o.length;s++){l=o[s];for(var _=0;_<C.length;_++){d=C[_],v=null;var k;for(u in l)if(c=Mg(u),f=e[c],h=t[c],d in h){if(!h.matches&&(k=h,d in f)){L();break}v===null&&d in f&&L()}if(d===\"range\"&&v&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(E=!0),d===\"autorange\"&&v===null&&E&&(v=!1),v===null&&d in k&&(v=k[d]),v!==null)for(u in l)h=t[Mg(u)],h[d]=d===\"range\"?v.slice():v,d===\"rangebreaks\"&&(h._hasDayOfWeekBreaks=A,Vct(h,t))}}};function jct(e,t,r){var n=r.axIds,i=r.layoutOut,a=r.hasImage,o=i._axisConstraintGroups,s=i._axisMatchGroups,l=t._id,u=l.charAt(0),c=((i._splomAxes||{})[u]||{})[l]||{},f=t._id,h=f.charAt(0)===\"x\";t._matchGroup=null,t._constraintGroup=null;function d(z,O){return qb.coerce(e,t,Uct,z,O)}d(\"constrain\",a?\"domain\":\"range\"),qb.coerce(e,t,{constraintoward:{valType:\"enumerated\",values:h?[\"left\",\"center\",\"right\"]:[\"bottom\",\"middle\",\"top\"],dflt:h?\"center\":\"middle\"}},\"constraintoward\");var v=t.type,x,b,p=[];for(x=0;x<n.length;x++)if(b=n[x],b!==f){var C=i[Mg(b)];C.type===v&&p.push(b)}var E=Ace(o,f);if(E){var A=[];for(x=0;x<p.length;x++)b=p[x],E[b]||A.push(b);p=A}var L=p.length,_,k;L&&(e.matches||c.matches)&&(_=qb.coerce(e,t,{matches:{valType:\"enumerated\",values:p,dflt:p.indexOf(c.matches)!==-1?c.matches:void 0}},\"matches\"));var M=a&&!h?t.anchor:void 0;if(L&&!_&&(e.scaleanchor||M)&&(k=qb.coerce(e,t,{scaleanchor:{valType:\"enumerated\",values:p.concat([!1])}},\"scaleanchor\",M)),_){t._matchGroup=fN(s,f,_,1);var g=i[Mg(_)],P=wce(i,t)/wce(i,g);h!==(_.charAt(0)===\"x\")&&(P=(h?\"x\":\"y\")+P),fN(o,f,_,P)}else e.matches&&n.indexOf(e.matches)!==-1&&qb.warn(\"ignored \"+t._name+'.matches: \"'+e.matches+'\" to avoid an infinite loop');if(k){var T=d(\"scaleratio\");T||(T=t.scaleratio=1),fN(o,f,k,T)}else e.scaleanchor&&n.indexOf(e.scaleanchor)!==-1&&qb.warn(\"ignored \"+t._name+'.scaleanchor: \"'+e.scaleanchor+'\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function wce(e,t){var r=t.domain;return r||(r=e[Mg(t.overlaying)].domain),r[1]-r[0]}function Ace(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function fN(e,t,r,n){var i,a,o,s,l,u=Ace(e,t);u===null?(u={},u[t]=1,l=e.length,e.push(u)):l=e.indexOf(u);var c=Object.keys(u);for(i=0;i<e.length;i++)if(o=e[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)s=c[a],o[s]=hN(f,hN(n,u[s]));e.splice(l,1);return}if(n!==1)for(a=0;a<c.length;a++){var h=c[a];u[h]=hN(n,u[h])}u[r]=1}function hN(e,t){var r=\"\",n=\"\",i,a;typeof e==\"string\"&&(r=e.match(/^[xy]*/)[0],i=r.length,e=+e.substr(i)),typeof t==\"string\"&&(n=t.match(/^[xy]*/)[0],a=n.length,t=+t.substr(a));var o=e*t;return!i&&!a?o:!i||!a||r.charAt(0)===n.charAt(0)?r+n+e*t:i===a?o:(i>a?r.substr(a):n.substr(i))+o}function Wct(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=e[s];if(typeof l==\"string\"){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.substr(c);for(var f=u.charAt(0)===\"y\"?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}mM.enforce=function(t){var r=t._fullLayout,n=r._axisConstraintGroups||[],i,a,o,s,l,u,c,f;for(i=0;i<n.length;i++){o=Wct(n[i],r);var h=Object.keys(o),d=1/0,v=0,x=1/0,b={},p={},C=!1;for(a=0;a<h.length;a++)s=h[a],p[s]=l=r[Mg(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),b[s]=u=Math.abs(l._m)/o[s],d=Math.min(d,u),(l.constrain===\"domain\"||!l._constraintShrinkable)&&(x=Math.min(x,u)),delete l._constraintShrinkable,v=Math.max(v,u),l.constrain===\"domain\"&&(C=!0);if(!(d>Gct*v&&!C)){for(a=0;a<h.length;a++)if(s=h[a],u=b[s],l=p[s],c=l.constrain,u!==x||c===\"domain\")if(f=u/x,c===\"range\")bce(l,f);else{var E=l._inputDomain,A=(l.domain[1]-l.domain[0])/(E[1]-E[0]),L=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if(f/=A,f*L<1){l.domain=l._input.domain=E.slice(),bce(l,f);continue}if(L<1&&(l.range=l._input.range=l._inputRange.slice(),f*=L),l.autorange){var _=l.r2l(l.range[0]),k=l.r2l(l.range[1]),M=(_+k)/2,g=M,P=M,T=Math.abs(k-M),z=M-T*f*1.0001,O=M+T*f*1.0001,V=cN.makePadFn(r,l,0),G=cN.makePadFn(r,l,1);Tce(l,f);var Z=Math.abs(l._m),H=cN.concatExtremes(t,l),N=H.min,j=H.max,re,oe;for(oe=0;oe<N.length;oe++)re=N[oe].val-V(N[oe])/Z,re>z&&re<g&&(g=re);for(oe=0;oe<j.length;oe++)re=j[oe].val+G(j[oe])/Z,re<O&&re>P&&(P=re);var _e=(P-g)/(2*T);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=_<k?[g,P]:[P,g]}Tce(l,f)}}}};mM.getAxisGroup=function(t,r){for(var n=t._axisMatchGroups,i=0;i<n.length;i++){var a=n[i];if(a[r])return\"g\"+i}return r};mM.clean=function(t,r){if(r._inputDomain){for(var n=!1,i=r._id,a=t._fullLayout._axisConstraintGroups,o=0;o<a.length;o++)if(a[o][i]){n=!0;break}(!n||r.constrain!==\"domain\")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function Tce(e,t){var r=e._inputDomain,n=Hct[e.constraintoward],i=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[i+(r[0]-i)/t,i+(r[1]-i)/t],e.setScale()}});var xM=ye(pd=>{\"use strict\";var fP=Oa(),Bv=qa(),Jp=Mc(),M0=Dr(),dN=ru(),vN=hM(),yM=Ca(),Z3=So(),Sce=Mb(),Lce=lN(),_M=ho(),Cy=Kh(),Pce=Bb(),Xct=Pce.enforce,Zct=Pce.clean,Mce=wg().doAutoRange,Ice=\"start\",Yct=\"middle\",Rce=\"end\",Kct=hd().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,$ct],e)};function Jct(e,t,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=e[1]||i[1]<=e[0])&&a[0]<t[1]&&a[1]>t[0])return!0}return!1}function $ct(e){var t=e._fullLayout,r=t._size,n=r.p,i=_M.list(e,\"\",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?\"100%\":t.width+\"px\",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?\"100%\":t.height+\"px\"}).selectAll(\".main-svg\").call(Z3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Lce.manage(e),!t._has(\"cartesian\"))return Jp.previousPromises(e);function f(Pe,ge,Fe){var ce=Pe._lw/2;if(Pe._id.charAt(0)===\"x\"){if(ge){if(Fe===\"top\")return ge._offset-n-ce}else return r.t+r.h*(1-(Pe.position||0))+ce%1;return ge._offset+ge._length+n+ce}if(ge){if(Fe===\"right\")return ge._offset+ge._length+n+ce}else return r.l+r.w*(Pe.position||0)+ce%1;return ge._offset-n-ce}for(a=0;a<i.length;a++){l=i[a];var h=l._anchorAxis;l._linepositions={},l._lw=Z3.crispRound(e,l.linewidth,1),l._mainLinePosition=f(l,h,l.side),l._mainMirrorPosition=l.mirror&&h?f(l,h,Cy.OPPOSITE_SIDE[l.side]):null}var d=[],v=[],x=[],b=yM.opacity(t.paper_bgcolor)===1&&yM.opacity(t.plot_bgcolor)===1&&t.paper_bgcolor===t.plot_bgcolor;for(o in t._plots)if(s=t._plots[o],s.mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var p=s.xaxis.domain,C=s.yaxis.domain,E=s.plotgroup;if(Jct(p,C,x)&&o.indexOf(Kct)===-1){var A=E.node(),L=s.bg=M0.ensureSingle(E,\"rect\",\"bg\");A.insertBefore(L.node(),A.childNodes[0]),v.push(o)}else E.select(\"rect.bg\").remove(),x.push([p,C]),b||(d.push(o),v.push(o))}var _=t._bgLayer.selectAll(\".bg\").data(d);for(_.enter().append(\"rect\").classed(\"bg\",!0),_.exit().remove(),_.each(function(Pe){t._plots[Pe].bg=fP.select(this)}),a=0;a<v.length;a++)s=t._plots[v[a]],u=s.xaxis,c=s.yaxis,s.bg&&u._offset!==void 0&&c._offset!==void 0&&s.bg.call(Z3.setRect,u._offset-n,c._offset-n,u._length+2*n,c._length+2*n).call(yM.fill,t.plot_bgcolor).style(\"stroke-width\",0);if(!t._hasOnlyLargeSploms)for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var k=s.clipId=\"clip\"+t._uid+o+\"plot\",M=M0.ensureSingleById(t._clips,\"clipPath\",k,function(Pe){Pe.classed(\"plotclip\",!0).append(\"rect\")});s.clipRect=M.select(\"rect\").attr({width:u._length,height:c._length}),Z3.setTranslate(s.plot,u._offset,c._offset);var g,P;s._hasClipOnAxisFalse?(g=null,P=k):(g=k,P=null),Z3.setClipUrl(s.plot,g,e),s.layerClipId=P}var T,z,O,V,G,Z,H,N,j,re,oe,_e,Me;function ke(Pe){return\"M\"+T+\",\"+Pe+\"H\"+z}function me(Pe){return\"M\"+u._offset+\",\"+Pe+\"h\"+u._length}function ie(Pe){return\"M\"+Pe+\",\"+N+\"V\"+H}function Se(Pe){return c._shift!==void 0&&(Pe+=c._shift),\"M\"+Pe+\",\"+c._offset+\"v\"+c._length}function Le(Pe,ge,Fe){if(!Pe.showline||o!==Pe._mainSubplot)return\"\";if(!Pe._anchorAxis)return Fe(Pe._mainLinePosition);var ce=ge(Pe._mainLinePosition);return Pe.mirror&&(ce+=ge(Pe._mainMirrorPosition)),ce}for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var Ae=\"M0,0\";Ece(u,o)&&(G=cP(u,\"left\",c,i),T=u._offset-(G?n+G:0),Z=cP(u,\"right\",c,i),z=u._offset+u._length+(Z?n+Z:0),O=f(u,c,\"bottom\"),V=f(u,c,\"top\"),Me=!u._anchorAxis||o!==u._mainSubplot,Me&&(u.mirror===\"allticks\"||u.mirror===\"all\")&&(u._linepositions[o]=[O,V]),Ae=Le(u,ke,me),Me&&u.showline&&(u.mirror===\"all\"||u.mirror===\"allticks\")&&(Ae+=ke(O)+ke(V)),s.xlines.style(\"stroke-width\",u._lw+\"px\").call(yM.stroke,u.showline?u.linecolor:\"rgba(0,0,0,0)\")),s.xlines.attr(\"d\",Ae);var De=\"M0,0\";Ece(c,o)&&(oe=cP(c,\"bottom\",u,i),H=c._offset+c._length+(oe?n:0),_e=cP(c,\"top\",u,i),N=c._offset-(_e?n:0),j=f(c,u,\"left\"),re=f(c,u,\"right\"),Me=!c._anchorAxis||o!==c._mainSubplot,Me&&(c.mirror===\"allticks\"||c.mirror===\"all\")&&(c._linepositions[o]=[j,re]),De=Le(c,ie,Se),Me&&c.showline&&(c.mirror===\"all\"||c.mirror===\"allticks\")&&(De+=ie(j)+ie(re)),s.ylines.style(\"stroke-width\",c._lw+\"px\").call(yM.stroke,c.showline?c.linecolor:\"rgba(0,0,0,0)\")),s.ylines.attr(\"d\",De)}return _M.makeClipPaths(e),Jp.previousPromises(e)}function Ece(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||e.mirror===\"all\"||e.mirror===\"allticks\")}function Cce(e,t,r){if(!r.showline||!r._lw)return!1;if(r.mirror===\"all\"||r.mirror===\"allticks\")return!0;var n=r._anchorAxis;if(!n)return!1;var i=Cy.FROM_BL[t];return r.side===t?n.domain[i]===e.domain[i]:r.mirror&&n.domain[1-i]===e.domain[1-i]}function cP(e,t,r,n){if(Cce(e,t,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&Cce(e,t,a))return a._lw}return 0}pd.drawMainTitle=function(e){var t=e._fullLayout.title,r=e._fullLayout,n=aft(r),i=oft(r),a=nft(r,i),o=ift(r,n);if(Sce.draw(e,\"gtitle\",{propContainer:r,propName:\"title.text\",subtitlePropName:\"title.subtitle.text\",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:o,y:a,\"text-anchor\":n,dy:i}}),t.text&&t.automargin){var s=fP.select(e).selectAll(\".gtitle\"),l=Z3.bBox(fP.select(e).selectAll(\".g-gtitle\").node()).height,u=tft(e,t,l);if(u>0){rft(e,a,u,l),s.attr({x:o,y:a,\"text-anchor\":n,dy:kce(t.yanchor)}).call(dN.positionText,o,a);var c=(t.text.match(dN.BR_TAG_ALL)||[]).length;if(c){var f=Cy.LINE_SPACING*c+Cy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(\".line\").each(function(){var b=+this.getAttribute(\"dy\").slice(0,-2)-f+\"em\";this.setAttribute(\"dy\",b)})}var h=fP.select(e).selectAll(\".gtitle-subtitle\");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,x=v+Sce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,\"text-anchor\":n,dy:kce(t.yanchor)}).call(dN.positionText,o,x)}}}};function Qct(e,t,r,n,i){var a=t.yref===\"paper\"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r===\"b\"?a-o:o;return M0.isTopAnchor(t)&&r===\"t\"||M0.isBottomAnchor(t)&&r===\"b\"?!1:s<i}function eft(e,t,r,n,i){var a=0;return r===\"middle\"&&(a+=i/2),e===\"t\"?(r===\"top\"&&(a+=i),a+=n-t*n):(r===\"bottom\"&&(a+=i),a+=t*n),a}function tft(e,t,r){var n=t.y,i=t.yanchor,a=n>.5?\"t\":\"b\",o=e._fullLayout.margin[a],s=0;return t.yref===\"paper\"?s=r+t.pad.t+t.pad.b:t.yref===\"container\"&&(s=eft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function rft(e,t,r,n){var i=\"title.automargin\",a=e._fullLayout.title,o=a.y>.5?\"t\":\"b\",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref===\"paper\"&&Qct(e,a,o,t,n)?s[o]=r:a.yref===\"container\"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function ift(e,t){var r=e.title,n=e._size,i=0;switch(t===Ice?i=r.pad.l:t===Rce&&(i=-r.pad.r),r.xref){case\"paper\":return n.l+n.w*r.x+i;case\"container\":default:return e.width*r.x+i}}function nft(e,t){var r=e.title,n=e._size,i=0;if(t===\"0em\"||!t?i=-r.pad.b:t===Cy.CAP_SHIFT+\"em\"&&(i=r.pad.t),r.y===\"auto\")return n.t/2;switch(r.yref){case\"paper\":return n.t+n.h-n.h*r.y+i;case\"container\":default:return e.height-e.height*r.y+i}}function kce(e){return e===\"top\"?Cy.CAP_SHIFT+.3+\"em\":e===\"bottom\"?\"-0.3em\":Cy.MID_SHIFT+\"em\"}function aft(e){var t=e.title,r=Yct;return M0.isRightAnchor(t)?r=Rce:M0.isLeftAnchor(t)&&(r=Ice),r}function oft(e){var t=e.title,r=\"0em\";return M0.isTopAnchor(t)?r=Cy.CAP_SHIFT+\"em\":M0.isMiddleAnchor(t)&&(r=Cy.MID_SHIFT+\"em\"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n<t.length;n++){var i=t[n],a=i[0]||{},o=a.trace||{},s=o._module||{},l=s.arraysToCalcdata;l&&l(i,o);var u=s.editStyle;u&&r.push({fn:u,cd0:a})}if(r.length){for(n=0;n<r.length;n++){var c=r[n];c.fn(e,c.cd0)}vN(e),pd.redrawReglTraces(e)}return Jp.style(e),Bv.getComponentMethod(\"legend\",\"draw\")(e),Jp.previousPromises(e)};pd.doColorBars=function(e){return Bv.getComponentMethod(\"colorbar\",\"draw\")(e),Jp.previousPromises(e)};pd.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,Bv.call(\"_doPlot\",e,\"\",t)};pd.doLegend=function(e){return Bv.getComponentMethod(\"legend\",\"draw\")(e),Jp.previousPromises(e)};pd.doTicksRelayout=function(e){return _M.draw(e,\"redraw\"),e._fullLayout._hasOnlyLargeSploms&&(Bv.subplotsRegistry.splom.updateGrid(e),vN(e),pd.redrawReglTraces(e)),pd.drawMainTitle(e),Jp.previousPromises(e)};pd.doModeBar=function(e){var t=e._fullLayout;Lce.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return Jp.previousPromises(e)};pd.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var i=t[r[n]],a=i._scene;a.setViewport(i)}};pd.drawData=function(e){var t=e._fullLayout;vN(e);for(var r=t._basePlotModules,n=0;n<r.length;n++)r[n].plot(e);return pd.redrawReglTraces(e),Jp.style(e),Bv.getComponentMethod(\"selections\",\"draw\")(e),Bv.getComponentMethod(\"shapes\",\"draw\")(e),Bv.getComponentMethod(\"annotations\",\"draw\")(e),Bv.getComponentMethod(\"images\",\"draw\")(e),t._replotting=!1,Jp.previousPromises(e)};pd.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has(\"regl\")){var r=e._fullData,n=[],i=[],a,o;for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),a=0;a<r.length;a++){var s=r[a];s.visible===!0&&s._length!==0&&(s.type===\"splom\"?t._splomScenes[s.uid].draw():s.type===\"scattergl\"?M0.pushUnique(n,s.xaxis+s.yaxis):s.type===\"scatterpolargl\"&&M0.pushUnique(i,s.subplot))}for(a=0;a<n.length;a++)o=t._plots[n[a]],o._scene&&o._scene.draw();for(a=0;a<i.length;a++)o=t[i[a]]._subplot,o._scene&&o._scene.draw()}};pd.doAutoRangeAndConstraints=function(e){for(var t=_M.list(e,\"\",!0),r,n={},i=0;i<t.length;i++)if(r=t[i],!n[r._id]){n[r._id]=1,Zct(e,r),Mce(e,r);var a=r._matchGroup;if(a)for(var o in a){var s=_M.getFromId(e,o);Mce(e,s,r.range),n[o]=1}}Xct(e)};pd.finalDraw=function(e){Bv.getComponentMethod(\"rangeslider\",\"draw\")(e),Bv.getComponentMethod(\"rangeselector\",\"draw\")(e)};pd.drawMarginPushers=function(e){Bv.getComponentMethod(\"legend\",\"draw\")(e),Bv.getComponentMethod(\"rangeselector\",\"draw\")(e),Bv.getComponentMethod(\"sliders\",\"draw\")(e),Bv.getComponentMethod(\"updatemenus\",\"draw\")(e),Bv.getComponentMethod(\"colorbar\",\"draw\")(e)}});var mN=ye((Znr,qce)=>{\"use strict\";var sft=u_().readPaths,lft=tP(),Dce=Q1().clearOutlineControllers,pN=Ca(),Fce=So(),uft=pl().arrayEditor,zce=f_(),cft=zce.getPathString;qce.exports={draw:hP,drawOne:Oce,activateLastSelection:dft};function hP(e){var t=e._fullLayout;Dce(e),t._selectionLayer.selectAll(\"path\").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll(\"path\").remove()}for(var i=0;i<t.selections.length;i++)Oce(e,i)}function dP(e){return e._context.editSelection}function Oce(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index=\"'+t+'\"]').remove();var r=zce.makeSelectionsOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input)return;a(e._fullLayout._selectionLayer);function a(o){var s=cft(e,n),l={\"data-index\":t,\"fill-rule\":\"evenodd\",d:s},u=n.opacity,c=\"rgba(0,0,0,0)\",f=n.line.color||pN.contrast(e._fullLayout.plot_bgcolor),h=n.line.width,d=n.line.dash;h||(h=5,d=\"solid\");var v=dP(e)&&e._fullLayout._activeSelectionIndex===t;v&&(c=e._fullLayout.activeselection.fillcolor,u=e._fullLayout.activeselection.opacity);for(var x=[],b=1;b>=0;b--){var p=o.append(\"path\").attr(l).style(\"opacity\",b?.1:u).call(pN.stroke,f).call(pN.fill,c).call(Fce.dashLine,b?\"solid\":d,b?4+h:h);if(fft(p,e,n),v){var C=uft(e.layout,\"selections\",n);p.style({cursor:\"move\"});var E={element:p.node(),plotinfo:i,gd:e,editHelpers:C,isActiveSelection:!0},A=sft(s,e);lft(A,p,E)}else p.style(\"pointer-events\",b?\"all\":\"none\");x[b]=p}var L=x[0],_=x[1];_.node().addEventListener(\"click\",function(){return hft(e,L)})}}function fft(e,t,r){var n=r.xref+r.yref;Fce.setClipUrl(e,\"clip\"+t._fullLayout._uid+n,t)}function hft(e,t){if(dP(e)){var r=t.node(),n=+r.getAttribute(\"data-index\");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){gN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=gN,hP(e)}}}function dft(e){if(dP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=gN,hP(e)}}function gN(e){if(dP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Dce(e),delete e._fullLayout._activeSelectionIndex,hP(e))}}});var Nce=ye((Ynr,Bce)=>{function vft(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n(\"check\",{seg1:i,seg2:a})},segmentChop:function(i,a){return n(\"div_seg\",{seg:i,pt:a}),n(\"chop\",{seg:i,pt:a})},statusRemove:function(i){return n(\"pop_seg\",{seg:i})},segmentUpdate:function(i){return n(\"seg_update\",{seg:i})},segmentNew:function(i,a){return n(\"new_seg\",{seg:i,primary:a})},segmentRemove:function(i){return n(\"rem_seg\",{seg:i})},tempStatus:function(i,a,o){return n(\"temp_status\",{seg:i,above:a,below:o})},rewind:function(i){return n(\"rewind\",{seg:i})},status:function(i,a,o){return n(\"status\",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n(\"vert\",{x:i}))},log:function(i){return typeof i!=\"string\"&&(i=JSON.stringify(i,!1,\"  \")),n(\"log\",{txt:i})},reset:function(){return n(\"reset\")},selected:function(i){return n(\"selected\",{segs:i})},chainStart:function(i){return n(\"chain_start\",{seg:i})},chainRemoveHead:function(i,a){return n(\"chain_rem_head\",{index:i,pt:a})},chainRemoveTail:function(i,a){return n(\"chain_rem_tail\",{index:i,pt:a})},chainNew:function(i,a){return n(\"chain_new\",{pt1:i,pt2:a})},chainMatch:function(i){return n(\"chain_match\",{index:i})},chainClose:function(i){return n(\"chain_close\",{index:i})},chainAddHead:function(i,a){return n(\"chain_add_head\",{index:i,pt:a})},chainAddTail:function(i,a){return n(\"chain_add_tail\",{index:i,pt:a})},chainConnect:function(i,a){return n(\"chain_con\",{index1:i,index2:a})},chainReverse:function(i){return n(\"chain_rev\",{index:i})},chainJoin:function(i,a){return n(\"chain_join\",{index1:i,index2:a})},done:function(){return n(\"done\")}},e}Bce.exports=vft});var Vce=ye((Knr,Uce)=>{function pft(e){typeof e!=\"number\"&&(e=1e-10);var t={epsilon:function(r){return typeof r==\"number\"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u<e)return!1;var c=o*o+l*l;return!(u-c>-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])<e},pointsSameY:function(r,n){return Math.abs(r[1]-n[1])<e},pointsSame:function(r,n){return t.pointsSameX(r,n)&&t.pointsSameY(r,n)},pointsCompare:function(r,n){return t.pointsSameX(r,n)?t.pointsSameY(r,n)?0:r[1]<n[1]?-1:1:r[0]<n[0]?-1:1},pointsCollinear:function(r,n,i){var a=r[0]-n[0],o=r[1]-n[1],s=n[0]-i[0],l=n[1]-i[1];return Math.abs(a*l-s*o)<e},linesIntersect:function(r,n,i,a){var o=n[0]-r[0],s=n[1]-r[1],l=a[0]-i[0],u=a[1]-i[1],c=o*u-s*l;if(Math.abs(c)<e)return!1;var f=r[0]-i[0],h=r[1]-i[1],d=(l*h-u*f)/c,v=(o*h-s*f)/c,x={alongA:0,alongB:0,pt:[r[0]+d*o,r[1]+d*s]};return d<=-e?x.alongA=-2:d<e?x.alongA=-1:d-1<=-e?x.alongA=0:d-1<e?x.alongA=1:x.alongA=2,v<=-e?x.alongB=-2:v<e?x.alongB=-1:v-1<=-e?x.alongB=0:v-1<e?x.alongB=1:x.alongB=2,x},pointInsideRegion:function(r,n){for(var i=r[0],a=r[1],o=n[n.length-1][0],s=n[n.length-1][1],l=!1,u=0;u<n.length;u++){var c=n[u][0],f=n[u][1];f-a>e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}Uce.exports=pft});var Hce=ye((Jnr,Gce)=>{var gft={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Gce.exports=gft});var Wce=ye(($nr,jce)=>{var bM=Hce();function mft(e,t,r){function n(v,x){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:null,below:null},otherFill:null}}function i(v,x,b){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=bM.create();function o(v,x,b,p,C,E){var A=t.pointsCompare(x,C);return A!==0?A:t.pointsSame(b,E)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?C:E,p?E:C)?1:-1}function s(v,x){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,x,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,x){var b=bM.node({isStart:!0,pt:v.start,seg:v,primary:x,other:null,status:null});return s(b,v.end),b}function u(v,x,b){var p=bM.node({isStart:!1,pt:x.end,seg:x,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,x){var b=l(v,x);return u(b,v,x),b}function f(v,x){r&&r.segmentChop(v.seg,x),v.other.remove(),v.seg.end=x,v.other.pt=x,s(v.other,v.pt)}function h(v,x){var b=i(x,v.seg.end,v.seg);return f(v,x),c(b,v.primary)}function d(v,x){var b=bM.create();function p(G,Z){var H=G.seg.start,N=G.seg.end,j=Z.seg.start,re=Z.seg.end;return t.pointsCollinear(H,j,re)?t.pointsCollinear(N,j,re)||t.pointAboveOrOnLine(N,j,re)?1:-1:t.pointAboveOrOnLine(H,j,re)?1:-1}function C(G){return b.findTransition(function(Z){var H=p(G,Z.ev);return H>0})}function E(G,Z){var H=G.seg,N=Z.seg,j=H.start,re=H.end,oe=N.start,_e=N.end;r&&r.checkIntersection(H,N);var Me=t.linesIntersect(j,re,oe,_e);if(Me===!1){if(!t.pointsCollinear(j,re,oe)||t.pointsSame(j,_e)||t.pointsSame(re,oe))return!1;var ke=t.pointsSame(j,oe),me=t.pointsSame(re,_e);if(ke&&me)return Z;var ie=!ke&&t.pointBetween(j,oe,_e),Se=!me&&t.pointBetween(re,oe,_e);if(ke)return Se?h(Z,re):h(G,_e),Z;ie&&(me||(Se?h(Z,re):h(G,_e)),h(Z,j))}else Me.alongA===0&&(Me.alongB===-1?h(G,oe):Me.alongB===0?h(G,Me.pt):Me.alongB===1&&h(G,_e)),Me.alongB===0&&(Me.alongA===-1?h(Z,j):Me.alongA===0?h(Z,Me.pt):Me.alongA===1&&h(Z,re));return!1}for(var A=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(k){var Z=E(L,k);if(Z)return Z}return M?E(L,M):!1};var V=G;r&&r.segmentNew(L.seg,L.primary);var _=C(L),k=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,k?k.seg:!1,M?M.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var T;M?L.primary===M.primary?T=M.seg.otherFill.above:T=M.seg.myFill.above:T=L.primary?x:v,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,k?k.seg:!1,M?M.seg:!1),L.other.status=_.insert(bM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(b.exists(z.prev)&&b.exists(z.next)&&E(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var O=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=O}A.push(L.seg)}a.getHead().remove()}return r&&r.done(),A}return e?{addRegion:function(v){for(var x,b=v[v.length-1],p=0;p<v.length;p++){x=b,b=v[p];var C=t.pointsCompare(x,b);C!==0&&c(n(C<0?x:b,C<0?b:x),!0)}},calculate:function(v){return d(v,!1)}}:{calculate:function(v,x,b,p){return v.forEach(function(C){c(i(C.start,C.end,C),!0)}),b.forEach(function(C){c(i(C.start,C.end,C),!1)}),d(x,p)}}}jce.exports=mft});var Zce=ye((Qnr,Xce)=>{function yft(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(V,G,Z){return c.index=V,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h<n.length;h++){var d=n[h],v=d[0],x=d[1],b=d[d.length-1],p=d[d.length-2];if(t.pointsSame(v,o)){if(f(h,!0,!0))break}else if(t.pointsSame(v,s)){if(f(h,!0,!1))break}else if(t.pointsSame(b,o)){if(f(h,!1,!0))break}else if(t.pointsSame(b,s)&&f(h,!1,!1))break}if(c===l){n.push([o,s]),r&&r.chainNew(o,s);return}if(c===u){r&&r.chainMatch(l.index);var C=l.index,E=l.matches_pt1?s:o,A=l.matches_head,d=n[C],L=A?d[0]:d[d.length-1],_=A?d[1]:d[d.length-2],k=A?d[d.length-1]:d[0],M=A?d[d.length-2]:d[1];if(t.pointsCollinear(_,L,E)&&(A?(r&&r.chainRemoveHead(l.index,E),d.shift()):(r&&r.chainRemoveTail(l.index,E),d.pop()),L=_),t.pointsSame(k,E)){n.splice(C,1),t.pointsCollinear(M,k,L)&&(A?(r&&r.chainRemoveTail(l.index,L),d.pop()):(r&&r.chainRemoveHead(l.index,L),d.shift())),r&&r.chainClose(l.index),i.push(d);return}A?(r&&r.chainAddHead(l.index,E),d.unshift(E)):(r&&r.chainAddTail(l.index,E),d.push(E));return}function g(V){r&&r.chainReverse(V),n[V].reverse()}function P(V,G){var Z=n[V],H=n[G],N=Z[Z.length-1],j=Z[Z.length-2],re=H[0],oe=H[1];t.pointsCollinear(j,N,re)&&(r&&r.chainRemoveTail(V,N),Z.pop(),N=j),t.pointsCollinear(N,re,oe)&&(r&&r.chainRemoveHead(G,re),H.shift()),r&&r.chainJoin(V,G),n[V]=Z.concat(H),n.splice(G,1)}var T=l.index,z=u.index;r&&r.chainConnect(T,z);var O=n[T].length<n[z].length;l.matches_head?u.matches_head?O?(g(T),P(T,z)):(g(z),P(z,T)):P(z,T):u.matches_head?P(T,z):O?(g(T),P(z,T)):(g(z),P(T,z))}),i}Xce.exports=yft});var Kce=ye((ear,Yce)=>{function wM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var _ft={union:function(e,t){return wM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return wM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return wM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return wM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return wM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Yce.exports=_ft});var $ce=ye((tar,Jce)=>{var xft={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l<a.length;l++)s=e.selectDifference(e.combine(s,o(a[l])));return s}if(t.type===\"Polygon\")return e.polygon(r(t.coordinates));if(t.type===\"MultiPolygon\"){for(var n=e.segments({inverted:!1,regions:[]}),i=0;i<t.coordinates.length;i++)n=e.selectUnion(e.combine(n,r(t.coordinates[i])));return e.polygon(n)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(e,t,r){r=e.polygon(e.segments(r));function n(d,v){return t.pointInsideRegion([(d[0][0]+d[1][0])*.5,(d[0][1]+d[1][1])*.5],v)}function i(d){return{region:d,children:[]}}var a=i(null);function o(d,v){for(var x=0;x<d.children.length;x++){var b=d.children[x];if(n(v,b.region)){o(b,v);return}}for(var p=i(v),x=0;x<d.children.length;x++){var b=d.children[x];n(b.region,v)&&(p.children.push(b),d.children.splice(x,1),x--)}d.children.push(p)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(d,v){for(var x=0,b=d[d.length-1][0],p=d[d.length-1][1],C=[],E=0;E<d.length;E++){var A=d[E][0],L=d[E][1];C.push([A,L]),x+=L*b-A*p,b=A,p=L}var _=x<0;return _!==v&&C.reverse(),C.push([C[0][0],C[0][1]]),C}var c=[];function f(d){var v=[u(d.region,!1)];c.push(v);for(var x=0;x<d.children.length;x++)v.push(h(d.children[x]))}function h(d){for(var v=0;v<d.children.length;v++)f(d.children[v]);return u(d.region,!0)}for(var s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:\"Polygon\",coordinates:[]}:c.length==1?{type:\"Polygon\",coordinates:c[0]}:{type:\"MultiPolygon\",coordinates:c}}};Jce.exports=xft});var rfe=ye((rar,tfe)=>{var bft=Nce(),wft=Vce(),Qce=Wce(),Tft=Zce(),TM=Kce(),efe=$ce(),E0=!1,AM=wft(),Mp;Mp={buildLog:function(e){return e===!0?E0=bft():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return AM.epsilon(e)},segments:function(e){var t=Qce(!0,AM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Qce(!1,AM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:TM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:TM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:TM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:TM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:TM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Tft(e.segments,AM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return efe.toPolygon(Mp,e)},polygonToGeoJSON:function(e){return efe.fromPolygon(Mp,AM,e)},union:function(e,t){return SM(e,t,Mp.selectUnion)},intersect:function(e,t){return SM(e,t,Mp.selectIntersect)},difference:function(e,t){return SM(e,t,Mp.selectDifference)},differenceRev:function(e,t){return SM(e,t,Mp.selectDifferenceRev)},xor:function(e,t){return SM(e,t,Mp.selectXor)}};function SM(e,t,r){var n=Mp.segments(e),i=Mp.segments(t),a=Mp.combine(n,i),o=r(a);return Mp.polygon(o)}typeof window==\"object\"&&(window.PolyBool=Mp);tfe.exports=Mp});var nfe=ye((iar,ife)=>{ife.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var f=r[u+n][0],h=r[u+n][1],d=r[c+n][0],v=r[c+n][1],x=h>o!=v>o&&a<(d-f)*(o-h)/(v-h)+f;x&&(s=!s)}return s}});var MM=ye((nar,afe)=>{\"use strict\";var yN=b6().dot,vP=hs().BADNUM,pP=afe.exports={};pP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;s<r.length;s++)n=Math.min(n,r[s][0]),i=Math.max(i,r[s][0]),a=Math.min(a,r[s][1]),o=Math.max(o,r[s][1]);var l=!1,u;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(l=!0,u=function(v){return v[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(l=!0,u=function(v){return v[1]===r[0][1]}));function c(v,x){var b=v[0],p=v[1];return!(b===vP||b<n||b>i||p===vP||p<a||p>o||x&&u(v))}function f(v,x){var b=v[0],p=v[1];if(b===vP||b<n||b>i||p===vP||p<a||p>o)return!1;var C=r.length,E=r[0][0],A=r[0][1],L=0,_,k,M,g,P;for(_=1;_<C;_++)if(k=E,M=A,E=r[_][0],A=r[_][1],g=Math.min(k,E),!(b<g||b>Math.max(k,E)||p>Math.max(M,A)))if(p<Math.min(M,A))b!==g&&L++;else{if(E===k?P=p:P=M+(b-k)*(A-M)/(E-k),p===P)return!(_===1&&x);p<=P&&b!==g&&L++}return L%2===1}var h=!0,d=r[0];for(s=1;s<r.length;s++)if(d[0]!==r[s][0]||d[1]!==r[s][1]){h=!1;break}return{xmin:n,xmax:i,ymin:a,ymax:o,pts:r,contains:l?c:f,isRect:l,degenerate:h}};pP.isSegmentBent=function(t,r,n,i){var a=t[r],o=[t[n][0]-a[0],t[n][1]-a[1]],s=yN(o,o),l=Math.sqrt(s),u=[-o[1]/l,o[0]/l],c,f,h;for(c=r+1;c<n;c++)if(f=[t[c][0]-a[0],t[c][1]-a[1]],h=yN(f,o),h<0||h>s||Math.abs(yN(f,u))>i)return!0;return!1};pP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f<t.length;f++)(f===t.length-1||pP.isSegmentBent(t,c,f+1,r))&&(n.push(t[f]),n.length<u-2&&(i=f,a=n.length-1),c=f)}if(t.length>1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var sfe=ye((aar,ofe)=>{\"use strict\";ofe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:\"-select\"}});var kfe=ye((oar,Cfe)=>{\"use strict\";var lfe=rfe(),Aft=nfe(),kM=qa(),Sft=So().dashStyle,EM=Ca(),Mft=vf(),Eft=rp().makeEventData,DM=Sg(),Cft=DM.freeMode,kft=DM.rectMode,LM=DM.drawMode,wN=DM.openMode,TN=DM.selectMode,ufe=f_(),cfe=vM(),pfe=tP(),gfe=Q1().clearOutline,mfe=u_(),_N=mfe.handleEllipse,Lft=mfe.readPaths,Pft=JL().newShapes,Ift=WB(),Rft=mN().activateLastSelection,mP=Dr(),Dft=mP.sorterAsc,yfe=MM(),CM=D6(),C0=hf().getFromId,Fft=hM(),zft=xM().redrawReglTraces,yP=sfe(),Am=yP.MINSELECT,Oft=yfe.filter,AN=yfe.tester,SN=XL(),ffe=SN.p2r,qft=SN.axValue,Bft=SN.getTransform;function MN(e){return e.subplot!==void 0}function Nft(e,t,r,n,i){var a=!MN(n),o=Cft(i),s=kft(i),l=wN(i),u=LM(i),c=TN(i),f=i===\"drawline\",h=i===\"drawcircle\",d=f||h,v=n.gd,x=v._fullLayout,b=c&&x.newselection.mode===\"immediate\"&&a,p=x._zoomlayer,C=n.element.getBoundingClientRect(),E=n.plotinfo,A=Bft(E),L=t-C.left,_=r-C.top;x._calcInverseTransform(v);var k=mP.apply3DTransform(x._invTransform)(L,_);L=k[0],_=k[1];var M=x._invScaleX,g=x._invScaleY,P=L,T=_,z=\"M\"+L+\",\"+_,O=n.xaxes[0],V=n.yaxes[0],G=O._length,Z=V._length,H=e.altKey&&!(LM(i)&&l),N,j,re,oe,_e,Me,ke;xfe(e,v,n),o&&(N=Oft([[L,_]],yP.BENDPX));var me=p.selectAll(\"path.select-outline-\"+E.id).data([1]),ie=u?x.newshape:x.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:\"rgba(0,0,0,0)\",Le=ie.line.color||(a?EM.contrast(v._fullLayout.plot_bgcolor):\"#7f7f7f\");me.enter().append(\"path\").attr(\"class\",\"select-outline select-outline-\"+E.id).style({opacity:u?ie.opacity/2:1,\"stroke-dasharray\":Sft(ie.line.dash,ie.line.width),\"stroke-width\":ie.line.width+\"px\",\"shape-rendering\":\"crispEdges\"}).call(EM.stroke,Le).call(EM.fill,Se).attr(\"fill-rule\",\"evenodd\").classed(\"cursor-move\",!!u).attr(\"transform\",A).attr(\"d\",z+\"Z\");var Ae=p.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:EM.background,stroke:EM.defaultLine,\"stroke-width\":1}).attr(\"transform\",A).attr(\"d\",\"M0,0Z\");if(u&&n.hasText){var De=p.select(\".label-temp\");De.empty()&&(De=p.append(\"g\").classed(\"label-temp\",!0).classed(\"select-outline\",!0).style({opacity:.8}))}var Pe=x._uid+yP.SELECTID,ge=[],Fe=_P(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ze=O._id,ct=V._id;Sfe(v,Ze,ct,Fe);for(var pt=(v.layout||{}).selections||[],Wt=[],st=!1,lt=0;lt<pt.length;lt++){var Gt=x.selections[lt];!Gt||Gt.xref!==Ze||Gt.yref!==ct?Wt.push(pt[lt]):st=!0}st&&(v._fullLayout._noEmitSelectedAtStart=!0,kM.call(\"_guiRelayout\",v,{selections:Wt}))}});var ce=eht(n);n.moveFn=function(Ze,ct){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),P=Math.max(0,Math.min(G,M*Ze+L)),T=Math.max(0,Math.min(Z,g*ct+_));var pt=Math.abs(P-L),Wt=Math.abs(T-_);if(s){var st,lt,Gt;if(c){var Nt=x.selectdirection;switch(Nt===\"any\"?Wt<Math.min(pt*.6,Am)?st=\"h\":pt<Math.min(Wt*.6,Am)?st=\"v\":st=\"d\":st=Nt,st){case\"h\":lt=h?Z/2:0,Gt=Z;break;case\"v\":lt=h?G/2:0,Gt=G;break}}if(u)switch(x.newshape.drawdirection){case\"vertical\":st=\"h\",lt=h?Z/2:0,Gt=Z;break;case\"horizontal\":st=\"v\",lt=h?G/2:0,Gt=G;break;case\"ortho\":pt<Wt?(st=\"h\",lt=_,Gt=T):(st=\"v\",lt=L,Gt=P);break;default:st=\"d\"}st===\"h\"?(oe=d?_N(h,[P,lt],[P,Gt]):[[L,lt],[L,Gt],[P,Gt],[P,lt]],oe.xmin=d?P:Math.min(L,P),oe.xmax=d?P:Math.max(L,P),oe.ymin=Math.min(lt,Gt),oe.ymax=Math.max(lt,Gt),Ae.attr(\"d\",\"M\"+oe.xmin+\",\"+(_-Am)+\"h-4v\"+2*Am+\"h4ZM\"+(oe.xmax-1)+\",\"+(_-Am)+\"h4v\"+2*Am+\"h-4Z\")):st===\"v\"?(oe=d?_N(h,[lt,T],[Gt,T]):[[lt,_],[lt,T],[Gt,T],[Gt,_]],oe.xmin=Math.min(lt,Gt),oe.xmax=Math.max(lt,Gt),oe.ymin=d?T:Math.min(_,T),oe.ymax=d?T:Math.max(_,T),Ae.attr(\"d\",\"M\"+(L-Am)+\",\"+oe.ymin+\"v-4h\"+2*Am+\"v4ZM\"+(L-Am)+\",\"+(oe.ymax-1)+\"v4h\"+2*Am+\"v-4Z\")):st===\"d\"&&(oe=d?_N(h,[L,_],[P,T]):[[L,_],[L,T],[P,T],[P,_]],oe.xmin=Math.min(L,P),oe.xmax=Math.max(L,P),oe.ymin=Math.min(_,T),oe.ymax=Math.max(_,T),Ae.attr(\"d\",\"M0,0Z\"))}else o&&(N.addPt([P,T]),oe=N.filtered);if(n.selectionDefs&&n.selectionDefs.length?(re=bfe(n.mergedPolygons,oe,H),oe.subtract=H,j=EN(n.selectionDefs.concat([oe]))):(re=[oe],j=AN(oe)),pfe(Tfe(re,l),me,n),c){var $t=bN(v,!1),sr=$t.eventData?$t.eventData.points.slice():[];$t=bN(v,!1,j,Fe,n),j=$t.selectionTesters,ke=$t.eventData;var wr;N?wr=N.filtered:wr=Mfe(re),CM.throttle(Pe,yP.SELECTDELAY,function(){ge=Afe(j,Fe);for(var ur=ge.slice(),Qe=0;Qe<sr.length;Qe++){for(var Et=sr[Qe],er=!1,Ut=0;Ut<ur.length;Ut++)if(ur[Ut].curveNumber===Et.curveNumber&&ur[Ut].pointNumber===Et.pointNumber){er=!0;break}er||ur.push(Et)}ur.length&&(ke||(ke={}),ke.points=ur),ce(ke,wr),tht(v,ke)})}},n.clickFn=function(Ze,ct){if(Ae.remove(),v._fullLayout._activeShapeIndex>=0){v._fullLayout._deactivateShape(v);return}if(!u){var pt=x.clickmode;CM.done(Pe).then(function(){if(CM.clear(Pe),Ze===2){for(me.remove(),_e=0;_e<Fe.length;_e++)Me=Fe[_e],Me._module.selectPoints(Me,!1);if(IM(v,Fe),PM(n),kN(v),Fe.length){var Wt=Fe[0].xaxis,st=Fe[0].yaxis;if(Wt&&st){for(var lt=[],Gt=v._fullLayout.selections,Nt=0;Nt<Gt.length;Nt++){var $t=Gt[Nt];$t&&($t.xref!==Wt._id||$t.yref!==st._id)&&lt.push($t)}lt.length<Gt.length&&(v._fullLayout._noEmitSelectedAtStart=!0,kM.call(\"_guiRelayout\",v,{selections:lt}))}}}else pt.indexOf(\"select\")>-1&&_fe(ct,v,n.xaxes,n.yaxes,n.subplot,n,me),pt===\"event\"&&RM(v,void 0);Mft.click(v,ct,E.id)}).catch(mP.error)}},n.doneFn=function(){Ae.remove(),CM.done(Pe).then(function(){CM.clear(Pe),!b&&oe&&n.selectionDefs&&(oe.subtract=H,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&PM(n,b),n.doneFnCompleted&&n.doneFnCompleted(ge),c&&RM(v,ke)}).catch(mP.error)}}function _fe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf(\"event\")>-1,f=[],h,d,v,x,b,p,C,E,A,L;if(jft(s)){xfe(e,t,a),h=_P(t,r,n,i);var _=Wft(s,h),k=_.pointNumbers.length>0;if(k?Xft(h,_):Zft(h)&&(C=dfe(_))){for(o&&o.remove(),L=0;L<h.length;L++)d=h[L],d._module.selectPoints(d,!1);IM(t,h),PM(a),c&&kN(t)}else{E=e.shiftKey&&(C!==void 0?C:dfe(_)),v=Uft(_.pointNumber,_.searchInfo,E);var M=a.selectionDefs.concat([v]);for(x=EN(M,x),L=0;L<h.length;L++)if(b=h[L]._module.selectPoints(h[L],x),p=wfe(b,h[L]),f.length)for(var g=0;g<p.length;g++)f.push(p[g]);else f=p;if(A={points:f},IM(t,h,A),v&&a&&a.selectionDefs.push(v),o){var P=a.mergedPolygons,T=wN(a.dragmode);pfe(Tfe(P,T),o,a)}c&&RM(t,A)}}}function Uft(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}function xN(e){return\"pointNumber\"in e&&\"searchInfo\"in e}function Vft(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,i){var a=e.searchInfo.cd[0].trace.index,o=i.cd[0].trace.index;return o===a&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:!!e.subtract}}function EN(e){if(!e.length)return;for(var t=[],r=xN(e[0])?0:e[0][0][0],n=r,i=xN(e[0])?0:e[0][0][1],a=i,o=0;o<e.length;o++)if(xN(e[o]))t.push(Vft(e[o]));else{var s=AN(e[o]);s.subtract=!!e[o].subtract,t.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}function l(u,c,f,h){for(var d=!1,v=0;v<t.length;v++)t[v].contains(u,c,f,h)&&(d=!t[v].subtract);return d}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:l,isRect:!1,degenerate:!1}}function xfe(e,t,r){var n=t._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(e.shiftKey||e.altKey)&&!(LM(a)&&wN(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!s||!i.selection)&&PM(r),o||(gfe(t),n._lastSelectedSubplot=i.id)}function Gft(e){return e._fullLayout._activeShapeIndex>=0}function Hft(e){return e._fullLayout._activeSelectionIndex>=0}function PM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Gft(i)&&i._fullLayout._deactivateShape(i),Hft(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=LM(r),l=TN(r);if(s||l){var u=o.selectAll(\".select-outline-\"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=Pft(u,e)),c&&kM.call(\"_guiRelayout\",i,{shapes:c});var f;l&&!MN(e)&&(f=Ift(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,kM.call(\"_guiRelayout\",i,{selections:f}).then(function(){t&&Rft(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function hfe(e){return e._id}function _P(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(hfe),o=r.map(hfe),s,l,u;for(u=0;u<e.calcdata.length;u++)if(s=e.calcdata[u],l=s[0].trace,!(l.visible!==!0||!l._module||!l._module.selectPoints))if(MN({subplot:n})&&(l.subplot===n||l.geo===n))i.push(gP(l._module,s,t[0],r[0]));else if(l.type===\"splom\"){if(l._xaxes[a[0]]&&l._yaxes[o[0]]){var c=gP(l._module,s,t[0],r[0]);c.scene=e._fullLayout._splomScenes[l.uid],i.push(c)}}else if(l.type===\"sankey\"){var f=gP(l._module,s,t[0],r[0]);i.push(f)}else{if(a.indexOf(l.xaxis)===-1&&(!l._xA||!l._xA.overlaying)||o.indexOf(l.yaxis)===-1&&(!l._yA||!l._yA.overlaying))continue;i.push(gP(l._module,s,C0(e,l.xaxis),C0(e,l.yaxis)))}return i}function gP(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function jft(e){return e&&Array.isArray(e)&&e[0].hoverOnBox!==!0}function Wft(e,t){var r=e[0],n=-1,i=[],a,o;for(o=0;o<t.length;o++)if(a=t[o],r.fullData.index===a.cd[0].trace.index){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?n=r.pointNumber:r.binNumber!==void 0&&(n=r.binNumber,i=r.pointNumbers);break}return{pointNumber:n,pointNumbers:i,searchInfo:a}}function dfe(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,i=n.length>0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Xft(e,t){var r=[],n,i,a,o;for(o=0;o<e.length;o++)n=e[o],n.cd[0].trace.selectedpoints&&n.cd[0].trace.selectedpoints.length>0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o<t.pointNumbers.length;o++)if(i.selectedpoints.indexOf(t.pointNumbers[o])<0)return!1;return!0}return!1}function Zft(e){var t=0,r,n,i;for(i=0;i<e.length;i++)if(r=e[i],n=r.cd[0].trace,n.selectedpoints&&(n.selectedpoints.length>1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function IM(e,t,r){var n;for(n=0;n<t.length;n++){var i=t[n].cd[0].trace._fullInput,a=e._fullLayout._tracePreGUI[i.uid]||{};a.selectedpoints===void 0&&(a.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var s=r.points||[];for(n=0;n<t.length;n++)o=t[n].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var l=0;l<s.length;l++){var u=s[l],c=u.data,f=u.fullData,h=u.pointIndex,d=u.pointIndices;d?([].push.apply(c.selectedpoints,d),o._fullInput!==o&&[].push.apply(f.selectedpoints,d)):(c.selectedpoints.push(h),o._fullInput!==o&&f.selectedpoints.push(h))}}else for(n=0;n<t.length;n++)o=t[n].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;Yft(e,t)}function Yft(e,t){for(var r=!1,n=0;n<t.length;n++){var i=t[n],a=i.cd;kM.traceIs(a[0].trace,\"regl\")&&(r=!0);var o=i._module,s=o.styleOnSelect||o.style;s&&(s(e,a,a[0].node3),a[0].nodeRangePlot3&&s(e,a,a[0].nodeRangePlot3))}r&&(Fft(e),zft(e))}function bfe(e,t,r){for(var n=r?lfe.difference:lfe.union,i=n({regions:e},{regions:[t]}),a=i.regions.reverse(),o=0;o<a.length;o++){var s=a[o];s.subtract=CN(s,a.slice(0,o))}return a}function wfe(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,i=0;i<e.length;i++)e[i]=Eft(e[i],n,r);return e}function Tfe(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var i=0;i<e[n].length;i++){r[n][i]=[],r[n][i][0]=i?\"L\":\"M\";for(var a=0;a<e[n][i].length;a++)r[n][i].push(e[n][i][a])}t||r[n].push([\"Z\",r[n][0][1],r[n][0][2]])}return r}function Afe(e,t){for(var r=[],n,i=[],a,o=0;o<t.length;o++){var s=t[o];a=s._module.selectPoints(s,e),i.push(a),n=wfe(a,s),r=r.concat(n)}return r}function bN(e,t,r,n,i){var a=!!n,o,s,l;i&&(o=i.plotinfo,s=i.xaxes[0]._id,l=i.yaxes[0]._id);var u=[],c=[],f=vfe(e),h=e._fullLayout;if(o){var d=h._zoomlayer,v=h.dragmode,x=LM(v),b=TN(v);if(x||b){var p=C0(e,s,\"x\"),C=C0(e,l,\"y\");if(p&&C){var E=d.selectAll(\".select-outline-\"+o.id);if(E&&e._fullLayout._outlining&&E.length){for(var A=E[0][0],L=A.getAttribute(\"d\"),_=Lft(L,e,o),k=[],M=0;M<_.length;M++){for(var g=_[M],P=[],T=0;T<g.length;T++)P.push([h_(p,g[T][1]),h_(C,g[T][2])]);P.xref=s,P.yref=l,P.subtract=CN(P,k),k.push(P)}f=f.concat(k)}}}}var z=s&&l?[s+l]:h._subplots.cartesian;Kft(e);for(var O={},V=0;V<z.length;V++){var G=z[V],Z=G.indexOf(\"y\"),H=G.slice(0,Z),N=G.slice(Z),j=s&&l?r:void 0;if(j=$ft(f,H,N,j),j){var re=n;if(!a){var oe=C0(e,H,\"x\"),_e=C0(e,N,\"y\");re=_P(e,[oe],[_e],G);for(var Me=0;Me<re.length;Me++){var ke=re[Me],me=ke.cd[0],ie=me.trace;if(ke._module.name===\"scattergl\"&&!me.t.xpx){var Se=ie.x,Le=ie.y,Ae=ie._length;me.t.xpx=[],me.t.ypx=[];for(var De=0;De<Ae;De++)me.t.xpx[De]=oe.c2p(Se[De]),me.t.ypx[De]=_e.c2p(Le[De])}ke._module.name===\"splom\"&&(O[ie.uid]||(O[ie.uid]=!0))}}var Pe=Afe(j,re);u=u.concat(Pe),c=c.concat(re)}}var ge={points:u};IM(e,c,ge);var Fe=h.clickmode,ce=Fe.indexOf(\"event\")>-1&&t;if(!o&&t){var Ze=vfe(e,!0);if(Ze.length){var ct=Ze[0].xref,pt=Ze[0].yref;if(ct&&pt){var Wt=Mfe(Ze),st=Efe([C0(e,ct,\"x\"),C0(e,pt,\"y\")]);st(ge,Wt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&RM(e,ge),h._reselect=!1}if(!o&&h._deselect){var lt=h._deselect;s=lt.xref,l=lt.yref,Jft(s,l,c)||Sfe(e,s,l,n),ce&&(ge.points.length?RM(e,ge):kN(e)),h._deselect=!1}return{eventData:ge,selectionTesters:r}}function Kft(e){var t=e.calcdata;if(t)for(var r=0;r<t.length;r++){var n=t[r][0],i=n.trace,a=e._fullLayout._splomScenes;if(a){var o=a[i.uid];o&&(o.selectBatch=[])}}}function Jft(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===e&&i.yaxis&&i.yaxis._id===t)return!0}return!1}function Sfe(e,t,r,n){n=_P(e,[C0(e,t,\"x\")],[C0(e,r,\"y\")],t+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}IM(e,n)}function $ft(e,t,r,n){for(var i,a=0;a<e.length;a++){var o=e[a];if(!(t!==o.xref||r!==o.yref))if(i){var s=!!o.subtract;i=bfe(i,o,s),n=EN(i)}else i=[o],n=AN(o)}return n}function vfe(e,t){for(var r=[],n=e._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!(t&&o!==n._activeSelectionIndex)){var s=i[o];if(s){var l=s.xref,u=s.yref,c=C0(e,l,\"x\"),f=C0(e,u,\"y\"),h,d,v,x,b;if(s.type===\"rect\"){b=[];var p=h_(c,s.x0),C=h_(c,s.x1),E=h_(f,s.y0),A=h_(f,s.y1);b=[[p,E],[p,A],[C,A],[C,E]],h=Math.min(p,C),d=Math.max(p,C),v=Math.min(E,A),x=Math.max(E,A),b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=x,b.xref=l,b.yref=u,b.subtract=!1,b.isRect=!0,r.push(b)}else if(s.type===\"path\")for(var L=s.path.split(\"Z\"),_=[],k=0;k<L.length;k++){var M=L[k];if(M){M+=\"Z\";var g=ufe.extractPathCoords(M,cfe.paramIsX,\"raw\"),P=ufe.extractPathCoords(M,cfe.paramIsY,\"raw\");h=1/0,d=-1/0,v=1/0,x=-1/0,b=[];for(var T=0;T<g.length;T++){var z=h_(c,g[T]),O=h_(f,P[T]);b.push([z,O]),h=Math.min(z,h),d=Math.max(z,d),v=Math.min(O,v),x=Math.max(O,x)}b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=x,b.xref=l,b.yref=u,b.subtract=CN(b,_),_.push(b),r.push(b)}}}}return r}function CN(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],a=0;a<e.length;a++)if(Aft(e[a],i)){r=!r;break}return r}function h_(e,t){return e.type===\"date\"&&(t=t.replace(\"_\",\" \")),e.type===\"log\"?e.c2p(t):e.r2p(t,null,e.calendar)}function Mfe(e){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];r=r.concat(i),r=r.concat([i[0]])}return Qft(r)}function Qft(e){return e.isRect=e.length===5&&e[0][0]===e[4][0]&&e[0][1]===e[4][1]&&e[0][0]===e[1][0]&&e[2][0]===e[3][0]&&e[0][1]===e[3][1]&&e[1][1]===e[2][1]||e[0][1]===e[1][1]&&e[2][1]===e[3][1]&&e[0][0]===e[3][0]&&e[1][0]===e[2][0],e.isRect&&(e.xmin=Math.min(e[0][0],e[2][0]),e.xmax=Math.max(e[0][0],e[2][0]),e.ymin=Math.min(e[0][1],e[2][1]),e.ymax=Math.max(e[0][1],e[2][1])),e}function Efe(e){return function(t,r){for(var n,i,a=0;a<e.length;a++){var o=e[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+\"min\"],c=r[l+\"max\"];u!==void 0&&c!==void 0&&(n[s]=[ffe(o,u),ffe(o,c)].sort(Dft))}else i||(i={}),i[s]=r.map(qft(o))}n&&(t.range=n),i&&(t.lassoPoints=i)}}function eht(e){var t=e.plotinfo;return t.fillRangeItems||Efe(e.xaxes.concat(e.yaxes))}function tht(e,t){e.emit(\"plotly_selecting\",t)}function RM(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit(\"plotly_selected\",t)}function kN(e){e.emit(\"plotly_deselect\",null)}Cfe.exports={reselect:bN,prepSelect:Nft,clearOutline:gfe,clearSelectionsCache:PM,selectOnClick:_fe}});var LN=ye((sar,Lfe)=>{\"use strict\";Lfe.exports=[{path:\"\",backoff:0},{path:\"M-2.4,-3V3L0.6,0Z\",backoff:.6},{path:\"M-3.7,-2.5V2.5L1.3,0Z\",backoff:1.3},{path:\"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z\",backoff:1.55},{path:\"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z\",backoff:1.6},{path:\"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z\",backoff:2},{path:\"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z\",backoff:0,noRotate:!0},{path:\"M2,2V-2H-2V2Z\",backoff:0,noRotate:!0}]});var FM=ye((lar,Pfe)=>{\"use strict\";Pfe.exports={axisRefDescription:function(e,t,r){return[\"If set to a\",e,\"axis id (e.g. *\"+e+\"* or\",\"*\"+e+\"2*), the `\"+e+\"` position refers to a\",e,\"coordinate. If set to *paper*, the `\"+e+\"`\",\"position refers to the distance from the\",t,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",t,\"(\"+r+\"). If set to a\",e,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",t,\"of the domain of that axis: e.g.,\",\"*\"+e+\"2 domain* refers to the domain of the second\",e,\" axis and a\",e,\"position of 0.5 refers to the\",\"point between the\",t,\"and the\",r,\"of the domain of the\",\"second\",e,\"axis.\"].join(\" \")}}});var Nb=ye((car,Dfe)=>{\"use strict\";var Ife=LN(),Rfe=ec(),xP=hd(),rht=pl().templatedArray,uar=FM();Dfe.exports=rht(\"annotation\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},text:{valType:\"string\",editType:\"calc+arraydraw\"},textangle:{valType:\"angle\",dflt:0,editType:\"calc+arraydraw\"},font:Rfe({editType:\"calc+arraydraw\",colorEditType:\"arraydraw\"}),width:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},height:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"center\",editType:\"arraydraw\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"arraydraw\"},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},borderpad:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},arrowcolor:{valType:\"color\",editType:\"arraydraw\"},arrowhead:{valType:\"integer\",min:0,max:Ife.length,dflt:1,editType:\"arraydraw\"},startarrowhead:{valType:\"integer\",min:0,max:Ife.length,dflt:1,editType:\"arraydraw\"},arrowside:{valType:\"flaglist\",flags:[\"end\",\"start\"],extras:[\"none\"],dflt:\"end\",editType:\"arraydraw\"},arrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},startarrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},arrowwidth:{valType:\"number\",min:.1,editType:\"calc+arraydraw\"},standoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},startstandoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},ax:{valType:\"any\",editType:\"calc+arraydraw\"},ay:{valType:\"any\",editType:\"calc+arraydraw\"},axref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",xP.idRegex.x.toString()],editType:\"calc\"},ayref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",xP.idRegex.y.toString()],editType:\"calc\"},xref:{valType:\"enumerated\",values:[\"paper\",xP.idRegex.x.toString()],editType:\"calc\"},x:{valType:\"any\",editType:\"calc+arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calc+arraydraw\"},xshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",xP.idRegex.y.toString()],editType:\"calc\"},y:{valType:\"any\",editType:\"calc+arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"calc+arraydraw\"},yshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},clicktoshow:{valType:\"enumerated\",values:[!1,\"onoff\",\"onout\"],dflt:!1,editType:\"arraydraw\"},xclick:{valType:\"any\",editType:\"arraydraw\"},yclick:{valType:\"any\",editType:\"arraydraw\"},hovertext:{valType:\"string\",editType:\"arraydraw\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",editType:\"arraydraw\"},font:Rfe({editType:\"arraydraw\"}),editType:\"arraydraw\"},captureevents:{valType:\"boolean\",editType:\"arraydraw\"},editType:\"calc\"})});var Sm=ye((far,Ffe)=>{\"use strict\";Ffe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Eg=ye((har,zfe)=>{\"use strict\";zfe.exports=function(t){return{valType:\"color\",editType:\"style\",anim:!0}}});var pf=ye((dar,Vfe)=>{\"use strict\";var Ofe=df().axisHoverFormat,iht=Qo().texttemplateAttrs,nht=Qo().hovertemplateAttrs,qfe=Tu(),aht=ec(),oht=Pd().dash,sht=Pd().pattern,lht=So(),uht=Sm(),bP=Ao().extendFlat,cht=Eg();function Bfe(e){return{valType:\"any\",dflt:0,editType:\"calc\"}}function Nfe(e){return{valType:\"any\",editType:\"calc\"}}function Ufe(e){return{valType:\"enumerated\",values:[\"start\",\"middle\",\"end\"],dflt:\"middle\",editType:\"calc\"}}Vfe.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dx:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dy:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},xperiod:Bfe(\"x\"),yperiod:Bfe(\"y\"),xperiod0:Nfe(\"x0\"),yperiod0:Nfe(\"y0\"),xperiodalignment:Ufe(\"x\"),yperiodalignment:Ufe(\"y\"),xhoverformat:Ofe(\"x\"),yhoverformat:Ofe(\"y\"),offsetgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},alignmentgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},stackgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc\"},groupnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},stackgaps:{valType:\"enumerated\",values:[\"infer zero\",\"interpolate\"],dflt:\"infer zero\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},texttemplate:iht({},{}),hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"],editType:\"calc\"},hoveron:{valType:\"flaglist\",flags:[\"points\",\"fills\"],editType:\"style\"},hovertemplate:nht({},{keys:uht.eventDataKeys}),line:{color:{valType:\"color\",editType:\"style\",anim:!0},width:{valType:\"number\",min:0,dflt:2,editType:\"style\",anim:!0},shape:{valType:\"enumerated\",values:[\"linear\",\"spline\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},smoothing:{valType:\"number\",min:0,max:1.3,dflt:1,editType:\"plot\"},dash:bP({},oht,{editType:\"style\"}),backoff:{valType:\"number\",min:0,dflt:\"auto\",arrayOk:!0,editType:\"plot\"},simplify:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cliponaxis:{valType:\"boolean\",dflt:!0,editType:\"plot\"},fill:{valType:\"enumerated\",values:[\"none\",\"tozeroy\",\"tozerox\",\"tonexty\",\"tonextx\",\"toself\",\"tonext\"],editType:\"calc\"},fillcolor:cht(!0),fillgradient:bP({type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],dflt:\"none\",editType:\"calc\"},start:{valType:\"number\",editType:\"calc\"},stop:{valType:\"number\",editType:\"calc\"},colorscale:{valType:\"colorscale\",editType:\"style\"},editType:\"calc\"}),fillpattern:sht,marker:bP({symbol:{valType:\"enumerated\",values:lht.symbolList,dflt:\"circle\",arrayOk:!0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,arrayOk:!0,editType:\"style\",anim:!0},angle:{valType:\"angle\",dflt:0,arrayOk:!0,editType:\"plot\",anim:!1},angleref:{valType:\"enumerated\",values:[\"previous\",\"up\"],dflt:\"up\",editType:\"plot\",anim:!1},standoff:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"plot\",anim:!0},size:{valType:\"number\",min:0,dflt:6,arrayOk:!0,editType:\"calc\",anim:!0},maxdisplayed:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},sizeref:{valType:\"number\",dflt:1,editType:\"calc\"},sizemin:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"diameter\",\"area\"],dflt:\"diameter\",editType:\"calc\"},line:bP({width:{valType:\"number\",min:0,arrayOk:!0,editType:\"style\",anim:!0},editType:\"calc\"},qfe(\"marker.line\",{anim:!0})),gradient:{type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],arrayOk:!0,dflt:\"none\",editType:\"calc\"},color:{valType:\"color\",arrayOk:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},qfe(\"marker\",{anim:!0})),selected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},unselected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"middle center\",arrayOk:!0,editType:\"calc\"},textfont:aht({editType:\"calc\",colorEditType:\"style\",arrayOk:!0}),zorder:{valType:\"integer\",dflt:0,editType:\"plot\"}}});var PN=ye((gar,jfe)=>{\"use strict\";var Gfe=Nb(),Hfe=pf().line,fht=Pd().dash,wP=Ao().extendFlat,hht=mc().overrideAll,dht=pl().templatedArray,par=FM();jfe.exports=hht(dht(\"selection\",{type:{valType:\"enumerated\",values:[\"rect\",\"path\"]},xref:wP({},Gfe.xref,{}),yref:wP({},Gfe.yref,{}),x0:{valType:\"any\"},x1:{valType:\"any\"},y0:{valType:\"any\"},y1:{valType:\"any\"},path:{valType:\"string\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:.7,editType:\"arraydraw\"},line:{color:Hfe.color,width:wP({},Hfe.width,{min:1,dflt:1}),dash:wP({},fht,{dflt:\"dot\"})}}),\"arraydraw\",\"from-root\")});var Yfe=ye((mar,Zfe)=>{\"use strict\";var Wfe=Dr(),TP=ho(),vht=Yd(),pht=PN(),Xfe=f_();Zfe.exports=function(t,r){vht(t,r,{name:\"selections\",handleItemDefaults:ght});for(var n=r.selections,i=0;i<n.length;i++){var a=n[i];a&&a.path===void 0&&(a.x0===void 0||a.x1===void 0||a.y0===void 0||a.y1===void 0)&&(r.selections[i]=null)}};function ght(e,t,r){function n(_,k){return Wfe.coerce(e,t,pht,_,k)}var i=n(\"path\"),a=i?\"path\":\"rect\",o=n(\"type\",a),s=o!==\"path\";s&&delete t.path,n(\"opacity\"),n(\"line.color\"),n(\"line.width\"),n(\"line.dash\");for(var l=[\"x\",\"y\"],u=0;u<2;u++){var c=l[u],f={_fullLayout:r},h,d,v,x=TP.coerceRef(e,t,f,c);if(h=TP.getFromId(f,x),h._selectionIndices.push(t._index),v=Xfe.rangeToShapePosition(h),d=Xfe.shapePositionToRange(h),s){var b=c+\"0\",p=c+\"1\",C=e[b],E=e[p];e[b]=d(e[b],!0),e[p]=d(e[p],!0),TP.coercePosition(t,f,n,x,b),TP.coercePosition(t,f,n,x,p);var A=t[b],L=t[p];A!==void 0&&L!==void 0&&(t[b]=v(A),t[p]=v(L),e[b]=C,e[p]=E)}}s&&Wfe.noneOrAll(e,t,[\"x0\",\"x1\",\"y0\",\"y1\"])}});var Jfe=ye((yar,Kfe)=>{\"use strict\";Kfe.exports=function(t,r,n){n(\"newselection.mode\");var i=n(\"newselection.line.width\");i&&(n(\"newselection.line.color\"),n(\"newselection.line.dash\")),n(\"activeselection.fillcolor\"),n(\"activeselection.opacity\")}});var zM=ye((_ar,ehe)=>{\"use strict\";var mht=qa(),$fe=Dr(),Qfe=hf();ehe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=mht.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has(\"cartesian\"),d=0;d<a.length;d++){var v=a[d];if($fe.isPlainObject(v)){var x=Qfe.cleanId(v.xref,\"x\",!1),b=Qfe.cleanId(v.yref,\"y\",!1),p=s.x.test(x),C=s.y.test(b);if(p||C){h||$fe.pushUnique(i._basePlotModules,o);var E=!1;p&&u.indexOf(x)===-1&&(u.push(x),E=!0),C&&c.indexOf(b)===-1&&(c.push(b),E=!0),E&&p&&C&&f.push(x+b)}}}}}});var zf=ye((xar,rhe)=>{\"use strict\";var the=mN(),OM=kfe();rhe.exports={moduleType:\"component\",name:\"selections\",layoutAttributes:PN(),supplyLayoutDefaults:Yfe(),supplyDrawNewSelectionDefaults:Jfe(),includeBasePlot:zM()(\"selections\"),draw:the.draw,drawOne:the.drawOne,reselect:OM.reselect,prepSelect:OM.prepSelect,clearOutline:OM.clearOutline,clearSelectionsCache:OM.clearSelectionsCache,selectOnClick:OM.selectOnClick}});var qN=ye((bar,whe)=>{\"use strict\";var zN=Oa(),k0=Dr(),ihe=k0.numberFormat,yht=cd(),_ht=PL(),AP=qa(),hhe=k0.strTranslate,xht=ru(),nhe=Ca(),d_=So(),bht=vf(),ahe=ho(),wht=Tg(),Tht=yv(),dhe=Sg(),SP=dhe.selectingOrDrawing,Aht=dhe.freeMode,Sht=Kh().FROM_TL,Mht=hM(),Eht=xM().redrawReglTraces,Cht=Mc(),RN=hf().getFromId,kht=zf().prepSelect,Lht=zf().clearOutline,Pht=zf().selectOnClick,IN=uN(),ON=hd(),ohe=ON.MINDRAG,ip=ON.MINZOOM,she=!0;function Iht(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s===\"nsew\",c=(o+s).length===1,f,h,d,v,x,b,p,C,E,A,L,_,k,M,g,P,T,z,O,V,G,Z,H;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,E=f._length,A=h._length,p=f._offset,C=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var bt=t.overlays,yt=0;yt<bt.length;yt++){var Yt=bt[yt].xaxis;d[Yt._id]=Yt;var lr=bt[yt].yaxis;v[lr._id]=lr}x=fhe(d),b=fhe(v),k=lhe(x,s),M=lhe(b,o),g=!M&&!k,_=che(e,e._fullLayout._axisMatchGroups,d,v),L=che(e,e._fullLayout._axisConstraintGroups,d,v,_);var Tr=L.isSubplotConstrained||_.isSubplotConstrained;P=s||Tr,T=o||Tr;var Rr=e._fullLayout;z=Rr._has(\"scattergl\"),O=Rr._has(\"splom\"),V=Rr._has(\"svg\")}N();var j=Fht(M+k,e._fullLayout.dragmode,u),re=phe(t,o+s+\"drag\",j,r,n,i,a);if(g&&!u)return re.onmousedown=null,re.style.pointerEvents=\"none\",re;var oe={element:re,gd:e,plotinfo:t};oe.prepFn=function(bt,yt,Yt){var lr=oe.dragmode,Tr=e._fullLayout.dragmode;Tr!==lr&&(oe.dragmode=Tr),N(),Z=e._fullLayout._invScaleX,H=e._fullLayout._invScaleY,g||(u?bt.shiftKey?Tr===\"pan\"?Tr=\"zoom\":SP(Tr)||(Tr=\"pan\"):bt.ctrlKey&&(Tr=\"pan\"):Tr=\"pan\"),Aht(Tr)?oe.minDrag=1:oe.minDrag=void 0,SP(Tr)?(oe.xaxes=x,oe.yaxes=b,kht(bt,yt,Yt,oe,Tr)):(oe.clickFn=Me,SP(lr)&&_e(),g||(Tr===\"zoom\"?(oe.moveFn=Ze,oe.doneFn=pt,oe.minDrag=1,ce(bt,yt,Yt)):Tr===\"pan\"&&(oe.moveFn=$t,oe.doneFn=Qe))),e._fullLayout._redrag=function(){var Rr=e._dragdata;if(Rr&&Rr.element===re){var ei=e._fullLayout.dragmode;SP(ei)||(N(),Et([0,0,E,A]),oe.moveFn(Rr.dx,Rr.dy))}}};function _e(){oe.plotinfo.selection=!1,Lht(e)}function Me(bt,yt){var Yt=oe.gd;if(Yt._fullLayout._activeShapeIndex>=0){Yt._fullLayout._deactivateShape(Yt);return}var lr=Yt._fullLayout.clickmode;if(FN(Yt),bt===2&&!c&&ur(),u)lr.indexOf(\"select\")>-1&&Pht(yt,Yt,x,b,t.id,oe),lr.indexOf(\"event\")>-1&&bht.click(Yt,yt,t.id);else if(bt===1&&c){var Tr=o?h:f,Rr=o===\"s\"||s===\"w\"?0:1,ei=Tr._name+\".range[\"+Rr+\"]\",Wr=Rht(Tr,Rr),Ur=\"left\",dt=\"middle\";if(Tr.fixedrange)return;o?(dt=o===\"n\"?\"top\":\"bottom\",Tr.side===\"right\"&&(Ur=\"right\")):s===\"e\"&&(Ur=\"right\"),Yt._context.showAxisRangeEntryBoxes&&zN.select(re).call(xht.makeEditable,{gd:Yt,immediate:!0,background:Yt._fullLayout.paper_bgcolor,text:String(Wr),fill:Tr.tickfont?Tr.tickfont.color:\"#444\",horizontalAlign:Ur,verticalAlign:dt}).on(\"edit\",function(Ge){var Je=Tr.d2r(Ge);Je!==void 0&&AP.call(\"_guiRelayout\",Yt,ei,Je)})}}Tht.init(oe);var ke,me,ie,Se,Le,Ae,De,Pe,ge,Fe;function ce(bt,yt,Yt){var lr=re.getBoundingClientRect();ke=yt-lr.left,me=Yt-lr.top,e._fullLayout._calcInverseTransform(e);var Tr=k0.apply3DTransform(e._fullLayout._invTransform)(ke,me);ke=Tr[0],me=Tr[1],ie={l:ke,r:ke,w:0,t:me,b:me,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:yht(e._fullLayout.plot_bgcolor).getLuminance(),Le=\"M0,0H\"+E+\"V\"+A+\"H0V0\",Ae=!1,De=\"xy\",Fe=!1,Pe=ghe(l,Se,p,C,Le),ge=mhe(l,p,C)}function Ze(bt,yt){if(e._transitioningWithDuration)return!1;var Yt=Math.max(0,Math.min(E,Z*bt+ke)),lr=Math.max(0,Math.min(A,H*yt+me)),Tr=Math.abs(Yt-ke),Rr=Math.abs(lr-me);ie.l=Math.min(ke,Yt),ie.r=Math.max(ke,Yt),ie.t=Math.min(me,lr),ie.b=Math.max(me,lr);function ei(){De=\"\",ie.r=ie.l,ie.t=ie.b,ge.attr(\"d\",\"M0,0Z\")}if(L.isSubplotConstrained)Tr>ip||Rr>ip?(De=\"xy\",Tr/E>Rr/A?(Rr=Tr*A/E,me>lr?ie.t=me-Rr:ie.b=me+Rr):(Tr=Rr*E/A,ke>Yt?ie.l=ke-Tr:ie.r=ke+Tr),ge.attr(\"d\",MP(ie))):ei();else if(_.isSubplotConstrained)if(Tr>ip||Rr>ip){De=\"xy\";var Wr=Math.min(ie.l/E,(A-ie.b)/A),Ur=Math.max(ie.r/E,(A-ie.t)/A);ie.l=Wr*E,ie.r=Ur*E,ie.b=(1-Wr)*A,ie.t=(1-Ur)*A,ge.attr(\"d\",MP(ie))}else ei();else!M||Rr<Math.min(Math.max(Tr*.6,ohe),ip)?Tr<ohe||!k?ei():(ie.t=0,ie.b=A,De=\"x\",ge.attr(\"d\",zht(ie,me))):!k||Tr<Math.min(Rr*.6,ip)?(ie.l=0,ie.r=E,De=\"y\",ge.attr(\"d\",Oht(ie,ke))):(De=\"xy\",ge.attr(\"d\",MP(ie)));ie.w=ie.r-ie.l,ie.h=ie.b-ie.t,De&&(Fe=!0),e._dragged=Fe,yhe(Pe,ge,ie,Le,Ae,Se),ct(),e.emit(\"plotly_relayouting\",G),Ae=!0}function ct(){G={},(De===\"xy\"||De===\"x\")&&(DN(x,ie.l/E,ie.r/E,G,L.xaxes),sr(\"x\",G)),(De===\"xy\"||De===\"y\")&&(DN(b,(A-ie.b)/A,(A-ie.t)/A,G,L.yaxes),sr(\"y\",G))}function pt(){ct(),FN(e),Qe(),xhe(e)}var Wt=[0,0,E,A],st=null,lt=ON.REDRAWDELAY,Gt=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Nt(bt){if(!e._context._scrollZoom.cartesian&&!e._fullLayout._enablescrollzoom)return;if(_e(),e._transitioningWithDuration){bt.preventDefault(),bt.stopPropagation();return}N(),clearTimeout(st);var yt=-bt.deltaY;if(isFinite(yt)||(yt=bt.wheelDelta/10),!isFinite(yt)){k0.log(\"Did not find wheel motion attributes: \",bt);return}var Yt=Math.exp(-Math.min(Math.max(yt,-20),20)/200),lr=Gt.draglayer.select(\".nsewdrag\").node().getBoundingClientRect(),Tr=(bt.clientX-lr.left)/lr.width,Rr=(lr.bottom-bt.clientY)/lr.height,ei;function Wr(Ur,dt,Ge){if(Ur.fixedrange)return;var Je=k0.simpleMap(Ur.range,Ur.r2l),je=Je[0]+(Je[1]-Je[0])*dt;function $e(wt){return Ur.l2r(je+(wt-je)*Ge)}Ur.range=Je.map($e)}if(P){for(s||(Tr=.5),ei=0;ei<x.length;ei++)Wr(x[ei],Tr,Yt);sr(\"x\"),Wt[2]*=Yt,Wt[0]+=Wt[2]*Tr*(1/Yt-1)}if(T){for(o||(Rr=.5),ei=0;ei<b.length;ei++)Wr(b[ei],Rr,Yt);sr(\"y\"),Wt[3]*=Yt,Wt[1]+=Wt[3]*(1-Rr)*(1/Yt-1)}Et(Wt),wr(),e.emit(\"plotly_relayouting\",G),st=setTimeout(function(){e._fullLayout&&(Wt=[0,0,E,A],Qe())},lt),bt.preventDefault()}o.length*s.length!==1&&bhe(re,Nt);function $t(bt,yt){if(bt=bt*Z,yt=yt*H,e._transitioningWithDuration)return;if(e._fullLayout._replotting=!0,k===\"ew\"||M===\"ns\"){var Yt=k?-bt:0,lr=M?-yt:0;if(_.isSubplotConstrained){if(k&&M){var Tr=(bt/E-yt/A)/2;bt=Tr*E,yt=-Tr*A,Yt=-bt,lr=-yt}M?Yt=-lr*E/A:lr=-Yt*A/E}k&&(uhe(x,bt),sr(\"x\")),M&&(uhe(b,yt),sr(\"y\")),Et([Yt,lr,E,A]),wr(),e.emit(\"plotly_relayouting\",G);return}function Rr($e,wt,Ie){for(var xe=1-wt,Ce,vt,nr=0;nr<$e.length;nr++){var ir=$e[nr];if(!ir.fixedrange){Ce=ir,vt=ir._rl[xe]+(ir._rl[wt]-ir._rl[xe])/Dht(Ie/ir._length);var pr=ir.l2r(vt);pr!==!1&&pr!==void 0&&(ir.range[wt]=pr)}}return Ce._length*(Ce._rl[wt]-vt)/(Ce._rl[wt]-Ce._rl[xe])}var ei=k===\"w\"==(M===\"n\")?1:-1;if(k&&M&&(L.isSubplotConstrained||_.isSubplotConstrained)){var Wr=(bt/E+ei*yt/A)/2;bt=Wr*E,yt=ei*Wr*A}var Ur,dt;if(k===\"w\"?bt=Rr(x,0,bt):k===\"e\"?bt=Rr(x,1,-bt):k||(bt=0),M===\"n\"?yt=Rr(b,1,yt):M===\"s\"?yt=Rr(b,0,-yt):M||(yt=0),Ur=k===\"w\"?bt:0,dt=M===\"n\"?yt:0,L.isSubplotConstrained&&!_.isSubplotConstrained||_.isSubplotConstrained&&k&&M&&ei>0){var Ge;if(_.isSubplotConstrained||!k&&M.length===1){for(Ge=0;Ge<x.length;Ge++)x[Ge].range=x[Ge]._r.slice(),IN(x[Ge],1-yt/A);bt=yt*E/A,Ur=bt/2}if(_.isSubplotConstrained||!M&&k.length===1){for(Ge=0;Ge<b.length;Ge++)b[Ge].range=b[Ge]._r.slice(),IN(b[Ge],1-bt/E);yt=bt*A/E,dt=yt/2}}(!_.isSubplotConstrained||!M)&&sr(\"x\"),(!_.isSubplotConstrained||!k)&&sr(\"y\");var Je=E-bt,je=A-yt;_.isSubplotConstrained&&!(k&&M)&&(k?(dt=Ur?0:bt*A/E,je=Je*A/E):(Ur=dt?0:yt*E/A,Je=je*E/A)),Et([Ur,dt,Je,je]),wr(),e.emit(\"plotly_relayouting\",G)}function sr(bt,yt){for(var Yt=_.isSubplotConstrained?{x:b,y:x}[bt]:_[bt+\"axes\"],lr=_.isSubplotConstrained?{x,y:b}[bt]:[],Tr=0;Tr<Yt.length;Tr++){var Rr=Yt[Tr],ei=Rr._id,Wr=_.xLinks[ei]||_.yLinks[ei],Ur=lr[0]||d[Wr]||v[Wr];Ur&&(yt?(yt[Rr._name+\".range[0]\"]=yt[Ur._name+\".range[0]\"],yt[Rr._name+\".range[1]\"]=yt[Ur._name+\".range[1]\"]):Rr.range=Ur.range.slice())}}function wr(){var bt=[],yt;function Yt(ei){for(yt=0;yt<ei.length;yt++)ei[yt].fixedrange||bt.push(ei[yt]._id)}function lr(ei,Wr){for(yt=0;yt<ei.length;yt++){var Ur=ei[yt],dt=Ur[Wr];!Ur.fixedrange&&dt.tickmode===\"sync\"&&bt.push(dt._id)}}for(P&&(Yt(x),Yt(L.xaxes),Yt(_.xaxes),lr(t.overlays,\"xaxis\")),T&&(Yt(b),Yt(L.yaxes),Yt(_.yaxes),lr(t.overlays,\"yaxis\")),G={},yt=0;yt<bt.length;yt++){var Tr=bt[yt],Rr=RN(e,Tr);ahe.drawOne(e,Rr,{skipTitle:!0}),G[Rr._name+\".range[0]\"]=Rr.range[0],G[Rr._name+\".range[1]\"]=Rr.range[1]}ahe.redrawComponents(e,bt)}function ur(){if(!e._transitioningWithDuration){var bt=e._context.doubleClick,yt=[];k&&(yt=yt.concat(x)),M&&(yt=yt.concat(b)),_.xaxes&&(yt=yt.concat(_.xaxes)),_.yaxes&&(yt=yt.concat(_.yaxes));var Yt={},lr,Tr;if(bt===\"reset+autosize\")for(bt=\"autosize\",Tr=0;Tr<yt.length;Tr++){lr=yt[Tr];var Rr=lr._rangeInitial0,ei=lr._rangeInitial1,Wr=Rr!==void 0||ei!==void 0;if(Wr&&(Rr!==void 0&&Rr!==lr.range[0]||ei!==void 0&&ei!==lr.range[1])||!Wr&&lr.autorange!==!0){bt=\"reset\";break}}if(bt===\"autosize\")for(Tr=0;Tr<yt.length;Tr++)lr=yt[Tr],lr.fixedrange||(Yt[lr._name+\".autorange\"]=!0);else if(bt===\"reset\"){for((k||L.isSubplotConstrained)&&(yt=yt.concat(L.xaxes)),M&&!L.isSubplotConstrained&&(yt=yt.concat(L.yaxes)),L.isSubplotConstrained&&(k?M||(yt=yt.concat(b)):yt=yt.concat(x)),Tr=0;Tr<yt.length;Tr++)if(lr=yt[Tr],!lr.fixedrange){var Ur=lr._name,dt=lr._autorangeInitial;lr._rangeInitial0===void 0&&lr._rangeInitial1===void 0?Yt[Ur+\".autorange\"]=!0:lr._rangeInitial0===void 0?(Yt[Ur+\".autorange\"]=dt,Yt[Ur+\".range\"]=[null,lr._rangeInitial1]):lr._rangeInitial1===void 0?(Yt[Ur+\".range\"]=[lr._rangeInitial0,null],Yt[Ur+\".autorange\"]=dt):Yt[Ur+\".range\"]=[lr._rangeInitial0,lr._rangeInitial1]}}e.emit(\"plotly_doubleclick\",null),AP.call(\"_guiRelayout\",e,Yt)}}function Qe(){Et([0,0,E,A]),k0.syncOrAsync([Cht.previousPromises,function(){e._fullLayout._replotting=!1,AP.call(\"_guiRelayout\",e,G)}],e)}function Et(bt){var yt=e._fullLayout,Yt=yt._plots,lr=yt._subplots.cartesian,Tr,Rr,ei,Wr;if(O&&AP.subplotsRegistry.splom.drag(e),z){for(Tr=0;Tr<lr.length;Tr++)if(Rr=Yt[lr[Tr]],ei=Rr.xaxis,Wr=Rr.yaxis,Rr._scene){ei.limitRange&&ei.limitRange(),Wr.limitRange&&Wr.limitRange();var Ur=k0.simpleMap(ei.range,ei.r2l),dt=k0.simpleMap(Wr.range,Wr.r2l);Rr._scene.update({range:[Ur[0],dt[0],Ur[1],dt[1]]})}}if((O||z)&&(Mht(e),Eht(e)),V){var Ge=bt[2]/f._length,Je=bt[3]/h._length;for(Tr=0;Tr<lr.length;Tr++){Rr=Yt[lr[Tr]],ei=Rr.xaxis,Wr=Rr.yaxis;var je=(P||_.isSubplotConstrained)&&!ei.fixedrange&&d[ei._id],$e=(T||_.isSubplotConstrained)&&!Wr.fixedrange&&v[Wr._id],wt,Ie,xe,Ce;if(je?(wt=Ge,xe=s||_.isSubplotConstrained?bt[0]:Ft(ei,wt)):_.xaHash[ei._id]?(wt=Ge,xe=bt[0]*ei._length/f._length):_.yaHash[ei._id]?(wt=Je,xe=M===\"ns\"?-bt[1]*ei._length/h._length:Ft(ei,wt,{n:\"top\",s:\"bottom\"}[M])):(wt=er(ei,Ge,Je),xe=Ut(ei,wt)),wt>1&&(ei.maxallowed!==void 0&&P===(ei.range[0]<ei.range[1]?\"e\":\"w\")||ei.minallowed!==void 0&&P===(ei.range[0]<ei.range[1]?\"w\":\"e\"))&&(wt=1,xe=0),$e?(Ie=Je,Ce=o||_.isSubplotConstrained?bt[1]:Ft(Wr,Ie)):_.yaHash[Wr._id]?(Ie=Je,Ce=bt[1]*Wr._length/h._length):_.xaHash[Wr._id]?(Ie=Ge,Ce=k===\"ew\"?-bt[0]*Wr._length/f._length:Ft(Wr,Ie,{e:\"right\",w:\"left\"}[k])):(Ie=er(Wr,Ge,Je),Ce=Ut(Wr,Ie)),Ie>1&&(Wr.maxallowed!==void 0&&T===(Wr.range[0]<Wr.range[1]?\"n\":\"s\")||Wr.minallowed!==void 0&&T===(Wr.range[0]<Wr.range[1]?\"s\":\"n\"))&&(Ie=1,Ce=0),!(!wt&&!Ie)){wt||(wt=1),Ie||(Ie=1);var vt=ei._offset-xe/wt,nr=Wr._offset-Ce/Ie;Rr.clipRect.call(d_.setTranslate,xe,Ce).call(d_.setScale,wt,Ie),Rr.plot.call(d_.setTranslate,vt,nr).call(d_.setScale,1/wt,1/Ie),(wt!==Rr.xScaleFactor||Ie!==Rr.yScaleFactor)&&(d_.setPointGroupScale(Rr.zoomScalePts,wt,Ie),d_.setTextPointsScale(Rr.zoomScaleTxt,wt,Ie)),d_.hideOutsideRangePoints(Rr.clipOnAxisFalseTraces,Rr),Rr.xScaleFactor=wt,Rr.yScaleFactor=Ie}}}}function er(bt,yt,Yt){return bt.fixedrange?0:P&&L.xaHash[bt._id]?yt:T&&(L.isSubplotConstrained?L.xaHash:L.yaHash)[bt._id]?Yt:0}function Ut(bt,yt){return yt?(bt.range=bt._r.slice(),IN(bt,yt),Ft(bt,yt)):0}function Ft(bt,yt,Yt){return bt._length*(1-yt)*Sht[Yt||bt.constraintoward||\"middle\"]}return re}function vhe(e,t,r,n){var i=k0.ensureSingle(e.draglayer,t,r,function(a){a.classed(\"drag\",!0).style({fill:\"transparent\",\"stroke-width\":0}).attr(\"data-subplot\",e.id)});return i.call(wht,n),i.node()}function phe(e,t,r,n,i,a,o){var s=vhe(e,\"rect\",t,r);return zN.select(s).call(d_.setRect,n,i,a,o),s}function lhe(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return\"\"}function Rht(e,t){var r=e.range[t],n=Math.abs(r-e.range[1-t]),i;return e.type===\"date\"?r:e.type===\"log\"?(i=Math.ceil(Math.max(0,-Math.log(n)/Math.LN10))+3,ihe(\".\"+i+\"g\")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(n)/Math.LN10)+4,ihe(\".\"+String(i)+\"g\")(r))}function DN(e,t,r,n,i){for(var a=0;a<e.length;a++){var o=e[a];if(!o.fixedrange)if(o.rangebreaks){var s=o._id.charAt(0)===\"y\",l=s?1-t:t,u=s?1-r:r;n[o._name+\".range[0]\"]=o.l2r(o.p2l(l*o._length)),n[o._name+\".range[1]\"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+\".range[0]\"]=o.l2r(c+f*t),n[o._name+\".range[1]\"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(t+(1-r))/2;DN(i,h,1-h,n,[])}}function uhe(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n.fixedrange){if(n.rangebreaks){var i=0,a=n._length,o=n.p2l(i+t)-n.p2l(i),s=n.p2l(a+t)-n.p2l(a),l=(o+s)/2;n.range=[n.l2r(n._rl[0]-l),n.l2r(n._rl[1]-l)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)];n.limitRange&&n.limitRange()}}}function Dht(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Fht(e,t,r){return e?e===\"nsew\"?r?\"\":t===\"pan\"?\"move\":\"crosshair\":e.toLowerCase()+\"-resize\":\"pointer\"}function ghe(e,t,r,n,i){return e.append(\"path\").attr(\"class\",\"zoombox\").style({fill:t>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"transform\",hhe(r,n)).attr(\"d\",i+\"Z\")}function mhe(e,t,r){return e.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:nhe.background,stroke:nhe.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",hhe(t,r)).attr(\"d\",\"M0,0Z\")}function yhe(e,t,r,n,i,a){e.attr(\"d\",n+\"M\"+r.l+\",\"+r.t+\"v\"+r.h+\"h\"+r.w+\"v-\"+r.h+\"h-\"+r.w+\"Z\"),_he(e,t,i,a)}function _he(e,t,r,n){r||(e.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),t.transition().style(\"opacity\",1).duration(200))}function FN(e){zN.select(e).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function xhe(e){she&&e.data&&e._context.showTips&&(k0.notifier(k0._(e,\"Double-click to zoom back out\"),\"long\"),she=!1)}function zht(e,t){return\"M\"+(e.l-.5)+\",\"+(t-ip-.5)+\"h-3v\"+(2*ip+1)+\"h3ZM\"+(e.r+.5)+\",\"+(t-ip-.5)+\"h3v\"+(2*ip+1)+\"h-3Z\"}function Oht(e,t){return\"M\"+(t-ip-.5)+\",\"+(e.t-.5)+\"v-3h\"+(2*ip+1)+\"v3ZM\"+(t-ip-.5)+\",\"+(e.b+.5)+\"v3h\"+(2*ip+1)+\"v-3Z\"}function MP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ip)/2);return\"M\"+(e.l-3.5)+\",\"+(e.t-.5+t)+\"h3v\"+-t+\"h\"+t+\"v-3h-\"+(t+3)+\"ZM\"+(e.r+3.5)+\",\"+(e.t-.5+t)+\"h-3v\"+-t+\"h\"+-t+\"v-3h\"+(t+3)+\"ZM\"+(e.r+3.5)+\",\"+(e.b+.5-t)+\"h-3v\"+t+\"h\"+-t+\"v3h\"+(t+3)+\"ZM\"+(e.l-3.5)+\",\"+(e.b+.5-t)+\"h3v\"+t+\"h\"+t+\"v3h-\"+(t+3)+\"Z\"}function che(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v<t.length;v++){var x=t[v];for(l in r)if(x[l]){for(c in x)!(i&&(h[c]||d[c]))&&!(c.charAt(0)===\"x\"?r:n)[c]&&(o[c]=l);for(u in n)!(i&&(h[u]||d[u]))&&x[u]&&(a=!0)}for(u in n)if(x[u])for(f in x)!(i&&(h[f]||d[f]))&&!(f.charAt(0)===\"x\"?r:n)[f]&&(s[f]=u)}a&&(k0.extendFlat(o,s),s={});var b={},p=[];for(c in o){var C=RN(e,c);p.push(C),b[C._id]=C}var E={},A=[];for(f in s){var L=RN(e,f);A.push(L),E[L._id]=L}return{xaHash:b,yaHash:E,xaxes:p,yaxes:A,xLinks:o,yLinks:s,isSubplotConstrained:a}}function bhe(e,t){if(!_ht)e.onwheel!==void 0?e.onwheel=t:e.onmousewheel!==void 0?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener(\"wheel\",t,{passive:!1}));else{var r=e.onwheel!==void 0?\"wheel\":\"mousewheel\";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}}function fhe(e){var t=[];for(var r in e)t.push(e[r]);return t}whe.exports={makeDragBox:Iht,makeDragger:vhe,makeRectDragger:phe,makeZoombox:ghe,makeCorners:mhe,updateZoombox:yhe,xyCorners:MP,transitionZoombox:_he,removeZoombox:FN,showDoubleClickNotifier:xhe,attachWheelEventHandler:bhe}});var BN=ye(CP=>{\"use strict\";var qht=Oa(),EP=vf(),Bht=yv(),Nht=Tg(),Cg=qN().makeDragBox,gd=hd().DRAGGERSIZE;CP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){qht.select(t).selectAll(\".drag\").remove();return}if(!(!r._has(\"cartesian\")&&!r._has(\"splom\"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split(\"y\"),l=o.split(\"y\");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Cg(t,o,s._offset,l._offset,s._length,l._length,\"ns\",\"ew\");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&EP.hover(t,h,a)},EP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Bht.unhover(t,h))},t._context.showAxisDragHandles&&(Cg(t,o,s._offset-gd,l._offset-gd,gd,gd,\"n\",\"w\"),Cg(t,o,s._offset+s._length,l._offset-gd,gd,gd,\"n\",\"e\"),Cg(t,o,s._offset-gd,l._offset+l._length,gd,gd,\"s\",\"w\"),Cg(t,o,s._offset+s._length,l._offset+l._length,gd,gd,\"s\",\"e\"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side===\"top\"&&(c-=gd),Cg(t,o,s._offset+s._length*.1,c,s._length*.8,gd,\"\",\"ew\"),Cg(t,o,s._offset,c,s._length*.1,gd,\"\",\"w\"),Cg(t,o,s._offset+s._length*.9,c,s._length*.1,gd,\"\",\"e\")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!==\"right\"&&(f-=gd),Cg(t,o,f,l._offset+l._length*.1,gd,l._length*.8,\"ns\",\"\"),Cg(t,o,f,l._offset+l._length*.9,gd,l._length*.1,\"s\",\"\"),Cg(t,o,f,l._offset,gd,l._length*.1,\"n\",\"\")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,EP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,EP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},CP.updateFx(t)}};CP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode===\"pan\"?\"move\":\"crosshair\";Nht(t._draggers,r)}});var She=ye((Tar,Ahe)=>{\"use strict\";var The=qa();Ahe.exports=function(t){for(var r=The.layoutArrayContainers,n=The.layoutArrayRegexes,i=t.split(\"[\")[0],a,o,s=0;s<n.length;s++)if(o=t.match(n[s]),o&&o.index===0){a=o[0];break}if(a||(a=r[r.indexOf(i)]),!a)return!1;var l=t.substr(a.length);return l?(o=l.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/),o?{array:a,index:Number(o[1]),property:o[3]||\"\"}:!1):{array:a,index:\"\",property:\"\"}}});var Ehe=ye(BM=>{\"use strict\";var Uht=gy(),NN=x6(),qM=G1(),Vht=P6().sorterAsc,UN=qa();BM.containerArrayMatch=She();var Ght=BM.isAddVal=function(t){return t===\"add\"||Uht(t)},Mhe=BM.isRemoveVal=function(t){return t===null||t===\"remove\"};BM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=UN.getComponentMethod(o,\"supplyLayoutDefaults\"),l=UN.getComponentMethod(o,\"draw\"),u=UN.getComponentMethod(o,\"drawOne\"),c=i.replot||i.recalc||s===NN||l===NN,f=t.layout,h=t._fullLayout;if(n[\"\"]){Object.keys(n).length>1&&qM.warn(\"Full array edits are incompatible with other edits\",o);var d=n[\"\"][\"\"];if(Mhe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return qM.warn(\"Unrecognized full array edit value\",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(Vht),x=r.get(),b=x||[],p=a(h,o).get(),C=[],E=-1,A=b.length,L,_,k,M,g,P,T,z;for(L=0;L<v.length;L++){if(k=v[L],M=n[k],g=Object.keys(M),P=M[\"\"],T=Ght(P),k<0||k>b.length-(T?0:1)){qM.warn(\"index out of range\",o,k);continue}if(P!==void 0)g.length>1&&qM.warn(\"Insertion & removal are incompatible with edits to the same index.\",o,k),Mhe(P)?C.push(k):T?(P===\"add\"&&(P={}),b.splice(k,0,P),p&&p.splice(k,0,{})):qM.warn(\"Unrecognized full object edit value\",o,k,P),E===-1&&(E=k);else for(_=0;_<g.length;_++)z=o+\"[\"+k+\"].\",a(b[k],g[_],z).set(M[g[_]])}for(L=C.length-1;L>=0;L--)b.splice(C[L],1),p&&p.splice(C[L],1);if(b.length?x||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==NN){var O;if(E===-1)O=v;else{for(A=Math.max(b.length,A),O=[],L=0;L<v.length&&(k=v[L],!(k>=E));L++)O.push(k);for(L=E;L<A;L++)O.push(L)}for(L=0;L<O.length;L++)u(t,O[L])}else l(t);return!0}});var Fhe=ye(kg=>{\"use strict\";var Phe=Eo(),Sar=DO(),Ihe=qa(),Ep=Dr(),NM=Mc(),Rhe=hf(),Dhe=Ca(),UM=Rhe.cleanId,Hht=Rhe.getFromTrace,VN=Ihe.traceIs;kg.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Ep.log(\"Clearing previous rejected promises from queue.\"),e._promises=[]};kg.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(NM.subplotsRegistry.cartesian||{}).attrRegex,i=(NM.subplotsRegistry.polar||{}).attrRegex,a=(NM.subplotsRegistry.ternary||{}).attrRegex,o=(NM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t<s.length;t++){var l=s[t];if(n&&n.test(l)){var u=e[l];u.anchor&&u.anchor!==\"free\"&&(u.anchor=UM(u.anchor)),u.overlaying&&(u.overlaying=UM(u.overlaying)),u.type||(u.isdate?u.type=\"date\":u.islog?u.type=\"log\":u.isdate===!1&&u.islog===!1&&(u.type=\"linear\")),(u.autorange===\"withzero\"||u.autorange===\"tozero\")&&(u.autorange=!0,u.rangemode=\"tozero\"),u.insiderange&&delete u.range,delete u.islog,delete u.isdate,delete u.categories,kP(u,\"domain\")&&delete u.domain}}var c=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<c;t++){var f=e.annotations[t];Ep.isPlainObject(f)&&(Y3(f,\"xref\"),Y3(f,\"yref\"))}var h=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<h;t++){var d=e.shapes[t];Ep.isPlainObject(d)&&(Y3(d,\"xref\"),Y3(d,\"yref\"))}var v=Array.isArray(e.images)?e.images.length:0;for(t=0;t<v;t++){var x=e.images[t];Ep.isPlainObject(x)&&(Y3(x,\"xref\"),Y3(x,\"yref\"))}var b=e.legend;return b&&(b.x>3?(b.x=1.02,b.xanchor=\"left\"):b.x<-2&&(b.x=-.02,b.xanchor=\"right\"),b.y>3?(b.y=1.02,b.yanchor=\"bottom\"):b.y<-2&&(b.y=-.02,b.yanchor=\"top\")),e.dragmode===\"rotate\"&&(e.dragmode=\"orbit\"),Dhe.clean(e),e.template&&e.template.layout&&kg.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!==\"paper\"&&(e[t]=UM(r,n,!0))}kg.cleanData=function(e){for(var t=0;t<e.length;t++){var r=e[t],n;if(r.type===\"histogramy\"&&\"xbins\"in r&&!(\"ybins\"in r)&&(r.ybins=r.xbins,delete r.xbins),r.type===\"histogramy\"&&kg.swapXYData(r),(r.type===\"histogramx\"||r.type===\"histogramy\")&&(r.type=\"histogram\"),\"scl\"in r&&!(\"colorscale\"in r)&&(r.colorscale=r.scl,delete r.scl),\"reversescl\"in r&&!(\"reversescale\"in r)&&(r.reversescale=r.reversescl,delete r.reversescl),r.xaxis&&(r.xaxis=UM(r.xaxis,\"x\")),r.yaxis&&(r.yaxis=UM(r.yaxis,\"y\")),VN(r,\"gl3d\")&&r.scene&&(r.scene=NM.subplotsRegistry.gl3d.cleanId(r.scene)),!VN(r,\"pie-like\")&&!VN(r,\"bar-like\"))if(Array.isArray(r.textposition))for(n=0;n<r.textposition.length;n++)r.textposition[n]=khe(r.textposition[n]);else r.textposition&&(r.textposition=khe(r.textposition));var i=Ihe.getModule(r);if(i&&i.colorbar){var a=i.colorbar.container,o=a?r[a]:r;o&&o.colorscale&&(o.colorscale===\"YIGnBu\"&&(o.colorscale=\"YlGnBu\"),o.colorscale===\"YIOrRd\"&&(o.colorscale=\"YlOrRd\"))}if(r.type===\"surface\"&&Ep.isPlainObject(r.contours)){var s=[\"x\",\"y\",\"z\"];for(n=0;n<s.length;n++){var l=r.contours[s[n]];Ep.isPlainObject(l)&&(l.highlightColor&&(l.highlightcolor=l.highlightColor,delete l.highlightColor),l.highlightWidth&&(l.highlightwidth=l.highlightWidth,delete l.highlightWidth))}}if(r.type===\"candlestick\"||r.type===\"ohlc\"){var u=(r.increasing||{}).showlegend!==!1,c=(r.decreasing||{}).showlegend!==!1,f=Che(r.increasing),h=Che(r.decreasing);if(f!==!1&&h!==!1){var d=jht(f,h,u,c);d&&(r.name=d)}else(f||h)&&!r.name&&(r.name=f||h)}kP(r,\"line\")&&delete r.line,\"marker\"in r&&(kP(r.marker,\"line\")&&delete r.marker.line,kP(r,\"marker\")&&delete r.marker),Dhe.clean(r),r.autobinx&&(delete r.autobinx,delete r.xbins),r.autobiny&&(delete r.autobiny,delete r.ybins)}};function Che(e){if(!Ep.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,(typeof t==\"string\"||typeof t==\"number\")&&String(t)}function jht(e,t,r,n){if(r&&!n)return e;if(n&&!r||!e.trim())return t;if(!t.trim())return e;var i=Math.min(e.length,t.length),a;for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);var o=e.substr(0,a);return o.trim()}function khe(e){var t=\"middle\",r=\"center\";return typeof e==\"string\"&&(e.indexOf(\"top\")!==-1?t=\"top\":e.indexOf(\"bottom\")!==-1&&(t=\"bottom\"),e.indexOf(\"left\")!==-1?r=\"left\":e.indexOf(\"right\")!==-1&&(r=\"right\")),t+\" \"+r}function kP(e,t){return t in e&&typeof e[t]==\"object\"&&Object.keys(e[t]).length===0}kg.swapXYData=function(e){var t;if(Ep.swapAttrs(e,[\"?\",\"?0\",\"d?\",\"?bins\",\"nbins?\",\"autobin?\",\"?src\",\"error_?\"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,n=\"copy_ystyle\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);Ep.swapAttrs(e,[\"error_?.copy_ystyle\"]),n&&Ep.swapAttrs(e,[\"error_?.color\",\"error_?.thickness\",\"error_?.width\"])}if(typeof e.hoverinfo==\"string\"){var i=e.hoverinfo.split(\"+\");for(t=0;t<i.length;t++)i[t]===\"x\"?i[t]=\"y\":i[t]===\"y\"&&(i[t]=\"x\");e.hoverinfo=i.join(\"+\")}};kg.coerceTraceIndices=function(e,t){if(Phe(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map(function(i,a){return a});if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++)Ep.isIndex(t[n],e.data.length)?r.push(t[n]):Ep.warn(\"trace index (\",t[n],\") is not a number or is out of bounds\");return r}return t};kg.manageArrayContainers=function(e,t,r){var n=e.obj,i=e.parts,a=i.length,o=i[a-1],s=Phe(o);if(s&&t===null){var l=i.slice(0,a-1).join(\".\"),u=Ep.nestedProperty(n,l).get();u.splice(o,1)}else s&&e.get()===void 0&&e.get()===void 0&&(r[e.astr]=null),e.set(t)};var Wht=/(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;function Lhe(e){var t=e.search(Wht);if(t>0)return e.substr(0,t)}kg.hasParent=function(e,t){for(var r=Lhe(t);r;){if(r in e)return!0;r=Lhe(r)}return!1};var Xht=[\"x\",\"y\",\"z\"];kg.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var i=e._fullData[n],a=0;a<3;a++){var o=Hht(e,i,Xht[a]);if(o&&o.type!==\"log\"){var s=o._name,l=o._id.substr(1);if(l.substr(0,5)===\"scene\"){if(r[l]!==void 0)continue;s=l+\".\"+s}var u=s+\".type\";r[s]===void 0&&r[u]===void 0&&Ep.nestedProperty(e.layout,u).set(null)}}}});var UP=ye(xl=>{\"use strict\";var IP=Oa(),Zht=Eo(),Yht=rq(),xa=Dr(),Ec=xa.nestedProperty,jN=g3(),np=mne(),L0=qa(),BP=_3(),es=Mc(),Nv=ho(),Kht=mB(),Jht=Rd(),GN=So(),$ht=Ca(),Qht=BN().initInteractions,edt=Wp(),tdt=zf().clearOutline,Nhe=ub().dfltConfig,LP=Ehe(),Ih=Fhe(),Au=xM(),v_=mc(),rdt=hd().AX_NAME_PATTERN,HN=0,zhe=5;function idt(e,t,r,n){var i;if(e=xa.getGraphDiv(e),jN.init(e),xa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=jN.triggerHandler(e,\"plotly_beforeplot\",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!xa.isPlotDiv(e)&&xa.warn(\"Calling _doPlot as if redrawing but this container doesn't yet have a plot.\",e);function s(){if(i)return xl.addFrames(e,i)}Vhe(e,n),r||(r={}),IP.select(e).classed(\"js-plotly-plot\",!0),GN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Ih.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=Ih.cleanLayout(r)),es.supplyDefaults(e);var u=e._fullLayout,c=u._has(\"cartesian\");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(Mdt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),GN.initGradients(e),GN.initPatterns(e),l&&Nv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&es.doCalcdata(e);for(var h=0;h<e.calcdata.length;h++)e.calcdata[h][0].trace=e._fullData[h];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){xa.isHidden(e)||es.resize(e)},window.addEventListener(\"resize\",e._responsiveChartHandler)):xa.clearResponsive(e);var d=xa.extendFlat({},u._size),v=0;function x(){for(var k=u._basePlotModules,M=0;M<k.length;M++)k[M].drawFramework&&k[M].drawFramework(e);!u._glcanvas&&u._has(\"gl\")&&(u._glcanvas=u._glcontainer.selectAll(\".gl-canvas\").data([{key:\"contextLayer\",context:!0,pick:!1},{key:\"focusLayer\",context:!1,pick:!1},{key:\"pickLayer\",context:!1,pick:!0}],function(z){return z.key}),u._glcanvas.enter().append(\"canvas\").attr(\"class\",function(z){return\"gl-canvas gl-canvas-\"+z.key.replace(\"Layer\",\"\")}).style({position:\"absolute\",top:0,left:0,overflow:\"visible\",\"pointer-events\":\"none\"}));var g=e._context.plotGlPixelRatio;if(u._glcanvas){u._glcanvas.attr(\"width\",u.width*g).attr(\"height\",u.height*g).style(\"width\",u.width+\"px\").style(\"height\",u.height+\"px\");var P=u._glcanvas.data()[0].regl;if(P&&(Math.floor(u.width*g)!==P._gl.drawingBufferWidth||Math.floor(u.height*g)!==P._gl.drawingBufferHeight)){var T=\"WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.\";if(v)xa.error(T);else return xa.log(T+\" Clearing graph and plotting again.\"),es.cleanPlot([],{},e._fullData,u),es.supplyDefaults(e),u=e._fullLayout,es.doCalcdata(e),v++,x()}}return u.modebar.orientation===\"h\"?u._modebardiv.style(\"height\",null).style(\"width\",\"100%\"):u._modebardiv.style(\"width\",null).style(\"height\",u.height+\"px\"),es.previousPromises(e)}function b(){if(es.clearAutoMarginIds(e),Au.drawMarginPushers(e),Nv.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&es.allowAutoMargin(e,\"title.automargin\"),u._has(\"pie\"))for(var k=e._fullData,M=0;M<k.length;M++){var g=k[M];g.type===\"pie\"&&g.automargin&&es.allowAutoMargin(e,\"pie.\"+g.uid+\".automargin\")}return es.doAutoMargin(e),es.previousPromises(e)}function p(){if(es.didMarginChange(d,u._size))return xa.syncOrAsync([b,Au.layoutStyles],e)}function C(){if(!f){E();return}return xa.syncOrAsync([L0.getComponentMethod(\"shapes\",\"calcAutorange\"),L0.getComponentMethod(\"annotations\",\"calcAutorange\"),E],e)}function E(){e._transitioning||(Au.doAutoRangeAndConstraints(e),l&&Nv.saveRangeInitial(e),L0.getComponentMethod(\"rangeslider\",\"calcAutorange\")(e))}function A(){return Nv.draw(e,l?\"\":\"redraw\")}var L=[es.previousPromises,s,x,b,p];c&&L.push(C),L.push(Au.layoutStyles),c&&L.push(A,function(M){var g=M._fullLayout._insideTickLabelsUpdaterange;if(g)return M._fullLayout._insideTickLabelsUpdaterange=void 0,VM(M,g).then(function(){Nv.saveRangeInitial(M,!0)})}),L.push(Au.drawData,Au.finalDraw,Qht,es.addLinks,es.rehover,es.redrag,es.reselect,es.doAutoMargin,es.previousPromises);var _=xa.syncOrAsync(L,e);return(!_||!_.then)&&(_=Promise.resolve()),_.then(function(){return GM(e),e})}function GM(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit(\"plotly_afterplot\")}function ndt(e){return xa.extendFlat(Nhe,e)}function Uhe(e,t){try{e._fullLayout._paper.style(\"background\",t)}catch(r){xa.error(r)}}function adt(e,t){var r=$ht.combine(t,\"white\");Uhe(e,r)}function Vhe(e,t){if(!e._context){e._context=xa.extendDeep({},Nhe);var r=IP.select(\"base\");e._context._baseUrl=r.size()&&r.attr(\"href\")?window.location.href.split(\"#\")[0]:\"\"}var n=e._context,i,a,o;if(t){for(a=Object.keys(t),i=0;i<a.length;i++)o=a[i],!(o===\"editable\"||o===\"edits\")&&o in n&&(o===\"setBackground\"&&t[o]===\"opaque\"?n[o]=adt:n[o]=t[o]);var s=t.editable;if(s!==void 0)for(n.editable=s,a=Object.keys(n.edits),i=0;i<a.length;i++)n.edits[a[i]]=s;if(t.edits)for(a=Object.keys(t.edits),i=0;i<a.length;i++)o=a[i],o in n.edits&&(n.edits[o]=t.edits[o]);n._exportedPlot=t._exportedPlot}n.staticPlot&&(n.editable=!1,n.edits={},n.autosizable=!1,n.scrollZoom=!1,n.doubleClick=!1,n.showTips=!1,n.showLink=!1,n.displayModeBar=!1),n.displayModeBar===\"hover\"&&!Yht&&(n.displayModeBar=!0),(n.setBackground===\"transparent\"||typeof n.setBackground!=\"function\")&&(n.setBackground=Uhe),n._hasZeroHeight=n._hasZeroHeight||e.clientHeight===0,n._hasZeroWidth=n._hasZeroWidth||e.clientWidth===0;var l=n.scrollZoom,u=n._scrollZoom={};if(l===!0)u.cartesian=1,u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1;else if(typeof l==\"string\"){var c=l.split(\"+\");for(i=0;i<c.length;i++)u[c[i]]=1}else l!==!1&&(u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1)}function odt(e){if(e=xa.getGraphDiv(e),!xa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e);return Ih.cleanData(e.data),Ih.cleanLayout(e.layout),e.calcdata=void 0,xl._doPlot(e).then(function(){return e.emit(\"plotly_redraw\"),e})}function sdt(e,t,r,n){return e=xa.getGraphDiv(e),es.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),es.purge(e),xl._doPlot(e,t,r,n)}function RP(e,t){var r=t+1,n=[],i,a;for(i=0;i<e.length;i++)a=e[i],a<0?n.push(r+a):n.push(a);return n}function DP(e,t,r){var n,i;for(n=0;n<t.length;n++){if(i=t[n],i!==parseInt(i,10))throw new Error(\"all values in \"+r+\" must be integers\");if(i>=e.data.length||i<-e.data.length)throw new Error(r+\" must be valid indices for gd.data.\");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error(\"each index in \"+r+\" must be unique.\")}}function Ghe(e,t,r){if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array.\");if(typeof t==\"undefined\")throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(t)||(t=[t]),DP(e,t,\"currentIndices\"),typeof r!=\"undefined\"&&!Array.isArray(r)&&(r=[r]),typeof r!=\"undefined\"&&DP(e,r,\"newIndices\"),typeof r!=\"undefined\"&&t.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function ldt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array.\");if(typeof t==\"undefined\")throw new Error(\"traces must be defined.\");for(Array.isArray(t)||(t=[t]),n=0;n<t.length;n++)if(i=t[n],typeof i!=\"object\"||Array.isArray(i)||i===null)throw new Error(\"all values in traces array must be non-array objects\");if(typeof r!=\"undefined\"&&!Array.isArray(r)&&(r=[r]),typeof r!=\"undefined\"&&r.length!==t.length)throw new Error(\"if indices is specified, traces.length must equal indices.length\")}function udt(e,t,r,n){var i=xa.isPlainObject(n);if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array\");if(!xa.isPlainObject(t))throw new Error(\"update must be a key:value object\");if(typeof r==\"undefined\")throw new Error(\"indices must be an integer or array of integers\");DP(e,r,\"indices\");for(var a in t){if(!Array.isArray(t[a])||t[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==t[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object\")}}function cdt(e,t,r,n){var i=xa.isPlainObject(n),a=[],o,s,l,u,c;Array.isArray(r)||(r=[r]),r=RP(r,e.data.length-1);for(var f in t)for(var h=0;h<r.length;h++){if(o=e.data[r[h]],l=Ec(o,f),s=l.get(),u=t[f][h],!xa.isArrayOrTypedArray(u))throw new Error(\"attribute: \"+f+\" index: \"+h+\" must be an array\");if(!xa.isArrayOrTypedArray(s))throw new Error(\"cannot extend missing or non-array attribute: \"+f);if(s.constructor!==u.constructor)throw new Error(\"cannot extend array with an array of a different type: \"+f);c=i?n[f][h]:n,Zht(c)||(c=-1),a.push({prop:l,target:s,insert:u,maxp:Math.floor(c)})}return a}function Hhe(e,t,r,n,i){udt(e,t,r,n);for(var a=cdt(e,t,r,n),o={},s={},l=0;l<a.length;l++){var u=a[l].prop,c=a[l].maxp,f=i(a[l].target,a[l].insert,c);u.set(f[0]),Array.isArray(o[u.astr])||(o[u.astr]=[]),o[u.astr].push(f[1]),Array.isArray(s[u.astr])||(s[u.astr]=[]),s[u.astr].push(a[l].target.length)}return{update:o,maxPoints:s}}function jhe(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Whe(e,t,r,n){e=xa.getGraphDiv(e);function i(l,u,c){var f,h;if(xa.isTypedArray(l))if(c<0){var d=new l.constructor(0),v=jhe(l,u);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var x=u.length-c;f.set(u.subarray(x)),h.set(l),h.set(u.subarray(0,x),l.length)}else{var b=c-u.length,p=l.length-b;f.set(l.subarray(p)),f.set(u,b),h.set(l.subarray(0,p))}else f=l.concat(u),h=c>=0&&c<f.length?f.splice(0,f.length-c):[];return[f,h]}var a=Hhe(e,t,r,n,i),o=xl.redraw(e),s=[e,a.update,r,a.maxPoints];return np.add(e,xl.prependTraces,s,Whe,arguments),o}function Xhe(e,t,r,n){e=xa.getGraphDiv(e);function i(l,u,c){var f,h;if(xa.isTypedArray(l))if(c<=0){var d=new l.constructor(0),v=jhe(u,l);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var x=u.length-c;f.set(u.subarray(0,x)),h.set(u.subarray(x)),h.set(l,x)}else{var b=c-u.length;f.set(u),f.set(l.subarray(0,b),u.length),h.set(l.subarray(b))}else f=u.concat(l),h=c>=0&&c<f.length?f.splice(c,f.length):[];return[f,h]}var a=Hhe(e,t,r,n,i),o=xl.redraw(e),s=[e,a.update,r,a.maxPoints];return np.add(e,xl.extendTraces,s,Xhe,arguments),o}function Zhe(e,t,r){e=xa.getGraphDiv(e);var n=[],i=xl.deleteTraces,a=Zhe,o=[e,n],s=[e,t],l,u;for(ldt(e,t,r),Array.isArray(t)||(t=[t]),t=t.map(function(c){return xa.extendFlat({},c)}),Ih.cleanData(t),l=0;l<t.length;l++)e.data.push(t[l]);for(l=0;l<t.length;l++)n.push(-t.length+l);if(typeof r==\"undefined\")return u=xl.redraw(e),np.add(e,i,o,a,s),u;Array.isArray(r)||(r=[r]);try{Ghe(e,n,r)}catch(c){throw e.data.splice(e.data.length-t.length,t.length),c}return np.startSequence(e),np.add(e,i,o,a,s),u=xl.moveTraces(e,n,r),np.stopSequence(e),u}function Yhe(e,t){e=xa.getGraphDiv(e);var r=[],n=xl.addTraces,i=Yhe,a=[e,r,t],o=[e,t],s,l;if(typeof t==\"undefined\")throw new Error(\"indices must be an integer or array of integers.\");for(Array.isArray(t)||(t=[t]),DP(e,t,\"indices\"),t=RP(t,e.data.length-1),t.sort(xa.sorterDes),s=0;s<t.length;s+=1)l=e.data.splice(t[s],1)[0],r.push(l);var u=xl.redraw(e);return np.add(e,n,a,i,o),u}function WN(e,t,r){e=xa.getGraphDiv(e);var n=[],i=[],a=WN,o=WN,s=[e,r,t],l=[e,t,r],u;if(Ghe(e,t,r),t=Array.isArray(t)?t:[t],typeof r==\"undefined\")for(r=[],u=0;u<t.length;u++)r.push(-t.length+u);for(r=Array.isArray(r)?r:[r],t=RP(t,e.data.length-1),r=RP(r,e.data.length-1),u=0;u<e.data.length;u++)t.indexOf(u)===-1&&n.push(e.data[u]);for(u=0;u<t.length;u++)i.push({newIndex:r[u],trace:e.data[t[u]]});for(i.sort(function(f,h){return f.newIndex-h.newIndex}),u=0;u<i.length;u+=1)n.splice(i[u].newIndex,0,i[u].trace);e.data=n;var c=xl.redraw(e);return np.add(e,a,s,o,l),c}function FP(e,t,r,n){e=xa.getGraphDiv(e),Ih.clearPromiseQueue(e);var i={};if(typeof t==\"string\")i[t]=r;else if(xa.isPlainObject(t))i=xa.extendFlat({},t),n===void 0&&(n=r);else return xa.warn(\"Restyle fail.\",t,r,n),Promise.reject();Object.keys(i).length&&(e.changed=!0);var a=Ih.coerceTraceIndices(e,n),o=Khe(e,i,a),s=o.flags;s.calc&&(e.calcdata=void 0),s.clearAxisTypes&&Ih.clearAxisTypes(e,a,{});var l=[];s.fullReplot?l.push(xl._doPlot):(l.push(es.previousPromises),es.supplyDefaults(e),s.markerSize&&(es.doCalcdata(e),NP(l)),s.style&&l.push(Au.doTraceStyle),s.colorbars&&l.push(Au.doColorBars),l.push(GM)),l.push(es.rehover,es.redrag,es.reselect),np.add(e,FP,[e,o.undoit,o.traces],FP,[e,o.redoit,o.traces]);var u=xa.syncOrAsync(l,e);return(!u||!u.then)&&(u=Promise.resolve()),u.then(function(){return e.emit(\"plotly_restyle\",o.eventData),e})}function ky(e){return e===void 0?null:e}function PP(e,t){return t?function(r,n,i){var a=Ec(r,n),o=a.set;return a.set=function(s){var l=(i||\"\")+n;zP(l,a.get(),s,e),o(s)},a}:Ec}function zP(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var i=Array.isArray(t)?t:[],a=Array.isArray(r)?r:[],o=Math.max(i.length,a.length),s=0;s<o;s++)zP(e+\"[\"+s+\"]\",i[s],a[s],n);else if(xa.isPlainObject(t)||xa.isPlainObject(r)){var l=xa.isPlainObject(t)?t:{},u=xa.isPlainObject(r)?r:{},c=xa.extendFlat({},l,u);for(var f in c)zP(e+\".\"+f,l[f],u[f],n)}else n[e]===void 0&&(n[e]=ky(t))}function fdt(e,t,r){for(var n in r){var i=Ec(e,n);zP(n,i.get(),r[n],t)}}function Khe(e,t,r){var n=e._fullLayout,i=e._fullData,a=e.data,o=n._guiEditing,s=PP(n._preGUI,o),l=xa.extendDeepAll({},t),u,c=v_.traceFlags(),f={},h={},d;function v(){return r.map(function(){})}function x(ge){var Fe=Nv.id2name(ge);d.indexOf(Fe)===-1&&d.push(Fe)}function b(ge){return\"LAYOUT\"+ge+\".autorange\"}function p(ge){return\"LAYOUT\"+ge+\".range\"}function C(ge){for(var Fe=ge;Fe<i.length;Fe++)if(i[Fe]._input===a[ge])return i[Fe]}function E(ge,Fe,ce){if(Array.isArray(ge)){ge.forEach(function(Wt){E(Wt,Fe,ce)});return}if(!(ge in t||Ih.hasParent(t,ge))){var Ze;if(ge.substr(0,6)===\"LAYOUT\")Ze=s(e.layout,ge.replace(\"LAYOUT\",\"\"));else{var ct=r[ce],pt=n._tracePreGUI[C(ct)._fullInput.uid];Ze=PP(pt,o)(a[ct],ge)}ge in h||(h[ge]=v()),h[ge][ce]===void 0&&(h[ge][ce]=ky(Ze.get())),Fe!==void 0&&Ze.set(Fe)}}function A(ge){return function(Fe){return i[Fe][ge]}}function L(ge){return function(Fe,ce){return Fe===!1?i[r[ce]][ge]:null}}for(var _ in t){if(Ih.hasParent(t,_))throw new Error(\"cannot set \"+_+\" and a parent attribute simultaneously\");var k=t[_],M,g,P,T,z,O;if((_===\"autobinx\"||_===\"autobiny\")&&(_=_.charAt(_.length-1)+\"bins\",Array.isArray(k)?k=k.map(L(_)):k===!1?k=r.map(A(_)):k=null),f[_]=k,_.substr(0,6)===\"LAYOUT\"){P=s(e.layout,_.replace(\"LAYOUT\",\"\")),h[_]=[ky(P.get())],P.set(Array.isArray(k)?k[0]:k),c.calc=!0;continue}for(h[_]=v(),u=0;u<r.length;u++){M=a[r[u]],g=C(r[u]);var V=n._tracePreGUI[g._fullInput.uid];if(P=PP(V,o)(M,_),T=P.get(),z=Array.isArray(k)?k[u%k.length]:k,z!==void 0){var G=P.parts[P.parts.length-1],Z=_.substr(0,_.length-G.length-1),H=Z?Z+\".\":\"\",N=Z?Ec(g,Z).get():g;if(O=BP.getTraceValObject(g,P.parts),O&&O.impliedEdits&&z!==null)for(var j in O.impliedEdits)E(xa.relativeAttr(_,j),O.impliedEdits[j],u);else if((G===\"thicknessmode\"||G===\"lenmode\")&&T!==z&&(z===\"fraction\"||z===\"pixels\")&&N){var re=n._size,oe=N.orient,_e=oe===\"top\"||oe===\"bottom\";if(G===\"thicknessmode\"){var Me=_e?re.h:re.w;E(H+\"thickness\",N.thickness*(z===\"fraction\"?1/Me:Me),u)}else{var ke=_e?re.w:re.h;E(H+\"len\",N.len*(z===\"fraction\"?1/ke:ke),u)}}else if(_===\"type\"&&(z===\"pie\"!=(T===\"pie\")||z===\"funnelarea\"!=(T===\"funnelarea\"))){var me=\"x\",ie=\"y\";(z===\"bar\"||T===\"bar\")&&M.orientation===\"h\"&&(me=\"y\",ie=\"x\"),xa.swapAttrs(M,[\"?\",\"?src\"],\"labels\",me),xa.swapAttrs(M,[\"d?\",\"?0\"],\"label\",me),xa.swapAttrs(M,[\"?\",\"?src\"],\"values\",ie),T===\"pie\"||T===\"funnelarea\"?(Ec(M,\"marker.color\").set(Ec(M,\"marker.colors\").get()),n._pielayer.selectAll(\"g.trace\").remove()):L0.traceIs(M,\"cartesian\")&&Ec(M,\"marker.colors\").set(Ec(M,\"marker.color\").get())}h[_][u]=ky(T);var Se=[\"swapxy\",\"swapxyaxes\",\"orientation\",\"orientationaxes\"];if(Se.indexOf(_)!==-1){if(_===\"orientation\"){P.set(z);var Le=M.x&&!M.y?\"h\":\"v\";if((P.get()||Le)===g.orientation)continue}else _===\"orientationaxes\"&&(M.orientation={v:\"h\",h:\"v\"}[g.orientation]);Ih.swapXYData(M),c.calc=c.clearAxisTypes=!0}else es.dataArrayContainers.indexOf(P.parts[0])!==-1?(Ih.manageArrayContainers(P,z,h),c.calc=!0):(O?O.arrayOk&&!L0.traceIs(g,\"regl\")&&(xa.isArrayOrTypedArray(z)||xa.isArrayOrTypedArray(T))?c.calc=!0:v_.update(c,O):c.calc=!0,P.set(z))}}if([\"swapxyaxes\",\"orientationaxes\"].indexOf(_)!==-1&&Nv.swap(e,r),_===\"orientationaxes\"){var Ae=Ec(e.layout,\"hovermode\"),De=Ae.get();De===\"x\"?Ae.set(\"y\"):De===\"y\"?Ae.set(\"x\"):De===\"x unified\"?Ae.set(\"y unified\"):De===\"y unified\"&&Ae.set(\"x unified\")}if([\"orientation\",\"type\"].indexOf(_)!==-1){for(d=[],u=0;u<r.length;u++){var Pe=a[r[u]];L0.traceIs(Pe,\"cartesian\")&&(x(Pe.xaxis||\"x\"),x(Pe.yaxis||\"y\"))}E(d.map(b),!0,0),E(d.map(p),[0,1],0)}}return(c.calc||c.plot)&&(c.fullReplot=!0),{flags:c,undoit:h,redoit:f,traces:r,eventData:xa.extendDeepNoArrays([],[l,r])}}function VM(e,t,r){e=xa.getGraphDiv(e),Ih.clearPromiseQueue(e);var n={};if(typeof t==\"string\")n[t]=r;else if(xa.isPlainObject(t))n=xa.extendFlat({},t);else return xa.warn(\"Relayout fail.\",t,r),Promise.reject();Object.keys(n).length&&(e.changed=!0);var i=ede(e,n),a=i.flags;a.calc&&(e.calcdata=void 0);var o=[es.previousPromises];a.layoutReplot?o.push(Au.layoutReplot):Object.keys(n).length&&(Jhe(e,a,i)||es.supplyDefaults(e),a.legend&&o.push(Au.doLegend),a.layoutstyle&&o.push(Au.layoutStyles),a.axrange&&NP(o,i.rangesAltered),a.ticks&&o.push(Au.doTicksRelayout),a.modebar&&o.push(Au.doModeBar),a.camera&&o.push(Au.doCamera),a.colorbars&&o.push(Au.doColorBars),o.push(GM)),o.push(es.rehover,es.redrag,es.reselect),np.add(e,VM,[e,i.undoit],VM,[e,i.redoit]);var s=xa.syncOrAsync(o,e);return(!s||!s.then)&&(s=Promise.resolve(e)),s.then(function(){return e.emit(\"plotly_relayout\",i.eventData),e})}function Jhe(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var i in t)if(i!==\"axrange\"&&t[i])return!1;var a,o,s=function(d,v){return xa.coerce(a,o,Jht,d,v)},l={};for(var u in r.rangesAltered){var c=Nv.id2name(u);if(a=e.layout[c],o=n[c],Kht(a,o,s,l),o._matchGroup){for(var f in o._matchGroup)if(f!==u){var h=n[Nv.id2name(f)];h.autorange=o.autorange,h.range=o.range.slice(),h._input.range=o.range.slice()}}}return!0}function NP(e,t){var r=t?function(n){var i=[],a=!0;for(var o in t){var s=Nv.getFromId(n,o);if(i.push(o),(s.ticklabelposition||\"\").indexOf(\"inside\")!==-1&&s._anchorAxis&&i.push(s._anchorAxis._id),s._matchGroup)for(var l in s._matchGroup)t[l]||i.push(l)}return Nv.draw(n,i,{skipTitle:a})}:function(n){return Nv.draw(n,\"redraw\")};e.push(tdt,Au.doAutoRangeAndConstraints,r,Au.drawData,Au.finalDraw)}var $he=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,Qhe=/^[xyz]axis[0-9]*\\.autorange$/,hdt=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function ede(e,t){var r=e.layout,n=e._fullLayout,i=n._guiEditing,a=PP(n._preGUI,i),o=Object.keys(t),s=Nv.list(e),l=xa.extendDeepAll({},t),u={},c,f,h;for(o=Object.keys(t),f=0;f<o.length;f++)if(o[f].indexOf(\"allaxes\")===0){for(h=0;h<s.length;h++){var d=s[h]._id.substr(1),v=d.indexOf(\"scene\")!==-1?d+\".\":\"\",x=o[f].replace(\"allaxes\",v+s[h]._name);t[x]||(t[x]=t[o[f]])}delete t[o[f]]}var b=v_.layoutFlags(),p={},C={};function E(pt,Wt){if(Array.isArray(pt)){pt.forEach(function(lt){E(lt,Wt)});return}if(!(pt in t||Ih.hasParent(t,pt))){var st=a(r,pt);pt in C||(C[pt]=ky(st.get())),Wt!==void 0&&st.set(Wt)}}var A={},L;function _(pt){var Wt=Nv.name2id(pt.split(\".\")[0]);return A[Wt]=1,Wt}for(var k in t){if(Ih.hasParent(t,k))throw new Error(\"cannot set \"+k+\" and a parent attribute simultaneously\");for(var M=a(r,k),g=t[k],P=M.parts.length,T=P-1;T>0&&typeof M.parts[T]!=\"string\";)T--;var z=M.parts[T],O=M.parts[T-1]+\".\"+z,V=M.parts.slice(0,T).join(\".\"),G=Ec(e.layout,V).get(),Z=Ec(n,V).get(),H=M.get();if(g!==void 0){p[k]=g,C[k]=z===\"reverse\"?g:ky(H);var N=BP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&g!==null)for(var j in N.impliedEdits)E(xa.relativeAttr(k,j),N.impliedEdits[j]);if([\"width\",\"height\"].indexOf(k)!==-1)if(g){E(\"autosize\",null);var re=k===\"height\"?\"width\":\"height\";E(re,n[re])}else n[k]=e._initialAutoSize[k];else if(k===\"autosize\")E(\"width\",g?null:n.width),E(\"height\",g?null:n.height);else if(O.match($he))_(O),Ec(n,V+\"._inputRange\").set(null);else if(O.match(Qhe)){_(O),Ec(n,V+\"._inputRange\").set(null);var oe=Ec(n,V).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else O.match(hdt)&&Ec(n,V+\"._inputDomain\").set(null);if(z===\"type\"){L=G;var _e=Z.type===\"linear\"&&g===\"log\",Me=Z.type===\"log\"&&g===\"linear\";if(_e||Me){if(!L||!L.range)E(V+\".autorange\",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var ke=L.range[0],me=L.range[1];_e?(ke<=0&&me<=0&&E(V+\".autorange\",!0),ke<=0?ke=me/1e6:me<=0&&(me=ke/1e6),E(V+\".range[0]\",Math.log(ke)/Math.LN10),E(V+\".range[1]\",Math.log(me)/Math.LN10)):(E(V+\".range[0]\",Math.pow(10,ke)),E(V+\".range[1]\",Math.pow(10,me)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[M.parts[0]]&&M.parts[1]===\"radialaxis\"&&delete n[M.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],L0.getComponentMethod(\"annotations\",\"convertCoords\")(e,Z,g,E),L0.getComponentMethod(\"images\",\"convertCoords\")(e,Z,g,E)}else E(V+\".autorange\",!0),E(V+\".range\",null);Ec(n,V+\"._inputRange\").set(null)}else if(z.match(rdt)){var ie=Ec(n,k).get(),Se=(g||{}).type;(!Se||Se===\"-\")&&(Se=\"linear\"),L0.getComponentMethod(\"annotations\",\"convertCoords\")(e,ie,Se,E),L0.getComponentMethod(\"images\",\"convertCoords\")(e,ie,Se,E)}var Le=LP.containerArrayMatch(k);if(Le){c=Le.array,f=Le.index;var Ae=Le.property,De=N||{editType:\"calc\"};f!==\"\"&&Ae===\"\"&&(LP.isAddVal(g)?C[k]=null:LP.isRemoveVal(g)?C[k]=(Ec(r,c).get()||[])[f]:xa.warn(\"unrecognized full object value\",t)),v_.update(b,De),u[c]||(u[c]={});var Pe=u[c][f];Pe||(Pe=u[c][f]={}),Pe[Ae]=g,delete t[k]}else z===\"reverse\"?(G.range?G.range.reverse():(E(V+\".autorange\",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(k===\"dragmode\"&&(g===!1&&H!==!1||g!==!1&&H===!1)||n._has(\"scatter-like\")&&n._has(\"regl\")&&k===\"dragmode\"&&(g===\"lasso\"||g===\"select\")&&!(H===\"lasso\"||H===\"select\")?b.plot=!0:N?v_.update(b,N):b.calc=!0,M.set(g))}}for(c in u){var ge=LP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);ge||(b.plot=!0)}for(var Fe in A){L=Nv.getFromId(e,Fe);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var Ze in ce)A[Ze]||(Nv.getFromId(e,Ze)._constraintShrinkable=!0)}}(tde(e)||t.height||t.width)&&(b.plot=!0);var ct=n.shapes;for(f=0;f<ct.length;f++)if(ct[f].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:A,undoit:C,redoit:p,eventData:l}}function tde(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&es.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function OP(e,t,r,n){e=xa.getGraphDiv(e),Ih.clearPromiseQueue(e),xa.isPlainObject(t)||(t={}),xa.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var i=Ih.coerceTraceIndices(e,n),a=Khe(e,xa.extendFlat({},t),i),o=a.flags,s=ede(e,xa.extendFlat({},r)),l=s.flags;(o.calc||l.calc)&&(e.calcdata=void 0),o.clearAxisTypes&&Ih.clearAxisTypes(e,i,r);var u=[];l.layoutReplot?u.push(Au.layoutReplot):o.fullReplot?u.push(xl._doPlot):(u.push(es.previousPromises),Jhe(e,l,s)||es.supplyDefaults(e),o.style&&u.push(Au.doTraceStyle),(o.colorbars||l.colorbars)&&u.push(Au.doColorBars),l.legend&&u.push(Au.doLegend),l.layoutstyle&&u.push(Au.layoutStyles),l.axrange&&NP(u,s.rangesAltered),l.ticks&&u.push(Au.doTicksRelayout),l.modebar&&u.push(Au.doModeBar),l.camera&&u.push(Au.doCamera),u.push(GM)),u.push(es.rehover,es.redrag,es.reselect),np.add(e,OP,[e,a.undoit,s.undoit,a.traces],OP,[e,a.redoit,s.redoit,a.traces]);var c=xa.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve(e)),c.then(function(){return e.emit(\"plotly_update\",{data:a.eventData,layout:s.eventData}),e})}function ZN(e){return function(r){r._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return r._fullLayout._guiEditing=!1,n}}var ddt=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^(map\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],vdt=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function Ohe(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=e.match(n.pattern);if(i){var a=i[1]||\"\";return{head:a,tail:e.substr(a.length+1),attr:n.attr}}}}function qhe(e,t){var r=Ec(t,e).get();if(r!==void 0)return r;var n=e.split(\".\");for(n.pop();n.length>1;)if(n.pop(),r=Ec(t,n.join(\".\")+\".uirevision\").get(),r!==void 0)return r;return t.uirevision}function pdt(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function gdt(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function Bhe(e,t){var r=xa.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&xa.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function mdt(e,t,r,n){var i=n._preGUI,a,o,s,l,u,c,f,h,d,v,x=[],b={},p={};for(a in i){if(u=Ohe(a,ddt),u){if(d=u.head,v=u.tail,o=u.attr||d+\".uirevision\",s=Ec(n,o).get(),l=s&&qhe(o,t),l&&l===s){if(c=i[a],c===null&&(c=void 0),f=Ec(t,a),h=f.get(),Bhe(h,c)){h===void 0&&v===\"autorange\"&&x.push(d),f.set(ky(Ec(n,a).get()));continue}else if(v===\"autorange\"||v.substr(0,6)===\"range[\"){var C=i[d+\".range[0]\"],E=i[d+\".range[1]\"],A=i[d+\".autorange\"];if(A||A===null&&C===null&&E===null){if(!(d in b)){var L=Ec(t,d).get();b[d]=L&&(L.autorange||L.autorange!==!1&&(!L.range||L.range.length!==2))}if(b[d]){f.set(ky(Ec(n,a).get()));continue}}}}}else xa.warn(\"unrecognized GUI edit: \"+a);delete i[a],u&&u.tail.substr(0,6)===\"range[\"&&(p[u.head]=1)}for(var _=0;_<x.length;_++){var k=x[_];if(p[k]){var M=Ec(t,k).get();M&&delete M.autorange}}var g=n._tracePreGUI;for(var P in g){var T=g[P],z=null,O;for(a in T){if(!z){var V=pdt(P,r);if(V<0){delete g[P];break}var G=r[V];O=G._fullInput;var Z=gdt(P,e,O.index);if(Z<0){delete g[P];break}z=e[Z]}if(u=Ohe(a,vdt),u){if(u.attr?(s=Ec(n,u.attr).get(),l=s&&qhe(u.attr,t)):(s=O.uirevision,l=z.uirevision,l===void 0&&(l=t.uirevision)),l&&l===s&&(c=T[a],c===null&&(c=void 0),f=Ec(z,a),h=f.get(),Bhe(h,c))){f.set(ky(Ec(O,a).get()));continue}}else xa.warn(\"unrecognized GUI edit: \"+a+\" in trace uid \"+P);delete T[a]}}}function ydt(e,t,r,n){var i,a;function o(){return xl.addFrames(e,i)}e=xa.getGraphDiv(e),Ih.clearPromiseQueue(e);var s=e._fullData,l=e._fullLayout;if(!xa.isPlotDiv(e)||!s||!l)a=xl.newPlot(e,t,r,n);else{if(xa.isPlainObject(t)){var u=t;t=u.data,r=u.layout,n=u.config,i=u.frames}var c=!1;if(n){var f=xa.extendDeep({},e._context);e._context=void 0,Vhe(e,n),c=XN(f,e._context)}if(c){let V=e._ev.eventNames().map(G=>[G,e._ev.listeners(G)]);a=xl.newPlot(e,t,r,n).then(()=>{for(let[G,Z]of V)Z.forEach(H=>e.on(G,H));return xl.react(e,t,r,n)})}else{e.data=t||[],Ih.cleanData(e.data),e.layout=r||{},Ih.cleanLayout(e.layout),mdt(e.data,e.layout,s,l),es.supplyDefaults(e,{skipUpdateCalc:!0});var h=e._fullData,d=e._fullLayout,v=d.datarevision===void 0,x=d.transition,b=xdt(e,l,d,v,x),p=b.newDataRevision,C=_dt(e,s,h,v,x,p);if(tde(e)&&(b.layoutReplot=!0),C.calc||b.calc){e.calcdata=void 0;for(var E=Object.getOwnPropertyNames(d),A=0;A<E.length;A++){var L=E[A],_=L.substring(0,5);if(_===\"xaxis\"||_===\"yaxis\"){var k=d[L]._emptyCategories;k&&k()}}}else es.supplyDefaultsUpdateCalc(e.calcdata,h);var M=[];if(i&&(e._transitionData={},es.createTransitionData(e),M.push(o)),d.transition&&(C.anim||b.anim))b.ticks&&M.push(Au.doTicksRelayout),es.doCalcdata(e),Au.doAutoRangeAndConstraints(e),M.push(function(){return es.transitionFromReact(e,C,b,l)});else if(C.fullReplot||b.layoutReplot)e._fullLayout._skipDefaults=!0,M.push(xl._doPlot);else{for(var g in b.arrays){var P=b.arrays[g];if(P.length){var T=L0.getComponentMethod(g,\"drawOne\");if(T!==xa.noop)for(var z=0;z<P.length;z++)T(e,P[z]);else{var O=L0.getComponentMethod(g,\"draw\");if(O===xa.noop)throw new Error(\"cannot draw components: \"+g);O(e)}}}M.push(es.previousPromises),C.style&&M.push(Au.doTraceStyle),(C.colorbars||b.colorbars)&&M.push(Au.doColorBars),b.legend&&M.push(Au.doLegend),b.layoutstyle&&M.push(Au.layoutStyles),b.axrange&&NP(M),b.ticks&&M.push(Au.doTicksRelayout),b.modebar&&M.push(Au.doModeBar),b.camera&&M.push(Au.doCamera),M.push(GM)}M.push(es.rehover,es.redrag,es.reselect),a=xa.syncOrAsync(M,e),(!a||!a.then)&&(a=Promise.resolve(e))}}return a.then(()=>(c||e.emit(\"plotly_react\",{config:n,data:t,layout:r}),e))}function _dt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=v_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=BP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l<t.length;l++)if(r[l]){if(u=r[l]._fullInput,h[u.uid])continue;h[u.uid]=1,qP(t[l]._fullInput,u,[],f)}return(s.calc||s.plot)&&(s.fullReplot=!0),i&&s.nChanges&&s.nChangesAnim&&(s.anim=s.nChanges===s.nChangesAnim&&o?\"all\":\"some\"),s}function xdt(e,t,r,n,i){var a=v_.layoutFlags();a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0;function o(h){return BP.getLayoutValObject(r,h)}for(var s in r)if(!(!s.startsWith(\"xaxis\")&&!s.startsWith(\"yaxis\"))&&t[s]){var l=r[s].domain,u=t[s].domain,c=t[s]._inputDomain;t[s]._inputDomain&&(l[0]===c[0]&&l[1]===c[1]?r[s].domain=t[s].domain:(l[0]!==u[0]||l[1]!==u[1])&&(r[s]._inputDomain=null))}var f={getValObject:o,flags:a,immutable:n,transition:i,gd:e};return qP(t,r,[],f),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?\"all\":\"some\"),a}function qP(e,t,r,n){var i,a,o,s=n.getValObject,l=n.flags,u=n.immutable,c=n.inArray,f=n.arrayIndex;function h(){var V=i.editType;if(c&&V.indexOf(\"arraydraw\")!==-1){xa.pushUnique(l.arrays[c],f);return}v_.update(l,i),V!==\"none\"&&l.nChanges++,n.transition&&i.anim&&l.nChangesAnim++,($he.test(o)||Qhe.test(o))&&(l.rangesAltered[r[0]]=1),a===\"datarevision\"&&(l.newDataRevision=1)}function d(V){return V.valType===\"data_array\"||V.arrayOk}for(a in e){if(l.calc&&!n.transition)return;var v=e[a],x=t[a],b=r.concat(a);if(o=b.join(\".\"),!(a.charAt(0)===\"_\"||typeof v==\"function\"||v===x)){if((a===\"tick0\"||a===\"dtick\")&&r[0]!==\"geo\"){var p=t.tickmode;if(p===\"auto\"||p===\"array\"||!p)continue}if(!(a===\"range\"&&t.autorange)&&!((a===\"zmin\"||a===\"zmax\")&&t.type===\"contourcarpet\")&&(i=s(b),!!i&&!(i._compareAsJSON&&JSON.stringify(v)===JSON.stringify(x)))){var C=i.valType,E,A=d(i),L=Array.isArray(v),_=Array.isArray(x);if(L&&_){var k=\"_input_\"+a,M=e[k],g=t[k];if(Array.isArray(M)&&M===g)continue}if(x===void 0)A&&L?l.calc=!0:h();else if(i._isLinkedToArray){var P=[],T=!1;c||(l.arrays[a]=P);var z=Math.min(v.length,x.length),O=Math.max(v.length,x.length);if(z!==O)if(i.editType===\"arraydraw\")T=!0;else{h();continue}for(E=0;E<z;E++)qP(v[E],x[E],b.concat(E),xa.extendFlat({inArray:a,arrayIndex:E},n));if(T)for(E=z;E<O;E++)P.push(E)}else!C&&xa.isPlainObject(v)?qP(v,x,b,n):A?L&&_?(u&&(l.calc=!0),(u||n.newDataRevision)&&h()):L!==_?l.calc=!0:h():L&&_?(v.length!==x.length||String(v)!==String(x))&&h():h()}}}for(a in t)if(!(a in e||a.charAt(0)===\"_\"||typeof t[a]==\"function\"))if(i=s(r.concat(a)),d(i)&&Array.isArray(t[a])){l.calc=!0;return}else h()}function XN(e,t){var r;for(r in e)if(r.charAt(0)!==\"_\"){var n=e[r],i=t[r];if(n!==i)if(xa.isPlainObject(n)&&xa.isPlainObject(i)){if(XN(n,i))return!0}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a])if(xa.isPlainObject(n[a])&&xa.isPlainObject(i[a])){if(XN(n[a],i[a]))return!0}else return!0}else return!0}}function bdt(e,t,r){if(e=xa.getGraphDiv(e),!xa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e+\". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/\");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]),r=es.supplyAnimationDefaults(r);var i=r.transition,a=r.frame;n._frameWaitingCnt===void 0&&(n._frameWaitingCnt=0);function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit(\"plotly_animationinterrupted\",[])}}function h(z){if(z.length!==0){for(var O=0;O<z.length;O++){var V;z[O].type===\"byname\"?V=es.computeFrame(e,z[O].name):V=z[O].data;var G=s(O),Z=o(O);Z.duration=Math.min(Z.duration,G.duration);var H={frame:V,name:z[O].name,frameOpts:G,transitionOpts:Z};O===z.length-1&&(H.onComplete=l(u,2),H.onInterrupt=c),n._frameQueue.push(H)}r.mode===\"immediate\"&&(n._lastFrameAt=-1/0),n._animationRaf||x()}}function d(){e.emit(\"plotly_animated\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function v(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var z=n._currentFrame=n._frameQueue.shift();if(z){var O=z.name?z.name.toString():null;e._fullLayout._currentFrame=O,n._lastFrameAt=Date.now(),n._timeToNext=z.frameOpts.duration,es.transition(e,z.frame.data,z.frame.layout,Ih.coerceTraceIndices(e,z.frame.traces),z.frameOpts,z.transitionOpts).then(function(){z.onComplete&&z.onComplete()}),e.emit(\"plotly_animatingframe\",{name:O,frame:z.frame,animation:{frame:z.frameOpts,transition:z.transitionOpts}})}else d()}function x(){e.emit(\"plotly_animating\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var z=function(){n._animationRaf=window.requestAnimationFrame(z),Date.now()-n._lastFrameAt>n._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var C,E,A=[],L=t==null,_=Array.isArray(t),k=!L&&!_&&xa.isPlainObject(t);if(k)A.push({type:\"object\",data:p(xa.extendFlat({},t))});else if(L||[\"string\",\"number\"].indexOf(typeof t)!==-1)for(C=0;C<n._frames.length;C++)E=n._frames[C],E&&(L||String(E.group)===String(t))&&A.push({type:\"byname\",name:String(E.name),data:p({name:E.name})});else if(_)for(C=0;C<t.length;C++){var M=t[C];[\"number\",\"string\"].indexOf(typeof M)!==-1?(M=String(M),A.push({type:\"byname\",name:M,data:p({name:M})})):xa.isPlainObject(M)&&A.push({type:\"object\",data:p(xa.extendFlat({},M))})}for(C=0;C<A.length;C++)if(E=A[C],E.type===\"byname\"&&!n._frameHash[E.data.name]){xa.warn('animate failure: frame not found: \"'+E.data.name+'\"'),c();return}[\"next\",\"immediate\"].indexOf(r.mode)!==-1&&f(),r.direction===\"reverse\"&&A.reverse();var g=e._fullLayout._currentFrame;if(g&&r.fromcurrent){var P=-1;for(C=0;C<A.length;C++)if(E=A[C],E.type===\"byname\"&&E.name===g){P=C;break}if(P>0&&P<A.length-1){var T=[];for(C=0;C<A.length;C++)E=A[C],(A[C].type!==\"byname\"||C>P)&&T.push(E);A=T}}A.length>0?h(A):(e.emit(\"plotly_animated\"),u())})}function wdt(e,t,r){if(e=xa.getGraphDiv(e),t==null)return Promise.resolve();if(!xa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e+\". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/\");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error(\"addFrames failure: frameList must be an Array of frame definitions\"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(xa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,x=l[d]||f[d];d&&v&&typeof v==\"number\"&&x&&HN<zhe&&(HN++,xa.warn('addFrames: overwriting frame \"'+(l[d]||f[d]).name+'\" with a frame whose name of type \"number\" also equates to \"'+d+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),HN===zhe&&xa.warn(\"addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.\")),f[h]={name:h},c.push({frame:es.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(k,M){return k.index>M.index?-1:k.index<M.index?1:0});var b=[],p=[],C=s.length;for(n=c.length-1;n>=0;n--){if(i=c[n].frame,typeof i.name==\"number\"&&xa.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!i.name)for(;l[i.name=\"frame \"+e._transitionData._counter++];);if(l[i.name]){for(a=0;a<s.length&&(s[a]||{}).name!==i.name;a++);b.push({type:\"replace\",index:a,value:i}),p.unshift({type:\"replace\",index:a,value:s[a]})}else o=Math.max(0,Math.min(c[n].index,C)),b.push({type:\"insert\",index:o,value:i}),p.unshift({type:\"delete\",index:o}),C++}var E=es.modifyFrames,A=es.modifyFrames,L=[e,p],_=[e,b];return np&&np.add(e,E,L,A,_),es.modifyFrames(e,b)}function Tdt(e,t){if(e=xa.getGraphDiv(e),!xa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e);var r,n,i=e._transitionData._frames,a=[],o=[];if(!t)for(t=[],r=0;r<i.length;r++)t.push(r);for(t=t.slice(),t.sort(),r=t.length-1;r>=0;r--)n=t[r],a.push({type:\"delete\",index:n}),o.unshift({type:\"insert\",index:n,value:i[n]});var s=es.modifyFrames,l=es.modifyFrames,u=[e,o],c=[e,a];return np&&np.add(e,s,u,l,c),es.modifyFrames(e,a)}function Adt(e){e=xa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return es.cleanPlot([],{},r,t),es.purge(e),jN.purge(e),t._container&&t._container.remove(),delete e._context,e}function Sdt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!xa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=xa.inverseTransformMatrix(xa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function Mdt(e){var t=IP.select(e),r=e._fullLayout;if(r._calcInverseTransform=Sdt,r._calcInverseTransform(e),r._container=t.selectAll(\".plot-container\").data([0]),r._container.enter().insert(\"div\",\":first-child\").classed(\"plot-container\",!0).classed(\"plotly\",!0).style({width:\"100%\",height:\"100%\"}),r._paperdiv=r._container.selectAll(\".svg-container\").data([0]),r._paperdiv.enter().append(\"div\").classed(\"user-select-none\",!0).classed(\"svg-container\",!0).style(\"position\",\"relative\"),r._glcontainer=r._paperdiv.selectAll(\".gl-container\").data([{}]),r._glcontainer.enter().append(\"div\").classed(\"gl-container\",!0),r._paperdiv.selectAll(\".main-svg\").remove(),r._paperdiv.select(\".modebar-container\").remove(),r._paper=r._paperdiv.insert(\"svg\",\":first-child\").classed(\"main-svg\",!0),r._toppaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),r._modebardiv=r._paperdiv.append(\"div\"),delete r._modeBar,r._hoverpaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),!r._uid){var n={};IP.selectAll(\"defs\").each(function(){this.id&&(n[this.id.split(\"-\")[1]]=1)}),r._uid=xa.randstr(n)}r._paperdiv.selectAll(\".main-svg\").attr(edt.svgAttrs),r._defs=r._paper.append(\"defs\").attr(\"id\",\"defs-\"+r._uid),r._clips=r._defs.append(\"g\").classed(\"clips\",!0),r._topdefs=r._toppaper.append(\"defs\").attr(\"id\",\"topdefs-\"+r._uid),r._topclips=r._topdefs.append(\"g\").classed(\"clips\",!0),r._bgLayer=r._paper.append(\"g\").classed(\"bglayer\",!0),r._draggers=r._paper.append(\"g\").classed(\"draglayer\",!0);var i=r._paper.append(\"g\").classed(\"layer-below\",!0);r._imageLowerLayer=i.append(\"g\").classed(\"imagelayer\",!0),r._shapeLowerLayer=i.append(\"g\").classed(\"shapelayer\",!0),r._cartesianlayer=r._paper.append(\"g\").classed(\"cartesianlayer\",!0),r._polarlayer=r._paper.append(\"g\").classed(\"polarlayer\",!0),r._smithlayer=r._paper.append(\"g\").classed(\"smithlayer\",!0),r._ternarylayer=r._paper.append(\"g\").classed(\"ternarylayer\",!0),r._geolayer=r._paper.append(\"g\").classed(\"geolayer\",!0),r._funnelarealayer=r._paper.append(\"g\").classed(\"funnelarealayer\",!0),r._pielayer=r._paper.append(\"g\").classed(\"pielayer\",!0),r._iciclelayer=r._paper.append(\"g\").classed(\"iciclelayer\",!0),r._treemaplayer=r._paper.append(\"g\").classed(\"treemaplayer\",!0),r._sunburstlayer=r._paper.append(\"g\").classed(\"sunburstlayer\",!0),r._indicatorlayer=r._toppaper.append(\"g\").classed(\"indicatorlayer\",!0),r._glimages=r._paper.append(\"g\").classed(\"glimages\",!0);var a=r._toppaper.append(\"g\").classed(\"layer-above\",!0);r._imageUpperLayer=a.append(\"g\").classed(\"imagelayer\",!0),r._shapeUpperLayer=a.append(\"g\").classed(\"shapelayer\",!0),r._selectionLayer=r._toppaper.append(\"g\").classed(\"selectionlayer\",!0),r._infolayer=r._toppaper.append(\"g\").classed(\"infolayer\",!0),r._menulayer=r._toppaper.append(\"g\").classed(\"menulayer\",!0),r._zoomlayer=r._toppaper.append(\"g\").classed(\"zoomlayer\",!0),r._hoverlayer=r._hoverpaper.append(\"g\").classed(\"hoverlayer\",!0),r._modebardiv.classed(\"modebar-container\",!0).style(\"position\",\"absolute\").style(\"top\",\"0px\").style(\"right\",\"0px\"),e.emit(\"plotly_framework\")}xl.animate=bdt;xl.addFrames=wdt;xl.deleteFrames=Tdt;xl.addTraces=Zhe;xl.deleteTraces=Yhe;xl.extendTraces=Whe;xl.moveTraces=WN;xl.prependTraces=Xhe;xl.newPlot=sdt;xl._doPlot=idt;xl.purge=Adt;xl.react=ydt;xl.redraw=odt;xl.relayout=VM;xl.restyle=FP;xl.setPlotConfig=ndt;xl.update=OP;xl._guiRelayout=ZN(VM);xl._guiRestyle=ZN(FP);xl._guiUpdate=ZN(OP);xl._storeDirectGUIEdit=fdt});var Ly=ye(Mm=>{\"use strict\";var Edt=qa();Mm.getDelay=function(e){return e._has&&(e._has(\"gl3d\")||e._has(\"mapbox\")||e._has(\"map\"))?500:0};Mm.getRedrawFunc=function(e){return function(){Edt.getComponentMethod(\"colorbar\",\"draw\")(e)}};Mm.encodeSVG=function(e){return\"data:image/svg+xml,\"+encodeURIComponent(e)};Mm.encodeJSON=function(e){return\"data:application/json,\"+encodeURIComponent(e)};var rde=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return rde.createObjectURL(e)};Mm.revokeObjectURL=function(e){return rde.revokeObjectURL(e)};Mm.createBlob=function(e,t){if(t===\"svg\")return new window.Blob([e],{type:\"image/svg+xml;charset=utf-8\"});if(t===\"full-json\")return new window.Blob([e],{type:\"application/json;charset=utf-8\"});var r=Cdt(window.atob(e));return new window.Blob([r],{type:\"image/\"+t})};Mm.octetStream=function(e){document.location.href=\"data:application/octet-stream\"+e};function Cdt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}Mm.IMAGE_URL_PREFIX=/^data:image\\/\\w+;base64,/});var VP=ye((Par,ide)=>{\"use strict\";var KN=Oa(),kar=Dr(),kdt=So(),Ldt=Ca(),Lar=Wp(),YN=/\"/g,HM=\"TOBESTRIPPED\",Pdt=new RegExp('(\"'+HM+\")|(\"+HM+'\")',\"g\");function Idt(e){var t=KN.select(\"body\").append(\"div\").style({display:\"none\"}).html(\"\"),r=e.replace(/(&[^;]*;)/gi,function(n){return n===\"&lt;\"?\"&#60;\":n===\"&rt;\"?\"&#62;\":n.indexOf(\"<\")!==-1||n.indexOf(\">\")!==-1?\"\":t.html(n).text()});return t.remove(),r}function Rdt(e){return e.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&amp;\")}ide.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert(\"rect\",\":first-child\").call(kdt.setRect,0,0,s,l).call(Ldt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u<c.length;u++){var f=c[u];f.toSVG&&f.toSVG(t)}if(o){var h=o.node().childNodes,d=Array.prototype.slice.call(h);for(u=0;u<d.length;u++){var v=d[u];v.childNodes.length&&a.node().appendChild(v)}}i._draggers&&i._draggers.remove(),a.node().style.background=\"\",a.selectAll(\"text\").attr({\"data-unformatted\":null,\"data-math\":null}).each(function(){var b=KN.select(this);if(this.style.visibility===\"hidden\"||this.style.display===\"none\"){b.remove();return}else b.style({visibility:null,display:null});var p=this.style.fontFamily;p&&p.indexOf('\"')!==-1&&b.style(\"font-family\",p.replace(YN,HM));var C=this.style.fontWeight;C&&(C===\"normal\"||C===\"400\")&&b.style(\"font-weight\",void 0);var E=this.style.fontStyle;E&&E===\"normal\"&&b.style(\"font-style\",void 0);var A=this.style.fontVariant;A&&A===\"normal\"&&b.style(\"font-variant\",void 0)}),a.selectAll(\".gradient_filled,.pattern_filled\").each(function(){var b=KN.select(this),p=this.style.fill;p&&p.indexOf(\"url(\")!==-1&&b.style(\"fill\",p.replace(YN,HM));var C=this.style.stroke;C&&C.indexOf(\"url(\")!==-1&&b.style(\"stroke\",C.replace(YN,HM))}),(r===\"pdf\"||r===\"eps\")&&a.selectAll(\"#MathJax_SVG_glyphs path\").attr(\"stroke-width\",0),r===\"svg\"&&n&&(a.attr(\"width\",n*s),a.attr(\"height\",n*l),a.attr(\"viewBox\",\"0 0 \"+s+\" \"+l));var x=new window.XMLSerializer().serializeToString(a.node());return x=Idt(x),x=Rdt(x),x=x.replace(Pdt,\"'\"),x}});var GP=ye((Iar,nde)=>{\"use strict\";var Ddt=Dr(),Fdt=vb().EventEmitter,jM=Ly();function zdt(e){var t=e.emitter||new Fdt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||\"png\",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext(\"2d\",{willReadFrequently:!0}),x=new a,b,p;s===\"svg\"||Ddt.isSafari()?p=jM.encodeSVG(o):(b=jM.createBlob(o,\"svg\"),p=jM.createObjectURL(b)),l.width=h,l.height=d,x.onload=function(){var C;switch(b=null,jM.revokeObjectURL(p),s!==\"svg\"&&v.drawImage(x,0,0,h,d),s){case\"jpeg\":C=l.toDataURL(\"image/jpeg\");break;case\"png\":C=l.toDataURL(\"image/png\");break;case\"webp\":C=l.toDataURL(\"image/webp\");break;case\"svg\":C=p;break;default:var E=\"Image format is not jpeg, png, svg or webp.\";if(i(new Error(E)),!e.promise)return t.emit(\"error\",E)}n(C),e.promise||t.emit(\"success\",C)},x.onerror=function(C){if(b=null,jM.revokeObjectURL(p),i(C),!e.promise)return t.emit(\"error\",C)},x.src=p});return e.promise?r:t}nde.exports=zdt});var $N=ye((Rar,sde)=>{\"use strict\";var ade=Eo(),ode=UP(),Odt=Mc(),Em=Dr(),WM=Ly(),qdt=VP(),Bdt=GP(),Ndt=o6().version,JN={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}};function Udt(e,t){t=t||{};var r,n,i,a;Em.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Em.getGraphDiv(e),r=Em.extendDeep([],e.data),n=Em.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(_){return!(_ in t)||Em.validate(t[_],JN[_])}if(!o(\"width\")&&t.width!==null||!o(\"height\")&&t.height!==null)throw new Error(\"Height and width should be pixel values.\");if(!o(\"format\"))throw new Error(\"Export format is not \"+Em.join2(JN.format.values,\", \",\" or \")+\".\");var s={};function l(_,k){return Em.coerce(t,s,JN,_,k)}var u=l(\"format\"),c=l(\"width\"),f=l(\"height\"),h=l(\"scale\"),d=l(\"setBackground\"),v=l(\"imageDataOnly\"),x=document.createElement(\"div\");x.style.position=\"absolute\",x.style.left=\"-5000px\",document.body.appendChild(x);var b=Em.extendFlat({},n);c?b.width=c:t.width===null&&ade(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&ade(a.height)&&(b.height=a.height);var p=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),C=WM.getRedrawFunc(x);function E(){return new Promise(function(_){setTimeout(_,WM.getDelay(x._fullLayout))})}function A(){return new Promise(function(_,k){var M=qdt(x,u,h),g=x._fullLayout.width,P=x._fullLayout.height;function T(){ode.purge(x),document.body.removeChild(x)}if(u===\"full-json\"){var z=Odt.graphJson(x,!1,\"keepdata\",\"object\",!0,!0);return z.version=Ndt,z=JSON.stringify(z),T(),_(v?z:WM.encodeJSON(z))}if(T(),u===\"svg\")return _(v?M:WM.encodeSVG(M));var O=document.createElement(\"canvas\");O.id=Em.randstr(),Bdt({format:u,width:g,height:P,scale:h,canvas:O,svg:M,promise:!0}).then(_).catch(k)})}function L(_){return v?_.replace(WM.IMAGE_URL_PREFIX,\"\"):_}return new Promise(function(_,k){ode.newPlot(x,r,b,p).then(C).then(E).then(A).then(function(M){_(L(M))}).catch(function(M){k(M)})})}sde.exports=Udt});var cde=ye((Dar,ude)=>{\"use strict\";var P0=Dr(),Vdt=Mc(),Gdt=_3(),Hdt=ub().dfltConfig,Lg=P0.isPlainObject,Vb=Array.isArray,QN=P0.isArrayOrTypedArray;ude.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Gdt.get(),i=[],a={_context:P0.extendFlat({},Hdt)},o,s;Vb(t)?(a.data=P0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md(\"array\",\"data\"))),Lg(r)?(a.layout=P0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md(\"object\",\"layout\"))),Vdt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;c<u;c++){var f=o[c],h=[\"data\",c];if(!Lg(f)){i.push(md(\"object\",h));continue}var d=l[c],v=d.type,x=n.traces[v].attributes;x.type={valType:\"enumerated\",values:[v]},d.visible===!1&&f.visible!==!1&&i.push(md(\"invisible\",h)),HP(f,d,x,i,h)}var b=a._fullLayout,p=jdt(n,l);return HP(s,b,p,i,\"layout\"),i.length===0?void 0:i};function HP(e,t,r,n,i,a){a=a||[];for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s],u=a.slice();u.push(l);var c=e[l],f=t[l],h=Zdt(r,l),d=(h||{}).valType,v=d===\"info_array\",x=d===\"colorscale\",b=(h||{}).items;if(!Xdt(r,l))n.push(md(\"schema\",i,u));else if(Lg(c)&&Lg(f)&&d!==\"any\")HP(c,f,h,n,i,u);else if(v&&Vb(c)){c.length>f.length&&n.push(md(\"unused\",i,u.concat(f.length)));var p=f.length,C=Array.isArray(b);C&&(p=Math.min(p,b.length));var E,A,L,_,k;if(h.dimensions===2)for(A=0;A<p;A++)if(Vb(c[A])){c[A].length>f[A].length&&n.push(md(\"unused\",i,u.concat(A,f[A].length)));var M=f[A].length;for(E=0;E<(C?Math.min(M,b[A].length):M);E++)L=C?b[A][E]:b,_=c[A][E],k=f[A][E],P0.validate(_,L)?k!==_&&k!==+_&&n.push(md(\"dynamic\",i,u.concat(A,E),_,k)):n.push(md(\"value\",i,u.concat(A,E),_))}else n.push(md(\"array\",i,u.concat(A),c[A]));else for(A=0;A<p;A++)L=C?b[A]:b,_=c[A],k=f[A],P0.validate(_,L)?k!==_&&k!==+_&&n.push(md(\"dynamic\",i,u.concat(A),_,k)):n.push(md(\"value\",i,u.concat(A),_))}else if(h.items&&!v&&Vb(c)){var g=b[Object.keys(b)[0]],P=[],T,z;for(T=0;T<f.length;T++){var O=f[T]._index||T;if(z=u.slice(),z.push(O),Lg(c[O])&&Lg(f[T])){P.push(O);var V=c[O],G=f[T];Lg(V)&&V.visible!==!1&&G.visible===!1?n.push(md(\"invisible\",i,z)):HP(V,G,g,n,i,z)}}for(T=0;T<c.length;T++)z=u.slice(),z.push(T),Lg(c[T])?P.indexOf(T)===-1&&n.push(md(\"unused\",i,z)):n.push(md(\"object\",i,z,c[T]))}else!Lg(c)&&Lg(f)?n.push(md(\"object\",i,u,c)):!QN(c)&&QN(f)&&!v&&!x?n.push(md(\"array\",i,u,c)):l in t?P0.validate(c,h)?h.valType===\"enumerated\"&&(h.coerceNumber&&c!==+f||!QN(c)&&c!==f||String(c)!==String(f))&&n.push(md(\"dynamic\",i,u,c,f)):n.push(md(\"value\",i,u,c)):n.push(md(\"unused\",i,u,c))}return n}function jdt(e,t){for(var r=e.layout.layoutAttributes,n=0;n<t.length;n++){var i=t[n],a=e.traces[i.type],o=a.layoutAttributes;o&&(i.subplot?P0.extendFlat(r[a.attributes.subplot.dflt],o):P0.extendFlat(r,o))}return r}var Wdt={object:function(e,t){var r;return e===\"layout\"&&t===\"\"?r=\"The layout argument\":e[0]===\"data\"&&t===\"\"?r=\"Trace \"+e[1]+\" in the data argument\":r=Ub(e)+\"key \"+t,r+\" must be linked to an object container\"},array:function(e,t){var r;return e===\"data\"?r=\"The data argument\":r=Ub(e)+\"key \"+t,r+\" must be linked to an array container\"},schema:function(e,t){return Ub(e)+\"key \"+t+\" is not part of the schema\"},unused:function(e,t,r){var n=Lg(r)?\"container\":\"key\";return Ub(e)+n+\" \"+t+\" did not get coerced\"},dynamic:function(e,t,r,n){return[Ub(e)+\"key\",t,\"(set to '\"+r+\"')\",\"got reset to\",\"'\"+n+\"'\",\"during defaults.\"].join(\" \")},invisible:function(e,t){return(t?Ub(e)+\"item \"+t:\"Trace \"+e[1])+\" got defaulted to be not visible\"},value:function(e,t,r){return[Ub(e)+\"key \"+t,\"is set to an invalid value (\"+r+\")\"].join(\" \")}};function Ub(e){return Vb(e)?\"In data trace \"+e[1]+\", \":\"In \"+e+\", \"}function md(e,t,r,n,i){r=r||\"\";var a,o;Vb(t)?(a=t[0],o=t[1]):(a=t,o=null);var s=Kdt(r),l=Wdt[e](t,s,n,i);return P0.log(l),{code:e,container:a,trace:o,path:r,astr:s,msg:l}}function Xdt(e,t){var r=lde(t),n=r.keyMinusId,i=r.id;return n in e&&e[n]._isSubplotObj&&i?!0:t in e}function Zdt(e,t){if(t in e)return e[t];var r=lde(t);return e[r.keyMinusId]}var Ydt=P0.counterRegex(\"([a-z]+)\");function lde(e){var t=e.match(Ydt);return{keyMinusId:t&&t[1],id:t&&t[2]}}function Kdt(e){if(!Vb(e))return String(e);for(var t=\"\",r=0;r<e.length;r++){var n=e[r];typeof n==\"number\"?t=t.substr(0,t.length-1)+\"[\"+n+\"]\":t+=n,r<e.length-1&&(t+=\".\")}return t}});var hde=ye((Far,fde)=>{\"use strict\";var Jdt=Dr(),jP=Ly();function $dt(e,t,r){var n=document.createElement(\"a\"),i=\"download\"in n,a=new Promise(function(o,s){var l,u;if(i)return l=jP.createBlob(e,r),u=jP.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),jP.revokeObjectURL(u),l=null,o(t);if(Jdt.isSafari()){var c=r===\"svg\"?\",\":\";base64,\";return jP.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error(\"download error\"))});return a}fde.exports=$dt});var eU=ye((Oar,vde)=>{\"use strict\";var dde=Dr(),Qdt=$N(),evt=hde(),zar=Ly();function tvt(e,t){var r;return dde.isPlainObject(e)||(r=dde.getGraphDiv(e)),t=t||{},t.format=t.format||\"png\",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error(\"Snapshotting already in progress.\")),r&&(r._snapshotInProgress=!0);var a=Qdt(e,t),o=t.filename||e.fn||\"newplot\";o+=\".\"+t.format.replace(\"-\",\".\"),a.then(function(s){return r&&(r._snapshotInProgress=!1),evt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}vde.exports=tvt});var _de=ye(tU=>{\"use strict\";var Cp=Dr(),kp=Cp.isPlainObject,pde=_3(),gde=Mc(),rvt=Gl(),mde=pl(),yde=ub().dfltConfig;tU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:yde},{data:e.data,layout:e.layout}),gde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};XM(d,v,nvt.bind(null,d));var x=Cp.coerce(d,{},rvt,\"type\"),b=n.data[x];b||(b=n.data[x]=[]),b.push(v)}),XM(r,n.layout,ivt.bind(null,r)),delete n.layout.template;var i=r.template;if(kp(i)){var a=i.layout,o,s,l,u,c,f;kp(a)&&WP(a,n.layout);var h=i.data;if(kp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;o<f;o++)WP(l[o%u],c[o]);for(o=f;o<u;o++)c.push(Cp.extendDeep({},l[o]))}for(s in h)s in n.data||(n.data[s]=Cp.extendDeep([],h[s]))}}return n};function WP(e,t){e=Cp.extendDeep({},e);var r=Object.keys(e).sort(),n,i;function a(c,f,h){if(kp(f)&&kp(c))WP(c,f);else if(Array.isArray(f)&&Array.isArray(c)){var d=mde.arrayTemplater({_template:e},h);for(i=0;i<f.length;i++){var v=f[i],x=d.newItem(v)._template;x&&WP(x,v)}var b=d.defaultItems();for(i=0;i<b.length;i++)f.push(b[i]._template);for(i=0;i<f.length;i++)delete f[i].templateitemname}}for(n=0;n<r.length;n++){var o=r[n],s=e[o];if(o in t?a(s,t[o],o):t[o]=s,XP(o)===o)for(var l in t){var u=XP(l);l!==u&&u===o&&!(l in e)&&a(s,t[l],o)}}}function XP(e){return e.replace(/[0-9]+$/,\"\")}function XM(e,t,r,n,i){var a=i&&r(i);for(var o in e){var s=e[o],l=I0(e,o,n),u=I0(e,o,i),c=r(u);if(!c){var f=XP(o);f!==o&&(u=I0(e,f,i),c=r(u))}if(!(a&&a===c)&&!(!c||c._noTemplating||c.valType===\"data_array\"||c.arrayOk&&Array.isArray(s)))if(!c.valType&&kp(s))XM(s,t,r,l,u);else if(c._isLinkedToArray&&Array.isArray(s))for(var h=!1,d=0,v={},x=0;x<s.length;x++){var b=s[x];if(kp(b)){var p=b.name;if(p)v[p]||(XM(b,t,r,I0(s,d,l),I0(s,d,u)),d++,v[p]=1);else if(!h){var C=mde.arrayDefaultKey(o),E=I0(e,C,n),A=I0(s,d,l);XM(b,t,r,A,I0(s,d,u));var L=Cp.nestedProperty(t,A),_=Cp.nestedProperty(t,E);_.set(L.get()),L.set(null),h=!0}}}else{var k=Cp.nestedProperty(t,l);k.set(s)}}}function ivt(e,t){return pde.getLayoutValObject(e,Cp.nestedProperty({},t).parts)}function nvt(e,t){return pde.getTraceValObject(e,Cp.nestedProperty({},t).parts)}function I0(e,t,r){var n;return r?Array.isArray(e)?n=r+\"[\"+t+\"]\":n=r+\".\"+t:n=t,n}tU.validateTemplate=function(e,t){var r=Cp.extendDeep({},{_context:yde,data:e.data,layout:e.layout}),n=r.layout||{};kp(t)||(t=n.template||{});var i=t.layout,a=t.data,o=[];r.layout=n,r.layout.template=t,gde.supplyDefaults(r);var s=r._fullLayout,l=r._fullData,u={};function c(E,A){for(var L in E)if(L.charAt(0)!==\"_\"&&kp(E[L])){var _=XP(L),k=[],M;for(M=0;M<A.length;M++)k.push(I0(E,L,A[M])),_!==L&&k.push(I0(E,_,A[M]));for(M=0;M<k.length;M++)u[k[M]]=1;c(E[L],k)}}function f(E,A){for(var L in E)if(L.indexOf(\"defaults\")===-1&&kp(E[L])){var _=I0(E,L,A);u[_]?f(E[L],_):o.push({code:\"unused\",path:_})}}if(kp(i)?(c(s,[\"layout\"]),f(i,\"layout\")):o.push({code:\"layout\"}),!kp(a))o.push({code:\"data\"});else{for(var h={},d,v=0;v<l.length;v++){var x=l[v];d=x.type,h[d]=(h[d]||0)+1,x._fullInput._template||o.push({code:\"missing\",index:x.index,traceType:d})}for(d in a){var b=a[d].length,p=h[d]||0;b>p?o.push({code:\"unused\",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:\"reused\",traceType:d,templateCount:b,dataCount:p})}}function C(E,A){for(var L in E)if(L.charAt(0)!==\"_\"){var _=E[L],k=I0(E,L,A);kp(_)?(Array.isArray(E)&&_._template===!1&&_.templateitemname&&o.push({code:\"missing\",path:k,templateitemname:_.templateitemname}),C(_,k)):Array.isArray(_)&&avt(_)&&C(_,k)}}if(C({data:l,layout:s},\"\"),o.length)return o.map(ovt)};function avt(e){for(var t=0;t<e.length;t++)if(kp(e[t]))return!0}function ovt(e){var t;switch(e.code){case\"data\":t=\"The template has no key data.\";break;case\"layout\":t=\"The template has no key layout.\";break;case\"missing\":e.path?t=\"There are no templates for item \"+e.path+\" with name \"+e.templateitemname:t=\"There are no templates for trace \"+e.index+\", of type \"+e.traceType+\".\";break;case\"unused\":e.path?t=\"The template item at \"+e.path+\" was not used in constructing the plot.\":e.dataCount?t=\"Some of the templates of type \"+e.traceType+\" were not used. The template has \"+e.templateCount+\" traces, the data only has \"+e.dataCount+\" of this type.\":t=\"The template has \"+e.templateCount+\" traces of type \"+e.traceType+\" but there are none in the data.\";break;case\"reused\":t=\"Some of the templates of type \"+e.traceType+\" were used more than once. The template has \"+e.templateCount+\" traces, the data has \"+e.dataCount+\" of this type.\";break}return e.msg=t,e}});var bde=ye(ef=>{\"use strict\";var Qh=UP();ef._doPlot=Qh._doPlot;ef.newPlot=Qh.newPlot;ef.restyle=Qh.restyle;ef.relayout=Qh.relayout;ef.redraw=Qh.redraw;ef.update=Qh.update;ef._guiRestyle=Qh._guiRestyle;ef._guiRelayout=Qh._guiRelayout;ef._guiUpdate=Qh._guiUpdate;ef._storeDirectGUIEdit=Qh._storeDirectGUIEdit;ef.react=Qh.react;ef.extendTraces=Qh.extendTraces;ef.prependTraces=Qh.prependTraces;ef.addTraces=Qh.addTraces;ef.deleteTraces=Qh.deleteTraces;ef.moveTraces=Qh.moveTraces;ef.purge=Qh.purge;ef.addFrames=Qh.addFrames;ef.deleteFrames=Qh.deleteFrames;ef.animate=Qh.animate;ef.setPlotConfig=Qh.setPlotConfig;var svt=OS().getGraphDiv,lvt=aP().eraseActiveShape;ef.deleteActiveShape=function(e){return lvt(svt(e))};ef.toImage=$N();ef.validate=cde();ef.downloadImage=eU();var xde=_de();ef.makeTemplate=xde.makeTemplate;ef.validateTemplate=xde.validateTemplate});var K3=ye((Nar,wde)=>{\"use strict\";var rU=Dr(),uvt=qa();wde.exports=function(t,r,n,i){var a=i(\"x\"),o=i(\"y\"),s,l=uvt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");if(l(t,r,[\"x\",\"y\"],n),a){var u=rU.minRowLength(a);o?s=Math.min(u,rU.minRowLength(o)):(s=u,i(\"y0\"),i(\"dy\"))}else{if(!o)return 0;s=rU.minRowLength(o),i(\"x0\"),i(\"dx\")}return r._length=s,s}});var Pg=ye((Uar,Sde)=>{\"use strict\";var Tde=Dr().dateTick0,cvt=hs(),fvt=cvt.ONEWEEK;function Ade(e,t){return e%fvt===0?Tde(t,1):Tde(t,0)}Sde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i(\"xperiod\");o&&(i(\"xperiod0\",Ade(o,r.xcalendar)),i(\"xperiodalignment\"))}if(a.y){var s=i(\"yperiod\");s&&(i(\"yperiod0\",Ade(s,r.ycalendar)),i(\"yperiodalignment\"))}}});var Cde=ye((Var,Ede)=>{\"use strict\";var Mde=[\"orientation\",\"groupnorm\",\"stackgaps\"];Ede.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i(\"stackgroup\");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?\"h\":\"v\"},h=0;h<Mde.length;h++){var d=Mde[h],v=d+\"Found\";if(!u[v]){var x=t[d]!==void 0,b=d===\"orientation\";if((x||c)&&(u[d]=i(d,f[d]),b&&(u.fillDflt=u[d]===\"h\"?\"tonextx\":\"tonexty\"),x&&(u[v]=!0,!c&&(delete u.traces[0][d],b))))for(var p=0;p<u.traces.length-1;p++){var C=u.traces[p];C._input.fill!==C.fill&&(C.fill=u.fillDflt)}}}return u}}});var $p=ye((Gar,Ide)=>{\"use strict\";var kde=Ca(),Lde=pv().hasColorscale,Pde=Jh(),hvt=Ru();Ide.exports=function(t,r,n,i,a,o){var s=hvt.isBubble(t),l=(t.line||{}).color,u;if(o=o||{},l&&(n=l),a(\"marker.symbol\"),a(\"marker.opacity\",s?.7:1),a(\"marker.size\"),o.noAngle||(a(\"marker.angle\"),o.noAngleRef||a(\"marker.angleref\"),o.noStandOff||a(\"marker.standoff\")),a(\"marker.color\",n),Lde(t,\"marker\")&&Pde(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),o.noSelect||(a(\"selected.marker.color\"),a(\"unselected.marker.color\"),a(\"selected.marker.size\"),a(\"unselected.marker.size\")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=kde.background:u=kde.defaultLine,a(\"marker.line.color\",u),Lde(t,\"marker.line\")&&Pde(t,r,i,a,{prefix:\"marker.line.\",cLetter:\"c\"}),a(\"marker.line.width\",s?1:0)),s&&(a(\"marker.sizeref\"),a(\"marker.sizemin\"),a(\"marker.sizemode\")),o.gradient){var c=a(\"marker.gradient.type\");c!==\"none\"&&a(\"marker.gradient.color\")}}});var R0=ye((Har,Rde)=>{\"use strict\";var dvt=Dr().isArrayOrTypedArray,vvt=pv().hasColorscale,pvt=Jh();Rde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a(\"line.color\",n),vvt(t,\"line\"))pvt(t,r,i,a,{prefix:\"line.\",cLetter:\"c\"});else{var l=(dvt(s)?!1:s)||n;a(\"line.color\",l)}a(\"line.width\"),o.noDash||a(\"line.dash\"),o.backoff&&a(\"line.backoff\")}});var J3=ye((jar,Dde)=>{\"use strict\";Dde.exports=function(t,r,n){var i=n(\"line.shape\");i===\"spline\"&&n(\"line.smoothing\")}});var D0=ye((War,Fde)=>{\"use strict\";var gvt=Dr();Fde.exports=function(e,t,r,n,i){i=i||{},n(\"textposition\"),gvt.coerceFont(n,\"textfont\",i.font||r.font,i),i.noSelect||(n(\"selected.textfont.color\"),n(\"unselected.textfont.color\"))}});var Ig=ye((Xar,Ode)=>{\"use strict\";var ZP=Ca(),zde=Dr().isArrayOrTypedArray;function mvt(e){for(var t=ZP.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var n=ZP.interpolate(e[r-1][1],e[r][1],.5);t=ZP.interpolate(t,n,e[r-1][0]/e[r][0])}return t}Ode.exports=function(t,r,n,i,a){a||(a={});var o=!1;if(r.marker){var s=r.marker.color,l=(r.marker.line||{}).color;s&&!zde(s)?o=s:l&&!zde(l)&&(o=l)}var u;if(a.moduleHasFillgradient){var c=i(\"fillgradient.type\");if(c!==\"none\"){i(\"fillgradient.start\"),i(\"fillgradient.stop\");var f=i(\"fillgradient.colorscale\");f&&(u=mvt(f))}}i(\"fillcolor\",ZP.addOpacity((r.line||{}).color||o||u||n,.5))}});var Ude=ye((Zar,Nde)=>{\"use strict\";var qde=Dr(),yvt=qa(),_vt=pf(),xvt=Sm(),$3=Ru(),bvt=K3(),wvt=Pg(),Tvt=Cde(),Avt=$p(),Svt=R0(),Bde=J3(),Mvt=D0(),Evt=Ig(),Cvt=Dr().coercePattern;Nde.exports=function(t,r,n,i){function a(d,v){return qde.coerce(t,r,_vt,d,v)}var o=bvt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){wvt(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zorder\");var s=Tvt(t,r,i,a);i.scattermode===\"group\"&&r.orientation===void 0&&a(\"orientation\",\"v\");var l=!s&&o<xvt.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"text\"),a(\"hovertext\"),a(\"mode\",l),$3.hasMarkers(r)&&Avt(t,r,n,i,a,{gradient:!0}),$3.hasLines(r)&&(Svt(t,r,n,i,a,{backoff:!0}),Bde(t,r,a),a(\"connectgaps\"),a(\"line.simplify\")),$3.hasText(r)&&(a(\"texttemplate\"),Mvt(t,r,i,a));var u=[];($3.hasMarkers(r)||$3.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),u.push(\"points\")),a(\"fill\",s?s.fillDflt:\"none\"),r.fill!==\"none\"&&(Evt(t,r,n,a,{moduleHasFillgradient:!0}),$3.hasLines(r)||Bde(t,r,a),Cvt(a,\"fillpattern\",r.fillcolor,!1));var c=(r.line||{}).color,f=(r.marker||{}).color;(r.fill===\"tonext\"||r.fill===\"toself\")&&u.push(\"fills\"),a(\"hoveron\",u.join(\"+\")||\"points\"),r.hoveron!==\"fills\"&&a(\"hovertemplate\");var h=yvt.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,c||f||n,{axis:\"y\"}),h(t,r,c||f||n,{axis:\"x\",inherit:\"y\"}),qde.coerceSelectionMarkerOpacity(r,a)}}});var Gb=ye((Yar,Vde)=>{\"use strict\";var kvt=Bb().getAxisGroup;Vde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:\"x\",h:\"y\"}[o]+\"axis\"],l=kvt(n,s)+o,u=n._alignmentOpts||{},c=i(\"alignmentgroup\"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i(\"offsetgroup\")||\"\",v=h.offsetGroups,x=v[d];r._offsetIndex=0,(a!==\"group\"||d)&&(x||(x=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=x.offsetIndex)}});var iU=ye((Kar,Gde)=>{\"use strict\";var Lvt=Dr(),Pvt=Gb(),Ivt=pf();Gde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return Lvt.coerce(i._input,i,Ivt,h)}if(r.scattermode===\"group\")for(a=0;a<t.length;a++)i=t[a],i.type===\"scatter\"&&(n=i._input,Pvt(n,i,r,s,o));for(a=0;a<t.length;a++){var l=t[a];if(l.type===\"scatter\"){var u=l.fill;if(!(u===\"none\"||u===\"toself\")&&(l.opacity=void 0,u===\"tonexty\"||u===\"tonextx\"))for(var c=a-1;c>=0;c--){var f=t[c];if(f.type===\"scatter\"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var jde=ye((Jar,Hde)=>{\"use strict\";var Rvt=Dr(),Dvt=j6();Hde.exports=function(e,t){function r(i,a){return Rvt.coerce(e,t,Dvt,i,a)}var n=t.barmode===\"group\";t.scattermode===\"group\"&&r(\"scattergap\",n?t.bargap:.2)}});var Rg=ye(($ar,Xde)=>{\"use strict\";var Fvt=Eo(),Wde=Dr(),zvt=Wde.dateTime2ms,YP=Wde.incrementMonth,Ovt=hs(),qvt=Ovt.ONEAVGMONTH;Xde.exports=function(t,r,n,i){if(r.type!==\"date\")return{vals:i};var a=t[n+\"periodalignment\"];if(!a)return{vals:i};var o=t[n+\"period\"],s;if(Fvt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o==\"string\"&&o.charAt(0)===\"M\"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a===\"start\",f=a===\"end\",h=t[n+\"period0\"],d=zvt(h,u)||0,v=[],x=[],b=[],p=i.length,C=0;C<p;C++){var E=i[C],A,L,_;if(s){for(A=Math.round((E-d)/(s*qvt)),_=YP(d,s*A,u);_>E;)_=YP(_,-s,u);for(;_<=E;)_=YP(_,s,u);L=YP(_,-s,u)}else{for(A=Math.round((E-d)/o),_=d+A*o;_>E;)_-=o;for(;_<=E;)_+=o;L=_-o}v[C]=c?L:f?_:(L+_)/2,x[C]=L,b[C]=_}return{vals:v,starts:x,ends:b}}});var F0=ye((Qar,Yde)=>{\"use strict\";var nU=pv().hasColorscale,aU=gv(),Zde=Ru();Yde.exports=function(t,r){Zde.hasLines(r)&&nU(r,\"line\")&&aU(t,r,{vals:r.line.color,containerStr:\"line\",cLetter:\"c\"}),Zde.hasMarkers(r)&&(nU(r,\"marker\")&&aU(t,r,{vals:r.marker.color,containerStr:\"marker\",cLetter:\"c\"}),nU(r,\"marker.line\")&&aU(t,r,{vals:r.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}))}});var Cm=ye((eor,Kde)=>{\"use strict\";var Yf=Dr();Kde.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;Yf.mergeArray(r.text,t,\"tx\"),Yf.mergeArray(r.texttemplate,t,\"txt\"),Yf.mergeArray(r.hovertext,t,\"htx\"),Yf.mergeArray(r.customdata,t,\"data\"),Yf.mergeArray(r.textposition,t,\"tp\"),r.textfont&&(Yf.mergeArrayCastPositive(r.textfont.size,t,\"ts\"),Yf.mergeArray(r.textfont.color,t,\"tc\"),Yf.mergeArray(r.textfont.family,t,\"tf\"),Yf.mergeArray(r.textfont.weight,t,\"tw\"),Yf.mergeArray(r.textfont.style,t,\"ty\"),Yf.mergeArray(r.textfont.variant,t,\"tv\"),Yf.mergeArray(r.textfont.textcase,t,\"tC\"),Yf.mergeArray(r.textfont.lineposition,t,\"tE\"),Yf.mergeArray(r.textfont.shadow,t,\"tS\"));var i=r.marker;if(i){Yf.mergeArrayCastPositive(i.size,t,\"ms\"),Yf.mergeArrayCastPositive(i.opacity,t,\"mo\"),Yf.mergeArray(i.symbol,t,\"mx\"),Yf.mergeArray(i.angle,t,\"ma\"),Yf.mergeArray(i.standoff,t,\"mf\"),Yf.mergeArray(i.color,t,\"mc\");var a=i.line;i.line&&(Yf.mergeArray(a.color,t,\"mlc\"),Yf.mergeArrayCastPositive(a.width,t,\"mlw\"));var o=i.gradient;o&&o.type!==\"none\"&&(Yf.mergeArray(o.type,t,\"mgt\"),Yf.mergeArray(o.color,t,\"mgc\"))}}});var z0=ye((tor,$de)=>{\"use strict\";var Jde=Dr();$de.exports=function(t,r){Jde.isArrayOrTypedArray(r.selectedpoints)&&Jde.tagSelected(t,r)}});var O0=ye((ror,ave)=>{\"use strict\";var Qde=Eo(),sU=Dr(),ZM=ho(),eve=Rg(),oU=hs().BADNUM,lU=Ru(),Bvt=F0(),Nvt=Cm(),Uvt=z0();function Vvt(e,t){var r=e._fullLayout,n=t._xA=ZM.getFromId(e,t.xaxis||\"x\",\"x\"),i=t._yA=ZM.getFromId(e,t.yaxis||\"y\",\"y\"),a=n.makeCalcdata(t,\"x\"),o=i.makeCalcdata(t,\"y\"),s=eve(t,n,\"x\",a),l=eve(t,i,\"y\",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=uU(t,r,n,i),x=!1,b,p,C,E,A,L;ive(r,t);var _=\"x\",k=\"y\",M;if(v)sU.pushUnique(v.traceIndices,t.index),b=v.orientation===\"v\",b?(k=\"s\",M=\"x\"):(_=\"s\",M=\"y\"),A=v.stackgaps===\"interpolate\";else{var g=rve(t,f);tve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,T=!!t.yperiodalignment;for(p=0;p<f;p++){var z=h[p]={},O=Qde(u[p]),V=Qde(c[p]);O&&V?(z[_]=u[p],z[k]=c[p],P&&(z.orig_x=a[p],z.xEnd=s.ends[p],z.xStart=s.starts[p]),T&&(z.orig_y=o[p],z.yEnd=l.ends[p],z.yStart=l.starts[p])):v&&(b?O:V)?(z[M]=b?u[p]:c[p],z.gap=!0,A?(z.s=oU,x=!0):z.s=0):z[_]=z[k]=oU,d&&(z.id=String(d[p]))}if(Nvt(h,t),Bvt(e,t),Uvt(h,t),v){for(p=0;p<h.length;)h[p][M]===oU?h.splice(p,1):p++;if(sU.sort(h,function(N,j){return N[M]-j[M]||N.i-j.i}),x){for(p=0;p<h.length-1&&h[p].gap;)p++;for(L=h[p].s,L||(L=h[p].s=0),C=0;C<p;C++)h[C].s=L;for(E=h.length-1;E>p&&h[E].gap;)E--;for(L=h[E].s,C=h.length-1;C>E;C--)h[C].s=L;for(;p<E;)if(p++,h[p].gap){for(C=p+1;h[C].gap;)C++;for(var G=h[p-1][M],Z=h[p-1].s,H=(h[C].s-Z)/(h[C][M]-G);p<C;)h[p].s=Z+(h[p][M]-G)*H,p++}}}return h}function tve(e,t,r,n,i,a,o){var s=t._length,l=e._fullLayout,u=r._id,c=n._id,f=l._firstScatter[nve(t)]===t.uid,h=(uU(t,l,r,n)||{}).orientation,d=t.fill;r._minDtick=0,n._minDtick=0;var v={padded:!0},x={padded:!0};o&&(v.ppad=x.ppad=o);var b=s<2||i[0]!==i[s-1]||a[0]!==a[s-1];b&&(d===\"tozerox\"||d===\"tonextx\"&&(f||h===\"h\"))?v.tozero=!0:!(t.error_y||{}).visible&&(d===\"tonexty\"||d===\"tozeroy\"||!lU.hasMarkers(t)&&!lU.hasText(t))&&(v.padded=!1,v.ppad=0),b&&(d===\"tozeroy\"||d===\"tonexty\"&&(f||h===\"v\"))?x.tozero=!0:(d===\"tonextx\"||d===\"tozerox\")&&(x.padded=!1),u&&(t._extremes[u]=ZM.findExtremes(r,i,v)),c&&(t._extremes[c]=ZM.findExtremes(n,a,x))}function rve(e,t){if(lU.hasMarkers(e)){var r=e.marker,n=1.6*(e.marker.sizeref||1),i;if(e.marker.sizemode===\"area\"?i=function(u){return Math.max(Math.sqrt((u||0)/n),3)}:i=function(u){return Math.max((u||0)/n,3)},sU.isArrayOrTypedArray(r.size)){var a={type:\"linear\"};ZM.setConvert(a);for(var o=a.makeCalcdata(e.marker,\"size\"),s=new Array(t),l=0;l<t;l++)s[l]=i(o[l]);return s}else return i(r.size)}}function ive(e,t){var r=nve(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function nve(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?\"-\"+t:\"\")}function uU(e,t,r,n){var i=e.stackgroup;if(i){var a=t._scatterStackOpts[r._id+n._id][i],o=a.orientation===\"v\"?n:r;if(o.type===\"linear\"||o.type===\"log\")return a}}ave.exports={calc:Vvt,calcMarkerSize:rve,calcAxisExpansion:tve,setFirstScatter:ive,getStackOpts:uU}});var sve=ye((ior,ove)=>{\"use strict\";ove.exports=KP;var Gvt=Dr().distinctVals;function KP(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a<e.length;a++){for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l.p;u===void 0&&(u=l[n]),u!==void 0&&i.push(u)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var c=Gvt(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var f=(t.posAxis||{}).type;(f===\"category\"||f===\"multicategory\")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}KP.prototype.put=function(t,r,n){var i=this.getLabel(t,r,n),a=this.bins[i]||0;return this.bins[i]=a+n,a};KP.prototype.get=function(t,r,n){var i=this.getLabel(t,r,n);return this.bins[i]||0};KP.prototype.getLabel=function(t,r,n){var i=n<0&&this.sepNegVal?\"v\":\"^\",a=this.overlapNoMerge?t:Math.round(t/this.binWidth);return i+a+\"g\"+r}});var Hb=ye((nor,fve)=>{\"use strict\";var q0=Eo(),p_=Dr().isArrayOrTypedArray,Q3=hs().BADNUM,Hvt=qa(),YM=ho(),jvt=Bb().getAxisGroup,JP=sve();function Wvt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];if(c.visible===!0&&Hvt.traceIs(c,\"bar\")&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation===\"h\"?s.push(o[u]):l.push(o[u]),c._computePh))for(var f=e.calcdata[u],h=0;h<f.length;h++)typeof f[h].ph0==\"function\"&&(f[h].ph0=f[h].ph0()),typeof f[h].ph1==\"function\"&&(f[h].ph1=f[h].ph1())}var d={xCat:r.type===\"category\"||r.type===\"multicategory\",yCat:n.type===\"category\"||n.type===\"multicategory\",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};fU(e,r,n,l,d),fU(e,n,r,s,d)}function fU(e,t,r,n,i){if(n.length){var a,o,s,l,u;switch(Yvt(r,n),i.mode){case\"overlay\":cU(e,t,r,n,i);break;case\"group\":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.offset===void 0?o.push(l):a.push(l);o.length&&Kvt(e,t,r,o,i),a.length&&cU(e,t,r,a,i);break;case\"stack\":case\"relative\":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.base===void 0?o.push(l):a.push(l);Zvt(o),o.length&&Jvt(e,t,r,o,i),a.length&&cU(e,t,r,a,i);break}Xvt(n),ipt(n,t)}}function Xvt(e){var t,r,n,i,a,o,s;for(t=0;t<e.length;t++)r=e[t],n=r[0].trace,i=r[0].t,i.cornerradiusvalue===void 0&&(a=n.marker?n.marker.cornerradius:void 0,a!==void 0&&(o=q0(a)?+a:+a.slice(0,-1),s=q0(a)?\"px\":\"%\",i.cornerradiusvalue=o,i.cornerradiusform=s))}function Zvt(e){if(!(e.length<2)){var t,r,n,i,a,o,s;for(t=0;t<e.length&&(r=e[t],n=r[0].trace,a=n.marker?n.marker.cornerradius:void 0,a===void 0);t++);if(a!==void 0)for(o=q0(a)?+a:+a.slice(0,-1),s=q0(a)?\"px\":\"%\",t=0;t<e.length;t++)r=e[t],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=s}}function Yvt(e,t){var r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0].trace,o=a.type===\"funnel\"?a._base:a.base,s,l=a.orientation===\"h\"?a.xcalendar:a.ycalendar,u=e.type===\"category\"||e.type===\"multicategory\"?function(){return null}:e.d2c;if(p_(o)){for(n=0;n<Math.min(o.length,i.length);n++)s=u(o[n],0,l),q0(s)?(i[n].b=+s,i[n].hasB=1):i[n].b=0;for(;n<i.length;n++)i[n].b=0}else{s=u(o,0,l);var c=q0(s);for(s=c?s:0,n=0;n<i.length;n++)i[n].b=s,c&&(i[n].hasB=1)}}}function cU(e,t,r,n,i){for(var a=0;a<n.length;a++){var o=n[a],s=new JP([o],{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});hU(e,t,s,i),i.norm?(cve(s),dU(r,s,i)):uve(r,s)}}function Kvt(e,t,r,n,i){var a=new JP(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});hU(e,t,a,i),tpt(a,t),i.norm?(cve(a),dU(r,a,i)):uve(r,a)}function Jvt(e,t,r,n,i){var a=new JP(n,{posAxis:t,sepNegVal:i.mode===\"relative\",overlapNoMerge:!(i.norm||i.mode===\"stack\"||i.mode===\"relative\")});hU(e,t,a,i),ept(r,a,i);for(var o=0;o<n.length;o++)for(var s=n[o],l=s[0].t.offsetindex,u=0;u<s.length;u++){var c=s[u];if(c.s!==Q3){var f=c.b+c.s===a.get(c.p,l,c.s);f&&(c._outmost=!0)}}i.norm&&dU(r,a,i)}function hU(e,t,r,n){var i=e._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,l=r.traces,u=l.length,c=a.length!==o.length,f=s*(1-n.gap),h,d,v,x;if(t._id===\"angularaxis\")h=f,d=h*(1-(n.groupgap||0)),v=-d/2;else{var b=jvt(i,t._id)+l[0][0].trace.orientation;x=i._alignmentOpts[b]||{}}for(var p=0;p<u;p++){var C=l[p],E=C[0].trace;if(t._id!==\"angularaxis\"){var A=x[E.alignmentgroup]||{},L=Object.keys(A.offsetGroups||{}).length;L?h=f/L:h=c?f/u:f,d=h*(1-(n.groupgap||0)),L?v=((2*E._offsetIndex+1-L)*h-d)/2:v=c?((2*p+1-u)*h-d)/2:-d/2}var _=C[0].t;_.barwidth=d,_.offsetindex=E._offsetIndex||0,_.poffset=v,_.bargroupwidth=f,_.bardelta=s}r.binWidth=l[0][0].t.barwidth/100,$vt(r),Qvt(t,r),t._id===\"angularaxis\"?lve(t,r):lve(t,r,c)}function $vt(e){var t=e.traces,r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0],o=a.trace,s=a.t,l=o._offset||o.offset,u=s.poffset,c;if(p_(l)){for(c=Array.prototype.slice.call(l,0,i.length),n=0;n<c.length;n++)q0(c[n])||(c[n]=u);for(n=c.length;n<i.length;n++)c.push(u);s.poffset=c}else l!==void 0&&(s.poffset=l);var f=o._width||o.width,h=s.barwidth;if(p_(f)){var d=Array.prototype.slice.call(f,0,i.length);for(n=0;n<d.length;n++)q0(d[n])||(d[n]=h);for(n=d.length;n<i.length;n++)d.push(h);if(s.barwidth=d,l===void 0){for(c=[],n=0;n<i.length;n++)c.push(u+(h-d[n])/2);s.poffset=c}}else f!==void 0&&(s.barwidth=f,l===void 0&&(s.poffset=u+(h-f)/2))}}function Qvt(e,t){for(var r=t.traces,n=eT(e),i=0;i<r.length;i++)for(var a=r[i],o=a[0].t,s=o.poffset,l=p_(s),u=o.barwidth,c=p_(u),f=0;f<a.length;f++){var h=a[f],d=h.w=c?u[f]:u;h.p===void 0&&(h.p=h[n],h[\"orig_\"+n]=h[n]);var v=(l?s[f]:s)+d/2;h[n]=h.p+v}}function lve(e,t,r){var n=t.traces,i=t.minDiff,a=i/2;YM.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<n.length;o++){var s=n[o],l=s[0],u=l.trace,c=[],f,h,d,v;for(v=0;v<s.length;v++)f=s[v],h=f.p-a,d=f.p+a,c.push(h,d);if(u.width||u.offset){var x=l.t,b=x.poffset,p=x.barwidth,C=p_(b),E=p_(p);for(v=0;v<s.length;v++){f=s[v];var A=C?b[v]:b,L=E?p[v]:p;h=f.p+A,d=h+L,c.push(h,d)}}u._extremes[e._id]=YM.findExtremes(e,c,{padded:!1})}}function uve(e,t){for(var r=t.traces,n=eT(e),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,s=o.type===\"scatter\",l=o.orientation===\"v\",u=[],c=!1,f=0;f<a.length;f++){var h=a[f],d=s?0:h.b,v=s?l?h.y:h.x:d+h.s;h[n]=v,u.push(v),h.hasB&&u.push(d),(!h.hasB||!h.b)&&(c=!0)}o._extremes[e._id]=YM.findExtremes(e,u,{tozero:c,padded:!0})}}function ept(e,t,r){var n=eT(e),i=t.traces,a,o,s,l,u,c,f;for(l=0;l<i.length;l++)if(a=i[l],o=a[0].trace,o.type===\"funnel\")for(f=a[0].t.offsetindex,u=0;u<a.length;u++)c=a[u],c.s!==Q3&&t.put(c.p,f,-.5*c.s);for(l=0;l<i.length;l++){a=i[l],o=a[0].trace,s=o.type===\"funnel\",f=o.type===\"barpolar\"?0:a[0].t.offsetindex;var h=[];for(u=0;u<a.length;u++)if(c=a[u],c.s!==Q3){var d;s?d=c.s:d=c.s+c.b;var v=t.put(c.p,f,d),x=v+d;c.b=v,c[n]=x,r.norm||(h.push(x),c.hasB&&h.push(v))}r.norm||(o._extremes[e._id]=YM.findExtremes(e,h,{tozero:!0,padded:!0}))}}function cve(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],i=n[0].t.offsetindex,a=0;a<n.length;a++){var o=n[a];o.s!==Q3&&e.put(o.p,i,o.b+o.s)}}function tpt(e,t){for(var r=e.traces,n=0;n<r.length;n++){var i=r[n],a=i[0].trace,o=i[0].t.offsetindex;if(a.base===void 0)for(var s=new JP([i],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var u=i[l];if(u.p!==Q3){var c=s.put(u.p,o,u.b+u.s);c&&(u.b=c)}}}}function dU(e,t,r){var n=t.traces,i=eT(e),a=r.norm===\"fraction\"?1:100,o=a/1e9,s=e.l2c(e.c2l(0)),l=r.mode===\"stack\"?a:s;function u(_){return q0(e.c2l(_))&&(_<s-o||_>l+o||!q0(s))}for(var c=0;c<n.length;c++){for(var f=n[c],h=f[0].t.offsetindex,d=f[0].trace,v=[],x=!1,b=!1,p=0;p<f.length;p++){var C=f[p];if(C.s!==Q3){var E=Math.abs(a/t.get(C.p,h,C.s));C.b*=E,C.s*=E;var A=C.b,L=A+C.s;C[i]=L,v.push(L),b=b||u(L),C.hasB&&(v.push(A),b=b||u(A)),(!C.hasB||!C.b)&&(x=!0)}}d._extremes[e._id]=YM.findExtremes(e,v,{tozero:x,padded:b})}}function rpt(e,t,r,n){for(var i=eT(n),a=0;a<e.length;a++)for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=t[u],l._sMax=r[u]}}function ipt(e,t){var r=eT(t),n={},i,a,o,s=1/0,l=-1/0;for(i=0;i<e.length;i++)for(o=e[i],a=0;a<o.length;a++){var u=o[a].p;q0(u)&&(s=Math.min(s,u),l=Math.max(l,u))}var c=1e4/(l-s),f=n.round=function(M){return String(Math.round(c*(M-s)))},h={},d={},v=e.some(function(M){var g=M[0].trace;return\"marker\"in g&&g.marker.cornerradius});for(i=0;i<e.length;i++){o=e[i],o[0].t.extents=n;var x=o[0].t.poffset,b=p_(x);for(a=0;a<o.length;a++){var p=o[a],C=p[r]-p.w/2;if(q0(C)){var E=p[r]+p.w/2,A=f(p.p);n[A]?n[A]=[Math.min(C,n[A][0]),Math.max(E,n[A][1])]:n[A]=[C,E]}if(p.p0=p.p+(b?x[a]:x),p.p1=p.p0+p.w,p.s0=p.b,p.s1=p.s0+p.s,v){var L=Math.min(p.s0,p.s1)||0,_=Math.max(p.s0,p.s1)||0,k=p[r];h[k]=k in h?Math.min(h[k],L):L,d[k]=k in d?Math.max(d[k],_):_}}}v&&rpt(e,h,d,t)}function eT(e){return e._id.charAt(0)}fve.exports={crossTraceCalc:Wvt,setGroupPositions:fU}});var pve=ye((aor,vve)=>{\"use strict\";var hve=O0(),dve=Hb().setGroupPositions;function npt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];c.visible===!0&&c.type===\"scatter\"&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation===\"h\"?s.push(o[u]):c.orientation===\"v\"&&l.push(o[u]))}var f={mode:i.scattermode,gap:i.scattergap};dve(e,r,n,l,f),dve(e,n,r,s,f)}vve.exports=function(t,r){t._fullLayout.scattermode===\"group\"&&npt(t,r);var n=r.xaxis,i=r.yaxis,a=n._id+i._id,o=t._fullLayout._scatterStackOpts[a];if(o){var s=t.calcdata,l,u,c,f,h,d,v,x,b,p,C,E,A,L,_;for(var k in o){p=o[k];var M=p.traceIndices;if(M.length){for(C=p.stackgaps===\"interpolate\",E=p.groupnorm,p.orientation===\"v\"?(A=\"x\",L=\"y\"):(A=\"y\",L=\"x\"),_=new Array(M.length),l=0;l<_.length;l++)_[l]=!1;d=s[M[0]];var g=new Array(d.length);for(l=0;l<d.length;l++)g[l]=d[l][A];for(l=1;l<M.length;l++){for(h=s[M[l]],u=c=0;u<h.length;u++){for(v=h[u][A];v>g[c]&&c<g.length;c++)vU(h,u,g[c],l,_,C,A),u++;if(v!==g[c]){for(f=0;f<l;f++)vU(s[M[f]],c,v,f,_,C,A);g.splice(c,0,v)}c++}for(;c<g.length;c++)vU(h,u,g[c],l,_,C,A),u++}var P=g.length;for(u=0;u<d.length;u++){for(x=d[u][L]=d[u].s,l=1;l<M.length;l++)h=s[M[l]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=P,x+=h[u].s,h[u][L]=x;if(E)for(b=(E===\"fraction\"?x:x/100)||1,l=0;l<M.length;l++){var T=s[M[l]][u];T[L]/=b,T.sNorm=T.s/b}}for(l=0;l<M.length;l++){h=s[M[l]];var z=h[0].trace,O=hve.calcMarkerSize(z,z._rawLength),V=Array.isArray(O);if(O&&_[l]||V){var G=O;for(O=new Array(P),u=0;u<P;u++)O[u]=h[u].gap?0:V?G[h[u].i]:G}var Z=new Array(P),H=new Array(P);for(u=0;u<P;u++)Z[u]=h[u].x,H[u]=h[u].y;hve.calcAxisExpansion(t,z,n,i,Z,H,O),h[0].t.orientation=p.orientation}}}}};function vU(e,t,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,e.splice(t,0,s),t&&r===e[t-1][o]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=apt(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}function apt(e,t,r,n){var i=e[t-1],a=e[t+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}});var gU=ye((oor,bve)=>{\"use strict\";var opt=So(),_ve=hs(),KM=_ve.BADNUM,xve=_ve.LOG_CLIP,gve=xve+.5,mve=xve-.5,$P=Dr(),spt=$P.segmentsIntersect,yve=$P.constrain,pU=Sm();bve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type===\"log\",s=a.type===\"log\",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,x=v===\"linear\",b=n.fill&&n.fill!==\"none\",p=[],C=pU.minTolerance,E=t.length,A=new Array(E),L=0,_,k,M,g,P,T,z,O,V,G,Z,H,N,j,re,oe;function _e(dt){var Ge=t[dt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),je=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===KM){if(o&&(Je=i.c2p(Ge.x,!0)),Je===KM)return!1;s&&je===KM&&(Je*=Math.abs(i._m*u*(i._m>0?gve:mve)/(a._m*l*(a._m>0?gve:mve)))),Je*=1e3}if(je===KM){if(s&&(je=a.c2p(Ge.y,!0)),je===KM)return!1;je*=1e3}return[Je,je]}function Me(dt,Ge,Je,je){var $e=Je-dt,wt=je-Ge,Ie=.5-dt,xe=.5-Ge,Ce=$e*$e+wt*wt,vt=$e*Ie+wt*xe;if(vt>0&&vt<Ce){var nr=Ie*wt-xe*$e;if(nr*nr<Ce)return!0}}var ke,me;function ie(dt,Ge){var Je=dt[0]/l,je=dt[1]/u,$e=Math.max(0,-Je,Je-1,-je,je-1);return $e&&ke!==void 0&&Me(Je,je,ke,me)&&($e=0),$e&&Ge&&Me(Je,je,Ge[0]/l,Ge[1]/u)&&($e=0),(1+pU.toleranceGrowth*$e)*d}function Se(dt,Ge){var Je=dt[0]-Ge[0],je=dt[1]-Ge[1];return Math.sqrt(Je*Je+je*je)}var Le=pU.maxScreensAway,Ae=-l*Le,De=l*(1+Le),Pe=-u*Le,ge=u*(1+Le),Fe=[[Ae,Pe,De,Pe],[De,Pe,De,ge],[De,ge,Ae,ge],[Ae,ge,Ae,Pe]],ce,Ze,ct,pt,Wt,st;function lt(dt,Ge){for(var Je=[],je=0,$e=0;$e<4;$e++){var wt=Fe[$e],Ie=spt(dt[0],dt[1],Ge[0],Ge[1],wt[0],wt[1],wt[2],wt[3]);Ie&&(!je||Math.abs(Ie.x-Je[0][0])>1||Math.abs(Ie.y-Je[0][1])>1)&&(Ie=[Ie.x,Ie.y],je&&Se(Ie,dt)<Se(Je[0],dt)?Je.unshift(Ie):Je.push(Ie),je++)}return Je}function Gt(dt){if(dt[0]<Ae||dt[0]>De||dt[1]<Pe||dt[1]>ge)return[yve(dt[0],Ae,De),yve(dt[1],Pe,ge)]}function Nt(dt,Ge){if(dt[0]===Ge[0]&&(dt[0]===Ae||dt[0]===De)||dt[1]===Ge[1]&&(dt[1]===Pe||dt[1]===ge))return!0}function $t(dt,Ge){var Je=[],je=Gt(dt),$e=Gt(Ge);return je&&$e&&Nt(je,$e)||(je&&Je.push(je),$e&&Je.push($e)),Je}function sr(dt,Ge,Je){return function(je,$e){var wt=Gt(je),Ie=Gt($e),xe=[];if(wt&&Ie&&Nt(wt,Ie))return xe;wt&&xe.push(wt),Ie&&xe.push(Ie);var Ce=2*$P.constrain((je[dt]+$e[dt])/2,Ge,Je)-((wt||je)[dt]+(Ie||$e)[dt]);if(Ce){var vt;wt&&Ie?vt=Ce>0==wt[dt]>Ie[dt]?wt:Ie:vt=wt||Ie,vt[dt]+=Ce}return xe}}var wr;v===\"linear\"||v===\"spline\"?wr=lt:v===\"hv\"||v===\"vh\"?wr=$t:v===\"hvh\"?wr=sr(0,Ae,De):v===\"vhv\"&&(wr=sr(1,Pe,ge));function ur(dt,Ge){var Je=Ge[0]-dt[0],je=(Ge[1]-dt[1])/Je,$e=(dt[1]*Ge[0]-Ge[1]*dt[0])/Je;return $e>0?[je>0?Ae:De,ge]:[je>0?De:Ae,Pe]}function Qe(dt){var Ge=dt[0],Je=dt[1],je=Ge===A[L-1][0],$e=Je===A[L-1][1];if(!(je&&$e))if(L>1){var wt=Ge===A[L-2][0],Ie=Je===A[L-2][1];je&&(Ge===Ae||Ge===De)&&wt?Ie?L--:A[L-1]=dt:$e&&(Je===Pe||Je===ge)&&Ie?wt?L--:A[L-1]=dt:A[L++]=dt}else A[L++]=dt}function Et(dt){A[L-1][0]!==dt[0]&&A[L-1][1]!==dt[1]&&Qe([ct,pt]),Qe(dt),Wt=null,ct=pt=0}var er=$P.isArrayOrTypedArray(f);function Ut(dt){if(dt&&c&&(dt.i=_,dt.d=t,dt.trace=n,dt.marker=er?f[dt.i]:f,dt.backoff=c),ke=dt[0]/l,me=dt[1]/u,ce=dt[0]<Ae?Ae:dt[0]>De?De:0,Ze=dt[1]<Pe?Pe:dt[1]>ge?ge:0,ce||Ze){if(!L)A[L++]=[ce||dt[0],Ze||dt[1]];else if(Wt){var Ge=wr(Wt,dt);Ge.length>1&&(Et(Ge[0]),A[L++]=Ge[1])}else st=wr(A[L-1],dt)[0],A[L++]=st;var Je=A[L-1];ce&&Ze&&(Je[0]!==ce||Je[1]!==Ze)?(Wt&&(ct!==ce&&pt!==Ze?Qe(ct&&pt?ur(Wt,dt):[ct||ce,pt||Ze]):ct&&pt&&Qe([ct,pt])),Qe([ce,Ze])):ct-ce&&pt-Ze&&Qe([ce||ct,Ze||pt]),Wt=dt,ct=ce,pt=Ze}else Wt&&Et(wr(Wt,dt)[0]),A[L++]=dt}for(_=0;_<E;_++)if(k=_e(_),!!k){for(L=0,Wt=null,Ut(k),_++;_<E;_++){if(g=_e(_),!g){if(h)continue;break}if(!x||!r.simplify){Ut(g);continue}var Ft=_e(_+1);if(G=Se(g,k),!(!(b&&(L===0||L===E-1))&&G<ie(g,Ft)*C)){for(O=[(g[0]-k[0])/G,(g[1]-k[1])/G],P=k,Z=G,H=j=re=0,z=!1,M=g,_++;_<t.length;_++){if(T=Ft,Ft=_e(_+1),!T){if(h)continue;break}if(V=[T[0]-k[0],T[1]-k[1]],oe=V[0]*O[1]-V[1]*O[0],j=Math.min(j,oe),re=Math.max(re,oe),re-j>ie(T,Ft))break;M=T,N=V[0]*O[0]+V[1]*O[1],N>Z?(Z=N,g=T,z=!1):N<H&&(H=N,P=T,z=!0)}if(z?(Ut(g),M!==P&&Ut(P)):(P!==k&&Ut(P),M!==g&&Ut(g)),Ut(M),_>=t.length||!T)break;Ut(T),k=T}}Wt&&Qe([ct||Wt[0],pt||Wt[1]]),p.push(A.slice(0,L))}var bt=v.slice(v.length-1);if(c&&bt!==\"h\"&&bt!==\"v\"){for(var yt=!1,Yt=-1,lr=[],Tr=0;Tr<p.length;Tr++)for(var Rr=0;Rr<p[Tr].length-1;Rr++){var ei=p[Tr][Rr],Wr=p[Tr][Rr+1],Ur=opt.applyBackoff(Wr,ei);(Ur[0]!==Wr[0]||Ur[1]!==Wr[1])&&(yt=!0),lr[Yt+1]||(Yt++,lr[Yt]=[ei,[Ur[0],Ur[1]]])}return yt?lr:p}return p}});var mU=ye((sor,Tve)=>{\"use strict\";var wve={tonextx:1,tonexty:1,tonext:1};Tve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a<n.length;a++)i=n[a][0].trace,o=i.stackgroup||\"\",o?o in u?l=u[o]:(l=u[o]=h,h++):i.fill in wve&&d>=0?l=d:(l=d=h,h++),l<f&&(c=!0),i._groupIndex=f=l;var v=n.slice();c&&v.sort(function(b,p){var C=b[0].trace,E=p[0].trace;return C._groupIndex-E._groupIndex||C.index-E.index});var x={};for(a=0;a<v.length;a++)i=v[a][0].trace,o=i.stackgroup||\"\",i.visible===!0?(i._nexttrace=null,i.fill in wve&&(s=x[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)===\"tozero\"||i.fill===\"toself\"||i.fill.substr(0,2)===\"to\"&&!i._prevtrace),x[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return v}});var iT=ye((lor,Mve)=>{\"use strict\";var Dg=Oa(),lpt=qa(),JM=Dr(),tT=JM.ensureSingle,Sve=JM.identity,Kf=So(),rT=Ru(),upt=gU(),cpt=mU(),QP=MM().tester;Mve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=cpt(t,r,n);if(s=i.selectAll(\"g.trace\").data(f,function(d){return d[0].trace.uid}),s.enter().append(\"g\").attr(\"class\",function(d){return\"trace scatter trace\"+d[0].trace.uid}).style(\"stroke-miterlimit\",2),s.order(),fpt(t,s,r),c){o&&(l=o());var h=Dg.transition().duration(a.duration).ease(a.easing).each(\"end\",function(){l&&l()}).each(\"interrupt\",function(){l&&l()});h.each(function(){i.selectAll(\"g.trace\").each(function(d,v){Ave(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Ave(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll(\"path:not([d])\").remove()};function fpt(e,t,r){t.each(function(n){var i=tT(Dg.select(this),\"g\",\"fills\");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace,o=[];a._ownfill&&o.push(\"_ownFill\"),a._nexttrace&&o.push(\"_nextFill\");var s=i.selectAll(\"g\").data(o,Sve);s.enter().append(\"g\"),s.exit().each(function(l){a[l]=null}).remove(),s.order().each(function(l){a[l]=tT(Dg.select(this),\"path\",\"js-fill\")})})}function Ave(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;hpt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(sr){return u?sr.transition():sr}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,x=Dg.select(a),b=tT(x,\"g\",\"errorbars\"),p=tT(x,\"g\",\"lines\"),C=tT(x,\"g\",\"points\"),E=tT(x,\"g\",\"text\");if(lpt.getComponentMethod(\"errorbars\",\"plot\")(e,b,r,o),d.visible!==!0)return;c(x).style(\"opacity\",d.opacity);var A,L,_=d.fill.charAt(d.fill.length-1);_!==\"x\"&&_!==\"y\"&&(_=\"\");var k,M;_===\"y\"?(k=1,M=h.c2p(0,!0)):_===\"x\"&&(k=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=x;var g=\"\",P=[],T=d._prevtrace,z=null,O=null;T&&(g=T._prevRevpath||\"\",L=T._nextFill,P=T._ownPolygons,z=T._fillsegments,O=T._fillElement);var V,G,Z=\"\",H=\"\",N,j,re,oe,_e,Me,ke=[];d._polygons=[];var me=[],ie=[],Se=JM.noop;if(A=d._ownFill,rT.hasLines(d)||d.fill!==\"none\"){L&&L.datum(n),[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),j=Kf.steps(v.shape.split(\"\").reverse().join(\"\"))):v.shape===\"spline\"?N=j=function(sr){var wr=sr[sr.length-1];return sr.length>1&&sr[0][0]===wr[0]&&sr[0][1]===wr[1]?Kf.smoothclosed(sr.slice(1),v.smoothing):Kf.smoothopen(sr,v.smoothing)}:N=j=function(sr){return\"M\"+sr.join(\"L\")},re=function(sr){return j(sr.reverse())},ie=upt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),me=new Array(ie.length);var Le=0;for(l=0;l<ie.length;l++){var Ae,De=ie[l];!Ae||!_?(Ae=De.slice(),me[Le]=Ae,Le++):Ae.push.apply(Ae,De)}d._fillElement=null,d._fillExclusionElement=O,d._fillsegments=me.slice(0,Le),me=d._fillsegments,ie.length&&(oe=ie[0][0].slice(),_e=ie[ie.length-1],Me=_e[_e.length-1].slice()),Se=function(sr){return function(wr){if(V=N(wr),G=re(wr),Z?_?(Z+=\"L\"+V.substr(1),H=G+(\"L\"+H.substr(1))):(Z+=\"Z\"+V,H=G+\"Z\"+H):(Z=V,H=G),rT.hasLines(d)){var ur=Dg.select(this);if(ur.datum(n),sr)c(ur.style(\"opacity\",0).attr(\"d\",V).call(Kf.lineGroupStyle)).style(\"opacity\",1);else{var Qe=c(ur);Qe.attr(\"d\",V),Kf.singleLineStyle(n,Qe)}}}}}var Pe=p.selectAll(\".js-line\").data(ie);c(Pe.exit()).style(\"opacity\",0).remove(),Pe.each(Se(!1)),Pe.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",s?\"none\":\"non-scaling-stroke\").call(Kf.lineGroupStyle).each(Se(!0)),Kf.setClipUrl(Pe,r.layerClipId,e);function ge(sr){c(sr).attr(\"d\",\"M0,0Z\")}var Fe=function(){var sr=new Array(me.length);for(l=0;l<me.length;l++)sr[l]=QP(me[l]);return sr},ce=function(sr){var wr,ur;if(!sr||sr.length===0)for(wr=new Array(me.length),ur=0;ur<me.length;ur++){var Qe=me[ur][0].slice(),Et=me[ur][me[ur].length-1].slice();Qe[k]=Et[k]=M;var er=[Et,Qe],Ut=er.concat(me[ur]);wr[ur]=QP(Ut)}else{for(wr=new Array(sr.length-1+me.length),ur=0;ur<sr.length-1;ur++)wr[ur]=QP(sr[ur]);var Ft=sr[sr.length-1].slice();for(Ft.reverse(),ur=0;ur<me.length;ur++)wr[sr.length-1+ur]=QP(me[ur].concat(Ft))}return wr};ie.length?(A?(A.datum(n),oe&&Me&&(_?(oe[k]=Me[k]=M,c(A).attr(\"d\",\"M\"+Me+\"L\"+oe+\"L\"+Z.substr(1)).call(Kf.singleFillStyle,e),ke=ce(null)):(c(A).attr(\"d\",Z+\"Z\").call(Kf.singleFillStyle,e),ke=Fe())),d._polygons=ke,d._fillElement=A):L&&(d.fill.substr(0,6)===\"tonext\"&&Z&&g?(d.fill===\"tonext\"?(c(L).attr(\"d\",Z+\"Z\"+g+\"Z\").call(Kf.singleFillStyle,e),ke=Fe(),d._polygons=ke.concat(P)):(c(L).attr(\"d\",Z+\"L\"+g.substr(1)+\"Z\").call(Kf.singleFillStyle,e),ke=ce(z),d._polygons=ke),d._fillElement=L):ge(L)),d._prevRevpath=H):(A?ge(A):L&&ge(L),d._prevRevpath=null),d._ownPolygons=ke;function Ze(sr){return sr.filter(function(wr){return!wr.gap&&wr.vis})}function ct(sr){return sr.filter(function(wr){return wr.vis})}function pt(sr){return sr.filter(function(wr){return!wr.gap})}function Wt(sr){return sr.id}function st(sr){if(sr.ids)return Wt}function lt(){return!1}function Gt(sr,wr,ur){var Qe,Et,er,Ut=ur[0].trace,Ft=rT.hasMarkers(Ut),bt=rT.hasText(Ut),yt=st(Ut),Yt=lt,lr=lt;if(Ft||bt){var Tr=Sve,Rr=Ut.stackgroup,ei=Rr&&e._fullLayout._scatterStackOpts[f._id+h._id][Rr].stackgaps===\"infer zero\";Ut.marker.maxdisplayed||Ut._needsCull?Tr=ei?ct:Ze:Rr&&!ei&&(Tr=pt),Ft&&(Yt=Tr),bt&&(lr=Tr)}Et=sr.selectAll(\"path.point\"),Qe=Et.data(Yt,yt);var Wr=Qe.enter().append(\"path\").classed(\"point\",!0);u&&Wr.call(Kf.pointStyle,Ut,e).call(Kf.translatePoints,f,h).style(\"opacity\",0).transition().style(\"opacity\",1),Qe.order();var Ur;Ft&&(Ur=Kf.makePointStyleFns(Ut)),Qe.each(function(dt){var Ge=Dg.select(this),Je=c(Ge);er=Kf.translatePoint(dt,Je,f,h),er?(Kf.singlePointStyle(dt,Je,Ut,Ur,e),r.layerClipId&&Kf.hideOutsideRangePoint(dt,Je,f,h,Ut.xcalendar,Ut.ycalendar),Ut.customdata&&Ge.classed(\"plotly-customdata\",dt.data!==null&&dt.data!==void 0)):Je.remove()}),u?Qe.exit().transition().style(\"opacity\",0).remove():Qe.exit().remove(),Et=wr.selectAll(\"g\"),Qe=Et.data(lr,yt),Qe.enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),Qe.order(),Qe.each(function(dt){var Ge=Dg.select(this),Je=c(Ge.select(\"text\"));er=Kf.translatePoint(dt,Je,f,h),er?r.layerClipId&&Kf.hideOutsideRangePoint(dt,Ge,f,h,Ut.xcalendar,Ut.ycalendar):Ge.remove()}),Qe.selectAll(\"text\").call(Kf.textPointStyle,Ut,e).each(function(dt){var Ge=f.c2p(dt.x),Je=h.c2p(dt.y);Dg.select(this).selectAll(\"tspan.line\").each(function(){c(Dg.select(this)).attr({x:Ge,y:Je})})}),Qe.exit().remove()}C.datum(n),E.datum(n),Gt(C,E,n);var Nt=d.cliponaxis===!1,$t=Nt?null:r.layerClipId;Kf.setClipUrl(C,$t,e),Kf.setClipUrl(E,$t,e)}function hpt(e,t,r,n,i){var a=r.xaxis,o=r.yaxis,s=Dg.extent(JM.simpleMap(a.range,a.r2c)),l=Dg.extent(JM.simpleMap(o.range,o.r2c)),u=n[0].trace;if(rT.hasMarkers(u)){var c=u.marker.maxdisplayed;if(c!==0){var f=n.filter(function(x){return x.x>=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(x,b){var p=x[0].trace;rT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b<t&&d++});var v=Math.round(d*h/3+Math.floor(d/3)*h/7.1);n.forEach(function(x){delete x.vis}),f.forEach(function(x,b){Math.round((b+v)%h)===0&&(x.vis=!0)})}}}});var $d=ye((uor,Eve)=>{\"use strict\";Eve.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}});var tI=ye((cor,Cve)=>{\"use strict\";var eI=ho();Cve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=eI.getFromTrace(a,r,\"x\"),s=eI.getFromTrace(a,r,\"y\"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=eI.tickText(o,o.c2l(l),!0).text,i.yLabel=eI.tickText(s,s.c2l(u),!0).text,i}});var ap=ye((hor,kve)=>{\"use strict\";var yU=Oa(),nT=So(),dpt=qa();function vpt(e){var t=yU.select(e).selectAll(\"g.trace.scatter\");t.style(\"opacity\",function(r){return r[0].trace.opacity}),t.selectAll(\"g.points\").each(function(r){var n=yU.select(this),i=r.trace||r[0].trace;_U(n,i,e)}),t.selectAll(\"g.text\").each(function(r){var n=yU.select(this),i=r.trace||r[0].trace;xU(n,i,e)}),t.selectAll(\"g.trace path.js-line\").call(nT.lineGroupStyle),t.selectAll(\"g.trace path.js-fill\").call(nT.fillGroupStyle,e,!1),dpt.getComponentMethod(\"errorbars\",\"style\")(t)}function _U(e,t,r){nT.pointStyle(e.selectAll(\"path.point\"),t,r)}function xU(e,t,r){nT.textPointStyle(e.selectAll(\"text\"),t,r)}function ppt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll(\"path.point\"),n),nT.selectedTextStyle(r.selectAll(\"text\"),n)):(_U(r,n,e),xU(r,n,e))}kve.exports={style:vpt,stylePoints:_U,styleText:xU,styleOnSelect:ppt}});var oT=ye((dor,Lve)=>{\"use strict\";var aT=Ca(),gpt=Ru();Lve.exports=function(t,r){var n,i;if(t.mode===\"lines\")return n=t.line.color,n&&aT.opacity(n)?n:t.fillcolor;if(t.mode===\"none\")return t.fill?t.fillcolor:\"\";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:\"\",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&gpt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=ye((vor,Ive)=>{\"use strict\";var rI=Dr(),Pve=vf(),mpt=qa(),ypt=oT(),bU=Ca(),_pt=rI.fillText;Ive.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||\"\",d=o.mode.indexOf(\"markers\")!==-1?3:.5,v=!!o.xperiodalignment,x=!!o.yperiodalignment;if(h.indexOf(\"points\")!==-1){var b=function(H){if(v){var N=s.c2p(H.xStart),j=s.c2p(H.xEnd);return u>=Math.min(N,j)&&u<=Math.max(N,j)?0:1/0}var re=Math.max(3,H.mrc||0),oe=1-1/re,_e=Math.abs(s.c2p(H.x)-u);return _e<re?oe*_e/re:_e-re+oe},p=function(H){if(x){var N=l.c2p(H.yStart),j=l.c2p(H.yEnd);return c>=Math.min(N,j)&&c<=Math.max(N,j)?0:1/0}var re=Math.max(3,H.mrc||0),oe=1-1/re,_e=Math.abs(l.c2p(H.y)-c);return _e<re?oe*_e/re:_e-re+oe},C=function(H){var N=Math.max(d,H.mrc||0),j=s.c2p(H.x)-u,re=l.c2p(H.y)-c;return Math.max(Math.sqrt(j*j+re*re)-N,1-d/N)},E=Pve.getDistanceFunction(i,b,p,C);if(Pve.getClosest(a,E,t),t.index!==!1){var A=a[t.index],L=s.c2p(A.x,!0),_=l.c2p(A.y,!0),k=A.mrc||1;t.index=A.i;var M=a[0].t.orientation,g=M&&(A.sNorm||A.s),P=M===\"h\"?g:A.orig_x!==void 0?A.orig_x:A.x,T=M===\"v\"?g:A.orig_y!==void 0?A.orig_y:A.y;return rI.extendFlat(t,{color:ypt(o,A),x0:L-k,x1:L+k,xLabelVal:P,y0:_-k,y1:_+k,yLabelVal:T,spikeDistance:C(A),hovertemplate:o.hovertemplate}),_pt(A,o,t),mpt.getComponentMethod(\"errorbars\",\"hoverInfo\")(A,o,t),[t]}}function z(H){if(!H)return!1;var N=H.node();try{var j=new DOMPoint(f[0],f[1]);return N.isPointInFill(j)}catch(oe){var re=N.ownerSVGElement.createSVGPoint();return re.x=f[0],re.y=f[1],N.isPointInFill(re)}}function O(H){var N,j=[],re=1/0,oe=-1/0,_e=1/0,Me=-1/0,ke;for(N=0;N<H.length;N++){var me=H[N];me.contains(f)&&(j.push(me),_e=Math.min(_e,me.ymin),Me=Math.max(Me,me.ymax))}if(j.length===0)return null;_e=Math.max(_e,0),Me=Math.min(Me,l._length),ke=(_e+Me)/2;var ie,Se,Le,Ae,De,Pe,ge;for(N=0;N<j.length;N++)for(Se=j[N].pts,ie=1;ie<Se.length;ie++)Pe=Se[ie-1][1],ge=Se[ie][1],Pe>ke!=ge>=ke&&(Ae=Se[ie-1][0],De=Se[ie][0],ge-Pe&&(Le=Ae+(De-Ae)*(ke-Pe)/(ge-Pe),re=Math.min(re,Le),oe=Math.max(oe,Le)));return re=Math.max(re,0),oe=Math.min(oe,s._length),{x0:re,x1:oe,y0:ke,y1:ke}}if(h.indexOf(\"fills\")!==-1&&o._fillElement){var V=z(o._fillElement)&&!z(o._fillExclusionElement);if(V){var G=O(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=bU.defaultLine;return bU.opacity(o.fillcolor)?Z=o.fillcolor:bU.opacity((o.line||{}).color)&&(Z=o.line.color),rI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!rI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=ye((por,Dve)=>{\"use strict\";var Rve=Ru();Dve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Rve.hasMarkers(s)&&!Rve.hasText(s);if(h)return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++)u=n[l],c=i.c2p(u.x),f=a.c2p(u.y),u.i!==null&&r.contains([c,f],!1,l,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0;return o}});var zve=ye((gor,Fve)=>{\"use strict\";Fve.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}});var TU=ye((mor,Bve)=>{\"use strict\";var $M=qa().traceIs,wU=L3();Bve.exports=function(t,r,n,i){n(\"autotypenumbers\",i.autotypenumbersDflt);var a=n(\"type\",(i.splomStash||{}).type);a===\"-\"&&(xpt(r,i.data),r.type===\"-\"?r.type=\"linear\":t.type=r.type)};function xpt(e,t){if(e.type===\"-\"){var r=e._id,n=r.charAt(0),i;r.indexOf(\"scene\")!==-1&&(r=n);var a=bpt(t,r,n);if(a){if(a.type===\"histogram\"&&n==={v:\"y\",h:\"x\"}[a.orientation||\"v\"]){e.type=\"linear\";return}var o=n+\"calendar\",s=a[o],l={noMultiCategory:!$M(a,\"cartesian\")||$M(a,\"noMultiCategory\")};if(a.type===\"box\"&&a._hasPreCompStats&&n==={h:\"x\",v:\"y\"}[a.orientation||\"v\"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,qve(a,n)){var u=Ove(a),c=[];for(i=0;i<t.length;i++){var f=t[i];!$M(f,\"box-violin\")||(f[n+\"axis\"]||n)!==r||(f[u]!==void 0?c.push(f[u][0]):f.name!==void 0?c.push(f.name):c.push(\"text\"),f[o]!==s&&(s=void 0))}e.type=wU(c,s,l)}else if(a.type===\"splom\"){var h=a.dimensions,d=h[a._axesDim[r]];d.visible&&(e.type=wU(d.values,s,l))}else e.type=wU(a[n]||[a[n+\"0\"]],s,l)}}}function bpt(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.type===\"splom\"&&i._length>0&&(i[\"_\"+r+\"axes\"]||{})[t])return i;if((i[r+\"axis\"]||r)===t){if(qve(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}function Ove(e){return{v:\"x\",h:\"y\"}[e.orientation||\"v\"]}function qve(e,t){var r=Ove(e),n=$M(e,\"box-violin\"),i=$M(e._fullInput||{},\"candlestick\");return n&&!i&&t===r&&e[r]===void 0&&e[r+\"0\"]===void 0}});var iI=ye((yor,Nve)=>{\"use strict\";var wpt=vv().isTypedArraySpec;function Tpt(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a<t.data.length;a++){var s=t.data[a];s[r+\"axis\"]===e._id&&i.push(s)}for(a=0;a<i.length;a++){var l=i[a][r];for(o=0;o<l.length;o++){var u=l[o];u!=null&&(n[u]=1)}}return Object.keys(n)}Nve.exports=function(t,r,n,i){if(r.type===\"category\"){var a=t.categoryarray,o=Array.isArray(a)&&a.length>0||wpt(a),s;o&&(s=\"array\");var l=n(\"categoryorder\",s),u;l===\"array\"&&(u=n(\"categoryarray\")),!o&&l===\"array\"&&(l=r.categoryorder=\"trace\"),l===\"trace\"?r._initialCategories=[]:l===\"array\"?r._initialCategories=u.slice():(u=Tpt(r,i).sort(),l===\"category ascending\"?r._initialCategories=u:l===\"category descending\"&&(r._initialCategories=u.reverse()))}}});var QM=ye((_or,Vve)=>{\"use strict\";var Uve=cd().mix,Apt=Eh(),Spt=Dr();Vve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(M,g){return Spt.coerce2(t,r,i.attributes,M,g)}var s=o(\"linecolor\",a),l=o(\"linewidth\"),u=n(\"showline\",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Uve(a,i.bgColor,i.blend||Apt.lightFraction).toRgbString(),f=o(\"gridcolor\",c),h=o(\"gridwidth\"),d=o(\"griddash\"),v=n(\"showgrid\",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var x=Uve(r.gridcolor,i.bgColor,67).toRgbString(),b=o(\"minor.gridcolor\",x),p=o(\"minor.gridwidth\",r.gridwidth||1),C=o(\"minor.griddash\",r.griddash||\"solid\"),E=n(\"minor.showgrid\",!!b||!!p||!!C);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var A=o(\"zerolinelayer\"),L=o(\"zerolinecolor\",a),_=o(\"zerolinewidth\"),k=n(\"zeroline\",i.showGrid||!!L||!!_);k||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var t4=ye((xor,Zve)=>{\"use strict\";var Gve=Eo(),Mpt=qa(),e4=Dr(),Ept=pl(),Cpt=Yd(),AU=Rd(),Hve=xb(),jve=T3(),kpt=e_(),Lpt=t_(),Ppt=iI(),Ipt=QM(),Rpt=mB(),Wve=ym(),nI=hd().WEEKDAY_PATTERN,Dpt=hd().HOUR_PATTERN;Zve.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n(\"visible\",!i.visibleDflt),c=r._template||{},f=r.type||c.type||\"-\",h;if(f===\"date\"){var d=Mpt.getComponentMethod(\"calendars\",\"handleDefaults\");d(t,r,\"calendar\",i.calendar),i.noTicklabelmode||(h=n(\"ticklabelmode\"))}!i.noTicklabelindex&&(f===\"date\"||f===\"linear\")&&n(\"ticklabelindex\");var v=\"\";(!i.noTicklabelposition||f===\"multicategory\")&&(v=e4.coerce(t,r,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:h===\"period\"?[\"outside\",\"inside\"]:o===\"x\"?[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]}},\"ticklabelposition\")),i.noTicklabeloverflow||n(\"ticklabeloverflow\",v.indexOf(\"inside\")!==-1?\"hide past domain\":f===\"category\"||f===\"multicategory\"?\"allow\":\"hide past div\"),Wve(r,a),Rpt(t,r,n,i),Ppt(t,r,n,i),i.noHover||(f!==\"category\"&&n(\"hoverformat\"),i.noUnifiedhovertitle||n(\"unifiedhovertitle.text\"));var x=n(\"color\"),b=x!==AU.color.dflt?x:s.color,p=l.label||a._dfltTitle[o];if(Lpt(t,r,n,f,i),!u)return r;n(\"title.text\",p),e4.coerceFont(n,\"title.font\",s,{overrideDflt:{size:e4.bigFont(s.size),color:b}}),Hve(t,r,n,f);var C=i.hasMinor;if(C&&(Ept.newContainer(r,\"minor\"),Hve(t,r,n,f,{isMinor:!0})),kpt(t,r,n,f,i),jve(t,r,n,i),C){var E=i.isMinor;i.isMinor=!0,jve(t,r,n,i),i.isMinor=E}Ipt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:C,attributes:AU}),C&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n(\"mirror\");var A=f===\"multicategory\";if(!i.noTickson&&(f===\"category\"||A)&&(r.ticks||r.showgrid)&&(A?(n(\"tickson\",\"boundaries\"),delete r.ticklabelposition):n(\"tickson\")),A){var L=n(\"showdividers\");L&&(n(\"dividercolor\"),n(\"dividerwidth\"))}if(f===\"date\")if(Cpt(t,r,{name:\"rangebreaks\",inclusionAttr:\"enabled\",handleItemDefaults:Fpt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var _=0;_<r.rangebreaks.length;_++)if(r.rangebreaks[_].pattern===nI){r._hasDayOfWeekBreaks=!0;break}if(Wve(r,a),a._has(\"scattergl\")||a._has(\"splom\"))for(var k=0;k<i.data.length;k++){var M=i.data[k];(M.type===\"scattergl\"||M.type===\"splom\")&&(M.visible=!1,e4.warn(M.type+\" traces do not work on axes with rangebreaks. Setting trace \"+M.index+\" to `visible: false`.\"))}}return r};function Fpt(e,t,r){function n(h,d){return e4.coerce(e,t,AU.rangebreaks,h,d)}var i=n(\"enabled\");if(i){var a=n(\"bounds\");if(a&&a.length>=2){var o=\"\",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=Xve(a[s]),l){o=nI;break}}var u=n(\"pattern\",o);if(u===nI)for(s=0;s<2;s++)l=Xve(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case nI:if(!Gve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case Dpt:if(!Gve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(a[0]<c[0]&&a[1]>c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]<c[1]){t.enabled=!1;return}}}else{var f=n(\"values\");if(f&&f.length)n(\"dvalue\");else{t.enabled=!1;return}}}}var zpt={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function Xve(e){if(typeof e==\"string\")return zpt[e.substr(0,3).toLowerCase()]}});var oI=ye((bor,Yve)=>{\"use strict\";var Opt=Eo(),aI=Dr();Yve.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,x;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+\"side\"].split(\" \")[0],d=l.domain[s][h===\"right\"||h===\"top\"?1:0])),f=f||[0,1],c=c||(Opt(t.position)?\"free\":a[0]||\"free\"),h=h||(s===\"x\"?\"bottom\":\"left\"),d=d||0,v=0,x=!1;var b=aI.coerce(t,r,{anchor:{valType:\"enumerated\",values:[\"free\"].concat(a),dflt:c}},\"anchor\"),p=aI.coerce(t,r,{side:{valType:\"enumerated\",values:s===\"x\"?[\"bottom\",\"top\"]:[\"left\",\"right\"],dflt:h}},\"side\");if(b===\"free\"){if(s===\"y\"){var C=n(\"autoshift\");C&&(d=p===\"left\"?u[0]:u[1],x=r.automargin?r.automargin:!0,v=p===\"left\"?-3:3),n(\"shift\",v)}n(\"position\",d)}n(\"automargin\",x);var E=!1;if(o.length&&(E=aI.coerce(t,r,{overlaying:{valType:\"enumerated\",values:[!1].concat(o),dflt:!1}},\"overlaying\")),!E){var A=n(\"domain\",f);A[0]>A[1]-1/4096&&(r.domain=f),aI.noneOrAll(t.domain,r.domain,f),r.tickmode===\"sync\"&&(r.tickmode=\"auto\")}return n(\"layer\"),r}});var npe=ye((wor,ipe)=>{\"use strict\";var jb=Dr(),Kve=Ca(),qpt=rp().isUnifiedHover,Bpt=VB(),Jve=pl(),Npt=s3(),$ve=Rd(),Upt=TU(),Qve=t4(),Vpt=Bb(),epe=oI(),MU=hf(),km=MU.id2name,tpe=MU.name2id,Gpt=hd().AX_ID_PATTERN,rpe=qa(),sI=rpe.traceIs,SU=rpe.getComponentMethod;function lI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}ipe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},x,b;for(x=0;x<n.length;x++){var p=n[x];if(sI(p,\"cartesian\")){var C;if(p.xaxis)C=km(p.xaxis),lI(a,C,p);else if(p.xaxes)for(b=0;b<p.xaxes.length;b++)lI(a,km(p.xaxes[b]),p);var E;if(p.yaxis)E=km(p.yaxis),lI(a,E,p);else if(p.yaxes)for(b=0;b<p.yaxes.length;b++)lI(a,km(p.yaxes[b]),p);if(p.type===\"funnel\"?p.orientation===\"h\"?(C&&(o[C]=!0),E&&(f[E]=!0)):E&&(s[E]=!0):p.type===\"image\"?(E&&(h[E]=!0),C&&(h[C]=!0)):(E&&(u[E]=!0,c[E]=!0),(!sI(p,\"carpet\")||p.type===\"carpet\"&&!p._cheater)&&C&&(l[C]=!0)),p.type===\"carpet\"&&p._cheater&&C&&(o[C]=!0),sI(p,\"2dMap\")&&(d[C]=!0,d[E]=!0),sI(p,\"oriented\")){var A=p.orientation===\"h\"?E:C;v[A]=!0}}}var L=r._subplots,_=L.xaxis,k=L.yaxis,M=jb.simpleMap(_,km),g=jb.simpleMap(k,km),P=M.concat(g),T=Kve.background;_.length&&k.length&&(T=jb.coerce(t,r,Npt,\"plot_bgcolor\"));var z=Kve.combine(T,r.paper_bgcolor),O,V,G,Z,H;function N(){var Et=a[O]||[];H._traceIndices=Et.map(function(er){return er.index}),H._annIndices=[],H._shapeIndices=[],H._selectionIndices=[],H._imgIndices=[],H._subplotsWith=[],H._counterAxes=[],H._name=H._attr=O,H._id=V}function j(Et,er){return jb.coerce(Z,H,$ve,Et,er)}function re(Et,er){return jb.coerce2(Z,H,$ve,Et,er)}function oe(Et){return Et===\"x\"?k:_}function _e(Et,er){for(var Ut=Et===\"x\"?M:g,Ft=[],bt=0;bt<Ut.length;bt++){var yt=Ut[bt];yt!==er&&!(t[yt]||{}).overlaying&&Ft.push(tpe(yt))}return Ft}var Me={x:oe(\"x\"),y:oe(\"y\")},ke=Me.x.concat(Me.y),me={},ie=[];function Se(){var Et=Z.matches;Gpt.test(Et)&&ke.indexOf(Et)===-1&&(me[Et]=Z.type,ie=Object.keys(me))}var Le=Bpt(t,r),Ae=qpt(Le);for(x=0;x<P.length;x++){O=P[x],V=tpe(O),G=O.charAt(0),jb.isPlainObject(t[O])||(t[O]={}),Z=t[O],H=Jve.newContainer(r,O,G+\"axis\"),N();var De=G===\"x\"&&!l[O]&&o[O]||G===\"y\"&&!u[O]&&s[O],Pe=G===\"y\"&&(!c[O]&&f[O]||h[O]),ge={hasMinor:!0,letter:G,font:r.font,outerTicks:d[O],showGrid:!v[O],data:a[O]||[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:De,reverseDflt:Pe,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[V],noAutotickangles:G===\"y\"};j(\"uirevision\",r.uirevision),Upt(Z,H,j,ge),Qve(Z,H,j,ge,r);var Fe=Ae&&G===Le.charAt(0),ce=re(\"spikecolor\",Ae?H.color:void 0),Ze=re(\"spikethickness\",Ae?1.5:void 0),ct=re(\"spikedash\",Ae?\"dot\":void 0),pt=re(\"spikemode\",Ae?\"across\":void 0),Wt=re(\"spikesnap\"),st=j(\"showspikes\",!!Fe||!!ce||!!Ze||!!ct||!!pt||!!Wt);st||(delete H.spikecolor,delete H.spikethickness,delete H.spikedash,delete H.spikemode,delete H.spikesnap);var lt=km(Z.overlaying),Gt=[0,1];if(r[lt]!==void 0){var Nt=km(r[lt].anchor);r[Nt]!==void 0&&(Gt=r[Nt].domain)}epe(Z,H,j,{letter:G,counterAxes:Me[G],overlayableAxes:_e(G,O),grid:r.grid,overlayingDomain:Gt}),j(\"title.standoff\"),Se(),H._input=Z}for(x=0;x<ie.length;){V=ie[x++],O=km(V),G=O.charAt(0),jb.isPlainObject(t[O])||(t[O]={}),Z=t[O],H=Jve.newContainer(r,O,G+\"axis\"),N();var $t={letter:G,font:r.font,outerTicks:d[O],showGrid:!v[O],data:[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[V]};j(\"uirevision\",r.uirevision),H.type=me[V]||\"linear\",Qve(Z,H,j,$t,r),epe(Z,H,j,{letter:G,counterAxes:Me[G],overlayableAxes:_e(G,O),grid:r.grid}),j(\"fixedrange\"),j(\"modebardisable\"),Se(),H._input=Z}var sr=SU(\"rangeslider\",\"handleDefaults\"),wr=SU(\"rangeselector\",\"handleDefaults\");for(x=0;x<M.length;x++)O=M[x],Z=t[O],H=r[O],sr(t,r,O),H.type===\"date\"&&wr(Z,H,r,g,H.calendar),j(\"fixedrange\"),j(\"modebardisable\");for(x=0;x<g.length;x++){O=g[x],Z=t[O],H=r[O];var ur=r[km(H.anchor)],Qe=SU(\"rangeslider\",\"isVisible\")(ur);j(\"fixedrange\",Qe),j(\"modebardisable\")}Vpt.handleDefaults(t,r,{axIds:ke.concat(ie).sort(MU.idSort),axHasImage:h})}});var spe=ye((Tor,ope)=>{\"use strict\";var Hpt=Oa(),ape=qa(),uI=Dr(),Qp=So(),cI=ho();ope.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){cI.redrawComponents(t);return}function o(b){var p=b.xaxis,C=b.yaxis;a._defs.select(\"#\"+b.clipId+\"> rect\").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,C._offset).call(Qp.setScale,1,1);var E=b.plot.selectAll(\".scatterlayer .trace\");E.selectAll(\".point\").call(Qp.setPointGroupScale,1,1),E.selectAll(\".textpoint\").call(Qp.setTextPointsScale,1,1),E.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var C=b.plotinfo,E=C.xaxis,A=C.yaxis,L=E._length,_=A._length,k=!!b.xr1,M=!!b.yr1,g=[];if(k){var P=uI.simpleMap(b.xr0,E.r2l),T=uI.simpleMap(b.xr1,E.r2l),z=P[1]-P[0],O=T[1]-T[0];g[0]=(P[0]*(1-p)+p*T[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*O/z),E.range[0]=E.l2r(P[0]*(1-p)+p*T[0]),E.range[1]=E.l2r(P[1]*(1-p)+p*T[1])}else g[0]=0,g[2]=L;if(M){var V=uI.simpleMap(b.yr0,A.r2l),G=uI.simpleMap(b.yr1,A.r2l),Z=V[1]-V[0],H=G[1]-G[0];g[1]=(V[1]*(1-p)+p*G[1]-V[1])/(V[0]-V[1])*_,g[3]=_*(1-p+p*H/Z),A.range[0]=E.l2r(V[0]*(1-p)+p*G[0]),A.range[1]=A.l2r(V[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=_;cI.drawOne(t,E,{skipTitle:!0}),cI.drawOne(t,A,{skipTitle:!0}),cI.redrawComponents(t,[E._id,A._id]);var N=k?L/g[2]:1,j=M?_/g[3]:1,re=k?g[0]:0,oe=M?g[1]:0,_e=k?g[0]/g[2]*L:0,Me=M?g[1]/g[3]*_:0,ke=E._offset-_e,me=A._offset-Me;C.clipRect.call(Qp.setTranslate,re,oe).call(Qp.setScale,1/N,1/j),C.plot.call(Qp.setTranslate,ke,me).call(Qp.setScale,N,j),Qp.setPointGroupScale(C.zoomScalePts,1/N,1/j),Qp.setTextPointsScale(C.zoomScaleTxt,1/N,1/j)}var l;i&&(l=i());function u(){for(var b={},p=0;p<r.length;p++){var C=r[p],E=C.plotinfo.xaxis,A=C.plotinfo.yaxis;C.xr1&&(b[E._name+\".range\"]=C.xr1.slice()),C.yr1&&(b[A._name+\".range\"]=C.yr1.slice())}return l&&l(),ape.call(\"relayout\",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}function c(){for(var b={},p=0;p<r.length;p++){var C=r[p],E=C.plotinfo.xaxis,A=C.plotinfo.yaxis;C.xr0&&(b[E._name+\".range\"]=C.xr0.slice()),C.yr0&&(b[A._name+\".range\"]=C.yr0.slice())}return ape.call(\"relayout\",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}var f,h,d,v=Hpt.ease(n.easing);t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,c()});function x(){h=Date.now();for(var b=Math.min(1,(h-f)/n.duration),p=v(b),C=0;C<r.length;C++)s(r[C],p);h-f>n.duration?(u(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return f=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var vh=ye(xv=>{\"use strict\";var hI=Oa(),lpe=qa(),Wb=Dr(),jpt=Mc(),Wpt=So(),upe=Id().getModuleCalcData,g_=hf(),Fg=hd(),Xpt=Wp(),iu=Wb.ensureSingle;function fI(e,t,r){return Wb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Xb=Fg.zindexSeparator;xv.name=\"cartesian\";xv.attr=[\"xaxis\",\"yaxis\"];xv.idRoot=[\"x\",\"y\"];xv.idRegex=Fg.idRegex;xv.attrRegex=Fg.attrRegex;xv.attributes=zve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=npe();xv.transitionAxes=spe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u<o.length;u++){var h=o[u].split(\"y\");s[h[0]]=1,l[\"y\"+h[1]]=1}for(u=0;u<n.length;u++)c=n[u],s[c]||(f=(e[g_.id2name(c)]||{}).anchor,Fg.idRegex.y.test(f)||(f=\"y\"),a.push(c+f),o.push(c+f),l[f]||(l[f]=1,Wb.pushUnique(i,f)));for(u=0;u<i.length;u++)f=i[u],l[f]||(c=(e[g_.id2name(f)]||{}).anchor,Fg.idRegex.x.test(c)||(c=\"x\"),a.push(c+f),o.push(c+f),s[c]||(s[c]=1,Wb.pushUnique(n,c)));if(!o.length){c=\"\",f=\"\";for(var d in e)if(Fg.attrRegex.test(d)){var v=d.charAt(0);v===\"x\"?(!c||+d.substr(5)<+c.substr(5))&&(c=d):(!f||+d.substr(5)<+f.substr(5))&&(f=d)}c=c?g_.name2id(c):\"x\",f=f?g_.name2id(f):\"y\",n.push(c),i.push(f),a.push(c+f)}};xv.plot=function(e,t,r,n){var i=e._fullLayout,a=i._subplots.cartesian,o=e.calcdata,s;if(!Array.isArray(t))for(t=[],s=0;s<o.length;s++)t.push(s);for(var l=i._zindices,u=0;u<l.length;u++){var c=l[u];for(s=0;s<a.length;s++){var f=a[s],h=i._plots[f];if(u>0){var d=h.id;if(d.indexOf(Xb)!==-1)continue;d+=Xb+(u+1),h=Wb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(\".subplot\").select(\".\"+d)})}for(var v=[],x,b=0;b<o.length;b++){var p=o[b],C=p[0].trace;c===(C.zorder||0)&&C.xaxis+C.yaxis===f&&((t.indexOf(C.index)!==-1||C.carpet)&&(x&&x[0].trace.xaxis+x[0].trace.yaxis===f&&[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(C.fill)!==-1&&v.indexOf(x)===-1&&v.push(x),v.push(p)),x=p)}cpe(e,h,v,r,n)}}};function cpe(e,t,r,n,i){for(var a=Fg.traceLayerClasses,o=e._fullLayout,s=o._zindices,l=o._modules,u,c,f,h=[],d=[],v=0;v<s.length;v++)for(var x=s[v],b=0;b<l.length;b++){u=l[b];var p=u.name,C=lpe.modules[p].categories;if(C.svg){var E=u.layerName||p+\"layer\",A=E+(v?Number(v)+1:\"\"),L=u.plot;c=upe(r,L,x),f=c[0],r=c[1],f.length&&h.push({i:a.indexOf(E),zindex:v,className:A,plotMethod:L,cdModule:f}),C.zoomScale&&d.push(\".\"+A)}}h.sort(function(M,g){return(M.zindex||0)-(g.zindex||0)||M.i-g.i});var _=t.plot.selectAll(\"g.mlayer\").data(h,function(M){return M.className});if(_.enter().append(\"g\").attr(\"class\",function(M){return M.className}).classed(\"mlayer\",!0).classed(\"rangeplot\",t.isRangePlot),_.exit().remove(),_.order(),_.each(function(M){var g=hI.select(this),P=M.className;M.plotMethod(e,t,M.cdModule,g,n,i),Fg.clipOnAxisFalseQuery.indexOf(\".\"+P)===-1&&Wpt.setClipUrl(g,t.layerClipId,e)}),o._has(\"scattergl\")&&(u=lpe.getModule(\"scattergl\"),f=upe(r,u)[0],u.plot(e,t,f)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(Fg.clipOnAxisFalseQuery.join(\",\")).selectAll(\".trace\")),d.length)){var k=t.plot.selectAll(d.join(\",\")).selectAll(\".trace\");t.zoomScalePts=k.selectAll(\"path.point\"),t.zoomScaleTxt=k.selectAll(\".textpoint\")}}xv.clean=function(e,t,r,n){var i=n._plots||{},a=t._plots||{},o=n._subplots||{},s,l,u;if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(u in i)s=i[u],s.plotgroup&&s.plotgroup.remove();var c=n._has&&n._has(\"gl\"),f=t._has&&t._has(\"gl\");if(c&&!f)for(u in i)s=i[u],s._scene&&s._scene.destroy();if(o.xaxis&&o.yaxis){var h=g_.listIds({_fullLayout:n});for(l=0;l<h.length;l++){var d=h[l];t[g_.id2name(d)]||n._infolayer.selectAll(\".g-\"+d+\"title\").remove()}}var v=n._has&&n._has(\"cartesian\"),x=t._has&&t._has(\"cartesian\");if(v&&!x)hpe(n._cartesianlayer.selectAll(\".subplot\"),n),n._defs.selectAll(\".axesclip\").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(o.cartesian)for(l=0;l<o.cartesian.length;l++){var b=o.cartesian[l];if(b.indexOf(Xb)===-1&&!a[b]){var p=\".\"+b+\",.\"+b+\"-x,.\"+b+\"-y\";n._cartesianlayer.selectAll(p).remove(),dpe(b,n)}}};xv.drawFramework=function(e){var t=e._fullLayout,r=e.calcdata,n,i={};for(n=0;n<r.length;n++){var a=r[n][0],o=a.trace,s=o.zorder||0;i[s]||(i[s]=[]),i[s].push(a)}var l=Object.keys(i).map(Number).sort(Wb.sorterAsc);l.length||(l=[0]),t._zindices=l;var u=Zpt(e),c=u.length,f=[];for(n=0;n<c;n++)f[n]=u[n].slice();for(var h=1;h<l.length;h++){var d=[];for(n=0;n<c;n++)d[n]=u[n].slice(),d[n][0]+=Xb+(h+1);f=f.concat(d)}var v=t._cartesianlayer.selectAll(\".subplot\").data(f,String);v.enter().append(\"g\").attr(\"class\",function(x){return\"subplot \"+x[0]}),v.order(),v.exit().call(hpe,t),v.each(function(x){var b=x[0],p=b.indexOf(Xb),C=p!==-1,E=C?b.slice(0,p):b,A=t._plots[b];A||(A=Wb.extendFlat({},t._plots[E]),A&&(A.id=b,t._plots[b]=A,t._subplots.cartesian.push(b))),A&&(A.plotgroup=hI.select(this),fpe(e,A),C||(A.draglayer=iu(t._draggers,\"g\",b)))})};xv.rangePlot=function(e,t,r){fpe(e,t),cpe(e,t,r),jpt.style(e)};function Zpt(e){var t=e._fullLayout,r=t._zindices.length,n=t._subplots.cartesian,i=n.length,a,o,s,l,u,c,f=[],h=[];for(a=0;a<i;a++){s=n[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;var d=u._mainAxis,v=c._mainAxis,x=d._id+v._id,b=t._plots[x];l.overlays=[],x!==s&&b?(l.mainplot=x,l.mainplotinfo=b,h.push(s)):(l.mainplot=void 0,l.mainplotinfo=void 0,f.push(s))}for(a=0;a<h.length;a++)s=h[a],l=t._plots[s],l.mainplotinfo.overlays.push(l);var p=f.concat(h),C=[];for(a=0;a<i;a++){s=p[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;for(var E=[],A=1;A<=r;A++){var L=\"\";for(A>1&&(L+=Xb+A),E.push(s+L),o=0;o<l.overlays.length;o++)E.push(l.overlays[o].id+L)}E=E.concat([u.layer,c.layer,u.overlaying||\"\",c.overlaying||\"\"]),C.push(E)}return C}function fpe(e,t){var r=e._fullLayout,n=t.plotgroup,i=t.id,a=i.indexOf(Xb),o=a!==-1,s=Fg.layerValue2layerClass[t.xaxis.layer],l=Fg.layerValue2layerClass[t.yaxis.layer],u=r._hasOnlyLargeSploms,c=r._zindices.length>1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,\"path\",\"xlines-above\"),t.ylines=iu(n,\"path\",\"ylines-above\"),t.xaxislayer=iu(n,\"g\",\"xaxislayer-above\"),t.yaxislayer=iu(n,\"g\",\"yaxislayer-above\");else{if(!o){var h=iu(n,\"g\",\"layer-subplot\");t.shapelayer=iu(h,\"g\",\"shapelayer\"),t.imagelayer=iu(h,\"g\",\"imagelayer\"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,\"g\",\"minor-gridlayer\"),t.gridlayer=iu(n,\"g\",\"gridlayer\"),t.zerolinelayer=iu(n,\"g\",\"zerolinelayer\"));var d=iu(n,\"g\",\"layer-between\");t.shapelayerBetween=iu(d,\"g\",\"shapelayer\"),t.imagelayerBetween=iu(d,\"g\",\"imagelayer\"),iu(n,\"path\",\"xlines-below\"),iu(n,\"path\",\"ylines-below\"),t.overlinesBelow=iu(n,\"g\",\"overlines-below\"),iu(n,\"g\",\"xaxislayer-below\"),iu(n,\"g\",\"yaxislayer-below\"),t.overaxesBelow=iu(n,\"g\",\"overaxes-below\")}t.overplot=iu(n,\"g\",\"overplot\"),t.plot=iu(t.overplot,\"g\",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,\"g\",\"zerolinelayer-above\"),o||(t.xlines=iu(n,\"path\",\"xlines-above\"),t.ylines=iu(n,\"path\",\"ylines-above\"),t.overlinesAbove=iu(n,\"g\",\"overlines-above\"),iu(n,\"g\",\"xaxislayer-above\"),iu(n,\"g\",\"yaxislayer-above\"),t.overaxesAbove=iu(n,\"g\",\"overaxes-above\"),t.xlines=n.select(\".xlines-\"+s),t.ylines=n.select(\".ylines-\"+l),t.xaxislayer=n.select(\".xaxislayer-\"+s),t.yaxislayer=n.select(\".yaxislayer-\"+l))}else{var v=f.plotgroup,x=i+\"-x\",b=i+\"-y\";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,\"path\",x),iu(f.overlinesBelow,\"path\",b),iu(f.overaxesBelow,\"g\",x),iu(f.overaxesBelow,\"g\",b),t.plot=iu(f.overplot,\"g\",i),iu(f.overlinesAbove,\"path\",x),iu(f.overlinesAbove,\"path\",b),iu(f.overaxesAbove,\"g\",x),iu(f.overaxesAbove,\"g\",b),t.xlines=v.select(\".overlines-\"+s).select(\".\"+x),t.ylines=v.select(\".overlines-\"+l).select(\".\"+b),t.xaxislayer=v.select(\".overaxes-\"+s).select(\".\"+x),t.yaxislayer=v.select(\".overaxes-\"+l).select(\".\"+b)}o||(u||(fI(t.minorGridlayer,\"g\",t.xaxis._id),fI(t.minorGridlayer,\"g\",t.yaxis._id),t.minorGridlayer.selectAll(\"g\").map(function(p){return p[0]}).sort(g_.idSort),fI(t.gridlayer,\"g\",t.xaxis._id),fI(t.gridlayer,\"g\",t.yaxis._id),t.gridlayer.selectAll(\"g\").map(function(p){return p[0]}).sort(g_.idSort)),t.xlines.style(\"fill\",\"none\").classed(\"crisp\",!0),t.ylines.style(\"fill\",\"none\").classed(\"crisp\",!0))}function hpe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=hI.select(this);c.remove(),dpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(\".trace\").remove()}}}function dpe(e,t){t._draggers.selectAll(\"g.\"+e).remove(),t._defs.select(\"#clip\"+t._uid+e+\"plot\").remove()}xv.toSVG=function(e){var t=e._fullLayout._glimages,r=hI.select(e).selectAll(\".svg-container\"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\");function i(){var a=this,o=a.toDataURL(\"image/png\"),s=t.append(\"svg:image\");s.attr({xmlns:Xpt.svg,\"xlink:href\":o,preserveAspectRatio:\"none\",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i)};xv.updateFx=BN().updateFx});var ppe=ye((Sor,vpe)=>{\"use strict\";var dI=Ru();vpe.exports={hasLines:dI.hasLines,hasMarkers:dI.hasMarkers,hasText:dI.hasText,isBubble:dI.isBubble,attributes:pf(),layoutAttributes:j6(),supplyDefaults:Ude(),crossTraceDefaults:iU(),supplyLayoutDefaults:jde(),calc:O0().calc,crossTraceCalc:pve(),arraysToCalcdata:Cm(),plot:iT(),colorbar:$d(),formatLabels:tI(),style:ap().style,styleOnSelect:ap().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}});var ype=ye((Mor,mpe)=>{\"use strict\";var Ypt=Oa(),Kpt=Ca(),gpe=LN(),EU=Dr(),Jpt=EU.strScale,$pt=EU.strRotate,Qpt=EU.strTranslate;mpe.exports=function(t,r,n){var i=t.node(),a=gpe[n.arrowhead||0],o=gpe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf(\"start\")>=0,c=r.indexOf(\"end\")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,x,b;if(i.nodeName===\"line\"){d={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},v={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var p=d.x-v.x,C=d.y-v.y;if(x=Math.atan2(C,p),b=x+Math.PI,f&&h&&f+h>Math.sqrt(p*p+C*C)){V();return}if(f){if(f*f>p*p+C*C){V();return}var E=f*Math.cos(x),A=f*Math.sin(x);v.x+=E,v.y+=A,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+C*C){V();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName===\"path\"){var k=i.getTotalLength(),M=\"\";if(k<f+h){V();return}var g=i.getPointAtLength(0),P=i.getPointAtLength(.1);x=Math.atan2(g.y-P.y,g.x-P.x),d=i.getPointAtLength(Math.min(h,k)),M=\"0px,\"+h+\"px,\";var T=i.getPointAtLength(k),z=i.getPointAtLength(k-.1);b=Math.atan2(T.y-z.y,T.x-z.x),v=i.getPointAtLength(Math.max(0,k-f));var O=M?h+f:f;M+=k-O+\"px,\"+k+\"px\",t.style(\"stroke-dasharray\",M)}function V(){t.style(\"stroke-dasharray\",\"0px,100px\")}function G(Z,H,N,j){Z.path&&(Z.noRotate&&(N=0),Ypt.select(i.parentNode).append(\"path\").attr({class:t.attr(\"class\"),d:Z.path,transform:Qpt(H.x,H.y)+$pt(N*180/Math.PI)+Jpt(j)}).style({fill:Kpt.rgb(n.arrowcolor),\"stroke-width\":0}))}u&&G(o,d,x,l),c&&G(a,v,b,s)}});var vI=ye((Eor,Tpe)=>{\"use strict\";var _pe=Oa(),CU=qa(),e0t=Mc(),y_=Dr(),kU=y_.strTranslate,i4=ho(),Zb=Ca(),Py=So(),xpe=vf(),LU=ru(),PU=Tg(),r4=yv(),t0t=pl().arrayEditor,r0t=ype();Tpe.exports={draw:i0t,drawOne:bpe,drawRaw:wpe};function i0t(e){var t=e._fullLayout;t._infolayer.selectAll(\".annotation\").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&bpe(e,r);return e0t.previousPromises(e)}function bpe(e,t){var r=e._fullLayout,n=r.annotations[t]||{},i=i4.getFromId(e,n.xref),a=i4.getFromId(e,n.yref);i&&i.setScale(),a&&a.setScale(),wpe(e,n,t,!1,i,a)}function m_(e,t,r,n,i){var a=i[r],o=i[r+\"ref\"],s=r.indexOf(\"y\")!==-1,l=i4.getRefType(o)===\"domain\",u=s?n.h:n.w;return e?l?a+(s?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(s?-t:t)/u}function wpe(e,t,r,n,i,a){var o=e._fullLayout,s=e._fullLayout._size,l=e._context.edits,u,c;n?(u=\"annotation-\"+n,c=n+\".annotations\"):(u=\"annotation\",c=\"annotations\");var f=t0t(e.layout,c,t),h=f.modifyBase,d=f.modifyItem,v=f.getUpdateObj;o._infolayer.selectAll(\".\"+u+'[data-index=\"'+r+'\"]').remove();var x=\"clip\"+o._uid+\"_ann\"+r;if(!t._input||t.visible===!1){_pe.selectAll(\"#\"+x).remove();return}var b={x:{},y:{}},p=+t.textangle||0,C=o._infolayer.append(\"g\").classed(u,!0).attr(\"data-index\",String(r)).style(\"opacity\",t.opacity),E=C.append(\"g\").classed(\"annotation-text-g\",!0),A=l[t.showarrow?\"annotationTail\":\"annotationPosition\"],L=t.captureevents||l.annotationText||A;function _(j){var re={index:r,annotation:t._input,fullAnnotation:t,event:j};return n&&(re.subplotId=n),re}var k=E.append(\"g\").style(\"pointer-events\",L?\"all\":null).call(PU,\"pointer\").on(\"click\",function(){e._dragging=!1,e.emit(\"plotly_clickannotation\",_(_pe.event))});t.hovertext&&k.on(\"mouseover\",function(){var j=t.hoverlabel,re=j.font,oe=this.getBoundingClientRect(),_e=e.getBoundingClientRect();xpe.loneHover({x0:oe.left-_e.left,x1:oe.right-_e.left,y:(oe.top+oe.bottom)/2-_e.top,text:t.hovertext,color:j.bgcolor,borderColor:j.bordercolor,fontFamily:re.family,fontSize:re.size,fontColor:re.color,fontWeight:re.weight,fontStyle:re.style,fontVariant:re.variant,fontShadow:re.fontShadow,fontLineposition:re.fontLineposition,fontTextcase:re.fontTextcase},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:e})}).on(\"mouseout\",function(){xpe.loneUnhover(o._hoverlayer.node())});var M=t.borderwidth,g=t.borderpad,P=M+g,T=k.append(\"rect\").attr(\"class\",\"bg\").style(\"stroke-width\",M+\"px\").call(Zb.stroke,t.bordercolor).call(Zb.fill,t.bgcolor),z=t.width||t.height,O=o._topclips.selectAll(\"#\"+x).data(z?[0]:[]);O.enter().append(\"clipPath\").classed(\"annclip\",!0).attr(\"id\",x).append(\"rect\"),O.exit().remove();var V=t.font,G=o._meta?y_.templateString(t.text,o._meta):t.text,Z=k.append(\"text\").classed(\"annotation-text\",!0).text(G);function H(j){return j.call(Py.font,V).attr({\"text-anchor\":{left:\"start\",right:\"end\"}[t.align]||\"middle\"}),LU.convertToTspans(j,e,N),j}function N(){var j=Z.selectAll(\"a\");if(j.size()===1&&j.text()===Z.text()){var re=k.insert(\"a\",\":first-child\").attr({\"xlink:xlink:href\":j.attr(\"xlink:href\"),\"xlink:xlink:show\":j.attr(\"xlink:show\")}).style({cursor:\"pointer\"});re.node().appendChild(T.node())}var oe=k.select(\".annotation-text-math-group\"),_e=!oe.empty(),Me=Py.bBox((_e?oe:Z).node()),ke=Me.width,me=Me.height,ie=t.width||ke,Se=t.height||me,Le=Math.round(ie+2*P),Ae=Math.round(Se+2*P);function De(je,$e){return $e===\"auto\"&&(je<1/3?$e=\"left\":je>2/3?$e=\"right\":$e=\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$e]}for(var Pe=!1,ge=[\"x\",\"y\"],Fe=0;Fe<ge.length;Fe++){var ce=ge[Fe],Ze=t[ce+\"ref\"]||ce,ct=t[\"a\"+ce+\"ref\"],pt={x:i,y:a}[ce],Wt=(p+(ce===\"x\"?0:-90))*Math.PI/180,st=Le*Math.cos(Wt),lt=Ae*Math.sin(Wt),Gt=Math.abs(st)+Math.abs(lt),Nt=t[ce+\"anchor\"],$t=t[ce+\"shift\"]*(ce===\"x\"?1:-1),sr=b[ce],wr,ur,Qe,Et,er,Ut=i4.getRefType(Ze);if(pt&&Ut!==\"domain\"){var Ft=pt.r2fraction(t[ce]);(Ft<0||Ft>1)&&(ct===Ze?(Ft=pt.r2fraction(t[\"a\"+ce]),(Ft<0||Ft>1)&&(Pe=!0)):Pe=!0),wr=pt._offset+pt.r2p(t[ce]),Et=.5}else{var bt=Ut===\"domain\";ce===\"x\"?(Qe=t[ce],wr=bt?pt._offset+pt._length*Qe:wr=s.l+s.w*Qe):(Qe=1-t[ce],wr=bt?pt._offset+pt._length*Qe:wr=s.t+s.h*Qe),Et=t.showarrow?.5:Qe}if(t.showarrow){sr.head=wr;var yt=t[\"a\"+ce];if(er=st*De(.5,t.xanchor)-lt*De(.5,t.yanchor),ct===Ze){var Yt=i4.getRefType(ct);Yt===\"domain\"?(ce===\"y\"&&(yt=1-yt),sr.tail=pt._offset+pt._length*yt):Yt===\"paper\"?ce===\"y\"?(yt=1-yt,sr.tail=s.t+s.h*yt):sr.tail=s.l+s.w*yt:sr.tail=pt._offset+pt.r2p(yt),ur=er}else sr.tail=wr+yt,ur=er+yt;sr.text=sr.tail+er;var lr=o[ce===\"x\"?\"width\":\"height\"];if(Ze===\"paper\"&&(sr.head=y_.constrain(sr.head,1,lr-1)),ct===\"pixel\"){var Tr=-Math.max(sr.tail-3,sr.text),Rr=Math.min(sr.tail+3,sr.text)-lr;Tr>0?(sr.tail+=Tr,sr.text+=Tr):Rr>0&&(sr.tail-=Rr,sr.text-=Rr)}sr.tail+=$t,sr.head+=$t}else er=Gt*De(Et,Nt),ur=er,sr.text=wr+er;sr.text+=$t,er+=$t,ur+=$t,t[\"_\"+ce+\"padplus\"]=Gt/2+ur,t[\"_\"+ce+\"padminus\"]=Gt/2-ur,t[\"_\"+ce+\"size\"]=Gt,t[\"_\"+ce+\"shift\"]=er}if(Pe){k.remove();return}var ei=0,Wr=0;if(t.align!==\"left\"&&(ei=(ie-ke)*(t.align===\"center\"?.5:1)),t.valign!==\"top\"&&(Wr=(Se-me)*(t.valign===\"middle\"?.5:1)),_e)oe.select(\"svg\").attr({x:P+ei-1,y:P+Wr}).call(Py.setClipUrl,z?x:null,e);else{var Ur=P+Wr-Me.top,dt=P+ei-Me.left;Z.call(LU.positionText,dt,Ur).call(Py.setClipUrl,z?x:null,e)}O.select(\"rect\").call(Py.setRect,P,P,ie,Se),T.call(Py.setRect,M/2,M/2,Le-M,Ae-M),k.call(Py.setTranslate,Math.round(b.x.text-Le/2),Math.round(b.y.text-Ae/2)),E.attr({transform:\"rotate(\"+p+\",\"+b.x.text+\",\"+b.y.text+\")\"});var Ge=function(je,$e){C.selectAll(\".annotation-arrow-g\").remove();var wt=b.x.head,Ie=b.y.head,xe=b.x.tail+je,Ce=b.y.tail+$e,vt=b.x.text+je,nr=b.y.text+$e,ir=y_.rotationXYMatrix(p,vt,nr),pr=y_.apply2DTransform(ir),oi=y_.apply2DTransform2(ir),di=+T.attr(\"width\"),Jr=+T.attr(\"height\"),fi=vt-.5*di,Hi=fi+di,Pn=nr-.5*Jr,wn=Pn+Jr,pn=[[fi,Pn,fi,wn],[fi,wn,Hi,wn],[Hi,wn,Hi,Pn],[Hi,Pn,fi,Pn]].map(oi);if(!pn.reduce(function($r,zi){return $r^!!y_.segmentsIntersect(wt,Ie,wt+1e6,Ie+1e6,zi[0],zi[1],zi[2],zi[3])},!1)){pn.forEach(function($r){var zi=y_.segmentsIntersect(xe,Ce,wt,Ie,$r[0],$r[1],$r[2],$r[3]);zi&&(xe=zi.x,Ce=zi.y)});var Vn=t.arrowwidth,kn=t.arrowcolor,ea=t.arrowside,ua=C.append(\"g\").style({opacity:Zb.opacity(kn)}).classed(\"annotation-arrow-g\",!0),Vt=ua.append(\"path\").attr(\"d\",\"M\"+xe+\",\"+Ce+\"L\"+wt+\",\"+Ie).style(\"stroke-width\",Vn+\"px\").call(Zb.stroke,Zb.rgb(kn));if(r0t(Vt,ea,t),l.annotationPosition&&Vt.node().parentNode&&!n){var _t=wt,tr=Ie;if(t.standoff){var ar=Math.sqrt(Math.pow(wt-xe,2)+Math.pow(Ie-Ce,2));_t+=t.standoff*(xe-wt)/ar,tr+=t.standoff*(Ce-Ie)/ar}var Er=ua.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(xe-_t)+\",\"+(Ce-tr),transform:kU(_t,tr)}).style(\"stroke-width\",Vn+6+\"px\").call(Zb.stroke,\"rgba(0,0,0,0)\").call(Zb.fill,\"rgba(0,0,0,0)\"),Zr,ri;r4.init({element:Er.node(),gd:e,prepFn:function(){var $r=Py.getTranslate(k);Zr=$r.x,ri=$r.y,i&&i.autorange&&h(i._name+\".autorange\",!0),a&&a.autorange&&h(a._name+\".autorange\",!0)},moveFn:function($r,zi){var Ji=pr(Zr,ri),en=Ji[0]+$r,cn=Ji[1]+zi;k.call(Py.setTranslate,en,cn),d(\"x\",m_(i,$r,\"x\",s,t)),d(\"y\",m_(a,zi,\"y\",s,t)),t.axref===t.xref&&d(\"ax\",m_(i,$r,\"ax\",s,t)),t.ayref===t.yref&&d(\"ay\",m_(a,zi,\"ay\",s,t)),ua.attr(\"transform\",kU($r,zi)),E.attr({transform:\"rotate(\"+p+\",\"+en+\",\"+cn+\")\"})},doneFn:function(){CU.call(\"_guiRelayout\",e,v());var $r=document.querySelector(\".js-notes-box-panel\");$r&&$r.redraw($r.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),A){var Je;r4.init({element:k.node(),gd:e,prepFn:function(){Je=E.attr(\"transform\")},moveFn:function(je,$e){var wt=\"pointer\";if(t.showarrow)t.axref===t.xref?d(\"ax\",m_(i,je,\"ax\",s,t)):d(\"ax\",t.ax+je),t.ayref===t.yref?d(\"ay\",m_(a,$e,\"ay\",s.w,t)):d(\"ay\",t.ay+$e),Ge(je,$e);else{if(n)return;var Ie,xe;if(i)Ie=m_(i,je,\"x\",s,t);else{var Ce=t._xsize/s.w,vt=t.x+(t._xshift-t.xshift)/s.w-Ce/2;Ie=r4.align(vt+je/s.w,Ce,0,1,t.xanchor)}if(a)xe=m_(a,$e,\"y\",s,t);else{var nr=t._ysize/s.h,ir=t.y-(t._yshift+t.yshift)/s.h-nr/2;xe=r4.align(ir-$e/s.h,nr,0,1,t.yanchor)}d(\"x\",Ie),d(\"y\",xe),(!i||!a)&&(wt=r4.getCursor(i?.5:Ie,a?.5:xe,t.xanchor,t.yanchor))}E.attr({transform:kU(je,$e)+Je}),PU(k,wt)},clickFn:function(je,$e){t.captureevents&&e.emit(\"plotly_clickannotation\",_($e))},doneFn:function(){PU(k),CU.call(\"_guiRelayout\",e,v());var je=document.querySelector(\".js-notes-box-panel\");je&&je.redraw(je.selectedObj)}})}}l.annotationText?Z.call(LU.makeEditable,{delegate:k,gd:e}).call(H).on(\"edit\",function(j){t.text=j,this.call(H),d(\"text\",j),i&&i.autorange&&h(i._name+\".autorange\",!0),a&&a.autorange&&h(a._name+\".autorange\",!0),CU.call(\"_guiRelayout\",e,v())}):Z.call(H)}});var kpe=ye((Cor,Cpe)=>{\"use strict\";var Ape=Dr(),n0t=qa(),Spe=pl().arrayEditor;Cpe.exports={hasClickToShow:a0t,onClick:o0t};function a0t(e,t){var r=Epe(e,t);return r.on.length>0||r.explicitOff.length>0}function o0t(e,t){var r=Epe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s<n.length;s++)l=Spe(e.layout,\"annotations\",o[n[s]]),l.modifyItem(\"visible\",!0),Ape.extendFlat(a,l.getUpdateObj());for(s=0;s<i.length;s++)l=Spe(e.layout,\"annotations\",o[i[s]]),l.modifyItem(\"visible\",!1),Ape.extendFlat(a,l.getUpdateObj());return n0t.call(\"update\",e,{},a)}}function Epe(e,t){var r=e._fullLayout.annotations,n=[],i=[],a=[],o=(t||[]).length,s,l,u,c,f,h,d,v;for(s=0;s<r.length;s++)if(u=r[s],c=u.clicktoshow,c){for(l=0;l<o;l++)if(f=t[l],h=f.xaxis,d=f.yaxis,h._id===u.xref&&d._id===u.yref&&h.d2r(f.x)===Mpe(u._xclick,h)&&d.d2r(f.y)===Mpe(u._yclick,d)){u.visible?c===\"onout\"?v=i:v=a:v=n,v.push(s);break}l===o&&u.visible&&c===\"onout\"&&i.push(s)}return{on:n,off:i,explicitOff:a}}function Mpe(e,t){return t.type===\"log\"?t.l2r(e):t.d2r(e)}});var RU=ye((kor,Lpe)=>{\"use strict\";var IU=Dr(),uT=Ca();Lpe.exports=function(t,r,n,i){i(\"opacity\");var a=i(\"bgcolor\"),o=i(\"bordercolor\"),s=uT.opacity(o);i(\"borderpad\");var l=i(\"borderwidth\"),u=i(\"showarrow\");i(\"text\",u?\" \":n._dfltTitle.annotation),i(\"textangle\"),IU.coerceFont(i,\"font\",n.font),i(\"width\"),i(\"align\");var c=i(\"height\");if(c&&i(\"valign\"),u){var f=i(\"arrowside\"),h,d;f.indexOf(\"end\")!==-1&&(h=i(\"arrowhead\"),d=i(\"arrowsize\")),f.indexOf(\"start\")!==-1&&(i(\"startarrowhead\",h),i(\"startarrowsize\",d)),i(\"arrowcolor\",s?r.bordercolor:uT.defaultLine),i(\"arrowwidth\",(s&&l||1)*2),i(\"standoff\"),i(\"startstandoff\")}var v=i(\"hovertext\"),x=n.hoverlabel||{};if(v){var b=i(\"hoverlabel.bgcolor\",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),p=i(\"hoverlabel.bordercolor\",x.bordercolor||uT.contrast(b)),C=IU.extendFlat({},x.font);C.color||(C.color=p),IU.coerceFont(i,\"hoverlabel.font\",C)}i(\"captureevents\",!!v)}});var Ipe=ye((Lor,Ppe)=>{\"use strict\";var DU=Dr(),Yb=ho(),s0t=Yd(),l0t=RU(),u0t=Nb();Ppe.exports=function(t,r){s0t(t,r,{name:\"annotations\",handleItemDefaults:c0t})};function c0t(e,t,r){function n(E,A){return DU.coerce(e,t,u0t,E,A)}var i=n(\"visible\"),a=n(\"clicktoshow\");if(i||a){l0t(e,t,r,n);for(var o=t.showarrow,s=[\"x\",\"y\"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=Yb.coerceRef(e,t,u,f,\"\",\"paper\");if(h!==\"paper\"){var d=Yb.getFromId(u,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,u,n,h,f,.5),o){var v=\"a\"+f,x=Yb.coerceRef(e,t,u,v,\"pixel\",[\"pixel\",\"paper\"]);x!==\"pixel\"&&x!==h&&(x=t[v]=\"pixel\");var b=x===\"pixel\"?l[c]:.4;Yb.coercePosition(t,u,n,x,v,b)}n(f+\"anchor\"),n(f+\"shift\")}if(DU.noneOrAll(e,t,[\"x\",\"y\"]),o&&DU.noneOrAll(e,t,[\"ax\",\"ay\"]),a){var p=n(\"xclick\"),C=n(\"yclick\");t._xclick=p===void 0?t.x:Yb.cleanPosition(p,u,t.xref),t._yclick=C===void 0?t.y:Yb.cleanPosition(C,u,t.yref)}}}});var Fpe=ye((Por,Dpe)=>{\"use strict\";var FU=Dr(),Kb=ho(),f0t=vI().draw;Dpe.exports=function(t){var r=t._fullLayout,n=FU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return FU.syncOrAsync([f0t,h0t],t)};function h0t(e){var t=e._fullLayout;FU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a===\"range\"&&Rpe(r,n),o===\"range\"&&Rpe(r,i)})}function Rpe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e[\"a\"+n],o=e[n+\"ref\"],s=e[\"a\"+n+\"ref\"],l=e[\"_\"+n+\"padplus\"],u=e[\"_\"+n+\"padminus\"],c={x:1,y:-1}[n]*e[n+\"shift\"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,x=v+c,b=v-c,p;if(s===o){var C=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,b)});p={min:[C.min[0],E.min[0]],max:[C.max[0],E.max[0]]}}else x=a?x+a:x,b=a?b-a:b,p=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,x),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Ope=ye((Ior,zpe)=>{\"use strict\";var d0t=Eo(),v0t=p6();zpe.exports=function(t,r,n,i){r=r||{};var a=n===\"log\"&&r.type===\"linear\",o=n===\"linear\"&&r.type===\"log\";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],x=null;a?x=v0t(v,r.range):x=Math.pow(10,v),d0t(x)||(x=null),i(c+d,x)}for(var h=0;h<s.length;h++)u=s[h],c=\"annotations[\"+h+\"].\",u[l+\"ref\"]===r._id&&f(l),u[\"a\"+l+\"ref\"]===r._id&&f(\"a\"+l)}});var Npe=ye((Ror,Bpe)=>{\"use strict\";var zU=vI(),qpe=kpe();Bpe.exports={moduleType:\"component\",name:\"annotations\",layoutAttributes:Nb(),supplyLayoutDefaults:Ipe(),includeBasePlot:zM()(\"annotations\"),calcAutorange:Fpe(),draw:zU.draw,drawOne:zU.drawOne,drawRaw:zU.drawRaw,hasClickToShow:qpe.hasClickToShow,onClick:qpe.onClick,convertCoords:Ope()}});var pI=ye((Dor,Upe)=>{\"use strict\";var Cc=Nb(),p0t=mc().overrideAll,g0t=pl().templatedArray;Upe.exports=p0t(g0t(\"annotation\",{visible:Cc.visible,x:{valType:\"any\"},y:{valType:\"any\"},z:{valType:\"any\"},ax:{valType:\"number\"},ay:{valType:\"number\"},xanchor:Cc.xanchor,xshift:Cc.xshift,yanchor:Cc.yanchor,yshift:Cc.yshift,text:Cc.text,textangle:Cc.textangle,font:Cc.font,width:Cc.width,height:Cc.height,opacity:Cc.opacity,align:Cc.align,valign:Cc.valign,bgcolor:Cc.bgcolor,bordercolor:Cc.bordercolor,borderpad:Cc.borderpad,borderwidth:Cc.borderwidth,showarrow:Cc.showarrow,arrowcolor:Cc.arrowcolor,arrowhead:Cc.arrowhead,startarrowhead:Cc.startarrowhead,arrowside:Cc.arrowside,arrowsize:Cc.arrowsize,startarrowsize:Cc.startarrowsize,arrowwidth:Cc.arrowwidth,standoff:Cc.standoff,startstandoff:Cc.startstandoff,hovertext:Cc.hovertext,hoverlabel:Cc.hoverlabel,captureevents:Cc.captureevents}),\"calc\",\"from-root\")});var Gpe=ye((For,Vpe)=>{\"use strict\";var OU=Dr(),m0t=ho(),y0t=Yd(),_0t=RU(),x0t=pI();Vpe.exports=function(t,r,n){y0t(t,r,{name:\"annotations\",handleItemDefaults:b0t,fullLayout:n.fullLayout})};function b0t(e,t,r,n){function i(s,l){return OU.coerce(e,t,x0t,s,l)}function a(s){var l=s+\"axis\",u={_fullLayout:{}};return u._fullLayout[l]=r[l],m0t.coercePosition(t,u,i,s,s,.5)}var o=i(\"visible\");o&&(_0t(e,t,n.fullLayout,i),a(\"x\"),a(\"y\"),a(\"z\"),OU.noneOrAll(e,t,[\"x\",\"y\",\"z\"]),t.xref=\"x\",t.yref=\"y\",t.zref=\"z\",i(\"xanchor\"),i(\"yanchor\"),i(\"xshift\"),i(\"yshift\"),t.showarrow&&(t.axref=\"pixel\",t.ayref=\"pixel\",i(\"ax\",-10),i(\"ay\",-30),OU.noneOrAll(e,t,[\"ax\",\"ay\"])))}});var Xpe=ye((zor,Wpe)=>{\"use strict\";var Hpe=Dr(),jpe=ho();Wpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i<n.length;i++)w0t(n[i],t);t.fullLayout._infolayer.selectAll(\".annotation-\"+t.id).remove()};function w0t(e,t){var r=t.fullSceneLayout,n=r.domain,i=t.fullLayout._size,a={pdata:null,type:\"linear\",autorange:!1,range:[-1/0,1/0]};e._xa={},Hpe.extendFlat(e._xa,a),jpe.setConvert(e._xa),e._xa._offset=i.l+n.x[0]*i.w,e._xa.l2p=function(){return .5*(1+e._pdata[0]/e._pdata[3])*i.w*(n.x[1]-n.x[0])},e._ya={},Hpe.extendFlat(e._ya,a),jpe.setConvert(e._ya),e._ya._offset=i.t+(1-n.y[1])*i.h,e._ya.l2p=function(){return .5*(1-e._pdata[1]/e._pdata[3])*i.h*(n.y[1]-n.y[0])}}});var BU=ye((Oor,Zpe)=>{\"use strict\";function qU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function T0t(e,t){var r=qU(e.projection,qU(e.view,qU(e.model,[t[0],t[1],t[2],1])));return r}Zpe.exports=T0t});var Kpe=ye((qor,Ype)=>{\"use strict\";var A0t=vI().drawRaw,S0t=BU(),M0t=[\"x\",\"y\",\"z\"];Ype.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a<i.length;a++){for(var o=i[a],s=!1,l=0;l<3;l++){var u=M0t[l],c=o[u],f=r[u+\"axis\"],h=f.r2fraction(c);if(h<0||h>1){s=!0;break}}s?t.fullLayout._infolayer.select(\".annotation-\"+t.id+'[data-index=\"'+a+'\"]').remove():(o._pdata=S0t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),A0t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var Qpe=ye((Bor,$pe)=>{\"use strict\";var E0t=qa(),Jpe=Dr();$pe.exports={moduleType:\"component\",name:\"annotations3d\",schema:{subplots:{scene:{annotations:pI()}}},layoutAttributes:pI(),handleDefaults:Gpe(),includeBasePlot:C0t,convert:Xpe(),draw:Kpe()};function C0t(e,t){var r=E0t.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a<i.length;a++){var o=i[a];n.test(o)&&(e[o].annotations||[]).length&&(Jpe.pushUnique(t._basePlotModules,r),Jpe.pushUnique(t._subplots.gl3d,o))}}});var NU=ye((Uor,i0e)=>{\"use strict\";var e0e=Nb(),t0e=ec(),r0e=pf().line,k0t=Pd().dash,zg=Ao().extendFlat,L0t=pl().templatedArray,Nor=FM(),cT=Gl(),P0t=Qo().shapeTexttemplateAttrs,I0t=A6();i0e.exports=L0t(\"shape\",{visible:zg({},cT.visible,{editType:\"calc+arraydraw\"}),showlegend:{valType:\"boolean\",dflt:!1,editType:\"calc+arraydraw\"},legend:zg({},cT.legend,{editType:\"calc+arraydraw\"}),legendgroup:zg({},cT.legendgroup,{editType:\"calc+arraydraw\"}),legendgrouptitle:{text:zg({},cT.legendgrouptitle.text,{editType:\"calc+arraydraw\"}),font:t0e({editType:\"calc+arraydraw\"}),editType:\"calc+arraydraw\"},legendrank:zg({},cT.legendrank,{editType:\"calc+arraydraw\"}),legendwidth:zg({},cT.legendwidth,{editType:\"calc+arraydraw\"}),type:{valType:\"enumerated\",values:[\"circle\",\"rect\",\"path\",\"line\"],editType:\"calc+arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\",\"between\"],dflt:\"above\",editType:\"arraydraw\"},xref:zg({},e0e.xref,{}),xsizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},xanchor:{valType:\"any\",editType:\"calc+arraydraw\"},x0:{valType:\"any\",editType:\"calc+arraydraw\"},x1:{valType:\"any\",editType:\"calc+arraydraw\"},x0shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},x1shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},yref:zg({},e0e.yref,{}),ysizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},yanchor:{valType:\"any\",editType:\"calc+arraydraw\"},y0:{valType:\"any\",editType:\"calc+arraydraw\"},y1:{valType:\"any\",editType:\"calc+arraydraw\"},y0shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},y1shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},path:{valType:\"string\",editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},line:{color:zg({},r0e.color,{editType:\"arraydraw\"}),width:zg({},r0e.width,{editType:\"calc+arraydraw\"}),dash:zg({},k0t,{editType:\"arraydraw\"}),editType:\"calc+arraydraw\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\",editType:\"arraydraw\"},editable:{valType:\"boolean\",dflt:!1,editType:\"calc+arraydraw\"},label:{text:{valType:\"string\",dflt:\"\",editType:\"arraydraw\"},texttemplate:P0t({},{keys:Object.keys(I0t)}),font:t0e({editType:\"calc+arraydraw\",colorEditType:\"arraydraw\"}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\",\"start\",\"middle\",\"end\"],editType:\"arraydraw\"},textangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc+arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calc+arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],editType:\"calc+arraydraw\"},padding:{valType:\"number\",dflt:3,min:0,editType:\"arraydraw\"},editType:\"arraydraw\"},editType:\"arraydraw\"})});var o0e=ye((Vor,a0e)=>{\"use strict\";var n4=Dr(),fT=ho(),R0t=Yd(),D0t=NU(),n0e=f_();a0e.exports=function(t,r){R0t(t,r,{name:\"shapes\",handleItemDefaults:z0t})};function F0t(e,t){return e?\"bottom\":t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\"}function z0t(e,t,r){function n(j,re){return n4.coerce(e,t,D0t,j,re)}t._isShape=!0;var i=n(\"visible\");if(i){var a=n(\"showlegend\");a&&(n(\"legend\"),n(\"legendwidth\"),n(\"legendgroup\"),n(\"legendgrouptitle.text\"),n4.coerceFont(n,\"legendgrouptitle.font\"),n(\"legendrank\"));var o=n(\"path\"),s=o?\"path\":\"rect\",l=n(\"type\",s),u=l!==\"path\";u&&delete t.path,n(\"editable\"),n(\"layer\"),n(\"opacity\"),n(\"fillcolor\"),n(\"fillrule\");var c=n(\"line.width\");c&&(n(\"line.color\"),n(\"line.dash\"));for(var f=n(\"xsizemode\"),h=n(\"ysizemode\"),d=[\"x\",\"y\"],v=0;v<2;v++){var x=d[v],b=x+\"anchor\",p=x===\"x\"?f:h,C={_fullLayout:r},E,A,L,_=fT.coerceRef(e,t,C,x,void 0,\"paper\"),k=fT.getRefType(_);if(k===\"range\"?(E=fT.getFromId(C,_),E._shapeIndices.push(t._index),L=n0e.rangeToShapePosition(E),A=n0e.shapePositionToRange(E),(E.type===\"category\"||E.type===\"multicategory\")&&(n(x+\"0shift\"),n(x+\"1shift\"))):A=L=n4.identity,u){var M=.25,g=.75,P=x+\"0\",T=x+\"1\",z=e[P],O=e[T];e[P]=A(e[P],!0),e[T]=A(e[T],!0),p===\"pixel\"?(n(P,0),n(T,10)):(fT.coercePosition(t,C,n,_,P,M),fT.coercePosition(t,C,n,_,T,g)),t[P]=L(t[P]),t[T]=L(t[T]),e[P]=z,e[T]=O}if(p===\"pixel\"){var V=e[b];e[b]=A(e[b],!0),fT.coercePosition(t,C,n,_,b,.25),t[b]=L(t[b]),e[b]=V}}u&&n4.noneOrAll(e,t,[\"x0\",\"x1\",\"y0\",\"y1\"]);var G=l===\"line\",Z,H;if(u&&(Z=n(\"label.texttemplate\")),Z||(H=n(\"label.text\")),H||Z){n(\"label.textangle\");var N=n(\"label.textposition\",G?\"middle\":\"middle center\");n(\"label.xanchor\"),n(\"label.yanchor\",F0t(G,N)),n(\"label.padding\"),n4.coerceFont(n,\"label.font\",r.font)}}}});var u0e=ye((Gor,l0e)=>{\"use strict\";var O0t=Ca(),s0e=Dr();function q0t(e,t){return e?\"bottom\":t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\"}l0e.exports=function(t,r,n){n(\"newshape.visible\"),n(\"newshape.name\"),n(\"newshape.showlegend\"),n(\"newshape.legend\"),n(\"newshape.legendwidth\"),n(\"newshape.legendgroup\"),n(\"newshape.legendgrouptitle.text\"),s0e.coerceFont(n,\"newshape.legendgrouptitle.font\"),n(\"newshape.legendrank\"),n(\"newshape.drawdirection\"),n(\"newshape.layer\"),n(\"newshape.fillcolor\"),n(\"newshape.fillrule\"),n(\"newshape.opacity\");var i=n(\"newshape.line.width\");if(i){var a=(t||{}).plot_bgcolor||\"#FFF\";n(\"newshape.line.color\",O0t.contrast(a)),n(\"newshape.line.dash\")}var o=t.dragmode===\"drawline\",s=n(\"newshape.label.text\"),l=n(\"newshape.label.texttemplate\");if(s||l){n(\"newshape.label.textangle\");var u=n(\"newshape.label.textposition\",o?\"middle\":\"middle center\");n(\"newshape.label.xanchor\"),n(\"newshape.label.yanchor\",q0t(o,u)),n(\"newshape.label.padding\"),s0e.coerceFont(n,\"newshape.label.font\",r.font)}n(\"activeshape.fillcolor\"),n(\"activeshape.opacity\")}});var v0e=ye((Hor,d0e)=>{\"use strict\";var UU=Dr(),hT=ho(),dT=vM(),f0e=f_();d0e.exports=function(t){var r=t._fullLayout,n=UU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i<n.length;i++){var a=n[i];a._extremes={};var o,s,l=hT.getRefType(a.xref),u=hT.getRefType(a.yref);a.xref!==\"paper\"&&l!==\"domain\"&&(o=hT.getFromId(t,a.xref),s=c0e(o,a,dT.paramIsX),s&&(a._extremes[o._id]=hT.findExtremes(o,s,B0t(a)))),a.yref!==\"paper\"&&u!==\"domain\"&&(o=hT.getFromId(t,a.yref),s=c0e(o,a,dT.paramIsY),s&&(a._extremes[o._id]=hT.findExtremes(o,s,N0t(a))))}};function B0t(e){return h0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function N0t(e){return h0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function h0e(e,t,r,n,i,a){var o=e/2,s=a;if(t===\"pixel\"){var l=i?f0e.extractPathCoords(i,a?dT.paramIsY:dT.paramIsX):[r,n],u=UU.aggNums(Math.max,null,l),c=UU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function c0e(e,t,r){var n=e._id.charAt(0)===\"x\"?\"x\":\"y\",i=e.type===\"category\"||e.type===\"multicategory\",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+\"sizemode\"]===\"scaled\";if(c?(a=t[n+\"0\"],o=t[n+\"1\"],i&&(s=t[n+\"0shift\"],l=t[n+\"1shift\"])):(a=t[n+\"anchor\"],o=t[n+\"anchor\"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(dT.segmentRE),v,x,b,p,C;for(e.type===\"date\"&&(u=f0e.decodeDate(u)),v=0;v<d.length;v++)x=d[v],b=r[x.charAt(0)].drawn,b!==void 0&&(p=d[v].substr(1).match(dT.paramRE),!(!p||p.length<b)&&(C=u(p[b]),C<f&&(f=C),C>h&&(h=C)));if(h>=f)return[f,h]}}});var m0e=ye((jor,g0e)=>{\"use strict\";var p0e=aP();g0e.exports={moduleType:\"component\",name:\"shapes\",layoutAttributes:NU(),supplyLayoutDefaults:o0e(),supplyDrawNewShapeDefaults:u0e(),includeBasePlot:zM()(\"shapes\"),calcAutorange:v0e(),draw:p0e.draw,drawOne:p0e.drawOne}});var VU=ye((Xor,_0e)=>{\"use strict\";var y0e=hd(),U0t=pl().templatedArray,Wor=FM();_0e.exports=U0t(\"image\",{visible:{valType:\"boolean\",dflt:!0,editType:\"arraydraw\"},source:{valType:\"string\",editType:\"arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},sizex:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizey:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizing:{valType:\"enumerated\",values:[\"fill\",\"contain\",\"stretch\"],dflt:\"contain\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},x:{valType:\"any\",dflt:0,editType:\"arraydraw\"},y:{valType:\"any\",dflt:0,editType:\"arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"top\",editType:\"arraydraw\"},xref:{valType:\"enumerated\",values:[\"paper\",y0e.idRegex.x.toString()],dflt:\"paper\",editType:\"arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",y0e.idRegex.y.toString()],dflt:\"paper\",editType:\"arraydraw\"},editType:\"arraydraw\"})});var b0e=ye((Zor,x0e)=>{\"use strict\";var V0t=Dr(),GU=ho(),G0t=Yd(),H0t=VU(),j0t=\"images\";x0e.exports=function(t,r){var n={name:j0t,handleItemDefaults:W0t};G0t(t,r,n)};function W0t(e,t,r){function n(h,d){return V0t.coerce(e,t,H0t,h,d)}var i=n(\"source\"),a=n(\"visible\",!!i);if(!a)return t;n(\"layer\"),n(\"xanchor\"),n(\"yanchor\"),n(\"sizex\"),n(\"sizey\"),n(\"sizing\"),n(\"opacity\");for(var o={_fullLayout:r},s=[\"x\",\"y\"],l=0;l<2;l++){var u=s[l],c=GU.coerceRef(e,t,o,u,\"paper\",void 0);if(c!==\"paper\"){var f=GU.getFromId(o,c);f._imgIndices.push(t._index)}GU.coercePosition(t,o,n,c,u,0)}return t}});var S0e=ye((Yor,A0e)=>{\"use strict\";var w0e=Oa(),X0t=So(),vT=ho(),T0e=hf(),Z0t=Wp();A0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s<r.images.length;s++){var l=r.images[s];if(l.visible)if(l.layer===\"below\"&&l.xref!==\"paper\"&&l.yref!==\"paper\"){o=T0e.ref2id(l.xref)+T0e.ref2id(l.yref);var u=r._plots[o];if(!u){a.push(l);continue}u.mainplot&&(o=u.mainplot.id),i[o]||(i[o]=[]),i[o].push(l)}else l.layer===\"above\"?n.push(l):a.push(l)}var c={x:{left:{sizing:\"xMin\",offset:0},center:{sizing:\"xMid\",offset:-1/2},right:{sizing:\"xMax\",offset:-1}},y:{top:{sizing:\"YMin\",offset:0},middle:{sizing:\"YMid\",offset:-1/2},bottom:{sizing:\"YMax\",offset:-1}}};function f(A){var L=w0e.select(this);if(this._imgSrc!==A.source)if(L.attr(\"xmlns\",Z0t.svg),!t._context.staticPlot||A.source&&A.source.slice(0,5)===\"data:\")L.attr(\"xlink:href\",A.source),this._imgSrc=A.source;else{var _=new Promise(function(k){var M=new Image;this.img=M,M.setAttribute(\"crossOrigin\",\"anonymous\"),M.onerror=g,M.onload=function(){var P=document.createElement(\"canvas\");P.width=this.width,P.height=this.height;var T=P.getContext(\"2d\",{willReadFrequently:!0});T.drawImage(this,0,0);var z=P.toDataURL(\"image/png\");L.attr(\"xlink:href\",z),k()},L.on(\"error\",g),M.src=A.source,this._imgSrc=A.source;function g(){L.remove(),k()}}.bind(this));t._promises.push(_)}}function h(A){var L=w0e.select(this),_=vT.getFromId(t,A.xref),k=vT.getFromId(t,A.yref),M=vT.getRefType(A.xref)===\"domain\",g=vT.getRefType(A.yref)===\"domain\",P=r._size,T,z;_!==void 0?T=typeof A.xref==\"string\"&&M?_._length*A.sizex:Math.abs(_.l2p(A.sizex)-_.l2p(0)):T=A.sizex*P.w,k!==void 0?z=typeof A.yref==\"string\"&&g?k._length*A.sizey:Math.abs(k.l2p(A.sizey)-k.l2p(0)):z=A.sizey*P.h;var O=T*c.x[A.xanchor].offset,V=z*c.y[A.yanchor].offset,G=c.x[A.xanchor].sizing+c.y[A.yanchor].sizing,Z,H;switch(_!==void 0?Z=typeof A.xref==\"string\"&&M?_._length*A.x+_._offset:_.r2p(A.x)+_._offset:Z=A.x*P.w+P.l,Z+=O,k!==void 0?H=typeof A.yref==\"string\"&&g?k._length*(1-A.y)+k._offset:k.r2p(A.y)+k._offset:H=P.h-A.y*P.h+P.t,H+=V,A.sizing){case\"fill\":G+=\" slice\";break;case\"stretch\":G=\"none\";break}L.attr({x:Z,y:H,width:T,height:z,preserveAspectRatio:G,opacity:A.opacity});var N=_&&vT.getRefType(A.xref)!==\"domain\"?_._id:\"\",j=k&&vT.getRefType(A.yref)!==\"domain\"?k._id:\"\",re=N+j;X0t.setClipUrl(L,re?\"clip\"+r._uid+re:null,t)}function d(A){return[A.xref,A.x,A.sizex,A.yref,A.y,A.sizey].join(\"_\")}function v(A,L){return A._index-L._index}var x=r._imageLowerLayer.selectAll(\"image\").data(a,d),b=r._imageUpperLayer.selectAll(\"image\").data(n,d);x.enter().append(\"image\"),b.enter().append(\"image\"),x.exit().remove(),b.exit().remove(),x.each(function(A){f.bind(this)(A),h.bind(this)(A)}),b.each(function(A){f.bind(this)(A),h.bind(this)(A)}),x.sort(v),b.sort(v);var p=Object.keys(r._plots);for(s=0;s<p.length;s++){o=p[s];var C=r._plots[o];if(C.imagelayer){var E=C.imagelayer.selectAll(\"image\").data(i[o]||[],d);E.enter().append(\"image\"),E.exit().remove(),E.each(function(A){f.bind(this)(A),h.bind(this)(A)}),E.sort(v)}}}});var C0e=ye((Kor,E0e)=>{\"use strict\";var M0e=Eo(),Y0t=p6();E0e.exports=function(t,r,n,i){r=r||{};var a=n===\"log\"&&r.type===\"linear\",o=n===\"linear\"&&r.type===\"log\";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f<s.length;f++)if(u=s[f],c=\"images[\"+f+\"].\",u[l+\"ref\"]===r._id){var h=u[l],d=u[\"size\"+l],v=null,x=null;if(a){v=Y0t(h,r.range);var b=d/Math.pow(10,v)/2;x=2*Math.log(b+Math.sqrt(1+b*b))/Math.LN10}else v=Math.pow(10,h),x=v*(Math.pow(10,d/2)-Math.pow(10,-d/2));M0e(v)?M0e(x)||(x=null):(v=null,x=null),i(c+l,v),i(c+\"size\"+l,x)}}}});var L0e=ye((Jor,k0e)=>{\"use strict\";k0e.exports={moduleType:\"component\",name:\"images\",layoutAttributes:VU(),supplyLayoutDefaults:b0e(),includeBasePlot:zM()(\"images\"),draw:S0e(),convertCoords:C0e()}});var gI=ye(($or,P0e)=>{\"use strict\";P0e.exports={name:\"updatemenus\",containerClassName:\"updatemenu-container\",headerGroupClassName:\"updatemenu-header-group\",headerClassName:\"updatemenu-header\",headerArrowClassName:\"updatemenu-header-arrow\",dropdownButtonGroupClassName:\"updatemenu-dropdown-button-group\",dropdownButtonClassName:\"updatemenu-dropdown-button\",buttonClassName:\"updatemenu-button\",itemRectClassName:\"updatemenu-item-rect\",itemTextClassName:\"updatemenu-item-text\",menuIndexAttrName:\"updatemenu-active-index\",autoMarginIdRoot:\"updatemenu-\",blankHeaderOpts:{label:\"  \"},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\"#F4FAFF\",hoverColor:\"#F4FAFF\",arrowSymbol:{left:\"\\u25C4\",right:\"\\u25BA\",up:\"\\u25B2\",down:\"\\u25BC\"}}});var HU=ye((Qor,R0e)=>{\"use strict\";var K0t=ec(),J0t=Eh(),$0t=Ao().extendFlat,Q0t=mc().overrideAll,egt=S6(),I0e=pl().templatedArray,tgt=I0e(\"button\",{visible:{valType:\"boolean\"},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},args2:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\",dflt:\"\"},execute:{valType:\"boolean\",dflt:!0}});R0e.exports=Q0t(I0e(\"updatemenu\",{_arrayAttrRegexps:[/^updatemenus\\[(0|[1-9][0-9]+)\\]\\.buttons/],visible:{valType:\"boolean\"},type:{valType:\"enumerated\",values:[\"dropdown\",\"buttons\"],dflt:\"dropdown\"},direction:{valType:\"enumerated\",values:[\"left\",\"right\",\"up\",\"down\"],dflt:\"down\"},active:{valType:\"integer\",min:-1,dflt:0},showactive:{valType:\"boolean\",dflt:!0},buttons:tgt,x:{valType:\"number\",min:-2,max:3,dflt:-.05},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"right\"},y:{valType:\"number\",min:-2,max:3,dflt:1},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},pad:$0t(egt({editType:\"arraydraw\"}),{}),font:K0t({}),bgcolor:{valType:\"color\"},bordercolor:{valType:\"color\",dflt:J0t.borderLine},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"arraydraw\"}}),\"arraydraw\",\"from-root\")});var O0e=ye((esr,z0e)=>{\"use strict\";var mI=Dr(),D0e=Yd(),F0e=HU(),rgt=gI(),igt=rgt.name,ngt=F0e.buttons;z0e.exports=function(t,r){var n={name:igt,handleItemDefaults:agt};D0e(t,r,n)};function agt(e,t,r){function n(o,s){return mI.coerce(e,t,F0e,o,s)}var i=D0e(e,t,{name:\"buttons\",handleItemDefaults:ogt}),a=n(\"visible\",i.length>0);a&&(n(\"active\"),n(\"direction\"),n(\"type\"),n(\"showactive\"),n(\"x\"),n(\"y\"),mI.noneOrAll(e,t,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),mI.coerceFont(n,\"font\",r.font),n(\"bgcolor\",r.paper_bgcolor),n(\"bordercolor\"),n(\"borderwidth\"))}function ogt(e,t){function r(i,a){return mI.coerce(e,t,ngt,i,a)}var n=r(\"visible\",e.method===\"skip\"||Array.isArray(e.args));n&&(r(\"method\"),r(\"args\"),r(\"args2\"),r(\"label\"),r(\"execute\"))}});var N0e=ye((tsr,B0e)=>{\"use strict\";B0e.exports=Sf;var Og=Oa(),q0e=Ca(),pT=So(),yI=Dr();function Sf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\"rect.scrollbox-bg\").data([0]),this.bg.exit().on(\".drag\",null).on(\"wheel\",null).remove(),this.bg.enter().append(\"rect\").classed(\"scrollbox-bg\",!0).style(\"pointer-events\",\"all\").attr({opacity:0,x:0,y:0,width:0,height:0})}Sf.barWidth=2;Sf.barLength=20;Sf.barRadius=2;Sf.barPad=1;Sf.barColor=\"#808BA4\";Sf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f===\"down\",d=f===\"left\",v=f===\"right\",x=f===\"up\",b=l,p=c,C,E,A,L;!h&&!d&&!v&&!x&&(this.position.direction=\"down\",h=!0);var _=h||x;_?(C=s,E=C+b,h?(A=u,L=Math.min(A+p,o),p=L-A):(L=u+p,A=Math.max(L-p,0),p=L-A)):(A=u,L=A+p,d?(E=s+b,C=Math.max(E-b,0),b=E-C):(C=s,E=Math.min(C+b,a),b=E-C)),this._box={l:C,t:A,w:b,h:p};var k=l>b,M=Sf.barLength+2*Sf.barPad,g=Sf.barWidth+2*Sf.barPad,P=s,T=u+c;T+g>o&&(T=o-g);var z=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);z.exit().on(\".drag\",null).remove(),z.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(q0e.fill,Sf.barColor),k?(this.hbar=z.attr({rx:Sf.barRadius,ry:Sf.barRadius,x:P,y:T,width:M,height:g}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=c>p,V=Sf.barWidth+2*Sf.barPad,G=Sf.barLength+2*Sf.barPad,Z=s+l,H=u;Z+V>a&&(Z=a-V);var N=this.container.selectAll(\"rect.scrollbar-vertical\").data(O?[0]:[]);N.exit().on(\".drag\",null).remove(),N.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(q0e.fill,Sf.barColor),O?(this.vbar=N.attr({rx:Sf.barRadius,ry:Sf.barRadius,x:Z,y:H,width:V,height:G}),this._vbarYMin=H+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,re=C-.5,oe=O?E+V+.5:E+.5,_e=A-.5,Me=k?L+g+.5:L+.5,ke=i._topdefs.selectAll(\"#\"+j).data(k||O?[0]:[]);if(ke.exit().remove(),ke.enter().append(\"clipPath\").attr(\"id\",j).append(\"rect\"),k||O?(this._clipRect=ke.select(\"rect\").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(re),height:Math.ceil(Me)-Math.floor(_e)}),this.container.call(pT.setClipUrl,j,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(pT.setClipUrl,null),delete this._clipRect),k||O){var me=Og.behavior.drag().on(\"dragstart\",function(){Og.event.sourceEvent.preventDefault()}).on(\"drag\",this._onBoxDrag.bind(this));this.container.on(\"wheel\",null).on(\"wheel\",this._onBoxWheel.bind(this)).on(\".drag\",null).call(me);var ie=Og.behavior.drag().on(\"dragstart\",function(){Og.event.sourceEvent.preventDefault(),Og.event.sourceEvent.stopPropagation()}).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(ie),O&&this.vbar.on(\".drag\",null).call(ie)}this.setTranslate(r,n)};Sf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(pT.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(\".drag\",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(\".drag\",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Sf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Og.event.dx),this.vbar&&(r-=Og.event.dy),this.setTranslate(t,r)};Sf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Og.event.deltaY),this.vbar&&(r+=Og.event.deltaY),this.setTranslate(t,r)};Sf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=yI.constrain(Og.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=yI.constrain(Og.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Sf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=yI.constrain(t||0,0,n),r=yI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(pT.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(pT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(pT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var K0e=ye((rsr,Y0e)=>{\"use strict\";var gT=Oa(),a4=Mc(),o4=Ca(),mT=So(),e0=Dr(),_I=ru(),sgt=pl().arrayEditor,V0e=Kh().LINE_SPACING,ts=gI(),lgt=N0e();Y0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[ts.name]);function i(h){a4.autoMargin(t,X0e(h))}var a=r._menulayer.selectAll(\"g.\"+ts.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append(\"g\").classed(ts.containerClassName,!0).style(\"cursor\",\"pointer\"),a.exit().each(function(){gT.select(this).selectAll(\"g.\"+ts.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll(\"g.\"+ts.headerGroupClassName).data(n,ugt);o.enter().append(\"g\").classed(ts.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,\"g\",ts.dropdownButtonGroupClassName,function(h){h.style(\"pointer-events\",\"all\")}),l=0;l<n.length;l++){var u=n[l];pgt(t,u)}var c=\"updatemenus\"+r._uid,f=new lgt(t,s,c);o.enter().size()&&(s.node().parentNode.appendChild(s.node()),s.call(WU)),o.exit().each(function(h){s.call(WU),i(h)}).remove(),o.each(function(h){var d=gT.select(this),v=h.type===\"dropdown\"?s:null;a4.manageCommandObserver(t,h,h.buttons,function(x){jU(t,h,h.buttons[x.index],d,v,f,x.index,!0)}),h.type===\"dropdown\"?(H0e(t,d,s,f,h),G0e(s,h)&&s4(t,d,s,f,h)):s4(t,d,null,null,h)})}};function ugt(e){return e._index}function cgt(e){return+e.attr(ts.menuIndexAttrName)==-1}function G0e(e,t){return+e.attr(ts.menuIndexAttrName)===t._index}function jU(e,t,r,n,i,a,o,s){t.active=o,sgt(e.layout,ts.name,t).applyUpdate(\"active\",o),t.type===\"buttons\"?s4(e,n,null,null,t):t.type===\"dropdown\"&&(i.attr(ts.menuIndexAttrName,\"-1\"),H0e(e,n,i,a,t),s||s4(e,n,i,a,t))}function H0e(e,t,r,n,i){var a=e0.ensureSingle(t,\"g\",ts.headerClassName,function(h){h.style(\"pointer-events\",\"all\")}),o=i._dims,s=i.active,l=i.buttons[s]||ts.blankHeaderOpts,u={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};a.call(XU,i,l,e).call(Z0e,i,u,c);var f=e0.ensureSingle(t,\"text\",ts.headerArrowClassName,function(h){h.attr(\"text-anchor\",\"end\").call(mT.font,i.font).text(ts.arrowSymbol[i.direction])});f.attr({x:o.headerWidth-ts.arrowOffsetX+i.pad.l,y:o.headerHeight/2+ts.textOffsetY+i.pad.t}),a.on(\"click\",function(){r.call(WU,String(G0e(r,i)?-1:i._index)),s4(e,t,r,n,i)}),a.on(\"mouseover\",function(){a.call(j0e)}),a.on(\"mouseout\",function(){a.call(W0e,i)}),mT.setTranslate(t,o.lx,o.ly)}function s4(e,t,r,n,i){r||(r=t,r.attr(\"pointer-events\",\"all\"));var a=!cgt(r)||i.type===\"buttons\"?i.buttons:[],o=i.type===\"dropdown\"?ts.dropdownButtonClassName:ts.buttonClassName,s=r.selectAll(\"g.\"+o).data(e0.filterVisible(a)),l=s.enter().append(\"g\").classed(o,!0),u=s.exit();i.type===\"dropdown\"?(l.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),u.transition().attr(\"opacity\",\"0\").remove()):u.remove();var c=0,f=0,h=i._dims,d=[\"up\",\"down\"].indexOf(i.direction)!==-1;i.type===\"dropdown\"&&(d?f=h.headerHeight+ts.gapButtonHeader:c=h.headerWidth+ts.gapButtonHeader),i.type===\"dropdown\"&&i.direction===\"up\"&&(f=-ts.gapButtonHeader+ts.gapButton-h.openHeight),i.type===\"dropdown\"&&i.direction===\"left\"&&(c=-ts.gapButtonHeader+ts.gapButton-h.openWidth);var v={x:h.lx+c+i.pad.l,y:h.ly+f+i.pad.t,yPad:ts.gapButton,xPad:ts.gapButton,index:0},x={l:v.x+i.borderwidth,t:v.y+i.borderwidth};s.each(function(b,p){var C=gT.select(this);C.call(XU,i,b,e).call(Z0e,i,v),C.on(\"click\",function(){gT.event.defaultPrevented||(b.execute&&(b.args2&&i.active===p?(jU(e,i,b,t,r,n,-1),a4.executeAPICommand(e,b.method,b.args2)):(jU(e,i,b,t,r,n,p),a4.executeAPICommand(e,b.method,b.args))),e.emit(\"plotly_buttonclicked\",{menu:i,button:b,active:i.active}))}),C.on(\"mouseover\",function(){C.call(j0e)}),C.on(\"mouseout\",function(){C.call(W0e,i),s.call(U0e,i)})}),s.call(U0e,i),d?(x.w=Math.max(h.openWidth,h.headerWidth),x.h=v.y-x.t):(x.w=v.x-x.l,x.h=Math.max(h.openHeight,h.headerHeight)),x.direction=i.direction,n&&(s.size()?fgt(e,t,r,n,i,x):hgt(n))}function fgt(e,t,r,n,i,a){var o=i.direction,s=o===\"up\"||o===\"down\",l=i._dims,u=i.active,c,f,h;if(s)for(f=0,h=0;h<u;h++)f+=l.heights[h]+ts.gapButton;else for(c=0,h=0;h<u;h++)c+=l.widths[h]+ts.gapButton;n.enable(a,c,f),n.hbar&&n.hbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),n.vbar&&n.vbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\")}function hgt(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){t=!1,r||e.disable()}),r&&e.vbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){r=!1,t||e.disable()})}function XU(e,t,r,n){e.call(dgt,t).call(vgt,t,r,n)}function dgt(e,t){var r=e0.ensureSingle(e,\"rect\",ts.itemRectClassName,function(n){n.attr({rx:ts.rx,ry:ts.ry,\"shape-rendering\":\"crispEdges\"})});r.call(o4.stroke,t.bordercolor).call(o4.fill,t.bgcolor).style(\"stroke-width\",t.borderwidth+\"px\")}function vgt(e,t,r,n){var i=e0.ensureSingle(e,\"text\",ts.itemTextClassName,function(s){s.attr({\"text-anchor\":\"start\",\"data-notex\":1})}),a=r.label,o=n._fullLayout._meta;o&&(a=e0.templateString(a,o)),i.call(mT.font,t.font).text(a).call(_I.convertToTspans,n)}function U0e(e,t){var r=t.active;e.each(function(n,i){var a=gT.select(this);i===r&&t.showactive&&a.select(\"rect.\"+ts.itemRectClassName).call(o4.fill,ts.activeColor)})}function j0e(e){e.select(\"rect.\"+ts.itemRectClassName).call(o4.fill,ts.hoverColor)}function W0e(e,t){e.select(\"rect.\"+ts.itemRectClassName).call(o4.fill,t.bgcolor)}function pgt(e,t){var r=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},n=mT.tester.selectAll(\"g.\"+ts.dropdownButtonClassName).data(e0.filterVisible(t.buttons));n.enter().append(\"g\").classed(ts.dropdownButtonClassName,!0);var i=[\"up\",\"down\"].indexOf(t.direction)!==-1;n.each(function(c,f){var h=gT.select(this);h.call(XU,t,c,e);var d=h.select(\".\"+ts.itemTextClassName),v=d.node()&&mT.bBox(d.node()).width,x=Math.max(v+ts.textPadX,ts.minWidth),b=t.font.size*V0e,p=_I.lineCount(d),C=Math.max(b*p,ts.minHeight)+ts.textOffsetY;C=Math.ceil(C),x=Math.ceil(x),r.widths[f]=x,r.heights[f]=C,r.height1=Math.max(r.height1,C),r.width1=Math.max(r.width1,x),i?(r.totalWidth=Math.max(r.totalWidth,x),r.openWidth=r.totalWidth,r.totalHeight+=C+ts.gapButton,r.openHeight+=C+ts.gapButton):(r.totalWidth+=x+ts.gapButton,r.openWidth+=x+ts.gapButton,r.totalHeight=Math.max(r.totalHeight,C),r.openHeight=r.totalHeight)}),i?r.totalHeight-=ts.gapButton:r.totalWidth-=ts.gapButton,r.headerWidth=r.width1+ts.arrowPadX,r.headerHeight=r.height1,t.type===\"dropdown\"&&(i?(r.width1+=ts.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=ts.arrowPadX),n.remove();var a=r.totalWidth+t.pad.l+t.pad.r,o=r.totalHeight+t.pad.t+t.pad.b,s=e._fullLayout._size;r.lx=s.l+s.w*t.x,r.ly=s.t+s.h*(1-t.y);var l=\"left\";e0.isRightAnchor(t)&&(r.lx-=a,l=\"right\"),e0.isCenterAnchor(t)&&(r.lx-=a/2,l=\"center\");var u=\"top\";e0.isBottomAnchor(t)&&(r.ly-=o,u=\"bottom\"),e0.isMiddleAnchor(t)&&(r.ly-=o/2,u=\"middle\"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),a4.autoMargin(e,X0e(t),{x:t.x,y:t.y,l:a*({right:1,center:.5}[l]||0),r:a*({left:1,center:.5}[l]||0),b:o*({top:1,middle:.5}[u]||0),t:o*({bottom:1,middle:.5}[u]||0)})}function X0e(e){return ts.autoMarginIdRoot+e._index}function Z0e(e,t,r,n){n=n||{};var i=e.select(\".\"+ts.itemRectClassName),a=e.select(\".\"+ts.itemTextClassName),o=t.borderwidth,s=r.index,l=t._dims;mT.setTranslate(e,o+r.x,o+r.y);var u=[\"up\",\"down\"].indexOf(t.direction)!==-1,c=n.height||(u?l.heights[s]:l.height1);i.attr({x:0,y:0,width:n.width||(u?l.width1:l.widths[s]),height:c});var f=t.font.size*V0e,h=_I.lineCount(a),d=(h-1)*f/2;_I.positionText(a,ts.textOffsetX,c/2-d+ts.textOffsetY),u?r.y+=l.heights[s]+r.yPad:r.x+=l.widths[s]+r.xPad,r.index++}function WU(e,t){e.attr(ts.menuIndexAttrName,t||\"-1\").selectAll(\"g.\"+ts.dropdownButtonClassName).remove()}});var $0e=ye((isr,J0e)=>{\"use strict\";var ggt=gI();J0e.exports={moduleType:\"component\",name:ggt.name,layoutAttributes:HU(),supplyLayoutDefaults:O0e(),draw:K0e()}});var l4=ye((nsr,Q0e)=>{\"use strict\";Q0e.exports={name:\"sliders\",containerClassName:\"slider-container\",groupClassName:\"slider-group\",inputAreaClass:\"slider-input-area\",railRectClass:\"slider-rail-rect\",railTouchRectClass:\"slider-rail-touch-rect\",gripRectClass:\"slider-grip-rect\",tickRectClass:\"slider-tick-rect\",inputProxyClass:\"slider-input-proxy\",labelsClass:\"slider-labels\",labelGroupClass:\"slider-label-group\",labelClass:\"slider-label\",currentValueClass:\"slider-current-value\",railHeight:5,menuIndexAttrName:\"slider-active-index\",autoMarginIdRoot:\"slider-\",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:\"#bec8d9\",railBgColor:\"#f8fafc\",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:\"#bec8d9\",gripBgColor:\"#f6f8fa\",gripBgActiveColor:\"#dbdde0\",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:\"#333\",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:\"#333\",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var ZU=ye((asr,rge)=>{\"use strict\";var ege=ec(),mgt=S6(),ygt=Ao().extendDeepAll,_gt=mc().overrideAll,xgt=qS(),tge=pl().templatedArray,Jb=l4(),bgt=tge(\"step\",{visible:{valType:\"boolean\",dflt:!0},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\"},value:{valType:\"string\"},execute:{valType:\"boolean\",dflt:!0}});rge.exports=_gt(tge(\"slider\",{visible:{valType:\"boolean\",dflt:!0},active:{valType:\"number\",min:0,dflt:0},steps:bgt,lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",min:-2,max:3,dflt:0},pad:ygt(mgt({editType:\"arraydraw\"}),{},{t:{dflt:20}}),xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\"},y:{valType:\"number\",min:-2,max:3,dflt:0},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},transition:{duration:{valType:\"number\",min:0,dflt:150},easing:{valType:\"enumerated\",values:xgt.transition.easing.values,dflt:\"cubic-in-out\"}},currentvalue:{visible:{valType:\"boolean\",dflt:!0},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\"},offset:{valType:\"number\",dflt:10},prefix:{valType:\"string\"},suffix:{valType:\"string\"},font:ege({})},font:ege({}),activebgcolor:{valType:\"color\",dflt:Jb.gripBgActiveColor},bgcolor:{valType:\"color\",dflt:Jb.railBgColor},bordercolor:{valType:\"color\",dflt:Jb.railBorderColor},borderwidth:{valType:\"number\",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:\"number\",min:0,dflt:Jb.tickLength},tickcolor:{valType:\"color\",dflt:Jb.tickColor},tickwidth:{valType:\"number\",min:0,dflt:1},minorticklen:{valType:\"number\",min:0,dflt:Jb.minorTickLength}}),\"arraydraw\",\"from-root\")});var oge=ye((osr,age)=>{\"use strict\";var yT=Dr(),ige=Yd(),nge=ZU(),wgt=l4(),Tgt=wgt.name,Agt=nge.steps;age.exports=function(t,r){ige(t,r,{name:Tgt,handleItemDefaults:Sgt})};function Sgt(e,t,r){function n(f,h){return yT.coerce(e,t,nge,f,h)}for(var i=ige(e,t,{name:\"steps\",handleItemDefaults:Mgt}),a=0,o=0;o<i.length;o++)i[o].visible&&a++;var s;if(a<2?s=t.visible=!1:s=n(\"visible\"),!!s){t._stepCount=a;var l=t._visibleSteps=yT.filterVisible(i),u=n(\"active\");(i[u]||{}).visible||(t.active=l[0]._index),n(\"x\"),n(\"y\"),yT.noneOrAll(e,t,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"len\"),n(\"lenmode\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),yT.coerceFont(n,\"font\",r.font);var c=n(\"currentvalue.visible\");c&&(n(\"currentvalue.xanchor\"),n(\"currentvalue.prefix\"),n(\"currentvalue.suffix\"),n(\"currentvalue.offset\"),yT.coerceFont(n,\"currentvalue.font\",t.font)),n(\"transition.duration\"),n(\"transition.easing\"),n(\"bgcolor\"),n(\"activebgcolor\"),n(\"bordercolor\"),n(\"borderwidth\"),n(\"ticklen\"),n(\"tickwidth\"),n(\"tickcolor\"),n(\"minorticklen\")}}function Mgt(e,t){function r(a,o){return yT.coerce(e,t,Agt,a,o)}var n;if(e.method!==\"skip\"&&!Array.isArray(e.args)?n=t.visible=!1:n=r(\"visible\"),n){r(\"method\"),r(\"args\");var i=r(\"label\",\"step-\"+t._index);r(\"value\",i),r(\"execute\")}}});var gge=ye((ssr,pge)=>{\"use strict\";var qg=Oa(),xI=Mc(),__=Ca(),Bg=So(),t0=Dr(),Egt=t0.strTranslate,u4=ru(),Cgt=pl().arrayEditor,Ds=l4(),JU=Kh(),uge=JU.LINE_SPACING,YU=JU.FROM_TL,KU=JU.FROM_BR;pge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=kgt(n,t),a=n._infolayer.selectAll(\"g.\"+Ds.containerClassName).data(i.length>0?[0]:[]);a.enter().append(\"g\").classed(Ds.containerClassName,!0).style(\"cursor\",r?null:\"ew-resize\");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),xI.autoMargin(t,cge(c))}if(a.exit().each(function(){qg.select(this).selectAll(\"g.\"+Ds.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll(\"g.\"+Ds.groupClassName).data(i,Lgt);s.enter().append(\"g\").classed(Ds.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l<i.length;l++){var u=i[l];Pgt(t,u)}s.each(function(c){var f=qg.select(this);zgt(c),xI.manageCommandObserver(t,c,c._visibleSteps,function(h){var d=f.data()[0];d.active!==h.index&&(d._dragging||hge(t,f,d,h.index,!1,!0))}),Igt(t,qg.select(this),c)})}};function cge(e){return Ds.autoMarginIdRoot+e._index}function kgt(e,t){for(var r=e[Ds.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=t,n.push(a))}return n}function Lgt(e){return e._index}function Pgt(e,t){var r=Bg.tester.selectAll(\"g.\"+Ds.labelGroupClass).data(t._visibleSteps);r.enter().append(\"g\").classed(Ds.labelGroupClass,!0);var n=0,i=0;r.each(function(v){var x=qg.select(this),b=fge(x,{step:v},t),p=b.node();if(p){var C=Bg.bBox(p);i=Math.max(i,C.height),n=Math.max(n,C.width)}}),r.remove();var a=t._dims={};a.inputAreaWidth=Math.max(Ds.railWidth,Ds.gripHeight);var o=e._fullLayout._size;a.lx=o.l+o.w*t.x,a.ly=o.t+o.h*(1-t.y),t.lenmode===\"fraction\"?a.outerLength=Math.round(o.w*t.len):a.outerLength=t.len,a.inputAreaStart=0,a.inputAreaLength=Math.round(a.outerLength-t.pad.l-t.pad.r);var s=a.inputAreaLength-2*Ds.stepInset,l=s/(t._stepCount-1),u=n+Ds.labelPadding;if(a.labelStride=Math.max(1,Math.ceil(u/l)),a.labelHeight=i,a.currentValueMaxWidth=0,a.currentValueHeight=0,a.currentValueTotalHeight=0,a.currentValueMaxLines=1,t.currentvalue.visible){var c=Bg.tester.append(\"g\");r.each(function(v){var x=bI(c,t,v.label),b=x.node()&&Bg.bBox(x.node())||{width:0,height:0},p=u4.lineCount(x);a.currentValueMaxWidth=Math.max(a.currentValueMaxWidth,Math.ceil(b.width)),a.currentValueHeight=Math.max(a.currentValueHeight,Math.ceil(b.height)),a.currentValueMaxLines=Math.max(a.currentValueMaxLines,p)}),a.currentValueTotalHeight=a.currentValueHeight+t.currentvalue.offset,c.remove()}a.height=a.currentValueTotalHeight+Ds.tickOffset+t.ticklen+Ds.labelOffset+a.labelHeight+t.pad.t+t.pad.b;var f=\"left\";t0.isRightAnchor(t)&&(a.lx-=a.outerLength,f=\"right\"),t0.isCenterAnchor(t)&&(a.lx-=a.outerLength/2,f=\"center\");var h=\"top\";t0.isBottomAnchor(t)&&(a.ly-=a.height,h=\"bottom\"),t0.isMiddleAnchor(t)&&(a.ly-=a.height/2,h=\"middle\"),a.outerLength=Math.ceil(a.outerLength),a.height=Math.ceil(a.height),a.lx=Math.round(a.lx),a.ly=Math.round(a.ly);var d={y:t.y,b:a.height*KU[h],t:a.height*YU[h]};t.lenmode===\"fraction\"?(d.l=0,d.xl=t.x-t.len*YU[f],d.r=0,d.xr=t.x+t.len*KU[f]):(d.x=t.x,d.l=a.outerLength*YU[f],d.r=a.outerLength*KU[f]),xI.autoMargin(e,cge(t),d)}function Igt(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(bI,r).call(qgt,r).call(Dgt,r).call(Fgt,r).call(Ogt,e,r).call(Rgt,e,r);var n=r._dims;Bg.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(vge,r,!1),t.call(bI,r)}function bI(e,t,r){if(t.currentvalue.visible){var n=t._dims,i,a;switch(t.currentvalue.xanchor){case\"right\":i=n.inputAreaLength-Ds.currentValueInset-n.currentValueMaxWidth,a=\"left\";break;case\"center\":i=n.inputAreaLength*.5,a=\"middle\";break;default:i=Ds.currentValueInset,a=\"left\"}var o=t0.ensureSingle(e,\"text\",Ds.labelClass,function(h){h.attr({\"text-anchor\":a,\"data-notex\":1})}),s=t.currentvalue.prefix?t.currentvalue.prefix:\"\";if(typeof r==\"string\")s+=r;else{var l=t.steps[t.active].label,u=t._gd._fullLayout._meta;u&&(l=t0.templateString(l,u)),s+=l}t.currentvalue.suffix&&(s+=t.currentvalue.suffix),o.call(Bg.font,t.currentvalue.font).text(s).call(u4.convertToTspans,t._gd);var c=u4.lineCount(o),f=(n.currentValueMaxLines+1-c)*t.currentvalue.font.size*uge;return u4.positionText(o,i,f),o}}function Rgt(e,t,r){var n=t0.ensureSingle(e,\"rect\",Ds.gripRectClass,function(i){i.call(dge,t,e,r).style(\"pointer-events\",\"all\")});n.attr({width:Ds.gripWidth,height:Ds.gripHeight,rx:Ds.gripRadius,ry:Ds.gripRadius}).call(__.stroke,r.bordercolor).call(__.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\")}function fge(e,t,r){var n=t0.ensureSingle(e,\"text\",Ds.labelClass,function(o){o.attr({\"text-anchor\":\"middle\",\"data-notex\":1})}),i=t.step.label,a=r._gd._fullLayout._meta;return a&&(i=t0.templateString(i,a)),n.call(Bg.font,r.font).text(i).call(u4.convertToTspans,r._gd),n}function Dgt(e,t){var r=t0.ensureSingle(e,\"g\",Ds.labelsClass),n=t._dims,i=r.selectAll(\"g.\"+Ds.labelGroupClass).data(n.labelSteps);i.enter().append(\"g\").classed(Ds.labelGroupClass,!0),i.exit().remove(),i.each(function(a){var o=qg.select(this);o.call(fge,a,t),Bg.setTranslate(o,$U(t,a.fraction),Ds.tickOffset+t.ticklen+t.font.size*uge+Ds.labelOffset+n.currentValueTotalHeight)})}function sge(e,t,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&hge(e,t,r,o,!0,i)}function hge(e,t,r,n,i,a){var o=r.active;r.active=n,Cgt(e.layout,Ds.name,r).applyUpdate(\"active\",n);var s=r.steps[r.active];t.call(vge,r,a),t.call(bI,r),e.emit(\"plotly_sliderchange\",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=a):(t._nextMethod={step:s,doCallback:i,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame(function(){var l=t._nextMethod.step;l.method&&(l.execute&&xI.executeAPICommand(e,l.method,l.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function dge(e,t,r){if(t._context.staticPlot)return;var n=r.node(),i=qg.select(t);function a(){return r.data()[0]}function o(){var s=a();t.emit(\"plotly_sliderstart\",{slider:s});var l=r.select(\".\"+Ds.gripRectClass);qg.event.stopPropagation(),qg.event.preventDefault(),l.call(__.fill,s.activebgcolor);var u=lge(s,qg.mouse(n)[0]);sge(t,r,s,u,!0),s._dragging=!0;function c(){var h=a(),d=lge(h,qg.mouse(n)[0]);sge(t,r,h,d,!1)}i.on(\"mousemove\",c),i.on(\"touchmove\",c);function f(){var h=a();h._dragging=!1,l.call(__.fill,h.bgcolor),i.on(\"mouseup\",null),i.on(\"mousemove\",null),i.on(\"touchend\",null),i.on(\"touchmove\",null),t.emit(\"plotly_sliderend\",{slider:h,step:h.steps[h.active]})}i.on(\"mouseup\",f),i.on(\"touchend\",f)}e.on(\"mousedown\",o),e.on(\"touchstart\",o)}function Fgt(e,t){var r=e.selectAll(\"rect.\"+Ds.tickRectClass).data(t._visibleSteps),n=t._dims;r.enter().append(\"rect\").classed(Ds.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+\"px\",\"shape-rendering\":\"crispEdges\"}),r.each(function(i,a){var o=a%n.labelStride===0,s=qg.select(this);s.attr({height:o?t.ticklen:t.minorticklen}).call(__.fill,t.tickcolor),Bg.setTranslate(s,$U(t,a/(t._stepCount-1))-.5*t.tickwidth,(o?Ds.tickOffset:Ds.minorTickOffset)+n.currentValueTotalHeight)})}function zgt(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}function vge(e,t,r){for(var n=e.select(\"rect.\"+Ds.gripRectClass),i=0,a=0;a<t._stepCount;a++)if(t._visibleSteps[a]._index===t.active){i=a;break}var o=$U(t,i/(t._stepCount-1));if(!t._invokingCommand){var s=n;r&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr(\"transform\",Egt(o-Ds.gripWidth*.5,t._dims.currentValueTotalHeight))}}function $U(e,t){var r=e._dims;return r.inputAreaStart+Ds.stepInset+(r.inputAreaLength-2*Ds.stepInset)*Math.min(1,Math.max(0,t))}function lge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Ds.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Ds.stepInset-2*r.inputAreaStart)))}function Ogt(e,t,r){var n=r._dims,i=t0.ensureSingle(e,\"rect\",Ds.railTouchRectClass,function(a){a.call(dge,t,e,r).style(\"pointer-events\",\"all\")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Ds.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr(\"opacity\",0),Bg.setTranslate(i,0,n.currentValueTotalHeight)}function qgt(e,t){var r=t._dims,n=r.inputAreaLength-Ds.railInset*2,i=t0.ensureSingle(e,\"rect\",Ds.railRectClass);i.attr({width:n,height:Ds.railWidth,rx:Ds.railRadius,ry:Ds.railRadius,\"shape-rendering\":\"crispEdges\"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style(\"stroke-width\",t.borderwidth+\"px\"),Bg.setTranslate(i,Ds.railInset,(r.inputAreaWidth-Ds.railWidth)*.5+r.currentValueTotalHeight)}});var yge=ye((lsr,mge)=>{\"use strict\";var Bgt=l4();mge.exports={moduleType:\"component\",name:Bgt.name,layoutAttributes:ZU(),supplyLayoutDefaults:oge(),draw:gge()}});var wI=ye((usr,xge)=>{\"use strict\";var _ge=Eh();xge.exports={bgcolor:{valType:\"color\",dflt:_ge.background,editType:\"plot\"},bordercolor:{valType:\"color\",dflt:_ge.defaultLine,editType:\"plot\"},borderwidth:{valType:\"integer\",dflt:0,min:0,editType:\"plot\"},autorange:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}}],editType:\"calc\",impliedEdits:{autorange:!1}},thickness:{valType:\"number\",dflt:.15,min:0,max:1,editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"}});var QU=ye((csr,bge)=>{\"use strict\";bge.exports={_isSubplotObj:!0,rangemode:{valType:\"enumerated\",values:[\"auto\",\"fixed\",\"match\"],dflt:\"match\",editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},editType:\"calc\"}});var TI=ye((fsr,wge)=>{\"use strict\";wge.exports={name:\"rangeslider\",containerClassName:\"rangeslider-container\",bgClassName:\"rangeslider-bg\",rangePlotClassName:\"rangeslider-rangeplot\",maskMinClassName:\"rangeslider-mask-min\",maskMaxClassName:\"rangeslider-mask-max\",slideBoxClassName:\"rangeslider-slidebox\",grabberMinClassName:\"rangeslider-grabber-min\",grabAreaMinClassName:\"rangeslider-grabarea-min\",handleMinClassName:\"rangeslider-handle-min\",grabberMaxClassName:\"rangeslider-grabber-max\",grabAreaMaxClassName:\"rangeslider-grabarea-max\",handleMaxClassName:\"rangeslider-handle-max\",maskMinOppAxisClassName:\"rangeslider-mask-min-opp-axis\",maskMaxOppAxisClassName:\"rangeslider-mask-max-opp-axis\",maskColor:\"rgba(0,0,0,0.4)\",maskOppAxisColor:\"rgba(0,0,0,0.2)\",slideBoxFill:\"transparent\",slideBoxCursor:\"ew-resize\",grabAreaFill:\"transparent\",grabAreaCursor:\"col-resize\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Sge=ye(SI=>{\"use strict\";var Ngt=hf(),Ugt=ru(),Tge=TI(),Vgt=Kh().LINE_SPACING,AI=Tge.name;function Age(e){var t=e&&e[AI];return t&&t.visible}SI.isVisible=Age;SI.makeData=function(e){for(var t=Ngt.list({_fullLayout:e},\"x\",!0),r=e.margin,n=[],i=0;i<t.length;i++){var a=t[i];if(Age(a)){n.push(a);var o=a[AI];o._id=AI+a._id,o._height=(e.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}e._rangeSliderData=n};SI.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[AI],i=t._id.charAt(0),a=0,o=0;if(t.side===\"bottom\"&&(a=t._depth,t.title.text!==r._dfltTitle[i])){o=1.5*t.title.font.size+10+n._offsetShift;var s=(t.title.text.match(Ugt.BR_TAG_ALL)||[]).length;o+=s*t.title.font.size*Vgt}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+a+Math.max(r.margin.b,o),pad:Tge.extraPad+n._offsetShift*2}}});var kge=ye((dsr,Cge)=>{\"use strict\";var MI=Dr(),Mge=pl(),Ege=hf(),Ggt=wI(),Hgt=QU();Cge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;MI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Mge.newContainer(a,\"rangeslider\");function l(L,_){return MI.coerce(o,s,Ggt,L,_)}var u,c;function f(L,_){return MI.coerce(u,c,Hgt,L,_)}var h=l(\"visible\");if(h){l(\"bgcolor\",r.plot_bgcolor),l(\"bordercolor\"),l(\"borderwidth\"),l(\"thickness\"),l(\"autorange\",!a.isValidRange(o.range)),l(\"range\");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.substr(0,L.indexOf(\"y\"))===Ege.name2id(n)}).map(function(L){return L.substr(L.indexOf(\"y\"),L.length)}),x=MI.simpleMap(v,Ege.id2name),b=0;b<x.length;b++){var p=x[b];u=o[p]||{},c=Mge.newContainer(s,p,\"yaxis\");var C=r[p],E;u.range&&C.isValidRange(u.range)&&(E=\"fixed\");var A=f(\"rangemode\",E);A!==\"match\"&&f(\"range\",C.range.slice())}s._input=o}}});var Pge=ye((vsr,Lge)=>{\"use strict\";var jgt=hf().list,Wgt=wg().getAutoRange,Xgt=TI();Lge.exports=function(t){for(var r=jgt(t,\"x\",!0),n=0;n<r.length;n++){var i=r[n],a=i[Xgt.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=Wgt(t,i))}}});var Fge=ye((psr,Dge)=>{\"use strict\";var EI=Oa(),Zgt=qa(),Ygt=Mc(),Jf=Dr(),CI=Jf.strTranslate,Rge=So(),x_=Ca(),Kgt=Mb(),Jgt=vh(),eV=hf(),$gt=yv(),Qgt=Tg(),il=TI();Dge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n<r.length;n++){var i=r[n][il.name];i._clipId=i._id+\"-\"+t._uid}function a(s){return s._name}var o=t._infolayer.selectAll(\"g.\"+il.containerClassName).data(r,a);o.exit().each(function(s){var l=s[il.name];t._topdefs.select(\"#\"+l._clipId).remove()}).remove(),r.length!==0&&(o.enter().append(\"g\").classed(il.containerClassName,!0).attr(\"pointer-events\",\"all\"),o.each(function(s){var l=EI.select(this),u=s[il.name],c=t[eV.id2name(s.anchor)],f=u[eV.id2name(s.anchor)];if(u.range){var h=Jf.simpleMap(u.range,s.r2l),d=Jf.simpleMap(s.range,s.r2l),v;d[0]<d[1]?v=[Math.min(h[0],d[0]),Math.max(h[1],d[1])]:v=[Math.max(h[0],d[0]),Math.min(h[1],d[1])],u.range=u._input.range=Jf.simpleMap(v,s.l2r)}s.cleanRange(\"rangeslider.range\");var x=t._size,b=s.domain;u._width=x.w*(b[1]-b[0]);var p=Math.round(x.l+x.w*b[0]),C=Math.round(x.t+x.h*(1-s._counterDomainMin)+(s.side===\"bottom\"?s._depth:0)+u._offsetShift+il.extraPad);l.attr(\"transform\",CI(p,C)),u._rl=Jf.simpleMap(u.range,s.r2l);var E=u._rl[0],A=u._rl[1],L=A-E;if(u.p2d=function(G){return G/u._width*L+E},u.d2p=function(G){return(G-E)/L*u._width},s.rangebreaks){var _=s.locateBreaks(E,A);if(_.length){var k,M,g=0;for(k=0;k<_.length;k++)M=_[k],g+=M.max-M.min;var P=u._width/(A-E-g),T=[-P*E];for(k=0;k<_.length;k++)M=_[k],T.push(T[T.length-1]-P*(M.max-M.min));for(u.d2p=function(G){for(var Z=T[0],H=0;H<_.length;H++){var N=_[H];if(G>=N.max)Z=T[H+1];else if(G<N.min)break}return Z+P*G},k=0;k<_.length;k++)M=_[k],M.pmin=u.d2p(M.min),M.pmax=u.d2p(M.max);u.p2d=function(G){for(var Z=T[0],H=0;H<_.length;H++){var N=_[H];if(G>=N.pmax)Z=T[H+1];else if(G<N.pmin)break}return(G-Z)/P}}}if(f.rangemode!==\"match\"){var z=c.r2l(f.range[0]),O=c.r2l(f.range[1]),V=O-z;u.d2pOppAxis=function(G){return(G-z)/V*u._height}}l.call(imt,e,s,u).call(nmt,e,s,u).call(amt,e,s,u).call(smt,e,s,u,f).call(lmt,e,s,u).call(umt,e,s,u),emt(l,e,s,u),rmt(l,e,s,u,c,f),s.side===\"bottom\"&&Kgt.draw(e,s._id+\"title\",{propContainer:s,propName:s._name+\".title\",placeholder:t._dfltTitle.x,attributes:{x:s._offset+s._length/2,y:C+u._height+u._offsetShift+10+1.5*s.title.font.size,\"text-anchor\":\"middle\"}})}))};function Ige(e){return typeof e.clientX==\"number\"?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function emt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select(\"rect.\"+il.slideBoxClassName).node(),a=e.select(\"rect.\"+il.grabAreaMinClassName).node(),o=e.select(\"rect.\"+il.grabAreaMaxClassName).node();function s(){var l=EI.event,u=l.target,c=Ige(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=$gt.coverSlip();this.addEventListener(\"touchmove\",x),this.addEventListener(\"touchend\",b),v.addEventListener(\"mousemove\",x),v.addEventListener(\"mouseup\",b);function x(p){var C=Ige(p),E=+C-c,A,L,_;switch(u){case i:if(_=\"ew-resize\",h+E>r._length||d+E<0)return;A=h+E,L=d+E;break;case a:if(_=\"col-resize\",h+E>r._length)return;A=h+E,L=d;break;case o:if(_=\"col-resize\",d+E<0)return;A=h,L=d+E;break;default:_=\"ew-resize\",A=f,L=f+E;break}if(L<A){var k=L;L=A,A=k}n._pixelMin=A,n._pixelMax=L,Qgt(EI.select(v),_),tmt(e,t,r,n)}function b(){v.removeEventListener(\"mousemove\",x),v.removeEventListener(\"mouseup\",b),this.removeEventListener(\"touchmove\",x),this.removeEventListener(\"touchend\",b),Jf.removeElement(v)}}e.on(\"mousedown\",s),e.on(\"touchstart\",s)}function tmt(e,t,r,n){function i(s){return r.l2r(Jf.constrain(s,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){Zgt.call(\"_guiRelayout\",t,r._name+\".range\",[a,o])})}function rmt(e,t,r,n,i,a){var o=il.handleWidth/2;function s(p){return Jf.constrain(p,0,n._width)}function l(p){return Jf.constrain(p,0,n._height)}function u(p){return Jf.constrain(p,-o,n._width+o)}var c=s(n.d2p(r._rl[0])),f=s(n.d2p(r._rl[1]));if(e.select(\"rect.\"+il.slideBoxClassName).attr(\"x\",c).attr(\"width\",f-c),e.select(\"rect.\"+il.maskMinClassName).attr(\"width\",c),e.select(\"rect.\"+il.maskMaxClassName).attr(\"x\",f).attr(\"width\",n._width-f),a.rangemode!==\"match\"){var h=n._height-l(n.d2pOppAxis(i._rl[1])),d=n._height-l(n.d2pOppAxis(i._rl[0]));e.select(\"rect.\"+il.maskMinOppAxisClassName).attr(\"x\",c).attr(\"height\",h).attr(\"width\",f-c),e.select(\"rect.\"+il.maskMaxOppAxisClassName).attr(\"x\",c).attr(\"y\",d).attr(\"height\",n._height-d).attr(\"width\",f-c),e.select(\"rect.\"+il.slideBoxClassName).attr(\"y\",h).attr(\"height\",d-h)}var v=.5,x=Math.round(u(c-o))-v,b=Math.round(u(f-o))+v;e.select(\"g.\"+il.grabberMinClassName).attr(\"transform\",CI(x,v)),e.select(\"g.\"+il.grabberMaxClassName).attr(\"transform\",CI(b,v))}function imt(e,t,r,n){var i=Jf.ensureSingle(e,\"rect\",il.bgClassName,function(l){l.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})}),a=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=Rge.crispRound(t,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:CI(o,o),\"stroke-width\":s}).call(x_.stroke,n.bordercolor).call(x_.fill,n.bgcolor)}function nmt(e,t,r,n){var i=t._fullLayout,a=Jf.ensureSingleById(i._topdefs,\"clipPath\",n._clipId,function(o){o.append(\"rect\").attr({x:0,y:0})});a.select(\"rect\").attr({width:n._width,height:n._height})}function amt(e,t,r,n){var i=t.calcdata,a=e.selectAll(\"g.\"+il.rangePlotClassName).data(r._subplotsWith,Jf.identity);a.enter().append(\"g\").attr(\"class\",function(s){return il.rangePlotClassName+\" \"+s}).call(Rge.setClipUrl,n._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,l){var u=EI.select(this),c=l===0,f=eV.getFromId(t,s,\"y\"),h=f._name,d=n[h],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:n.range.slice(),calendar:r.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(v.layout.xaxis.rangebreaks=r.rangebreaks),v.layout[h]={type:f.type,domain:[0,1],range:d.rangemode!==\"match\"?d.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(v.layout[h].rangebreaks=f.rangebreaks),Ygt.supplyDefaults(v);var x=v._fullLayout.xaxis,b=v._fullLayout[h];x.clearCalc(),x.setScale(),b.clearCalc(),b.setScale();var p={id:s,plotgroup:u,xaxis:x,yaxis:b,isRangePlot:!0};c?o=p:(p.mainplot=\"xy\",p.mainplotinfo=o),Jgt.rangePlot(t,p,omt(i,s))})}function omt(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n],a=i[0].trace;a.xaxis+a.yaxis===t&&r.push(i)}return r}function smt(e,t,r,n,i){var a=Jf.ensureSingle(e,\"rect\",il.maskMinClassName,function(u){u.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})});a.attr(\"height\",n._height).call(x_.fill,il.maskColor);var o=Jf.ensureSingle(e,\"rect\",il.maskMaxClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});if(o.attr(\"height\",n._height).call(x_.fill,il.maskColor),i.rangemode!==\"match\"){var s=Jf.ensureSingle(e,\"rect\",il.maskMinOppAxisClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});s.attr(\"width\",n._width).call(x_.fill,il.maskOppAxisColor);var l=Jf.ensureSingle(e,\"rect\",il.maskMaxOppAxisClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});l.attr(\"width\",n._width).style(\"border-top\",il.maskOppBorder).call(x_.fill,il.maskOppAxisColor)}}function lmt(e,t,r,n){if(!t._context.staticPlot){var i=Jf.ensureSingle(e,\"rect\",il.slideBoxClassName,function(a){a.attr({y:0,cursor:il.slideBoxCursor,\"shape-rendering\":\"crispEdges\"})});i.attr({height:n._height,fill:il.slideBoxFill})}}function umt(e,t,r,n){var i=Jf.ensureSingle(e,\"g\",il.grabberMinClassName),a=Jf.ensureSingle(e,\"g\",il.grabberMaxClassName),o={x:0,width:il.handleWidth,rx:il.handleRadius,fill:x_.background,stroke:x_.defaultLine,\"stroke-width\":il.handleStrokeWidth,\"shape-rendering\":\"crispEdges\"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},l=Jf.ensureSingle(i,\"rect\",il.handleMinClassName,function(d){d.attr(o)});l.attr(s);var u=Jf.ensureSingle(a,\"rect\",il.handleMaxClassName,function(d){d.attr(o)});u.attr(s);var c={width:il.grabAreaWidth,x:0,y:0,fill:il.grabAreaFill,cursor:t._context.staticPlot?void 0:il.grabAreaCursor},f=Jf.ensureSingle(i,\"rect\",il.grabAreaMinClassName,function(d){d.attr(c)});f.attr(\"height\",n._height);var h=Jf.ensureSingle(a,\"rect\",il.grabAreaMaxClassName,function(d){d.attr(c)});h.attr(\"height\",n._height)}});var Oge=ye((gsr,zge)=>{\"use strict\";var cmt=Dr(),fmt=wI(),hmt=QU(),tV=Sge();zge.exports={moduleType:\"component\",name:\"rangeslider\",schema:{subplots:{xaxis:{rangeslider:cmt.extendFlat({},fmt,{yaxis:hmt})}}},layoutAttributes:wI(),handleDefaults:kge(),calcAutorange:Pge(),draw:Fge(),isVisible:tV.isVisible,makeData:tV.makeData,autoMarginOpts:tV.autoMarginOpts}});var kI=ye((msr,Bge)=>{\"use strict\";var dmt=ec(),qge=Eh(),vmt=pl().templatedArray,pmt=vmt(\"button\",{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},step:{valType:\"enumerated\",values:[\"month\",\"year\",\"day\",\"hour\",\"minute\",\"second\",\"all\"],dflt:\"month\",editType:\"plot\"},stepmode:{valType:\"enumerated\",values:[\"backward\",\"todate\"],dflt:\"backward\",editType:\"plot\"},count:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},label:{valType:\"string\",editType:\"plot\"},editType:\"plot\"});Bge.exports={visible:{valType:\"boolean\",editType:\"plot\"},buttons:pmt,x:{valType:\"number\",min:-2,max:3,editType:\"plot\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"plot\"},y:{valType:\"number\",min:-2,max:3,editType:\"plot\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"bottom\",editType:\"plot\"},font:dmt({editType:\"plot\"}),bgcolor:{valType:\"color\",dflt:qge.lightLine,editType:\"plot\"},activecolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:qge.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"}});var rV=ye((ysr,Nge)=>{\"use strict\";Nge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Gge=ye((_sr,Vge)=>{\"use strict\";var LI=Dr(),gmt=Ca(),mmt=pl(),ymt=Yd(),Uge=kI(),iV=rV();Vge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=mmt.newContainer(r,\"rangeselector\");function l(d,v){return LI.coerce(o,s,Uge,d,v)}var u=ymt(o,s,{name:\"buttons\",handleItemDefaults:_mt,calendar:a}),c=l(\"visible\",u.length>0);if(c){var f=xmt(r,n,i);l(\"x\",f[0]),l(\"y\",f[1]),LI.noneOrAll(t,r,[\"x\",\"y\"]),l(\"xanchor\"),l(\"yanchor\"),LI.coerceFont(l,\"font\",n.font);var h=l(\"bgcolor\");l(\"activecolor\",gmt.contrast(h,iV.lightAmount,iV.darkAmount)),l(\"bordercolor\"),l(\"borderwidth\")}};function _mt(e,t,r,n){var i=n.calendar;function a(l,u){return LI.coerce(e,t,Uge.buttons,l,u)}var o=a(\"visible\");if(o){var s=a(\"step\");s!==\"all\"&&(i&&i!==\"gregorian\"&&(s===\"month\"||s===\"year\")?t.stepmode=\"backward\":a(\"stepmode\"),a(\"count\")),a(\"label\")}}function xmt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a<n.length;a++){var o=t[n[a]].domain;o&&(i=Math.max(o[1],i))}return[e.domain[0],i+iV.yPad]}});var jge=ye((xsr,Hge)=>{\"use strict\";var bmt=mO(),wmt=Dr().titleCase;Hge.exports=function(t,r){var n=t._name,i={};if(r.step===\"all\")i[n+\".autorange\"]=!0;else{var a=Tmt(t,r);i[n+\".range[0]\"]=a[0],i[n+\".range[1]\"]=a[1]}return i};function Tmt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=bmt[\"utc\"+wmt(i)],o=t.count,s;switch(t.stepmode){case\"backward\":s=e.l2r(+a.offset(n,-o));break;case\"todate\":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var Qge=ye((bsr,$ge)=>{\"use strict\";var II=Oa(),Amt=qa(),Smt=Mc(),Wge=Ca(),Jge=So(),Iy=Dr(),Xge=Iy.strTranslate,PI=ru(),Mmt=hf(),oV=Kh(),Zge=oV.LINE_SPACING,Yge=oV.FROM_TL,Kge=oV.FROM_BR,aV=rV(),Emt=jge();$ge.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(\".rangeselector\").data(Cmt(t),kmt);n.enter().append(\"g\").classed(\"rangeselector\",!0),n.exit().remove(),n.style({cursor:\"pointer\",\"pointer-events\":\"all\"}),n.each(function(i){var a=II.select(this),o=i,s=o.rangeselector,l=a.selectAll(\"g.button\").data(Iy.filterVisible(s.buttons));l.enter().append(\"g\").classed(\"button\",!0),l.exit().remove(),l.each(function(u){var c=II.select(this),f=Emt(o,u);u._isActive=Lmt(o,u,f),c.call(nV,s,u),c.call(Imt,s,u,t),c.on(\"click\",function(){t._dragged||Amt.call(\"_guiRelayout\",t,f)}),c.on(\"mouseover\",function(){u._isHovered=!0,c.call(nV,s,u)}),c.on(\"mouseout\",function(){u._isHovered=!1,c.call(nV,s,u)})}),Dmt(t,l,s,o._name,a)})};function Cmt(e){for(var t=Mmt.list(e,\"x\",!0),r=[],n=0;n<t.length;n++){var i=t[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function kmt(e){return e._id}function Lmt(e,t,r){if(t.step===\"all\")return e.autorange===!0;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}function nV(e,t,r){var n=Iy.ensureSingle(e,\"rect\",\"selector-rect\",function(i){i.attr(\"shape-rendering\",\"crispEdges\")});n.attr({rx:aV.rx,ry:aV.ry}),n.call(Wge.stroke,t.bordercolor).call(Wge.fill,Pmt(t,r)).style(\"stroke-width\",t.borderwidth+\"px\")}function Pmt(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}function Imt(e,t,r,n){function i(o){PI.convertToTspans(o,n)}var a=Iy.ensureSingle(e,\"text\",\"selector-text\",function(o){o.attr(\"text-anchor\",\"middle\")});a.call(Jge.font,t.font).text(Rmt(r,n._fullLayout._meta)).call(i)}function Rmt(e,t){return e.label?t?Iy.templateString(e.label,t):e.label:e.step===\"all\"?\"all\":e.count+e.step.charAt(0)}function Dmt(e,t,r,n,i){var a=0,o=0,s=r.borderwidth;t.each(function(){var d=II.select(this),v=d.select(\".selector-text\"),x=r.font.size*Zge,b=Math.max(x*PI.lineCount(v),16)+3;o=Math.max(o,b)}),t.each(function(){var d=II.select(this),v=d.select(\".selector-rect\"),x=d.select(\".selector-text\"),b=x.node()&&Jge.bBox(x.node()).width,p=r.font.size*Zge,C=PI.lineCount(x),E=Math.max(b+10,aV.minButtonWidth);d.attr(\"transform\",Xge(s+a,s)),v.attr({x:0,y:0,width:E,height:o}),PI.positionText(x,E/2,o/2-(C-1)*p/2+3),a+=E+5});var l=e._fullLayout._size,u=l.l+l.w*r.x,c=l.t+l.h*(1-r.y),f=\"left\";Iy.isRightAnchor(r)&&(u-=a,f=\"right\"),Iy.isCenterAnchor(r)&&(u-=a/2,f=\"center\");var h=\"top\";Iy.isBottomAnchor(r)&&(c-=o,h=\"bottom\"),Iy.isMiddleAnchor(r)&&(c-=o/2,h=\"middle\"),a=Math.ceil(a),o=Math.ceil(o),u=Math.round(u),c=Math.round(c),Smt.autoMargin(e,n+\"-range-selector\",{x:r.x,y:r.y,l:a*Yge[f],r:a*Kge[f],b:o*Kge[h],t:o*Yge[h]}),i.attr(\"transform\",Xge(u,c))}});var tme=ye((wsr,eme)=>{\"use strict\";eme.exports={moduleType:\"component\",name:\"rangeselector\",schema:{subplots:{xaxis:{rangeselector:kI()}}},layoutAttributes:kI(),handleDefaults:Gge(),draw:Qge()}});var kc=ye(sV=>{\"use strict\";var rme=Ao().extendFlat;sV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:\"info_array\",editType:e.editType,items:[{valType:\"number\",min:0,max:1,editType:e.editType},{valType:\"number\",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+\" \":\"\",i=e.trace?\"trace \":\"subplot \",a=t.description?\" \"+t.description:\"\",o={x:rme({},r,{}),y:rme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:\"integer\",min:0,dflt:0,editType:e.editType},o.column={valType:\"integer\",min:0,dflt:0,editType:e.editType}),o};sV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r(\"domain.column\");s!==void 0&&(s<o.columns?i=o._domains.x[s]:delete e.domain.column);var l=r(\"domain.row\");l!==void 0&&(l<o.rows?a=o._domains.y[l]:delete e.domain.row)}var u=r(\"domain.x\",i),c=r(\"domain.y\",a);u[0]<u[1]||(e.domain.x=i.slice()),c[0]<c[1]||(e.domain.y=a.slice())}});var uV=ye((Asr,ome)=>{\"use strict\";var Fmt=Dr(),zmt=n3().counter,Omt=kc().attributes,ime=hd().idRegex,qmt=pl(),lV={rows:{valType:\"integer\",min:1,editType:\"plot\"},roworder:{valType:\"enumerated\",values:[\"top to bottom\",\"bottom to top\"],dflt:\"top to bottom\",editType:\"plot\"},columns:{valType:\"integer\",min:1,editType:\"plot\"},subplots:{valType:\"info_array\",freeLength:!0,dimensions:2,items:{valType:\"enumerated\",values:[zmt(\"xy\").toString(),\"\"],editType:\"plot\"},editType:\"plot\"},xaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[ime.x.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},yaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[ime.y.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},pattern:{valType:\"enumerated\",values:[\"independent\",\"coupled\"],dflt:\"coupled\",editType:\"plot\"},xgap:{valType:\"number\",min:0,max:1,editType:\"plot\"},ygap:{valType:\"number\",min:0,max:1,editType:\"plot\"},domain:Omt({name:\"grid\",editType:\"plot\",noGridCell:!0},{}),xside:{valType:\"enumerated\",values:[\"bottom\",\"bottom plot\",\"top plot\",\"top\"],dflt:\"bottom plot\",editType:\"plot\"},yside:{valType:\"enumerated\",values:[\"left\",\"left plot\",\"right plot\",\"right\"],dflt:\"left plot\",editType:\"plot\"},editType:\"plot\"};function RI(e,t,r){var n=t[r+\"axes\"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Bmt(e,t){var r=e.grid||{},n=RI(t,r,\"x\"),i=RI(t,r,\"y\");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=qmt.newContainer(t,\"grid\");function h(_,k){return Fmt.coerce(r,f,lV,_,k)}var d=h(\"rows\",u),v=h(\"columns\",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h(\"pattern\")===\"independent\";x&&(a=!0)}f._hasSubplotGrid=a;var b=h(\"roworder\"),p=b===\"top to bottom\",C=a?.2:.1,E=a?.3:.1,A,L;l&&t._splomGridDflt&&(A=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:nme(\"x\",h,C,A,v),y:nme(\"y\",h,E,L,d,p)}}function nme(e,t,r,n,i,a){var o=t(e+\"gap\",r),s=t(\"domain.\"+e);t(e+\"side\",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var d=u+c*h;l[a?i-1-h:h]=[d,d+f]}return l}function Nmt(e,t){var r=t.grid;if(!(!r||!r._domains)){var n=e.grid||{},i=t._subplots,a=r._hasSubplotGrid,o=r.rows,s=r.columns,l=r.pattern===\"independent\",u,c,f,h,d,v,x,b=r._axisMap={};if(a){var p=n.subplots||[];v=r.subplots=new Array(o);var C=1;for(u=0;u<o;u++){var E=v[u]=new Array(s),A=p[u]||[];for(c=0;c<s;c++)if(l?(d=C===1?\"xy\":\"x\"+C+\"y\"+C,C++):d=A[c],E[c]=\"\",i.cartesian.indexOf(d)!==-1){if(x=d.indexOf(\"y\"),f=d.slice(0,x),h=d.slice(x),b[f]!==void 0&&b[f]!==c||b[h]!==void 0&&b[h]!==u)continue;E[c]=d,b[f]=c,b[h]=u}}}else{var L=RI(t,n,\"x\"),_=RI(t,n,\"y\");r.xaxes=ame(L,i.xaxis,s,b,\"x\"),r.yaxes=ame(_,i.yaxis,o,b,\"y\")}var k=r._anchors={},M=r.roworder===\"top to bottom\";for(var g in b){var P=g.charAt(0),T=r[P+\"side\"],z,O,V;if(T.length<8)k[g]=\"free\";else if(P===\"x\"){if(T.charAt(0)===\"t\"===M?(z=0,O=1,V=o):(z=o-1,O=-1,V=-1),a){var G=b[g];for(u=z;u!==V;u+=O)if(d=v[u][G],!!d&&(x=d.indexOf(\"y\"),d.slice(0,x)===g)){k[g]=d.slice(x);break}}else for(u=z;u!==V;u+=O)if(h=r.yaxes[u],i.cartesian.indexOf(g+h)!==-1){k[g]=h;break}}else if(T.charAt(0)===\"l\"?(z=0,O=1,V=s):(z=s-1,O=-1,V=-1),a){var Z=b[g];for(u=z;u!==V;u+=O)if(d=v[Z][u],!!d&&(x=d.indexOf(\"y\"),d.slice(x)===g)){k[g]=d.slice(0,x);break}}else for(u=z;u!==V;u+=O)if(f=r.xaxes[u],i.cartesian.indexOf(f+g)!==-1){k[g]=f;break}}}}function ame(e,t,r,n,i){var a=new Array(r),o;function s(l,u){t.indexOf(u)!==-1&&n[u]===void 0?(a[l]=u,n[u]=l):a[l]=\"\"}if(Array.isArray(e))for(o=0;o<r;o++)s(o,e[o]);else for(s(0,i),o=1;o<r;o++)s(o,i+(o+1));return a}ome.exports={moduleType:\"component\",name:\"grid\",schema:{layout:{grid:lV}},layoutAttributes:lV,sizeDefaults:Bmt,contentDefaults:Nmt}});var cV=ye((Ssr,sme)=>{\"use strict\";sme.exports={visible:{valType:\"boolean\",editType:\"calc\"},type:{valType:\"enumerated\",values:[\"percent\",\"constant\",\"sqrt\",\"data\"],editType:\"calc\"},symmetric:{valType:\"boolean\",editType:\"calc\"},array:{valType:\"data_array\",editType:\"calc\"},arrayminus:{valType:\"data_array\",editType:\"calc\"},value:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},valueminus:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},traceref:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},tracerefminus:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},copy_ystyle:{valType:\"boolean\",editType:\"plot\"},copy_zstyle:{valType:\"boolean\",editType:\"style\"},color:{valType:\"color\",editType:\"style\"},thickness:{valType:\"number\",min:0,dflt:2,editType:\"style\"},width:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\"}});var cme=ye((Msr,ume)=>{\"use strict\";var lme=Eo(),Umt=qa(),Vmt=Dr(),Gmt=pl(),Hmt=cV();ume.exports=function(e,t,r,n){var i=\"error_\"+n.axis,a=Gmt.newContainer(t,i),o=e[i]||{};function s(v,x){return Vmt.coerce(o,a,Hmt,v,x)}var l=o.array!==void 0||o.value!==void 0||o.type===\"sqrt\",u=s(\"visible\",l);if(u!==!1){var c=s(\"type\",\"array\"in o?\"data\":\"percent\"),f=!0;c!==\"sqrt\"&&(f=s(\"symmetric\",!((c===\"data\"?\"arrayminus\":\"valueminus\")in o))),c===\"data\"?(s(\"array\"),s(\"traceref\"),f||(s(\"arrayminus\"),s(\"tracerefminus\"))):(c===\"percent\"||c===\"constant\")&&(s(\"value\"),f||s(\"valueminus\"));var h=\"copy_\"+n.inherit+\"style\";if(n.inherit){var d=t[\"error_\"+n.inherit];(d||{}).visible&&s(h,!(o.color||lme(o.thickness)||lme(o.width)))}(!n.inherit||!a[h])&&(s(\"color\",r),s(\"thickness\"),s(\"width\",Umt.traceIs(t,\"gl3d\")?0:4))}}});var fV=ye((Esr,hme)=>{\"use strict\";hme.exports=function(t){var r=t.type,n=t.symmetric;if(r===\"data\"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=fme(r,t.value),s=fme(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function fme(e,t){if(e===\"percent\")return function(r){return Math.abs(r*t/100)};if(e===\"constant\")return function(){return Math.abs(t)};if(e===\"sqrt\")return function(r){return Math.sqrt(Math.abs(r))}}});var pme=ye((Csr,vme)=>{\"use strict\";var hV=Eo(),jmt=qa(),dV=ho(),Wmt=Dr(),Xmt=fV();vme.exports=function(t){for(var r=t.calcdata,n=0;n<r.length;n++){var i=r[n],a=i[0].trace;if(a.visible===!0&&jmt.traceIs(a,\"errorBarsOK\")){var o=dV.getFromId(t,a.xaxis),s=dV.getFromId(t,a.yaxis);dme(i,a,o,\"x\"),dme(i,a,s,\"y\")}}};function dme(e,t,r,n){var i=t[\"error_\"+n]||{},a=i.visible&&[\"linear\",\"log\"].indexOf(r.type)!==-1,o=[];if(a){for(var s=Xmt(i),l=0;l<e.length;l++){var u=e[l],c=u.i;if(c===void 0)c=l;else if(c===null)continue;var f=u[n];if(hV(r.c2l(f))){var h=s(f,c);if(hV(h[0])&&hV(h[1])){var d=u[n+\"s\"]=f-h[0],v=u[n+\"h\"]=f+h[1];o.push(d,v)}}}var x=r._id,b=t._extremes[x],p=dV.findExtremes(r,o,Wmt.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(p.min),b.max=b.max.concat(p.max)}}});var yme=ye((ksr,mme)=>{\"use strict\";var gme=Oa(),b_=Eo(),Zmt=So(),Ymt=Ru();mme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(C){return C.id});var x=Ymt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=gme.select(this).selectAll(\"g.errorbar\").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll(\"path.xerror\").remove(),d.visible||b.selectAll(\"path.yerror\").remove(),b.style(\"opacity\",1);var p=b.enter().append(\"g\").classed(\"errorbar\",!0);l&&p.style(\"opacity\",0).transition().duration(i.duration).style(\"opacity\",1),Zmt.setClipUrl(b,n.layerClipId,t),b.each(function(C){var E=gme.select(this),A=Kmt(C,o,s);if(!(x&&!C.vis)){var L,_=E.select(\"path.yerror\");if(d.visible&&b_(A.x)&&b_(A.yh)&&b_(A.ys)){var k=d.width;L=\"M\"+(A.x-k)+\",\"+A.yh+\"h\"+2*k+\"m-\"+k+\",0V\"+A.ys,A.noYS||(L+=\"m-\"+k+\",0h\"+2*k),a=!_.size(),a?_=E.append(\"path\").style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").classed(\"yerror\",!0):l&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr(\"d\",L)}else _.remove();var M=E.select(\"path.xerror\");if(h.visible&&b_(A.y)&&b_(A.xh)&&b_(A.xs)){var g=(h.copy_ystyle?d:h).width;L=\"M\"+A.xh+\",\"+(A.y-g)+\"v\"+2*g+\"m0,-\"+g+\"H\"+A.xs,A.noXS||(L+=\"m0,-\"+g+\"v\"+2*g),a=!M.size(),a?M=E.append(\"path\").style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").classed(\"xerror\",!0):l&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr(\"d\",L)}else M.remove()}})}})};function Kmt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),b_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),b_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var bme=ye((Lsr,xme)=>{\"use strict\";var Jmt=Oa(),_me=Ca();xme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Jmt.select(this);o.selectAll(\"path.yerror\").style(\"stroke-width\",i.thickness+\"px\").call(_me.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll(\"path.xerror\").style(\"stroke-width\",a.thickness+\"px\").call(_me.stroke,a.color)})}});var Ame=ye((Psr,Tme)=>{\"use strict\";var c4=Dr(),wme=mc().overrideAll,f4=cV(),$b={error_x:c4.extendFlat({},f4),error_y:c4.extendFlat({},f4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var h4={error_x:c4.extendFlat({},f4),error_y:c4.extendFlat({},f4),error_z:c4.extendFlat({},f4)};delete h4.error_x.copy_ystyle;delete h4.error_y.copy_ystyle;delete h4.error_z.copy_ystyle;delete h4.error_z.copy_zstyle;Tme.exports={moduleType:\"component\",name:\"errorbars\",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:wme(h4,\"calc\",\"nested\"),scattergl:wme($b,\"calc\",\"nested\")}},supplyDefaults:cme(),calc:pme(),makeComputeError:fV(),plot:yme(),style:bme(),hoverInfo:$mt};function $mt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Mme=ye((Isr,Sme)=>{\"use strict\";Sme.exports={cn:{colorbar:\"colorbar\",cbbg:\"cbbg\",cbfill:\"cbfill\",cbfills:\"cbfills\",cbline:\"cbline\",cblines:\"cblines\",cbaxis:\"cbaxis\",cbtitleunshift:\"cbtitleunshift\",cbtitle:\"cbtitle\",cboutline:\"cboutline\",crisp:\"crisp\",jsPlaceholder:\"js-placeholder\"}}});var Rme=ye((Rsr,Ime)=>{\"use strict\";var w_=Oa(),vV=cd(),FI=Mc(),Eme=qa(),Ry=ho(),DI=yv(),B0=Dr(),Ug=B0.strTranslate,Pme=Ao().extendFlat,pV=Tg(),Ng=So(),gV=Ca(),Qmt=Mb(),eyt=ru(),tyt=pv().flipScale,ryt=t4(),iyt=oI(),nyt=Rd(),mV=Kh(),Cme=mV.LINE_SPACING,kme=mV.FROM_TL,Lme=mV.FROM_BR,gf=Mme().cn;function ayt(e){var t=e._fullLayout,r=t._infolayer.selectAll(\"g.\"+gf.colorbar).data(oyt(e),function(n){return n._id});r.enter().append(\"g\").attr(\"class\",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=w_.select(this);B0.ensureSingle(i,\"rect\",gf.cbbg),B0.ensureSingle(i,\"g\",gf.cbfills),B0.ensureSingle(i,\"g\",gf.cblines),B0.ensureSingle(i,\"g\",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),B0.ensureSingle(i,\"g\",gf.cbtitleunshift,function(o){o.append(\"g\").classed(gf.cbtitle,!0)}),B0.ensureSingle(i,\"rect\",gf.cboutline);var a=syt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&lyt(i,n,e)}),r.exit().each(function(n){FI.autoMargin(e,n._id)}).remove(),r.order()}function oyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(E){return Pme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc==\"function\"?s.calc(e,o,i):(i._fillgradient=a.reversescale?tyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c<r.length;c++){var f=r[c];if(o=f[0].trace,!!o._module){var h=o._module.colorbar;if(o.visible===!0&&h)for(var d=Array.isArray(h),v=d?h:[h],x=0;x<v.length;x++){s=v[x];var b=s.container;a=b?o[b]:o,a&&a.showscale&&(i=l(a.colorbar),i._id=\"cb\"+o.uid+(d&&b?\"-\"+b:\"\"),i._traceIndex=o.index,i._propPrefix=(b?b+\".\":\"\")+\"colorbar.\",i._meta=o._meta,u(),n.push(i))}}}for(var p in t._colorAxes)if(a=t[p],a.showscale){var C=t._colorAxes[p];i=l(a.colorbar),i._id=\"cb\"+p,i._propPrefix=p+\".colorbar.\",i._meta=t._meta,s={min:\"cmin\",max:\"cmax\"},C[0]!==\"heatmap\"&&(o=C[1],s.calc=o._module.colorbar.calc),u(),n.push(i)}return n}function syt(e,t,r){var n=t.orientation===\"v\",i=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,d=t.xpad,v=t.ypad,x=t.x,b=n?t.y:1-t.y,p=t.yref===\"paper\",C=t.xref===\"paper\",E=r._fullLayout,A=E._size,L=t._fillcolor,_=t._line,k=t.title,M=k.side,g=t._zrange||w_.extent((typeof L==\"function\"?L:_.color).domain()),P=typeof _.color==\"function\"?_.color:function(){return _.color},T=typeof L==\"function\"?L:function(){return L},z=t._levels,O=uyt(r,t,g),V=O.fill,G=O.line,Z=Math.round(o*(s===\"fraction\"?n?A.w:A.h:1)),H=Z/(n?A.w:A.h),N=Math.round(i*(a===\"fraction\"?n?A.h:A.w:1)),j=N/(n?A.h:A.w),re=C?A.w:r._fullLayout.width,oe=p?A.h:r._fullLayout.height,_e=Math.round(n?x*re+d:b*oe+v),Me={center:.5,right:1}[f]||0,ke={top:1,middle:.5}[h]||0,me=n?x-Me*H:b-ke*H,ie=n?b-ke*j:x-Me*j,Se=Math.round(n?oe*(1-ie):re*ie);t._lenFrac=j,t._thickFrac=H,t._uFrac=me,t._vFrac=ie;var Le=t._axis=cyt(r,t,g);Le.position=H+(n?x+d/A.w:b+v/A.h);var Ae=[\"top\",\"bottom\"].indexOf(M)!==-1;if(n&&Ae&&(Le.title.side=M,Le.titlex=x+d/A.w,Le.titley=ie+(k.side===\"top\"?j-v/A.h:v/A.h)),!n&&!Ae&&(Le.title.side=M,Le.titley=b+v/A.h,Le.titlex=ie+d/A.w),_.color&&t.tickmode===\"auto\"){Le.tickmode=\"linear\",Le.tick0=z.start;var De=z.size,Pe=B0.constrain(N/50,4,15)+1,ge=(g[1]-g[0])/((t.nticks||Pe)*De);if(ge>1){var Fe=Math.pow(10,Math.floor(Math.log(ge)/Math.LN10));De*=Fe*B0.roundUp(ge/Fe,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Le.tick0=0)}Le.dtick=De}Le.domain=n?[ie+v/A.h,ie+j-v/A.h]:[ie+d/A.w,ie+j-d/A.w],Le.setScale(),e.attr(\"transform\",Ug(Math.round(A.l),Math.round(A.t)));var ce=e.select(\".\"+gf.cbtitleunshift).attr(\"transform\",Ug(-Math.round(A.l),-Math.round(A.t))),Ze=Le.ticklabelposition,ct=Le.title.font.size,pt=e.select(\".\"+gf.cbaxis),Wt,st=0,lt=0;function Gt(ur,Qe){var Et={propContainer:Le,propName:t._propPrefix+\"title\",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select(\".\"+gf.cbtitle)},er=ur.charAt(0)===\"h\"?ur.substr(1):\"h\"+ur;e.selectAll(\".\"+er+\",.\"+er+\"-math-group\").remove(),Qmt.draw(r,ur,Pme(Et,Qe||{}))}function Nt(){if(n&&Ae||!n&&!Ae){var ur,Qe;M===\"top\"&&(ur=d+A.l+re*x,Qe=v+A.t+oe*(1-ie-j)+3+ct*.75),M===\"bottom\"&&(ur=d+A.l+re*x,Qe=v+A.t+oe*(1-ie)-3-ct*.25),M===\"right\"&&(Qe=v+A.t+oe*b+3+ct*.75,ur=d+A.l+re*ie),Gt(Le._id+\"title\",{attributes:{x:ur,y:Qe,\"text-anchor\":n?\"start\":\"middle\"}})}}function $t(){if(n&&!Ae||!n&&Ae){var ur=Le.position||0,Qe=Le._offset+Le._length/2,Et,er;if(M===\"right\")er=Qe,Et=A.l+re*ur+10+ct*(Le.showticklabels?1:.5);else if(Et=Qe,M===\"bottom\"&&(er=A.t+oe*ur+10+(Ze.indexOf(\"inside\")===-1?Le.tickfont.size:0)+(Le.ticks!==\"inside\"&&t.ticklen||0)),M===\"top\"){var Ut=k.text.split(\"<br>\").length;er=A.t+oe*ur+10-Z-Cme*ct*Ut}Gt((n?\"h\":\"v\")+Le._id+\"title\",{avoid:{selection:w_.select(r).selectAll(\"g.\"+Le._id+\"tick\"),side:M,offsetTop:n?0:A.t,offsetLeft:n?A.l:0,maxShift:n?E.width:E.height},attributes:{x:Et,y:er,\"text-anchor\":\"middle\"},transform:{rotate:n?-90:0,offset:0}})}}function sr(){if(!n&&!Ae||n&&Ae){var ur=e.select(\".\"+gf.cbtitle),Qe=ur.select(\"text\"),Et=[-l/2,l/2],er=ur.select(\".h\"+Le._id+\"title-math-group\").node(),Ut=15.6;Qe.node()&&(Ut=parseInt(Qe.node().style.fontSize,10)*Cme);var Ft;if(er?(Ft=Ng.bBox(er),lt=Ft.width,st=Ft.height,st>Ut&&(Et[1]-=(st-Ut)/2)):Qe.node()&&!Qe.classed(gf.jsPlaceholder)&&(Ft=Ng.bBox(Qe.node()),lt=Ft.width,st=Ft.height),n){if(st){if(st+=5,M===\"top\")Le.domain[1]-=st/A.h,Et[1]*=-1;else{Le.domain[0]+=st/A.h;var bt=eyt.lineCount(Qe);Et[1]+=(1-bt)*Ut}ur.attr(\"transform\",Ug(Et[0],Et[1])),Le.setScale()}}else lt&&(M===\"right\"&&(Le.domain[0]+=(lt+ct/2)/A.w),ur.attr(\"transform\",Ug(Et[0],Et[1])),Le.setScale())}e.selectAll(\".\"+gf.cbfills+\",.\"+gf.cblines).attr(\"transform\",n?Ug(0,Math.round(A.h*(1-Le.domain[1]))):Ug(Math.round(A.w*Le.domain[0]),0)),pt.attr(\"transform\",n?Ug(0,Math.round(-A.t)):Ug(Math.round(-A.l),0));var yt=e.select(\".\"+gf.cbfills).selectAll(\"rect.\"+gf.cbfill).attr(\"style\",\"\").data(V);yt.enter().append(\"rect\").classed(gf.cbfill,!0).attr(\"style\",\"\"),yt.exit().remove();var Yt=g.map(Le.c2p).map(Math.round).sort(function(Wr,Ur){return Wr-Ur});yt.each(function(Wr,Ur){var dt=[Ur===0?g[0]:(V[Ur]+V[Ur-1])/2,Ur===V.length-1?g[1]:(V[Ur]+V[Ur+1])/2].map(Le.c2p).map(Math.round);n&&(dt[1]=B0.constrain(dt[1]+(dt[1]>dt[0])?1:-1,Yt[0],Yt[1]));var Ge=w_.select(this).attr(n?\"x\":\"y\",_e).attr(n?\"y\":\"x\",w_.min(dt)).attr(n?\"width\":\"height\",Math.max(Z,2)).attr(n?\"height\":\"width\",Math.max(w_.max(dt)-w_.min(dt),2));if(t._fillgradient)Ng.gradient(Ge,r,t._id,n?\"vertical\":\"horizontalreversed\",t._fillgradient,\"fill\");else{var Je=T(Wr).replace(\"e-\",\"\");Ge.attr(\"fill\",vV(Je).toHexString())}});var lr=e.select(\".\"+gf.cblines).selectAll(\"path.\"+gf.cbline).data(_.color&&_.width?G:[]);lr.enter().append(\"path\").classed(gf.cbline,!0),lr.exit().remove(),lr.each(function(Wr){var Ur=_e,dt=Math.round(Le.c2p(Wr))+_.width/2%1;w_.select(this).attr(\"d\",\"M\"+(n?Ur+\",\"+dt:dt+\",\"+Ur)+(n?\"h\":\"v\")+Z).call(Ng.lineGroupStyle,_.width,P(Wr),_.dash)}),pt.selectAll(\"g.\"+Le._id+\"tick,path\").remove();var Tr=_e+Z+(l||0)/2-(t.ticks===\"outside\"?1:0),Rr=Ry.calcTicks(Le),ei=Ry.getTickSigns(Le)[2];return Ry.drawTicks(r,Le,{vals:Le.ticks===\"inside\"?Ry.clipEnds(Le,Rr):Rr,layer:pt,path:Ry.makeTickPath(Le,Tr,ei),transFn:Ry.makeTransTickFn(Le)}),Ry.drawLabels(r,Le,{vals:Rr,layer:pt,transFn:Ry.makeTransTickLabelFn(Le),labelFns:Ry.makeLabelFns(Le,Tr)})}function wr(){var ur,Qe=Z+l/2;Ze.indexOf(\"inside\")===-1&&(ur=Ng.bBox(pt.node()),Qe+=n?ur.width:ur.height),Wt=ce.select(\"text\");var Et=0,er=n&&M===\"top\",Ut=!n&&M===\"right\",Ft=0;if(Wt.node()&&!Wt.classed(gf.jsPlaceholder)){var bt,yt=ce.select(\".h\"+Le._id+\"title-math-group\").node();yt&&(n&&Ae||!n&&!Ae)?(ur=Ng.bBox(yt),Et=ur.width,bt=ur.height):(ur=Ng.bBox(ce.node()),Et=ur.right-A.l-(n?_e:Se),bt=ur.bottom-A.t-(n?Se:_e),!n&&M===\"top\"&&(Qe+=ur.height,Ft=ur.height)),Ut&&(Wt.attr(\"transform\",Ug(Et/2+ct/2,0)),Et*=2),Qe=Math.max(Qe,n?Et:bt)}var Yt=(n?d:v)*2+Qe+u+l/2,lr=0;!n&&k.text&&h===\"bottom\"&&b<=0&&(lr=Yt/2,Yt+=lr,Ft+=lr),E._hColorbarMoveTitle=lr,E._hColorbarMoveCBTitle=Ft;var Tr=u+l,Rr=(n?_e:Se)-Tr/2-(n?d:0),ei=(n?Se:_e)-(n?N:v+Ft-lr);e.select(\".\"+gf.cbbg).attr(\"x\",Rr).attr(\"y\",ei).attr(n?\"width\":\"height\",Math.max(Yt-lr,2)).attr(n?\"height\":\"width\",Math.max(N+Tr,2)).call(gV.fill,c).call(gV.stroke,t.bordercolor).style(\"stroke-width\",u);var Wr=Ut?Math.max(Et-10,0):0;e.selectAll(\".\"+gf.cboutline).attr(\"x\",(n?_e:Se+d)+Wr).attr(\"y\",(n?Se+v-N:_e)+(er?st:0)).attr(n?\"width\":\"height\",Math.max(Z,2)).attr(n?\"height\":\"width\",Math.max(N-(n?2*v+st:2*d+Wr),2)).call(gV.stroke,t.outlinecolor).style({fill:\"none\",\"stroke-width\":l});var Ur=n?Me*Yt:0,dt=n?0:(1-ke)*Yt-Ft;if(Ur=C?A.l-Ur:-Ur,dt=p?A.t-dt:-dt,e.attr(\"transform\",Ug(Ur,dt)),!n&&(u||vV(c).getAlpha()&&!vV.equals(E.paper_bgcolor,c))){var Ge=pt.selectAll(\"text\"),Je=Ge[0].length,je=e.select(\".\"+gf.cbbg).node(),$e=Ng.bBox(je),wt=Ng.getTranslate(e),Ie=2;Ge.each(function(fi,Hi){var Pn=0,wn=Je-1;if(Hi===Pn||Hi===wn){var pn=Ng.bBox(this),Vn=Ng.getTranslate(this),kn;if(Hi===wn){var ea=pn.right+Vn.x,ua=$e.right+wt.x+Se-u-Ie+x;kn=ua-ea,kn>0&&(kn=0)}else if(Hi===Pn){var Vt=pn.left+Vn.x,_t=$e.left+wt.x+Se+u+Ie;kn=_t-Vt,kn<0&&(kn=0)}kn&&(Je<3?this.setAttribute(\"transform\",\"translate(\"+kn+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}})}var xe={},Ce=kme[f],vt=Lme[f],nr=kme[h],ir=Lme[h],pr=Yt-Z;n?(a===\"pixels\"?(xe.y=b,xe.t=N*nr,xe.b=N*ir):(xe.t=xe.b=0,xe.yt=b+i*nr,xe.yb=b-i*ir),s===\"pixels\"?(xe.x=x,xe.l=Yt*Ce,xe.r=Yt*vt):(xe.l=pr*Ce,xe.r=pr*vt,xe.xl=x-o*Ce,xe.xr=x+o*vt)):(a===\"pixels\"?(xe.x=x,xe.l=N*Ce,xe.r=N*vt):(xe.l=xe.r=0,xe.xl=x+i*Ce,xe.xr=x-i*vt),s===\"pixels\"?(xe.y=1-b,xe.t=Yt*nr,xe.b=Yt*ir):(xe.t=pr*nr,xe.b=pr*ir,xe.yt=b-o*nr,xe.yb=b+o*ir));var oi=t.y<.5?\"b\":\"t\",di=t.x<.5?\"l\":\"r\";r._fullLayout._reservedMargin[t._id]={};var Jr={r:E.width-Rr-Ur,l:Rr+xe.r,b:E.height-ei-dt,t:ei+xe.b};C&&p?FI.autoMargin(r,t._id,xe):C?r._fullLayout._reservedMargin[t._id][oi]=Jr[oi]:p||n?r._fullLayout._reservedMargin[t._id][di]=Jr[di]:r._fullLayout._reservedMargin[t._id][oi]=Jr[oi]}return B0.syncOrAsync([FI.previousPromises,Nt,sr,$t,FI.previousPromises,wr],r)}function lyt(e,t,r){var n=t.orientation===\"v\",i=r._fullLayout,a=i._size,o,s,l;DI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr(\"transform\"),pV(e)},moveFn:function(u,c){e.attr(\"transform\",o+Ug(u,c)),s=DI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=DI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=DI.getCursor(s,l,t.xanchor,t.yanchor);pV(e,f)},doneFn:function(){if(pV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+\"x\"]=s,u[t._propPrefix+\"y\"]=l,t._traceIndex!==void 0?Eme.call(\"_guiRestyle\",r,u,t._traceIndex):Eme.call(\"_guiRelayout\",r,u)}}})}function uyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o<f&&i.push(o);if(t._fillgradient)a=[0];else if(typeof t._fillcolor==\"function\"){var h=t._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,s=0;s<1e5&&(o=h.start+s*u,!(u>0?o>=l:o<=l));s++)o>r[0]&&o<r[1]&&a.push(o);else a=i.map(function(d){return d-n.size/2}),a.push(a[a.length-1]+n.size)}else t._fillcolor&&typeof t._fillcolor==\"string\"&&(a=[0]);return n.size<0&&(i.reverse(),a.reverse()),{line:i,fill:a}}function cyt(e,t,r){var n=e._fullLayout,i=t.orientation===\"v\",a={type:\"linear\",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:\"free\",side:i?\"right\":\"bottom\",position:1},o=i?\"y\":\"x\",s={type:\"linear\",_id:o+t._id},l={letter:o,font:n.font,noAutotickangles:o===\"y\",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function u(c,f){return B0.coerce(a,s,nyt,c,f)}return ryt(a,s,u,l,n),iyt(a,s,u,l),s}Ime.exports={draw:ayt}});var Fme=ye((Dsr,Dme)=>{\"use strict\";Dme.exports={moduleType:\"component\",name:\"colorbar\",attributes:Q6(),supplyDefaults:kq(),draw:Rme().draw,hasColorbar:wq()}});var Ome=ye((Fsr,zme)=>{\"use strict\";zme.exports={moduleType:\"component\",name:\"legend\",layoutAttributes:wB(),supplyLayoutDefaults:SB(),draw:OB(),style:RB()}});var Bme=ye((zsr,qme)=>{\"use strict\";qme.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],year:\"%Y\",month:\"%b %Y\",dayMonth:\"%b %-d\",dayMonthYear:\"%b %-d, %Y\"}}});var Ume=ye((Osr,Nme)=>{\"use strict\";Nme.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}});var _V=ye((qsr,jme)=>{\"use strict\";var fyt=qa(),Hme=Dr(),yV=Hme.extendFlat,Vme=Hme.extendDeep;function Gme(e){var t;switch(e){case\"themes__thumb\":t={autosize:!0,width:150,height:150,title:{text:\"\"},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\"thumbnail\":t={title:{text:\"\"},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\"\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function hyt(e){var t=[\"xaxis\",\"yaxis\",\"zaxis\"];return t.indexOf(e.slice(0,5))>-1}jme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Vme([],i),s=Vme({},a,Gme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass===\"thumbnail\"||r.tileClass===\"themes__thumb\"){s.annotations=[];var u=Object.keys(s);for(n=0;n<u.length;n++)hyt(u[n])&&(s[u[n]].title={text:\"\"});for(n=0;n<o.length;n++){var c=o[n];c.showscale=!1,c.marker&&(c.marker.showscale=!1),fyt.traceIs(c,\"pie-like\")&&(c.textposition=\"none\")}}if(Array.isArray(r.annotations))for(n=0;n<r.annotations.length;n++)s.annotations.push(r.annotations[n]);var f=Object.keys(s).filter(function(b){return b.match(/^scene\\d*$/)});if(f.length){var h={};for(r.tileClass===\"thumbnail\"&&(h={title:{text:\"\"},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<f.length;n++){var d=s[f[n]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),yV(d.xaxis,h),yV(d.yaxis,h),yV(d.zaxis,h),d._scene=null}}var v=document.createElement(\"div\");r.tileClass&&(v.className=r.tileClass);var x={gd:v,td:v,layout:s,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:l.mapboxAccessToken}};return r.setBackground!==\"transparent\"&&(x.config.setBackground=r.setBackground||\"opaque\"),x.gd.defaultLayout=Gme(r.tileClass),x}});var Zme=ye((Bsr,Xme)=>{\"use strict\";var dyt=vb().EventEmitter,vyt=qa(),pyt=Dr(),Wme=Ly(),gyt=_V(),myt=VP(),yyt=GP();function _yt(e,t){var r=new dyt,n=gyt(e,{format:\"png\"}),i=n.gd;i.style.position=\"absolute\",i.style.left=\"-5000px\",document.body.appendChild(i);function a(){var s=Wme.getDelay(i._fullLayout);setTimeout(function(){var l=myt(i),u=document.createElement(\"canvas\");u.id=pyt.randstr(),r=yyt({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=Wme.getRedrawFunc(i);return vyt.call(\"_doPlot\",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit(\"error\",s)}),r}Xme.exports=_yt});var Jme=ye((Nsr,Kme)=>{\"use strict\";var Yme=Ly(),xyt={getDelay:Yme.getDelay,getRedrawFunc:Yme.getRedrawFunc,clone:_V(),toSVG:VP(),svgToImg:GP(),toImage:Zme(),downloadImage:eU()};Kme.exports=xyt});var Qme=ye(Dy=>{\"use strict\";Dy.version=o6().version;dee();tne();var byt=qa(),d4=Dy.register=byt.register,bV=bde(),$me=Object.keys(bV);for(zI=0;zI<$me.length;zI++)_T=$me[zI],_T.charAt(0)!==\"_\"&&(Dy[_T]=bV[_T]),d4({moduleType:\"apiMethod\",name:_T,fn:bV[_T]});var _T,zI;d4(ppe());d4([Npe(),Qpe(),zf(),m0e(),L0e(),$0e(),yge(),Oge(),tme(),uV(),Ame(),tc(),Fme(),Ome(),vf(),lN()]);d4([Bme(),Ume()]);window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(d4(window.PlotlyLocales),delete window.PlotlyLocales);Dy.Icons=HL();var OI=vf(),xV=Mc();Dy.Plots={resize:xV.resize,graphJson:xV.graphJson,sendDataToCloud:xV.sendDataToCloud};Dy.Fx={hover:OI.hover,unhover:OI.unhover,loneHover:OI.loneHover,loneUnhover:OI.loneUnhover};Dy.Snapshot=Jme();Dy.PlotSchema=_3()});var tye=ye((Vsr,eye)=>{\"use strict\";eye.exports=Qme()});var Qb=ye((Gsr,rye)=>{\"use strict\";rye.exports={TEXTPAD:3,eventDataKeys:[\"value\",\"label\"]}});var Lm=ye((Hsr,oye)=>{\"use strict\";var Of=pf(),iye=df().axisHoverFormat,wyt=Qo().hovertemplateAttrs,Tyt=Qo().texttemplateAttrs,aye=Tu(),Ayt=ec(),nye=Qb(),Syt=Pd().pattern,e2=Ao().extendFlat,wV=Ayt({editType:\"calc\",arrayOk:!0,colorEditType:\"style\"}),Myt=Of.marker,Eyt=Myt.line,Cyt=e2({},Eyt.width,{dflt:0}),kyt=e2({width:Cyt,editType:\"calc\"},aye(\"marker.line\")),Lyt=e2({line:kyt,editType:\"calc\"},aye(\"marker\"),{opacity:{valType:\"number\",arrayOk:!0,dflt:1,min:0,max:1,editType:\"style\"},pattern:Syt,cornerradius:{valType:\"any\",editType:\"calc\"}});oye.exports={x:Of.x,x0:Of.x0,dx:Of.dx,y:Of.y,y0:Of.y0,dy:Of.dy,xperiod:Of.xperiod,yperiod:Of.yperiod,xperiod0:Of.xperiod0,yperiod0:Of.yperiod0,xperiodalignment:Of.xperiodalignment,yperiodalignment:Of.yperiodalignment,xhoverformat:iye(\"x\"),yhoverformat:iye(\"y\"),text:Of.text,texttemplate:Tyt({editType:\"plot\"},{keys:nye.eventDataKeys}),hovertext:Of.hovertext,hovertemplate:wyt({},{keys:nye.eventDataKeys}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"calc\"},insidetextanchor:{valType:\"enumerated\",values:[\"end\",\"middle\",\"start\"],dflt:\"end\",editType:\"plot\"},textangle:{valType:\"angle\",dflt:\"auto\",editType:\"plot\"},textfont:e2({},wV,{}),insidetextfont:e2({},wV,{}),outsidetextfont:e2({},wV,{}),constraintext:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"both\",\"none\"],dflt:\"both\",editType:\"calc\"},cliponaxis:e2({},Of.cliponaxis,{}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},base:{valType:\"any\",dflt:null,arrayOk:!0,editType:\"calc\"},offset:{valType:\"number\",dflt:null,arrayOk:!0,editType:\"calc\"},width:{valType:\"number\",dflt:null,min:0,arrayOk:!0,editType:\"calc\"},marker:Lyt,offsetgroup:Of.offsetgroup,alignmentgroup:Of.alignmentgroup,selected:{marker:{opacity:Of.selected.marker.opacity,color:Of.selected.marker.color,editType:\"style\"},textfont:Of.selected.textfont,editType:\"style\"},unselected:{marker:{opacity:Of.unselected.marker.opacity,color:Of.unselected.marker.color,editType:\"style\"},textfont:Of.unselected.textfont,editType:\"style\"},zorder:Of.zorder}});var qI=ye((jsr,sye)=>{\"use strict\";sye.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},barcornerradius:{valType:\"any\",editType:\"calc\"}}});var BI=ye((Wsr,cye)=>{\"use strict\";var Pyt=Ca(),lye=pv().hasColorscale,uye=Jh(),Iyt=Dr().coercePattern;cye.exports=function(t,r,n,i,a){var o=n(\"marker.color\",i),s=lye(t,\"marker\");s&&uye(t,r,a,n,{prefix:\"marker.\",cLetter:\"c\"}),n(\"marker.line.color\",Pyt.defaultLine),lye(t,\"marker.line\")&&uye(t,r,a,n,{prefix:\"marker.line.\",cLetter:\"c\"}),n(\"marker.line.width\"),n(\"marker.opacity\"),Iyt(n,\"marker.pattern\",o,s),n(\"selected.marker.color\"),n(\"unselected.marker.color\")}});var r0=ye((Xsr,gye)=>{\"use strict\";var fye=Eo(),xT=Dr(),hye=Ca(),Ryt=qa(),Dyt=K3(),Fyt=Pg(),zyt=BI(),Oyt=Gb(),dye=Lm(),NI=xT.coerceFont;function qyt(e,t,r,n){function i(u,c){return xT.coerce(e,t,dye,u,c)}var a=Dyt(e,t,n,i);if(!a){t.visible=!1;return}Fyt(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"zorder\"),i(\"orientation\",t.x&&!t.y?\"h\":\"v\"),i(\"base\"),i(\"offset\"),i(\"width\"),i(\"text\"),i(\"hovertext\"),i(\"hovertemplate\");var o=i(\"textposition\");pye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),zyt(e,t,i,r,n);var s=(t.marker.line||{}).color,l=Ryt.getComponentMethod(\"errorbars\",\"supplyDefaults\");l(e,t,s||hye.defaultLine,{axis:\"y\"}),l(e,t,s||hye.defaultLine,{axis:\"x\",inherit:\"y\"}),xT.coerceSelectionMarkerOpacity(t,i)}function Byt(e,t){var r,n;function i(s,l){return xT.coerce(n._input,n,dye,s,l)}for(var a=0;a<e.length;a++)if(n=e[a],n.type===\"bar\"){r=n._input;var o=i(\"marker.cornerradius\",t.barcornerradius);n.marker&&(n.marker.cornerradius=vye(o)),Oyt(r,n,t,i,t.barmode)}}function vye(e){if(fye(e)){if(e=+e,e>=0)return e}else if(typeof e==\"string\"&&(e=e.trim(),e.slice(-1)===\"%\"&&fye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+\"%\"}function pye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i===\"auto\",v=d||i===\"inside\",x=d||i===\"outside\";if(v||x){var b=NI(n,\"textfont\",r.font),p=xT.extendFlat({},b),C=e.textfont&&e.textfont.color,E=!C;if(E&&delete p.color,NI(n,\"insidetextfont\",p),h){var A=xT.extendFlat({},b);E&&delete A.color,NI(n,\"pathbar.textfont\",A)}x&&NI(n,\"outsidetextfont\",b),o&&n(\"selected.textfont.color\"),s&&n(\"unselected.textfont.color\"),l&&n(\"constraintext\"),u&&n(\"cliponaxis\"),c&&n(\"textangle\"),n(\"texttemplate\")}v&&f&&n(\"insidetextanchor\")}gye.exports={supplyDefaults:qyt,crossTraceDefaults:Byt,handleText:pye,validateCornerradius:vye}});var TV=ye((Zsr,mye)=>{\"use strict\";var Nyt=qa(),Uyt=ho(),Vyt=Dr(),Gyt=qI(),Hyt=r0().validateCornerradius;mye.exports=function(e,t,r){function n(x,b){return Vyt.coerce(e,t,Gyt,x,b)}for(var i=!1,a=!1,o=!1,s={},l=n(\"barmode\"),u=l===\"group\",c=0;c<r.length;c++){var f=r[c];if(Nyt.traceIs(f,\"bar\")&&f.visible)i=!0;else continue;var h=f.xaxis+f.yaxis;if(u?(s[h]&&(o=!0),s[h]=!0):(h+=f._input.offsetgroup,s.length>0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type===\"histogram\"){var d=Uyt.getFromId({_fullLayout:t},f[f.orientation===\"v\"?\"xaxis\":\"yaxis\"]);d.type!==\"category\"&&(a=!0)}}if(!i){delete t.barmode;return}l!==\"overlay\"&&n(\"barnorm\"),n(\"bargap\",a&&!o?0:.2),n(\"bargroupgap\");var v=n(\"barcornerradius\");t.barcornerradius=Hyt(v)}});var v4=ye((Ysr,yye)=>{\"use strict\";var bT=Dr();yye.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;bT.mergeArray(r.text,t,\"tx\"),bT.mergeArray(r.hovertext,t,\"htx\");var i=r.marker;if(i){bT.mergeArray(i.opacity,t,\"mo\",!0),bT.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(bT.mergeArray(a.color,t,\"mlc\"),bT.mergeArrayCastPositive(a.width,t,\"mlw\"))}}});var Aye=ye((Ksr,Tye)=>{\"use strict\";var _ye=ho(),xye=Rg(),bye=pv().hasColorscale,wye=gv(),jyt=v4(),Wyt=z0();Tye.exports=function(t,r){var n=_ye.getFromId(t,r.xaxis||\"x\"),i=_ye.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\",f),s=i.makeCalcdata(r,\"y\"),l=xye(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\",f),s=n.makeCalcdata(r,\"x\"),l=xye(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v<h;v++)d[v]={p:o[v],s:a[v]},u&&(d[v].orig_p=s[v],d[v][c+\"End\"]=l.ends[v],d[v][c+\"Start\"]=l.starts[v]),r.ids&&(d[v].id=String(r.ids[v]));return bye(r,\"marker\")&&wye(t,r,{vals:r.marker.color,containerStr:\"marker\",cLetter:\"c\"}),bye(r,\"marker.line\")&&wye(t,r,{vals:r.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),jyt(d,r),Wyt(d,r),d}});var bv=ye((Jsr,Mye)=>{\"use strict\";var Xyt=Oa(),Zyt=Dr();function Yyt(e,t,r){var n=e._fullLayout,i=n[\"_\"+r+\"Text_minsize\"];if(i){var a=n.uniformtext.mode===\"hide\",o;switch(r){case\"funnelarea\":case\"pie\":case\"sunburst\":o=\"g.slice\";break;case\"treemap\":case\"icicle\":o=\"g.slice, g.pathbar\";break;default:o=\"g.points > g.point\"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=Xyt.select(this).select(\"text\");Zyt.setTransormAndDisplay(u,l)}})}}function Kyt(e,t,r){if(r.uniformtext.mode){var n=Sye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a<i,r[n]=r[n]||1/0,t.hide||(r[n]=Math.min(r[n],Math.max(a,i)))}}function Jyt(e,t){var r=Sye(e);t[r]=void 0}function Sye(e){return\"_\"+e+\"Text_minsize\"}Mye.exports={recordMinTextSize:Kyt,clearMinTextSize:Jyt,resizeText:Yyt}});var UI=ye(t2=>{\"use strict\";var $yt=Eo(),Qyt=cd(),Eye=Dr().isArrayOrTypedArray;t2.coerceString=function(e,t,r){if(typeof t==\"string\"){if(t||!e.noBlank)return t}else if((typeof t==\"number\"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};t2.coerceNumber=function(e,t,r){if($yt(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&t<n||i!==void 0&&t>i;if(!a)return t}return r!==void 0?r:e.dflt};t2.coerceColor=function(e,t,r){return Qyt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return Eye(e)?t<e.length&&(r=e[t]):r=e,r};t2.getLineWidth=function(e,t){var r=0<t.mlw?t.mlw:Eye(e.marker.line.width)?0:e.marker.line.width;return r}});var N0=ye((Qsr,qye)=>{\"use strict\";var p4=Oa(),e1t=Ca(),g4=So(),Cye=Dr(),kye=qa(),Lye=bv().resizeText,AV=Lm(),t1t=AV.textfont,r1t=AV.insidetextfont,i1t=AV.outsidetextfont,Qd=UI();function n1t(e){var t=p4.select(e).selectAll('g[class^=\"barlayer\"]').selectAll(\"g.trace\");Lye(e,t,\"bar\");var r=t.size(),n=e._fullLayout;t.style(\"opacity\",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode===\"stack\"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&p4.select(this).attr(\"shape-rendering\",\"crispEdges\")}),t.selectAll(\"g.points\").each(function(i){var a=p4.select(this),o=i[0].trace;Pye(a,o,e)}),kye.getComponentMethod(\"errorbars\",\"style\")(t)}function Pye(e,t,r){g4.pointStyle(e.selectAll(\"path\"),t,r),Iye(e,t,r)}function Iye(e,t,r){e.selectAll(\"text\").each(function(n){var i=p4.select(this),a=Cye.ensureUniformFontSize(r,Rye(i,n,t,r));g4.font(i,a)})}function a1t(e,t,r){var n=t[0].trace;n.selectedpoints?o1t(r,n,e):(Pye(r,n,e),kye.getComponentMethod(\"errorbars\",\"style\")(r))}function o1t(e,t,r){g4.selectedPointStyle(e.selectAll(\"path\"),t),s1t(e.selectAll(\"text\"),t,r)}function s1t(e,t,r){e.each(function(n){var i=p4.select(this),a;if(n.selected){a=Cye.ensureUniformFontSize(r,Rye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),g4.font(i,a)}else g4.selectedTextStyle(i,t)})}function Rye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed(\"bartext-inside\")){var o=Oye(t,r);a=Fye(r,t.i,i,o)}else e.classed(\"bartext-outside\")&&(a=zye(r,t.i,i));return a}function Dye(e,t,r){return SV(t1t,e.textfont,t,r)}function Fye(e,t,r,n){var i=Dye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:e1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),SV(r1t,e.insidetextfont,t,i)}function zye(e,t,r){var n=Dye(e,t,r);return SV(i1t,e.outsidetextfont,t,n)}function SV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function Oye(e,t){return t.type===\"waterfall\"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}qye.exports={style:n1t,styleTextPoints:Iye,styleOnSelect:a1t,getInsideTextFont:Fye,getOutsideTextFont:zye,getBarColor:Oye,resizeText:Lye}});var i2=ye((elr,Wye)=>{\"use strict\";var VI=Oa(),GI=Eo(),Fd=Dr(),l1t=ru(),u1t=Ca(),T_=So(),c1t=qa(),HI=ho().tickText,Bye=bv(),f1t=Bye.recordMinTextSize,h1t=Bye.clearMinTextSize,MV=N0(),wT=UI(),d1t=Qb(),Nye=Lm(),v1t=Nye.text,p1t=Nye.textposition,g1t=rp().appendArrayPointValue,Uv=d1t.TEXTPAD;function m1t(e){return e.id}function y1t(e){if(e.ids)return m1t}function EV(e){return(e>0)-(e<0)}function Pm(e,t){return e<t?1:-1}function _1t(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}function Uye(e,t,r,n){if(!t.uniformtext.mode&&Vye(r)){var i;return n&&(i=n()),e.transition().duration(r.duration).ease(r.easing).each(\"end\",function(){i&&i()}).each(\"interrupt\",function(){i&&i()})}else return e}function Vye(e){return e&&e.duration>0}function x1t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},h1t(\"bar\",l));var c=Fd.makeTraceGroups(n,r,\"trace bars\").each(function(f){var h=VI.select(this),d=f[0].trace,v=f[0].t,x=d.type===\"waterfall\",b=d.type===\"funnel\",p=d.type===\"histogram\",C=d.type===\"bar\",E=C||b,A=0;x&&d.connector.visible&&d.connector.mode===\"between\"&&(A=d.connector.line.width/2);var L=d.orientation===\"h\",_=Vye(i),k=Fd.ensureSingle(h,\"g\",\"points\"),M=y1t(d),g=k.selectAll(\"g.point\").data(Fd.identity,M);g.enter().append(\"g\").classed(\"point\",!0),g.exit().remove(),g.each(function(T,z){var O=VI.select(this),V=_1t(T,o,s,L),G=V[0][0],Z=V[0][1],H=V[1][0],N=V[1][1],j=(L?Z-G:N-H)===0;j&&E&&wT.getLineWidth(d,T)&&(j=!1),j||(j=!GI(G)||!GI(Z)||!GI(H)||!GI(N)),T.isBlank=j,j&&(L?Z=G:N=H),A&&!j&&(L?(G-=Pm(G,Z)*A,Z+=Pm(G,Z)*A):(H-=Pm(H,N)*A,N+=Pm(H,N)*A));var re,oe;if(d.type===\"waterfall\"){if(!j){var _e=d[T.dir].marker;re=_e.line.width,oe=_e.color}}else re=wT.getLineWidth(d,T),oe=T.mc||d.marker.color;function Me(Qe){var Et=VI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?VI.round(Math.round(Qe)-Et,2):Qe}function ke(Qe,Et,er){return er&&Qe===Et?Qe:Math.abs(Qe-Et)>=2?Me(Qe):Qe>Et?Math.ceil(Qe):Math.floor(Qe)}var me=u1t.opacity(oe),ie=me<1||re>.01?Me:ke;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),H=ie(H,N,!L),N=ie(N,H,!L));var Se=L?o.c2p:s.c2p,Le;T.s0>0?Le=T._sMax:T.s0<0?Le=T._sMin:Le=T.s1>0?T._sMax:T._sMin;function Ae(Qe,Et){if(!Qe)return 0;var er=Math.abs(L?N-H:Z-G),Ut=Math.abs(L?Z-G:N-H),Ft=ie(Math.abs(Se(Le,!0)-Se(0,!0))),bt=T.hasB?Math.min(er/2,Ut/2):Math.min(er/2,Ft),yt;if(Et===\"%\"){var Yt=Math.min(50,Qe);yt=er*(Yt/100)}else yt=Qe;return ie(Math.max(Math.min(yt,bt),0))}var De=C||p?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Pe,ge,Fe=\"M\"+G+\",\"+H+\"V\"+N+\"H\"+Z+\"V\"+H+\"Z\",ce=0;if(De&&T.s){var Ze=EV(T.s0)===0||EV(T.s)===EV(T.s0)?T.s1:T.s0;if(ce=ie(T.hasB?0:Math.abs(Se(Le,!0)-Se(Ze,!0))),ce<De){var ct=Pm(G,Z),pt=Pm(H,N),Wt=ct===-pt?1:0;if(L)if(T.hasB)Pe=\"M\"+(G+De*ct)+\",\"+H+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+G+\",\"+(H+De*pt)+\"V\"+(N-De*pt)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(G+De*ct)+\",\"+N+\"H\"+(Z-De*ct)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+Z+\",\"+(N-De*pt)+\"V\"+(H+De*pt)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(Z-De*ct)+\",\"+H+\"Z\";else{ge=Math.abs(Z-G)+ce;var st=ge<De?De-Math.sqrt(ge*(2*De-ge)):0,lt=ce>0?Math.sqrt(ce*(2*De-ce)):0,Gt=ct>0?Math.max:Math.min;Pe=\"M\"+G+\",\"+H+\"V\"+(N-st*pt)+\"H\"+Gt(Z-(De-ce)*ct,G)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+Z+\",\"+(N-De*pt-lt)+\"V\"+(H+De*pt+lt)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+Gt(Z-(De-ce)*ct,G)+\",\"+(H+st*pt)+\"Z\"}else if(T.hasB)Pe=\"M\"+(G+De*ct)+\",\"+H+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+G+\",\"+(H+De*pt)+\"V\"+(N-De*pt)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(G+De*ct)+\",\"+N+\"H\"+(Z-De*ct)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+Z+\",\"+(N-De*pt)+\"V\"+(H+De*pt)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(Z-De*ct)+\",\"+H+\"Z\";else{ge=Math.abs(N-H)+ce;var Nt=ge<De?De-Math.sqrt(ge*(2*De-ge)):0,$t=ce>0?Math.sqrt(ce*(2*De-ce)):0,sr=pt>0?Math.max:Math.min;Pe=\"M\"+(G+Nt*ct)+\",\"+H+\"V\"+sr(N-(De-ce)*pt,H)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(G+De*ct-$t)+\",\"+N+\"H\"+(Z-De*ct+$t)+\"A \"+De+\",\"+De+\" 0 0 \"+Wt+\" \"+(Z-Nt*ct)+\",\"+sr(N-(De-ce)*pt,H)+\"V\"+H+\"Z\"}}else Pe=Fe}else Pe=Fe;var wr=Uye(Fd.ensureSingle(O,\"path\"),l,i,a);if(wr.style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").attr(\"d\",isNaN((Z-G)*(N-H))||j&&e._context.staticPlot?\"M0,0Z\":Pe).call(T_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&_){var ur=T_.makePointStyleFns(d);T_.singlePointStyle(T,wr,d,ur,e)}b1t(e,t,O,f,z,G,Z,H,N,De,ce,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,O.select(\"text\"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;T_.setClipUrl(h,P?null:t.layerClipId,e)});c1t.getComponentMethod(\"errorbars\",\"plot\")(e,c,t,i)}function b1t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,x=e._fullLayout,b;function p(ge,Fe,ce){var Ze=Fd.ensureSingle(ge,\"text\").text(Fe).attr({class:\"bartext bartext-\"+b,\"text-anchor\":\"middle\",\"data-notex\":1}).call(T_.font,ce).call(l1t.convertToTspans,e);return Ze}var C=n[0].trace,E=C.orientation===\"h\",A=A1t(x,n,i,d,v);b=S1t(C,i);var L=f.mode===\"stack\"||f.mode===\"relative\",_=n[i],k=!L||_._outmost,M=_.hasB,g=u&&u-c>Uv;if(!A||b===\"none\"||(_.isBlank||a===o||s===l)&&(b===\"auto\"||b===\"inside\")){r.select(\"text\").remove();return}var P=x.font,T=MV.getBarColor(n[i],C),z=MV.getInsideTextFont(C,i,P,T),O=MV.getOutsideTextFont(C,i,P),V=C.insidetextanchor||\"end\",G=r.datum();E?d.type===\"log\"&&G.s0<=0&&(d.range[0]<d.range[1]?a=0:a=d._length):v.type===\"log\"&&G.s0<=0&&(v.range[0]<v.range[1]?s=v._length:s=0);var Z=Math.abs(o-a),H=Math.abs(l-s),N=Z-2*Uv,j=H-2*Uv,re,oe,_e,Me,ke;if(b===\"outside\"&&!k&&!_.hasB&&(b=\"inside\"),b===\"auto\")if(k){b=\"inside\",ke=Fd.ensureUniformFontSize(e,z),re=p(r,A,ke),oe=T_.bBox(re.node()),_e=oe.width,Me=oe.height;var me=_e>0&&Me>0,ie;g?M?ie=r2(N-2*u,j,_e,Me,E)||r2(N,j-2*u,_e,Me,E):E?ie=r2(N-(u-c),j,_e,Me,E)||r2(N,j-2*(u-c),_e,Me,E):ie=r2(N,j-(u-c),_e,Me,E)||r2(N-2*(u-c),j,_e,Me,E):ie=r2(N,j,_e,Me,E),me&&ie?b=\"inside\":(b=\"outside\",re.remove(),re=null)}else b=\"inside\";if(!re){ke=Fd.ensureUniformFontSize(e,b===\"outside\"?O:z),re=p(r,A,ke);var Se=re.attr(\"transform\");if(re.attr(\"transform\",\"\"),oe=T_.bBox(re.node()),_e=oe.width,Me=oe.height,re.attr(\"transform\",Se),_e<=0||Me<=0){re.remove();return}}var Le=C.textangle,Ae,De;b===\"outside\"?(De=C.constraintext===\"both\"||C.constraintext===\"outside\",Ae=T1t(a,o,s,l,oe,{isHorizontal:E,constrained:De,angle:Le})):(De=C.constraintext===\"both\"||C.constraintext===\"inside\",Ae=jye(a,o,s,l,oe,{isHorizontal:E,constrained:De,angle:Le,anchor:V,hasB:M,r:u,overhead:c})),Ae.fontSize=ke.size,f1t(C.type===\"histogram\"?\"bar\":C.type,Ae,x),_.transform=Ae;var Pe=Uye(re,x,f,h);Fd.setTransormAndDisplay(Pe,Ae)}function r2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Gye(e){return e===\"auto\"?0:e}function Hye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function jye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u===\"end\",f=u===\"start\",h=a.leftToRight||0,d=(h+1)/2,v=1-d,x=a.hasB,b=a.r,p=a.overhead,C=i.width,E=i.height,A=Math.abs(t-e),L=Math.abs(n-r),_=A>2*Uv&&L>2*Uv?Uv:0;A-=2*_,L-=2*_;var k=Gye(l);l===\"auto\"&&!(C<=A&&E<=L)&&(C>A||E>L)&&(!(C>L||E>A)||C<E!=A<L)&&(k+=90);var M=Hye(i,k),g,P;if(b&&b-p>Uv){var T=w1t(e,t,r,n,M,b,p,o,x);g=T.scale,P=T.pad}else g=1,s&&(g=Math.min(1,A/M.x,L/M.y)),P=0;var z=i.left*v+i.right*d,O=(i.top+i.bottom)/2,V=(e+Uv)*v+(t-Uv)*d,G=(r+n)/2,Z=0,H=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||x)&&(_+=P);var j=o?Pm(e,t):Pm(r,n);o?f?(V=e+j*_,Z=-j*N):(V=t-j*_,Z=j*N):f?(G=r+j*_,H=-j*N):(G=n-j*_,H=j*N)}return{textX:z,textY:O,targetX:V,targetY:G,anchorX:Z,anchorY:H,scale:g,rotate:k}}function w1t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Uv),c=Math.max(0,Math.abs(n-r)-2*Uv),f=a-Uv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,x,b,p,C,E;return i.y/i.x>=c/(u-d)?C=c/i.y:i.y/i.x<=(c-v)/u?C=u/i.x:!l&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,C=(-b+Math.sqrt(b*b-4*x*p))/(2*x)):l?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,C=(-b+Math.sqrt(b*b-4*x*p))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,C=(-b+Math.sqrt(b*b-4*x*p))/(2*x)),C=Math.min(1,C),s?E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*C)/2)*(f-(c-i.y*C)/2)))-o):E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*C)/2)*(f-(u-i.x*C)/2)))-o),{scale:C,pad:E}}function T1t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Uv?Uv:0:d=f>2*Uv?Uv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var x=Gye(l),b=Hye(i,x),p=(o?b.x:b.y)/2,C=(i.left+i.right)/2,E=(i.top+i.bottom)/2,A=(e+t)/2,L=(r+n)/2,_=0,k=0,M=o?Pm(t,e):Pm(r,n);return o?(A=t-M*d,_=M*p):(L=n+M*d,k=-M*p),{textX:C,textY:E,targetX:A,targetY:L,anchorX:_,anchorY:k,scale:v,rotate:x}}function A1t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=M1t(e,t,r,n,i):a.textinfo?s=E1t(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(v1t,s)}function S1t(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(p1t,r)}function M1t(e,t,r,n,i){var a=t[0].trace,o=Fd.castOption(a,r,\"texttemplate\");if(!o)return\"\";var s=a.type===\"histogram\",l=a.type===\"waterfall\",u=a.type===\"funnel\",c=a.orientation===\"h\",f,h,d,v;c?(f=\"y\",h=i,d=\"x\",v=n):(f=\"x\",h=n,d=\"y\",v=i);function x(_){return HI(h,h.c2l(_),!0).text}function b(_){return HI(v,v.c2l(_),!0).text}var p=t[r],C={};C.label=p.p,C.labelLabel=C[f+\"Label\"]=x(p.p);var E=Fd.castOption(a,p.i,\"text\");(E===0||E)&&(C.text=E),C.value=p.s,C.valueLabel=C[d+\"Label\"]=b(p.s);var A={};g1t(A,a,p.i),(s||A.x===void 0)&&(A.x=c?C.value:C.label),(s||A.y===void 0)&&(A.y=c?C.label:C.value),(s||A.xLabel===void 0)&&(A.xLabel=c?C.valueLabel:C.labelLabel),(s||A.yLabel===void 0)&&(A.yLabel=c?C.labelLabel:C.valueLabel),l&&(C.delta=+p.rawS||p.s,C.deltaLabel=b(C.delta),C.final=p.v,C.finalLabel=b(C.final),C.initial=C.final-C.delta,C.initialLabel=b(C.initial)),u&&(C.value=p.s,C.valueLabel=b(C.value),C.percentInitial=p.begR,C.percentInitialLabel=Fd.formatPercent(p.begR),C.percentPrevious=p.difR,C.percentPreviousLabel=Fd.formatPercent(p.difR),C.percentTotal=p.sumR,C.percenTotalLabel=Fd.formatPercent(p.sumR));var L=Fd.castOption(a,p.i,\"customdata\");return L&&(C.customdata=L),Fd.texttemplateString(o,C,e._d3locale,A,C,a._meta||{})}function E1t(e,t,r,n){var i=e[0].trace,a=i.orientation===\"h\",o=i.type===\"waterfall\",s=i.type===\"funnel\";function l(L){var _=a?n:r;return HI(_,L,!0).text}function u(L){var _=a?r:n;return HI(_,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split(\"+\"),d=[],v,x=function(L){return h.indexOf(L)!==-1};if(x(\"label\")&&d.push(l(e[t].p)),x(\"text\")&&(v=Fd.castOption(i,f.i,\"text\"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,C=p-b;x(\"initial\")&&d.push(u(C)),x(\"delta\")&&d.push(u(b)),x(\"final\")&&d.push(u(p))}if(s){x(\"value\")&&d.push(u(f.s));var E=0;x(\"percent initial\")&&E++,x(\"percent previous\")&&E++,x(\"percent total\")&&E++;var A=E>1;x(\"percent initial\")&&(v=Fd.formatPercent(f.begR),A&&(v+=\" of initial\"),d.push(v)),x(\"percent previous\")&&(v=Fd.formatPercent(f.difR),A&&(v+=\" of previous\"),d.push(v)),x(\"percent total\")&&(v=Fd.formatPercent(f.sumR),A&&(v+=\" of total\"),d.push(v))}return d.join(\"<br>\")}Wye.exports={plot:x1t,toMoveInsideBar:jye}});var TT=ye((tlr,Kye)=>{\"use strict\";var m4=vf(),C1t=qa(),Xye=Ca(),k1t=Dr().fillText,L1t=UI().getLineWidth,CV=ho().hoverLabelText,P1t=hs().BADNUM;function I1t(e,t,r,n,i){var a=Zye(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=Yye(s,l),C1t.getComponentMethod(\"errorbars\",\"hoverInfo\")(l,s,a),[a]}}function Zye(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n===\"closest\",u=o.type===\"waterfall\",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,x,b,p,C;o.orientation===\"h\"?(h=r,d=t,v=\"y\",x=\"x\",b=G,p=z):(h=t,d=r,v=\"x\",x=\"y\",p=G,b=z);var E=o[v+\"period\"],A=l||E;function L(ie){return k(ie,-1)}function _(ie){return k(ie,1)}function k(ie,Se){var Le=ie.w;return ie[v]+Se*Le/2}function M(ie){return ie[v+\"End\"]-ie[v+\"Start\"]}var g=l?L:E?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?_:E?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(_(ie),ie.p+s.bardelta/2)};function T(ie,Se,Le){return i.finiteRange&&(Le=0),m4.inbox(ie-h,Se-h,Le+Math.min(1,Math.abs(Se-ie)/C)-1)}function z(ie){return T(g(ie),P(ie),c)}function O(ie){return T(L(ie),_(ie),f)}function V(ie){var Se=ie[x];if(u){var Le=Math.abs(ie.rawS)||0;d>0?Se+=Le:d<0&&(Se-=Le)}return Se}function G(ie){var Se=d,Le=ie.b,Ae=V(ie);return m4.inbox(Le-Se,Ae-Se,c+(Ae-Se)/(Ae-Le)-1)}function Z(ie){var Se=d,Le=ie.b,Ae=V(ie);return m4.inbox(Le-Se,Ae-Se,f+(Ae-Se)/(Ae-Le)-1)}var H=e[v+\"a\"],N=e[x+\"a\"];C=Math.abs(H.r2c(H.range[1])-H.r2c(H.range[0]));function j(ie){return(b(ie)+p(ie))/2}var re=m4.getDistanceFunction(n,b,p,j);if(m4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==P1t){A||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(_(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],Me=o.base?_e.b+_e.s:_e.s;e[x+\"0\"]=e[x+\"1\"]=N.c2p(_e[x],!0),e[x+\"LabelVal\"]=Me;var ke=s.extents[s.extents.round(_e.p)];e[v+\"0\"]=H.c2p(l?g(_e):ke[0],!0),e[v+\"1\"]=H.c2p(l?P(_e):ke[1],!0);var me=_e.orig_p!==void 0;return e[v+\"LabelVal\"]=me?_e.orig_p:_e.p,e.labelLabel=CV(H,e[v+\"LabelVal\"],o[v+\"hoverformat\"]),e.valueLabel=CV(N,e[x+\"LabelVal\"],o[x+\"hoverformat\"]),e.baseLabel=CV(N,_e.b,o[x+\"hoverformat\"]),e.spikeDistance=(Z(_e)+O(_e))/2,e[v+\"Spike\"]=H.c2p(_e.p,!0),k1t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function Yye(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=L1t(e,t);if(Xye.opacity(r))return r;if(Xye.opacity(n)&&i)return n}Kye.exports={hoverPoints:I1t,hoverOnBars:Zye,getTraceColor:Yye}});var $ye=ye((rlr,Jye)=>{\"use strict\";Jye.exports=function(t,r,n){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation===\"h\"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var AT=ye((ilr,Qye)=>{\"use strict\";Qye.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type===\"funnel\",l=o.orientation===\"h\",u=[],c;if(r===!1)for(c=0;c<n.length;c++)n[c].selected=0;else for(c=0;c<n.length;c++){var f=n[c],h=\"ct\"in f?f.ct:R1t(f,i,a,l,s);r.contains(h,!1,c,t)?(u.push({pointNumber:c,x:i.c2d(f.x),y:a.c2d(f.y)}),f.selected=1):f.selected=0}return u};function R1t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}});var t1e=ye((nlr,e1e)=>{\"use strict\";e1e.exports={attributes:Lm(),layoutAttributes:qI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:TV(),calc:Aye(),crossTraceCalc:Hb().crossTraceCalc,colorbar:$d(),arraysToCalcdata:v4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:$ye(),selectPoints:AT(),moduleType:\"trace\",name:\"bar\",basePlotModule:vh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}});var i1e=ye((alr,r1e)=>{\"use strict\";r1e.exports=t1e()});var y4=ye((olr,s1e)=>{\"use strict\";var D1t=Eg(),U0=pf(),n1e=Lm(),F1t=Eh(),a1e=df().axisHoverFormat,z1t=Qo().hovertemplateAttrs,Fy=Ao().extendFlat,ST=U0.marker,o1e=ST.line;s1e.exports={y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:U0.xperiod,yperiod:U0.yperiod,xperiod0:U0.xperiod0,yperiod0:U0.yperiod0,xperiodalignment:U0.xperiodalignment,yperiodalignment:U0.yperiodalignment,xhoverformat:a1e(\"x\"),yhoverformat:a1e(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},sdmultiple:{valType:\"number\",min:0,editType:\"calc\",dflt:1},sizemode:{valType:\"enumerated\",values:[\"quartiles\",\"sd\"],editType:\"calc\",dflt:\"quartiles\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:Fy({},ST.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:Fy({},ST.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),angle:Fy({},ST.angle,{arrayOk:!1,editType:\"calc\"}),size:Fy({},ST.size,{arrayOk:!1,editType:\"calc\"}),color:Fy({},ST.color,{arrayOk:!1,editType:\"style\"}),line:{color:Fy({},o1e.color,{arrayOk:!1,dflt:F1t.defaultLine,editType:\"style\"}),width:Fy({},o1e.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:D1t(),whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},showwhiskers:{valType:\"boolean\",editType:\"calc\"},offsetgroup:n1e.offsetgroup,alignmentgroup:n1e.alignmentgroup,selected:{marker:U0.selected.marker,editType:\"style\"},unselected:{marker:U0.unselected.marker,editType:\"style\"},text:Fy({},U0.text,{}),hovertext:Fy({},U0.hovertext,{}),hovertemplate:z1t({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"},zorder:U0.zorder}});var _4=ye((slr,l1e)=>{\"use strict\";l1e.exports={boxmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},boxgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"},boxgroupgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"}}});var b4=ye((llr,h1e)=>{\"use strict\";var V0=Dr(),O1t=qa(),q1t=Ca(),B1t=Pg(),N1t=Gb(),u1e=L3(),x4=y4();function U1t(e,t,r,n){function i(v,x){return V0.coerce(e,t,x4,v,x)}if(c1e(e,t,i,n),t.visible!==!1){B1t(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\");var a=t._hasPreCompStats;a&&(i(\"lowerfence\"),i(\"upperfence\")),i(\"line.color\",(e.marker||{}).color||r),i(\"line.width\"),i(\"fillcolor\",q1t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i(\"mean\"),l=i(\"sd\");s&&s.length&&(o=!0,l&&l.length&&(o=\"sd\"))}i(\"whiskerwidth\");var u=i(\"sizemode\"),c;u===\"quartiles\"&&(c=i(\"boxmean\",o)),i(\"showwhiskers\",u===\"quartiles\"),(u===\"sd\"||c===\"sd\")&&i(\"sdmultiple\"),i(\"width\"),i(\"quartilemethod\");var f=!1;if(a){var h=i(\"notchspan\");h&&h.length&&(f=!0)}else V0.validate(e.notchwidth,x4.notchwidth)&&(f=!0);var d=i(\"notched\",f);d&&i(\"notchwidth\"),f1e(e,t,i,{prefix:\"box\"}),i(\"zorder\")}}function c1e(e,t,r,n){function i(P){var T=0;return P&&P.length&&(T+=1,V0.isArrayOrTypedArray(P[0])&&P[0].length&&(T+=1)),T}function a(P){return V0.validate(e[P],x4[P])}var o=r(\"y\"),s=r(\"x\"),l;if(t.type===\"box\"){var u=r(\"q1\"),c=r(\"median\"),f=r(\"q3\");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(V0.minRowLength(u),V0.minRowLength(c),V0.minRowLength(f))}var h=i(o),d=i(s),v=h&&V0.minRowLength(o),x=d&&V0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},C,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case\"00\":var A=a(\"x0\")||a(\"dx\"),L=a(\"y0\")||a(\"dy\");L&&!A?C=\"h\":C=\"v\",E=l;break;case\"10\":C=\"v\",E=Math.min(l,x);break;case\"20\":C=\"h\",E=Math.min(l,s.length);break;case\"01\":C=\"h\",E=Math.min(l,v);break;case\"02\":C=\"v\",E=Math.min(l,o.length);break;case\"12\":C=\"v\",E=Math.min(l,x,o.length);break;case\"21\":C=\"h\",E=Math.min(l,s.length,v);break;case\"11\":E=0;break;case\"22\":var _=!1,k;for(k=0;k<s.length;k++)if(u1e(s[k],b,p)===\"category\"){_=!0;break}if(_)C=\"v\",E=Math.min(l,x,o.length);else{for(k=0;k<o.length;k++)if(u1e(o[k],b,p)===\"category\"){_=!0;break}_?(C=\"h\",E=Math.min(l,s.length,v)):(C=\"v\",E=Math.min(l,x,o.length))}break}else h>0?(C=\"v\",d>0?E=Math.min(x,v):E=Math.min(v)):d>0?(C=\"h\",E=Math.min(x)):E=0;if(!E){t.visible=!1;return}t._length=E;var M=r(\"orientation\",C);t._hasPreCompStats?M===\"v\"&&d===0?(r(\"x0\",0),r(\"dx\",1)):M===\"h\"&&h===0&&(r(\"y0\",0),r(\"dy\",1)):M===\"v\"&&d===0?r(\"x0\"):M===\"h\"&&h===0&&r(\"y0\");var g=O1t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");g(e,t,[\"x\",\"y\"],n)}function f1e(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,x4,\"marker.outliercolor\"),o=r(\"marker.line.outliercolor\"),s=\"outliers\";t._hasPreCompStats?s=\"all\":(a||o)&&(s=\"suspectedoutliers\");var l=r(i+\"points\",s);l?(r(\"jitter\",l===\"all\"?.3:0),r(\"pointpos\",l===\"all\"?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.angle\"),r(\"marker.color\",t.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),l===\"suspectedoutliers\"&&(r(\"marker.line.outliercolor\",t.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\"),r(\"hovertext\")):delete t.marker;var u=r(\"hoveron\");(u===\"all\"||u.indexOf(\"points\")!==-1)&&r(\"hovertemplate\"),V0.coerceSelectionMarkerOpacity(t,r)}function V1t(e,t){var r,n;function i(l){return V0.coerce(n._input,n,x4,l)}for(var a=0;a<e.length;a++){n=e[a];var o=n.type;if(o===\"box\"||o===\"violin\"){r=n._input;var s=t[o+\"mode\"];s===\"group\"&&N1t(r,n,t,i,s)}}}h1e.exports={supplyDefaults:U1t,crossTraceDefaults:V1t,handleSampleDefaults:c1e,handlePointsDefaults:f1e}});var jI=ye((ulr,v1e)=>{\"use strict\";var G1t=qa(),H1t=Dr(),j1t=_4();function d1e(e,t,r,n,i){for(var a=i+\"Layout\",o=!1,s=0;s<r.length;s++){var l=r[s];if(G1t.traceIs(l,a)){o=!0;break}}o&&(n(i+\"mode\"),n(i+\"gap\"),n(i+\"groupgap\"))}function W1t(e,t,r){function n(i,a){return H1t.coerce(e,t,j1t,i,a)}d1e(e,t,r,n,\"box\")}v1e.exports={supplyLayoutDefaults:W1t,_supply:d1e}});var PV=ye((clr,T1e)=>{\"use strict\";var LV=Eo(),WI=ho(),X1t=Rg(),ph=Dr(),i0=hs().BADNUM,zy=ph._;T1e.exports=function(t,r){var n=t._fullLayout,i=WI.getFromId(t,r.xaxis||\"x\"),a=WI.getFromId(t,r.yaxis||\"y\"),o=[],s=r.type===\"violin\"?\"_numViolins\":\"_numBoxes\",l,u,c,f,h,d,v;r.orientation===\"h\"?(c=i,f=\"x\",h=a,d=\"y\",v=!!r.yperiodalignment):(c=a,f=\"y\",h=i,d=\"x\",v=!!r.xperiodalignment);var x=Z1t(r,d,h,n[s]),b=x[0],p=x[1],C=ph.distinctVals(b,h),E=C.vals,A=C.minDiff/2,L,_,k,M,g,P,T=(r.boxpoints||r.points)===\"all\"?ph.identity:function(Wt){return Wt.v<L.lf||Wt.v>L.uf};if(r._hasPreCompStats){var z=r[f],O=function(Wt){return c.d2c((r[Wt]||[])[l])},V=1/0,G=-1/0;for(l=0;l<r._length;l++){var Z=b[l];if(LV(Z)){if(L={},L.pos=L[d]=Z,v&&p&&(L.orig_p=p[l]),L.q1=O(\"q1\"),L.med=O(\"median\"),L.q3=O(\"q3\"),_=[],z&&ph.isArrayOrTypedArray(z[l]))for(u=0;u<z[l].length;u++)P=c.d2c(z[l][u]),P!==i0&&(g={v:P,i:[l,u]},p1e(g,r,[l,u]),_.push(g));if(L.pts=_.sort(g1e),k=L[f]=_.map(m1e),M=k.length,L.med!==i0&&L.q1!==i0&&L.q3!==i0&&L.med>=L.q1&&L.q3>=L.med){var H=O(\"lowerfence\");L.lf=H!==i0&&H<=L.q1?H:y1e(L,k,M);var N=O(\"upperfence\");L.uf=N!==i0&&N>=L.q3?N:_1e(L,k,M);var j=O(\"mean\");L.mean=j!==i0?j:M?ph.mean(k,M):(L.q1+L.q3)/2;var re=O(\"sd\");L.sd=j!==i0&&re>=0?re:M?ph.stdev(k,M,L.mean):L.q3-L.q1,L.lo=x1e(L),L.uo=b1e(L);var oe=O(\"notchspan\");oe=oe!==i0&&oe>0?oe:w1e(L,M),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,Me=L.uf;r.boxpoints&&k.length&&(_e=Math.min(_e,k[0]),Me=Math.max(Me,k[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Me=Math.max(Me,L.un)),L.min=_e,L.max=Me}else{ph.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+L.q1,\"median = \"+L.med,\"q3 = \"+L.q3].join(`\n",
       "`));var ke;L.med!==i0?ke=L.med:L.q1!==i0?L.q3!==i0?ke=(L.q1+L.q3)/2:ke=L.q1:L.q3!==i0?ke=L.q3:ke=0,L.med=ke,L.q1=L.q3=ke,L.lf=L.uf=ke,L.mean=L.sd=ke,L.ln=L.un=ke,L.min=L.max=ke}V=Math.min(V,L.min),G=Math.max(G,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[c._id]=WI.findExtremes(c,[V,G],{padded:!0})}else{var me=c.makeCalcdata(r,f),ie=Y1t(E,A),Se=E.length,Le=K1t(Se);for(l=0;l<r._length;l++)if(P=me[l],!!LV(P)){var Ae=ph.findBin(b[l],ie);Ae>=0&&Ae<Se&&(g={v:P,i:l},p1e(g,r,l),Le[Ae].push(g))}var De=1/0,Pe=-1/0,ge=r.quartilemethod,Fe=ge===\"exclusive\",ce=ge===\"inclusive\";for(l=0;l<Se;l++)if(Le[l].length>0){if(L={},L.pos=L[d]=E[l],_=L.pts=Le[l].sort(g1e),k=L[f]=_.map(m1e),M=k.length,L.min=k[0],L.max=k[M-1],L.mean=ph.mean(k,M),L.sd=ph.stdev(k,M,L.mean)*r.sdmultiple,L.med=ph.interp(k,.5),M%2&&(Fe||ce)){var Ze,ct;Fe?(Ze=k.slice(0,M/2),ct=k.slice(M/2+1)):ce&&(Ze=k.slice(0,M/2+1),ct=k.slice(M/2)),L.q1=ph.interp(Ze,.5),L.q3=ph.interp(ct,.5)}else L.q1=ph.interp(k,.25),L.q3=ph.interp(k,.75);L.lf=y1e(L,k,M),L.uf=_1e(L,k,M),L.lo=x1e(L),L.uo=b1e(L);var pt=w1e(L,M);L.ln=L.med-pt,L.un=L.med+pt,De=Math.min(De,L.ln),Pe=Math.max(Pe,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&ph.isTypedArray(me)&&(me=Array.from(me)),r._extremes[c._id]=WI.findExtremes(c,r.notched?me.concat([De,Pe]):me,{padded:!0})}return J1t(o,r),o.length>0?(o[0].t={num:n[s],dPos:A,posLetter:d,valLetter:f,labels:{med:zy(t,\"median:\"),min:zy(t,\"min:\"),q1:zy(t,\"q1:\"),q3:zy(t,\"q3:\"),max:zy(t,\"max:\"),mean:r.boxmean===\"sd\"||r.sizemode===\"sd\"?zy(t,\"mean \\xB1 \\u03C3:\").replace(\"\\u03C3\",r.sdmultiple===1?\"\\u03C3\":r.sdmultiple+\"\\u03C3\"):zy(t,\"mean:\"),lf:zy(t,\"lower fence:\"),uf:zy(t,\"upper fence:\")}},n[s]++,o):[{t:{empty:!0}}]};function Z1t(e,t,r,n){var i=t in e,a=t+\"0\"in e,o=\"d\"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=X1t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+\"0\"]:\"name\"in e&&(r.type===\"category\"||LV(e.name)&&[\"linear\",\"log\"].indexOf(r.type)!==-1||ph.isDateTime(e.name)&&r.type===\"date\")?u=e.name:u=n;for(var c=r.type===\"multicategory\"?r.r2c_just_indices(u):r.d2c(u,0,e[t+\"calendar\"]),f=e._length,h=new Array(f),d=0;d<f;d++)h[d]=c;return[h]}function Y1t(e,t){for(var r=e.length,n=new Array(r+1),i=0;i<r;i++)n[i]=e[i]-t;return n[r]=e[r-1]+t,n}function K1t(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}var kV={text:\"tx\",hovertext:\"htx\"};function p1e(e,t,r){for(var n in kV)ph.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?ph.isArrayOrTypedArray(t[n][r[0]])&&(e[kV[n]]=t[n][r[0]][r[1]]):e[kV[n]]=t[n][r])}function J1t(e,t){if(ph.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var n=e[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;ph.tagSelected(n,t,i)}}function g1e(e,t){return e.v-t.v}function m1e(e){return e.v}function y1e(e,t,r){return r===0?e.q1:Math.min(e.q1,t[Math.min(ph.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function _1e(e,t,r){return r===0?e.q3:Math.max(e.q3,t[Math.max(ph.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function x1e(e){return 4*e.q1-3*e.q3}function b1e(e){return 4*e.q3-3*e.q1}function w1e(e,t){return t===0?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}});var XI=ye((flr,E1e)=>{\"use strict\";var A1e=ho(),$1t=Dr(),Q1t=Bb().getAxisGroup,S1e=[\"v\",\"h\"];function e_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a<S1e.length;a++){for(var o=S1e[a],s=o===\"h\"?i:n,l=[],u=0;u<r.length;u++){var c=r[u],f=c[0].t,h=c[0].trace;h.visible===!0&&(h.type===\"box\"||h.type===\"candlestick\")&&!f.empty&&(h.orientation||\"v\")===o&&h.xaxis===n._id&&h.yaxis===i._id&&l.push(u)}M1e(\"box\",e,l,s)}}function M1e(e,t,r,n){var i=t.calcdata,a=t._fullLayout,o=n._id,s=o.charAt(0),l,u,c,f=[],h=0;for(l=0;l<r.length;l++)for(c=i[r[l]],u=0;u<c.length;u++)f.push(n.c2l(c[u].pos,!0)),h+=(c[u].pts2||[]).length;if(f.length){var d=$1t.distinctVals(f);(n.type===\"category\"||n.type===\"multicategory\")&&(d.minDiff=1);var v=d.minDiff/2;A1e.minDtick(n,d.minDiff,d.vals[0],!0);var x=e===\"violin\"?\"_numViolins\":\"_numBoxes\",b=a[x],p=a[e+\"mode\"]===\"group\"&&b>1,C=1-a[e+\"gap\"],E=1-a[e+\"groupgap\"];for(l=0;l<r.length;l++){c=i[r[l]];var A=c[0].trace,L=c[0].t,_=A.width,k=A.side,M,g,P,T;if(_)M=g=T=_/2,P=0;else if(M=v,p){var z=Q1t(a,n._id)+A.orientation,O=a._alignmentOpts[z]||{},V=O[A.alignmentgroup]||{},G=Object.keys(V.offsetGroups||{}).length,Z=G||b,H=G?A._offsetIndex:L.num;g=M*C*E/Z,P=2*M*(-.5+(H+.5)/Z)*C,T=M*C/Z}else g=M*C*E,P=0,T=M;L.dPos=M,L.bPos=P,L.bdPos=g,L.wHover=T;var N,j,re=P+g,oe,_e,Me,ke,me,ie,Se=!!_,Le=(A.boxpoints||A.points)&&h>0;if(k===\"positive\"?(N=M*(_?1:.5),oe=re,j=oe=P):k===\"negative\"?(N=oe=P,j=M*(_?1:.5),_e=re):(N=j=M,oe=_e=re),Le){var Ae=A.pointpos,De=A.jitter,Pe=A.marker.size/2,ge=0;Ae+De>=0&&(ge=re*(Ae+De),ge>N?(Se=!0,me=Pe,Me=ge):ge>oe&&(me=Pe,Me=N)),ge<=N&&(Me=N);var Fe=0;Ae-De<=0&&(Fe=-re*(Ae-De),Fe>j?(Se=!0,ie=Pe,ke=Fe):Fe>_e&&(ie=Pe,ke=j)),Fe<=j&&(ke=j)}else Me=N,ke=j;var ce=new Array(c.length);for(u=0;u<c.length;u++)ce[u]=c[u].pos;A._extremes[o]=A1e.findExtremes(n,ce,{padded:Se,vpadminus:ke,vpadplus:Me,vpadLinearized:!0,ppadminus:{x:ie,y:me}[s],ppadplus:{x:me,y:ie}[s]})}}}E1e.exports={crossTraceCalc:e_t,setPositionOffset:M1e}});var ZI=ye((hlr,I1e)=>{\"use strict\";var MT=Oa(),n2=Dr(),t_t=So(),C1e=5,r_t=.01;function i_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,\"trace boxes\").each(function(s){var l=MT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation===\"h\"?(h=o,d=a):(h=a,d=o),k1e(l,{pos:h,val:d},f,c,i),L1e(l,{x:a,y:o},f,c),P1e(l,{pos:h,val:d},f,c)})}function k1e(e,t,r,n,i){var a=r.orientation===\"h\",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,x=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var C=e.selectAll(\"path.box\").data(r.type!==\"violin\"||r.box.visible?n2.identity:[]);C.enter().append(\"path\").style(\"vector-effect\",i?\"none\":\"non-scaling-stroke\").attr(\"class\",\"box\"),C.exit().remove(),C.each(function(E){if(E.empty)return MT.select(this).attr(\"d\",\"M0,0Z\");var A=s.c2l(E.pos+u,!0),L=s.l2p(A-b)+f,_=s.l2p(A+p)+f,k=l?(L+_)/2:s.l2p(A)+f,M=r.whiskerwidth,g=l?L*M+(1-M)*k:s.l2p(A-c)+f,P=l?_*M+(1-M)*k:s.l2p(A+c)+f,T=s.l2p(A-b*x)+f,z=s.l2p(A+p*x)+f,O=r.sizemode===\"sd\",V=o.c2p(O?E.mean-E.sd:E.q1,!0),G=O?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),Z=n2.constrain(O?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(V,G)+1,Math.max(V,G)-1),H=E.lf===void 0||r.boxpoints===!1||O,N=o.c2p(H?E.min:E.lf,!0),j=o.c2p(H?E.max:E.uf,!0),re=o.c2p(E.ln,!0),oe=o.c2p(E.un,!0);a?MT.select(this).attr(\"d\",\"M\"+Z+\",\"+T+\"V\"+z+\"M\"+V+\",\"+L+\"V\"+_+(v?\"H\"+re+\"L\"+Z+\",\"+z+\"L\"+oe+\",\"+_:\"\")+\"H\"+G+\"V\"+L+(v?\"H\"+oe+\"L\"+Z+\",\"+T+\"L\"+re+\",\"+L:\"\")+\"Z\"+(d?\"M\"+V+\",\"+k+\"H\"+N+\"M\"+G+\",\"+k+\"H\"+j+(h===0?\"\":\"M\"+N+\",\"+g+\"V\"+P+\"M\"+j+\",\"+g+\"V\"+P):\"\")):MT.select(this).attr(\"d\",\"M\"+T+\",\"+Z+\"H\"+z+\"M\"+L+\",\"+V+\"H\"+_+(v?\"V\"+re+\"L\"+z+\",\"+Z+\"L\"+_+\",\"+oe:\"\")+\"V\"+G+\"H\"+L+(v?\"V\"+oe+\"L\"+T+\",\"+Z+\"L\"+L+\",\"+re:\"\")+\"Z\"+(d?\"M\"+k+\",\"+V+\"V\"+N+\"M\"+k+\",\"+G+\"V\"+j+(h===0?\"\":\"M\"+g+\",\"+N+\"H\"+P+\"M\"+g+\",\"+j+\"H\"+P):\"\"))})}function L1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;n2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll(\"g.points\").data(l?u:[]);c.enter().append(\"g\").attr(\"class\",\"points\"),c.exit().remove();var f=c.selectAll(\"path\").data(function(h){var d,v=h.pts2,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,p=x*r_t,C=[],E=0,A;if(r.jitter){if(x===0)for(E=1,C=new Array(v.length),d=0;d<v.length;d++)C[d]=1;else for(d=0;d<v.length;d++){var L=Math.max(0,d-C1e),_=v[L].v,k=Math.min(v.length-1,d+C1e),M=v[k].v;l!==\"all\"&&(v[d].v<h.lf?M=Math.min(M,h.lf):_=Math.max(_,h.uf));var g=Math.sqrt(p*(k-L)/(M-_+b))||0;g=n2.constrain(Math.abs(g),0,1),C.push(g),E=Math.max(g,E)}A=r.jitter*2/(E||1)}for(d=0;d<v.length;d++){var P=v[d],T=P.v,z=r.jitter?A*C[d]*(n2.pseudoRandom()-.5):0,O=h.pos+s+o*(r.pointpos+z);r.orientation===\"h\"?(P.y=O,P.x=T):(P.x=O,P.y=T),l===\"suspectedoutliers\"&&T<h.uo&&T>h.lo&&(P.so=!0)}return v});f.enter().append(\"path\").classed(\"point\",!0),f.exit().remove(),f.call(t_t.translatePoints,i,a)}function P1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll(\"path.mean\").data(r.type===\"box\"&&r.boxmean||r.type===\"violin\"&&r.box.visible&&r.meanline.visible?n2.identity:[]);h.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),x=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(x+b)/2:a.l2p(v)+l,C=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),A=i.c2p(d.mean+d.sd,!0);r.orientation===\"h\"?MT.select(this).attr(\"d\",\"M\"+C+\",\"+x+\"V\"+b+(u===\"sd\"?\"m0,0L\"+E+\",\"+p+\"L\"+C+\",\"+x+\"L\"+A+\",\"+p+\"Z\":\"\")):MT.select(this).attr(\"d\",\"M\"+x+\",\"+C+\"H\"+b+(u===\"sd\"?\"m0,0L\"+p+\",\"+E+\"L\"+x+\",\"+C+\"L\"+p+\",\"+A+\"Z\":\"\"))})}I1e.exports={plot:i_t,plotBoxAndWhiskers:k1e,plotPoints:L1e,plotBoxMean:P1e}});var YI=ye((dlr,R1e)=>{\"use strict\";var IV=Oa(),RV=Ca(),DV=So();function n_t(e,t,r){var n=r||IV.select(e).selectAll(\"g.trace.boxes\");n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=IV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style(\"stroke-width\",h+\"px\").call(RV.stroke,d).call(RV.fill,v)}var u=a.selectAll(\"path.box\");if(o.type===\"candlestick\")u.each(function(f){if(!f.empty){var h=IV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style(\"opacity\",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll(\"path.mean\").style({\"stroke-width\":s,\"stroke-dasharray\":2*s+\"px,\"+s+\"px\"}).call(RV.stroke,o.line.color);var c=a.selectAll(\"path.point\");DV.pointStyle(c,o,e)}})}function a_t(e,t,r){var n=t[0].trace,i=r.selectAll(\"path.point\");n.selectedpoints?DV.selectedPointStyle(i,n):DV.pointStyle(i,n,e)}R1e.exports={style:n_t,styleOnSelect:a_t}});var zV=ye((vlr,O1e)=>{\"use strict\";var o_t=ho(),FV=Dr(),A_=vf(),D1e=Ca(),s_t=FV.fillText;function l_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf(\"boxes\")!==-1&&(s=s.concat(F1e(e,t,r,n))),o.indexOf(\"points\")!==-1&&(l=z1e(e,t,r)),n===\"closest\"?l?[l]:s:(l&&s.push(l),s)}function F1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type===\"violin\",c,f,h,d,v,x,b,p,C,E,A,L=l.bdPos,_,k,M=l.wHover,g=function(Pe){return h.c2l(Pe.pos)+l.bPos-h.c2l(x)};u&&s.side!==\"both\"?(s.side===\"positive\"&&(C=function(Pe){var ge=g(Pe);return A_.inbox(ge,ge+M,E)},_=L,k=0),s.side===\"negative\"&&(C=function(Pe){var ge=g(Pe);return A_.inbox(ge-M,ge,E)},_=0,k=L)):(C=function(Pe){var ge=g(Pe);return A_.inbox(ge-M,ge+M,E)},_=k=L);var P;u?P=function(Pe){return A_.inbox(Pe.span[0]-v,Pe.span[1]-v,E)}:P=function(Pe){return A_.inbox(Pe.min-v,Pe.max-v,E)},s.orientation===\"h\"?(v=t,x=r,b=P,p=C,c=\"y\",h=o,f=\"x\",d=a):(v=r,x=t,b=C,p=P,c=\"x\",h=a,f=\"y\",d=o);var T=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));E=e.maxHoverDistance-T,A=e.maxSpikeDistance-T;function z(Pe){return(b(Pe)+p(Pe))/2}var O=A_.getDistanceFunction(n,b,p,z);if(A_.getClosest(i,O,e),e.index===!1)return[];var V=i[e.index],G=s.line.color,Z=(s.marker||{}).color;D1e.opacity(G)&&s.line.width?e.color=G:D1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+\"0\"]=h.c2p(V.pos+l.bPos-k,!0),e[c+\"1\"]=h.c2p(V.pos+l.bPos+_,!0),e[c+\"LabelVal\"]=V.orig_p!==void 0?V.orig_p:V.pos;var H=c+\"Spike\";e.spikeDistance=z(V)*A/E,e[H]=h.c2p(V.pos,!0);var N=s.boxmean||s.sizemode===\"sd\"||(s.meanline||{}).visible,j=s.boxpoints||s.points,re=j&&N?[\"max\",\"uf\",\"q3\",\"med\",\"mean\",\"q1\",\"lf\",\"min\"]:j&&!N?[\"max\",\"uf\",\"q3\",\"med\",\"q1\",\"lf\",\"min\"]:!j&&N?[\"max\",\"q3\",\"med\",\"mean\",\"q1\",\"min\"]:[\"max\",\"q3\",\"med\",\"q1\",\"min\"],oe=d.range[1]<d.range[0];s.orientation===(oe?\"v\":\"h\")&&re.reverse();for(var _e=e.spikeDistance,Me=e[H],ke=[],me=0;me<re.length;me++){var ie=re[me];if(ie in V){var Se=V[ie],Le=d.c2p(Se,!0),Ae=FV.extendFlat({},e);Ae.attr=ie,Ae[f+\"0\"]=Ae[f+\"1\"]=Le,Ae[f+\"LabelVal\"]=Se,Ae[f+\"Label\"]=(l.labels?l.labels[ie]+\" \":\"\")+o_t.hoverLabelText(d,Se,s[f+\"hoverformat\"]),Ae.hoverOnBox=!0,ie===\"mean\"&&\"sd\"in V&&(s.boxmean===\"sd\"||s.sizemode===\"sd\")&&(Ae[f+\"err\"]=V.sd),Ae.hovertemplate=!1,ke.push(Ae)}}e.name=\"\",e.spikeDistance=void 0,e[H]=void 0;for(var De=0;De<ke.length;De++)ke[De].attr!==\"med\"?(ke[De].name=\"\",ke[De].spikeDistance=void 0,ke[De][H]=void 0):(ke[De].spikeDistance=_e,ke[De][H]=Me);return ke}function z1e(e,t,r){for(var n=e.cd,i=e.xa,a=e.ya,o=n[0].trace,s=i.c2p(t),l=a.c2p(r),u,c=function(P){var T=Math.max(3,P.mrc||0);return Math.max(Math.abs(i.c2p(P.x)-s)-T,1-3/T)},f=function(P){var T=Math.max(3,P.mrc||0);return Math.max(Math.abs(a.c2p(P.y)-l)-T,1-3/T)},h=A_.quadrature(c,f),d=!1,v,x,b=0;b<n.length;b++){v=n[b];for(var p=0;p<(v.pts||[]).length;p++){x=v.pts[p];var C=h(x);C<=e.distance&&(e.distance=C,d=[b,p])}}if(!d)return!1;v=n[d[0]],x=v.pts[d[1]];var E=i.c2p(x.x,!0),A=a.c2p(x.y,!0),L=x.mrc||1;u=FV.extendFlat({},e,{index:x.i,color:(o.marker||{}).color,name:o.name,x0:E-L,x1:E+L,y0:A-L,y1:A+L,spikeDistance:e.distance,hovertemplate:o.hovertemplate});var _=v.orig_p,k=_!==void 0?_:v.pos,M;o.orientation===\"h\"?(M=a,u.xLabelVal=x.x,u.yLabelVal=k):(M=i,u.xLabelVal=k,u.yLabelVal=x.y);var g=M._id.charAt(0);return u[g+\"Spike\"]=M.c2p(v.pos,!0),s_t(x,o,u),u}O1e.exports={hoverPoints:l_t,hoverOnBoxes:F1e,hoverOnPoints:z1e}});var B1e=ye((plr,q1e)=>{\"use strict\";q1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),\"xVal\"in r&&(t.x=r.xVal),\"yVal\"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var OV=ye((glr,N1e)=>{\"use strict\";N1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++)n[s].pts[l].selected=0;else for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++){var u=n[s].pts[l],c=i.c2p(u.x),f=a.c2p(u.y);r.contains([c,f],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0}return o}});var V1e=ye((mlr,U1e)=>{\"use strict\";U1e.exports={attributes:y4(),layoutAttributes:_4(),supplyDefaults:b4().supplyDefaults,crossTraceDefaults:b4().crossTraceDefaults,supplyLayoutDefaults:jI().supplyLayoutDefaults,calc:PV(),crossTraceCalc:XI().crossTraceCalc,plot:ZI().plot,style:YI().style,styleOnSelect:YI().styleOnSelect,hoverPoints:zV().hoverPoints,eventData:B1e(),selectPoints:OV(),moduleType:\"trace\",name:\"box\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"boxLayout\",\"zoomScale\"],meta:{}}});var H1e=ye((ylr,G1e)=>{\"use strict\";G1e.exports=V1e()});var ET=ye((_lr,j1e)=>{\"use strict\";var n0=pf(),u_t=Gl(),c_t=ec(),qV=df().axisHoverFormat,f_t=Qo().hovertemplateAttrs,h_t=Qo().texttemplateAttrs,d_t=Tu(),Lp=Ao().extendFlat;j1e.exports=Lp({z:{valType:\"data_array\",editType:\"calc\"},x:Lp({},n0.x,{impliedEdits:{xtype:\"array\"}}),x0:Lp({},n0.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:Lp({},n0.dx,{impliedEdits:{xtype:\"scaled\"}}),y:Lp({},n0.y,{impliedEdits:{ytype:\"array\"}}),y0:Lp({},n0.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:Lp({},n0.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:Lp({},n0.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:Lp({},n0.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:Lp({},n0.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:Lp({},n0.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:Lp({},n0.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:Lp({},n0.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:qV(\"x\"),yhoverformat:qV(\"y\"),zhoverformat:qV(\"z\",1),hovertemplate:f_t(),texttemplate:h_t({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:c_t({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:Lp({},u_t.showlegend,{dflt:!1}),zorder:n0.zorder},d_t(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var JI=ye((xlr,X1e)=>{\"use strict\";var v_t=Eo(),KI=Dr(),p_t=qa();X1e.exports=function(t,r,n,i,a,o){var s=n(\"z\");a=a||\"x\",o=o||\"y\";var l,u;if(s===void 0||!s.length)return 0;if(KI.isArray1D(s)){l=n(a),u=n(o);var c=KI.minRowLength(l),f=KI.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=W1e(a,n),u=W1e(o,n),!g_t(s))return 0;n(\"transpose\"),r._length=null}var h=p_t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");return h(t,r,[a,o],i),!0};function W1e(e,t){var r=t(e),n=r?t(e+\"type\",\"array\"):\"scaled\";return n===\"scaled\"&&(t(e+\"0\"),t(\"d\"+e)),r}function g_t(e){for(var t=!0,r=!1,n=!1,i,a=0;a<e.length;a++){if(i=e[a],!KI.isArrayOrTypedArray(i)){t=!1;break}i.length>0&&(r=!0);for(var o=0;o<i.length;o++)if(v_t(i[o])){n=!0;break}}return t&&r&&n}});var w4=ye((blr,Y1e)=>{\"use strict\";var Z1e=Dr();Y1e.exports=function(t,r){t(\"texttemplate\");var n=Z1e.extendFlat({},r.font,{color:\"auto\",size:\"auto\"});Z1e.coerceFont(t,\"textfont\",n)}});var BV=ye((wlr,K1e)=>{\"use strict\";K1e.exports=function(t,r,n){var i=n(\"zsmooth\");i===!1&&(n(\"xgap\"),n(\"ygap\")),n(\"zhoverformat\")}});var Q1e=ye((Tlr,$1e)=>{\"use strict\";var J1e=Dr(),m_t=JI(),y_t=w4(),__t=Pg(),x_t=BV(),b_t=Jh(),w_t=ET();$1e.exports=function(t,r,n,i){function a(s,l){return J1e.coerce(t,r,w_t,s,l)}var o=m_t(t,r,a,i);if(!o){r.visible=!1;return}__t(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),y_t(a,i),x_t(t,r,a,i),a(\"hoverongaps\"),a(\"connectgaps\",J1e.isArray1D(r.z)&&r.zsmooth!==!1),b_t(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),a(\"zorder\")}});var NV=ye((Alr,e_e)=>{\"use strict\";var CT=Eo();e_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return CT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return CT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(CT(i))if(i=Number(i),CT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(CT(i))if(i=Number(i),CT(r[e])){if(r[e]<i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0}}});var UV=ye((Slr,t_e)=>{\"use strict\";t_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i<r;i++)e[i]*=n},probability:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]/=t},density:function(e,t,r,n){var i=e.length;n=n||1;for(var a=0;a<i;a++)e[a]*=r[a]*n},\"probability density\":function(e,t,r,n){var i=e.length;n&&(t/=n);for(var a=0;a<i;a++)e[a]*=r[a]/t}}});var VV=ye((Mlr,r_e)=>{\"use strict\";r_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a<n;a++)r[a]?(t[a]/=r[a],i+=t[a]):t[a]=null;return i}});var GV=ye((Elr,c_e)=>{\"use strict\";var kT=hs(),a2=kT.ONEAVGYEAR,i_e=kT.ONEAVGMONTH,QI=kT.ONEDAY,n_e=kT.ONEHOUR,a_e=kT.ONEMIN,o_e=kT.ONESEC,s_e=ho().tickIncrement;c_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min($I(u+s,u+l,i,a),$I(c+s,c+l,i,a)),h=Math.min($I(u+o,u+s,i,a),$I(c+o,c+s,i,a)),d,v;if(f>h&&h<Math.abs(c-u)/4e3?(d=f,v=!1):(d=Math.min(f,h),v=!0),i.type===\"date\"&&d>QI){var x=d===a2?1:6,b=d===a2?\"M12\":\"M1\";return function(p,C){var E=i.c2d(p,a2,a),A=E.indexOf(\"-\",x);A>0&&(E=E.substr(0,A));var L=i.d2c(E,0,a);if(L<p){var _=s_e(L,b,!1,a);(L+_)/2<p+t&&(L=_)}return C&&v?s_e(L,b,!0,a):L}}return function(p,C){var E=d*Math.round(p/d);return E+d/10<p&&E+d*.9<p+t&&(E+=d),C&&v&&(E-=d),E}};function $I(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),a=r.type===\"date\",o=l_e(i,a),s=0;s<10;s++){var l=l_e(o*80,a);if(o===l)break;if(T_t(l,e,t,a,r,n))o=l;else break}return o}function l_e(e,t){return t&&e>o_e?e>QI?e>a2*1.1?a2:e>i_e*1.1?i_e:QI:e>n_e?n_e:e>a_e?a_e:o_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function T_t(e,t,r,n,i,a){if(n&&e>QI){var o=u_e(t,i,a),s=u_e(r,i,a),l=e===a2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function u_e(e,t,r){var n=t.c2d(e,a2,r).split(\"-\");return n[0]===\"\"&&(n.unshift(),n[0]=\"-\"+n[0]),n}});var WV=ye((Clr,p_e)=>{\"use strict\";var HV=Eo(),Vv=Dr(),f_e=qa(),G0=ho(),{hasColorscale:h_e}=pv(),d_e=gv(),A_t=v4(),v_e=NV(),S_t=UV(),M_t=VV(),E_t=GV();function C_t(e,t){var r=[],n=[],i=t.orientation===\"h\",a=G0.getFromId(e,i?t.yaxis:t.xaxis),o=i?\"y\":\"x\",s={x:\"y\",y:\"x\"}[o],l=t[o+\"calendar\"],u=t.cumulative,c,f=jV(e,t,a,o),h=f[0],d=f[1],v=typeof h.size==\"string\",x=[],b=v?x:h,p=[],C=[],E=[],A=0,L=t.histnorm,_=t.histfunc,k=L.indexOf(\"density\")!==-1,M,g,P;u.enabled&&k&&(L=L.replace(/ ?density$/,\"\"),k=!1);var T=_===\"max\"||_===\"min\",z=T?null:0,O=v_e.count,V=S_t[L],G=!1,Z=function(ge){return a.r2c(ge,0,l)},H;for(Vv.isArrayOrTypedArray(t[s])&&_!==\"count\"&&(H=t[s],G=_===\"avg\",O=v_e[_]),c=Z(h.start),g=Z(h.end)+(c-G0.tickIncrement(c,h.size,!1,l))/1e6;c<g&&r.length<1e6&&(M=G0.tickIncrement(c,h.size,!1,l),r.push((c+M)/2),n.push(z),E.push([]),x.push(c),k&&p.push(1/(M-c)),G&&C.push(0),!(M<=c));)c=M;x.push(c),!v&&a.type===\"date\"&&(b={start:Z(b.start),end:Z(b.end),size:b.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var N=t[\"_\"+o+\"bingroup\"],j={leftGap:1/0,rightGap:1/0};N&&(e._fullLayout._roundFnOpts[N]||(e._fullLayout._roundFnOpts[N]=j),j=e._fullLayout._roundFnOpts[N]);var re=n.length,oe=!0,_e=j.leftGap,Me=j.rightGap,ke={};for(c=0;c<d.length;c++){var me=d[c];P=Vv.findBin(me,b),P>=0&&P<re&&(A+=O(P,c,n,H,C),oe&&E[P].length&&me!==d[E[P][0]]&&(oe=!1),E[P].push(c),ke[c]=P,_e=Math.min(_e,me-x[P]),Me=Math.min(Me,x[P+1]-me))}j.leftGap=_e,j.rightGap=Me;var ie;oe||(ie=function(ge,Fe){return function(){var ce=e._fullLayout._roundFnOpts[N];return E_t(ce.leftGap,ce.rightGap,x,a,l)(ge,Fe)}}),G&&(A=M_t(n,C)),V&&V(n,A,p),u.enabled&&P_t(n,u.direction,u.currentbin);var Se=Math.min(r.length,n.length),Le=[],Ae=0,De=Se-1;for(c=0;c<Se;c++)if(n[c]){Ae=c;break}for(c=Se-1;c>=Ae;c--)if(n[c]){De=c;break}for(c=Ae;c<=De;c++)if(HV(r[c])&&HV(n[c])){var Pe={p:r[c],s:n[c],b:0};u.enabled||(Pe.pts=E[c],oe?Pe.ph0=Pe.ph1=E[c].length?d[E[c][0]]:r[c]:(t._computePh=!0,Pe.ph0=ie(x[c]),Pe.ph1=ie(x[c+1],!0))),Le.push(Pe)}return Le.length===1&&(Le[0].width1=G0.tickIncrement(Le[0].p,h.size,!1,l)-Le[0].p),h_e(t,\"marker\")&&d_e(e,t,{vals:t.marker.color,containerStr:\"marker\",cLetter:\"c\"}),h_e(t,\"marker.line\")&&d_e(e,t,{vals:t.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),A_t(Le,t),Vv.isArrayOrTypedArray(t.selectedpoints)&&Vv.tagSelected(Le,t,ke),Le}function jV(e,t,r,n,i){var a=n+\"bins\",o=e._fullLayout,s=t[\"_\"+n+\"bingroup\"],l=o._histogramBinOpts[s],u=o.barmode===\"overlay\",c,f,h,d,v,x,b,p=function(me){return r.r2c(me,0,d)},C=function(me){return r.c2r(me,0,d)},E=r.type===\"date\"?function(me){return me||me===0?Vv.cleanDate(me,null,d):null}:function(me){return HV(me)?Number(me):null};function A(me,ie,Se){ie[me+\"Found\"]?(ie[me]=E(ie[me]),ie[me]===null&&(ie[me]=Se[me])):(x[me]=ie[me]=Se[me],Vv.nestedProperty(f[0],a+\".\"+me).set(Se[me]))}if(t[\"_\"+n+\"autoBinFinished\"])delete t[\"_\"+n+\"autoBinFinished\"];else{f=l.traces;var L=[],_=!0,k=!1,M=!1;for(c=0;c<f.length;c++)if(h=f[c],h.visible){var g=l.dirs[c];v=h[\"_\"+g+\"pos0\"]=r.makeCalcdata(h,g),L=Vv.concat(L,v),delete h[\"_\"+n+\"autoBinFinished\"],t.visible===!0&&(_?_=!1:(delete h._autoBin,h[\"_\"+n+\"autoBinFinished\"]=1),f_e.traceIs(h,\"2dMap\")&&(k=!0),h.type===\"histogram2dcontour\"&&(M=!0))}d=f[0][n+\"calendar\"];var P=G0.autoBin(L,r,l.nbins,k,d,l.sizeFound&&l.size),T=f[0]._autoBin={};if(x=T[l.dirs[0]]={},M&&(l.size||(P.start=C(G0.tickIncrement(p(P.start),P.size,!0,d))),l.end===void 0&&(P.end=C(G0.tickIncrement(p(P.end),P.size,!1,d)))),u&&!f_e.traceIs(t,\"2dMap\")&&P._dataSpan===0&&r.type!==\"category\"&&r.type!==\"multicategory\"&&t.bingroup===\"\"&&typeof t.xbins==\"undefined\"){if(i)return[P,v,!0];P=k_t(e,t,r,n,a)}b=h.cumulative||{},b.enabled&&b.currentbin!==\"include\"&&(b.direction===\"decreasing\"?P.start=C(G0.tickIncrement(p(P.start),P.size,!0,d)):P.end=C(G0.tickIncrement(p(P.end),P.size,!1,d))),l.size=P.size,l.sizeFound||(x.size=P.size,Vv.nestedProperty(f[0],a+\".size\").set(P.size)),A(\"start\",l,P),A(\"end\",l,P)}v=t[\"_\"+n+\"pos0\"],delete t[\"_\"+n+\"pos0\"];var z=t._input[a]||{},O=Vv.extendFlat({},l),V=l.start,G=r.r2l(z.start),Z=G!==void 0;if((l.startFound||Z)&&G!==r.r2l(V)){var H=Z?G:Vv.aggNums(Math.min,null,v),N={type:r.type===\"category\"||r.type===\"multicategory\"?\"linear\":r.type,r2l:r.r2l,dtick:l.size,tick0:V,calendar:d,range:[H,G0.tickIncrement(H,l.size,!1,d)].map(r.l2r)},j=G0.tickFirst(N);j>r.r2l(H)&&(j=G0.tickIncrement(j,l.size,!0,d)),O.start=r.l2r(j),Z||Vv.nestedProperty(t,a+\".start\").set(O.start)}var re=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(re)){var Me=_e?oe:Vv.aggNums(Math.max,null,v);O.end=r.l2r(Me),_e||Vv.nestedProperty(t,a+\".start\").set(O.end)}var ke=\"autobin\"+n;return t._input[ke]===!1&&(t._input[a]=Vv.extendFlat({},t[a]||{}),delete t._input[ke],delete t[ke]),[O,v]}function k_t(e,t,r,n,i){var a=e._fullLayout,o=L_t(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c<o.length;c++)if(f=o[c],f===t)s=!0;else if(!s)h=a._histogramBinOpts[f[\"_\"+n+\"bingroup\"]],l=Math.min(l,h.size||f[i].size);else{var d=jV(e,f,r,n,!0),v=d[0],x=d[2];f[\"_\"+n+\"autoBinFinished\"]=1,f[\"_\"+n+\"pos0\"]=d[1],x?u.push(f):l=Math.min(l,v.size)}var b=new Array(u.length);for(c=0;c<u.length;c++)for(var p=u[c][\"_\"+n+\"pos0\"],C=0;C<p.length;C++)if(p[C]!==void 0){b[c]=p[C];break}for(isFinite(l)||(l=Vv.distinctVals(b).minDiff),c=0;c<u.length;c++){f=u[c];var E=f[n+\"calendar\"],A={start:r.c2r(b[c]-l/2,0,E),end:r.c2r(b[c]+l/2,0,E),size:l};f._input[i]=f[i]=A,h=a._histogramBinOpts[f[\"_\"+n+\"bingroup\"]],h&&Vv.extendFlat(h,A)}return t[i]}function L_t(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;s<o.length;s++){var l=o[s];l.type===\"histogram\"&&l.visible===!0&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}function P_t(e,t,r){var n,i,a;function o(l){a=e[l],e[l]/=2}function s(l){i=e[l],e[l]=a+i/2,a+=i}if(r===\"half\")if(t===\"increasing\")for(o(0),n=1;n<e.length;n++)s(n);else for(o(e.length-1),n=e.length-2;n>=0;n--)s(n);else if(t===\"increasing\"){for(n=1;n<e.length;n++)e[n]+=e[n-1];r===\"exclude\"&&(e.unshift(0),e.pop())}else{for(n=e.length-2;n>=0;n--)e[n]+=e[n+1];r===\"exclude\"&&(e.push(0),e.shift())}}p_e.exports={calc:C_t,calcAllAutoBins:jV}});var T_e=ye((klr,w_e)=>{\"use strict\";var g_e=Dr(),LT=ho(),m_e=NV(),I_t=UV(),R_t=VV(),D_t=GV(),y_e=WV().calcAllAutoBins;w_e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(bt){return n.r2c(bt,0,a)},l=function(bt){return i.r2c(bt,0,o)},u=function(bt){return n.c2r(bt,0,a)},c=function(bt){return i.c2r(bt,0,o)},f,h,d,v,x=y_e(t,r,n,\"x\"),b=x[0],p=x[1],C=y_e(t,r,i,\"y\"),E=C[0],A=C[1],L=r._length;p.length>L&&p.splice(L,p.length-L),A.length>L&&A.splice(L,A.length-L);var _=[],k=[],M=[],g=typeof b.size==\"string\",P=typeof E.size==\"string\",T=[],z=[],O=g?T:b,V=P?z:E,G=0,Z=[],H=[],N=r.histnorm,j=r.histfunc,re=N.indexOf(\"density\")!==-1,oe=j===\"max\"||j===\"min\",_e=oe?null:0,Me=m_e.count,ke=I_t[N],me=!1,ie=[],Se=[],Le=\"z\"in r?r.z:\"marker\"in r&&Array.isArray(r.marker.color)?r.marker.color:\"\";Le&&j!==\"count\"&&(me=j===\"avg\",Me=m_e[j]);var Ae=b.size,De=s(b.start),Pe=s(b.end)+(De-LT.tickIncrement(De,Ae,!1,a))/1e6;for(f=De;f<Pe;f=LT.tickIncrement(f,Ae,!1,a))k.push(_e),T.push(f),me&&M.push(0);T.push(f);var ge=k.length,Fe=(f-De)/ge,ce=u(De+Fe/2),Ze=E.size,ct=l(E.start),pt=l(E.end)+(ct-LT.tickIncrement(ct,Ze,!1,o))/1e6;for(f=ct;f<pt;f=LT.tickIncrement(f,Ze,!1,o)){_.push(k.slice()),z.push(f);var Wt=new Array(ge);for(h=0;h<ge;h++)Wt[h]=[];H.push(Wt),me&&Z.push(M.slice())}z.push(f);var st=_.length,lt=(f-ct)/st,Gt=c(ct+lt/2);re&&(ie=__e(k.length,O,Fe,g),Se=__e(_.length,V,lt,P)),!g&&n.type===\"date\"&&(O=x_e(s,O)),!P&&i.type===\"date\"&&(V=x_e(l,V));var Nt=!0,$t=!0,sr=new Array(ge),wr=new Array(st),ur=1/0,Qe=1/0,Et=1/0,er=1/0;for(f=0;f<L;f++){var Ut=p[f],Ft=A[f];d=g_e.findBin(Ut,O),v=g_e.findBin(Ft,V),d>=0&&d<ge&&v>=0&&v<st&&(G+=Me(d,f,_[v],Le,Z[v]),H[v][d].push(f),Nt&&(sr[d]===void 0?sr[d]=Ut:sr[d]!==Ut&&(Nt=!1)),$t&&(wr[v]===void 0?wr[v]=Ft:wr[v]!==Ft&&($t=!1)),ur=Math.min(ur,Ut-T[d]),Qe=Math.min(Qe,T[d+1]-Ut),Et=Math.min(Et,Ft-z[v]),er=Math.min(er,z[v+1]-Ft))}if(me)for(v=0;v<st;v++)G+=R_t(_[v],Z[v]);if(ke)for(v=0;v<st;v++)ke(_[v],G,ie,Se[v]);return{x:p,xRanges:b_e(T,Nt&&sr,ur,Qe,n,a),x0:ce,dx:Fe,y:A,yRanges:b_e(z,$t&&wr,Et,er,i,o),y0:Gt,dy:lt,z:_,pts:H}};function __e(e,t,r,n){var i=new Array(e),a;if(n)for(a=0;a<e;a++)i[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)i[a]=o}return i}function x_e(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function b_e(e,t,r,n,i,a){var o,s=e.length-1,l=new Array(s),u=D_t(r,n,e,i,a);for(o=0;o<s;o++){var c=(t||[])[o];l[o]=c===void 0?[u(e[o]),u(e[o+1],!0)]:[c,c]}return l}});var e8=ye((Llr,M_e)=>{\"use strict\";var Im=Dr(),A_e=hs().BADNUM,S_e=Rg();M_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=S_e(t,r,i,l).vals,u=S_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&Im.isArray1D(c),h=t.hovertext,d=h!==void 0&&Im.isArray1D(h),v,x,b=Im.distinctVals(l),p=b.vals,C=Im.distinctVals(u),E=C.vals,A=[],L,_,k=E.length,M=p.length;for(v=0;v<o.length;v++)A[v]=Im.init2dArray(k,M);f&&(L=Im.init2dArray(k,M)),d&&(_=Im.init2dArray(k,M));var g=Im.init2dArray(k,M);for(v=0;v<s;v++)if(l[v]!==A_e&&u[v]!==A_e){var P=Im.findBin(l[v]+b.minDiff/2,p),T=Im.findBin(u[v]+C.minDiff/2,E);for(x=0;x<o.length;x++){var z=o[x],O=t[z],V=A[x];V[T][P]=O[v],g[T][P]=v}f&&(L[T][P]=c[v]),d&&(_[T][P]=h[v])}for(t[\"_\"+i]=p,t[\"_\"+a]=E,x=0;x<o.length;x++)t[\"_\"+o[x]]=A[x];f&&(t._text=L),d&&(t._hovertext=_),r&&r.type===\"category\"&&(t[\"_\"+i+\"CategoryMap\"]=p.map(function(G){return r._categories[G]})),n&&n.type===\"category\"&&(t[\"_\"+a+\"CategoryMap\"]=E.map(function(G){return n._categories[G]})),t._after2before=g}});var r8=ye((Plr,E_e)=>{\"use strict\";var F_t=Eo(),z_t=Dr(),t8=hs().BADNUM;E_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(F_t(p))return+p}if(r&&r.transpose){for(a=0,u=0;u<t.length;u++)a=Math.max(a,t[u].length);if(a===0)return!1;s=function(p){return p.length},l=function(p,C,E){return(p[E]||[])[C]}}else a=t.length,s=function(p,C){return p[C].length},l=function(p,C,E){return(p[C]||[])[E]};var h=function(p,C,E){return C===t8||E===t8?t8:l(p,C,E)};function d(p){if(r&&r.type!==\"carpet\"&&r.type!==\"contourcarpet\"&&p&&p.type===\"category\"&&r[\"_\"+p._id.charAt(0)].length){var C=p._id.charAt(0),E={},A=r[\"_\"+C+\"CategoryMap\"]||r[C];for(u=0;u<A.length;u++)E[A[u]]=u;return function(L){var _=E[p._categories[L]];return _+1?_:t8}}else return z_t.identity}var v=d(n),x=d(i);i&&i.type===\"category\"&&(a=i._categories.length);var b=new Array(a);for(u=0;u<a;u++)for(n&&n.type===\"category\"?o=n._categories.length:o=s(t,u),b[u]=new Array(o),c=0;c<o;c++)b[u][c]=f(h(t,x(u),v(c)));return b}});var i8=ye((Ilr,L_e)=>{\"use strict\";var O_t=Dr(),C_e=.01,q_t=[[-1,0],[1,0],[0,-1],[0,1]];function B_t(e){return .5-.25*Math.min(1,e*.5)}L_e.exports=function(t,r){var n=1,i;for(k_e(t,r),i=0;i<r.length&&!(r[i][2]<4);i++);for(r=r.slice(i),i=0;i<100&&n>C_e;i++)n=k_e(t,r,B_t(n));return n>C_e&&O_t.log(\"interp2d didn't converge quickly\",n),t};function k_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,x,b;for(s=0;s<t.length;s++){for(i=t[s],a=i[0],o=i[1],v=e[a][o],d=0,h=0,l=0;l<4;l++)u=q_t[l],c=e[a+u[0]],c&&(f=c[o+u[1]],f!==void 0&&(d===0?x=b=f:(x=Math.min(x,f),b=Math.max(b,f)),h++,d+=f));if(h===0)throw\"iterateInterp2d order is wrong: no defined neighbors\";e[a][o]=d/h,v===void 0?h<4&&(n=1):(e[a][o]=(1+r)*e[a][o]-r*v,b>x&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-x))))}return n}});var n8=ye((Rlr,P_e)=>{\"use strict\";var N_t=Dr().maxRowLength;P_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=N_t(t),u,c,f,h,d,v,x,b;for(c=0;c<t.length;c++)for(u=o,o=a,a=t[c+1]||[],f=0;f<l;f++)o[f]===void 0&&(v=(o[f-1]!==void 0?1:0)+(o[f+1]!==void 0?1:0)+(u[f]!==void 0?1:0)+(a[f]!==void 0?1:0),v?(c===0&&v++,f===0&&v++,c===t.length-1&&v++,f===o.length-1&&v++,v<4&&(n[[c,f]]=[c,f,v]),r.push([c,f,v])):i.push([c,f]));for(;i.length;){for(x={},b=!1,d=i.length-1;d>=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(x[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw\"findEmpties iterated with no new neighbors\";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(p,C){return C[2]-p[2]})}});var XV=ye((Dlr,D_e)=>{\"use strict\";var I_e=qa(),R_e=Dr().isArrayOrTypedArray;D_e.exports=function(t,r,n,i,a,o){var s=[],l=I_e.traceIs(t,\"contour\"),u=I_e.traceIs(t,\"histogram\"),c,f,h,d=R_e(r)&&r.length>1;if(d&&!u&&o.type!==\"category\"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type===\"log\"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type===\"log\"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h<v;h++)s.push(Math.sqrt(r[h-1]*r[h]));s.push(Math.pow(r[v-1],1.5)/Math.pow(r[v-2],.5))}else{for(s=[1.5*r[0]-.5*r[1]],h=1;h<v;h++)s.push((r[h-1]+r[h])*.5);s.push(1.5*r[v-1]-.5*r[v-2])}if(v<a){var x=s[s.length-1],b;if(o.type===\"log\")for(b=x/s[s.length-2],h=v;h<a;h++)x*=b,s.push(x);else for(b=x-s[s.length-2],h=v;h<a;h++)x+=b,s.push(x)}}else return l?r.slice(0,a):r.slice(0,a+1)}else{var p=t[o._id.charAt(0)+\"calendar\"];if(u)c=o.r2c(n,0,p);else if(R_e(r)&&r.length===1)c=r[0];else if(n===void 0)c=0;else{var C=o.type===\"log\"?o.d2c:o.r2c;c=C(n,0,p)}for(f=i||1,h=l?0:-.5;h<a;h++)s.push(c+f*h)}return s}});var s8=ye((Flr,q_e)=>{\"use strict\";var F_e=qa(),ZV=Dr(),a8=ho(),z_e=Rg(),U_t=T_e(),V_t=gv(),G_t=e8(),H_t=r8(),j_t=i8(),W_t=n8(),o8=XV(),YV=hs().BADNUM;q_e.exports=function(t,r){var n=a8.getFromId(t,r.xaxis||\"x\"),i=a8.getFromId(t,r.yaxis||\"y\"),a=F_e.traceIs(r,\"contour\"),o=F_e.traceIs(r,\"histogram\"),s=a?\"best\":r.zsmooth,l,u,c,f,h,d,v,x,b,p,C;if(n._minDtick=0,i._minDtick=0,o)C=U_t(t,r),f=C.orig_x,l=C.x,u=C.x0,c=C.dx,x=C.orig_y,h=C.y,d=C.y0,v=C.dy,b=C.z;else{var E=r.z;ZV.isArray1D(E)?(G_t(r,n,i,\"x\",\"y\",[\"z\"]),l=r._x,h=r._y,E=r._z):(f=r.x?n.makeCalcdata(r,\"x\"):[],x=r.y?i.makeCalcdata(r,\"y\"):[],l=z_e(r,n,\"x\",f).vals,h=z_e(r,i,\"y\",x).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=H_t(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=X_t(l,h,b),o||(l=O_e(l),h=O_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=W_t(b),j_t(b,r._emptypoints));function A(O){s=r._input.zsmooth=r.zsmooth=!1,ZV.warn('cannot use zsmooth: \"fast\": '+O)}function L(O){if(O.length>1){var V=(O[O.length-1]-O[0])/(O.length-1),G=Math.abs(V/100);for(p=0;p<O.length-1;p++)if(Math.abs(O[p+1]-O[p]-V)>G)return!1}return!0}r._islinear=!1,n.type===\"log\"||i.type===\"log\"?s===\"fast\"&&A(\"log axis found\"):L(l)?L(h)?r._islinear=!0:s===\"fast\"&&A(\"y scale is not linear\"):s===\"fast\"&&A(\"x scale is not linear\");var _=ZV.maxRowLength(b),k=r.xtype===\"scaled\"?\"\":l,M=o8(r,k,u,c,_,n),g=r.ytype===\"scaled\"?\"\":h,P=o8(r,g,d,v,b.length,i);r._extremes[n._id]=a8.findExtremes(n,M),r._extremes[i._id]=a8.findExtremes(i,P);var T={x:M,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(T.orig_x=f),r.yperiodalignment&&x&&(T.orig_y=x),k&&k.length===M.length-1&&(T.xCenter=k),g&&g.length===P.length-1&&(T.yCenter=g),o&&(T.xRanges=C.xRanges,T.yRanges=C.yRanges,T.pts=C.pts),a||V_t(t,r,{vals:b,cLetter:\"z\"}),a&&r.contours&&r.contours.coloring===\"heatmap\"){var z={type:r.type===\"contour\"?\"heatmap\":\"histogram2d\",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=o8(z,k,u,c,_,n),T.yfill=o8(z,g,d,v,b.length,i)}return[T]};function O_e(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e[n];i!==YV&&t.push(i)}return t}function X_t(e,t,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(t[a]!==YV){i++,n[i]=[];for(var o=0;o<r[a].length;o++)e[o]!==YV&&n[i].push(r[a][o])}return n}});var u8=ye(l8=>{\"use strict\";l8.CSS_DECLARATIONS=[[\"image-rendering\",\"optimizeSpeed\"],[\"image-rendering\",\"-moz-crisp-edges\"],[\"image-rendering\",\"-o-crisp-edges\"],[\"image-rendering\",\"-webkit-optimize-contrast\"],[\"image-rendering\",\"optimize-contrast\"],[\"image-rendering\",\"crisp-edges\"],[\"image-rendering\",\"pixelated\"]];l8.STYLE=l8.CSS_DECLARATIONS.map(function(e){return e.join(\": \")+\"; \"}).join(\"\")});var JV=ye((Olr,N_e)=>{\"use strict\";var B_e=u8(),Z_t=So(),KV=Dr(),PT=null;function Y_t(){if(PT!==null)return PT;PT=!1;var e=KV.isSafari()||KV.isMacWKWebView()||KV.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(B_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r==\"function\")PT=t.some(function(o){return r.apply(null,o)});else{var n=Z_t.tester.append(\"image\").attr(\"style\",B_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;PT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return PT}N_e.exports=Y_t});var c8=ye((qlr,Y_e)=>{\"use strict\";var U_e=Oa(),K_t=cd(),J_t=qa(),$_t=So(),Q_t=ho(),H0=Dr(),V_e=ru(),ext=tI(),txt=Ca(),rxt=tc().extractOpts,ixt=tc().makeColorScaleFuncFromTrace,nxt=Wp(),axt=Kh(),$V=axt.LINE_SPACING,oxt=JV(),sxt=u8().STYLE,X_e=\"heatmap-label\";function Z_e(e){return e.selectAll(\"g.\"+X_e)}function G_e(e){Z_e(e).remove()}Y_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;H0.makeTraceGroups(n,r,\"hm\").each(function(o){var s=U_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,x=l.xCenter,b=l.yCenter,p=J_t.traceIs(u,\"contour\"),C=p?\"best\":u.zsmooth,E=h.length,A=H0.maxRowLength(h),L=!1,_=!1,k,M,g,P,T,z,O,V;for(z=0;k===void 0&&z<d.length-1;)k=i.c2p(d[z]),z++;for(z=d.length-1;M===void 0&&z>0;)M=i.c2p(d[z]),z--;for(M<k&&(g=M,M=k,k=g,L=!0),z=0;P===void 0&&z<v.length-1;)P=a.c2p(v[z]),z++;for(z=v.length-1;T===void 0&&z>0;)T=a.c2p(v[z]),z--;T<P&&(g=P,P=T,T=g,_=!0),p&&(x=d,b=v,d=l.xfill,v=l.yfill);var G=\"default\";if(C?G=C===\"best\"?\"smooth\":\"fast\":u._islinear&&c===0&&f===0&&oxt()&&(G=\"fast\"),G!==\"fast\"){var Z=C===\"best\"?0:.5;k=Math.max(-Z*i._length,k),M=Math.min((1+Z)*i._length,M),P=Math.max(-Z*a._length,P),T=Math.min((1+Z)*a._length,T)}var H=Math.round(M-k),N=Math.round(T-P),j=k>=i._length||M<=0||P>=a._length||T<=0;if(j){var re=s.selectAll(\"image\").data([]);re.exit().remove(),G_e(s);return}var oe,_e;G===\"fast\"?(oe=A,_e=E):(oe=H,_e=N);var Me=document.createElement(\"canvas\");Me.width=oe,Me.height=_e;var ke=Me.getContext(\"2d\",{willReadFrequently:!0}),me=ixt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G===\"fast\"?(ie=L?function(cn){return A-1-cn}:H0.identity,Se=_?function(cn){return E-1-cn}:H0.identity):(ie=function(cn){return H0.constrain(Math.round(i.c2p(d[cn])-k),0,H)},Se=function(cn){return H0.constrain(Math.round(a.c2p(v[cn])-P),0,N)});var Le=Se(0),Ae=[Le,Le],De=L?0:1,Pe=_?0:1,ge=0,Fe=0,ce=0,Ze=0,ct,pt,Wt,st,lt;function Gt(cn,yn){if(cn!==void 0){var Mn=me(cn);return Mn[0]=Math.round(Mn[0]),Mn[1]=Math.round(Mn[1]),Mn[2]=Math.round(Mn[2]),ge+=yn,Fe+=Mn[0]*yn,ce+=Mn[1]*yn,Ze+=Mn[2]*yn,Mn}return[0,0,0,0]}function Nt(cn,yn,Mn,Ba){var la=cn[Mn.bin0];if(la===void 0)return Gt(void 0,1);var ma=cn[Mn.bin1],Wa=yn[Mn.bin0],Fa=yn[Mn.bin1],Wo=ma-la||0,da=Wa-la||0,Wn;return ma===void 0?Fa===void 0?Wn=0:Wa===void 0?Wn=2*(Fa-la):Wn=(2*Fa-Wa-la)*2/3:Fa===void 0?Wa===void 0?Wn=0:Wn=(2*la-ma-Wa)*2/3:Wa===void 0?Wn=(2*Fa-ma-la)*2/3:Wn=Fa+la-ma-Wa,Gt(la+Mn.frac*Wo+Ba.frac*(da+Mn.frac*Wn))}if(G!==\"default\"){var $t=0,sr;try{sr=new Uint8Array(oe*_e*4)}catch(cn){sr=new Array(oe*_e*4)}if(G===\"smooth\"){var wr=x||d,ur=b||v,Qe=new Array(wr.length),Et=new Array(ur.length),er=new Array(H),Ut=x?j_e:H_e,Ft=b?j_e:H_e,bt,yt,Yt;for(z=0;z<wr.length;z++)Qe[z]=Math.round(i.c2p(wr[z])-k);for(z=0;z<ur.length;z++)Et[z]=Math.round(a.c2p(ur[z])-P);for(z=0;z<H;z++)er[z]=Ut(z,Qe);for(O=0;O<N;O++)for(bt=Ft(O,Et),yt=h[bt.bin0],Yt=h[bt.bin1],z=0;z<H;z++,$t+=4)lt=Nt(yt,Yt,er[z],bt),W_e(sr,$t,lt)}else for(O=0;O<E;O++)for(st=h[O],Ae=Se(O),z=0;z<A;z++)lt=Gt(st[z],1),$t=(Ae*A+ie(z))*4,W_e(sr,$t,lt);var lr=ke.createImageData(oe,_e);try{lr.data.set(sr)}catch(cn){var Tr=lr.data,Rr=Tr.length;for(O=0;O<Rr;O++)Tr[O]=sr[O]}ke.putImageData(lr,0,0)}else{var ei=Math.floor(c/2),Wr=Math.floor(f/2);for(O=0;O<E;O++)if(st=h[O],Ae.reverse(),Ae[Pe]=Se(O+1),!(Ae[0]===Ae[1]||Ae[0]===void 0||Ae[1]===void 0))for(pt=ie(0),ct=[pt,pt],z=0;z<A;z++)ct.reverse(),ct[De]=ie(z+1),!(ct[0]===ct[1]||ct[0]===void 0||ct[1]===void 0)&&(Wt=st[z],lt=Gt(Wt,(ct[1]-ct[0])*(Ae[1]-Ae[0])),ke.fillStyle=\"rgba(\"+lt.join(\",\")+\")\",ke.fillRect(ct[0]+ei,Ae[0]+Wr,ct[1]-ct[0]-c,Ae[1]-Ae[0]-f))}Fe=Math.round(Fe/ge),ce=Math.round(ce/ge),Ze=Math.round(Ze/ge);var Ur=K_t(\"rgb(\"+Fe+\",\"+ce+\",\"+Ze+\")\");e._hmpixcount=(e._hmpixcount||0)+ge,e._hmlumcount=(e._hmlumcount||0)+ge*Ur.getLuminance();var dt=s.selectAll(\"image\").data(o);dt.enter().append(\"svg:image\").attr({xmlns:nxt.svg,preserveAspectRatio:\"none\"}),dt.attr({height:N,width:H,x:k,y:P,\"xlink:href\":Me.toDataURL(\"image/png\")}),G===\"fast\"&&!C&&dt.attr(\"style\",sxt),G_e(s);var Ge=u.texttemplate;if(Ge){var Je=rxt(u),je={type:\"linear\",range:[Je.min,Je.max],_separators:i._separators,_numFormat:i._numFormat},$e=u.type===\"histogram2dcontour\",wt=u.type===\"contour\",Ie=wt?1:0,xe=wt?E-1:E,Ce=wt?1:0,vt=wt?A-1:A,nr=[];for(z=Ie;z<xe;z++){var ir;if(wt)ir=l.y[z];else if($e){if(z===0||z===E-1)continue;ir=l.y[z]}else if(l.yCenter)ir=l.yCenter[z];else{if(z+1===E&&l.y[z+1]===void 0)continue;ir=(l.y[z]+l.y[z+1])/2}var pr=Math.round(a.c2p(ir));if(!(0>pr||pr>a._length))for(O=Ce;O<vt;O++){var oi;if(wt)oi=l.x[O];else if($e){if(O===0||O===A-1)continue;oi=l.x[O]}else if(l.xCenter)oi=l.xCenter[O];else{if(O+1===A&&l.x[O+1]===void 0)continue;oi=(l.x[O]+l.x[O+1])/2}var di=Math.round(i.c2p(oi));if(!(0>di||di>i._length)){var Jr=ext({x:oi,y:ir},u,e._fullLayout);Jr.x=oi,Jr.y=ir;var fi=l.z[z][O];fi===void 0?(Jr.z=\"\",Jr.zLabel=\"\"):(Jr.z=fi,Jr.zLabel=Q_t.tickText(je,fi,\"hover\").text);var Hi=l.text&&l.text[z]&&l.text[z][O];(Hi===void 0||Hi===!1)&&(Hi=\"\"),Jr.text=Hi;var Pn=H0.texttemplateString(Ge,Jr,e._fullLayout._d3locale,Jr,u._meta||{});if(Pn){var wn=Pn.split(\"<br>\"),pn=wn.length,Vn=0;for(V=0;V<pn;V++)Vn=Math.max(Vn,wn[V].length);nr.push({l:pn,c:Vn,t:Pn,x:di,y:pr,z:fi})}}}}var kn=u.textfont,ea=kn.size,ua=e._fullLayout.font.size;if(!ea||ea===\"auto\"){var Vt=1/0,_t=1/0,tr=0,ar=0;for(V=0;V<nr.length;V++){var Er=nr[V];if(tr=Math.max(tr,Er.l),ar=Math.max(ar,Er.c),V<nr.length-1){var Zr=nr[V+1],ri=Math.abs(Zr.x-Er.x),$r=Math.abs(Zr.y-Er.y);ri&&(Vt=Math.min(Vt,ri)),$r&&(_t=Math.min(_t,$r))}}!isFinite(Vt)||!isFinite(_t)?ea=ua:(Vt-=c,_t-=f,Vt/=ar,_t/=tr,Vt/=$V/2,_t/=$V,ea=Math.min(Math.floor(Vt),Math.floor(_t),ua))}if(ea<=0||!isFinite(ea))return;var zi=function(cn){return cn.x},Ji=function(cn){return cn.y-ea*(cn.l*$V/2-1)},en=Z_e(s).data(nr);en.enter().append(\"g\").classed(X_e,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(cn){var yn=U_e.select(this),Mn=kn.color;(!Mn||Mn===\"auto\")&&(Mn=txt.contrast(cn.z===void 0?e._fullLayout.plot_bgcolor:\"rgba(\"+me(cn.z).join()+\")\")),yn.attr(\"data-notex\",1).call(V_e.positionText,zi(cn),Ji(cn)).call($_t.font,{family:kn.family,size:ea,color:Mn,weight:kn.weight,style:kn.style,variant:kn.variant,textcase:kn.textcase,lineposition:kn.lineposition,shadow:kn.shadow}).text(cn.t).call(V_e.convertToTspans,e)})}})};function H_e(e,t){var r=t.length-2,n=H0.constrain(H0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=H0.constrain(n+(e-i)/(a-i)-.5,0,r),s=Math.round(o),l=Math.abs(o-s);return!o||o===r||!l?{bin0:s,bin1:s,frac:0}:{bin0:s,frac:l,bin1:Math.round(s+l/(o-s))}}function j_e(e,t){var r=t.length-1,n=H0.constrain(H0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=(e-i)/(a-i)||0;return o<=0?{bin0:n,bin1:n,frac:0}:o<.5?{bin0:n,bin1:n+1,frac:o}:{bin0:n+1,bin1:n,frac:1-o}}function W_e(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(r[3]*255)}});var S_=ye((Blr,K_e)=>{\"use strict\";K_e.exports={min:\"zmin\",max:\"zmax\"}});var f8=ye((Nlr,J_e)=>{\"use strict\";var lxt=Oa();J_e.exports=function(t){lxt.select(t).selectAll(\".hm image\").style(\"opacity\",function(r){return r.trace.opacity})}});var d8=ye((Ulr,Q_e)=>{\"use strict\";var $_e=vf(),T4=Dr(),h8=T4.isArrayOrTypedArray,uxt=ho(),cxt=tc().extractOpts;Q_e.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,x=s.yCenter,b=s.zmask,p=l.zhoverformat,C=f,E=h,A,L,_,k;if(t.index!==!1){try{_=Math.round(t.index[1]),k=Math.round(t.index[0])}catch(re){T4.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index);return}if(_<0||_>=d[0].length||k<0||k>d.length)return}else{if($_e.inbox(r-f[0],r-f[f.length-1],0)>0||$_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(C=[2*f[0]-f[1]],M=1;M<f.length;M++)C.push((f[M]+f[M-1])/2);for(C.push([2*f[f.length-1]-f[f.length-2]]),E=[2*h[0]-h[1]],M=1;M<h.length;M++)E.push((h[M]+h[M-1])/2);E.push([2*h[h.length-1]-h[h.length-2]])}_=Math.max(0,Math.min(C.length-2,T4.findBin(r,C))),k=Math.max(0,Math.min(E.length-2,T4.findBin(n,E)))}var g=u.c2p(f[_]),P=u.c2p(f[_+1]),T=c.c2p(h[k]),z=c.c2p(h[k+1]),O,V;o?(O=s.orig_x||f,V=s.orig_y||h,P=g,A=O[_],z=T,L=V[k]):(O=s.orig_x||v||f,V=s.orig_y||x||h,A=v?O[_]:(O[_]+O[_+1])/2,L=x?V[k]:(V[k]+V[k+1])/2,u&&u.type===\"category\"&&(A=f[_]),c&&c.type===\"category\"&&(L=h[k]),l.zsmooth&&(g=P=u.c2p(A),T=z=c.c2p(L)));var G=d[k][_];if(b&&!b[k][_]&&(G=void 0),!(G===void 0&&!l.hoverongaps)){var Z;h8(s.hovertext)&&h8(s.hovertext[k])?Z=s.hovertext[k][_]:h8(s.text)&&h8(s.text[k])&&(Z=s.text[k][_]);var H=cxt(l),N={type:\"linear\",range:[H.min,H.max],hoverformat:p,_separators:u._separators,_numFormat:u._numFormat},j=uxt.tickText(N,G,\"hover\").text;return[T4.extendFlat(t,{index:l._after2before?l._after2before[k][_]:[k,_],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:g,x1:P,y0:T,y1:z,xLabelVal:A,yLabelVal:L,zLabelVal:G,zLabel:j,text:Z})]}}});var txe=ye((Vlr,exe)=>{\"use strict\";exe.exports={attributes:ET(),supplyDefaults:Q1e(),calc:s8(),plot:c8(),colorbar:S_(),style:f8(),hoverPoints:d8(),moduleType:\"trace\",name:\"heatmap\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"showLegend\"],meta:{}}});var ixe=ye((Glr,rxe)=>{\"use strict\";rxe.exports=txe()});var QV=ye((Hlr,nxe)=>{\"use strict\";nxe.exports=function(t,r){return{start:{valType:\"any\",editType:\"calc\"},end:{valType:\"any\",editType:\"calc\"},size:{valType:\"any\",editType:\"calc\"},editType:\"calc\"}}});var oxe=ye((jlr,axe)=>{\"use strict\";axe.exports={eventDataKeys:[\"binNumber\"]}});var v8=ye((Wlr,uxe)=>{\"use strict\";var Pp=Lm(),sxe=df().axisHoverFormat,fxt=Qo().hovertemplateAttrs,hxt=Qo().texttemplateAttrs,eG=ec(),lxe=QV(),dxt=oxe(),tG=Ao().extendFlat;uxe.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},xhoverformat:sxe(\"x\"),yhoverformat:sxe(\"y\"),text:tG({},Pp.text,{}),hovertext:tG({},Pp.hovertext,{}),orientation:Pp.orientation,histfunc:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"min\",\"max\"],dflt:\"count\",editType:\"calc\"},histnorm:{valType:\"enumerated\",values:[\"\",\"percent\",\"probability\",\"density\",\"probability density\"],dflt:\"\",editType:\"calc\"},cumulative:{enabled:{valType:\"boolean\",dflt:!1,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"increasing\",\"decreasing\"],dflt:\"increasing\",editType:\"calc\"},currentbin:{valType:\"enumerated\",values:[\"include\",\"exclude\",\"half\"],dflt:\"include\",editType:\"calc\"},editType:\"calc\"},nbinsx:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},xbins:lxe(\"x\",!0),nbinsy:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},ybins:lxe(\"y\",!0),autobinx:{valType:\"boolean\",dflt:null,editType:\"calc\"},autobiny:{valType:\"boolean\",dflt:null,editType:\"calc\"},bingroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:fxt({},{keys:dxt.eventDataKeys}),texttemplate:hxt({arrayOk:!1,editType:\"plot\"},{keys:[\"label\",\"value\"]}),textposition:tG({},Pp.textposition,{arrayOk:!1}),textfont:eG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),outsidetextfont:eG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextfont:eG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextanchor:Pp.insidetextanchor,textangle:Pp.textangle,cliponaxis:Pp.cliponaxis,constraintext:Pp.constraintext,marker:Pp.marker,offsetgroup:Pp.offsetgroup,alignmentgroup:Pp.alignmentgroup,selected:Pp.selected,unselected:Pp.unselected,zorder:Pp.zorder}});var dxe=ye((Xlr,hxe)=>{\"use strict\";var cxe=qa(),A4=Dr(),fxe=Ca(),vxt=r0().handleText,pxt=BI(),gxt=v8();hxe.exports=function(t,r,n,i){function a(C,E){return A4.coerce(t,r,gxt,C,E)}var o=a(\"x\"),s=a(\"y\"),l=a(\"cumulative.enabled\");l&&(a(\"cumulative.direction\"),a(\"cumulative.currentbin\")),a(\"text\");var u=a(\"textposition\");vxt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a(\"hovertext\"),a(\"hovertemplate\"),a(\"xhoverformat\"),a(\"yhoverformat\");var c=a(\"orientation\",s&&!o?\"h\":\"v\"),f=c===\"v\"?\"x\":\"y\",h=c===\"v\"?\"y\":\"x\",d=o&&s?Math.min(A4.minRowLength(o)&&A4.minRowLength(s)):A4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=cxe.getComponentMethod(\"calendars\",\"handleTraceDefaults\");v(t,r,[\"x\",\"y\"],i);var x=r[h];x&&a(\"histfunc\"),a(\"histnorm\"),a(\"autobin\"+f),pxt(t,r,a,n,i),A4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=cxe.getComponentMethod(\"errorbars\",\"supplyDefaults\");p(t,r,b||fxe.defaultLine,{axis:\"y\"}),p(t,r,b||fxe.defaultLine,{axis:\"x\",inherit:\"y\"}),a(\"zorder\")}});var g8=ye((Zlr,gxe)=>{\"use strict\";var S4=Dr(),mxt=hf(),p8=qa().traceIs,yxt=Gb(),_xt=r0().validateCornerradius,vxe=S4.nestedProperty,rG=Bb().getAxisGroup,pxe=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],xxt=[\"x\",\"y\"];gxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return S4.coerce(s._input,s,s._module.attributes,G,Z)}function x(G){return G.orientation===\"v\"?\"x\":\"y\"}function b(G,Z){var H=mxt.getFromTrace({_fullLayout:r},G,Z);return H.type}function p(G,Z,H){var N=G.uid+\"__\"+H;Z||(Z=N);var j=b(G,H),re=G[H+\"calendar\"]||\"\",oe=n[Z],_e=!0;oe&&(j===oe.axType&&re===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(H)):(Z=N,j!==oe.axType&&S4.warn([\"Attempted to group the bins of trace\",G.index,\"set on a\",\"type:\"+j,\"axis\",\"with bins on\",\"type:\"+oe.axType,\"axis.\"].join(\" \")),re!==oe.calendar&&S4.warn([\"Attempted to group the bins of trace\",G.index,\"set with a\",re,\"calendar\",\"with bins\",oe.calendar?\"on a \"+oe.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),_e&&(n[Z]={traces:[G],dirs:[H],axType:j,calendar:G[H+\"calendar\"]||\"\"}),G[\"_\"+H+\"bingroup\"]=Z}for(f=0;f<t.length;f++)if(s=t[f],p8(s,\"histogram\")){if(i.push(s),delete s._xautoBinFinished,delete s._yautoBinFinished,s.type===\"histogram\"){var C=v(\"marker.cornerradius\",r.barcornerradius);s.marker&&(s.marker.cornerradius=_xt(C))}p8(s,\"2dMap\")||yxt(s._input,s,r,v,r.barmode)}var E=r._alignmentOpts||{};for(f=0;f<i.length;f++){if(s=i[f],u=\"\",!p8(s,\"2dMap\")){if(c=x(s),r.barmode===\"group\"&&s.alignmentgroup){var A=s[c+\"axis\"],L=rG(r,A)+s.orientation;(E[L]||{})[s.alignmentgroup]&&(u=L)}!u&&r.barmode!==\"overlay\"&&(u=rG(r,s.xaxis)+rG(r,s.yaxis)+x(s))}u?(a[u]||(a[u]=[]),a[u].push(s)):o.push(s)}for(u in a){if(l=a[u],l.length===1){o.push(l[0]);continue}var _=!1;for(l.length&&(s=l[0],_=v(\"bingroup\")),u=_||u,f=0;f<l.length;f++){s=l[f];var k=s._input.bingroup;k&&k!==u&&S4.warn([\"Trace\",s.index,\"must match\",\"within bingroup\",u+\".\",\"Ignoring its bingroup:\",k,\"setting.\"].join(\" \")),s.bingroup=u,p(s,u,x(s))}}for(f=0;f<o.length;f++){s=o[f];var M=v(\"bingroup\");if(p8(s,\"2dMap\"))for(d=0;d<2;d++){c=xxt[d];var g=v(c+\"bingroup\",M?M+\"__\"+c:null);p(s,g,c)}else p(s,M,x(s))}for(u in n){var P=n[u];for(l=P.traces,h=0;h<pxe.length;h++){var T=pxe[h],z=T.name,O,V;if(!(z===\"nbins\"&&P.sizeFound)){for(f=0;f<l.length;f++){if(s=l[f],c=P.dirs[f],O=T.aStr[c],vxe(s._input,O).get()!==void 0){P[z]=v(O),P[z+\"Found\"]=!0;break}V=(s._autoBin||{})[c]||{},V[z]&&vxe(s,O).set(V[z])}if(z===\"start\"||z===\"end\")for(;f<l.length;f++)s=l[f],s[\"_\"+c+\"bingroup\"]&&(V=(s._autoBin||{})[c]||{},v(O,V[z]));z===\"nbins\"&&!P.sizeFound&&!P.nbinsFound&&(s=l[0],P[z]=v(O))}}}}});var yxe=ye((Ylr,mxe)=>{\"use strict\";var bxt=TT().hoverPoints,wxt=ho().hoverLabelText;mxe.exports=function(t,r,n,i,a){var o=bxt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation===\"h\"?\"y\":\"x\";t[u+\"Label\"]=wxt(t[u+\"a\"],[s.ph0,s.ph1],l[u+\"hoverformat\"])}return o}}});var iG=ye((Klr,_xe)=>{\"use strict\";_xe.exports=function(t,r,n,i,a){if(t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"zLabelVal\"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l<o.length;l++)s=s.concat(n._indexToPoints[o[l]])}else s=o;t.pointIndices=s}return t}});var bxe=ye((Jlr,xxe)=>{\"use strict\";xxe.exports={attributes:v8(),layoutAttributes:qI(),supplyDefaults:dxe(),crossTraceDefaults:g8(),supplyLayoutDefaults:TV(),calc:WV().calc,crossTraceCalc:Hb().crossTraceCalc,plot:i2().plot,layerName:\"barlayer\",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:$d(),hoverPoints:yxe(),selectPoints:AT(),eventData:iG(),moduleType:\"trace\",name:\"histogram\",basePlotModule:vh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"histogram\",\"oriented\",\"errorBarsOK\",\"showLegend\"],meta:{}}});var Txe=ye(($lr,wxe)=>{\"use strict\";wxe.exports=bxe()});var y8=ye((Qlr,Sxe)=>{\"use strict\";var Vg=v8(),Axe=QV(),m8=ET(),Txt=Gl(),nG=df().axisHoverFormat,Axt=Qo().hovertemplateAttrs,Sxt=Qo().texttemplateAttrs,Mxt=Tu(),M4=Ao().extendFlat;Sxe.exports=M4({x:Vg.x,y:Vg.y,z:{valType:\"data_array\",editType:\"calc\"},marker:{color:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},histnorm:Vg.histnorm,histfunc:Vg.histfunc,nbinsx:Vg.nbinsx,xbins:Axe(\"x\"),nbinsy:Vg.nbinsy,ybins:Axe(\"y\"),autobinx:Vg.autobinx,autobiny:Vg.autobiny,bingroup:M4({},Vg.bingroup,{}),xbingroup:M4({},Vg.bingroup,{}),ybingroup:M4({},Vg.bingroup,{}),xgap:m8.xgap,ygap:m8.ygap,zsmooth:m8.zsmooth,xhoverformat:nG(\"x\"),yhoverformat:nG(\"y\"),zhoverformat:nG(\"z\",1),hovertemplate:Axt({},{keys:\"z\"}),texttemplate:Sxt({arrayOk:!1,editType:\"plot\"},{keys:\"z\"}),textfont:m8.textfont,showlegend:M4({},Txt.showlegend,{dflt:!1})},Mxt(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var aG=ye((eur,Exe)=>{\"use strict\";var Ext=qa(),Mxe=Dr();Exe.exports=function(t,r,n,i){var a=n(\"x\"),o=n(\"y\"),s=Mxe.minRowLength(a),l=Mxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=Ext.getComponentMethod(\"calendars\",\"handleTraceDefaults\");u(t,r,[\"x\",\"y\"],i);var c=n(\"z\")||n(\"marker.color\");c&&n(\"histfunc\"),n(\"histnorm\"),n(\"autobinx\"),n(\"autobiny\")}});var kxe=ye((tur,Cxe)=>{\"use strict\";var Cxt=Dr(),kxt=aG(),Lxt=BV(),Pxt=Jh(),Ixt=w4(),Rxt=y8();Cxe.exports=function(t,r,n,i){function a(o,s){return Cxt.coerce(t,r,Rxt,o,s)}kxt(t,r,a,i),r.visible!==!1&&(Lxt(t,r,a,i),Pxt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),a(\"hovertemplate\"),Ixt(a,i),a(\"xhoverformat\"),a(\"yhoverformat\"))}});var Ixe=ye((rur,Pxe)=>{\"use strict\";var Dxt=d8(),Lxe=ho().hoverLabelText;Pxe.exports=function(t,r,n,i,a){var o=Dxt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Lxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Lxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var Dxe=ye((iur,Rxe)=>{\"use strict\";Rxe.exports={attributes:y8(),supplyDefaults:kxe(),crossTraceDefaults:g8(),calc:s8(),plot:c8(),layerName:\"heatmaplayer\",colorbar:S_(),style:f8(),hoverPoints:Ixe(),eventData:iG(),moduleType:\"trace\",name:\"histogram2d\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"histogram\",\"showLegend\"],meta:{}}});var zxe=ye((nur,Fxe)=>{\"use strict\";Fxe.exports=Dxe()});var _8=ye((aur,Oxe)=>{\"use strict\";Oxe.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}});var E4=ye((our,Uxe)=>{\"use strict\";var ed=ET(),x8=pf(),Bxe=df(),oG=Bxe.axisHoverFormat,Fxt=Bxe.descriptionOnlyNumbers,zxt=Tu(),Oxt=Pd().dash,qxt=ec(),IT=Ao().extendFlat,Nxe=_8(),Bxt=Nxe.COMPARISON_OPS2,Nxt=Nxe.INTERVAL_OPS,qxe=x8.line;Uxe.exports=IT({z:ed.z,x:ed.x,x0:ed.x0,dx:ed.dx,y:ed.y,y0:ed.y0,dy:ed.dy,xperiod:ed.xperiod,yperiod:ed.yperiod,xperiod0:x8.xperiod0,yperiod0:x8.yperiod0,xperiodalignment:ed.xperiodalignment,yperiodalignment:ed.yperiodalignment,text:ed.text,hovertext:ed.hovertext,transpose:ed.transpose,xtype:ed.xtype,ytype:ed.ytype,xhoverformat:oG(\"x\"),yhoverformat:oG(\"y\"),zhoverformat:oG(\"z\",1),hovertemplate:ed.hovertemplate,texttemplate:IT({},ed.texttemplate,{}),textfont:IT({},ed.textfont,{}),hoverongaps:ed.hoverongaps,connectgaps:IT({},ed.connectgaps,{}),fillcolor:{valType:\"color\",editType:\"calc\"},autocontour:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"contours.start\":void 0,\"contours.end\":void 0,\"contours.size\":void 0}},ncontours:{valType:\"integer\",dflt:15,min:1,editType:\"calc\"},contours:{type:{valType:\"enumerated\",values:[\"levels\",\"constraint\"],dflt:\"levels\",editType:\"calc\"},start:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},end:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},coloring:{valType:\"enumerated\",values:[\"fill\",\"heatmap\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:{valType:\"boolean\",dflt:!0,editType:\"plot\"},showlabels:{valType:\"boolean\",dflt:!1,editType:\"plot\"},labelfont:qxt({editType:\"plot\",colorEditType:\"style\"}),labelformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:Fxt(\"contour label\")},operation:{valType:\"enumerated\",values:[].concat(Bxt).concat(Nxt),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:IT({},qxe.color,{editType:\"style+colorbars\"}),width:{valType:\"number\",min:0,editType:\"style+colorbars\"},dash:Oxt,smoothing:IT({},qxe.smoothing,{}),editType:\"plot\"},zorder:x8.zorder},zxt(\"\",{cLetter:\"z\",autoColorDflt:!1,editTypeOverride:\"calc\"}))});var lG=ye((sur,Gxe)=>{\"use strict\";var Gv=y8(),Oy=E4(),Uxt=Tu(),sG=df().axisHoverFormat,Vxe=Ao().extendFlat;Gxe.exports=Vxe({x:Gv.x,y:Gv.y,z:Gv.z,marker:Gv.marker,histnorm:Gv.histnorm,histfunc:Gv.histfunc,nbinsx:Gv.nbinsx,xbins:Gv.xbins,nbinsy:Gv.nbinsy,ybins:Gv.ybins,autobinx:Gv.autobinx,autobiny:Gv.autobiny,bingroup:Gv.bingroup,xbingroup:Gv.xbingroup,ybingroup:Gv.ybingroup,autocontour:Oy.autocontour,ncontours:Oy.ncontours,contours:Oy.contours,line:{color:Oy.line.color,width:Vxe({},Oy.line.width,{dflt:.5}),dash:Oy.line.dash,smoothing:Oy.line.smoothing,editType:\"plot\"},xhoverformat:sG(\"x\"),yhoverformat:sG(\"y\"),zhoverformat:sG(\"z\",1),hovertemplate:Gv.hovertemplate,texttemplate:Oy.texttemplate,textfont:Oy.textfont},Uxt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var b8=ye((lur,Hxe)=>{\"use strict\";Hxe.exports=function(t,r,n,i){var a=i(\"contours.start\"),o=i(\"contours.end\"),s=a===!1||o===!1,l=n(\"contours.size\"),u;s?u=r.autocontour=!0:u=n(\"autocontour\",!1),(u||!l)&&n(\"ncontours\")}});var uG=ye((uur,jxe)=>{\"use strict\";var Vxt=Dr();jxe.exports=function(t,r,n,i){i||(i={});var a=t(\"contours.showlabels\");if(a){var o=r.font;Vxt.coerceFont(t,\"contours.labelfont\",o,{overrideDflt:{color:n}}),t(\"contours.labelformat\")}i.hasHover!==!1&&t(\"zhoverformat\")}});var w8=ye((cur,Wxe)=>{\"use strict\";var Gxt=Jh(),Hxt=uG();Wxe.exports=function(t,r,n,i,a){var o=n(\"contours.coloring\"),s,l=\"\";o===\"fill\"&&(s=n(\"contours.showlines\")),s!==!1&&(o!==\"lines\"&&(l=n(\"line.color\",\"#000\")),n(\"line.width\",.5),n(\"line.dash\")),o!==\"none\"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Gxt(t,r,i,n,{prefix:\"\",cLetter:\"z\"})),n(\"line.smoothing\"),Hxt(n,i,l,a)}});var Kxe=ye((fur,Yxe)=>{\"use strict\";var Xxe=Dr(),jxt=aG(),Wxt=b8(),Xxt=w8(),Zxt=w4(),Zxe=lG();Yxe.exports=function(t,r,n,i){function a(s,l){return Xxe.coerce(t,r,Zxe,s,l)}function o(s){return Xxe.coerce2(t,r,Zxe,s)}jxt(t,r,a,i),r.visible!==!1&&(Wxt(t,r,a,o),Xxt(t,r,a,i),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"hovertemplate\"),r.contours&&r.contours.coloring===\"heatmap\"&&Zxt(a,i))}});var hG=ye((hur,$xe)=>{\"use strict\";var fG=ho(),cG=Dr();$xe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=cG.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=cG.aggNums(Math.max,null,r));var o=Jxe(i,a,t.ncontours);n.size=o.dtick,n.start=fG.tickFirst(o),o.range.reverse(),n.end=fG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),cG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!==\"constraint\"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=Jxe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function Jxe(e,t,r){var n={type:\"linear\",range:[e,t]};return fG.autoTicks(n,(t-e)/(r||15)),n}});var C4=ye((dur,Qxe)=>{\"use strict\";Qxe.exports=function(t){return t.end+t.size/1e6}});var dG=ye((vur,tbe)=>{\"use strict\";var ebe=tc(),Yxt=s8(),Kxt=hG(),Jxt=C4();tbe.exports=function(t,r){var n=Yxt(t,r),i=n[0].z;Kxt(r,i);var a=r.contours,o=ebe.extractOpts(r),s;if(a.coloring===\"heatmap\"&&o.auto&&r.autocontour===!1){var l=a.start,u=Jxt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return ebe.calc(t,r,{vals:s,cLetter:\"z\"}),n}});var k4=ye((pur,rbe)=>{\"use strict\";rbe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var vG=ye((gur,ibe)=>{\"use strict\";var T8=k4();ibe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;s<n-1;s++)for(u=[],s===0&&(u=u.concat(T8.BOTTOMSTART)),s===n-2&&(u=u.concat(T8.TOPSTART)),o=0;o<i-1;o++)for(l=u.slice(),o===0&&(l=l.concat(T8.LEFTSTART)),o===i-2&&(l=l.concat(T8.RIGHTSTART)),c=o+\",\"+s,f=[[r[s][o],r[s][o+1]],[r[s+1][o],r[s+1][o+1]]],v=0;v<t.length;v++)d=t[v],h=$xt(d.level,f),h&&(d.crossings[c]=h,l.indexOf(h)!==-1&&(d.starts.push([o,s]),a&&l.indexOf(h,l.indexOf(h)+1)!==-1&&d.starts.push([o,s])))};function $xt(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var pG=ye((mur,obe)=>{\"use strict\";var A8=Dr(),RT=k4();obe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o<t.length;o++){for(s=t[o],l=0;l<s.starts.length;l++)a=s.starts[l],nbe(s,a,\"edge\",r,n);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,a=Object.keys(s.crossings)[0].split(\",\").map(Number),nbe(s,a,void 0,r,n);i===1e4&&A8.log(\"Infinite loop in contour?\")}};function L4(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function Qxt(e,t){var r=e[2]-t[2],n=e[3]-t[3];return Math.sqrt(r*r+n*n)}function nbe(e,t,r,n,i){var a=t.join(\",\"),o=e.crossings[a],s=ebt(o,r,t),l=[abe(e,t,[-s[0],-s[1]])],u=e.z.length,c=e.z[0].length,f=t.slice(),h=s.slice(),d;for(d=0;d<1e4;d++){if(o>20?(o=RT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=RT.SADDLEREMAINDER[o]):delete e.crossings[a],s=RT.NEWDELTA[o],!s){A8.log(\"Found bad marching index:\",o,t,e.level);break}l.push(abe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(\",\"),L4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&v)break;o=e.crossings[a]}d===1e4&&A8.log(\"Infinite loop in contour?\");var b=L4(l[0],l[l.length-1],n,i),p=0,C=.2*e.smoothing,E=[],A=0,L,_,k,M,g,P,T,z,O,V,G;for(d=1;d<l.length;d++)T=Qxt(l[d],l[d-1]),p+=T,E.push(T);var Z=p/E.length*C;function H(re){return l[re%l.length]}for(d=l.length-2;d>=A;d--)if(L=E[d],L<Z){for(k=0,_=d-1;_>=A&&L+E[_]<Z;_--)L+=E[_];if(b&&d===l.length-2)for(k=0;k<_&&L+E[k]<Z;k++)L+=E[k];g=d-_+k+1,P=Math.floor((d+_+k+2)/2),!b&&d===l.length-2?M=l[l.length-1]:!b&&_===-1?M=l[0]:g%2?M=H(P):M=[(H(P)[0]+H(P+1)[0])/2,(H(P)[1]+H(P+1)[1])/2],l.splice(_+1,d-_+1,M),d=_+1,k&&(A=k),b&&(d===l.length-2?l[k]=l[l.length-1]:d===0&&(l[l.length-1]=l[0]))}for(l.splice(0,A),d=0;d<l.length;d++)l[d].length=2;if(!(l.length<2))if(b)l.pop(),e.paths.push(l);else{r||A8.log(\"Unclosed interior contour?\",e.level,f.join(\",\"),l.join(\"L\"));var N=!1;for(z=0;z<e.edgepaths.length;z++)if(V=e.edgepaths[z],!N&&L4(V[0],l[l.length-1],n,i)){l.pop(),N=!0;var j=!1;for(O=0;O<e.edgepaths.length;O++)if(G=e.edgepaths[O],L4(G[G.length-1],l[0],n,i)){j=!0,l.shift(),e.edgepaths.splice(z,1),O===z?e.paths.push(l.concat(G)):(O>z&&O--,e.edgepaths[O]=G.concat(l,V));break}j||(e.edgepaths[z]=l.concat(V))}for(z=0;z<e.edgepaths.length&&!N;z++)V=e.edgepaths[z],L4(V[V.length-1],l[0],n,i)&&(l.shift(),e.edgepaths[z]=V.concat(l),N=!0);N||e.edgepaths.push(l)}}function ebt(e,t,r){var n=0,i=0;return e>20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:RT.BOTTOMSTART.indexOf(e)!==-1?i=1:RT.LEFTSTART.indexOf(e)!==-1?n=1:RT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function abe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var cbe=ye((yur,ube)=>{\"use strict\";var gG=_8(),tbt=Eo();ube.exports={\"[]\":sbe(\"[]\"),\"][\":sbe(\"][\"),\">\":mG(\">\"),\"<\":mG(\"<\"),\"=\":mG(\"=\")};function lbe(e,t){var r=Array.isArray(t),n;function i(a){return tbt(a)?+a:null}return gG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):gG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:gG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function sbe(e){return function(t){t=lbe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function mG(e){return function(t){return t=lbe(e,t),{start:t,end:1/0,size:1/0}}}});var yG=ye((_ur,hbe)=>{\"use strict\";var fbe=Dr(),rbt=cbe(),ibt=C4();hbe.exports=function(t,r,n){for(var i=t.type===\"constraint\"?rbt[t._operation](t.value):t,a=i.size,o=[],s=ibt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c<s;c+=a)if(o.push(fbe.extendFlat({level:c,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},u)),o.length>1e3){fbe.warn(\"Too many contours, clipping at 1000\",t);break}return o}});var _G=ye((xur,vbe)=>{\"use strict\";var DT=Dr();vbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case\"=\":case\"<\":return e;case\">\":for(e.length!==1&&DT.warn(\"Contour data invalid for the specified inequality operation.\"),n=e[0],r=0;r<n.edgepaths.length;r++)n.edgepaths[r]=a(n.edgepaths[r]);for(r=0;r<n.paths.length;r++)n.paths[r]=a(n.paths[r]);for(r=0;r<n.starts.length;r++)n.starts[r]=a(n.starts[r]);return e;case\"][\":var s=a;a=o,o=s;case\"[]\":for(e.length!==2&&DT.warn(\"Contour data invalid for the specified inequality range operation.\"),n=dbe(e[0]),i=dbe(e[1]),r=0;r<n.edgepaths.length;r++)n.edgepaths[r]=a(n.edgepaths[r]);for(r=0;r<n.paths.length;r++)n.paths[r]=a(n.paths[r]);for(r=0;r<n.starts.length;r++)n.starts[r]=a(n.starts[r]);for(;i.edgepaths.length;)n.edgepaths.push(o(i.edgepaths.shift()));for(;i.paths.length;)n.paths.push(o(i.paths.shift()));for(;i.starts.length;)n.starts.push(o(i.starts.shift()));return[n]}};function dbe(e){return DT.extendFlat({},e,{edgepaths:DT.extendDeep([],e.edgepaths),paths:DT.extendDeep([],e.paths),starts:DT.extendDeep([],e.starts)})}});var xG=ye((bur,pbe)=>{\"use strict\";pbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case\"levels\":var a=Math.min(n[0][0],n[0][1]);for(i=0;i<e.length;i++){var o=e[i];o.prefixBoundary=!o.edgepaths.length&&(a>o.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i<l;i++)c=Math.min(c,n[i][0]),c=Math.min(c,n[i][s-1]),u=Math.max(u,n[i][0]),u=Math.max(u,n[i][s-1]);for(i=1;i<s-1;i++)c=Math.min(c,n[0][i]),c=Math.min(c,n[l-1][i]),u=Math.max(u,n[0][i]),u=Math.max(u,n[l-1][i]);var f=t.value,h,d;switch(t._operation){case\">\":f>u&&(r.prefixBoundary=!0);break;case\"<\":(f<c||r.starts.length&&f===c)&&(r.prefixBoundary=!0);break;case\"[]\":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),(d<c||h>u||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case\"][\":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),h<c&&d>u&&(r.prefixBoundary=!0);break}break}}});var S8=ye(Hv=>{\"use strict\";var I4=Oa(),zd=Dr(),qy=So(),nbt=tc(),ybe=ru(),gbe=ho(),mbe=ym(),abt=c8(),_be=vG(),xbe=pG(),obt=yG(),sbt=_G(),bbe=xG(),P4=k4(),Rm=P4.LABELOPTIMIZER;Hv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;zd.makeTraceGroups(i,n,\"contour\").each(function(s){var l=I4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=obt(d,r,u),x=zd.ensureSingle(l,\"g\",\"heatmapcoloring\"),b=[];d.coloring===\"heatmap\"&&(b=[s]),abt(t,r,b,x),_be(v),xbe(v);var p=a.c2p(f[0],!0),C=a.c2p(f[f.length-1],!0),E=o.c2p(h[0],!0),A=o.c2p(h[h.length-1],!0),L=[[p,A],[C,A],[C,E],[p,E]],_=v;d.type===\"constraint\"&&(_=sbt(v,d._operation)),lbt(l,L,d),ubt(l,_,L,d),cbt(l,v,t,u,d),hbt(l,r,t,u,L)})};function lbt(e,t,r){var n=zd.ensureSingle(e,\"g\",\"contourbg\"),i=n.selectAll(\"path\").data(r.coloring===\"fill\"?[0]:[]);i.enter().append(\"path\"),i.exit().remove(),i.attr(\"d\",\"M\"+t.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}function ubt(e,t,r,n){var i=n.coloring===\"fill\"||n.type===\"constraint\"&&n._operation!==\"=\",a=\"M\"+r.join(\"L\")+\"Z\";i&&bbe(t,n);var o=zd.ensureSingle(e,\"g\",\"contourfill\"),s=o.selectAll(\"path\").data(i?t:[]);s.enter().append(\"path\"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:\"\")+wbe(l,r);u?I4.select(this).attr(\"d\",u).style(\"stroke\",\"none\"):I4.select(this).remove()})}function wbe(e,t){var r=\"\",n=0,i=e.edgepaths.map(function(p,C){return C}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function x(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=qy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,\"L\"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){zd.log(\"Missing end?\",n,e);break}for(h(o)&&!x(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:x(o)&&(s=t[2]),c=0;c<e.edgepaths.length;c++){var b=e.edgepaths[c][0];Math.abs(o[0]-s[0])<.01?Math.abs(o[0]-b[0])<.01&&(b[1]-o[1])*(s[1]-b[1])>=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):zd.log(\"endpt to newendpt is not vert. or horz.\",o,s,b)}if(o=s,u>=0)break;r+=\"L\"+s}if(u===e.edgepaths.length){zd.log(\"unclosed perimeter path\");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+=\"Z\")}for(n=0;n<e.paths.length;n++)r+=qy.smoothclosed(e.paths[n],e.smoothing);return r}function cbt(e,t,r,n,i){var a=r._context.staticPlot,o=zd.ensureSingle(e,\"g\",\"contourlines\"),s=i.showlines!==!1,l=i.showlabels,u=s&&l,c=Hv.createLines(o,s||l,t,a),f=Hv.createLineClip(o,u,r,n.trace.uid),h=e.selectAll(\"g.contourlabels\").data(l?[0]:[]);if(h.exit().remove(),h.enter().append(\"g\").classed(\"contourlabels\",!0),l){var d=[],v=[];zd.clearLocationCache();var x=Hv.labelFormatter(r,n),b=qy.tester.append(\"text\").attr(\"data-notex\",1).call(qy.font,i.labelfont),p=t[0].xaxis,C=t[0].yaxis,E=p._length,A=C._length,L=p.range,_=C.range,k=zd.aggNums(Math.min,null,n.x),M=zd.aggNums(Math.max,null,n.x),g=zd.aggNums(Math.min,null,n.y),P=zd.aggNums(Math.max,null,n.y),T=Math.max(p.c2p(k,!0),0),z=Math.min(p.c2p(M,!0),E),O=Math.max(C.c2p(P,!0),0),V=Math.min(C.c2p(g,!0),A),G={};L[0]<L[1]?(G.left=T,G.right=z):(G.left=z,G.right=T),_[0]<_[1]?(G.top=O,G.bottom=V):(G.top=V,G.bottom=O),G.middle=(G.top+G.bottom)/2,G.center=(G.left+G.right)/2,d.push([[G.left,G.top],[G.right,G.top],[G.right,G.bottom],[G.left,G.bottom]]);var Z=Math.sqrt(E*E+A*A),H=P4.LABELDISTANCE*Z/Math.max(1,t.length/P4.LABELINCREASE);c.each(function(N){var j=Hv.calcTextOpts(N.level,x,b,r);I4.select(this).selectAll(\"path\").each(function(){var re=this,oe=zd.getVisibleSegment(re,G,j.height/2);if(oe&&!(oe.len<(j.width+j.height)*P4.LABELMIN))for(var _e=Math.min(Math.ceil(oe.len/H),P4.LABELMAX),Me=0;Me<_e;Me++){var ke=Hv.findBestTextLocation(re,oe,j,v,G);if(!ke)break;Hv.addLabelData(ke,j,v,d)}})}),b.remove(),Hv.drawLabels(h,v,r,f,u?d:null)}l&&!s&&c.remove()}Hv.createLines=function(e,t,r,n){var i=r[0].smoothing,a=e.selectAll(\"g.contourlevel\").data(t?r:[]);if(a.exit().remove(),a.enter().append(\"g\").classed(\"contourlevel\",!0),t){var o=a.selectAll(\"path.openline\").data(function(l){return l.pedgepaths||l.edgepaths});o.exit().remove(),o.enter().append(\"path\").classed(\"openline\",!0),o.attr(\"d\",function(l){return qy.smoothopen(l,i)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",n?\"none\":\"non-scaling-stroke\");var s=a.selectAll(\"path.closedline\").data(function(l){return l.ppaths||l.paths});s.exit().remove(),s.enter().append(\"path\").classed(\"closedline\",!0),s.attr(\"d\",function(l){return qy.smoothclosed(l,i)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",n?\"none\":\"non-scaling-stroke\")}return a};Hv.createLineClip=function(e,t,r,n){var i=r._fullLayout._clips,a=t?\"clipline\"+n:null,o=i.selectAll(\"#\"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append(\"clipPath\").classed(\"contourlineclip\",!0).attr(\"id\",a),qy.setClipUrl(e,a,r),o};Hv.labelFormatter=function(e,t){var r=e._fullLayout,n=t.trace,i=n.contours,a={type:\"linear\",_id:\"ycontour\",showexponent:\"all\",exponentformat:\"B\"};if(i.labelformat)a.tickformat=i.labelformat,mbe(a,r);else{var o=nbt.extractOpts(n);if(o&&o.colorbar&&o.colorbar._axis)a=o.colorbar._axis;else{if(i.type===\"constraint\"){var s=i.value;zd.isArrayOrTypedArray(s)?a.range=[s[0],s[s.length-1]]:a.range=[s,s]}else a.range=[i.start,i.end],a.nticks=(i.end-i.start)/i.size;a.range[0]===a.range[1]&&(a.range[1]+=a.range[0]||1),a.nticks||(a.nticks=1e3),mbe(a,r),gbe.prepTicks(a),a._tmin=null,a._tmax=null}}return function(l){return gbe.tickText(a,l).text}};Hv.calcTextOpts=function(e,t,r,n){var i=t(e);r.text(i).call(ybe.convertToTspans,n);var a=r.node(),o=qy.bBox(a,!0);return{text:i,width:o.width,height:o.height,fontSize:+a.style[\"font-size\"].replace(\"px\",\"\"),level:e,dy:(o.top+o.bottom)/2}};Hv.findBestTextLocation=function(e,t,r,n,i){var a=r.width,o,s,l,u,c;t.isClosed?(s=t.len/Rm.INITIALSEARCHPOINTS,o=t.min+s/2,l=t.max):(s=(t.len-a)/(Rm.INITIALSEARCHPOINTS+1),o=t.min+s+a/2,l=t.max-(s+a)/2);for(var f=1/0,h=0;h<Rm.ITERATIONS;h++){for(var d=o;d<l;d+=s){var v=zd.getTextLocation(e,t.total,d,a),x=fbt(v,r,n,i);x<f&&(f=x,c=v,u=d)}if(f>Rm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Rm.MAXCOST)return c};function fbt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Rm.EDGECOST*(1/(f-1)+1/(h-1));d+=Rm.ANGLECOST*l*l;for(var v=o-u,x=s-c,b=o+u,p=s+c,C=0;C<r.length;C++){var E=r[C],A=Math.cos(E.theta)*E.width/2,L=Math.sin(E.theta)*E.width/2,_=zd.segmentDistance(v,x,b,p,E.x-A,E.y-L,E.x+A,E.y+L)*2/(t.height+E.height),k=E.level===t.level,M=k?Rm.SAMELEVELDISTANCE:1;if(_<=M)return 1/0;var g=Rm.NEIGHBORCOST*(k?Rm.SAMELEVELFACTOR:1);d+=g/(_-M)}return d}Hv.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,u=e.theta,c=Math.sin(u),f=Math.cos(u),h=function(v,x){return[s+v*f-x*c,l+v*c+x*f]},d=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:u,level:t.level,width:a,height:o}),n.push(d)};Hv.drawLabels=function(e,t,r,n,i){var a=e.selectAll(\"text\").data(t,function(u){return u.text+\",\"+u.x+\",\"+u.y+\",\"+u.theta});if(a.exit().remove(),a.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each(function(u){var c=u.x+Math.sin(u.theta)*u.dy,f=u.y-Math.cos(u.theta)*u.dy;I4.select(this).text(u.text).attr({x:c,y:f,transform:\"rotate(\"+180*u.theta/Math.PI+\" \"+c+\" \"+f+\")\"}).call(ybe.convertToTspans,r)}),i){for(var o=\"\",s=0;s<i.length;s++)o+=\"M\"+i[s].join(\"L\")+\"Z\";var l=zd.ensureSingle(n,\"path\",\"\");l.attr(\"d\",o)}};function hbt(e,t,r,n,i){var a=n.trace,o=r._fullLayout._clips,s=\"clip\"+a.uid,l=o.selectAll(\"#\"+s).data(a.connectgaps?[]:[0]);if(l.enter().append(\"clipPath\").classed(\"contourclip\",!0).attr(\"id\",s),l.exit().remove(),a.connectgaps===!1){var u={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:dbt(n),smoothing:0};_be([u]),xbe([u]),bbe([u],{type:\"levels\"});var c=zd.ensureSingle(l,\"path\",\"\");c.attr(\"d\",(u.prefixBoundary?\"M\"+i.join(\"L\")+\"Z\":\"\")+wbe(u,i))}else s=null;qy.setClipUrl(e,s,r)}function dbt(e){var t=e.trace._emptypoints,r=[],n=e.z.length,i=e.z[0].length,a,o=[],s;for(a=0;a<i;a++)o.push(1);for(a=0;a<n;a++)r.push(o.slice());for(a=0;a<t.length;a++)s=t[a],r[s[0]][s[1]]=0;return e.zmask=r,r}});var wG=ye((Tur,Tbe)=>{\"use strict\";var vbt=Oa(),bG=tc(),pbt=C4();Tbe.exports=function(t){var r=t.contours,n=r.start,i=pbt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring===\"lines\"?0:1,l=bG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?bG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,x=l.min,b=l.max;if(r.coloring===\"heatmap\"){for(v=0;v<c;v++)d=u[v],f[v]=d[0]*(b-x)+x,h[v]=d[1];var p=vbt.extent([x,b,r.start,r.start+a*(o-1)]),C=p[x<b?0:1],E=p[x<b?1:0];C!==x&&(f.splice(0,0,C),h.splice(0,0,h[0])),E!==b&&(f.push(E),h.push(h[h.length-1]))}else{var A=t._input&&typeof t._input.zmin==\"number\"&&typeof t._input.zmax==\"number\";for(A&&(n<=x||i>=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;v<c;v++)d=u[v],f[v]=(d[0]*(o+s-1)-s/2)*a+n,h[v]=d[1];(A||t.autocontour)&&(f[0]>x&&(f.unshift(x),h.unshift(h[0])),f[f.length-1]<b&&(f.push(b),h.push(h[h.length-1])))}return bG.makeColorScaleFunc({domain:f,range:h},{noNumericCheck:!0})}});var E8=ye((Aur,Sbe)=>{\"use strict\";var M8=Oa(),Abe=So(),gbt=f8(),mbt=wG();Sbe.exports=function(t){var r=M8.select(t).selectAll(\"g.contour\");r.style(\"opacity\",function(n){return n[0].trace.opacity}),r.each(function(n){var i=M8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type===\"constraint\",f=!c&&o.coloring===\"lines\",h=!c&&o.coloring===\"fill\",d=f||h?mbt(a):null;i.selectAll(\"g.contourlevel\").each(function(b){M8.select(this).selectAll(\"path\").call(Abe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll(\"g.contourlabels text\").each(function(b){Abe.font(M8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll(\"g.contourfill path\").style(\"fill\",a.fillcolor);else if(h){var x;i.selectAll(\"g.contourfill path\").style(\"fill\",function(b){return x===void 0&&(x=b.level),d(b.level+.5*l)}),x===void 0&&(x=u),i.selectAll(\"g.contourbg path\").style(\"fill\",d(x-.5*l))}}),gbt(t)}});var C8=ye((Sur,Ebe)=>{\"use strict\";var Mbe=tc(),ybt=wG(),_bt=C4();function xbt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=ybt(t,{isColorbar:!0});if(o===\"heatmap\"){var l=Mbe.extractOpts(t);r._fillgradient=l.reversescale?Mbe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o===\"fill\"&&(r._fillcolor=s);r._line={color:o===\"lines\"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:_bt(n),size:a}}Ebe.exports={min:\"zmin\",max:\"zmax\",calc:xbt}});var TG=ye((Mur,Cbe)=>{\"use strict\";var k8=Ca(),bbt=d8();Cbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=bbt(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type===\"constraint\"&&(l.fillcolor&&k8.opacity(l.fillcolor)?s.color=k8.addOpacity(l.fillcolor,1):l.contours.showlines&&k8.opacity(l.line.color)&&(s.color=k8.addOpacity(l.line.color,1)))}),o}});var Lbe=ye((Eur,kbe)=>{\"use strict\";kbe.exports={attributes:lG(),supplyDefaults:Kxe(),crossTraceDefaults:g8(),calc:dG(),plot:S8().plot,layerName:\"contourlayer\",style:E8(),colorbar:C8(),hoverPoints:TG(),moduleType:\"trace\",name:\"histogram2dcontour\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"histogram\",\"showLegend\"],meta:{}}});var Ibe=ye((Cur,Pbe)=>{\"use strict\";Pbe.exports=Lbe()});var AG=ye((kur,qbe)=>{\"use strict\";var Rbe=Eo(),wbt=uG(),zbe=Ca(),Dbe=zbe.addOpacity,Tbt=zbe.opacity,Obe=_8(),Fbe=Dr().isArrayOrTypedArray,Abt=Obe.CONSTRAINT_REDUCTION,Sbt=Obe.COMPARISON_OPS2;qbe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n(\"contours.operation\");if(s._operation=Abt[f],Mbt(n,s),f===\"=\"?l=s.showlines=!0:(l=n(\"contours.showlines\"),c=n(\"fillcolor\",Dbe((t.line||{}).color||a,.5))),l){var h=c&&Tbt(c)?Dbe(r.fillcolor,1):a;u=n(\"line.color\",h),n(\"line.width\",2),n(\"line.dash\")}n(\"line.smoothing\"),wbt(n,i,u,o)};function Mbt(e,t){var r;Sbt.indexOf(t.operation)===-1?(e(\"contours.value\",[0,1]),Fbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Rbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e(\"contours.value\",0),Rbe(t.value)||(Fbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Ube=ye((Lur,Nbe)=>{\"use strict\";var SG=Dr(),Ebt=JI(),Cbt=Pg(),kbt=AG(),Lbt=b8(),Pbt=w8(),Ibt=w4(),Bbe=E4();Nbe.exports=function(t,r,n,i){function a(u,c){return SG.coerce(t,r,Bbe,u,c)}function o(u){return SG.coerce2(t,r,Bbe,u)}var s=Ebt(t,r,a,i);if(!s){r.visible=!1;return}Cbt(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"text\"),a(\"hovertext\"),a(\"hoverongaps\"),a(\"hovertemplate\");var l=a(\"contours.type\")===\"constraint\";a(\"connectgaps\",SG.isArray1D(r.z)),l?kbt(t,r,a,i,n):(Lbt(t,r,a,o),Pbt(t,r,a,i)),r.contours&&r.contours.coloring===\"heatmap\"&&Ibt(a,i),a(\"zorder\")}});var Gbe=ye((Pur,Vbe)=>{\"use strict\";Vbe.exports={attributes:E4(),supplyDefaults:Ube(),calc:dG(),plot:S8().plot,style:E8(),colorbar:C8(),hoverPoints:TG(),moduleType:\"trace\",name:\"contour\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"showLegend\"],meta:{}}});var jbe=ye((Iur,Hbe)=>{\"use strict\";Hbe.exports=Gbe()});var MG=ye((Rur,Xbe)=>{\"use strict\";var Rbt=Qo().hovertemplateAttrs,Dbt=Qo().texttemplateAttrs,Fbt=Eg(),a0=pf(),zbt=Gl(),Wbe=Tu(),Obt=Pd().dash,M_=Ao().extendFlat,j0=a0.marker,R4=a0.line,qbt=j0.line;Xbe.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:M_({},a0.mode,{dflt:\"markers\"}),text:M_({},a0.text,{}),texttemplate:Dbt({editType:\"plot\"},{keys:[\"a\",\"b\",\"c\",\"text\"]}),hovertext:M_({},a0.hovertext,{}),line:{color:R4.color,width:R4.width,dash:Obt,backoff:R4.backoff,shape:M_({},R4.shape,{values:[\"linear\",\"spline\"]}),smoothing:R4.smoothing,editType:\"calc\"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:Fbt(),marker:M_({symbol:j0.symbol,opacity:j0.opacity,angle:j0.angle,angleref:j0.angleref,standoff:j0.standoff,maxdisplayed:j0.maxdisplayed,size:j0.size,sizeref:j0.sizeref,sizemin:j0.sizemin,sizemode:j0.sizemode,line:M_({width:qbt.width,editType:\"calc\"},Wbe(\"marker.line\")),gradient:j0.gradient,editType:\"calc\"},Wbe(\"marker\")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},zbt.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:a0.hoveron,hovertemplate:Rbt()}});var Jbe=ye((Dur,Kbe)=>{\"use strict\";var Zbe=Dr(),Bbt=Sm(),FT=Ru(),Nbt=$p(),Ubt=R0(),Ybe=J3(),Vbt=D0(),Gbt=Ig(),Hbt=MG();Kbe.exports=function(t,r,n,i){function a(h,d){return Zbe.coerce(t,r,Hbt,h,d)}var o=a(\"a\"),s=a(\"b\"),l=a(\"c\"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a(\"sum\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&a(\"hovertemplate\");var c=u<Bbt.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"mode\",c),FT.hasMarkers(r)&&Nbt(t,r,n,i,a,{gradient:!0}),FT.hasLines(r)&&(Ubt(t,r,n,i,a,{backoff:!0}),Ybe(t,r,a),a(\"connectgaps\")),FT.hasText(r)&&(a(\"texttemplate\"),Vbt(t,r,i,a));var f=[];(FT.hasMarkers(r)||FT.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),f.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(Gbt(t,r,n,a),FT.hasLines(r)||Ybe(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&f.push(\"fills\"),a(\"hoveron\",f.join(\"+\")||\"points\"),Zbe.coerceSelectionMarkerOpacity(r,a)}});var Qbe=ye((Fur,$be)=>{\"use strict\";var EG=ho();$be.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=EG.tickText(a.aaxis,t.a,!0).text,i.bLabel=EG.tickText(a.baxis,t.b,!0).text,i.cLabel=EG.tickText(a.caxis,t.c,!0).text,i}});var i2e=ye((zur,r2e)=>{\"use strict\";var CG=Eo(),jbt=F0(),Wbt=Cm(),Xbt=z0(),Zbt=O0().calcMarkerSize,e2e=[\"a\",\"b\",\"c\"],t2e={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};r2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l<e2e.length;l++)if(c=e2e[l],!o[c]){for(h=o[t2e[c][0]],d=o[t2e[c][1]],f=new Array(h.length),u=0;u<h.length;u++)f[u]=a-h[u]-d[u];o[c]=f}var v=r._length,x=new Array(v),b,p,C,E,A,L;for(l=0;l<v;l++)b=o.a[l],p=o.b[l],C=o.c[l],CG(b)&&CG(p)&&CG(C)?(b=+b,p=+p,C=+C,E=i/(b+p+C),E!==1&&(b*=E,p*=E,C*=E),L=b,A=C-p,x[l]={x:A,y:L,a:b,b:p,c:C},s&&(x[l].id=s[l])):x[l]={x:!1,y:!1};return Zbt(r,v),jbt(t,r),Wbt(x,r),Xbt(x,r),x}});var a2e=ye((Our,n2e)=>{\"use strict\";var Ybt=iT();n2e.exports=function(t,r,n){var i=r.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select(\"g.scatterlayer\"),u=0;u<n.length;u++){var c=n[u];c.length&&(c[0].trace._xA=a,c[0].trace._yA=o)}Ybt(t,s,n,l)}});var s2e=ye((qur,o2e)=>{\"use strict\";var Kbt=sT();o2e.exports=function(t,r,n,i){var a=Kbt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var x=h._module.formatLabels(f,h,v);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=f.hi||h.hoverinfo,p=[];function C(A,L){p.push(A._hovertitle+\": \"+L)}if(!h.hovertemplate){var E=b.split(\"+\");E.indexOf(\"all\")!==-1&&(E=[\"a\",\"b\",\"c\"]),E.indexOf(\"a\")!==-1&&C(d.aaxis,o.aLabel),E.indexOf(\"b\")!==-1&&C(d.baxis,o.bLabel),E.indexOf(\"c\")!==-1&&C(d.caxis,o.cLabel)}return o.extraText=p.join(\"<br>\"),o.hovertemplate=h.hovertemplate,a}});var u2e=ye((Bur,l2e)=>{\"use strict\";l2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var x2e=ye((Nur,_2e)=>{\"use strict\";var p2e=Oa(),Jbt=cd(),kG=qa(),By=Dr(),Dm=By.strTranslate,L8=By._,OT=Ca(),P8=So(),D4=ym(),LG=Ao().extendFlat,$bt=Mc(),E_=ho(),c2e=yv(),f2e=vf(),g2e=Sg(),h2e=g2e.freeMode,Qbt=g2e.rectMode,PG=Mb(),e2t=zf().prepSelect,t2t=zf().selectOnClick,r2t=zf().clearOutline,i2t=zf().clearSelectionsCache,m2e=hd();function y2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}_2e.exports=y2e;var Fm=y2e.prototype;Fm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Fm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){r._hasClipOnAxisFalse=!0;break}}r.updateLayers(n),r.adjustLayout(n,i),$bt.generalUpdatePerTraceModule(r.graphDiv,r,e,n),r.layers.plotbg.select(\"path\").call(OT.fill,n.bgcolor)};Fm.makeFramework=function(e){var t=this,r=t.graphDiv,n=e[t.id],i=t.clipId=\"clip\"+t.layoutId+t.id,a=t.clipIdRelative=\"clip-relative\"+t.layoutId+t.id;t.clipDef=By.ensureSingleById(e._clips,\"clipPath\",i,function(o){o.append(\"path\").attr(\"d\",\"M0,0Z\")}),t.clipDefRelative=By.ensureSingleById(e._clips,\"clipPath\",a,function(o){o.append(\"path\").attr(\"d\",\"M0,0Z\")}),t.plotContainer=By.ensureSingle(t.container,\"g\",t.id),t.updateLayers(n),P8.setClipUrl(t.layers.backplot,i,r),P8.setClipUrl(t.layers.grids,i,r)};Fm.updateFx=function(e){e._ternarylayer.selectAll(\"g.toplevel\").style(\"cursor\",e.dragmode===\"pan\"?\"move\":\"crosshair\")};Fm.updateLayers=function(e){var t=this,r=t.layers,n=[\"draglayer\",\"plotbg\",\"backplot\",\"grids\"];e.aaxis.layer===\"below traces\"&&n.push(\"aaxis\",\"aline\"),e.baxis.layer===\"below traces\"&&n.push(\"baxis\",\"bline\"),e.caxis.layer===\"below traces\"&&n.push(\"caxis\",\"cline\"),n.push(\"frontplot\"),e.aaxis.layer===\"above traces\"&&n.push(\"aaxis\",\"aline\"),e.baxis.layer===\"above traces\"&&n.push(\"baxis\",\"bline\"),e.caxis.layer===\"above traces\"&&n.push(\"caxis\",\"cline\");var i=t.plotContainer.selectAll(\"g.toplevel\").data(n,String),a=[\"agrid\",\"bgrid\",\"cgrid\"];i.enter().append(\"g\").attr(\"class\",function(o){return\"toplevel \"+o}).each(function(o){var s=p2e.select(this);r[o]=s,o===\"frontplot\"?s.append(\"g\").classed(\"scatterlayer\",!0):o===\"backplot\"?s.append(\"g\").classed(\"maplayer\",!0):o===\"plotbg\"?s.append(\"path\").attr(\"d\",\"M0,0Z\"):o===\"aline\"||o===\"bline\"||o===\"cline\"?s.append(\"path\"):o===\"grids\"&&a.forEach(function(l){r[l]=s.append(\"g\").classed(\"grid \"+l,!0)})}),i.order()};var zT=Math.sqrt(4/3);Fm.adjustLayout=function(e,t){var r=this,n=e.domain,i=(n.x[0]+n.x[1])/2,a=(n.y[0]+n.y[1])/2,o=n.x[1]-n.x[0],s=n.y[1]-n.y[0],l=o*t.w,u=s*t.h,c=e.sum,f=e.aaxis.min,h=e.baxis.min,d=e.caxis.min,v,x,b,p,C,E;l>zT*u?(p=u,b=p*zT):(b=l,p=b/zT),C=o*b/l,E=s*p/u,v=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=x,r.w=b,r.h=p,r.sum=c,r.xaxis={type:\"linear\",range:[f+2*d-c,c-f-2*h],domain:[i-C/2,i+C/2],_id:\"x\"},D4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(V){return V.a>=r.aaxis.range[0]&&V.a<=r.aaxis.range[1]&&V.b>=r.baxis.range[1]&&V.b<=r.baxis.range[0]&&V.c>=r.caxis.range[1]&&V.c<=r.caxis.range[0]},r.yaxis={type:\"linear\",range:[f,c-h-d],domain:[a-E/2,a+E/2],_id:\"y\"},D4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var A=r.yaxis.domain[0],L=r.aaxis=LG({},e.aaxis,{range:[f,c-h-d],side:\"left\",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+E*zT],anchor:\"free\",position:0,_id:\"y\",_length:b});D4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=LG({},e.baxis,{range:[c-f-d,h],side:\"bottom\",domain:r.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:b});D4(_,r.graphDiv._fullLayout),_.setScale();var k=r.caxis=LG({},e.caxis,{range:[c-f-h,d],side:\"right\",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+E*zT],anchor:\"free\",position:0,_id:\"y\",_length:b});D4(k,r.graphDiv._fullLayout),k.setScale();var M=\"M\"+v+\",\"+(x+p)+\"h\"+b+\"l-\"+b/2+\",-\"+p+\"Z\";r.clipDef.select(\"path\").attr(\"d\",M),r.layers.plotbg.select(\"path\").attr(\"d\",M);var g=\"M0,\"+p+\"h\"+b+\"l-\"+b/2+\",-\"+p+\"Z\";r.clipDefRelative.select(\"path\").attr(\"d\",g);var P=Dm(v,x);r.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",P),r.clipDefRelative.select(\"path\").attr(\"transform\",null);var T=Dm(v-_._offset,x+p);r.layers.baxis.attr(\"transform\",T),r.layers.bgrid.attr(\"transform\",T);var z=Dm(v+b/2,x)+\"rotate(30)\"+Dm(0,-L._offset);r.layers.aaxis.attr(\"transform\",z),r.layers.agrid.attr(\"transform\",z);var O=Dm(v+b/2,x)+\"rotate(-30)\"+Dm(0,-k._offset);r.layers.caxis.attr(\"transform\",O),r.layers.cgrid.attr(\"transform\",O),r.drawAxes(!0),r.layers.aline.select(\"path\").attr(\"d\",L.showline?\"M\"+v+\",\"+(x+p)+\"l\"+b/2+\",-\"+p:\"M0,0\").call(OT.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),r.layers.bline.select(\"path\").attr(\"d\",_.showline?\"M\"+v+\",\"+(x+p)+\"h\"+b:\"M0,0\").call(OT.stroke,_.linecolor||\"#000\").style(\"stroke-width\",(_.linewidth||0)+\"px\"),r.layers.cline.select(\"path\").attr(\"d\",k.showline?\"M\"+(v+b/2)+\",\"+x+\"l\"+b/2+\",\"+p:\"M0,0\").call(OT.stroke,k.linecolor||\"#000\").style(\"stroke-width\",(k.linewidth||0)+\"px\"),r.graphDiv._context.staticPlot||r.initInteractions(),P8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Fm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(7)+\"title\",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks===\"outside\"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks===\"outside\"?o.ticklen:0)+3;i[\"a-title\"]=PG.draw(r,\"a\"+n,{propContainer:a,propName:t.id+\".aaxis.title\",placeholder:L8(r,\"Click to enter Component A title\"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,\"text-anchor\":\"middle\"}}),i[\"b-title\"]=PG.draw(r,\"b\"+n,{propContainer:o,propName:t.id+\".baxis.title\",placeholder:L8(r,\"Click to enter Component B title\"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,\"text-anchor\":\"middle\"}}),i[\"c-title\"]=PG.draw(r,\"c\"+n,{propContainer:s,propName:t.id+\".caxis.title\",placeholder:L8(r,\"Click to enter Component C title\"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,\"text-anchor\":\"middle\"}})}};Fm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+\"tickLayout\",u=n2t(e);t[l]!==u&&(o.selectAll(\".\"+a+\"tick\").remove(),t[l]=u),e.setScale();var c=E_.calcTicks(e),f=E_.clipEnds(e,c),h=E_.makeTransTickFn(e),d=E_.getTickSigns(e)[2],v=By.deg2rad(s),x=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,C=t.h,E=i===\"b\"?\"M0,\"+x+\"l\"+Math.sin(v)*b+\",\"+Math.cos(v)*b:\"M\"+x+\",0l\"+Math.cos(v)*b+\",\"+-Math.sin(v)*b,A={a:\"M0,0l\"+C+\",-\"+p/2,b:\"M0,0l-\"+p/2+\",-\"+C,c:\"M0,0l-\"+C+\",\"+p/2}[i];E_.drawTicks(r,e,{vals:e.ticks===\"inside\"?f:c,layer:o,path:E,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:f,layer:t.layers[i+\"grid\"],path:A,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function n2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=m2e.MINZOOM/2+.87,a2t=\"m-0.87,.5h\"+yd+\"v3h-\"+(yd+5.2)+\"l\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l2.6,1.5l-\"+yd/2+\",\"+yd*.87+\"Z\",o2t=\"m0.87,.5h-\"+yd+\"v3h\"+(yd+5.2)+\"l-\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l-2.6,1.5l\"+yd/2+\",\"+yd*.87+\"Z\",s2t=\"m0,1l\"+yd/2+\",\"+yd*.87+\"l2.6,-1.5l-\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l-\"+(yd/2+2.6)+\",\"+(yd*.87+4.5)+\"l2.6,1.5l\"+yd/2+\",-\"+yd*.87+\"Z\",l2t=\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\",d2e=!0;Fm.clearOutline=function(){i2t(this.dragOptions),r2t(this.dragOptions.gd)};Fm.initInteractions=function(){var e=this,t=e.layers.plotbg.select(\"path\").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(T,z,O){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var V=e.dragOptions.dragmode=r._fullLayout.dragmode;h2e(V)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,V===\"zoom\"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=p,e.dragOptions.doneFn=k,C(T,z,O)):V===\"pan\"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(Qbt(V)||h2e(V))&&e2t(T,z,O,e.dragOptions,V)}};var o,s,l,u,c,f,h,d,v,x;function b(T){var z={};return z[e.id+\".aaxis.min\"]=T.a,z[e.id+\".baxis.min\"]=T.b,z[e.id+\".caxis.min\"]=T.c,z}function p(T,z){var O=r._fullLayout.clickmode;v2e(r),T===2&&(r.emit(\"plotly_doubleclick\",null),kG.call(\"_guiRelayout\",r,b({a:0,b:0,c:0}))),O.indexOf(\"select\")>-1&&T===1&&t2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),O.indexOf(\"event\")>-1&&f2e.click(r,z,e.id)}function C(T,z,O){var V=t.getBoundingClientRect();o=z-V.left,s=O-V.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=By.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=Jbt(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h=\"M0,\"+e.h+\"L\"+e.w/2+\", 0L\"+e.w+\",\"+e.h+\"Z\",d=!1,v=n.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",Dm(e.x0,e.y0)).style({fill:f>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",h),x=n.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",Dm(e.x0,e.y0)).style({fill:OT.background,stroke:OT.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),e.clearOutline(r)}function E(T,z){return 1-z/e.h}function A(T,z){return 1-(T+(e.h-z)/Math.sqrt(3))/e.w}function L(T,z){return(T-(e.h-z)/Math.sqrt(3))/e.w}function _(T,z){var O=o+T*i,V=s+z*a,G=Math.max(0,Math.min(1,E(o,s),E(O,V))),Z=Math.max(0,Math.min(1,A(o,s),A(O,V))),H=Math.max(0,Math.min(1,L(o,s),L(O,V))),N=(G/2+H)*e.w,j=(1-G/2-Z)*e.w,re=(N+j)/2,oe=j-N,_e=(1-G)*e.h,Me=_e-oe/zT;oe<m2e.MINZOOM?(c=l,v.attr(\"d\",h),x.attr(\"d\",\"M0,0Z\")):(c={a:l.a+G*u,b:l.b+Z*u,c:l.c+H*u},v.attr(\"d\",h+\"M\"+N+\",\"+_e+\"H\"+j+\"L\"+re+\",\"+Me+\"L\"+N+\",\"+_e+\"Z\"),x.attr(\"d\",\"M\"+o+\",\"+s+l2t+\"M\"+N+\",\"+_e+a2t+\"M\"+j+\",\"+_e+o2t+\"M\"+re+\",\"+Me+s2t)),d||(v.transition().style(\"fill\",f>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),x.transition().style(\"opacity\",1).duration(200),d=!0),r.emit(\"plotly_relayouting\",b(c))}function k(){v2e(r),c!==l&&(kG.call(\"_guiRelayout\",r,b(c)),d2e&&r.data&&r._context.showTips&&(By.notifier(L8(r,\"Double-click to zoom back out\"),\"long\"),d2e=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(T,z){var O=T/e.xaxis._m,V=z/e.yaxis._m;c={a:l.a-V,b:l.b+(O+V)/2,c:l.c-(O-V)/2};var G=[c.a,c.b,c.c].sort(By.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,T=(l.c-c.c-l.b+c.b)*e.xaxis._m);var H=Dm(e.x0+T,e.y0+z);e.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",H);var N=Dm(-T,-z);e.clipDefRelative.select(\"path\").attr(\"transform\",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(P8.hideOutsideRangePoints,e),r.emit(\"plotly_relayouting\",b(c))}function P(){kG.call(\"_guiRelayout\",r,b(c))}t.onmousemove=function(T){f2e.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||c2e.unhover(r,T)},c2e.init(this.dragOptions)};function v2e(e){p2e.select(e).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}});var DG=ye((Uur,b2e)=>{\"use strict\";var u2t=Eh(),c2t=kc().attributes,su=Rd(),f2t=mc().overrideAll,IG=Ao().extendFlat,RG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:IG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:IG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:IG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:\"number\",dflt:0,min:0}},I8=b2e.exports=f2t({domain:c2t({name:\"ternary\"}),bgcolor:{valType:\"color\",dflt:u2t.background},sum:{valType:\"number\",dflt:1,min:0},aaxis:RG,baxis:RG,caxis:RG},\"plot\",\"from-root\");I8.uirevision={valType:\"any\",editType:\"none\"};I8.aaxis.uirevision=I8.baxis.uirevision=I8.caxis.uirevision={valType:\"any\",editType:\"none\"}});var C_=ye((Vur,w2e)=>{\"use strict\";var h2t=Dr(),d2t=pl(),v2t=kc().defaults;w2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||\"x\",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\\d+$/,\"\"),h,d;function v(C,E){return h2t.coerce(h,d,o,C,E)}for(var x=0;x<c;x++){var b=u[x];t[b]?h=t[b]:h=t[b]={},d=d2t.newContainer(r,b,f),i.noUirevision||v(\"uirevision\",r.uirevision);var p={};p[l]=[x/c,(x+1)/c],v2t(d,r,v,p),i.id=b,s(h,d,v,i)}}});var M2e=ye((Gur,S2e)=>{\"use strict\";var p2t=Ca(),g2t=pl(),R8=Dr(),m2t=C_(),y2t=e_(),_2t=t_(),x2t=T3(),b2t=xb(),w2t=QM(),A2e=DG(),T2e=[\"aaxis\",\"baxis\",\"caxis\"];S2e.exports=function(t,r,n){m2t(t,r,n,{type:\"ternary\",attributes:A2e,handleDefaults:T2t,font:r.font,paper_bgcolor:r.paper_bgcolor})};function T2t(e,t,r,n){var i=r(\"bgcolor\"),a=r(\"sum\");n.bgColor=p2t.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u<T2e.length;u++)o=T2e[u],s=e[o]||{},l=g2t.newContainer(t,o),l._name=o,A2t(s,l,n,t);var c=t.aaxis,f=t.baxis,h=t.caxis;c.min+f.min+h.min>=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function A2t(e,t,r,n){var i=A2e[t._name];function a(d,v){return R8.coerce(e,t,i,d,v)}a(\"uirevision\",n.uirevision),t.type=\"linear\";var o=a(\"color\"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c=\"Component \"+u,f=a(\"title.text\",c);t._hovertitle=f===c?f:u,R8.coerceFont(a,\"title.font\",r.font,{overrideDflt:{size:R8.bigFont(r.font.size),color:s}}),a(\"min\"),b2t(e,t,a,\"linear\"),_2t(e,t,a,\"linear\"),y2t(e,t,a,\"linear\",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),x2t(e,t,a,{outerTicks:!0});var h=a(\"showticklabels\");h&&(R8.coerceFont(a,\"tickfont\",r.font,{overrideDflt:{color:s}}),a(\"tickangle\"),a(\"tickformat\")),w2t(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a(\"hoverformat\"),a(\"layer\")}});var E2e=ye(W0=>{\"use strict\";var S2t=x2e(),M2t=Id().getSubplotCalcData,E2t=Dr().counterRegex,qT=\"ternary\";W0.name=qT;var C2t=W0.attr=\"subplot\";W0.idRoot=qT;W0.idRegex=W0.attrRegex=E2t(qT);var k2t=W0.attributes={};k2t[C2t]={valType:\"subplotid\",dflt:\"ternary\",editType:\"calc\"};W0.layoutAttributes=DG();W0.supplyLayoutDefaults=M2e();W0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[qT],a=0;a<i.length;a++){var o=i[a],s=M2t(n,qT,o),l=r[o]._subplot;l||(l=new S2t({id:o,graphDiv:t,container:r._ternarylayer.node()},r),r[o]._subplot=l),l.plot(s,r,t._promises)}};W0.clean=function(e,t,r,n){for(var i=n._subplots[qT]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\"a-title\"].remove(),s.layers[\"b-title\"].remove(),s.layers[\"c-title\"].remove())}};W0.updateFx=function(e){var t=e._fullLayout;t._ternarylayer.selectAll(\"g.toplevel\").style(\"cursor\",t.dragmode===\"pan\"?\"move\":\"crosshair\")}});var k2e=ye((jur,C2e)=>{\"use strict\";C2e.exports={attributes:MG(),supplyDefaults:Jbe(),colorbar:$d(),formatLabels:Qbe(),calc:i2e(),plot:a2e(),style:ap().style,styleOnSelect:ap().styleOnSelect,hoverPoints:s2e(),selectPoints:lT(),eventData:u2e(),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:E2e(),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var P2e=ye((Wur,L2e)=>{\"use strict\";L2e.exports=k2e()});var FG=ye((Xur,R2e)=>{\"use strict\";var td=y4(),BT=Ao().extendFlat,I2e=df().axisHoverFormat;R2e.exports={y:td.y,x:td.x,x0:td.x0,y0:td.y0,xhoverformat:I2e(\"x\"),yhoverformat:I2e(\"y\"),name:BT({},td.name,{}),orientation:BT({},td.orientation,{}),bandwidth:{valType:\"number\",min:0,editType:\"calc\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},scalemode:{valType:\"enumerated\",values:[\"width\",\"count\"],dflt:\"width\",editType:\"calc\"},spanmode:{valType:\"enumerated\",values:[\"soft\",\"hard\",\"manual\"],dflt:\"soft\",editType:\"calc\"},span:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:td.fillcolor,points:BT({},td.boxpoints,{}),jitter:BT({},td.jitter,{}),pointpos:BT({},td.pointpos,{}),width:BT({},td.width,{}),marker:td.marker,text:td.text,hovertext:td.hovertext,hovertemplate:td.hovertemplate,quartilemethod:td.quartilemethod,box:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},width:{valType:\"number\",min:0,max:1,dflt:.25,editType:\"plot\"},fillcolor:{valType:\"color\",editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},editType:\"plot\"},meanline:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"plot\"},side:{valType:\"enumerated\",values:[\"both\",\"positive\",\"negative\"],dflt:\"both\",editType:\"calc\"},offsetgroup:td.offsetgroup,alignmentgroup:td.alignmentgroup,selected:td.selected,unselected:td.unselected,hoveron:{valType:\"flaglist\",flags:[\"violins\",\"points\",\"kde\"],dflt:\"violins+points+kde\",extras:[\"all\"],editType:\"style\"},zorder:td.zorder}});var qG=ye((Zur,D2e)=>{\"use strict\";var zG=_4(),OG=Dr().extendFlat;D2e.exports={violinmode:OG({},zG.boxmode,{}),violingap:OG({},zG.boxgap,{}),violingroupgap:OG({},zG.boxgroupgap,{})}});var B2e=ye((Yur,q2e)=>{\"use strict\";var F2e=Dr(),L2t=Ca(),z2e=b4(),O2e=FG();q2e.exports=function(t,r,n,i){function a(L,_){return F2e.coerce(t,r,O2e,L,_)}function o(L,_){return F2e.coerce2(t,r,O2e,L,_)}if(z2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a(\"bandwidth\"),a(\"side\");var s=a(\"width\");s||(a(\"scalegroup\",r.name),a(\"scalemode\"));var l=a(\"span\"),u;Array.isArray(l)&&(u=\"manual\"),a(\"spanmode\",u);var c=a(\"line.color\",(t.marker||{}).color||n),f=a(\"line.width\"),h=a(\"fillcolor\",L2t.addOpacity(r.line.color,.5));z2e.handlePointsDefaults(t,r,a,{prefix:\"\"});var d=o(\"box.width\"),v=o(\"box.fillcolor\",h),x=o(\"box.line.color\",c),b=o(\"box.line.width\",f),p=a(\"box.visible\",!!(d||v||x||b));p||(r.box={visible:!1});var C=o(\"meanline.color\",c),E=o(\"meanline.width\",f),A=a(\"meanline.visible\",!!(C||E));A||(r.meanline={visible:!1}),a(\"quartilemethod\"),a(\"zorder\")}}});var U2e=ye((Kur,N2e)=>{\"use strict\";var P2t=Dr(),I2t=qG(),R2t=jI();N2e.exports=function(t,r,n){function i(a,o){return P2t.coerce(t,r,I2t,a,o)}R2t._supply(t,r,n,i,\"violin\")}});var D8=ye(o2=>{\"use strict\";var D2t=Dr(),F2t={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=F2t.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u<n;u++)l+=i((s-r[u])/a);return o*l}};o2.getPositionOnKdePath=function(e,t,r){var n,i;t.orientation===\"h\"?(n=\"y\",i=\"x\"):(n=\"x\",i=\"y\");var a=D2t.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),o=e.posCenterPx,s=a[n],l=t.side===\"both\"?2*o-s:o;return[s,l]};o2.getKdeValue=function(e,t,r){var n=e.pts.map(o2.extractVal),i=o2.makeKDE(e,t,n);return i(r)/e.posDensityScale};o2.extractVal=function(e){return e.v}});var H2e=ye(($ur,G2e)=>{\"use strict\";var BG=Dr(),NG=ho(),z2t=PV(),V2e=D8(),O2t=hs().BADNUM;G2e.exports=function(t,r){var n=z2t(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=NG.getFromId(t,r[r.orientation===\"h\"?\"xaxis\":\"yaxis\"]),o=1/0,s=-1/0,l=0,u=0,c=0;c<n.length;c++){var f=n[c],h=f.pts.map(V2e.extractVal),d=f.bandwidth=B2t(r,f,h),v=f.span=N2t(r,f,a,d);if(f.min===f.max&&d===0)v=f.span=[f.min,f.max],f.density=[{v:1,t:v[0]}],f.bandwidth=d,l=Math.max(l,1);else{var x=v[1]-v[0],b=Math.ceil(x/(d/3)),p=x/b;if(!isFinite(p)||!isFinite(b))return BG.error(\"Something went wrong with computing the violin span\"),n[0].t.empty=!0,n;var C=V2e.makeKDE(f,r,h);f.density=new Array(b);for(var E=0,A=v[0];A<v[1]+p/2;E++,A+=p){var L=C(A);f.density[E]={v:L,t:A},l=Math.max(l,L)}}u=Math.max(u,h.length),o=Math.min(o,v[0]),s=Math.max(s,v[1])}var _=NG.findExtremes(a,[o,s],{padded:!0});if(r._extremes[a._id]=_,r.width)n[0].t.maxKDE=l;else{var k=i._violinScaleGroupStats,M=r.scalegroup,g=k[M];g?(g.maxKDE=Math.max(g.maxKDE,l),g.maxCount=Math.max(g.maxCount,u)):k[M]={maxKDE:l,maxCount:u}}return n[0].t.labels.kde=BG._(t,\"kde:\"),n};function q2t(e,t,r){var n=Math.min(t,r/1.349);return 1.059*n*Math.pow(e,-.2)}function B2t(e,t,r){var n=t.max-t.min;if(!n)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,n/1e4);var i=r.length,a=BG.stdev(r,i-1,t.mean);return Math.max(q2t(i,a,t.q3-t.q1),n/100)}function N2t(e,t,r,n){var i=e.spanmode,a=e.span||[],o=[t.min,t.max],s=[t.min-2*n,t.max+2*n],l;function u(f){var h=a[f],d=r.type===\"multicategory\"?r.r2c(h):r.d2c(h,0,e[t.valLetter+\"calendar\"]);return d===O2t?s[f]:d}i===\"soft\"?l=s:i===\"hard\"?l=o:l=[u(0),u(1)];var c={type:\"linear\",range:l};return NG.setConvert(c),c.cleanRange(),l}});var X2e=ye((Qur,W2e)=>{\"use strict\";var U2t=XI().setPositionOffset,j2e=[\"v\",\"h\"];W2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o<j2e.length;o++){for(var s=j2e[o],l=s===\"h\"?a:i,u=[],c=0;c<n.length;c++){var f=n[c],h=f[0].t,d=f[0].trace;d.visible===!0&&d.type===\"violin\"&&!h.empty&&d.orientation===s&&d.xaxis===i._id&&d.yaxis===a._id&&u.push(c)}U2t(\"violin\",t,u,l)}}});var Y2e=ye((ecr,Z2e)=>{\"use strict\";var UG=Oa(),VG=Dr(),V2t=So(),GG=ZI(),G2t=gU(),H2t=D8();Z2e.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=G2t(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0,linearized:!0});return V2t.smoothopen(h[0],1)}VG.makeTraceGroups(i,n,\"trace violins\").each(function(c){var f=UG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var x=d.bPos,b=d.bdPos,p=r[d.valLetter+\"axis\"],C=r[d.posLetter+\"axis\"],E=v.side===\"both\",A=E||v.side===\"positive\",L=E||v.side===\"negative\",_=f.selectAll(\"path.violin\").data(VG.identity);_.enter().append(\"path\").style(\"vector-effect\",a?\"none\":\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each(function(V){var G=UG.select(this),Z=V.density,H=Z.length,N=C.c2l(V.pos+x,!0),j=C.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode===\"count\"?oe.maxKDE/b*(oe.maxCount/V.pts.length):oe.maxKDE/b}var _e,Me,ke,me,ie,Se,Le;if(A){for(Se=new Array(H),me=0;me<H;me++)Le=Se[me]={},Le[d.posLetter]=N+Z[me].v/re,Le[d.valLetter]=p.c2l(Z[me].t,!0);_e=u(Se,v)}if(L){for(Se=new Array(H),ie=0,me=H-1;ie<H;ie++,me--)Le=Se[ie]={},Le[d.posLetter]=N-Z[me].v/re,Le[d.valLetter]=p.c2l(Z[me].t,!0);Me=u(Se,v)}if(E)ke=_e+\"L\"+Me.substr(1)+\"Z\";else{var Ae=[j,p.c2p(Z[0].t)],De=[j,p.c2p(Z[H-1].t)];v.orientation===\"h\"&&(Ae.reverse(),De.reverse()),A?ke=\"M\"+Ae+\"L\"+_e.substr(1)+\"L\"+De:ke=\"M\"+De+\"L\"+Me.substr(1)+\"L\"+Ae}G.attr(\"d\",ke),V.posCenterPx=j,V.posDensityScale=re*b,V.path=G.node(),V.pathLength=V.path.getTotalLength()/(E?2:1)});var k=v.box,M=k.width,g=(k.line||{}).width,P,T;E?(P=b*M,T=0):A?(P=[0,b*M/2],T=g*{x:1,y:-1}[d.posLetter]):(P=[b*M/2,0],T=g*{x:-1,y:1}[d.posLetter]),GG.plotBoxAndWhiskers(f,{pos:C,val:p},v,{bPos:x,bdPos:P,bPosPxOffset:T}),GG.plotBoxMean(f,{pos:C,val:p},v,{bPos:x,bdPos:P,bPosPxOffset:T});var z;!v.box.visible&&v.meanline.visible&&(z=VG.identity);var O=f.selectAll(\"path.meanline\").data(z||[]);O.enter().append(\"path\").attr(\"class\",\"meanline\").style(\"fill\",\"none\").style(\"vector-effect\",a?\"none\":\"non-scaling-stroke\"),O.exit().remove(),O.each(function(V){var G=p.c2p(V.mean,!0),Z=H2t.getPositionOnKdePath(V,v,G);UG.select(this).attr(\"d\",v.orientation===\"h\"?\"M\"+G+\",\"+Z[0]+\"V\"+Z[1]:\"M\"+Z[0]+\",\"+G+\"H\"+Z[1])}),GG.plotPoints(f,{x:s,y:l},v,d)})}});var $2e=ye((tcr,J2e)=>{\"use strict\";var K2e=Oa(),NT=Ca(),j2t=ap().stylePoints;J2e.exports=function(t){var r=K2e.select(t).selectAll(\"g.trace.violins\");r.style(\"opacity\",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=K2e.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll(\"path.violin\").style(\"stroke-width\",i.line.width+\"px\").call(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll(\"path.box\").style(\"stroke-width\",s.width+\"px\").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var c={\"stroke-width\":u+\"px\",\"stroke-dasharray\":2*u+\"px,\"+u+\"px\"};a.selectAll(\"path.mean\").style(c).call(NT.stroke,l.color),a.selectAll(\"path.meanline\").style(c).call(NT.stroke,l.color),j2t(a,i,t)})}});var rwe=ye((rcr,twe)=>{\"use strict\";var W2t=Ca(),HG=Dr(),X2t=ho(),Q2e=zV(),ewe=D8();twe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf(\"violins\")!==-1,f=u.indexOf(\"kde\")!==-1,h=[],d,v;if(c||f){var x=Q2e.hoverOnBoxes(t,r,n,i);if(f&&x.length>0){var b=t.xa,p=t.ya,C,E,A,L,_;l.orientation===\"h\"?(_=r,C=\"y\",A=p,E=\"x\",L=b):(_=n,C=\"x\",A=b,E=\"y\",L=p);var k=s[t.index];if(_>=k.span[0]&&_<=k.span[1]){var M=HG.extendFlat({},t),g=L.c2p(_,!0),P=ewe.getKdeValue(k,l,_),T=ewe.getPositionOnKdePath(k,l,g),z=A._offset,O=A._length;M[C+\"0\"]=T[0],M[C+\"1\"]=T[1],M[E+\"0\"]=M[E+\"1\"]=g,M[E+\"Label\"]=E+\": \"+X2t.hoverLabelText(L,_,l[E+\"hoverformat\"])+\", \"+s[0].t.labels.kde+\" \"+P.toFixed(3);for(var V=0,G=0;G<x.length;G++)if(x[G].attr===\"med\"){V=G;break}M.spikeDistance=x[V].spikeDistance;var Z=C+\"Spike\";M[Z]=x[V][Z],x[V].spikeDistance=void 0,x[V][Z]=void 0,M.hovertemplate=!1,h.push(M),v={},v[C+\"1\"]=HG.constrain(z+T[0],z,z+O),v[C+\"2\"]=HG.constrain(z+T[1],z,z+O),v[E+\"1\"]=v[E+\"2\"]=L._offset+g}}c&&(h=h.concat(x))}u.indexOf(\"points\")!==-1&&(d=Q2e.hoverOnPoints(t,r,n));var H=o.selectAll(\".violinline-\"+l.uid).data(v?[0]:[]);return H.enter().append(\"line\").classed(\"violinline-\"+l.uid,!0).attr(\"stroke-width\",1.5),H.exit().remove(),H.attr(v).call(W2t.stroke,t.color),i===\"closest\"?d?[d]:h:(d&&h.push(d),h)}});var nwe=ye((icr,iwe)=>{\"use strict\";iwe.exports={attributes:FG(),layoutAttributes:qG(),supplyDefaults:B2e(),crossTraceDefaults:b4().crossTraceDefaults,supplyLayoutDefaults:U2e(),calc:H2e(),crossTraceCalc:X2e(),plot:Y2e(),style:$2e(),styleOnSelect:ap().styleOnSelect,hoverPoints:rwe(),selectPoints:OV(),moduleType:\"trace\",name:\"violin\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"violinLayout\",\"zoomScale\"],meta:{}}});var owe=ye((ncr,awe)=>{\"use strict\";awe.exports=nwe()});var lwe=ye((acr,swe)=>{\"use strict\";swe.exports={eventDataKeys:[\"percentInitial\",\"percentPrevious\",\"percentTotal\"]}});var WG=ye((ocr,fwe)=>{\"use strict\";var jc=Lm(),jG=pf().line,Z2t=Gl(),uwe=df().axisHoverFormat,Y2t=Qo().hovertemplateAttrs,K2t=Qo().texttemplateAttrs,cwe=lwe(),Ny=Ao().extendFlat,J2t=Ca();fwe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:uwe(\"x\"),yhoverformat:uwe(\"y\"),hovertext:jc.hovertext,hovertemplate:Y2t({},{keys:cwe.eventDataKeys}),hoverinfo:Ny({},Z2t.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"percent initial\",\"percent previous\",\"percent total\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"percent initial\",\"percent previous\",\"percent total\",\"value\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:K2t({editType:\"plot\"},{keys:cwe.eventDataKeys.concat([\"label\",\"value\"])}),text:jc.text,textposition:jc.textposition,insidetextanchor:Ny({},jc.insidetextanchor,{dflt:\"middle\"}),textangle:Ny({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Ny({},jc.orientation,{}),offset:Ny({},jc.offset,{arrayOk:!1}),width:Ny({},jc.width,{arrayOk:!1}),marker:$2t(),connector:{fillcolor:{valType:\"color\",editType:\"style\"},line:{color:Ny({},jG.color,{dflt:J2t.defaultLine}),width:Ny({},jG.width,{dflt:0,editType:\"plot\"}),dash:jG.dash,editType:\"style\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function $2t(){var e=Ny({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var XG=ye((scr,hwe)=>{\"use strict\";hwe.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}});var YG=ye((lcr,vwe)=>{\"use strict\";var F8=Dr(),Q2t=Gb(),ewt=r0().handleText,twt=K3(),rwt=Pg(),dwe=WG(),ZG=Ca();function iwt(e,t,r,n){function i(f,h){return F8.coerce(e,t,dwe,f,h)}var a=twt(e,t,n,i);if(!a){t.visible=!1;return}rwt(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"orientation\",t.y&&!t.x?\"v\":\"h\"),i(\"offset\"),i(\"width\");var o=i(\"text\");i(\"hovertext\"),i(\"hovertemplate\");var s=i(\"textposition\");ewt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!==\"none\"&&!t.texttemplate&&i(\"textinfo\",F8.isArrayOrTypedArray(o)?\"text+value\":\"value\");var l=i(\"marker.color\",r);i(\"marker.line.color\",ZG.defaultLine),i(\"marker.line.width\");var u=i(\"connector.visible\");if(u){i(\"connector.fillcolor\",nwt(l));var c=i(\"connector.line.width\");c&&(i(\"connector.line.color\"),i(\"connector.line.dash\"))}i(\"zorder\")}function nwt(e){var t=F8.isArrayOrTypedArray(e)?\"#000\":e;return ZG.addOpacity(t,.5*ZG.opacity(t))}function awt(e,t){var r,n;function i(o){return F8.coerce(n._input,n,dwe,o)}for(var a=0;a<e.length;a++)n=e[a],n.type===\"funnel\"&&(r=n._input,Q2t(r,n,t,i,t.funnelmode))}vwe.exports={supplyDefaults:iwt,crossTraceDefaults:awt}});var gwe=ye((ucr,pwe)=>{\"use strict\";var owt=Dr(),swt=XG();pwe.exports=function(e,t,r){var n=!1;function i(s,l){return owt.coerce(e,t,swt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type===\"funnel\"){n=!0;break}}n&&(i(\"funnelmode\"),i(\"funnelgap\",.2),i(\"funnelgroupgap\"))}});var ywe=ye((ccr,mwe)=>{\"use strict\";var UT=Dr();mwe.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;UT.mergeArray(r.text,t,\"tx\"),UT.mergeArray(r.hovertext,t,\"htx\");var i=r.marker;if(i){UT.mergeArray(i.opacity,t,\"mo\"),UT.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(UT.mergeArray(a.color,t,\"mlc\"),UT.mergeArrayCastPositive(a.width,t,\"mlw\"))}}});var wwe=ye((fcr,bwe)=>{\"use strict\";var _we=ho(),xwe=Rg(),lwt=ywe(),uwt=z0(),F4=hs().BADNUM;bwe.exports=function(t,r){var n=_we.getFromId(t,r.xaxis||\"x\"),i=_we.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c,f,h;r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\"),s=i.makeCalcdata(r,\"y\"),l=xwe(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\"),s=n.makeCalcdata(r,\"x\"),l=xwe(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f<d;f++){a[f]<0&&(a[f]=F4);var x=!1;a[f]!==F4&&f+1<d&&a[f+1]!==F4&&(x=!0),h=v[f]={p:o[f],s:a[f],cNext:x},r._base[f]=-.5*h.s,u&&(v[f].orig_p=s[f],v[f][c+\"End\"]=l.ends[f],v[f][c+\"Start\"]=l.starts[f]),r.ids&&(h.id=String(r.ids[f])),f===0&&(v[0].vTotal=0),v[0].vTotal+=KG(h.s),h.begR=KG(h.s)/KG(v[0].s)}var b;for(f=0;f<d;f++)h=v[f],h.s!==F4&&(h.sumR=h.s/v[0].vTotal,h.difR=b!==void 0?h.s/b:1,b=h.s);return lwt(v,r),uwt(v,r),v};function KG(e){return e===F4?0:e}});var Swe=ye((hcr,Awe)=>{\"use strict\";var Twe=Hb().setGroupPositions;Awe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h],v=d.orientation===\"h\";d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type===\"funnel\"&&(f=a[h],v?c.push(f):u.push(f),l.push(f))}var x={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(Twe(t,o,s,u,x),Twe(t,s,o,c,x),h=0;h<l.length;h++){f=l[h];for(var b=0;b<f.length;b++)b+1<f.length&&(f[b].nextP0=f[b+1].p0,f[b].nextS0=f[b+1].s0,f[b].nextP1=f[b+1].p1,f[b].nextS1=f[b+1].s1)}}});var kwe=ye((dcr,Cwe)=>{\"use strict\";var z8=Oa(),L_=Dr(),Mwe=So(),k_=hs().BADNUM,cwt=i2(),fwt=bv().clearMinTextSize;Cwe.exports=function(t,r,n,i){var a=t._fullLayout;fwt(\"funnel\",a),hwt(t,r,n,i),dwt(t,r,n,i),cwt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function hwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=z8.select(this),l=o[0].trace,u=L_.ensureSingle(s,\"g\",\"regions\");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation===\"h\",f=u.selectAll(\"g.region\").data(L_.identity);f.enter().append(\"g\").classed(\"region\",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var x=Ewe(d,i,a,c),b=x[0],p=x[1],C=\"\";b[0]!==k_&&p[0]!==k_&&b[1]!==k_&&p[1]!==k_&&b[2]!==k_&&p[2]!==k_&&b[3]!==k_&&p[3]!==k_&&(c?C+=\"M\"+b[0]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[2]+\"H\"+b[3]+\"L\"+b[1]+\",\"+p[1]+\"Z\":C+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[3]+\"V\"+p[2]+\"L\"+b[1]+\",\"+p[0]+\"Z\"),C===\"\"&&(C=\"M0,0Z\"),L_.ensureSingle(z8.select(this),\"path\").attr(\"d\",C).call(Mwe.setClipUrl,t.layerClipId,e)}})})}function dwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=z8.select(this),l=o[0].trace,u=L_.ensureSingle(s,\"g\",\"lines\");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation===\"h\",f=u.selectAll(\"g.line\").data(L_.identity);f.enter().append(\"g\").classed(\"line\",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var x=Ewe(d,i,a,c),b=x[0],p=x[1],C=\"\";b[3]!==void 0&&p[3]!==void 0&&(c?(C+=\"M\"+b[0]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[2],C+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[3]+\",\"+p[2]):(C+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[3],C+=\"M\"+b[1]+\",\"+p[0]+\"L\"+b[2]+\",\"+p[2])),C===\"\"&&(C=\"M0,0Z\"),L_.ensureSingle(z8.select(this),\"path\").attr(\"d\",C).call(Mwe.setClipUrl,t.layerClipId,e)}})})}function Ewe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Iwe=ye((vcr,Pwe)=>{\"use strict\";var z4=Oa(),Lwe=So(),JG=Ca(),vwt=N1().DESELECTDIM,pwt=N0(),gwt=bv().resizeText,mwt=pwt.styleTextPoints;function ywt(e,t,r){var n=r||z4.select(e).selectAll('g[class^=\"funnellayer\"]').selectAll(\"g.trace\");gwt(e,n,\"funnel\"),n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=z4.select(this),o=i[0].trace;a.selectAll(\".point > path\").each(function(s){if(!s.isBlank){var l=o.marker;z4.select(this).call(JG.fill,s.mc||l.color).call(JG.stroke,s.mlc||l.line.color).call(Lwe.dashLine,l.line.dash,s.mlw||l.line.width).style(\"opacity\",o.selectedpoints&&!s.selected?vwt:1)}}),mwt(a,o,e),a.selectAll(\".regions\").each(function(){z4.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(JG.fill,o.connector.fillcolor)}),a.selectAll(\".lines\").each(function(){var s=o.connector.line;Lwe.lineGroupStyle(z4.select(this).selectAll(\"path\"),s.width,s.color,s.dash)})})}Pwe.exports={style:ywt}});var Fwe=ye((pcr,Dwe)=>{\"use strict\";var Rwe=Ca().opacity,_wt=TT().hoverOnBars,$G=Dr().formatPercent;Dwe.exports=function(t,r,n,i,a){var o=_wt(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation===\"h\",c=o.index,f=s[c],h=u?\"x\":\"y\";o[h+\"LabelVal\"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=$G(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=$G(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=$G(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!==\"none\"&&d!==\"skip\"){var x=d===\"all\",b=d.split(\"+\"),p=function(C){return x||b.indexOf(C)!==-1};p(\"percent initial\")&&v.push(o.percentInitialLabel+\" of initial\"),p(\"percent previous\")&&v.push(o.percentPreviousLabel+\" of previous\"),p(\"percent total\")&&v.push(o.percentTotalLabel+\" of total\")}return o.extraText=v.join(\"<br>\"),o.color=xwt(l,f),[o]}};function xwt(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Rwe(n))return n;if(Rwe(i)&&a)return i}});var Owe=ye((gcr,zwe)=>{\"use strict\";zwe.exports=function(t,r){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"percentInitial\"in r&&(t.percentInitial=r.percentInitial),\"percentPrevious\"in r&&(t.percentPrevious=r.percentPrevious),\"percentTotal\"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var Bwe=ye((mcr,qwe)=>{\"use strict\";qwe.exports={attributes:WG(),layoutAttributes:XG(),supplyDefaults:YG().supplyDefaults,crossTraceDefaults:YG().crossTraceDefaults,supplyLayoutDefaults:gwe(),calc:wwe(),crossTraceCalc:Swe(),plot:kwe(),style:Iwe().style,hoverPoints:Fwe(),eventData:Owe(),selectPoints:AT(),moduleType:\"trace\",name:\"funnel\",basePlotModule:vh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}});var Uwe=ye((ycr,Nwe)=>{\"use strict\";Nwe.exports=Bwe()});var Gwe=ye((_cr,Vwe)=>{\"use strict\";Vwe.exports={eventDataKeys:[\"initial\",\"delta\",\"final\"]}});var tH=ye((xcr,Wwe)=>{\"use strict\";var _c=Lm(),QG=pf().line,bwt=Gl(),Hwe=df().axisHoverFormat,wwt=Qo().hovertemplateAttrs,Twt=Qo().texttemplateAttrs,jwe=Gwe(),VT=Ao().extendFlat,Awt=Ca();function eH(e){return{marker:{color:VT({},_c.marker.color,{arrayOk:!1,editType:\"style\"}),line:{color:VT({},_c.marker.line.color,{arrayOk:!1,editType:\"style\"}),width:VT({},_c.marker.line.width,{arrayOk:!1,editType:\"style\"}),editType:\"style\"},editType:\"style\"},editType:\"style\"}}Wwe.exports={measure:{valType:\"data_array\",dflt:[],editType:\"calc\"},base:{valType:\"number\",dflt:null,arrayOk:!1,editType:\"calc\"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:Hwe(\"x\"),yhoverformat:Hwe(\"y\"),hovertext:_c.hovertext,hovertemplate:wwt({},{keys:jwe.eventDataKeys}),hoverinfo:VT({},bwt.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"initial\",\"delta\",\"final\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"initial\",\"delta\",\"final\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:Twt({editType:\"plot\"},{keys:jwe.eventDataKeys.concat([\"label\"])}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:eH(\"increasing\"),decreasing:eH(\"decreasing\"),totals:eH(\"intermediate sums and total\"),connector:{line:{color:VT({},QG.color,{dflt:Awt.defaultLine}),width:VT({},QG.width,{editType:\"plot\"}),dash:QG.dash,editType:\"plot\"},mode:{valType:\"enumerated\",values:[\"spanning\",\"between\"],dflt:\"between\",editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var rH=ye((bcr,Xwe)=>{\"use strict\";Xwe.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}});var GT=ye((wcr,Zwe)=>{\"use strict\";Zwe.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25B2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25BC\"}}});var nH=ye((Tcr,$we)=>{\"use strict\";var Ywe=Dr(),Swt=Gb(),Mwt=r0().handleText,Ewt=K3(),Cwt=Pg(),Kwe=tH(),kwt=Ca(),Jwe=GT(),Lwt=Jwe.INCREASING.COLOR,Pwt=Jwe.DECREASING.COLOR,Iwt=\"#4499FF\";function iH(e,t,r){e(t+\".marker.color\",r),e(t+\".marker.line.color\",kwt.defaultLine),e(t+\".marker.line.width\")}function Rwt(e,t,r,n){function i(u,c){return Ywe.coerce(e,t,Kwe,u,c)}var a=Ewt(e,t,n,i);if(!a){t.visible=!1;return}Cwt(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"measure\"),i(\"orientation\",t.x&&!t.y?\"h\":\"v\"),i(\"base\"),i(\"offset\"),i(\"width\"),i(\"text\"),i(\"hovertext\"),i(\"hovertemplate\");var o=i(\"textposition\");Mwt(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!==\"none\"&&(i(\"texttemplate\"),t.texttemplate||i(\"textinfo\")),iH(i,\"increasing\",Lwt),iH(i,\"decreasing\",Pwt),iH(i,\"totals\",Iwt);var s=i(\"connector.visible\");if(s){i(\"connector.mode\");var l=i(\"connector.line.width\");l&&(i(\"connector.line.color\"),i(\"connector.line.dash\"))}i(\"zorder\")}function Dwt(e,t){var r,n;function i(o){return Ywe.coerce(n._input,n,Kwe,o)}if(t.waterfallmode===\"group\")for(var a=0;a<e.length;a++)n=e[a],r=n._input,Swt(r,n,t,i,t.waterfallmode)}$we.exports={supplyDefaults:Rwt,crossTraceDefaults:Dwt}});var e3e=ye((Acr,Qwe)=>{\"use strict\";var Fwt=Dr(),zwt=rH();Qwe.exports=function(e,t,r){var n=!1;function i(s,l){return Fwt.coerce(e,t,zwt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type===\"waterfall\"){n=!0;break}}n&&(i(\"waterfallmode\"),i(\"waterfallgap\",.2),i(\"waterfallgroupgap\"))}});var o3e=ye((Scr,a3e)=>{\"use strict\";var t3e=ho(),r3e=Rg(),i3e=Dr().mergeArray,Owt=z0(),n3e=hs().BADNUM;function aH(e){return e===\"a\"||e===\"absolute\"}function oH(e){return e===\"t\"||e===\"total\"}a3e.exports=function(t,r){var n=t3e.getFromId(t,r.xaxis||\"x\"),i=t3e.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c;r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\"),s=i.makeCalcdata(r,\"y\"),l=r3e(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\"),s=n.makeCalcdata(r,\"x\"),l=r3e(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,x=!1,b=0;b<f;b++){var p=a[b]||0,C=!1;(a[b]!==n3e||oH(r.measure[b])||aH(r.measure[b]))&&b+1<f&&(a[b+1]!==n3e||oH(r.measure[b+1])||aH(r.measure[b+1]))&&(C=!0);var E=h[b]={i:b,p:o[b],s:p,rawS:p,cNext:C};aH(r.measure[b])?(d=E.s,E.isSum=!0,E.dir=\"totals\",E.s=d):oH(r.measure[b])?(E.isSum=!0,E.dir=\"totals\",E.s=d):(E.isSum=!1,E.dir=E.rawS<0?\"decreasing\":\"increasing\",v=E.s,E.s=d+v,d+=v),E.dir===\"totals\"&&(x=!0),u&&(h[b].orig_p=s[b],h[b][c+\"End\"]=l.ends[b],h[b][c+\"Start\"]=l.starts[b]),r.ids&&(E.id=String(r.ids[b])),E.v=(r.base||0)+d}return h.length&&(h[0].hasTotals=x),i3e(r.text,h,\"tx\"),i3e(r.hovertext,h,\"htx\"),Owt(h,r),h}});var u3e=ye((Mcr,l3e)=>{\"use strict\";var s3e=Hb().setGroupPositions;l3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h];d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type===\"waterfall\"&&(f=a[h],d.orientation===\"h\"?c.push(f):u.push(f),l.push(f))}var v={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(s3e(t,o,s,u,v),s3e(t,s,o,c,v),h=0;h<l.length;h++){f=l[h];for(var x=0;x<f.length;x++){var b=f[x];b.isSum===!1&&(b.s0+=x===0?0:f[x-1].s),x+1<f.length&&(f[x].nextP0=f[x+1].p0,f[x].nextS0=f[x+1].s0)}}}});var h3e=ye((Ecr,f3e)=>{\"use strict\";var c3e=Oa(),O8=Dr(),qwt=So(),HT=hs().BADNUM,Bwt=i2(),Nwt=bv().clearMinTextSize;f3e.exports=function(t,r,n,i){var a=t._fullLayout;Nwt(\"waterfall\",a),Bwt.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),Uwt(t,r,n,i)};function Uwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;O8.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=c3e.select(this),l=o[0].trace,u=O8.ensureSingle(s,\"g\",\"lines\");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation===\"h\",f=l.connector.mode,h=u.selectAll(\"g.line\").data(O8.identity);h.enter().append(\"g\").classed(\"line\",!0),h.exit().remove();var d=h.size();h.each(function(v,x){if(!(x!==d-1&&!v.cNext)){var b=Vwt(v,i,a,c),p=b[0],C=b[1],E=\"\";p[0]!==HT&&C[0]!==HT&&p[1]!==HT&&C[1]!==HT&&(f===\"spanning\"&&!v.isSum&&x>0&&(c?E+=\"M\"+p[0]+\",\"+C[1]+\"V\"+C[0]:E+=\"M\"+p[1]+\",\"+C[0]+\"H\"+p[0]),f!==\"between\"&&(v.isSum||x<d-1)&&(c?E+=\"M\"+p[1]+\",\"+C[0]+\"V\"+C[1]:E+=\"M\"+p[0]+\",\"+C[1]+\"H\"+p[1]),p[2]!==HT&&C[2]!==HT&&(c?E+=\"M\"+p[1]+\",\"+C[1]+\"V\"+C[2]:E+=\"M\"+p[1]+\",\"+C[1]+\"H\"+p[2])),E===\"\"&&(E=\"M0,0Z\"),O8.ensureSingle(c3e.select(this),\"path\").attr(\"d\",E).call(qwt.setClipUrl,t.layerClipId,e)}})})}function Vwt(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n?[i,a]:[a,i]}});var g3e=ye((Ccr,p3e)=>{\"use strict\";var q8=Oa(),d3e=So(),v3e=Ca(),Gwt=N1().DESELECTDIM,Hwt=N0(),jwt=bv().resizeText,Wwt=Hwt.styleTextPoints;function Xwt(e,t,r){var n=r||q8.select(e).selectAll('g[class^=\"waterfalllayer\"]').selectAll(\"g.trace\");jwt(e,n,\"waterfall\"),n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=q8.select(this),o=i[0].trace;a.selectAll(\".point > path\").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;q8.select(this).call(v3e.fill,l.color).call(v3e.stroke,l.line.color).call(d3e.dashLine,l.line.dash,l.line.width).style(\"opacity\",o.selectedpoints&&!s.selected?Gwt:1)}}),Wwt(a,o,e),a.selectAll(\".lines\").each(function(){var s=o.connector.line;d3e.lineGroupStyle(q8.select(this).selectAll(\"path\"),s.width,s.color,s.dash)})})}p3e.exports={style:Xwt}});var b3e=ye((kcr,x3e)=>{\"use strict\";var Zwt=ho().hoverLabelText,m3e=Ca().opacity,Ywt=TT().hoverOnBars,y3e=GT(),_3e={increasing:y3e.INCREASING.SYMBOL,decreasing:y3e.DECREASING.SYMBOL};x3e.exports=function(t,r,n,i,a){var o=Ywt(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation===\"h\",c=u?\"x\":\"y\",f=u?t.xa:t.ya;function h(_){return Zwt(f,_,l[c+\"hoverformat\"])}var d=o.index,v=s[d],x=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?\"(\"+b+\")\":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,C=[];if(p&&p!==\"none\"&&p!==\"skip\"){var E=p===\"all\",A=p.split(\"+\"),L=function(_){return E||A.indexOf(_)!==-1};v.isSum||(L(\"final\")&&(u?!L(\"x\"):!L(\"y\"))&&C.push(o.finalLabel),L(\"delta\")&&(x<0?C.push(o.deltaLabel+\" \"+_3e.decreasing):C.push(o.deltaLabel+\" \"+_3e.increasing)),L(\"initial\")&&C.push(\"Initial: \"+o.initialLabel))}return C.length&&(o.extraText=C.join(\"<br>\")),o.color=Kwt(l,v),[o]};function Kwt(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(m3e(n))return n;if(m3e(i)&&a)return i}});var T3e=ye((Lcr,w3e)=>{\"use strict\";w3e.exports=function(t,r){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"initial\"in r&&(t.initial=r.initial),\"delta\"in r&&(t.delta=r.delta),\"final\"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var S3e=ye((Pcr,A3e)=>{\"use strict\";A3e.exports={attributes:tH(),layoutAttributes:rH(),supplyDefaults:nH().supplyDefaults,crossTraceDefaults:nH().crossTraceDefaults,supplyLayoutDefaults:e3e(),calc:o3e(),crossTraceCalc:u3e(),plot:h3e(),style:g3e().style,hoverPoints:b3e(),eventData:T3e(),selectPoints:AT(),moduleType:\"trace\",name:\"waterfall\",basePlotModule:vh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}});var E3e=ye((Icr,M3e)=>{\"use strict\";M3e.exports=S3e()});var jT=ye((Rcr,C3e)=>{\"use strict\";C3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:[\"\",\"\",\"\"]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},rgba256:{colormodel:\"rgba\",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+\"%\",t[2]=t[2]+\"%\",t},suffix:[\"\\xB0\",\"%\",\"%\"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+\"%\",t[2]=t[2]+\"%\",t},suffix:[\"\\xB0\",\"%\",\"%\",\"\"]}}}});var sH=ye((Dcr,L3e)=>{\"use strict\";var Jwt=Gl(),$wt=pf().zorder,Qwt=Qo().hovertemplateAttrs,k3e=Ao().extendFlat,e3t=jT().colormodel,q4=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],t3t=[],r3t=[];for(WT=0;WT<q4.length;WT++)O4=e3t[q4[WT]],t3t.push(\"For the `\"+q4[WT]+\"` colormodel, it is [\"+(O4.zminDflt||O4.min).join(\", \")+\"].\"),r3t.push(\"For the `\"+q4[WT]+\"` colormodel, it is [\"+(O4.zmaxDflt||O4.max).join(\", \")+\"].\");var O4,WT;L3e.exports=k3e({source:{valType:\"string\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},colormodel:{valType:\"enumerated\",values:q4,editType:\"calc\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",!1],dflt:!1,editType:\"plot\"},zmin:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},zmax:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",dflt:1,editType:\"calc\"},dy:{valType:\"number\",dflt:1,editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"data_array\",editType:\"plot\"},hoverinfo:k3e({},Jwt.hoverinfo,{flags:[\"x\",\"y\",\"z\",\"color\",\"name\",\"text\"],dflt:\"x+y+z+text+name\"}),hovertemplate:Qwt({},{keys:[\"z\",\"color\",\"colormodel\"]}),zorder:$wt})});var R3e=ye((Fcr,I3e)=>{\"use strict\";var i3t=Dr(),n3t=sH(),P3e=jT(),a3t=Ly().IMAGE_URL_PREFIX;I3e.exports=function(t,r){function n(o,s){return i3t.coerce(t,r,n3t,o,s)}n(\"source\"),r.source&&!r.source.match(a3t)&&delete r.source,r._hasSource=!!r.source;var i=n(\"z\");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n(\"x0\"),n(\"y0\"),n(\"dx\"),n(\"dy\");var a;r._hasZ?(n(\"colormodel\",\"rgb\"),a=P3e.colormodel[r.colormodel],n(\"zmin\",a.zminDflt||a.min),n(\"zmax\",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel=\"rgba256\",a=P3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n(\"zsmooth\"),n(\"text\"),n(\"hovertext\"),n(\"hovertemplate\"),r._length=null,n(\"zorder\")}});var Uy=ye((zcr,lH)=>{typeof Object.create==\"function\"?lH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:lH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var uH=ye((Ocr,D3e)=>{D3e.exports=vb().EventEmitter});var O3e=ye(B8=>{\"use strict\";B8.byteLength=s3t;B8.toByteArray=u3t;B8.fromByteArray=h3t;var zm=[],X0=[],o3t=typeof Uint8Array!=\"undefined\"?Uint8Array:Array,cH=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";for(s2=0,F3e=cH.length;s2<F3e;++s2)zm[s2]=cH[s2],X0[cH.charCodeAt(s2)]=s2;var s2,F3e;X0[45]=62;X0[95]=63;function z3e(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function s3t(e){var t=z3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function l3t(e,t,r){return(t+r)*3/4-r}function u3t(e){var t,r=z3e(e),n=r[0],i=r[1],a=new o3t(l3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l<s;l+=4)t=X0[e.charCodeAt(l)]<<18|X0[e.charCodeAt(l+1)]<<12|X0[e.charCodeAt(l+2)]<<6|X0[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=X0[e.charCodeAt(l)]<<2|X0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=X0[e.charCodeAt(l)]<<10|X0[e.charCodeAt(l+1)]<<4|X0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function c3t(e){return zm[e>>18&63]+zm[e>>12&63]+zm[e>>6&63]+zm[e&63]}function f3t(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(c3t(n));return i.join(\"\")}function h3t(e){for(var t,r=e.length,n=r%3,i=[],a=16383,o=0,s=r-n;o<s;o+=a)i.push(f3t(e,o,o+a>s?s:o+a));return n===1?(t=e[r-1],i.push(zm[t>>2]+zm[t<<4&63]+\"==\")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(zm[t>>10]+zm[t>>4&63]+zm[t<<2&63]+\"=\")),i.join(\"\")}});var q3e=ye(fH=>{fH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};fH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<<u)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=x*128}});var u2=ye(KT=>{\"use strict\";var hH=O3e(),ZT=q3e(),B3e=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;KT.Buffer=ta;KT.SlowBuffer=y3t;KT.INSPECT_MAX_BYTES=50;var N8=2147483647;KT.kMaxLength=N8;ta.TYPED_ARRAY_SUPPORT=d3t();!ta.TYPED_ARRAY_SUPPORT&&typeof console!=\"undefined\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function d3t(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(ta.prototype,\"parent\",{enumerable:!0,get:function(){if(ta.isBuffer(this))return this.buffer}});Object.defineProperty(ta.prototype,\"offset\",{enumerable:!0,get:function(){if(ta.isBuffer(this))return this.byteOffset}});function Vy(e){if(e>N8)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ta.prototype),t}function ta(e,t,r){if(typeof e==\"number\"){if(typeof t==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return gH(e)}return G3e(e,t,r)}ta.poolSize=8192;function G3e(e,t,r){if(typeof e==\"string\")return p3t(e,t);if(ArrayBuffer.isView(e))return g3t(e);if(e==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(Om(e,ArrayBuffer)||e&&Om(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!=\"undefined\"&&(Om(e,SharedArrayBuffer)||e&&Om(e.buffer,SharedArrayBuffer)))return vH(e,t,r);if(typeof e==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ta.from(n,t,r);let i=m3t(e);if(i)return i;if(typeof Symbol!=\"undefined\"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==\"function\")return ta.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}ta.from=function(e,t,r){return G3e(e,t,r)};Object.setPrototypeOf(ta.prototype,Uint8Array.prototype);Object.setPrototypeOf(ta,Uint8Array);function H3e(e){if(typeof e!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function v3t(e,t,r){return H3e(e),e<=0?Vy(e):t!==void 0?typeof r==\"string\"?Vy(e).fill(t,r):Vy(e).fill(t):Vy(e)}ta.alloc=function(e,t,r){return v3t(e,t,r)};function gH(e){return H3e(e),Vy(e<0?0:mH(e)|0)}ta.allocUnsafe=function(e){return gH(e)};ta.allocUnsafeSlow=function(e){return gH(e)};function p3t(e,t){if((typeof t!=\"string\"||t===\"\")&&(t=\"utf8\"),!ta.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);let r=j3e(e,t)|0,n=Vy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function dH(e){let t=e.length<0?0:mH(e.length)|0,r=Vy(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function g3t(e){if(Om(e,Uint8Array)){let t=new Uint8Array(e);return vH(t.buffer,t.byteOffset,t.byteLength)}return dH(e)}function vH(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,ta.prototype),n}function m3t(e){if(ta.isBuffer(e)){let t=mH(e.length)|0,r=Vy(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!=\"number\"||_H(e.length)?Vy(0):dH(e);if(e.type===\"Buffer\"&&Array.isArray(e.data))return dH(e.data)}function mH(e){if(e>=N8)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+N8.toString(16)+\" bytes\");return e|0}function y3t(e){return+e!=e&&(e=0),ta.alloc(+e)}ta.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ta.prototype};ta.compare=function(t,r){if(Om(t,Uint8Array)&&(t=ta.from(t,t.offset,t.byteLength)),Om(r,Uint8Array)&&(r=ta.from(r,r.offset,r.byteLength)),!ta.isBuffer(t)||!ta.isBuffer(r))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);a<o;++a)if(t[a]!==r[a]){n=t[a],i=r[a];break}return n<i?-1:i<n?1:0};ta.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}};ta.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(t.length===0)return ta.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=ta.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let o=t[n];if(Om(o,Uint8Array))a+o.length>i.length?(ta.isBuffer(o)||(o=ta.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ta.isBuffer(o))o.copy(i,a);else throw new TypeError('\"list\" argument must be an Array of Buffers');a+=o.length}return i};function j3e(e,t){if(ta.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Om(e,ArrayBuffer))return e.byteLength;if(typeof e!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return pH(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return r*2;case\"hex\":return r>>>1;case\"base64\":return eTe(e).length;default:if(i)return n?-1:pH(e).length;t=(\"\"+t).toLowerCase(),i=!0}}ta.byteLength=j3e;function _3t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return k3t(this,t,r);case\"utf8\":case\"utf-8\":return X3e(this,t,r);case\"ascii\":return E3t(this,t,r);case\"latin1\":case\"binary\":return C3t(this,t,r);case\"base64\":return S3t(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return L3t(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}ta.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ta.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let r=0;r<t;r+=2)l2(this,r,r+1);return this};ta.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let r=0;r<t;r+=4)l2(this,r,r+3),l2(this,r+1,r+2);return this};ta.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let r=0;r<t;r+=8)l2(this,r,r+7),l2(this,r+1,r+6),l2(this,r+2,r+5),l2(this,r+3,r+4);return this};ta.prototype.toString=function(){let t=this.length;return t===0?\"\":arguments.length===0?X3e(this,0,t):_3t.apply(this,arguments)};ta.prototype.toLocaleString=ta.prototype.toString;ta.prototype.equals=function(t){if(!ta.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t?!0:ta.compare(this,t)===0};ta.prototype.inspect=function(){let t=\"\",r=KT.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(t+=\" ... \"),\"<Buffer \"+t+\">\"};B3e&&(ta.prototype[B3e]=ta.prototype.inspect);ta.prototype.compare=function(t,r,n,i,a){if(Om(t,Uint8Array)&&(t=ta.from(t,t.offset,t.byteLength)),!ta.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError(\"out of range index\");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0};function W3e(e,t,r,n,i){if(e.length===0)return-1;if(typeof r==\"string\"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,_H(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t==\"string\"&&(t=ta.from(t,n)),ta.isBuffer(t))return t.length===0?-1:N3e(e,t,r,n,i);if(typeof t==\"number\")return t=t&255,typeof Uint8Array.prototype.indexOf==\"function\"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):N3e(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function N3e(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n===\"ucs2\"||n===\"ucs-2\"||n===\"utf16le\"||n===\"utf-16le\")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;u<o;u++)if(l(e,u)===l(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===s)return c*a}else c!==-1&&(u-=u-c),c=-1}else for(r+s>o&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;f<s;f++)if(l(e,u+f)!==l(t,f)){c=!1;break}if(c)return u}return-1}ta.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};ta.prototype.indexOf=function(t,r,n){return W3e(this,t,r,n,!0)};ta.prototype.lastIndexOf=function(t,r,n){return W3e(this,t,r,n,!1)};function x3t(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o<n;++o){let s=parseInt(t.substr(o*2,2),16);if(_H(s))return o;e[r+o]=s}return o}function b3t(e,t,r,n){return U8(pH(t,e.length-r),e,r,n)}function w3t(e,t,r,n){return U8(D3t(t),e,r,n)}function T3t(e,t,r,n){return U8(eTe(t),e,r,n)}function A3t(e,t,r,n){return U8(F3t(t,e.length-r),e,r,n)}ta.prototype.write=function(t,r,n,i){if(r===void 0)i=\"utf8\",n=this.length,r=0;else if(n===void 0&&typeof r==\"string\")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i=\"utf8\")):(i=n,n=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");let o=!1;for(;;)switch(i){case\"hex\":return x3t(this,t,r,n);case\"utf8\":case\"utf-8\":return b3t(this,t,r,n);case\"ascii\":case\"latin1\":case\"binary\":return w3t(this,t,r,n);case\"base64\":return T3t(this,t,r,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return A3t(this,t,r,n);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0}};ta.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function S3t(e,t,r){return t===0&&r===e.length?hH.fromByteArray(e):hH.fromByteArray(e.slice(t,r))}function X3e(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return M3t(n)}var U3e=4096;function M3t(e){let t=e.length;if(t<=U3e)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=U3e));return r}function E3t(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function C3t(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function k3t(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i=\"\";for(let a=t;a<r;++a)i+=z3t[e[a]];return i}function L3t(e,t,r){let n=e.slice(t,r),i=\"\";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}ta.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,ta.prototype),i};function ev(e,t,r){if(e%1!==0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}ta.prototype.readUintLE=ta.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return i};ta.prototype.readUintBE=ta.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ta.prototype.readUint8=ta.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ta.prototype.readUint16LE=ta.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ta.prototype.readUint16BE=ta.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ta.prototype.readUint32LE=ta.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ta.prototype.readUint32BE=ta.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ta.prototype.readBigUInt64LE=P_(function(t){t=t>>>0,YT(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&B4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});ta.prototype.readBigUInt64BE=P_(function(t){t=t>>>0,YT(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&B4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});ta.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};ta.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ta.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ta.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ta.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ta.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ta.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ta.prototype.readBigInt64LE=P_(function(t){t=t>>>0,YT(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&B4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});ta.prototype.readBigInt64BE=P_(function(t){t=t>>>0,YT(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&B4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});ta.prototype.readFloatLE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),ZT.read(this,t,!0,23,4)};ta.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),ZT.read(this,t,!1,23,4)};ta.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),ZT.read(this,t,!0,52,8)};ta.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),ZT.read(this,t,!1,52,8)};function Ip(e,t,r,n,i,a){if(!ta.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}ta.prototype.writeUintLE=ta.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Ip(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o<n&&(a*=256);)this[r+o]=t/a&255;return r+n};ta.prototype.writeUintBE=ta.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Ip(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ta.prototype.writeUint8=ta.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,1,255,0),this[r]=t&255,r+1};ta.prototype.writeUint16LE=ta.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ta.prototype.writeUint16BE=ta.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ta.prototype.writeUint32LE=ta.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ta.prototype.writeUint32BE=ta.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Z3e(e,t,r,n,i){Q3e(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function Y3e(e,t,r,n,i){Q3e(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ta.prototype.writeBigUInt64LE=P_(function(t,r=0){return Z3e(this,t,r,BigInt(0),BigInt(\"0xffffffffffffffff\"))});ta.prototype.writeBigUInt64BE=P_(function(t,r=0){return Y3e(this,t,r,BigInt(0),BigInt(\"0xffffffffffffffff\"))});ta.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Ip(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a<n&&(o*=256);)t<0&&s===0&&this[r+a-1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ta.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Ip(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ta.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ta.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ta.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ta.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ta.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Ip(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ta.prototype.writeBigInt64LE=P_(function(t,r=0){return Z3e(this,t,r,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});ta.prototype.writeBigInt64BE=P_(function(t,r=0){return Y3e(this,t,r,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function K3e(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function J3e(e,t,r,n,i){return t=+t,r=r>>>0,i||K3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),ZT.write(e,t,r,n,23,4),r+4}ta.prototype.writeFloatLE=function(t,r,n){return J3e(this,t,r,!0,n)};ta.prototype.writeFloatBE=function(t,r,n){return J3e(this,t,r,!1,n)};function $3e(e,t,r,n,i){return t=+t,r=r>>>0,i||K3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),ZT.write(e,t,r,n,52,8),r+8}ta.prototype.writeDoubleLE=function(t,r,n){return $3e(this,t,r,!0,n)};ta.prototype.writeDoubleBE=function(t,r,n){return $3e(this,t,r,!1,n)};ta.prototype.copy=function(t,r,n,i){if(!ta.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let a=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin==\"function\"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),a};ta.prototype.fill=function(t,r,n,i){if(typeof t==\"string\"){if(typeof r==\"string\"?(i=r,r=0,n=this.length):typeof n==\"string\"&&(i=n,n=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!ta.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){let o=t.charCodeAt(0);(i===\"utf8\"&&o<128||i===\"latin1\")&&(t=o)}}else typeof t==\"number\"?t=t&255:typeof t==\"boolean\"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError(\"Out of range index\");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t==\"number\")for(a=r;a<n;++a)this[a]=t;else{let o=ta.isBuffer(t)?t:ta.from(t,i),s=o.length;if(s===0)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(a=0;a<n-r;++a)this[a+r]=o[a%s]}return this};var XT={};function yH(e,t,r){XT[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}yH(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"},RangeError);yH(\"ERR_INVALID_ARG_TYPE\",function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`},TypeError);yH(\"ERR_OUT_OF_RANGE\",function(e,t,r){let n=`The value of \"${e}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=V3e(String(r)):typeof r==\"bigint\"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=V3e(i)),i+=\"n\"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function V3e(e){let t=\"\",r=e.length,n=e[0]===\"-\"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P3t(e,t,r){YT(t,\"offset\"),(e[t]===void 0||e[t+r]===void 0)&&B4(t,e.length-(r+1))}function Q3e(e,t,r,n,i,a){if(e>r||e<t){let o=typeof t==\"bigint\"?\"n\":\"\",s;throw a>3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new XT.ERR_OUT_OF_RANGE(\"value\",s,e)}P3t(n,i,a)}function YT(e,t){if(typeof e!=\"number\")throw new XT.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function B4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new XT.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e)):t<0?new XT.ERR_BUFFER_OUT_OF_BOUNDS:new XT.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}var I3t=/[^+/0-9A-Za-z-_]/g;function R3t(e){if(e=e.split(\"=\")[0],e=e.trim().replace(I3t,\"\"),e.length<2)return\"\";for(;e.length%4!==0;)e=e+\"=\";return e}function pH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error(\"Invalid code point\")}return a}function D3t(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function F3t(e,t){let r,n,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function eTe(e){return hH.toByteArray(R3t(e))}function U8(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Om(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function _H(e){return e!==e}var z3t=function(){let e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function P_(e){return typeof BigInt==\"undefined\"?O3t:e}function O3t(){throw new Error(\"BigInt not supported\")}});var V8=ye((Vcr,tTe)=>{\"use strict\";tTe.exports=function(){if(typeof Symbol!=\"function\"||typeof Object.getOwnPropertySymbols!=\"function\")return!1;if(typeof Symbol.iterator==\"symbol\")return!0;var t={},r=Symbol(\"test\"),n=Object(r);if(typeof r==\"string\"||Object.prototype.toString.call(r)!==\"[object Symbol]\"||Object.prototype.toString.call(n)!==\"[object Symbol]\")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys==\"function\"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames==\"function\"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor==\"function\"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var N4=ye((Gcr,rTe)=>{\"use strict\";var q3t=V8();rTe.exports=function(){return q3t()&&!!Symbol.toStringTag}});var xH=ye((Hcr,iTe)=>{\"use strict\";iTe.exports=Object});var aTe=ye((jcr,nTe)=>{\"use strict\";nTe.exports=Error});var sTe=ye((Wcr,oTe)=>{\"use strict\";oTe.exports=EvalError});var uTe=ye((Xcr,lTe)=>{\"use strict\";lTe.exports=RangeError});var fTe=ye((Zcr,cTe)=>{\"use strict\";cTe.exports=ReferenceError});var bH=ye((Ycr,hTe)=>{\"use strict\";hTe.exports=SyntaxError});var JT=ye((Kcr,dTe)=>{\"use strict\";dTe.exports=TypeError});var pTe=ye((Jcr,vTe)=>{\"use strict\";vTe.exports=URIError});var mTe=ye(($cr,gTe)=>{\"use strict\";gTe.exports=Math.abs});var _Te=ye((Qcr,yTe)=>{\"use strict\";yTe.exports=Math.floor});var bTe=ye((efr,xTe)=>{\"use strict\";xTe.exports=Math.max});var TTe=ye((tfr,wTe)=>{\"use strict\";wTe.exports=Math.min});var STe=ye((rfr,ATe)=>{\"use strict\";ATe.exports=Math.pow});var ETe=ye((ifr,MTe)=>{\"use strict\";MTe.exports=Math.round});var kTe=ye((nfr,CTe)=>{\"use strict\";CTe.exports=Number.isNaN||function(t){return t!==t}});var PTe=ye((afr,LTe)=>{\"use strict\";var B3t=kTe();LTe.exports=function(t){return B3t(t)||t===0?t:t<0?-1:1}});var RTe=ye((ofr,ITe)=>{\"use strict\";ITe.exports=Object.getOwnPropertyDescriptor});var c2=ye((sfr,DTe)=>{\"use strict\";var G8=RTe();if(G8)try{G8([],\"length\")}catch(e){G8=null}DTe.exports=G8});var U4=ye((lfr,FTe)=>{\"use strict\";var H8=Object.defineProperty||!1;if(H8)try{H8({},\"a\",{value:1})}catch(e){H8=!1}FTe.exports=H8});var qTe=ye((ufr,OTe)=>{\"use strict\";var zTe=typeof Symbol!=\"undefined\"&&Symbol,N3t=V8();OTe.exports=function(){return typeof zTe!=\"function\"||typeof Symbol!=\"function\"||typeof zTe(\"foo\")!=\"symbol\"||typeof Symbol(\"bar\")!=\"symbol\"?!1:N3t()}});var wH=ye((cfr,BTe)=>{\"use strict\";BTe.exports=typeof Reflect!=\"undefined\"&&Reflect.getPrototypeOf||null});var TH=ye((ffr,NTe)=>{\"use strict\";var U3t=xH();NTe.exports=U3t.getPrototypeOf||null});var GTe=ye((hfr,VTe)=>{\"use strict\";var V3t=\"Function.prototype.bind called on incompatible \",G3t=Object.prototype.toString,H3t=Math.max,j3t=\"[object Function]\",UTe=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},W3t=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},X3t=function(e,t){for(var r=\"\",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};VTe.exports=function(t){var r=this;if(typeof r!=\"function\"||G3t.apply(r)!==j3t)throw new TypeError(V3t+r);for(var n=W3t(arguments,1),i,a=function(){if(this instanceof i){var c=r.apply(this,UTe(n,arguments));return Object(c)===c?c:this}return r.apply(t,UTe(n,arguments))},o=H3t(0,r.length-n.length),s=[],l=0;l<o;l++)s[l]=\"$\"+l;if(i=Function(\"binder\",\"return function (\"+X3t(s,\",\")+\"){ return binder.apply(this,arguments); }\")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var $T=ye((dfr,HTe)=>{\"use strict\";var Z3t=GTe();HTe.exports=Function.prototype.bind||Z3t});var j8=ye((vfr,jTe)=>{\"use strict\";jTe.exports=Function.prototype.call});var AH=ye((pfr,WTe)=>{\"use strict\";WTe.exports=Function.prototype.apply});var ZTe=ye((gfr,XTe)=>{\"use strict\";XTe.exports=typeof Reflect!=\"undefined\"&&Reflect&&Reflect.apply});var KTe=ye((mfr,YTe)=>{\"use strict\";var Y3t=$T(),K3t=AH(),J3t=j8(),$3t=ZTe();YTe.exports=$3t||Y3t.call(J3t,K3t)});var $Te=ye((yfr,JTe)=>{\"use strict\";var Q3t=$T(),eTt=JT(),tTt=j8(),rTt=KTe();JTe.exports=function(t){if(t.length<1||typeof t[0]!=\"function\")throw new eTt(\"a function is required\");return rTt(Q3t,tTt,t)}});var nAe=ye((_fr,iAe)=>{\"use strict\";var iTt=$Te(),QTe=c2(),tAe;try{tAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=\"object\"||!(\"code\"in e)||e.code!==\"ERR_PROTO_ACCESS\")throw e}var SH=!!tAe&&QTe&&QTe(Object.prototype,\"__proto__\"),rAe=Object,eAe=rAe.getPrototypeOf;iAe.exports=SH&&typeof SH.get==\"function\"?iTt([SH.get]):typeof eAe==\"function\"?function(t){return eAe(t==null?t:rAe(t))}:!1});var uAe=ye((xfr,lAe)=>{\"use strict\";var aAe=wH(),oAe=TH(),sAe=nAe();lAe.exports=aAe?function(t){return aAe(t)}:oAe?function(t){if(!t||typeof t!=\"object\"&&typeof t!=\"function\")throw new TypeError(\"getProto: not an object\");return oAe(t)}:sAe?function(t){return sAe(t)}:null});var fAe=ye((bfr,cAe)=>{\"use strict\";var nTt=Function.prototype.call,aTt=Object.prototype.hasOwnProperty,oTt=$T();cAe.exports=oTt.call(nTt,aTt)});var Z8=ye((wfr,mAe)=>{\"use strict\";var lu,sTt=xH(),lTt=aTe(),uTt=sTe(),cTt=uTe(),fTt=fTe(),rA=bH(),tA=JT(),hTt=pTe(),dTt=mTe(),vTt=_Te(),pTt=bTe(),gTt=TTe(),mTt=STe(),yTt=ETe(),_Tt=PTe(),pAe=Function,MH=function(e){try{return pAe('\"use strict\"; return ('+e+\").constructor;\")()}catch(t){}},V4=c2(),xTt=U4(),EH=function(){throw new tA},bTt=V4?function(){try{return arguments.callee,EH}catch(e){try{return V4(arguments,\"callee\").get}catch(t){return EH}}}():EH,QT=qTe()(),tv=uAe(),wTt=TH(),TTt=wH(),gAe=AH(),G4=j8(),eA={},ATt=typeof Uint8Array==\"undefined\"||!tv?lu:tv(Uint8Array),f2={__proto__:null,\"%AggregateError%\":typeof AggregateError==\"undefined\"?lu:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":typeof ArrayBuffer==\"undefined\"?lu:ArrayBuffer,\"%ArrayIteratorPrototype%\":QT&&tv?tv([][Symbol.iterator]()):lu,\"%AsyncFromSyncIteratorPrototype%\":lu,\"%AsyncFunction%\":eA,\"%AsyncGenerator%\":eA,\"%AsyncGeneratorFunction%\":eA,\"%AsyncIteratorPrototype%\":eA,\"%Atomics%\":typeof Atomics==\"undefined\"?lu:Atomics,\"%BigInt%\":typeof BigInt==\"undefined\"?lu:BigInt,\"%BigInt64Array%\":typeof BigInt64Array==\"undefined\"?lu:BigInt64Array,\"%BigUint64Array%\":typeof BigUint64Array==\"undefined\"?lu:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":typeof DataView==\"undefined\"?lu:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":lTt,\"%eval%\":eval,\"%EvalError%\":uTt,\"%Float16Array%\":typeof Float16Array==\"undefined\"?lu:Float16Array,\"%Float32Array%\":typeof Float32Array==\"undefined\"?lu:Float32Array,\"%Float64Array%\":typeof Float64Array==\"undefined\"?lu:Float64Array,\"%FinalizationRegistry%\":typeof FinalizationRegistry==\"undefined\"?lu:FinalizationRegistry,\"%Function%\":pAe,\"%GeneratorFunction%\":eA,\"%Int8Array%\":typeof Int8Array==\"undefined\"?lu:Int8Array,\"%Int16Array%\":typeof Int16Array==\"undefined\"?lu:Int16Array,\"%Int32Array%\":typeof Int32Array==\"undefined\"?lu:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":QT&&tv?tv(tv([][Symbol.iterator]())):lu,\"%JSON%\":typeof JSON==\"object\"?JSON:lu,\"%Map%\":typeof Map==\"undefined\"?lu:Map,\"%MapIteratorPrototype%\":typeof Map==\"undefined\"||!QT||!tv?lu:tv(new Map()[Symbol.iterator]()),\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":sTt,\"%Object.getOwnPropertyDescriptor%\":V4,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":typeof Promise==\"undefined\"?lu:Promise,\"%Proxy%\":typeof Proxy==\"undefined\"?lu:Proxy,\"%RangeError%\":cTt,\"%ReferenceError%\":fTt,\"%Reflect%\":typeof Reflect==\"undefined\"?lu:Reflect,\"%RegExp%\":RegExp,\"%Set%\":typeof Set==\"undefined\"?lu:Set,\"%SetIteratorPrototype%\":typeof Set==\"undefined\"||!QT||!tv?lu:tv(new Set()[Symbol.iterator]()),\"%SharedArrayBuffer%\":typeof SharedArrayBuffer==\"undefined\"?lu:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":QT&&tv?tv(\"\"[Symbol.iterator]()):lu,\"%Symbol%\":QT?Symbol:lu,\"%SyntaxError%\":rA,\"%ThrowTypeError%\":bTt,\"%TypedArray%\":ATt,\"%TypeError%\":tA,\"%Uint8Array%\":typeof Uint8Array==\"undefined\"?lu:Uint8Array,\"%Uint8ClampedArray%\":typeof Uint8ClampedArray==\"undefined\"?lu:Uint8ClampedArray,\"%Uint16Array%\":typeof Uint16Array==\"undefined\"?lu:Uint16Array,\"%Uint32Array%\":typeof Uint32Array==\"undefined\"?lu:Uint32Array,\"%URIError%\":hTt,\"%WeakMap%\":typeof WeakMap==\"undefined\"?lu:WeakMap,\"%WeakRef%\":typeof WeakRef==\"undefined\"?lu:WeakRef,\"%WeakSet%\":typeof WeakSet==\"undefined\"?lu:WeakSet,\"%Function.prototype.call%\":G4,\"%Function.prototype.apply%\":gAe,\"%Object.defineProperty%\":xTt,\"%Object.getPrototypeOf%\":wTt,\"%Math.abs%\":dTt,\"%Math.floor%\":vTt,\"%Math.max%\":pTt,\"%Math.min%\":gTt,\"%Math.pow%\":mTt,\"%Math.round%\":yTt,\"%Math.sign%\":_Tt,\"%Reflect.getPrototypeOf%\":TTt};if(tv)try{null.error}catch(e){hAe=tv(tv(e)),f2[\"%Error.prototype%\"]=hAe}var hAe,STt=function e(t){var r;if(t===\"%AsyncFunction%\")r=MH(\"async function () {}\");else if(t===\"%GeneratorFunction%\")r=MH(\"function* () {}\");else if(t===\"%AsyncGeneratorFunction%\")r=MH(\"async function* () {}\");else if(t===\"%AsyncGenerator%\"){var n=e(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(t===\"%AsyncIteratorPrototype%\"){var i=e(\"%AsyncGenerator%\");i&&tv&&(r=tv(i.prototype))}return f2[t]=r,r},dAe={__proto__:null,\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},H4=$T(),W8=fAe(),MTt=H4.call(G4,Array.prototype.concat),ETt=H4.call(gAe,Array.prototype.splice),vAe=H4.call(G4,String.prototype.replace),X8=H4.call(G4,String.prototype.slice),CTt=H4.call(G4,RegExp.prototype.exec),kTt=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,LTt=/\\\\(\\\\)?/g,PTt=function(t){var r=X8(t,0,1),n=X8(t,-1);if(r===\"%\"&&n!==\"%\")throw new rA(\"invalid intrinsic syntax, expected closing `%`\");if(n===\"%\"&&r!==\"%\")throw new rA(\"invalid intrinsic syntax, expected opening `%`\");var i=[];return vAe(t,kTt,function(a,o,s,l){i[i.length]=s?vAe(l,LTt,\"$1\"):o||a}),i},ITt=function(t,r){var n=t,i;if(W8(dAe,n)&&(i=dAe[n],n=\"%\"+i[0]+\"%\"),W8(f2,n)){var a=f2[n];if(a===eA&&(a=STt(n)),typeof a==\"undefined\"&&!r)throw new tA(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:i,name:n,value:a}}throw new rA(\"intrinsic \"+t+\" does not exist!\")};mAe.exports=function(t,r){if(typeof t!=\"string\"||t.length===0)throw new tA(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&typeof r!=\"boolean\")throw new tA('\"allowMissing\" argument must be a boolean');if(CTt(/^%?[^%]*%?$/,t)===null)throw new rA(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var n=PTt(t),i=n.length>0?n[0]:\"\",a=ITt(\"%\"+i+\"%\",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],ETt(n,MTt([0,1],u)));for(var c=1,f=!0;c<n.length;c+=1){var h=n[c],d=X8(h,0,1),v=X8(h,-1);if((d==='\"'||d===\"'\"||d===\"`\"||v==='\"'||v===\"'\"||v===\"`\")&&d!==v)throw new rA(\"property names with quotes must have matching quotes\");if((h===\"constructor\"||!f)&&(l=!0),i+=\".\"+h,o=\"%\"+i+\"%\",W8(f2,o))s=f2[o];else if(s!=null){if(!(h in s)){if(!r)throw new tA(\"base intrinsic for \"+t+\" exists, but the property is not available.\");return}if(V4&&c+1>=n.length){var x=V4(s,h);f=!!x,f&&\"get\"in x&&!(\"originalValue\"in x.get)?s=x.get:s=s[h]}else f=W8(s,h),s=s[h];f&&!l&&(f2[o]=s)}}return s}});var bAe=ye((Tfr,xAe)=>{\"use strict\";var yAe=U4(),RTt=bH(),iA=JT(),_Ae=c2();xAe.exports=function(t,r,n){if(!t||typeof t!=\"object\"&&typeof t!=\"function\")throw new iA(\"`obj` must be an object or a function`\");if(typeof r!=\"string\"&&typeof r!=\"symbol\")throw new iA(\"`property` must be a string or a symbol`\");if(arguments.length>3&&typeof arguments[3]!=\"boolean\"&&arguments[3]!==null)throw new iA(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&typeof arguments[4]!=\"boolean\"&&arguments[4]!==null)throw new iA(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&typeof arguments[5]!=\"boolean\"&&arguments[5]!==null)throw new iA(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&typeof arguments[6]!=\"boolean\")throw new iA(\"`loose`, if provided, must be a boolean\");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!_Ae&&_Ae(t,r);if(yAe)yAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new RTt(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\")}});var kH=ye((Afr,TAe)=>{\"use strict\";var CH=U4(),wAe=function(){return!!CH};wAe.hasArrayLengthDefineBug=function(){if(!CH)return null;try{return CH([],\"length\",{value:1}).length!==1}catch(t){return!0}};TAe.exports=wAe});var CAe=ye((Sfr,EAe)=>{\"use strict\";var DTt=Z8(),AAe=bAe(),FTt=kH()(),SAe=c2(),MAe=JT(),zTt=DTt(\"%Math.floor%\");EAe.exports=function(t,r){if(typeof t!=\"function\")throw new MAe(\"`fn` is not a function\");if(typeof r!=\"number\"||r<0||r>4294967295||zTt(r)!==r)throw new MAe(\"`length` must be a positive 32-bit integer\");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if(\"length\"in t&&SAe){var o=SAe(t,\"length\");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(FTt?AAe(t,\"length\",r,!0,!0):AAe(t,\"length\",r)),t}});var j4=ye((Mfr,Y8)=>{\"use strict\";var LH=$T(),K8=Z8(),OTt=CAe(),qTt=JT(),PAe=K8(\"%Function.prototype.apply%\"),IAe=K8(\"%Function.prototype.call%\"),RAe=K8(\"%Reflect.apply%\",!0)||LH.call(IAe,PAe),kAe=U4(),BTt=K8(\"%Math.max%\");Y8.exports=function(t){if(typeof t!=\"function\")throw new qTt(\"a function is required\");var r=RAe(LH,IAe,arguments);return OTt(r,1+BTt(0,t.length-(arguments.length-1)),!0)};var LAe=function(){return RAe(LH,PAe,arguments)};kAe?kAe(Y8.exports,\"apply\",{value:LAe}):Y8.exports.apply=LAe});var nA=ye((Efr,zAe)=>{\"use strict\";var DAe=Z8(),FAe=j4(),NTt=FAe(DAe(\"String.prototype.indexOf\"));zAe.exports=function(t,r){var n=DAe(t,!!r);return typeof n==\"function\"&&NTt(t,\".prototype.\")>-1?FAe(n):n}});var BAe=ye((Cfr,qAe)=>{\"use strict\";var UTt=N4()(),VTt=nA(),PH=VTt(\"Object.prototype.toString\"),J8=function(t){return UTt&&t&&typeof t==\"object\"&&Symbol.toStringTag in t?!1:PH(t)===\"[object Arguments]\"},OAe=function(t){return J8(t)?!0:t!==null&&typeof t==\"object\"&&typeof t.length==\"number\"&&t.length>=0&&PH(t)!==\"[object Array]\"&&PH(t.callee)===\"[object Function]\"},GTt=function(){return J8(arguments)}();J8.isLegacyArguments=OAe;qAe.exports=GTt?J8:OAe});var VAe=ye((kfr,UAe)=>{\"use strict\";var HTt=Object.prototype.toString,jTt=Function.prototype.toString,WTt=/^\\s*(?:function)?\\*/,NAe=N4()(),IH=Object.getPrototypeOf,XTt=function(){if(!NAe)return!1;try{return Function(\"return function*() {}\")()}catch(e){}},RH;UAe.exports=function(t){if(typeof t!=\"function\")return!1;if(WTt.test(jTt.call(t)))return!0;if(!NAe){var r=HTt.call(t);return r===\"[object GeneratorFunction]\"}if(!IH)return!1;if(typeof RH==\"undefined\"){var n=XTt();RH=n?IH(n):!1}return IH(t)===RH}});var WAe=ye((Lfr,jAe)=>{\"use strict\";var HAe=Function.prototype.toString,aA=typeof Reflect==\"object\"&&Reflect!==null&&Reflect.apply,FH,$8;if(typeof aA==\"function\"&&typeof Object.defineProperty==\"function\")try{FH=Object.defineProperty({},\"length\",{get:function(){throw $8}}),$8={},aA(function(){throw 42},null,FH)}catch(e){e!==$8&&(aA=null)}else aA=null;var ZTt=/^\\s*class\\b/,zH=function(t){try{var r=HAe.call(t);return ZTt.test(r)}catch(n){return!1}},DH=function(t){try{return zH(t)?!1:(HAe.call(t),!0)}catch(r){return!1}},Q8=Object.prototype.toString,YTt=\"[object Object]\",KTt=\"[object Function]\",JTt=\"[object GeneratorFunction]\",$Tt=\"[object HTMLAllCollection]\",QTt=\"[object HTML document.all class]\",eAt=\"[object HTMLCollection]\",tAt=typeof Symbol==\"function\"&&!!Symbol.toStringTag,rAt=!(0 in[,]),OH=function(){return!1};typeof document==\"object\"&&(GAe=document.all,Q8.call(GAe)===Q8.call(document.all)&&(OH=function(t){if((rAt||!t)&&(typeof t==\"undefined\"||typeof t==\"object\"))try{var r=Q8.call(t);return(r===$Tt||r===QTt||r===eAt||r===YTt)&&t(\"\")==null}catch(n){}return!1}));var GAe;jAe.exports=aA?function(t){if(OH(t))return!0;if(!t||typeof t!=\"function\"&&typeof t!=\"object\")return!1;try{aA(t,null,FH)}catch(r){if(r!==$8)return!1}return!zH(t)&&DH(t)}:function(t){if(OH(t))return!0;if(!t||typeof t!=\"function\"&&typeof t!=\"object\")return!1;if(tAt)return DH(t);if(zH(t))return!1;var r=Q8.call(t);return r!==KTt&&r!==JTt&&!/^\\[object HTML/.test(r)?!1:DH(t)}});var qH=ye((Pfr,ZAe)=>{\"use strict\";var iAt=WAe(),nAt=Object.prototype.toString,XAe=Object.prototype.hasOwnProperty,aAt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)XAe.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},oAt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},sAt=function(t,r,n){for(var i in t)XAe.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},lAt=function(t,r,n){if(!iAt(r))throw new TypeError(\"iterator must be a function\");var i;arguments.length>=3&&(i=n),nAt.call(t)===\"[object Array]\"?aAt(t,r,i):typeof t==\"string\"?oAt(t,r,i):sAt(t,r,i)};ZAe.exports=lAt});var NH=ye((Ifr,YAe)=>{\"use strict\";var BH=[\"BigInt64Array\",\"BigUint64Array\",\"Float32Array\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\"],uAt=typeof globalThis==\"undefined\"?window:globalThis;YAe.exports=function(){for(var t=[],r=0;r<BH.length;r++)typeof uAt[BH[r]]==\"function\"&&(t[t.length]=BH[r]);return t}});var e5e=ye((Rfr,QAe)=>{\"use strict\";var tR=qH(),cAt=NH(),KAe=j4(),GH=nA(),eR=c2(),fAt=GH(\"Object.prototype.toString\"),$Ae=N4()(),JAe=typeof globalThis==\"undefined\"?window:globalThis,VH=cAt(),HH=GH(\"String.prototype.slice\"),UH=Object.getPrototypeOf,hAt=GH(\"Array.prototype.indexOf\",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},rR={__proto__:null};$Ae&&eR&&UH?tR(VH,function(e){var t=new JAe[e];if(Symbol.toStringTag in t){var r=UH(t),n=eR(r,Symbol.toStringTag);if(!n){var i=UH(r);n=eR(i,Symbol.toStringTag)}rR[\"$\"+e]=KAe(n.get)}}):tR(VH,function(e){var t=new JAe[e],r=t.slice||t.set;r&&(rR[\"$\"+e]=KAe(r))});var dAt=function(t){var r=!1;return tR(rR,function(n,i){if(!r)try{\"$\"+n(t)===i&&(r=HH(i,1))}catch(a){}}),r},vAt=function(t){var r=!1;return tR(rR,function(n,i){if(!r)try{n(t),r=HH(i,1)}catch(a){}}),r};QAe.exports=function(t){if(!t||typeof t!=\"object\")return!1;if(!$Ae){var r=HH(fAt(t),8,-1);return hAt(VH,r)>-1?r:r!==\"Object\"?!1:vAt(t)}return eR?dAt(t):null}});var o5e=ye((Dfr,a5e)=>{\"use strict\";var t5e=qH(),pAt=NH(),WH=nA(),gAt=WH(\"Object.prototype.toString\"),r5e=N4()(),iR=c2(),mAt=typeof globalThis==\"undefined\"?window:globalThis,i5e=pAt(),yAt=WH(\"Array.prototype.indexOf\",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},_At=WH(\"String.prototype.slice\"),n5e={},jH=Object.getPrototypeOf;r5e&&iR&&jH&&t5e(i5e,function(e){var t=new mAt[e];if(Symbol.toStringTag in t){var r=jH(t),n=iR(r,Symbol.toStringTag);if(!n){var i=jH(r);n=iR(i,Symbol.toStringTag)}n5e[e]=n.get}});var xAt=function(t){var r=!1;return t5e(n5e,function(n,i){if(!r)try{r=n.call(t)===i}catch(a){}}),r};a5e.exports=function(t){if(!t||typeof t!=\"object\")return!1;if(!r5e||!(Symbol.toStringTag in t)){var r=_At(gAt(t),8,-1);return yAt(i5e,r)>-1}return iR?xAt(t):!1}});var YH=ye(uu=>{\"use strict\";var bAt=BAe(),wAt=VAe(),Gg=e5e(),s5e=o5e();function oA(e){return e.call.bind(e)}var l5e=typeof BigInt!=\"undefined\",u5e=typeof Symbol!=\"undefined\",Z0=oA(Object.prototype.toString),TAt=oA(Number.prototype.valueOf),AAt=oA(String.prototype.valueOf),SAt=oA(Boolean.prototype.valueOf);l5e&&(c5e=oA(BigInt.prototype.valueOf));var c5e;u5e&&(f5e=oA(Symbol.prototype.valueOf));var f5e;function X4(e,t){if(typeof e!=\"object\")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=bAt;uu.isGeneratorFunction=wAt;uu.isTypedArray=s5e;function MAt(e){return typeof Promise!=\"undefined\"&&e instanceof Promise||e!==null&&typeof e==\"object\"&&typeof e.then==\"function\"&&typeof e.catch==\"function\"}uu.isPromise=MAt;function EAt(e){return typeof ArrayBuffer!=\"undefined\"&&ArrayBuffer.isView?ArrayBuffer.isView(e):s5e(e)||d5e(e)}uu.isArrayBufferView=EAt;function CAt(e){return Gg(e)===\"Uint8Array\"}uu.isUint8Array=CAt;function kAt(e){return Gg(e)===\"Uint8ClampedArray\"}uu.isUint8ClampedArray=kAt;function LAt(e){return Gg(e)===\"Uint16Array\"}uu.isUint16Array=LAt;function PAt(e){return Gg(e)===\"Uint32Array\"}uu.isUint32Array=PAt;function IAt(e){return Gg(e)===\"Int8Array\"}uu.isInt8Array=IAt;function RAt(e){return Gg(e)===\"Int16Array\"}uu.isInt16Array=RAt;function DAt(e){return Gg(e)===\"Int32Array\"}uu.isInt32Array=DAt;function FAt(e){return Gg(e)===\"Float32Array\"}uu.isFloat32Array=FAt;function zAt(e){return Gg(e)===\"Float64Array\"}uu.isFloat64Array=zAt;function OAt(e){return Gg(e)===\"BigInt64Array\"}uu.isBigInt64Array=OAt;function qAt(e){return Gg(e)===\"BigUint64Array\"}uu.isBigUint64Array=qAt;function nR(e){return Z0(e)===\"[object Map]\"}nR.working=typeof Map!=\"undefined\"&&nR(new Map);function BAt(e){return typeof Map==\"undefined\"?!1:nR.working?nR(e):e instanceof Map}uu.isMap=BAt;function aR(e){return Z0(e)===\"[object Set]\"}aR.working=typeof Set!=\"undefined\"&&aR(new Set);function NAt(e){return typeof Set==\"undefined\"?!1:aR.working?aR(e):e instanceof Set}uu.isSet=NAt;function oR(e){return Z0(e)===\"[object WeakMap]\"}oR.working=typeof WeakMap!=\"undefined\"&&oR(new WeakMap);function UAt(e){return typeof WeakMap==\"undefined\"?!1:oR.working?oR(e):e instanceof WeakMap}uu.isWeakMap=UAt;function ZH(e){return Z0(e)===\"[object WeakSet]\"}ZH.working=typeof WeakSet!=\"undefined\"&&ZH(new WeakSet);function VAt(e){return ZH(e)}uu.isWeakSet=VAt;function sR(e){return Z0(e)===\"[object ArrayBuffer]\"}sR.working=typeof ArrayBuffer!=\"undefined\"&&sR(new ArrayBuffer);function h5e(e){return typeof ArrayBuffer==\"undefined\"?!1:sR.working?sR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=h5e;function lR(e){return Z0(e)===\"[object DataView]\"}lR.working=typeof ArrayBuffer!=\"undefined\"&&typeof DataView!=\"undefined\"&&lR(new DataView(new ArrayBuffer(1),0,1));function d5e(e){return typeof DataView==\"undefined\"?!1:lR.working?lR(e):e instanceof DataView}uu.isDataView=d5e;var XH=typeof SharedArrayBuffer!=\"undefined\"?SharedArrayBuffer:void 0;function W4(e){return Z0(e)===\"[object SharedArrayBuffer]\"}function v5e(e){return typeof XH==\"undefined\"?!1:(typeof W4.working==\"undefined\"&&(W4.working=W4(new XH)),W4.working?W4(e):e instanceof XH)}uu.isSharedArrayBuffer=v5e;function GAt(e){return Z0(e)===\"[object AsyncFunction]\"}uu.isAsyncFunction=GAt;function HAt(e){return Z0(e)===\"[object Map Iterator]\"}uu.isMapIterator=HAt;function jAt(e){return Z0(e)===\"[object Set Iterator]\"}uu.isSetIterator=jAt;function WAt(e){return Z0(e)===\"[object Generator]\"}uu.isGeneratorObject=WAt;function XAt(e){return Z0(e)===\"[object WebAssembly.Module]\"}uu.isWebAssemblyCompiledModule=XAt;function p5e(e){return X4(e,TAt)}uu.isNumberObject=p5e;function g5e(e){return X4(e,AAt)}uu.isStringObject=g5e;function m5e(e){return X4(e,SAt)}uu.isBooleanObject=m5e;function y5e(e){return l5e&&X4(e,c5e)}uu.isBigIntObject=y5e;function _5e(e){return u5e&&X4(e,f5e)}uu.isSymbolObject=_5e;function ZAt(e){return p5e(e)||g5e(e)||m5e(e)||y5e(e)||_5e(e)}uu.isBoxedPrimitive=ZAt;function YAt(e){return typeof Uint8Array!=\"undefined\"&&(h5e(e)||v5e(e))}uu.isAnyArrayBuffer=YAt;[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+\" is not supported in userland\")}})})});var KH=ye((zfr,x5e)=>{x5e.exports=function(t){return t&&typeof t==\"object\"&&typeof t.copy==\"function\"&&typeof t.fill==\"function\"&&typeof t.readUInt8==\"function\"}});var rj=ye(cu=>{var b5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},KAt=/%[sdj%]/g;cu.format=function(e){if(!pR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(I_(arguments[r]));return t.join(\" \")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(KAt,function(s){if(s===\"%%\")return\"%\";if(r>=i)return s;switch(s){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(l){return\"[Circular]\"}default:return s}}),o=n[r];r<i;o=n[++r])vR(o)||!sA(o)?a+=\" \"+o:a+=\" \"+I_(o);return a};cu.deprecate=function(e,t){if(typeof process!=\"undefined\"&&process.noDeprecation===!0)return e;if(typeof process==\"undefined\")return function(){return cu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var uR={},w5e=/^$/;cR=\"false\",cR=cR.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),w5e=new RegExp(\"^\"+cR+\"$\",\"i\");var cR;cu.debuglog=function(e){if(e=e.toUpperCase(),!uR[e])if(w5e.test(e)){var t=process.pid;uR[e]=function(){var r=cu.format.apply(cu,arguments);console.error(\"%s %d: %s\",e,t,r)}}else uR[e]=function(){};return uR[e]};function I_(e,t){var r={seen:[],stylize:$At};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ej(t)?r.showHidden=t:t&&cu._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=JAt),hR(r,e,r.depth)}cu.inspect=I_;I_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};I_.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"};function JAt(e,t){var r=I_.styles[t];return r?\"\\x1B[\"+I_.colors[r][0]+\"m\"+e+\"\\x1B[\"+I_.colors[r][1]+\"m\":e}function $At(e,t){return e}function QAt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function hR(e,t,r){if(e.customInspect&&t&&fR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return pR(n)||(n=hR(e,n,r)),n}var i=e5t(e,t);if(i)return i;var a=Object.keys(t),o=QAt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),Y4(t)&&(a.indexOf(\"message\")>=0||a.indexOf(\"description\")>=0))return JH(t);if(a.length===0){if(fR(t)){var s=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+s+\"]\",\"special\")}if(Z4(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(dR(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(Y4(t))return JH(t)}var l=\"\",u=!1,c=[\"{\",\"}\"];if(T5e(t)&&(u=!0,c=[\"[\",\"]\"]),fR(t)){var f=t.name?\": \"+t.name:\"\";l=\" [Function\"+f+\"]\"}if(Z4(t)&&(l=\" \"+RegExp.prototype.toString.call(t)),dR(t)&&(l=\" \"+Date.prototype.toUTCString.call(t)),Y4(t)&&(l=\" \"+JH(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return Z4(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(t);var h;return u?h=t5t(e,t,r,o,a):h=a.map(function(d){return QH(e,t,r,o,d,u)}),e.seen.pop(),r5t(h,l,c)}function e5t(e,t){if(d2(t))return e.stylize(\"undefined\",\"undefined\");if(pR(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}if(A5e(t))return e.stylize(\"\"+t,\"number\");if(ej(t))return e.stylize(\"\"+t,\"boolean\");if(vR(t))return e.stylize(\"null\",\"null\")}function JH(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function t5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)S5e(t,String(o))?a.push(QH(e,t,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(l){l.match(/^\\d+$/)||a.push(QH(e,t,r,n,l,!0))}),a}function QH(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize(\"[Getter/Setter]\",\"special\"):s=e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),S5e(n,i)||(o=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)<0?(vR(r)?s=hR(e,l.value,null):s=hR(e,l.value,r-1),s.indexOf(`\n",
       "`)>-1&&(a?s=s.split(`\n",
       "`).map(function(u){return\"  \"+u}).join(`\n",
       "`).slice(2):s=`\n",
       "`+s.split(`\n",
       "`).map(function(u){return\"   \"+u}).join(`\n",
       "`))):s=e.stylize(\"[Circular]\",\"special\")),d2(o)){if(a&&i.match(/^\\d+$/))return s;o=JSON.stringify(\"\"+i),o.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.slice(1,-1),o=e.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=e.stylize(o,\"string\"))}return o+\": \"+s}function r5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`\n",
       "`)>=0&&n++,a+o.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?r[0]+(t===\"\"?\"\":t+`\n",
       " `)+\" \"+e.join(`,\n",
       "  `)+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}cu.types=YH();function T5e(e){return Array.isArray(e)}cu.isArray=T5e;function ej(e){return typeof e==\"boolean\"}cu.isBoolean=ej;function vR(e){return e===null}cu.isNull=vR;function i5t(e){return e==null}cu.isNullOrUndefined=i5t;function A5e(e){return typeof e==\"number\"}cu.isNumber=A5e;function pR(e){return typeof e==\"string\"}cu.isString=pR;function n5t(e){return typeof e==\"symbol\"}cu.isSymbol=n5t;function d2(e){return e===void 0}cu.isUndefined=d2;function Z4(e){return sA(e)&&tj(e)===\"[object RegExp]\"}cu.isRegExp=Z4;cu.types.isRegExp=Z4;function sA(e){return typeof e==\"object\"&&e!==null}cu.isObject=sA;function dR(e){return sA(e)&&tj(e)===\"[object Date]\"}cu.isDate=dR;cu.types.isDate=dR;function Y4(e){return sA(e)&&(tj(e)===\"[object Error]\"||e instanceof Error)}cu.isError=Y4;cu.types.isNativeError=Y4;function fR(e){return typeof e==\"function\"}cu.isFunction=fR;function a5t(e){return e===null||typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"||typeof e==\"symbol\"||typeof e==\"undefined\"}cu.isPrimitive=a5t;cu.isBuffer=KH();function tj(e){return Object.prototype.toString.call(e)}function $H(e){return e<10?\"0\"+e.toString(10):e.toString(10)}var o5t=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function s5t(){var e=new Date,t=[$H(e.getHours()),$H(e.getMinutes()),$H(e.getSeconds())].join(\":\");return[e.getDate(),o5t[e.getMonth()],t].join(\" \")}cu.log=function(){console.log(\"%s - %s\",s5t(),cu.format.apply(cu,arguments))};cu.inherits=Uy();cu._extend=function(e,t){if(!t||!sA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function S5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h2=typeof Symbol!=\"undefined\"?Symbol(\"util.promisify.custom\"):void 0;cu.promisify=function(t){if(typeof t!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');if(h2&&t[h2]){var r=t[h2];if(typeof r!=\"function\")throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(r,h2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),h2&&Object.defineProperty(r,h2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,b5e(t))};cu.promisify.custom=h2;function l5t(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}function u5t(e){if(typeof e!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');function t(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!=\"function\")throw new TypeError(\"The last argument must be of type Function\");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(l5t.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,b5e(e)),t}cu.callbackify=u5t});var k5e=ye((qfr,C5e)=>{\"use strict\";function M5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function c5t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M5e(Object(r),!0).forEach(function(n){f5t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M5e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f5t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h5t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function E5e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d5t(e,t,r){return t&&E5e(e.prototype,t),r&&E5e(e,r),e}var v5t=u2(),gR=v5t.Buffer,p5t=rj(),ij=p5t.inspect,g5t=ij&&ij.custom||\"inspect\";function m5t(e,t,r){gR.prototype.copy.call(e,t,r)}C5e.exports=function(){function e(){h5t(this,e),this.head=null,this.tail=null,this.length=0}return d5t(e,[{key:\"push\",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:\"unshift\",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:\"shift\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(r){if(this.length===0)return\"\";for(var n=this.head,i=\"\"+n.data;n=n.next;)i+=r+n.data;return i}},{key:\"concat\",value:function(r){if(this.length===0)return gR.alloc(0);for(var n=gR.allocUnsafe(r>>>0),i=this.head,a=0;i;)m5t(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:\"consume\",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:\"_getBuffer\",value:function(r){var n=gR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:g5t,value:function(r,n){return ij(this,c5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var aj=ye((Bfr,P5e)=>{\"use strict\";function y5t(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(nj,this,e)):process.nextTick(nj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(mR,r):(r._writableState.errorEmitted=!0,process.nextTick(L5e,r,a)):process.nextTick(L5e,r,a):t?(process.nextTick(mR,r),t(a)):process.nextTick(mR,r)}),this)}function L5e(e,t){nj(e,t),mR(e)}function mR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(\"close\")}function _5t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function nj(e,t){e.emit(\"error\",t)}function x5t(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit(\"error\",t)}P5e.exports={destroy:y5t,undestroy:_5t,errorOrDestroy:x5t}});var v2=ye((Nfr,D5e)=>{\"use strict\";function b5t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var R5e={};function Y0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t==\"string\"?t:t(a,o,s)}var i=function(a){b5t(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,R5e[e]=i}function I5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:r===2?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}else return\"of \".concat(t,\" \").concat(String(e))}function w5t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function T5t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function A5t(e,t,r){return typeof r!=\"number\"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Y0(\"ERR_INVALID_OPT_VALUE\",function(e,t){return'The value \"'+t+'\" is invalid for option \"'+e+'\"'},TypeError);Y0(\"ERR_INVALID_ARG_TYPE\",function(e,t,r){var n;typeof t==\"string\"&&w5t(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\";var i;if(T5t(e,\" argument\"))i=\"The \".concat(e,\" \").concat(n,\" \").concat(I5e(t,\"type\"));else{var a=A5t(e,\".\")?\"property\":\"argument\";i='The \"'.concat(e,'\" ').concat(a,\" \").concat(n,\" \").concat(I5e(t,\"type\"))}return i+=\". Received type \".concat(typeof r),i},TypeError);Y0(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\");Y0(\"ERR_METHOD_NOT_IMPLEMENTED\",function(e){return\"The \"+e+\" method is not implemented\"});Y0(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\");Y0(\"ERR_STREAM_DESTROYED\",function(e){return\"Cannot call \"+e+\" after a stream was destroyed\"});Y0(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\");Y0(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\");Y0(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\");Y0(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);Y0(\"ERR_UNKNOWN_ENCODING\",function(e){return\"Unknown encoding: \"+e},TypeError);Y0(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\");D5e.exports.codes=R5e});var oj=ye((Ufr,F5e)=>{\"use strict\";var S5t=v2().codes.ERR_INVALID_OPT_VALUE;function M5t(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function E5t(e,t,r,n){var i=M5t(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:\"highWaterMark\";throw new S5t(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}F5e.exports={getHighWaterMark:E5t}});var O5e=ye((Vfr,z5e)=>{z5e.exports=C5t;function C5t(e,t){if(sj(\"noDeprecation\"))return e;var r=!1;function n(){if(!r){if(sj(\"throwDeprecation\"))throw new Error(t);sj(\"traceDeprecation\")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function sj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()===\"true\"}});var cj=ye((Gfr,G5e)=>{\"use strict\";G5e.exports=Rh;function B5e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){tSt(t,e)}}var lA;Rh.WritableState=J4;var k5t={deprecate:O5e()},N5e=uH(),_R=u2().Buffer,L5t=window.Uint8Array||function(){};function P5t(e){return _R.from(e)}function I5t(e){return _R.isBuffer(e)||e instanceof L5t}var uj=aj(),R5t=oj(),D5t=R5t.getHighWaterMark,R_=v2().codes,F5t=R_.ERR_INVALID_ARG_TYPE,z5t=R_.ERR_METHOD_NOT_IMPLEMENTED,O5t=R_.ERR_MULTIPLE_CALLBACK,q5t=R_.ERR_STREAM_CANNOT_PIPE,B5t=R_.ERR_STREAM_DESTROYED,N5t=R_.ERR_STREAM_NULL_VALUES,U5t=R_.ERR_STREAM_WRITE_AFTER_END,V5t=R_.ERR_UNKNOWN_ENCODING,uA=uj.errorOrDestroy;Uy()(Rh,N5e);function G5t(){}function J4(e,t,r){lA=lA||p2(),e=e||{},typeof r!=\"boolean\"&&(r=t instanceof lA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=D5t(this,e,\"writableHighWaterMark\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){K5t(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new B5e(this)}J4.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(J4.prototype,\"buffer\",{get:k5t.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(e){}})();var yR;typeof Symbol==\"function\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\"function\"?(yR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Rh,Symbol.hasInstance,{value:function(t){return yR.call(this,t)?!0:this!==Rh?!1:t&&t._writableState instanceof J4}})):yR=function(t){return t instanceof this};function Rh(e){lA=lA||p2();var t=this instanceof lA;if(!t&&!yR.call(Rh,this))return new Rh(e);this._writableState=new J4(e,this,t),this.writable=!0,e&&(typeof e.write==\"function\"&&(this._write=e.write),typeof e.writev==\"function\"&&(this._writev=e.writev),typeof e.destroy==\"function\"&&(this._destroy=e.destroy),typeof e.final==\"function\"&&(this._final=e.final)),N5e.call(this)}Rh.prototype.pipe=function(){uA(this,new q5t)};function H5t(e,t){var r=new U5t;uA(e,r),process.nextTick(t,r)}function j5t(e,t,r,n){var i;return r===null?i=new N5t:typeof r!=\"string\"&&!t.objectMode&&(i=new F5t(\"chunk\",[\"string\",\"Buffer\"],r)),i?(uA(e,i),process.nextTick(n,i),!1):!0}Rh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&I5t(e);return a&&!_R.isBuffer(e)&&(e=P5t(e)),typeof t==\"function\"&&(r=t,t=null),a?t=\"buffer\":t||(t=n.defaultEncoding),typeof r!=\"function\"&&(r=G5t),n.ending?H5t(this,r):(a||j5t(this,n,e,r))&&(n.pendingcb++,i=X5t(this,n,a,e,t,r)),i};Rh.prototype.cork=function(){this._writableState.corked++};Rh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&U5e(this,e))};Rh.prototype.setDefaultEncoding=function(t){if(typeof t==\"string\"&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new V5t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Rh.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function W5t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==\"string\"&&(t=_R.from(t,r)),t}Object.defineProperty(Rh.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X5t(e,t,r,n,i,a){if(!r){var o=W5t(t,n,i);n!==o&&(r=!0,i=\"buffer\",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else lj(e,t,!1,s,n,i,a);return l}function lj(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new B5t(\"write\")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function Z5t(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(K4,e,t),e._writableState.errorEmitted=!0,uA(e,n)):(i(n),e._writableState.errorEmitted=!0,uA(e,n),K4(e,t))}function Y5t(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function K5t(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!=\"function\")throw new O5t;if(Y5t(r),t)Z5t(e,r,n,t,i);else{var a=V5e(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&U5e(e,r),n?process.nextTick(q5e,e,r,a,i):q5e(e,r,a,i)}}function q5e(e,t,r,n){r||J5t(e,t),t.pendingcb--,n(),K4(e,t)}function J5t(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(\"drain\"))}function U5e(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,lj(e,t,!0,t.length,i,\"\",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new B5e(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=t.objectMode?1:l.length;if(lj(e,t,!1,f,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Rh.prototype._write=function(e,t,r){r(new z5t(\"_write()\"))};Rh.prototype._writev=null;Rh.prototype.end=function(e,t,r){var n=this._writableState;return typeof e==\"function\"?(r=e,e=null,t=null):typeof t==\"function\"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||eSt(this,n,r),this};Object.defineProperty(Rh.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function V5e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function $5t(e,t){e._final(function(r){t.pendingcb--,r&&uA(e,r),t.prefinished=!0,e.emit(\"prefinish\"),K4(e,t)})}function Q5t(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==\"function\"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick($5t,e,t)):(t.prefinished=!0,e.emit(\"prefinish\")))}function K4(e,t){var r=V5e(t);if(r&&(Q5t(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(\"finish\"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function eSt(e,t,r){t.ending=!0,K4(e,t),r&&(t.finished?process.nextTick(r):e.once(\"finish\",r)),t.ended=!0,e.writable=!1}function tSt(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Rh.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Rh.prototype.destroy=uj.destroy;Rh.prototype._undestroy=uj.undestroy;Rh.prototype._destroy=function(e,t){t(e)}});var p2=ye((Hfr,j5e)=>{\"use strict\";var rSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};j5e.exports=qm;var H5e=dj(),hj=cj();Uy()(qm,H5e);for(fj=rSt(hj.prototype),xR=0;xR<fj.length;xR++)bR=fj[xR],qm.prototype[bR]||(qm.prototype[bR]=hj.prototype[bR]);var fj,bR,xR;function qm(e){if(!(this instanceof qm))return new qm(e);H5e.call(this,e),hj.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\"end\",iSt)))}Object.defineProperty(qm.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(qm.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(qm.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function iSt(){this._writableState.ended||process.nextTick(nSt,this)}function nSt(e){e.end()}Object.defineProperty(qm.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var Z5e=ye((vj,X5e)=>{var wR=u2(),Bm=wR.Buffer;function W5e(e,t){for(var r in e)t[r]=e[r]}Bm.from&&Bm.alloc&&Bm.allocUnsafe&&Bm.allocUnsafeSlow?X5e.exports=wR:(W5e(wR,vj),vj.Buffer=g2);function g2(e,t,r){return Bm(e,t,r)}g2.prototype=Object.create(Bm.prototype);W5e(Bm,g2);g2.from=function(e,t,r){if(typeof e==\"number\")throw new TypeError(\"Argument must not be a number\");return Bm(e,t,r)};g2.alloc=function(e,t,r){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");var n=Bm(e);return t!==void 0?typeof r==\"string\"?n.fill(t,r):n.fill(t):n.fill(0),n};g2.allocUnsafe=function(e){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");return Bm(e)};g2.allocUnsafeSlow=function(e){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");return wR.SlowBuffer(e)}});var mj=ye(K5e=>{\"use strict\";var gj=Z5e().Buffer,Y5e=gj.isEncoding||function(e){switch(e=\"\"+e,e&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function aSt(e){if(!e)return\"utf8\";for(var t;;)switch(e){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return e;default:if(t)return;e=(\"\"+e).toLowerCase(),t=!0}}function oSt(e){var t=aSt(e);if(typeof t!=\"string\"&&(gj.isEncoding===Y5e||!Y5e(e)))throw new Error(\"Unknown encoding: \"+e);return t||e}K5e.StringDecoder=$4;function $4(e){this.encoding=oSt(e);var t;switch(this.encoding){case\"utf16le\":this.text=hSt,this.end=dSt,t=4;break;case\"utf8\":this.fillLast=uSt,t=4;break;case\"base64\":this.text=vSt,this.end=pSt,t=3;break;default:this.write=gSt,this.end=mSt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gj.allocUnsafe(t)}$4.prototype.write=function(e){if(e.length===0)return\"\";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||\"\"};$4.prototype.end=fSt;$4.prototype.text=cSt;$4.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function pj(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function sSt(e,t,r){var n=t.length-1;if(n<r)return 0;var i=pj(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=pj(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=pj(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function lSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,\"\\uFFFD\";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,\"\\uFFFD\";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,\"\\uFFFD\"}}function uSt(e){var t=this.lastTotal-this.lastNeed,r=lSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function cSt(e,t){var r=sSt(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)}function fSt(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"\\uFFFD\":t}function hSt(e,t){if((e.length-t)%2===0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function dSt(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function vSt(e,t){var r=(e.length-t)%3;return r===0?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function pSt(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function gSt(e){return e.toString(this.encoding)}function mSt(e){return e&&e.length?this.write(e):\"\"}});var TR=ye((Wfr,Q5e)=>{\"use strict\";var J5e=v2().codes.ERR_STREAM_PREMATURE_CLOSE;function ySt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function _St(){}function xSt(e){return e.setHeader&&typeof e.abort==\"function\"}function $5e(e,t,r){if(typeof t==\"function\")return $5e(e,null,t);t||(t={}),r=ySt(r||_St);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,i||r.call(e)},c=function(v){r.call(e,v)},f=function(){var v;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(v=new J5e),r.call(e,v);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(v=new J5e),r.call(e,v)},h=function(){e.req.on(\"finish\",s)};return xSt(e)?(e.on(\"complete\",s),e.on(\"abort\",f),e.req?h():e.on(\"request\",h)):i&&!e._writableState&&(e.on(\"end\",a),e.on(\"close\",a)),e.on(\"end\",u),e.on(\"finish\",s),t.error!==!1&&e.on(\"error\",c),e.on(\"close\",f),function(){e.removeListener(\"complete\",s),e.removeListener(\"abort\",f),e.removeListener(\"request\",h),e.req&&e.req.removeListener(\"finish\",s),e.removeListener(\"end\",a),e.removeListener(\"close\",a),e.removeListener(\"finish\",s),e.removeListener(\"end\",u),e.removeListener(\"error\",c),e.removeListener(\"close\",f)}}Q5e.exports=$5e});var tSe=ye((Xfr,eSe)=>{\"use strict\";var AR;function D_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bSt=TR(),F_=Symbol(\"lastResolve\"),m2=Symbol(\"lastReject\"),Q4=Symbol(\"error\"),SR=Symbol(\"ended\"),y2=Symbol(\"lastPromise\"),yj=Symbol(\"handlePromise\"),_2=Symbol(\"stream\");function z_(e,t){return{value:e,done:t}}function wSt(e){var t=e[F_];if(t!==null){var r=e[_2].read();r!==null&&(e[y2]=null,e[F_]=null,e[m2]=null,t(z_(r,!1)))}}function TSt(e){process.nextTick(wSt,e)}function ASt(e,t){return function(r,n){e.then(function(){if(t[SR]){r(z_(void 0,!0));return}t[yj](r,n)},n)}}var SSt=Object.getPrototypeOf(function(){}),MSt=Object.setPrototypeOf((AR={get stream(){return this[_2]},next:function(){var t=this,r=this[Q4];if(r!==null)return Promise.reject(r);if(this[SR])return Promise.resolve(z_(void 0,!0));if(this[_2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[Q4]?s(t[Q4]):o(z_(void 0,!0))})});var n=this[y2],i;if(n)i=new Promise(ASt(n,this));else{var a=this[_2].read();if(a!==null)return Promise.resolve(z_(a,!1));i=new Promise(this[yj])}return this[y2]=i,i}},D_(AR,Symbol.asyncIterator,function(){return this}),D_(AR,\"return\",function(){var t=this;return new Promise(function(r,n){t[_2].destroy(null,function(i){if(i){n(i);return}r(z_(void 0,!0))})})}),AR),SSt),ESt=function(t){var r,n=Object.create(MSt,(r={},D_(r,_2,{value:t,writable:!0}),D_(r,F_,{value:null,writable:!0}),D_(r,m2,{value:null,writable:!0}),D_(r,Q4,{value:null,writable:!0}),D_(r,SR,{value:t._readableState.endEmitted,writable:!0}),D_(r,yj,{value:function(a,o){var s=n[_2].read();s?(n[y2]=null,n[F_]=null,n[m2]=null,a(z_(s,!1))):(n[F_]=a,n[m2]=o)},writable:!0}),r));return n[y2]=null,bSt(t,function(i){if(i&&i.code!==\"ERR_STREAM_PREMATURE_CLOSE\"){var a=n[m2];a!==null&&(n[y2]=null,n[F_]=null,n[m2]=null,a(i)),n[Q4]=i;return}var o=n[F_];o!==null&&(n[y2]=null,n[F_]=null,n[m2]=null,o(z_(void 0,!0))),n[SR]=!0}),t.on(\"readable\",TSt.bind(null,n)),n};eSe.exports=ESt});var iSe=ye((Zfr,rSe)=>{rSe.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}});var dj=ye((Kfr,dSe)=>{\"use strict\";dSe.exports=Bu;var cA;Bu.ReadableState=sSe;var Yfr=vb().EventEmitter,oSe=function(t,r){return t.listeners(r).length},tE=uH(),MR=u2().Buffer,CSt=window.Uint8Array||function(){};function kSt(e){return MR.from(e)}function LSt(e){return MR.isBuffer(e)||e instanceof CSt}var _j=rj(),nu;_j&&_j.debuglog?nu=_j.debuglog(\"stream\"):nu=function(){};var PSt=k5e(),Mj=aj(),ISt=oj(),RSt=ISt.getHighWaterMark,ER=v2().codes,DSt=ER.ERR_INVALID_ARG_TYPE,FSt=ER.ERR_STREAM_PUSH_AFTER_EOF,zSt=ER.ERR_METHOD_NOT_IMPLEMENTED,OSt=ER.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,fA,xj,bj;Uy()(Bu,tE);var eE=Mj.errorOrDestroy,wj=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function qSt(e,t,r){if(typeof e.prependListener==\"function\")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function sSe(e,t,r){cA=cA||p2(),e=e||{},typeof r!=\"boolean\"&&(r=t instanceof cA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=RSt(this,e,\"readableHighWaterMark\",r),this.buffer=new PSt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(fA||(fA=mj().StringDecoder),this.decoder=new fA(e.encoding),this.encoding=e.encoding)}function Bu(e){if(cA=cA||p2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof cA;this._readableState=new sSe(e,this,t),this.readable=!0,e&&(typeof e.read==\"function\"&&(this._read=e.read),typeof e.destroy==\"function\"&&(this._destroy=e.destroy)),tE.call(this)}Object.defineProperty(Bu.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=Mj.destroy;Bu.prototype._undestroy=Mj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e==\"string\"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=MR.from(e,t),t=\"\"),n=!0),lSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return lSe(this,e,null,!0,!1)};function lSe(e,t,r,n,i){nu(\"readableAddChunk\",t);var a=e._readableState;if(t===null)a.reading=!1,USt(e,a);else{var o;if(i||(o=BSt(a,t)),o)eE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!=\"string\"&&!a.objectMode&&Object.getPrototypeOf(t)!==MR.prototype&&(t=kSt(t)),n)a.endEmitted?eE(e,new OSt):Tj(e,a,t,!0);else if(a.ended)eE(e,new FSt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Tj(e,a,t,!1):Sj(e,a)):Tj(e,a,t,!1)}else n||(a.reading=!1,Sj(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function Tj(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit(\"data\",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&CR(e)),Sj(e,t)}function BSt(e,t){var r;return!LSt(t)&&typeof t!=\"string\"&&t!==void 0&&!e.objectMode&&(r=new DSt(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],t)),r}Bu.prototype.isPaused=function(){return this._readableState.flowing===!1};Bu.prototype.setEncoding=function(e){fA||(fA=mj().StringDecoder);var t=new fA(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n=\"\";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==\"\"&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var nSe=1073741824;function NSt(e){return e>=nSe?e=nSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function aSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=NSt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu(\"read\",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu(\"read: emitReadable\",t.length,t.ended),t.length===0&&t.ended?Aj(this):CR(this),null;if(e=aSe(e,t),e===0&&t.ended)return t.length===0&&Aj(this),null;var n=t.needReadable;nu(\"need readable\",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,nu(\"length less than watermark\",n)),t.ended||t.reading?(n=!1,nu(\"reading or ended\",n)):n&&(nu(\"do read\"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=aSe(r,t)));var i;return e>0?i=fSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Aj(this)),i!==null&&this.emit(\"data\",i),i};function USt(e,t){if(nu(\"onEofChunk\"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?CR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,uSe(e)))}}function CR(e){var t=e._readableState;nu(\"emitReadable\",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu(\"emitReadable\",t.flowing),t.emittedReadable=!0,process.nextTick(uSe,e))}function uSe(e){var t=e._readableState;nu(\"emitReadable_\",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(\"readable\"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ej(e)}function Sj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(VSt,e,t))}function VSt(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(nu(\"maybeReadMore read 0\"),e.read(0),r===t.length)break}t.readingMore=!1}Bu.prototype._read=function(e){eE(this,new zSt(\"_read()\"))};Bu.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,nu(\"pipe count=%d opts=%j\",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:x;n.endEmitted?process.nextTick(a):r.once(\"end\",a),e.on(\"unpipe\",o);function o(b,p){nu(\"onunpipe\"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,c())}function s(){nu(\"onend\"),e.end()}var l=GSt(r);e.on(\"drain\",l);var u=!1;function c(){nu(\"cleanup\"),e.removeListener(\"close\",d),e.removeListener(\"finish\",v),e.removeListener(\"drain\",l),e.removeListener(\"error\",h),e.removeListener(\"unpipe\",o),r.removeListener(\"end\",s),r.removeListener(\"end\",x),r.removeListener(\"data\",f),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on(\"data\",f);function f(b){nu(\"ondata\");var p=e.write(b);nu(\"dest.write\",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&hSe(n.pipes,e)!==-1)&&!u&&(nu(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu(\"onerror\",b),x(),e.removeListener(\"error\",h),oSe(e,\"error\")===0&&eE(e,b)}qSt(e,\"error\",h);function d(){e.removeListener(\"finish\",v),x()}e.once(\"close\",d);function v(){nu(\"onfinish\"),e.removeListener(\"close\",d),x()}e.once(\"finish\",v);function x(){nu(\"unpipe\"),r.unpipe(e)}return e.emit(\"pipe\",r),n.flowing||(nu(\"pipe resume\"),r.resume()),e};function GSt(e){return function(){var r=e._readableState;nu(\"pipeOnDrain\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&oSe(e,\"data\")&&(r.flowing=!0,Ej(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var o=hSe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this,r),this)};Bu.prototype.on=function(e,t){var r=tE.prototype.on.call(this,e,t),n=this._readableState;return e===\"data\"?(n.readableListening=this.listenerCount(\"readable\")>0,n.flowing!==!1&&this.resume()):e===\"readable\"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu(\"on readable\",n.length,n.reading),n.length?CR(this):n.reading||process.nextTick(HSt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=tE.prototype.removeListener.call(this,e,t);return e===\"readable\"&&process.nextTick(cSe,this),r};Bu.prototype.removeAllListeners=function(e){var t=tE.prototype.removeAllListeners.apply(this,arguments);return(e===\"readable\"||e===void 0)&&process.nextTick(cSe,this),t};function cSe(e){var t=e._readableState;t.readableListening=e.listenerCount(\"readable\")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(\"data\")>0&&e.resume()}function HSt(e){nu(\"readable nexttick read 0\"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu(\"resume\"),e.flowing=!e.readableListening,jSt(this,e)),e.paused=!1,this};function jSt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(WSt,e,t))}function WSt(e,t){nu(\"resume\",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(\"resume\"),Ej(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(nu(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this};function Ej(e){var t=e._readableState;for(nu(\"flow\",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on(\"end\",function(){if(nu(\"wrapped end\"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on(\"data\",function(o){if(nu(\"wrapped data\"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]==\"function\"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<wj.length;a++)e.on(wj[a],this.emit.bind(this,wj[a]));return this._read=function(o){nu(\"wrapped _read\",o),n&&(n=!1,e.resume())},this};typeof Symbol==\"function\"&&(Bu.prototype[Symbol.asyncIterator]=function(){return xj===void 0&&(xj=tSe()),xj(this)});Object.defineProperty(Bu.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Bu.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Bu.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});Bu._fromList=fSe;Object.defineProperty(Bu.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}});function fSe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(\"\"):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Aj(e){var t=e._readableState;nu(\"endReadable\",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(XSt,t,e))}function XSt(e,t){if(nu(\"endReadableNT\",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol==\"function\"&&(Bu.from=function(e,t){return bj===void 0&&(bj=iSe()),bj(Bu,e,t)});function hSe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Cj=ye((Jfr,pSe)=>{\"use strict\";pSe.exports=Gy;var kR=v2().codes,ZSt=kR.ERR_METHOD_NOT_IMPLEMENTED,YSt=kR.ERR_MULTIPLE_CALLBACK,KSt=kR.ERR_TRANSFORM_ALREADY_TRANSFORMING,JSt=kR.ERR_TRANSFORM_WITH_LENGTH_0,LR=p2();Uy()(Gy,LR);function $St(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit(\"error\",new YSt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Gy(e){if(!(this instanceof Gy))return new Gy(e);LR.call(this,e),this._transformState={afterTransform:$St.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==\"function\"&&(this._transform=e.transform),typeof e.flush==\"function\"&&(this._flush=e.flush)),this.on(\"prefinish\",QSt)}function QSt(){var e=this;typeof this._flush==\"function\"&&!this._readableState.destroyed?this._flush(function(t,r){vSe(e,t,r)}):vSe(this,null,null)}Gy.prototype.push=function(e,t){return this._transformState.needTransform=!1,LR.prototype.push.call(this,e,t)};Gy.prototype._transform=function(e,t,r){r(new ZSt(\"_transform()\"))};Gy.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Gy.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Gy.prototype._destroy=function(e,t){LR.prototype._destroy.call(this,e,function(r){t(r)})};function vSe(e,t,r){if(t)return e.emit(\"error\",t);if(r!=null&&e.push(r),e._writableState.length)throw new JSt;if(e._transformState.transforming)throw new KSt;return e.push(null)}});var ySe=ye(($fr,mSe)=>{\"use strict\";mSe.exports=rE;var gSe=Cj();Uy()(rE,gSe);function rE(e){if(!(this instanceof rE))return new rE(e);gSe.call(this,e)}rE.prototype._transform=function(e,t,r){r(null,e)}});var TSe=ye((Qfr,wSe)=>{\"use strict\";var kj;function eMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var bSe=v2().codes,tMt=bSe.ERR_MISSING_ARGS,rMt=bSe.ERR_STREAM_DESTROYED;function _Se(e){if(e)throw e}function iMt(e){return e.setHeader&&typeof e.abort==\"function\"}function nMt(e,t,r,n){n=eMt(n);var i=!1;e.on(\"close\",function(){i=!0}),kj===void 0&&(kj=TR()),kj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,iMt(e))return e.abort();if(typeof e.destroy==\"function\")return e.destroy();n(o||new rMt(\"pipe\"))}}}function xSe(e){e()}function aMt(e,t){return e.pipe(t)}function oMt(e){return!e.length||typeof e[e.length-1]!=\"function\"?_Se:e.pop()}function sMt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=oMt(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new tMt(\"streams\");var i,a=t.map(function(o,s){var l=s<t.length-1,u=s>0;return nMt(o,l,u,function(c){i||(i=c),c&&a.forEach(xSe),!l&&(a.forEach(xSe),n(i))})});return t.reduce(aMt)}wSe.exports=sMt});var SSe=ye((ehr,ASe)=>{ASe.exports=K0;var Lj=vb().EventEmitter,lMt=Uy();lMt(K0,Lj);K0.Readable=dj();K0.Writable=cj();K0.Duplex=p2();K0.Transform=Cj();K0.PassThrough=ySe();K0.finished=TR();K0.pipeline=TSe();K0.Stream=K0;function K0(){Lj.call(this)}K0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on(\"data\",n);function i(){r.readable&&r.resume&&r.resume()}e.on(\"drain\",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on(\"end\",o),r.on(\"close\",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy==\"function\"&&e.destroy())}function l(c){if(u(),Lj.listenerCount(this,\"error\")===0)throw c}r.on(\"error\",l),e.on(\"error\",l);function u(){r.removeListener(\"data\",n),e.removeListener(\"drain\",i),r.removeListener(\"end\",o),r.removeListener(\"close\",s),r.removeListener(\"error\",l),e.removeListener(\"error\",l),r.removeListener(\"end\",u),r.removeListener(\"close\",u),e.removeListener(\"close\",u)}return r.on(\"end\",u),r.on(\"close\",u),e.on(\"close\",u),e.emit(\"pipe\",r),e}});var dA=ye(fu=>{var MSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},uMt=/%[sdj%]/g;fu.format=function(e){if(!OR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(O_(arguments[r]));return t.join(\" \")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(uMt,function(s){if(s===\"%%\")return\"%\";if(r>=i)return s;switch(s){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(l){return\"[Circular]\"}default:return s}}),o=n[r];r<i;o=n[++r])zR(o)||!hA(o)?a+=\" \"+o:a+=\" \"+O_(o);return a};fu.deprecate=function(e,t){if(typeof process!=\"undefined\"&&process.noDeprecation===!0)return e;if(typeof process==\"undefined\")return function(){return fu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var PR={},ESe=/^$/;IR=\"false\",IR=IR.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),ESe=new RegExp(\"^\"+IR+\"$\",\"i\");var IR;fu.debuglog=function(e){if(e=e.toUpperCase(),!PR[e])if(ESe.test(e)){var t=process.pid;PR[e]=function(){var r=fu.format.apply(fu,arguments);console.error(\"%s %d: %s\",e,t,r)}}else PR[e]=function(){};return PR[e]};function O_(e,t){var r={seen:[],stylize:fMt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Dj(t)?r.showHidden=t:t&&fu._extend(r,t),b2(r.showHidden)&&(r.showHidden=!1),b2(r.depth)&&(r.depth=2),b2(r.colors)&&(r.colors=!1),b2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=cMt),DR(r,e,r.depth)}fu.inspect=O_;O_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};O_.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"};function cMt(e,t){var r=O_.styles[t];return r?\"\\x1B[\"+O_.colors[r][0]+\"m\"+e+\"\\x1B[\"+O_.colors[r][1]+\"m\":e}function fMt(e,t){return e}function hMt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function DR(e,t,r){if(e.customInspect&&t&&RR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return OR(n)||(n=DR(e,n,r)),n}var i=dMt(e,t);if(i)return i;var a=Object.keys(t),o=hMt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),nE(t)&&(a.indexOf(\"message\")>=0||a.indexOf(\"description\")>=0))return Pj(t);if(a.length===0){if(RR(t)){var s=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+s+\"]\",\"special\")}if(iE(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(FR(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(nE(t))return Pj(t)}var l=\"\",u=!1,c=[\"{\",\"}\"];if(CSe(t)&&(u=!0,c=[\"[\",\"]\"]),RR(t)){var f=t.name?\": \"+t.name:\"\";l=\" [Function\"+f+\"]\"}if(iE(t)&&(l=\" \"+RegExp.prototype.toString.call(t)),FR(t)&&(l=\" \"+Date.prototype.toUTCString.call(t)),nE(t)&&(l=\" \"+Pj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return iE(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(t);var h;return u?h=vMt(e,t,r,o,a):h=a.map(function(d){return Rj(e,t,r,o,d,u)}),e.seen.pop(),pMt(h,l,c)}function dMt(e,t){if(b2(t))return e.stylize(\"undefined\",\"undefined\");if(OR(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}if(kSe(t))return e.stylize(\"\"+t,\"number\");if(Dj(t))return e.stylize(\"\"+t,\"boolean\");if(zR(t))return e.stylize(\"null\",\"null\")}function Pj(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function vMt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)LSe(t,String(o))?a.push(Rj(e,t,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(l){l.match(/^\\d+$/)||a.push(Rj(e,t,r,n,l,!0))}),a}function Rj(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize(\"[Getter/Setter]\",\"special\"):s=e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),LSe(n,i)||(o=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)<0?(zR(r)?s=DR(e,l.value,null):s=DR(e,l.value,r-1),s.indexOf(`\n",
       "`)>-1&&(a?s=s.split(`\n",
       "`).map(function(u){return\"  \"+u}).join(`\n",
       "`).slice(2):s=`\n",
       "`+s.split(`\n",
       "`).map(function(u){return\"   \"+u}).join(`\n",
       "`))):s=e.stylize(\"[Circular]\",\"special\")),b2(o)){if(a&&i.match(/^\\d+$/))return s;o=JSON.stringify(\"\"+i),o.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.slice(1,-1),o=e.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=e.stylize(o,\"string\"))}return o+\": \"+s}function pMt(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`\n",
       "`)>=0&&n++,a+o.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?r[0]+(t===\"\"?\"\":t+`\n",
       " `)+\" \"+e.join(`,\n",
       "  `)+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}fu.types=YH();function CSe(e){return Array.isArray(e)}fu.isArray=CSe;function Dj(e){return typeof e==\"boolean\"}fu.isBoolean=Dj;function zR(e){return e===null}fu.isNull=zR;function gMt(e){return e==null}fu.isNullOrUndefined=gMt;function kSe(e){return typeof e==\"number\"}fu.isNumber=kSe;function OR(e){return typeof e==\"string\"}fu.isString=OR;function mMt(e){return typeof e==\"symbol\"}fu.isSymbol=mMt;function b2(e){return e===void 0}fu.isUndefined=b2;function iE(e){return hA(e)&&Fj(e)===\"[object RegExp]\"}fu.isRegExp=iE;fu.types.isRegExp=iE;function hA(e){return typeof e==\"object\"&&e!==null}fu.isObject=hA;function FR(e){return hA(e)&&Fj(e)===\"[object Date]\"}fu.isDate=FR;fu.types.isDate=FR;function nE(e){return hA(e)&&(Fj(e)===\"[object Error]\"||e instanceof Error)}fu.isError=nE;fu.types.isNativeError=nE;function RR(e){return typeof e==\"function\"}fu.isFunction=RR;function yMt(e){return e===null||typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"||typeof e==\"symbol\"||typeof e==\"undefined\"}fu.isPrimitive=yMt;fu.isBuffer=KH();function Fj(e){return Object.prototype.toString.call(e)}function Ij(e){return e<10?\"0\"+e.toString(10):e.toString(10)}var _Mt=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function xMt(){var e=new Date,t=[Ij(e.getHours()),Ij(e.getMinutes()),Ij(e.getSeconds())].join(\":\");return[e.getDate(),_Mt[e.getMonth()],t].join(\" \")}fu.log=function(){console.log(\"%s - %s\",xMt(),fu.format.apply(fu,arguments))};fu.inherits=Uy();fu._extend=function(e,t){if(!t||!hA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function LSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var x2=typeof Symbol!=\"undefined\"?Symbol(\"util.promisify.custom\"):void 0;fu.promisify=function(t){if(typeof t!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');if(x2&&t[x2]){var r=t[x2];if(typeof r!=\"function\")throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(r,x2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),x2&&Object.defineProperty(r,x2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,MSe(t))};fu.promisify.custom=x2;function bMt(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}function wMt(e){if(typeof e!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');function t(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!=\"function\")throw new TypeError(\"The last argument must be of type Function\");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(bMt.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,MSe(e)),t}fu.callbackify=wMt});var qj=ye((rhr,DSe)=>{\"use strict\";function q_(e){\"@babel/helpers - typeof\";return q_=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},q_(e)}function PSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,AMt(n.key),n)}}function TMt(e,t,r){return t&&PSe(e.prototype,t),r&&PSe(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function AMt(e){var t=SMt(e,\"string\");return q_(t)===\"symbol\"?t:String(t)}function SMt(e,t){if(q_(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(q_(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function MMt(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function EMt(e,t){if(typeof t!=\"function\"&&t!==null)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&Oj(e,t)}function Oj(e,t){return Oj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Oj(e,t)}function CMt(e){var t=PMt();return function(){var n=qR(e),i;if(t){var a=qR(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return kMt(this,i)}}function kMt(e,t){if(t&&(q_(t)===\"object\"||typeof t==\"function\"))return t;if(t!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return LMt(e)}function LMt(e){if(e===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function PMt(){if(typeof Reflect==\"undefined\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function qR(e){return qR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qR(e)}var RSe={},vA,zj;function aE(e,t,r){r||(r=Error);function n(a,o,s){return typeof t==\"string\"?t:t(a,o,s)}var i=function(a){EMt(s,a);var o=CMt(s);function s(l,u,c){var f;return MMt(this,s),f=o.call(this,n(l,u,c)),f.code=e,f}return TMt(s)}(r);RSe[e]=i}function ISe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:r===2?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}else return\"of \".concat(t,\" \").concat(String(e))}function IMt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function RMt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function DMt(e,t,r){return typeof r!=\"number\"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}aE(\"ERR_AMBIGUOUS_ARGUMENT\",'The \"%s\" argument is ambiguous. %s',TypeError);aE(\"ERR_INVALID_ARG_TYPE\",function(e,t,r){vA===void 0&&(vA=oE()),vA(typeof e==\"string\",\"'name' must be a string\");var n;typeof t==\"string\"&&IMt(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\";var i;if(RMt(e,\" argument\"))i=\"The \".concat(e,\" \").concat(n,\" \").concat(ISe(t,\"type\"));else{var a=DMt(e,\".\")?\"property\":\"argument\";i='The \"'.concat(e,'\" ').concat(a,\" \").concat(n,\" \").concat(ISe(t,\"type\"))}return i+=\". Received type \".concat(q_(r)),i},TypeError);aE(\"ERR_INVALID_ARG_VALUE\",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:\"is invalid\";zj===void 0&&(zj=dA());var n=zj.inspect(t);return n.length>128&&(n=\"\".concat(n.slice(0,128),\"...\")),\"The argument '\".concat(e,\"' \").concat(r,\". Received \").concat(n)},TypeError,RangeError);aE(\"ERR_INVALID_RETURN_VALUE\",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n=\"instance of \".concat(r.constructor.name):n=\"type \".concat(q_(r)),\"Expected \".concat(e,' to be returned from the \"').concat(t,'\"')+\" function but got \".concat(n,\".\")},TypeError);aE(\"ERR_MISSING_ARGS\",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];vA===void 0&&(vA=oE()),vA(t.length>0,\"At least one arg needs to be specified\");var n=\"The \",i=t.length;switch(t=t.map(function(a){return'\"'.concat(a,'\"')}),i){case 1:n+=\"\".concat(t[0],\" argument\");break;case 2:n+=\"\".concat(t[0],\" and \").concat(t[1],\" arguments\");break;default:n+=t.slice(0,i-1).join(\", \"),n+=\", and \".concat(t[i-1],\" arguments\");break}return\"\".concat(n,\" must be specified\")},TypeError);DSe.exports.codes=RSe});var HSe=ye((ihr,GSe)=>{\"use strict\";function FSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zSe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FSe(Object(r),!0).forEach(function(n){FMt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FSe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FMt(e,t,r){return t=NSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zMt(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function OSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,NSe(n.key),n)}}function OMt(e,t,r){return t&&OSe(e.prototype,t),r&&OSe(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function NSe(e){var t=qMt(e,\"string\");return Rp(t)===\"symbol\"?t:String(t)}function qMt(e,t){if(Rp(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(Rp(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function BMt(e,t){if(typeof t!=\"function\"&&t!==null)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&cE(e,t)}function NMt(e){var t=VSe();return function(){var n=fE(e),i;if(t){var a=fE(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return USe(this,i)}}function USe(e,t){if(t&&(Rp(t)===\"object\"||typeof t==\"function\"))return t;if(t!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return Bj(e)}function Bj(e){if(e===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function Nj(e){var t=typeof Map==\"function\"?new Map:void 0;return Nj=function(n){if(n===null||!UMt(n))return n;if(typeof n!=\"function\")throw new TypeError(\"Super expression must either be null or a function\");if(typeof t!=\"undefined\"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return BR(n,arguments,fE(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),cE(i,n)},Nj(e)}function BR(e,t,r){return VSe()?BR=Reflect.construct.bind():BR=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&cE(u,o.prototype),u},BR.apply(null,arguments)}function VSe(){if(typeof Reflect==\"undefined\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function UMt(e){return Function.toString.call(e).indexOf(\"[native code]\")!==-1}function cE(e,t){return cE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cE(e,t)}function fE(e){return fE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fE(e)}function Rp(e){\"@babel/helpers - typeof\";return Rp=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Rp(e)}var VMt=dA(),Uj=VMt.inspect,GMt=qj(),HMt=GMt.codes.ERR_INVALID_ARG_TYPE;function qSe(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function jMt(e,t){if(t=Math.floor(t),e.length==0||t==0)return\"\";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Hg=\"\",sE=\"\",lE=\"\",wv=\"\",w2={deepStrictEqual:\"Expected values to be strictly deep-equal:\",strictEqual:\"Expected values to be strictly equal:\",strictEqualObject:'Expected \"actual\" to be reference-equal to \"expected\":',deepEqual:\"Expected values to be loosely deep-equal:\",equal:\"Expected values to be loosely equal:\",notDeepStrictEqual:'Expected \"actual\" not to be strictly deep-equal to:',notStrictEqual:'Expected \"actual\" to be strictly unequal to:',notStrictEqualObject:'Expected \"actual\" not to be reference-equal to \"expected\":',notDeepEqual:'Expected \"actual\" not to be loosely deep-equal to:',notEqual:'Expected \"actual\" to be loosely unequal to:',notIdentical:\"Values identical but not reference-equal:\"},WMt=10;function BSe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,\"message\",{value:e.message}),r}function uE(e){return Uj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function XMt(e,t,r){var n=\"\",i=\"\",a=0,o=\"\",s=!1,l=uE(e),u=l.split(`\n",
       "`),c=uE(t).split(`\n",
       "`),f=0,h=\"\";if(r===\"strictEqual\"&&Rp(e)===\"object\"&&Rp(t)===\"object\"&&e!==null&&t!==null&&(r=\"strictEqualObject\"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=WMt){if((Rp(e)!==\"object\"||e===null)&&(Rp(t)!==\"object\"||t===null)&&(e!==0||t!==0))return\"\".concat(w2[r],`\n",
       "\n",
       "`)+\"\".concat(u[0],\" !== \").concat(c[0],`\n",
       "`)}else if(r!==\"strictEqualObject\"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d<v){for(;u[0][f]===c[0][f];)f++;f>2&&(h=`\n",
       "  `.concat(jMt(\" \",f),\"^\"),f=0)}}}for(var x=u[u.length-1],b=c[c.length-1];x===b&&(f++<2?o=`\n",
       "  `.concat(x).concat(o):n=x,u.pop(),c.pop(),!(u.length===0||c.length===0));)x=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var C=l.split(`\n",
       "`);if(C.length>30)for(C[26]=\"\".concat(Hg,\"...\").concat(wv);C.length>27;)C.pop();return\"\".concat(w2.notIdentical,`\n",
       "\n",
       "`).concat(C.join(`\n",
       "`),`\n",
       "`)}f>3&&(o=`\n",
       "`.concat(Hg,\"...\").concat(wv).concat(o),s=!0),n!==\"\"&&(o=`\n",
       "  `.concat(n).concat(o),n=\"\");var E=0,A=w2[r]+`\n",
       "`.concat(sE,\"+ actual\").concat(wv,\" \").concat(lE,\"- expected\").concat(wv),L=\" \".concat(Hg,\"...\").concat(wv,\" Lines skipped\");for(f=0;f<p;f++){var _=f-a;if(u.length<f+1)_>1&&f>2&&(_>4?(i+=`\n",
       "`.concat(Hg,\"...\").concat(wv),s=!0):_>3&&(i+=`\n",
       "  `.concat(c[f-2]),E++),i+=`\n",
       "  `.concat(c[f-1]),E++),a=f,n+=`\n",
       "`.concat(lE,\"-\").concat(wv,\" \").concat(c[f]),E++;else if(c.length<f+1)_>1&&f>2&&(_>4?(i+=`\n",
       "`.concat(Hg,\"...\").concat(wv),s=!0):_>3&&(i+=`\n",
       "  `.concat(u[f-2]),E++),i+=`\n",
       "  `.concat(u[f-1]),E++),a=f,i+=`\n",
       "`.concat(sE,\"+\").concat(wv,\" \").concat(u[f]),E++;else{var k=c[f],M=u[f],g=M!==k&&(!qSe(M,\",\")||M.slice(0,-1)!==k);g&&qSe(k,\",\")&&k.slice(0,-1)===M&&(g=!1,M+=\",\"),g?(_>1&&f>2&&(_>4?(i+=`\n",
       "`.concat(Hg,\"...\").concat(wv),s=!0):_>3&&(i+=`\n",
       "  `.concat(u[f-2]),E++),i+=`\n",
       "  `.concat(u[f-1]),E++),a=f,i+=`\n",
       "`.concat(sE,\"+\").concat(wv,\" \").concat(M),n+=`\n",
       "`.concat(lE,\"-\").concat(wv,\" \").concat(k),E+=2):(i+=n,n=\"\",(_===1||f===0)&&(i+=`\n",
       "  `.concat(M),E++))}if(E>20&&f<p-2)return\"\".concat(A).concat(L,`\n",
       "`).concat(i,`\n",
       "`).concat(Hg,\"...\").concat(wv).concat(n,`\n",
       "`)+\"\".concat(Hg,\"...\").concat(wv)}return\"\".concat(A).concat(s?L:\"\",`\n",
       "`).concat(i).concat(n).concat(o).concat(h)}var ZMt=function(e,t){BMt(n,e);var r=NMt(n);function n(i){var a;if(zMt(this,n),Rp(i)!==\"object\"||i===null)throw new HMt(\"options\",\"Object\",i);var o=i.message,s=i.operator,l=i.stackStartFn,u=i.actual,c=i.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)a=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(Hg=\"\\x1B[34m\",sE=\"\\x1B[32m\",wv=\"\\x1B[39m\",lE=\"\\x1B[31m\"):(Hg=\"\",sE=\"\",wv=\"\",lE=\"\")),Rp(u)===\"object\"&&u!==null&&Rp(c)===\"object\"&&c!==null&&\"stack\"in u&&u instanceof Error&&\"stack\"in c&&c instanceof Error&&(u=BSe(u),c=BSe(c)),s===\"deepStrictEqual\"||s===\"strictEqual\")a=r.call(this,XMt(u,c,s));else if(s===\"notDeepStrictEqual\"||s===\"notStrictEqual\"){var h=w2[s],d=uE(u).split(`\n",
       "`);if(s===\"notStrictEqual\"&&Rp(u)===\"object\"&&u!==null&&(h=w2.notStrictEqualObject),d.length>30)for(d[26]=\"\".concat(Hg,\"...\").concat(wv);d.length>27;)d.pop();d.length===1?a=r.call(this,\"\".concat(h,\" \").concat(d[0])):a=r.call(this,\"\".concat(h,`\n",
       "\n",
       "`).concat(d.join(`\n",
       "`),`\n",
       "`))}else{var v=uE(u),x=\"\",b=w2[s];s===\"notDeepEqual\"||s===\"notEqual\"?(v=\"\".concat(w2[s],`\n",
       "\n",
       "`).concat(v),v.length>1024&&(v=\"\".concat(v.slice(0,1021),\"...\"))):(x=\"\".concat(uE(c)),v.length>512&&(v=\"\".concat(v.slice(0,509),\"...\")),x.length>512&&(x=\"\".concat(x.slice(0,509),\"...\")),s===\"deepEqual\"||s===\"equal\"?v=\"\".concat(b,`\n",
       "\n",
       "`).concat(v,`\n",
       "\n",
       "should equal\n",
       "\n",
       "`):x=\" \".concat(s,\" \").concat(x)),a=r.call(this,\"\".concat(v).concat(x))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Bj(a),\"name\",{value:\"AssertionError [ERR_ASSERTION]\",enumerable:!1,writable:!0,configurable:!0}),a.code=\"ERR_ASSERTION\",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Bj(a),l),a.stack,a.name=\"AssertionError\",USe(a)}return OMt(n,[{key:\"toString\",value:function(){return\"\".concat(this.name,\" [\").concat(this.code,\"]: \").concat(this.message)}},{key:t,value:function(a,o){return Uj(this,zSe(zSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Nj(Error),Uj.custom);GSe.exports=ZMt});var Vj=ye((nhr,WSe)=>{\"use strict\";var jSe=Object.prototype.toString;WSe.exports=function(t){var r=jSe.call(t),n=r===\"[object Arguments]\";return n||(n=r!==\"[object Array]\"&&t!==null&&typeof t==\"object\"&&typeof t.length==\"number\"&&t.length>=0&&jSe.call(t.callee)===\"[object Function]\"),n}});var tMe=ye((ahr,eMe)=>{\"use strict\";var QSe;Object.keys||(hE=Object.prototype.hasOwnProperty,Gj=Object.prototype.toString,XSe=Vj(),Hj=Object.prototype.propertyIsEnumerable,ZSe=!Hj.call({toString:null},\"toString\"),YSe=Hj.call(function(){},\"prototype\"),dE=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],NR=function(e){var t=e.constructor;return t&&t.prototype===e},KSe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},JSe=function(){if(typeof window==\"undefined\")return!1;for(var e in window)try{if(!KSe[\"$\"+e]&&hE.call(window,e)&&window[e]!==null&&typeof window[e]==\"object\")try{NR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),$Se=function(e){if(typeof window==\"undefined\"||!JSe)return NR(e);try{return NR(e)}catch(t){return!1}},QSe=function(t){var r=t!==null&&typeof t==\"object\",n=Gj.call(t)===\"[object Function]\",i=XSe(t),a=r&&Gj.call(t)===\"[object String]\",o=[];if(!r&&!n&&!i)throw new TypeError(\"Object.keys called on a non-object\");var s=YSe&&n;if(a&&t.length>0&&!hE.call(t,0))for(var l=0;l<t.length;++l)o.push(String(l));if(i&&t.length>0)for(var u=0;u<t.length;++u)o.push(String(u));else for(var c in t)!(s&&c===\"prototype\")&&hE.call(t,c)&&o.push(String(c));if(ZSe)for(var f=$Se(t),h=0;h<dE.length;++h)!(f&&dE[h]===\"constructor\")&&hE.call(t,dE[h])&&o.push(dE[h]);return o});var hE,Gj,XSe,Hj,ZSe,YSe,dE,NR,KSe,JSe,$Se;eMe.exports=QSe});var jj=ye((ohr,nMe)=>{\"use strict\";var YMt=Array.prototype.slice,KMt=Vj(),rMe=Object.keys,UR=rMe?function(t){return rMe(t)}:tMe(),iMe=Object.keys;UR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return KMt(n)?iMe(YMt.call(n)):iMe(n)})}else Object.keys=UR;return Object.keys||UR};nMe.exports=UR});var cMe=ye((shr,uMe)=>{\"use strict\";var JMt=jj(),sMe=V8()(),lMe=nA(),aMe=Object,$Mt=lMe(\"Array.prototype.push\"),oMe=lMe(\"Object.prototype.propertyIsEnumerable\"),QMt=sMe?Object.getOwnPropertySymbols:null;uMe.exports=function(t,r){if(t==null)throw new TypeError(\"target must be an object\");var n=aMe(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=aMe(arguments[i]),o=JMt(a),s=sMe&&(Object.getOwnPropertySymbols||QMt);if(s)for(var l=s(a),u=0;u<l.length;++u){var c=l[u];oMe(a,c)&&$Mt(o,c)}for(var f=0;f<o.length;++f){var h=o[f];if(oMe(a,h)){var d=a[h];n[h]=d}}}return n}});var hMe=ye((lhr,fMe)=>{\"use strict\";var Wj=cMe(),e4t=function(){if(!Object.assign)return!1;for(var e=\"abcdefghijklmnopqrst\",t=e.split(\"\"),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a=\"\";for(var o in i)a+=o;return e!==a},t4t=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,\"xy\")}catch(t){return e[1]===\"y\"}return!1};fMe.exports=function(){return!Object.assign||e4t()||t4t()?Wj:Object.assign}});var Xj=ye((uhr,vMe)=>{\"use strict\";var dMe=function(e){return e!==e};vMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||dMe(t)&&dMe(r))}});var VR=ye((chr,pMe)=>{\"use strict\";var r4t=Xj();pMe.exports=function(){return typeof Object.is==\"function\"?Object.is:r4t}});var vE=ye((fhr,_Me)=>{\"use strict\";var i4t=jj(),n4t=typeof Symbol==\"function\"&&typeof Symbol(\"foo\")==\"symbol\",a4t=Object.prototype.toString,o4t=Array.prototype.concat,gMe=Object.defineProperty,s4t=function(e){return typeof e==\"function\"&&a4t.call(e)===\"[object Function]\"},l4t=kH()(),mMe=gMe&&l4t,u4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!s4t(n)||!n())return}mMe?gMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},yMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=i4t(t);n4t&&(n=o4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)u4t(e,n[i],t[n[i]],r[n[i]])};yMe.supportsDescriptors=!!mMe;_Me.exports=yMe});var bMe=ye((hhr,xMe)=>{\"use strict\";var c4t=VR(),f4t=vE();xMe.exports=function(){var t=c4t();return f4t(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var SMe=ye((dhr,AMe)=>{\"use strict\";var h4t=vE(),d4t=j4(),v4t=Xj(),wMe=VR(),p4t=bMe(),TMe=d4t(wMe(),Object);h4t(TMe,{getPolyfill:wMe,implementation:v4t,shim:p4t});AMe.exports=TMe});var Zj=ye((vhr,MMe)=>{\"use strict\";MMe.exports=function(t){return t!==t}});var Yj=ye((phr,EMe)=>{\"use strict\";var g4t=Zj();EMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN(\"a\")?Number.isNaN:g4t}});var kMe=ye((ghr,CMe)=>{\"use strict\";var m4t=vE(),y4t=Yj();CMe.exports=function(){var t=y4t();return m4t(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var RMe=ye((mhr,IMe)=>{\"use strict\";var _4t=j4(),x4t=vE(),b4t=Zj(),LMe=Yj(),w4t=kMe(),PMe=_4t(LMe(),Number);x4t(PMe,{getPolyfill:LMe,implementation:b4t,shim:w4t});IMe.exports=PMe});var QMe=ye((yhr,$Me)=>{\"use strict\";function DMe(e,t){return M4t(e)||S4t(e,t)||A4t(e,t)||T4t()}function T4t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A4t(e,t){if(e){if(typeof e==\"string\")return FMe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===\"Object\"&&e.constructor&&(r=e.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(e);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FMe(e,t)}}function FMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S4t(e,t){var r=e==null?null:typeof Symbol!=\"undefined\"&&e[Symbol.iterator]||e[\"@@iterator\"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function M4t(e){if(Array.isArray(e))return e}function J0(e){\"@babel/helpers - typeof\";return J0=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},J0(e)}var E4t=/a/g.flags!==void 0,YR=function(t){var r=[];return t.forEach(function(n){return r.push(n)}),r},zMe=function(t){var r=[];return t.forEach(function(n,i){return r.push([i,n])}),r},XMe=Object.is?Object.is:SMe(),XR=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},Kj=Number.isNaN?Number.isNaN:RMe();function $j(e){return e.call.bind(e)}var gE=$j(Object.prototype.hasOwnProperty),ZR=$j(Object.prototype.propertyIsEnumerable),OMe=$j(Object.prototype.toString),op=dA().types,C4t=op.isAnyArrayBuffer,k4t=op.isArrayBufferView,qMe=op.isDate,GR=op.isMap,BMe=op.isRegExp,HR=op.isSet,L4t=op.isNativeError,P4t=op.isBoxedPrimitive,NMe=op.isNumberObject,UMe=op.isStringObject,VMe=op.isBooleanObject,GMe=op.isBigIntObject,I4t=op.isSymbolObject,R4t=op.isFloat32Array,D4t=op.isFloat64Array;function F4t(e){if(e.length===0||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return e.length===10&&e>=Math.pow(2,32)}function jR(e){return Object.keys(e).filter(F4t).concat(XR(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function ZMe(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}var WR=void 0,z4t=!0,O4t=!1,Jj=0,Qj=1,YMe=2,KMe=3;function q4t(e,t){return E4t?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function B4t(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}function N4t(e,t){return e.byteLength!==t.byteLength?!1:ZMe(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function U4t(e,t){return e.byteLength===t.byteLength&&ZMe(new Uint8Array(e),new Uint8Array(t))===0}function V4t(e,t){return NMe(e)?NMe(t)&&XMe(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):UMe(e)?UMe(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):VMe(e)?VMe(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):GMe(e)?GMe(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I4t(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function $0(e,t,r,n){if(e===t)return e!==0?!0:r?XMe(e,t):!0;if(r){if(J0(e)!==\"object\")return typeof e==\"number\"&&Kj(e)&&Kj(t);if(J0(t)!==\"object\"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(e===null||J0(e)!==\"object\")return t===null||J0(t)!==\"object\"?e==t:!1;if(t===null||J0(t)!==\"object\")return!1}var i=OMe(e),a=OMe(t);if(i!==a)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=jR(e,WR),s=jR(t,WR);return o.length!==s.length?!1:pE(e,t,r,n,Qj,o)}if(i===\"[object Object]\"&&(!GR(e)&&GR(t)||!HR(e)&&HR(t)))return!1;if(qMe(e)){if(!qMe(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(BMe(e)){if(!BMe(t)||!q4t(e,t))return!1}else if(L4t(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(k4t(e)){if(!r&&(R4t(e)||D4t(e))){if(!B4t(e,t))return!1}else if(!N4t(e,t))return!1;var l=jR(e,WR),u=jR(t,WR);return l.length!==u.length?!1:pE(e,t,r,n,Jj,l)}else{if(HR(e))return!HR(t)||e.size!==t.size?!1:pE(e,t,r,n,YMe);if(GR(e))return!GR(t)||e.size!==t.size?!1:pE(e,t,r,n,KMe);if(C4t(e)){if(!U4t(e,t))return!1}else if(P4t(e)&&!V4t(e,t))return!1}return pE(e,t,r,n,Jj)}function HMe(e,t){return t.filter(function(r){return ZR(e,r)})}function pE(e,t,r,n,i,a){if(arguments.length===5){a=Object.keys(e);var o=Object.keys(t);if(a.length!==o.length)return!1}for(var s=0;s<a.length;s++)if(!gE(t,a[s]))return!1;if(r&&arguments.length===5){var l=XR(e);if(l.length!==0){var u=0;for(s=0;s<l.length;s++){var c=l[s];if(ZR(e,c)){if(!ZR(t,c))return!1;a.push(c),u++}else if(ZR(t,c))return!1}var f=XR(t);if(l.length!==f.length&&HMe(t,f).length!==u)return!1}else{var h=XR(t);if(h.length!==0&&HMe(t,h).length!==0)return!1}}if(a.length===0&&(i===Jj||i===Qj&&e.length===0||e.size===0))return!0;if(n===void 0)n={val1:new Map,val2:new Map,position:0};else{var d=n.val1.get(e);if(d!==void 0){var v=n.val2.get(t);if(v!==void 0)return d===v}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var x=X4t(e,t,r,a,n,i);return n.val1.delete(e),n.val2.delete(t),x}function jMe(e,t,r,n){for(var i=YR(e),a=0;a<i.length;a++){var o=i[a];if($0(t,o,r,n))return e.delete(o),!0}return!1}function JMe(e){switch(J0(e)){case\"undefined\":return null;case\"object\":return;case\"symbol\":return!1;case\"string\":e=+e;case\"number\":if(Kj(e))return!1}return!0}function G4t(e,t,r){var n=JMe(r);return n!=null?n:t.has(n)&&!e.has(n)}function H4t(e,t,r,n,i){var a=JMe(r);if(a!=null)return a;var o=t.get(a);return o===void 0&&!t.has(a)||!$0(n,o,!1,i)?!1:!e.has(a)&&$0(n,o,!1,i)}function j4t(e,t,r,n){for(var i=null,a=YR(e),o=0;o<a.length;o++){var s=a[o];if(J0(s)===\"object\"&&s!==null)i===null&&(i=new Set),i.add(s);else if(!t.has(s)){if(r||!G4t(e,t,s))return!1;i===null&&(i=new Set),i.add(s)}}if(i!==null){for(var l=YR(t),u=0;u<l.length;u++){var c=l[u];if(J0(c)===\"object\"&&c!==null){if(!jMe(i,c,r,n))return!1}else if(!r&&!e.has(c)&&!jMe(i,c,r,n))return!1}return i.size===0}return!0}function WMe(e,t,r,n,i,a){for(var o=YR(e),s=0;s<o.length;s++){var l=o[s];if($0(r,l,i,a)&&$0(n,t.get(l),i,a))return e.delete(l),!0}return!1}function W4t(e,t,r,n){for(var i=null,a=zMe(e),o=0;o<a.length;o++){var s=DMe(a[o],2),l=s[0],u=s[1];if(J0(l)===\"object\"&&l!==null)i===null&&(i=new Set),i.add(l);else{var c=t.get(l);if(c===void 0&&!t.has(l)||!$0(u,c,r,n)){if(r||!H4t(e,t,l,u,n))return!1;i===null&&(i=new Set),i.add(l)}}}if(i!==null){for(var f=zMe(t),h=0;h<f.length;h++){var d=DMe(f[h],2),v=d[0],x=d[1];if(J0(v)===\"object\"&&v!==null){if(!WMe(i,e,v,x,r,n))return!1}else if(!r&&(!e.has(v)||!$0(e.get(v),x,!1,n))&&!WMe(i,e,v,x,!1,n))return!1}return i.size===0}return!0}function X4t(e,t,r,n,i,a){var o=0;if(a===YMe){if(!j4t(e,t,r,i))return!1}else if(a===KMe){if(!W4t(e,t,r,i))return!1}else if(a===Qj)for(;o<e.length;o++)if(gE(e,o)){if(!gE(t,o)||!$0(e[o],t[o],r,i))return!1}else{if(gE(t,o))return!1;for(var s=Object.keys(e);o<s.length;o++){var l=s[o];if(!gE(t,l)||!$0(e[l],t[l],r,i))return!1}return s.length===Object.keys(t).length}for(o=0;o<n.length;o++){var u=n[o];if(!$0(e[u],t[u],r,i))return!1}return!0}function Z4t(e,t){return $0(e,t,O4t)}function Y4t(e,t){return $0(e,t,z4t)}$Me.exports={isDeepEqual:Z4t,isDeepStrictEqual:Y4t}});var oE=ye((_hr,m4e)=>{\"use strict\";function jg(e){\"@babel/helpers - typeof\";return jg=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},jg(e)}function e4e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,J4t(n.key),n)}}function K4t(e,t,r){return t&&e4e(e.prototype,t),r&&e4e(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function J4t(e){var t=$4t(e,\"string\");return jg(t)===\"symbol\"?t:String(t)}function $4t(e,t){if(jg(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(jg(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function Q4t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var eEt=qj(),mE=eEt.codes,t4e=mE.ERR_AMBIGUOUS_ARGUMENT,pA=mE.ERR_INVALID_ARG_TYPE,tEt=mE.ERR_INVALID_ARG_VALUE,rEt=mE.ERR_INVALID_RETURN_VALUE,N_=mE.ERR_MISSING_ARGS,U_=HSe(),iEt=dA(),KR=iEt.inspect,a4e=dA().types,nEt=a4e.isPromise,JR=a4e.isRegExp,aEt=hMe()(),o4e=VR()(),$R=nA()(\"RegExp.prototype.test\"),B_,QR;function yE(){var e=QMe();B_=e.isDeepEqual,QR=e.isDeepStrictEqual}var r4e=!1,Mf=m4e.exports=eW,eD={};function Wg(e){throw e.message instanceof Error?e.message:new U_(e)}function s4e(e,t,r,n,i){var a=arguments.length,o;if(a===0)o=\"Failed\";else if(a===1)r=e,e=void 0;else{if(r4e===!1){r4e=!0;var s=process.emitWarning?process.emitWarning:console.warn.bind(console);s(\"assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.\",\"DeprecationWarning\",\"DEP0094\")}a===2&&(n=\"!=\")}if(r instanceof Error)throw r;var l={actual:e,expected:t,operator:n===void 0?\"fail\":n,stackStartFn:i||s4e};r!==void 0&&(l.message=r);var u=new U_(l);throw o&&(u.message=o,u.generatedMessage=!0),u}Mf.fail=s4e;Mf.AssertionError=U_;function l4e(e,t,r,n){if(!r){var i=!1;if(t===0)i=!0,n=\"No value argument passed to `assert.ok()`\";else if(n instanceof Error)throw n;var a=new U_({actual:r,expected:!0,message:n,operator:\"==\",stackStartFn:e});throw a.generatedMessage=i,a}}function eW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l4e.apply(void 0,[eW,t.length].concat(t))}Mf.ok=eW;Mf.equal=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");t!=r&&Wg({actual:t,expected:r,message:n,operator:\"==\",stackStartFn:e})};Mf.notEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");t==r&&Wg({actual:t,expected:r,message:n,operator:\"!=\",stackStartFn:e})};Mf.deepEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");B_===void 0&&yE(),B_(t,r)||Wg({actual:t,expected:r,message:n,operator:\"deepEqual\",stackStartFn:e})};Mf.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");B_===void 0&&yE(),B_(t,r)&&Wg({actual:t,expected:r,message:n,operator:\"notDeepEqual\",stackStartFn:e})};Mf.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");B_===void 0&&yE(),QR(t,r)||Wg({actual:t,expected:r,message:n,operator:\"deepStrictEqual\",stackStartFn:e})};Mf.notDeepStrictEqual=u4e;function u4e(e,t,r){if(arguments.length<2)throw new N_(\"actual\",\"expected\");B_===void 0&&yE(),QR(e,t)&&Wg({actual:e,expected:t,message:r,operator:\"notDeepStrictEqual\",stackStartFn:u4e})}Mf.strictEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");o4e(t,r)||Wg({actual:t,expected:r,message:n,operator:\"strictEqual\",stackStartFn:e})};Mf.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new N_(\"actual\",\"expected\");o4e(t,r)&&Wg({actual:t,expected:r,message:n,operator:\"notStrictEqual\",stackStartFn:e})};var i4e=K4t(function e(t,r,n){var i=this;Q4t(this,e),r.forEach(function(a){a in t&&(n!==void 0&&typeof n[a]==\"string\"&&JR(t[a])&&$R(t[a],n[a])?i[a]=n[a]:i[a]=t[a])})});function oEt(e,t,r,n,i,a){if(!(r in e)||!QR(e[r],t[r])){if(!n){var o=new i4e(e,i),s=new i4e(t,i,e),l=new U_({actual:o,expected:s,operator:\"deepStrictEqual\",stackStartFn:a});throw l.actual=e,l.expected=t,l.operator=a.name,l}Wg({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}function c4e(e,t,r,n){if(typeof t!=\"function\"){if(JR(t))return $R(t,e);if(arguments.length===2)throw new pA(\"expected\",[\"Function\",\"RegExp\"],t);if(jg(e)!==\"object\"||e===null){var i=new U_({actual:e,expected:t,message:r,operator:\"deepStrictEqual\",stackStartFn:n});throw i.operator=n.name,i}var a=Object.keys(t);if(t instanceof Error)a.push(\"name\",\"message\");else if(a.length===0)throw new tEt(\"error\",t,\"may not be an empty object\");return B_===void 0&&yE(),a.forEach(function(o){typeof e[o]==\"string\"&&JR(t[o])&&$R(t[o],e[o])||oEt(e,t,o,r,a,n)}),!0}return t.prototype!==void 0&&e instanceof t?!0:Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function f4e(e){if(typeof e!=\"function\")throw new pA(\"fn\",\"Function\",e);try{e()}catch(t){return t}return eD}function n4e(e){return nEt(e)||e!==null&&jg(e)===\"object\"&&typeof e.then==\"function\"&&typeof e.catch==\"function\"}function h4e(e){return Promise.resolve().then(function(){var t;if(typeof e==\"function\"){if(t=e(),!n4e(t))throw new rEt(\"instance of Promise\",\"promiseFn\",t)}else if(n4e(e))t=e;else throw new pA(\"promiseFn\",[\"Function\",\"Promise\"],e);return Promise.resolve().then(function(){return t}).then(function(){return eD}).catch(function(r){return r})})}function d4e(e,t,r,n){if(typeof r==\"string\"){if(arguments.length===4)throw new pA(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(jg(t)===\"object\"&&t!==null){if(t.message===r)throw new t4e(\"error/message\",'The error message \"'.concat(t.message,'\" is identical to the message.'))}else if(t===r)throw new t4e(\"error/message\",'The error \"'.concat(t,'\" is identical to the message.'));n=r,r=void 0}else if(r!=null&&jg(r)!==\"object\"&&typeof r!=\"function\")throw new pA(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(t===eD){var i=\"\";r&&r.name&&(i+=\" (\".concat(r.name,\")\")),i+=n?\": \".concat(n):\".\";var a=e.name===\"rejects\"?\"rejection\":\"exception\";Wg({actual:void 0,expected:r,operator:e.name,message:\"Missing expected \".concat(a).concat(i),stackStartFn:e})}if(r&&!c4e(t,r,n,e))throw t}function v4e(e,t,r,n){if(t!==eD){if(typeof r==\"string\"&&(n=r,r=void 0),!r||c4e(t,r)){var i=n?\": \".concat(n):\".\",a=e.name===\"doesNotReject\"?\"rejection\":\"exception\";Wg({actual:t,expected:r,operator:e.name,message:\"Got unwanted \".concat(a).concat(i,`\n",
       "`)+'Actual message: \"'.concat(t&&t.message,'\"'),stackStartFn:e})}throw t}}Mf.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];d4e.apply(void 0,[e,f4e(t)].concat(n))};Mf.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return h4e(t).then(function(a){return d4e.apply(void 0,[e,a].concat(n))})};Mf.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];v4e.apply(void 0,[e,f4e(t)].concat(n))};Mf.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return h4e(t).then(function(a){return v4e.apply(void 0,[e,a].concat(n))})};Mf.ifError=function e(t){if(t!=null){var r=\"ifError got unwanted exception: \";jg(t)===\"object\"&&typeof t.message==\"string\"?t.message.length===0&&t.constructor?r+=t.constructor.name:r+=t.message:r+=KR(t);var n=new U_({actual:t,expected:null,operator:\"ifError\",message:r,stackStartFn:e}),i=t.stack;if(typeof i==\"string\"){var a=i.split(`\n",
       "`);a.shift();for(var o=n.stack.split(`\n",
       "`),s=0;s<a.length;s++){var l=o.indexOf(a[s]);if(l!==-1){o=o.slice(0,l);break}}n.stack=\"\".concat(o.join(`\n",
       "`),`\n",
       "`).concat(a.join(`\n",
       "`))}throw n}};function p4e(e,t,r,n,i){if(!JR(t))throw new pA(\"regexp\",\"RegExp\",t);var a=i===\"match\";if(typeof e!=\"string\"||$R(t,e)!==a){if(r instanceof Error)throw r;var o=!r;r=r||(typeof e!=\"string\"?'The \"string\" argument must be of type string. Received type '+\"\".concat(jg(e),\" (\").concat(KR(e),\")\"):(a?\"The input did not match the regular expression \":\"The input was expected to not match the regular expression \")+\"\".concat(KR(t),`. Input:\n",
       "\n",
       "`).concat(KR(e),`\n",
       "`));var s=new U_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}Mf.match=function e(t,r,n){p4e(t,r,n,e,\"match\")};Mf.doesNotMatch=function e(t,r,n){p4e(t,r,n,e,\"doesNotMatch\")};function g4e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l4e.apply(void 0,[g4e,t.length].concat(t))}Mf.strict=aEt(g4e,Mf,{equal:Mf.strictEqual,deepEqual:Mf.deepStrictEqual,notEqual:Mf.notStrictEqual,notDeepEqual:Mf.notDeepStrictEqual});Mf.strict.strict=Mf.strict});var _4e=ye((xhr,y4e)=>{var _E=1e3,xE=_E*60,bE=xE*60,wE=bE*24,sEt=wE*365.25;y4e.exports=function(e,t){t=t||{};var r=typeof e;if(r===\"string\"&&e.length>0)return lEt(e);if(r===\"number\"&&isNaN(e)===!1)return t.long?cEt(e):uEt(e);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(e))};function lEt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||\"ms\").toLowerCase();switch(n){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*sEt;case\"days\":case\"day\":case\"d\":return r*wE;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*bE;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*xE;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*_E;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function uEt(e){return e>=wE?Math.round(e/wE)+\"d\":e>=bE?Math.round(e/bE)+\"h\":e>=xE?Math.round(e/xE)+\"m\":e>=_E?Math.round(e/_E)+\"s\":e+\"ms\"}function cEt(e){return tD(e,wE,\"day\")||tD(e,bE,\"hour\")||tD(e,xE,\"minute\")||tD(e,_E,\"second\")||e+\" ms\"}function tD(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+\" \"+r:Math.ceil(e/t)+\" \"+r+\"s\"}});var b4e=ye((Lc,x4e)=>{Lc=x4e.exports=rW.debug=rW.default=rW;Lc.coerce=pEt;Lc.disable=dEt;Lc.enable=hEt;Lc.enabled=vEt;Lc.humanize=_4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var tW;function fEt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function rW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(tW||n);r.diff=i,r.prev=tW,r.curr=n,tW=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=Lc.coerce(a[0]),typeof a[0]!=\"string\"&&a.unshift(\"%O\");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(u,c){if(u===\"%%\")return u;s++;var f=Lc.formatters[c];if(typeof f==\"function\"){var h=a[s];u=f.call(r,h),a.splice(s,1),s--}return u}),Lc.formatArgs.call(r,a);var l=t.log||Lc.log||console.log.bind(console);l.apply(r,a)}}return t.namespace=e,t.enabled=Lc.enabled(e),t.useColors=Lc.useColors(),t.color=fEt(e),typeof Lc.init==\"function\"&&Lc.init(t),t}function hEt(e){Lc.save(e),Lc.names=[],Lc.skips=[];for(var t=(typeof e==\"string\"?e:\"\").split(/[\\s,]+/),r=t.length,n=0;n<r;n++)t[n]&&(e=t[n].replace(/\\*/g,\".*?\"),e[0]===\"-\"?Lc.skips.push(new RegExp(\"^\"+e.substr(1)+\"$\")):Lc.names.push(new RegExp(\"^\"+e+\"$\")))}function dEt(){Lc.enable(\"\")}function vEt(e){var t,r;for(t=0,r=Lc.skips.length;t<r;t++)if(Lc.skips[t].test(e))return!1;for(t=0,r=Lc.names.length;t<r;t++)if(Lc.names[t].test(e))return!0;return!1}function pEt(e){return e instanceof Error?e.stack||e.message:e}});var A4e=ye((sp,T4e)=>{sp=T4e.exports=b4e();sp.log=yEt;sp.formatArgs=mEt;sp.save=_Et;sp.load=w4e;sp.useColors=gEt;sp.storage=typeof chrome!=\"undefined\"&&typeof chrome.storage!=\"undefined\"?chrome.storage.local:xEt();sp.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"];function gEt(){return typeof window!=\"undefined\"&&window.process&&window.process.type===\"renderer\"?!0:typeof document!=\"undefined\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=\"undefined\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=\"undefined\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=\"undefined\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}sp.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}};function mEt(e){var t=this.useColors;if(e[0]=(t?\"%c\":\"\")+this.namespace+(t?\" %c\":\" \")+e[0]+(t?\"%c \":\" \")+\"+\"+sp.humanize(this.diff),!!t){var r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!==\"%%\"&&(n++,a===\"%c\"&&(i=n))}),e.splice(i,0,r)}}function yEt(){return typeof console==\"object\"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function _Et(e){try{e==null?sp.storage.removeItem(\"debug\"):sp.storage.debug=e}catch(t){}}function w4e(){var e;try{e=sp.storage.debug}catch(t){}return!e&&typeof process!=\"undefined\"&&\"env\"in process&&(e=process.env.DEBUG),e}sp.enable(w4e());function xEt(){try{return window.localStorage}catch(e){}}});var I4e=ye((bhr,P4e)=>{var gA=oE(),V_=A4e()(\"stream-parser\");P4e.exports=wEt;var M4e=-1,rD=0,bEt=1,E4e=2;function wEt(e){var t=e&&typeof e._transform==\"function\",r=e&&typeof e._write==\"function\";if(!t&&!r)throw new Error(\"must pass a Writable or Transform stream in\");V_(\"extending Parser into stream\"),e._bytes=TEt,e._skipBytes=AEt,t&&(e._passthrough=SEt),t?e._transform=EEt:e._write=MEt}function TE(e){V_(\"initializing parser stream\"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=M4e,e._parserCallback=null,typeof e.push==\"function\"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function TEt(e,t){gA(!this._parserCallback,'there is already a \"callback\" set!'),gA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got \"'+e+'\"'),this._parserInit||TE(this),V_(\"buffering %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=rD}function AEt(e,t){gA(!this._parserCallback,'there is already a \"callback\" set!'),gA(e>0,'can only skip > 0 bytes, got \"'+e+'\"'),this._parserInit||TE(this),V_(\"skipping %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=bEt}function SEt(e,t){gA(!this._parserCallback,'There is already a \"callback\" set!'),gA(e>0,'can only pass through > 0 bytes, got \"'+e+'\"'),this._parserInit||TE(this),V_(\"passing through %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=E4e}function MEt(e,t,r){this._parserInit||TE(this),V_(\"write(%o bytes)\",e.length),typeof t==\"function\"&&(r=t),k4e(this,e,null,r)}function EEt(e,t,r){this._parserInit||TE(this),V_(\"transform(%o bytes)\",e.length),typeof t!=\"function\"&&(t=this._parserOutput),k4e(this,e,t,r)}function C4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error(\"got data but not currently parsing anything\")):t.length<=e._parserBytesLeft?function(){return S4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return S4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return C4e(e,t.slice(i.length),r,n)}})}}function S4e(e,t,r,n){if(e._parserBytesLeft-=t.length,V_(\"%o bytes left for stream piece\",e._parserBytesLeft),e._parserState===rD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===E4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===rD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==rD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=M4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(L4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var k4e=L4e(C4e);function L4e(e){return function(){for(var t=e.apply(this,arguments);typeof t==\"function\";)t=t();return t}}});var rc=ye(Hy=>{\"use strict\";var R4e=SSe().Transform,CEt=I4e();function AE(){R4e.call(this,{readableObjectMode:!0})}AE.prototype=Object.create(R4e.prototype);AE.prototype.constructor=AE;CEt(AE.prototype);Hy.ParserStream=AE;Hy.sliceEq=function(e,t,r){for(var n=t,i=0;i<r.length;)if(e[n++]!==r[i++])return!1;return!0};Hy.str2arr=function(e,t){var r=[],n=0;if(t&&t===\"hex\")for(;n<e.length;)r.push(parseInt(e.slice(n,n+2),16)),n+=2;else for(;n<e.length;n++)r.push(e.charCodeAt(n)&255);return r};Hy.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};Hy.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8};Hy.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]*16777216};Hy.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|e[t]*16777216};function iD(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}iD.prototype=Object.create(Error.prototype);iD.prototype.constructor=iD;Hy.ProbeError=iD});var D4e=ye((Thr,nD)=>{\"use strict\";var mA=rc().readUInt16BE,nW=rc().readUInt32BE;function SE(e,t){if(e.length<4+t)return null;var r=nW(e,t);return e.length<r+t||r<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+r),end:t+r}}nD.exports.unbox=SE;function kEt(e,t){for(var r=0;;){var n=SE(e,r);if(!n)break;switch(n.boxtype){case\"ispe\":t.sizes.push({width:nW(n.data,4),height:nW(n.data,8)});break;case\"irot\":t.transforms.push({type:\"irot\",value:n.data[0]&3});break;case\"imir\":t.transforms.push({type:\"imir\",value:n.data[0]&1});break}r=n.end}}function iW(e,t,r){for(var n=0,i=0;i<r;i++)n=n*256+(e[t+i]||0);return n}function LEt(e,t){for(var r=e[4]>>4&15,n=e[4]&15,i=e[5]>>4&15,a=mA(e,6),o=8,s=0;s<a;s++){var l=mA(e,o);o+=2;var u=mA(e,o);o+=2;var c=iW(e,o,i);o+=i;var f=mA(e,o);if(o+=2,u===0&&f===1){var h=iW(e,o,r),d=iW(e,o+r,n);t.item_loc[l]={length:d,offset:h+c}}o+=f*(r+n)}}function PEt(e,t){for(var r=mA(e,4),n=6,i=0;i<r;i++){var a=SE(e,n);if(!a)break;if(a.boxtype===\"infe\"){for(var o=mA(a.data,4),s=\"\",l=8;l<a.data.length&&a.data[l];l++)s+=String.fromCharCode(a.data[l]);t.item_inf[s]=o}n=a.end}}function IEt(e,t){for(var r=0;;){var n=SE(e,r);if(!n)break;n.boxtype===\"ipco\"&&kEt(n.data,t),r=n.end}}function REt(e,t){for(var r=4;;){var n=SE(e,r);if(!n)break;n.boxtype===\"iprp\"&&IEt(n.data,t),n.boxtype===\"iloc\"&&LEt(n.data,t),n.boxtype===\"iinf\"&&PEt(n.data,t),r=n.end}}function DEt(e){var t=e.reduce(function(i,a){return i.width>a.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}nD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(REt(e,t),!!t.sizes.length){var r=DEt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type===\"imir\"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type===\"irot\")for(var l=0;l<a.value;l++)n=o[n]});var i=null;return t.item_inf.Exif&&(i=t.item_loc[t.item_inf.Exif]),{width:r.width,height:r.height,orientation:t.transforms.length?n:null,variants:t.sizes,exif_location:i}}};nD.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),r={};r[t]=!0;for(var n=8;n<e.length;n+=4)r[String.fromCharCode.apply(null,e.slice(n,n+4))]=!0;if(!(!r.mif1&&!r.msf1&&!r.miaf))return t===\"avif\"||t===\"avis\"||t===\"avio\"?{type:\"avif\",mime:\"image/avif\"}:t===\"heic\"||t===\"heix\"?{type:\"heic\",mime:\"image/heic\"}:t===\"hevc\"||t===\"hevx\"?{type:\"heic\",mime:\"image/heic-sequence\"}:r.avif||r.avis?{type:\"avif\",mime:\"image/avif\"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:\"heif\",mime:\"image/heif-sequence\"}:{type:\"heif\",mime:\"image/heif\"}:{type:\"avif\",mime:\"image/avif\"}}});var oD=ye((Ahr,aW)=>{\"use strict\";function aD(e,t){var r=new Error(e);return r.code=t,r}function FEt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function jy(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!==\"II*\\0\"&&n!==\"MM\\0*\")throw aD(\"invalid TIFF signature\",\"EBADDATA\");this.big_endian=n[0]===\"M\"}jy.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};jy.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw aD(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};jy.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw aD(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};jy.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};jy.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};jy.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};jy.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;i<n;i++){var a=this.read_uint16(t),o=this.read_uint16(t+2),s=this.read_uint32(t+4),l=this.exif_format_length(o),u=s*l,c=u<=4?t+8:this.read_uint32(t+8),f=!1;if(c+u>this.input.length)throw aD(\"unexpected EOF\",\"EBADDATA\");for(var h=[],d=c,v=0;v<s;v++,d+=l){var x=this.exif_format_read(o,d);if(x===null){h=null;break}h.push(x)}Array.isArray(h)&&o===2&&(h=FEt(String.fromCharCode.apply(null,h)),h&&h[h.length-1]===\"\\0\"&&(h=h.slice(0,-1))),this.is_subifd_link(e,a)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};aW.exports.ExifParser=jy;aW.exports.get_orientation=function(e){var t=0;try{return new jy(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var z4e=ye((Shr,F4e)=>{\"use strict\";var zEt=rc().str2arr,OEt=rc().sliceEq,qEt=rc().readUInt32BE,sD=D4e(),BEt=oD(),NEt=zEt(\"ftyp\");F4e.exports=function(e){if(OEt(e,4,NEt)){var t=sD.unbox(e,0);if(t){var r=sD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=sD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype===\"mdat\")return;if(a.boxtype===\"meta\"){n=a.data;break}}if(n){var o=sD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:\"px\",hUnits:\"px\"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=qEt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=BEt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var B4e=ye((Mhr,q4e)=>{\"use strict\";var UEt=rc().str2arr,VEt=rc().sliceEq,O4e=rc().readUInt16LE,GEt=UEt(\"BM\");q4e.exports=function(e){if(!(e.length<26)&&VEt(e,0,GEt))return{width:O4e(e,18),height:O4e(e,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}});var H4e=ye((Ehr,G4e)=>{\"use strict\";var V4e=rc().str2arr,N4e=rc().sliceEq,U4e=rc().readUInt16LE,HEt=V4e(\"GIF87a\"),jEt=V4e(\"GIF89a\");G4e.exports=function(e){if(!(e.length<10)&&!(!N4e(e,0,HEt)&&!N4e(e,0,jEt)))return{width:U4e(e,6),height:U4e(e,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}});var X4e=ye((Chr,W4e)=>{\"use strict\";var oW=rc().readUInt16LE,WEt=0,XEt=1,j4e=16;W4e.exports=function(e){var t=oW(e,0),r=oW(e,2),n=oW(e,4);if(!(t!==WEt||r!==XEt||!n)){for(var i=[],a={width:0,height:0},o=0;o<n;o++){var s=e[6+j4e*o]||256,l=e[6+j4e*o+1]||256,u={width:s,height:l};i.push(u),(s>a.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}});var Y4e=ye((khr,Z4e)=>{\"use strict\";var sW=rc().readUInt16BE,ZEt=rc().str2arr,YEt=rc().sliceEq,KEt=oD(),JEt=ZEt(\"Exif\\0\\0\");Z4e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=sW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&YEt(e,t,JEt)&&(i=KEt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t<n)return;var a={width:sW(e,t+3),height:sW(e,t+1),type:\"jpg\",mime:\"image/jpeg\",wUnits:\"px\",hUnits:\"px\"};return i>0&&(a.orientation=i),a}t+=n}}});var eEe=ye((Lhr,Q4e)=>{\"use strict\";var $4e=rc().str2arr,K4e=rc().sliceEq,J4e=rc().readUInt32BE,$Et=$4e(`\\x89PNG\\r\n",
       "\u001a\n",
       "`),QEt=$4e(\"IHDR\");Q4e.exports=function(e){if(!(e.length<24)&&K4e(e,0,$Et)&&K4e(e,12,QEt))return{width:J4e(e,16),height:J4e(e,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}});var iEe=ye((Phr,rEe)=>{\"use strict\";var eCt=rc().str2arr,tCt=rc().sliceEq,tEe=rc().readUInt32BE,rCt=eCt(\"8BPS\\0\u0001\");rEe.exports=function(e){if(!(e.length<22)&&tCt(e,0,rCt))return{width:tEe(e,18),height:tEe(e,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}});var oEe=ye((Ihr,aEe)=>{\"use strict\";function iCt(e){return e===32||e===9||e===13||e===10}function yA(e){return typeof e==\"number\"&&isFinite(e)&&e>0}function nCt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t<r&&iCt(e[t]);)t++;return t===r?!1:e[t]===60}var aCt=/<[-_.:a-zA-Z0-9][^>]*>/,oCt=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,sCt=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,lCt=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,uCt=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,nEe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function cCt(e){var t=e.match(sCt),r=e.match(lCt),n=e.match(uCt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return nEe.test(e)?e.match(nEe)[0]:\"px\"}aEe.exports=function(e){if(nCt(e)){for(var t=\"\",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var n=(t.match(aCt)||[\"\"])[0];if(oCt.test(n)){var i=cCt(n),a=parseFloat(i.width),o=parseFloat(i.height);if(i.width&&i.height)return!yA(a)||!yA(o)?void 0:{width:a,height:o,type:\"svg\",mime:\"image/svg+xml\",wUnits:Nm(i.width),hUnits:Nm(i.height)};var s=(i.viewbox||\"\").split(\" \"),l={width:s[2],height:s[3]},u=parseFloat(l.width),c=parseFloat(l.height);if(!(!yA(u)||!yA(c))&&Nm(l.width)===Nm(l.height)){var f=u/c;return i.width?yA(a)?{width:a,height:a/f,type:\"svg\",mime:\"image/svg+xml\",wUnits:Nm(i.width),hUnits:Nm(i.width)}:void 0:i.height?yA(o)?{width:o*f,height:o,type:\"svg\",mime:\"image/svg+xml\",wUnits:Nm(i.height),hUnits:Nm(i.height)}:void 0:{width:u,height:c,type:\"svg\",mime:\"image/svg+xml\",wUnits:Nm(l.width),hUnits:Nm(l.height)}}}}}});var fEe=ye((Rhr,cEe)=>{\"use strict\";var uEe=rc().str2arr,sEe=rc().sliceEq,fCt=rc().readUInt16LE,hCt=rc().readUInt16BE,dCt=rc().readUInt32LE,vCt=rc().readUInt32BE,pCt=uEe(\"II*\\0\"),gCt=uEe(\"MM\\0*\");function lD(e,t,r){return r?hCt(e,t):fCt(e,t)}function lW(e,t,r){return r?vCt(e,t):dCt(e,t)}function lEe(e,t,r){var n=lD(e,t+2,r),i=lW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?lD(e,t+8,r):lW(e,t+8,r)}cEe.exports=function(e){if(!(e.length<8)&&!(!sEe(e,0,pCt)&&!sEe(e,0,gCt))){var t=e[0]===77,r=lW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=lD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n<i))){var a,o,s,l;for(a=0;a<i;a+=12)l=lD(e,n+a,t),l===256?o=lEe(e,n+a,t):l===257&&(s=lEe(e,n+a,t));if(o&&s)return{width:o,height:s,type:\"tiff\",mime:\"image/tiff\",wUnits:\"px\",hUnits:\"px\"}}}}}}});var gEe=ye((Dhr,pEe)=>{\"use strict\";var vEe=rc().str2arr,hEe=rc().sliceEq,dEe=rc().readUInt16LE,uW=rc().readUInt32LE,mCt=oD(),yCt=vEe(\"RIFF\"),_Ct=vEe(\"WEBP\");function xCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:dEe(e,t+6)&16383,height:dEe(e,t+8)&16383,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}function bCt(e,t){if(e[t]===47){var r=uW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function wCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<t|e[t+8]<<8|e[t+7])+1,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}pEe.exports=function(e){if(!(e.length<16)&&!(!hEe(e,0,yCt)&&!hEe(e,8,_Ct))){var t=12,r=null,n=0,i=uW(e,4)+8;if(!(i>e.length)){for(;t+8<i;){if(e[t]===0){t++;continue}var a=String.fromCharCode.apply(null,e.slice(t,t+4)),o=uW(e,t+4);a===\"VP8 \"&&o>=10?r=r||xCt(e,t+8):a===\"VP8L\"&&o>=9?r=r||bCt(e,t+8):a===\"VP8X\"&&o>=10?r=r||wCt(e,t+8):a===\"EXIF\"&&(n=mCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var yEe=ye((Fhr,mEe)=>{\"use strict\";mEe.exports={avif:z4e(),bmp:B4e(),gif:H4e(),ico:X4e(),jpeg:Y4e(),png:eEe(),psd:iEe(),svg:oEe(),tiff:fEe(),webp:gEe()}});var _Ee=ye((zhr,fW)=>{\"use strict\";var cW=yEe();function TCt(e){for(var t=Object.keys(cW),r=0;r<t.length;r++){var n=cW[t[r]](e);if(n)return n}return null}fW.exports=function(t){return TCt(t)};fW.exports.parsers=cW});var bEe=ye(xEe=>{\"use strict\";var ACt=_Ee(),SCt=Ly().IMAGE_URL_PREFIX,MCt=u2().Buffer;xEe.getImageSize=function(e){var t=e.replace(SCt,\"\"),r=new MCt(t,\"base64\");return ACt(r)}});var AEe=ye((qhr,TEe)=>{\"use strict\";var wEe=Dr(),ECt=jT(),CCt=Eo(),uD=ho(),kCt=Dr().maxRowLength,LCt=bEe().getImageSize;TEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=kCt(r.z);else if(r._hasSource){var a=LCt(r.source);n=a.height,i=a.width}var o=uD.getFromId(t,r.xaxis||\"x\"),s=uD.getFromId(t,r.yaxis||\"y\"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type===\"log\")for(c=0;c<i;c++)f.push(l+c*r.dx);if(s&&s.type===\"log\")for(c=0;c<n;c++)h.push(u+c*r.dy);r._extremes[o._id]=uD.findExtremes(o,f),r._extremes[s._id]=uD.findExtremes(s,h),r._scaler=RCt(r);var d={x0:l,y0:u,z:r.z,w:i,h:n};return[d]};function PCt(e,t,r,n){return function(i){return wEe.constrain((i-e)*t,r,n)}}function ICt(e,t){return function(r){return wEe.constrain(r,e,t)}}function RCt(e){var t=ECt.colormodel[e.colormodel],r=t.colormodel||e.colormodel,n=r.length;e._sArray=[];for(var i=0;i<n;i++)t.min[i]!==e.zmin[i]||t.max[i]!==e.zmax[i]?e._sArray.push(PCt(e.zmin[i],(t.max[i]-t.min[i])/(e.zmax[i]-e.zmin[i]),t.min[i],t.max[i])):e._sArray.push(ICt(t.min[i],t.max[i]));return function(a){for(var o=a.slice(0,n),s=0;s<n;s++){var l=o[s];if(!CCt(l))return!1;o[s]=e._sArray[s](l)}return o}}});var EEe=ye((Bhr,MEe)=>{\"use strict\";var DCt=Oa(),T2=Dr(),SEe=T2.strTranslate,FCt=Wp(),zCt=jT(),OCt=JV(),qCt=u8().STYLE;MEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&OCt();T2.makeTraceGroups(i,n,\"im\").each(function(l){var u=DCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth===\"fast\"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type===\"linear\"&&o.type===\"linear\";f._realImage=h;var d=c.z,v=c.x0,x=c.y0,b=c.w,p=c.h,C=f.dx,E=f.dy,A,L,_,k,M,g;for(g=0;A===void 0&&g<b;)A=a.c2p(v+g*C),g++;for(g=b;L===void 0&&g>0;)L=a.c2p(v+g*C),g--;for(g=0;k===void 0&&g<p;)k=o.c2p(x+g*E),g++;for(g=p;M===void 0&&g>0;)M=o.c2p(x+g*E),g--;if(L<A&&(_=L,L=A,A=_),M<k&&(_=k,k=M,M=_),!h){var P=.5;A=Math.max(-P*a._length,A),L=Math.min((1+P)*a._length,L),k=Math.max(-P*o._length,k),M=Math.min((1+P)*o._length,M)}var T=Math.round(L-A),z=Math.round(M-k),O=T<=0||z<=0;if(O){var V=u.selectAll(\"image\").data([]);V.exit().remove();return}function G(me){var ie=document.createElement(\"canvas\");ie.width=T,ie.height=z;var Se=ie.getContext(\"2d\",{willReadFrequently:!0}),Le=function(st){return T2.constrain(Math.round(a.c2p(v+st*C)-A),0,T)},Ae=function(st){return T2.constrain(Math.round(o.c2p(x+st*E)-k),0,z)},De=zCt.colormodel[f.colormodel],Pe=De.colormodel||f.colormodel,ge=De.fmt,Fe;for(g=0;g<c.w;g++){var ce=Le(g),Ze=Le(g+1);if(!(Ze===ce||isNaN(Ze)||isNaN(ce)))for(var ct=0;ct<c.h;ct++){var pt=Ae(ct),Wt=Ae(ct+1);Wt===pt||isNaN(Wt)||isNaN(pt)||!me(g,ct)||(Fe=f._scaler(me(g,ct)),Fe?Se.fillStyle=Pe+\"(\"+ge(Fe).join(\",\")+\")\":Se.fillStyle=\"rgba(0,0,0,0)\",Se.fillRect(ce,pt,Ze-ce,Wt-pt))}}return ie}var Z=u.selectAll(\"image\").data([l]);Z.enter().append(\"svg:image\").attr({xmlns:FCt.svg,preserveAspectRatio:\"none\"}),Z.exit().remove();var H=f.zsmooth===!1?qCt:\"\";if(h){var N=T2.simpleMap(a.range,a.r2l),j=T2.simpleMap(o.range,o.r2l),re=N[1]<N[0],oe=j[1]>j[0];if(re||oe){var _e=A+T/2,Me=k+z/2;H+=\"transform:\"+SEe(_e+\"px\",Me+\"px\")+\"scale(\"+(re?-1:1)+\",\"+(oe?-1:1)+\")\"+SEe(-_e+\"px\",-Me+\"px\")+\";\"}}Z.attr(\"style\",H);var ke=new Promise(function(me){if(f._hasZ)me();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)me();else{var ie=document.createElement(\"canvas\");ie.width=b,ie.height=p;var Se=ie.getContext(\"2d\",{willReadFrequently:!0});f._image=f._image||new Image;var Le=f._image;Le.onload=function(){Se.drawImage(Le,0,0),f._canvas={el:ie,source:f.source},me()},Le.setAttribute(\"src\",f.source)}}).then(function(){var me,ie;if(f._hasZ)ie=G(function(Ae,De){var Pe=d[De][Ae];return T2.isTypedArray(Pe)&&(Pe=Array.from(Pe)),Pe}),me=ie.toDataURL(\"image/png\");else if(f._hasSource)if(h)me=f.source;else{var Se=f._canvas.el.getContext(\"2d\",{willReadFrequently:!0}),Le=Se.getImageData(0,0,b,p).data;ie=G(function(Ae,De){var Pe=4*(De*b+Ae);return[Le[Pe],Le[Pe+1],Le[Pe+2],Le[Pe+3]]}),me=ie.toDataURL(\"image/png\")}Z.attr({\"xlink:href\":me,height:z,width:T,x:A,y:k})});t._promises.push(ke)})}});var kEe=ye((Nhr,CEe)=>{\"use strict\";var BCt=Oa();CEe.exports=function(t){BCt.select(t).selectAll(\".im image\").style(\"opacity\",function(r){return r[0].trace.opacity})}});var REe=ye((Uhr,IEe)=>{\"use strict\";var LEe=vf(),PEe=Dr(),cD=PEe.isArrayOrTypedArray,NCt=jT();IEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(LEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||LEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext(\"2d\",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split(\"+\");d.indexOf(\"all\")!==-1&&(d=[\"color\"]),d.indexOf(\"color\")!==-1&&(h=!0)}var v=NCt.colormodel[a.colormodel],x=v.colormodel||a.colormodel,b=x.length,p=a._scaler(c),C=v.suffix,E=[];(a.hovertemplate||h)&&(E.push(\"[\"+[p[0]+C[0],p[1]+C[1],p[2]+C[2]].join(\", \")),b===4&&E.push(\", \"+p[3]+C[3]),E.push(\"]\"),E=E.join(\"\"),t.extraText=x.toUpperCase()+\": \"+E);var A;cD(a.hovertext)&&cD(a.hovertext[u])?A=a.hovertext[u][l]:cD(a.text)&&cD(a.text[u])&&(A=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),_=i.x0+(l+.5)*a.dx,k=i.y0+(u+.5)*a.dy,M=\"[\"+c.slice(0,a.colormodel.length).join(\", \")+\"]\";return[PEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:_,xLabelVal:_,yVal:k,yLabelVal:k,zLabelVal:M,text:A,hovertemplateLabels:{zLabel:M,colorLabel:E,\"color[0]Label\":p[0]+C[0],\"color[1]Label\":p[1]+C[1],\"color[2]Label\":p[2]+C[2],\"color[3]Label\":p[3]+C[3]}})]}}}});var FEe=ye((Vhr,DEe)=>{\"use strict\";DEe.exports=function(t,r){return\"xVal\"in r&&(t.x=r.xVal),\"yVal\"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var OEe=ye((Ghr,zEe)=>{\"use strict\";zEe.exports={attributes:sH(),supplyDefaults:R3e(),calc:AEe(),plot:EEe(),style:kEe(),hoverPoints:REe(),eventData:FEe(),moduleType:\"trace\",name:\"image\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}});var BEe=ye((Hhr,qEe)=>{\"use strict\";qEe.exports=OEe()});var A2=ye((jhr,NEe)=>{\"use strict\";var UCt=Gl(),VCt=kc().attributes,GCt=ec(),HCt=Eh(),jCt=Qo().hovertemplateAttrs,WCt=Qo().texttemplateAttrs,ME=Ao().extendFlat,XCt=Pd().pattern,fD=GCt({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});NEe.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:HCt.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},pattern:XCt,editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:ME({},UCt.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:jCt({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:WCt({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:ME({},fD,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:ME({},fD,{}),outsidetextfont:ME({},fD,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:ME({},fD,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:VCt({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"}}});var S2=ye((Whr,GEe)=>{\"use strict\";var ZCt=Eo(),EE=Dr(),YCt=A2(),KCt=kc().defaults,JCt=r0().handleText,$Ct=Dr().coercePattern;function UEe(e,t){var r=EE.isArrayOrTypedArray(e),n=EE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o<i;o++){var s=t[o];if(ZCt(s)&&s>0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function VEe(e,t,r,n,i){var a=n(\"marker.line.width\");a&&n(\"marker.line.color\",i?void 0:r.paper_bgcolor);var o=n(\"marker.colors\");$Ct(n,\"marker.pattern\",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function QCt(e,t,r,n){function i(C,E){return EE.coerce(e,t,YCt,C,E)}var a=i(\"labels\"),o=i(\"values\"),s=UEe(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i(\"label0\"),i(\"dlabel\")),!l){t.visible=!1;return}t._length=l,VEe(e,t,n,i,!0),i(\"scalegroup\");var u=i(\"text\"),c=i(\"texttemplate\"),f;if(c||(f=i(\"textinfo\",EE.isArrayOrTypedArray(u)?\"text+percent\":\"percent\")),i(\"hovertext\"),i(\"hovertemplate\"),c||f&&f!==\"none\"){var h=i(\"textposition\");JCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h===\"auto\",v=d||h===\"outside\";v&&i(\"automargin\"),(h===\"inside\"||h===\"auto\"||Array.isArray(h))&&i(\"insidetextorientation\")}else f===\"none\"&&i(\"textposition\",\"none\");KCt(t,n,i);var x=i(\"hole\"),b=i(\"title.text\");if(b){var p=i(\"title.position\",x?\"middle center\":\"top center\");!x&&p===\"middle center\"&&(t.title.position=\"top center\"),EE.coerceFont(i,\"title.font\",n.font)}i(\"sort\"),i(\"direction\"),i(\"rotation\"),i(\"pull\")}GEe.exports={handleLabelsAndValues:UEe,handleMarkerDefaults:VEe,supplyDefaults:QCt}});var hD=ye((Xhr,HEe)=>{\"use strict\";HEe.exports={hiddenlabels:{valType:\"data_array\",editType:\"calc\"},piecolorway:{valType:\"colorlist\",editType:\"calc\"},extendpiecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var WEe=ye((Zhr,jEe)=>{\"use strict\";var ekt=Dr(),tkt=hD();jEe.exports=function(t,r){function n(i,a){return ekt.coerce(t,r,tkt,i,a)}n(\"hiddenlabels\"),n(\"piecolorway\",r.colorway),n(\"extendpiecolors\")}});var _A=ye((Yhr,YEe)=>{\"use strict\";var rkt=Eo(),hW=cd(),ikt=Ca(),nkt={};function akt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c<l;c++)a[c]=String(t.label0+c*t.dlabel);var h={},d=XEe(n[\"_\"+t.type+\"colormap\"]),v=0,x=!1;for(c=0;c<l;c++){var b,p,C;if(u){if(b=s[c],!rkt(b))continue;b=+b}else b=1;p=a[c],(p===void 0||p===\"\")&&(p=c),p=String(p);var E=h[p];E===void 0?(h[p]=r.length,C=i.indexOf(p)!==-1,C||(v+=b),r.push({v:b,label:p,color:d(o[c],p),i:c,pts:[c],hidden:C})):(x=!0,f=r[E],f.v+=b,f.pts.push(c),f.hidden||(v+=b),f.color===!1&&o[c]&&(f.color=d(o[c],p)))}r=r.filter(function(L){return L.v>=0});var A=t.type===\"funnelarea\"?x:t.sort;return A&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=v),r}function XEe(e){return function(r,n){return!r||(r=hW(r),!r.isValid())?!1:(r=ikt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function okt(e,t){var r=(t||{}).type;r||(r=\"pie\");var n=e._fullLayout,i=e.calcdata,a=n[r+\"colorway\"],o=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=ZEe(a,nkt));for(var s=0,l=0;l<i.length;l++){var u=i[l],c=u[0].trace.type;if(c===r)for(var f=0;f<u.length;f++){var h=u[f];h.color===!1&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=a[s%a.length],s++))}}}function ZEe(e,t){var r,n=JSON.stringify(e),i=t[n];if(!i){for(i=e.slice(),r=0;r<e.length;r++)i.push(hW(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(hW(e[r]).darken(20).toHexString());t[n]=i}return i}YEe.exports={calc:akt,crossTraceCalc:okt,makePullColorFn:XEe,generateExtendedColors:ZEe}});var JEe=ye((Khr,KEe)=>{\"use strict\";var skt=rp().appendArrayMultiPointValues;KEe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),skt(n,r,t.pts),r.type===\"funnelarea\"&&(delete n.v,delete n.i),n}});var gD=ye((Jhr,yCe)=>{\"use strict\";var Dp=Oa(),lkt=Mc(),dD=vf(),iCe=Ca(),Wy=So(),rv=Dr(),ukt=rv.strScale,$Ee=rv.strTranslate,dW=ru(),nCe=bv(),ckt=nCe.recordMinTextSize,fkt=nCe.clearMinTextSize,aCe=Qb().TEXTPAD,as=l_(),vD=JEe(),QEe=Dr().isValidTextValue;function hkt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;fkt(\"pie\",n),lCe(t,e),pCe(t,i);var a=rv.makeTraceGroups(n._pielayer,t,\"trace\").each(function(o){var s=Dp.select(this),l=o[0],u=l.trace;bkt(o),s.attr(\"stroke-linejoin\",\"round\"),s.each(function(){var c=Dp.select(this).selectAll(\"g.slice\").data(o);c.enter().append(\"g\").classed(\"slice\",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(A,L){if(A.hidden){Dp.select(this).selectAll(\"path,g\").remove();return}A.pointNumber=A.i,A.curveNumber=u.index,f[A.pxmid[1]<0?0:1][A.pxmid[0]<0?0:1].push(A);var _=l.cx,k=l.cy,M=Dp.select(this),g=M.selectAll(\"path.surface\").data([A]);if(g.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":r?\"none\":\"all\"}),M.call(oCe,e,o),u.pull){var P=+as.castOption(u.pull,A.pts)||0;P>0&&(_+=P*A.pxmid[0],k+=P*A.pxmid[1])}A.cxFinal=_,A.cyFinal=k;function T(N,j,re,oe){var _e=oe*(j[0]-N[0]),Me=oe*(j[1]-N[1]);return\"a\"+oe*l.r+\",\"+oe*l.r+\" 0 \"+A.largeArc+(re?\" 1 \":\" 0 \")+_e+\",\"+Me}var z=u.hole;if(A.v===l.vTotal){var O=\"M\"+(_+A.px0[0])+\",\"+(k+A.px0[1])+T(A.px0,A.pxmid,!0,1)+T(A.pxmid,A.px0,!0,1)+\"Z\";z?g.attr(\"d\",\"M\"+(_+z*A.px0[0])+\",\"+(k+z*A.px0[1])+T(A.px0,A.pxmid,!1,z)+T(A.pxmid,A.px0,!1,z)+\"Z\"+O):g.attr(\"d\",O)}else{var V=T(A.px0,A.px1,!0,1);if(z){var G=1-z;g.attr(\"d\",\"M\"+(_+z*A.px1[0])+\",\"+(k+z*A.px1[1])+T(A.px1,A.px0,!1,z)+\"l\"+G*A.px0[0]+\",\"+G*A.px0[1]+V+\"Z\")}else g.attr(\"d\",\"M\"+_+\",\"+k+\"l\"+A.px0[0]+\",\"+A.px0[1]+V+\"Z\")}gCe(e,A,l);var Z=as.castOption(u.textposition,A.pts),H=M.selectAll(\"g.slicetext\").data(A.text&&Z!==\"none\"?[0]:[]);H.enter().append(\"g\").classed(\"slicetext\",!0),H.exit().remove(),H.each(function(){var N=rv.ensureSingle(Dp.select(this),\"text\",\"\",function(ie){ie.attr(\"data-notex\",1)}),j=rv.ensureUniformFontSize(e,Z===\"outside\"?vkt(u,A,n.font):sCe(u,A,n.font));N.text(A.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(Wy.font,j).call(dW.convertToTspans,e);var re=Wy.bBox(N.node()),oe;if(Z===\"outside\")oe=rCe(re,A);else if(oe=uCe(re,A,l),Z===\"auto\"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Wy.font,_e),re=Wy.bBox(N.node()),oe=rCe(re,A)}var Me=oe.textPosAngle,ke=Me===void 0?A.pxmid:pD(l.r,Me);if(oe.targetX=_+ke[0]*oe.rCenter+(oe.x||0),oe.targetY=k+ke[1]*oe.rCenter+(oe.y||0),mCe(oe,re),oe.outside){var me=oe.targetY;A.yLabelMin=me-re.height/2,A.yLabelMid=me,A.yLabelMax=me+re.height/2,A.labelExtraX=0,A.labelExtraY=0,h=!0}oe.fontSize=j.size,ckt(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Dp.select(this).selectAll(\"g.titletext\").data(u.title.text?[0]:[]);if(d.enter().append(\"g\").classed(\"titletext\",!0),d.exit().remove(),d.each(function(){var A=rv.ensureSingle(Dp.select(this),\"text\",\"\",function(k){k.attr(\"data-notex\",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),A.text(L).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(Wy.font,u.title.font).call(dW.convertToTspans,e);var _;u.title.position===\"middle center\"?_=mkt(l):_=dCe(l,i),A.attr(\"transform\",$Ee(_.x,_.y)+ukt(Math.min(1,_.scale))+$Ee(_.tx,_.ty))}),h&&_kt(f,u),dkt(c,u),h&&u.automargin){var v=Wy.bBox(s.node()),x=u.domain,b=i.w*(x.x[1]-x.x[0]),p=i.h*(x.y[1]-x.y[0]),C=(.5*b-l.r)/i.w,E=(.5*p-l.r)/i.h;lkt.autoMargin(e,\"pie.\"+u.uid+\".automargin\",{xl:x.x[0]-C,xr:x.x[1]+C,yb:x.y[0]-E,yt:x.y[1]+E,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll(\"tspan\").each(function(){var o=Dp.select(this);o.attr(\"dy\")&&o.attr(\"dy\",o.attr(\"dy\"))})},0)}function dkt(e,t){e.each(function(r){var n=Dp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select(\"path.textline\").remove();return}var i=n.select(\"g.slicetext text\");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s=\"M\"+a+\",\"+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+=\"l\"+c*r.pxmid[0]/r.pxmid[1]+\",\"+c+\"H\"+(a+r.labelExtraX+l):s+=\"l\"+r.labelExtraX+\",\"+u+\"v\"+(c-u)+\"h\"+l}else s+=\"V\"+(r.yLabelMid+r.labelExtraY)+\"h\"+l;rv.ensureSingle(n,\"path\",\"textline\").call(iCe.stroke,t.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,t.outsidetextfont.size/8),d:s,fill:\"none\"})})}function oCe(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type===\"funnelarea\";\"_hasHoverLabel\"in o||(o._hasHoverLabel=!1),\"_hasHoverEvent\"in o||(o._hasHoverEvent=!1),e.on(\"mouseover\",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=dD.castHoverinfo({hoverinfo:[as.castOption(f,l.pts)],_module:o._module},u,0)),f===\"all\"&&(f=\"label+text+value+percent+name\"),c.hovertemplate||f!==\"none\"&&f!==\"skip\"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),x=u.separators,b=[];if(f&&f.indexOf(\"label\")!==-1&&b.push(l.label),l.text=as.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf(\"text\")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=as.formatPieValue(l.v,x),f&&f.indexOf(\"value\")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=as.formatPiePercent(l.percent,x),f&&f.indexOf(\"percent\")!==-1&&b.push(l.percentLabel);var C=c.hoverlabel,E=C.font,A=[];dD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join(\"<br>\"),name:c.hovertemplate||f.indexOf(\"name\")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?\"left\":\"right\",color:as.castOption(C.bgcolor,l.pts)||l.color,borderColor:as.castOption(C.bordercolor,l.pts),fontFamily:as.castOption(E.family,l.pts),fontSize:as.castOption(E.size,l.pts),fontColor:as.castOption(E.color,l.pts),nameLength:as.castOption(C.namelength,l.pts),textAlign:as.castOption(C.align,l.pts),hovertemplate:as.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[vD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:A}),l.bbox=A[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit(\"plotly_hover\",{points:[vD(l,c)],event:Dp.event})}}),e.on(\"mouseout\",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Dp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Dp.event,t.emit(\"plotly_unhover\",{points:[vD(f,c)],event:Dp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(dD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on(\"click\",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[vD(l,c)],dD.click(t,Dp.event))})}function vkt(e,t,r){var n=as.castOption(e.outsidetextfont.color,t.pts)||as.castOption(e.textfont.color,t.pts)||r.color,i=as.castOption(e.outsidetextfont.family,t.pts)||as.castOption(e.textfont.family,t.pts)||r.family,a=as.castOption(e.outsidetextfont.size,t.pts)||as.castOption(e.textfont.size,t.pts)||r.size,o=as.castOption(e.outsidetextfont.weight,t.pts)||as.castOption(e.textfont.weight,t.pts)||r.weight,s=as.castOption(e.outsidetextfont.style,t.pts)||as.castOption(e.textfont.style,t.pts)||r.style,l=as.castOption(e.outsidetextfont.variant,t.pts)||as.castOption(e.textfont.variant,t.pts)||r.variant,u=as.castOption(e.outsidetextfont.textcase,t.pts)||as.castOption(e.textfont.textcase,t.pts)||r.textcase,c=as.castOption(e.outsidetextfont.lineposition,t.pts)||as.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=as.castOption(e.outsidetextfont.shadow,t.pts)||as.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function sCe(e,t,r){var n=as.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=as.castOption(e._input.textfont.color,t.pts));var i=as.castOption(e.insidetextfont.family,t.pts)||as.castOption(e.textfont.family,t.pts)||r.family,a=as.castOption(e.insidetextfont.size,t.pts)||as.castOption(e.textfont.size,t.pts)||r.size,o=as.castOption(e.insidetextfont.weight,t.pts)||as.castOption(e.textfont.weight,t.pts)||r.weight,s=as.castOption(e.insidetextfont.style,t.pts)||as.castOption(e.textfont.style,t.pts)||r.style,l=as.castOption(e.insidetextfont.variant,t.pts)||as.castOption(e.textfont.variant,t.pts)||r.variant,u=as.castOption(e.insidetextfont.textcase,t.pts)||as.castOption(e.textfont.textcase,t.pts)||r.textcase,c=as.castOption(e.insidetextfont.lineposition,t.pts)||as.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=as.castOption(e.insidetextfont.shadow,t.pts)||as.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||iCe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function lCe(e,t){for(var r,n,i=0;i<e.length;i++)if(r=e[i][0],n=r.trace,n.title.text){var a=n.title.text;n._meta&&(a=rv.templateString(a,n._meta));var o=Wy.tester.append(\"text\").attr(\"data-notex\",1).text(a).call(Wy.font,n.title.font).call(dW.convertToTspans,t),s=Wy.bBox(o.node(),!0);r.titleBox={width:s.width,height:s.height},o.remove()}}function uCe(e,t,r){var n=r.r||t.rpx1,i=t.rInscribed,a=t.startangle===t.stopangle;if(a)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=t.ring,s=o===1&&Math.abs(t.startangle-t.stopangle)===Math.PI*2,l=t.halfangle,u=t.midangle,c=r.trace.insidetextorientation,f=c===\"horizontal\",h=c===\"tangential\",d=c===\"radial\",v=c===\"auto\",x=[],b;if(!v){var p=function(M,g){if(pkt(t,M)){var P=Math.abs(M-t.startangle),T=Math.abs(M-t.stopangle),z=P<T?P:T;g===\"tan\"?b=tCe(e,n,o,z,0):b=eCe(e,n,o,z,Math.PI/2),b.textPosAngle=M,x.push(b)}},C;if(f||h){for(C=4;C>=-4;C-=2)p(Math.PI*C,\"tan\");for(C=4;C>=-4;C-=2)p(Math.PI*(C+1),\"tan\")}if(f||d){for(C=4;C>=-4;C-=2)p(Math.PI*(C+1.5),\"rad\");for(C=4;C>=-4;C-=2)p(Math.PI*(C+.5),\"rad\")}}if(s||v||f){var E=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/E,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;x.push(b)}(v||d)&&(b=eCe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(v||h)&&(b=tCe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var A=0,L=0,_=0;_<x.length;_++){var k=x[_].scale;if(L<k&&(L=k,A=_),!v&&L>=1)break}return x[A]}function pkt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}function eCe(e,t,r,n,i){t=Math.max(0,t-2*aCe);var a=e.width/e.height,o=hCe(a,n,t,r);return{scale:o*2/e.height,rCenter:cCe(a,o/t),rotate:fCe(i)}}function tCe(e,t,r,n,i){t=Math.max(0,t-2*aCe);var a=e.height/e.width,o=hCe(a,n,t,r);return{scale:o*2/e.width,rCenter:cCe(a,o/t),rotate:fCe(i+Math.PI/2)}}function cCe(e,t){return Math.cos(t)-e*t}function fCe(e){return(180/Math.PI*e+720)%180-90}function hCe(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function gkt(e,t){return e.v===t.vTotal&&!t.trace.hole?1:Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2)}function rCe(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function mkt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function dCe(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=vCe(a),a.title.position.indexOf(\"top\")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf(\"bottom\")!==-1&&(o.y+=(1+i)*e.r);var l=ykt(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf(\"left\")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf(\"center\")!==-1?u*=2:a.title.position.indexOf(\"right\")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=vW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function ykt(e,t){return e/(t===void 0?1:t)}function vW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function vCe(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;r<e.pull.length;r++)e.pull[r]>t&&(t=e.pull[r]);return t}function _kt(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function x(E,A){return E.pxmid[1]-A.pxmid[1]}function b(E,A){return A.pxmid[1]-E.pxmid[1]}function p(E,A){A||(A={});var L=A.labelExtraY+(n?A.yLabelMax:A.yLabelMin),_=n?E.yLabelMin:E.yLabelMax,k=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),g=L-_,P,T,z,O,V,G;if(g*l>0&&(E.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(T=0;T<f.length;T++)z=f[T],!(z===E||(as.castOption(t.pull,E.pts)||0)>=(as.castOption(t.pull,z.pts)||0))&&((E.pxmid[1]-z.pxmid[1])*l>0?(O=z.cyFinal+o(z.px0[1],z.px1[1]),g=O-_-E.labelExtraY,g*l>0&&(E.labelExtraY+=g)):(k+E.labelExtraY-M)*l>0&&(P=3*s*Math.abs(T-f.indexOf(E)),V=z.cxFinal+a(z.px0[0],z.px1[0]),G=V+P-(E.cxFinal+E.pxmid[0])-E.labelExtraX,G*s>0&&(E.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?x:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h<u.length;h++)u[h].yLabelMid!==void 0&&d.push(u[h]);for(v=!1,h=0;n&&h<c.length;h++)if(c[h].yLabelMid!==void 0){v=c[h];break}for(h=0;h<d.length;h++){var C=h&&d[h-1];v&&!h&&(C=v),p(d[h],C)}}}function pCe(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n][0],a=i.trace,o=a.domain,s=t.w*(o.x[1]-o.x[0]),l=t.h*(o.y[1]-o.y[0]);a.title.text&&a.title.position!==\"middle center\"&&(l-=vW(i,t));var u=s/2,c=l/2;a.type===\"funnelarea\"&&!a.scalegroup&&(c/=a.aspectratio),i.r=Math.min(u,c)/(1+vCe(a)),i.cx=t.l+t.w*(a.domain.x[1]+a.domain.x[0])/2,i.cy=t.t+t.h*(1-a.domain.y[0])-l/2,a.title.text&&a.title.position.indexOf(\"bottom\")!==-1&&(i.cy-=vW(i,t)),a.scalegroup&&r.indexOf(a.scalegroup)===-1&&r.push(a.scalegroup)}xkt(e,r)}function xkt(e,t){for(var r,n,i,a=0;a<t.length;a++){var o=1/0,s=t[a];for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var l;if(i.type===\"pie\")l=r.r*r.r;else if(i.type===\"funnelarea\"){var u,c;i.aspectratio>1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var f=o*r.vTotal;i.type===\"funnelarea\"&&(f/=(1+i.baseratio)/2,f/=i.aspectratio),r.r=Math.sqrt(f)}}}function bkt(e){var t=e[0],r=t.r,n=t.trace,i=as.getRotationAngle(n.rotation),a=2*Math.PI/t.vTotal,o=\"px0\",s=\"px1\",l,u,c;if(n.direction===\"counterclockwise\"){for(l=0;l<e.length&&e[l].hidden;l++);if(l===e.length)return;i+=a*e[l].v,a*=-1,o=\"px1\",s=\"px0\"}for(c=pD(r,i),l=0;l<e.length;l++)u=e[l],!u.hidden&&(u[o]=c,u.startangle=i,i+=a*u.v/2,u.pxmid=pD(r,i),u.midangle=i,i+=a*u.v/2,c=pD(r,i),u.stopangle=i,u[s]=c,u.largeArc=u.v>t.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=gkt(u,t))}function pD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function gCe(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!==\"none\"){var s=o.split(\"+\"),l=function(A){return s.indexOf(A)!==-1},u=l(\"label\"),c=l(\"text\"),f=l(\"value\"),h=l(\"percent\"),d=n.separators,v;if(v=u?[t.label]:[],c){var x=as.getFirstFilled(i.text,t.pts);QEe(x)&&v.push(x)}f&&v.push(as.formatPieValue(t.v,d)),h&&v.push(as.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join(\"<br>\")}function b(A){return{label:A.label,value:A.v,valueLabel:as.formatPieValue(A.v,n.separators),percent:A.v/r.vTotal,percentLabel:as.formatPiePercent(A.v/r.vTotal,n.separators),color:A.color,text:A.text,customdata:rv.castOption(i,A.i,\"customdata\")}}if(a){var p=rv.castOption(i,t.i,\"texttemplate\");if(!p)t.text=\"\";else{var C=b(t),E=as.getFirstFilled(i.text,t.pts);(QEe(E)||E===\"\")&&(C.text=E),t.text=rv.texttemplateString(p,C,e._fullLayout._d3locale,C,i._meta||{})}}}function mCe(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}yCe.exports={plot:hkt,formatSliceLabel:gCe,transformInsideText:uCe,determineInsideTextFont:sCe,positionTitleOutside:dCe,prerenderTitles:lCe,layoutAreas:pCe,attachFxHandlers:oCe,computeTransform:mCe}});var bCe=ye(($hr,xCe)=>{\"use strict\";var _Ce=Oa(),wkt=F3(),Tkt=bv().resizeText;xCe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(\".trace\");Tkt(t,r,\"pie\"),r.each(function(n){var i=n[0],a=i.trace,o=_Ce.select(this);o.style({opacity:a.opacity}),o.selectAll(\"path.surface\").each(function(s){_Ce.select(this).call(wkt,s,a,t)})})}});var TCe=ye(xA=>{\"use strict\";var wCe=Mc();xA.name=\"pie\";xA.plot=function(e,t,r,n){wCe.plotBasePlot(xA.name,e,t,r,n)};xA.clean=function(e,t,r,n){wCe.cleanBasePlot(xA.name,e,t,r,n)}});var SCe=ye((edr,ACe)=>{\"use strict\";ACe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:WEe(),layoutAttributes:hD(),calc:_A().calc,crossTraceCalc:_A().crossTraceCalc,plot:gD().plot,style:bCe(),styleOne:F3(),moduleType:\"trace\",name:\"pie\",basePlotModule:TCe(),categories:[\"pie-like\",\"pie\",\"showLegend\"],meta:{}}});var ECe=ye((tdr,MCe)=>{\"use strict\";MCe.exports=SCe()});var kCe=ye(bA=>{\"use strict\";var CCe=Mc();bA.name=\"sunburst\";bA.plot=function(e,t,r,n){CCe.plotBasePlot(bA.name,e,t,r,n)};bA.clean=function(e,t,r,n){CCe.cleanBasePlot(bA.name,e,t,r,n)}});var pW=ye((idr,LCe)=>{\"use strict\";LCe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"linear\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"]}});var kE=ye((ndr,ICe)=>{\"use strict\";var Akt=Gl(),Skt=Qo().hovertemplateAttrs,Mkt=Qo().texttemplateAttrs,Ekt=Tu(),Ckt=kc().attributes,Xy=A2(),PCe=pW(),CE=Ao().extendFlat,kkt=Pd().pattern;ICe.exports={labels:{valType:\"data_array\",editType:\"calc\"},parents:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},branchvalues:{valType:\"enumerated\",values:[\"remainder\",\"total\"],dflt:\"remainder\",editType:\"calc\"},count:{valType:\"flaglist\",flags:[\"branches\",\"leaves\"],dflt:\"leaves\",editType:\"calc\"},level:{valType:\"any\",editType:\"plot\",anim:!0},maxdepth:{valType:\"integer\",editType:\"plot\",dflt:-1},marker:CE({colors:{valType:\"data_array\",editType:\"calc\"},line:{color:CE({},Xy.marker.line.color,{dflt:null}),width:CE({},Xy.marker.line.width,{dflt:1}),editType:\"calc\"},pattern:kkt,editType:\"calc\"},Ekt(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:{opacity:{valType:\"number\",editType:\"style\",min:0,max:1},editType:\"plot\"},text:Xy.text,textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],extras:[\"none\"],editType:\"plot\"},texttemplate:Mkt({editType:\"plot\"},{keys:PCe.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:Xy.hovertext,hoverinfo:CE({},Akt.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"name\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],dflt:\"label+text+value+name\"}),hovertemplate:Skt({},{keys:PCe.eventDataKeys}),textfont:Xy.textfont,insidetextorientation:Xy.insidetextorientation,insidetextfont:Xy.insidetextfont,outsidetextfont:CE({},Xy.outsidetextfont,{}),rotation:{valType:\"angle\",dflt:0,editType:\"plot\"},sort:Xy.sort,root:{color:{valType:\"color\",editType:\"calc\",dflt:\"rgba(0,0,0,0)\"},editType:\"calc\"},domain:Ckt({name:\"sunburst\",trace:!0,editType:\"calc\"})}});var gW=ye((adr,RCe)=>{\"use strict\";RCe.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var OCe=ye((odr,zCe)=>{\"use strict\";var DCe=Dr(),Lkt=kE(),Pkt=kc().defaults,Ikt=r0().handleText,Rkt=S2().handleMarkerDefaults,FCe=tc(),Dkt=FCe.hasColorscale,Fkt=FCe.handleDefaults;zCe.exports=function(t,r,n,i){function a(h,d){return DCe.coerce(t,r,Lkt,h,d)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\"),Rkt(t,r,i,a);var u=r._hasColorscale=Dkt(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;u&&Fkt(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),a(\"leaf.opacity\",u?1:.7);var c=a(\"text\");a(\"texttemplate\"),r.texttemplate||a(\"textinfo\",DCe.isArrayOrTypedArray(c)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\");var f=\"auto\";Ikt(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"insidetextorientation\"),a(\"sort\"),a(\"rotation\"),a(\"root.color\"),Pkt(r,i,a),r._length=null}});var BCe=ye((sdr,qCe)=>{\"use strict\";var zkt=Dr(),Okt=gW();qCe.exports=function(t,r){function n(i,a){return zkt.coerce(t,r,Okt,i,a)}n(\"sunburstcolorway\",r.colorway),n(\"extendsunburstcolors\")}});var LE=ye((mD,NCe)=>{(function(e,t){typeof mD==\"object\"&&typeof NCe!=\"undefined\"?t(mD):(e=e||self,t(e.d3=e.d3||{}))})(mD,function(e){\"use strict\";function t(je,$e){return je.parent===$e.parent?1:2}function r(je){return je.reduce(n,0)/je.length}function n(je,$e){return je+$e.x}function i(je){return 1+je.reduce(a,0)}function a(je,$e){return Math.max(je,$e.y)}function o(je){for(var $e;$e=je.children;)je=$e[0];return je}function s(je){for(var $e;$e=je.children;)je=$e[$e.length-1];return je}function l(){var je=t,$e=1,wt=1,Ie=!1;function xe(Ce){var vt,nr=0;Ce.eachAfter(function(Jr){var fi=Jr.children;fi?(Jr.x=r(fi),Jr.y=i(fi)):(Jr.x=vt?nr+=je(Jr,vt):0,Jr.y=0,vt=Jr)});var ir=o(Ce),pr=s(Ce),oi=ir.x-je(ir,pr)/2,di=pr.x+je(pr,ir)/2;return Ce.eachAfter(Ie?function(Jr){Jr.x=(Jr.x-Ce.x)*$e,Jr.y=(Ce.y-Jr.y)*wt}:function(Jr){Jr.x=(Jr.x-oi)/(di-oi)*$e,Jr.y=(1-(Ce.y?Jr.y/Ce.y:1))*wt})}return xe.separation=function(Ce){return arguments.length?(je=Ce,xe):je},xe.size=function(Ce){return arguments.length?(Ie=!1,$e=+Ce[0],wt=+Ce[1],xe):Ie?null:[$e,wt]},xe.nodeSize=function(Ce){return arguments.length?(Ie=!0,$e=+Ce[0],wt=+Ce[1],xe):Ie?[$e,wt]:null},xe}function u(je){var $e=0,wt=je.children,Ie=wt&&wt.length;if(!Ie)$e=1;else for(;--Ie>=0;)$e+=wt[Ie].value;je.value=$e}function c(){return this.eachAfter(u)}function f(je){var $e=this,wt,Ie=[$e],xe,Ce,vt;do for(wt=Ie.reverse(),Ie=[];$e=wt.pop();)if(je($e),xe=$e.children,xe)for(Ce=0,vt=xe.length;Ce<vt;++Ce)Ie.push(xe[Ce]);while(Ie.length);return this}function h(je){for(var $e=this,wt=[$e],Ie,xe;$e=wt.pop();)if(je($e),Ie=$e.children,Ie)for(xe=Ie.length-1;xe>=0;--xe)wt.push(Ie[xe]);return this}function d(je){for(var $e=this,wt=[$e],Ie=[],xe,Ce,vt;$e=wt.pop();)if(Ie.push($e),xe=$e.children,xe)for(Ce=0,vt=xe.length;Ce<vt;++Ce)wt.push(xe[Ce]);for(;$e=Ie.pop();)je($e);return this}function v(je){return this.eachAfter(function($e){for(var wt=+je($e.data)||0,Ie=$e.children,xe=Ie&&Ie.length;--xe>=0;)wt+=Ie[xe].value;$e.value=wt})}function x(je){return this.eachBefore(function($e){$e.children&&$e.children.sort(je)})}function b(je){for(var $e=this,wt=p($e,je),Ie=[$e];$e!==wt;)$e=$e.parent,Ie.push($e);for(var xe=Ie.length;je!==wt;)Ie.splice(xe,0,je),je=je.parent;return Ie}function p(je,$e){if(je===$e)return je;var wt=je.ancestors(),Ie=$e.ancestors(),xe=null;for(je=wt.pop(),$e=Ie.pop();je===$e;)xe=je,je=wt.pop(),$e=Ie.pop();return xe}function C(){for(var je=this,$e=[je];je=je.parent;)$e.push(je);return $e}function E(){var je=[];return this.each(function($e){je.push($e)}),je}function A(){var je=[];return this.eachBefore(function($e){$e.children||je.push($e)}),je}function L(){var je=this,$e=[];return je.each(function(wt){wt!==je&&$e.push({source:wt.parent,target:wt})}),$e}function _(je,$e){var wt=new T(je),Ie=+je.value&&(wt.value=je.value),xe,Ce=[wt],vt,nr,ir,pr;for($e==null&&($e=M);xe=Ce.pop();)if(Ie&&(xe.value=+xe.data.value),(nr=$e(xe.data))&&(pr=nr.length))for(xe.children=new Array(pr),ir=pr-1;ir>=0;--ir)Ce.push(vt=xe.children[ir]=new T(nr[ir])),vt.parent=xe,vt.depth=xe.depth+1;return wt.eachBefore(P)}function k(){return _(this).eachBefore(g)}function M(je){return je.children}function g(je){je.data=je.data.data}function P(je){var $e=0;do je.height=$e;while((je=je.parent)&&je.height<++$e)}function T(je){this.data=je,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:x,path:b,ancestors:C,descendants:E,leaves:A,links:L,copy:k};var z=Array.prototype.slice;function O(je){for(var $e=je.length,wt,Ie;$e;)Ie=Math.random()*$e--|0,wt=je[$e],je[$e]=je[Ie],je[Ie]=wt;return je}function V(je){for(var $e=0,wt=(je=O(z.call(je))).length,Ie=[],xe,Ce;$e<wt;)xe=je[$e],Ce&&H(Ce,xe)?++$e:(Ce=j(Ie=G(Ie,xe)),$e=0);return Ce}function G(je,$e){var wt,Ie;if(N($e,je))return[$e];for(wt=0;wt<je.length;++wt)if(Z($e,je[wt])&&N(oe(je[wt],$e),je))return[je[wt],$e];for(wt=0;wt<je.length-1;++wt)for(Ie=wt+1;Ie<je.length;++Ie)if(Z(oe(je[wt],je[Ie]),$e)&&Z(oe(je[wt],$e),je[Ie])&&Z(oe(je[Ie],$e),je[wt])&&N(_e(je[wt],je[Ie],$e),je))return[je[wt],je[Ie],$e];throw new Error}function Z(je,$e){var wt=je.r-$e.r,Ie=$e.x-je.x,xe=$e.y-je.y;return wt<0||wt*wt<Ie*Ie+xe*xe}function H(je,$e){var wt=je.r-$e.r+1e-6,Ie=$e.x-je.x,xe=$e.y-je.y;return wt>0&&wt*wt>Ie*Ie+xe*xe}function N(je,$e){for(var wt=0;wt<$e.length;++wt)if(!H(je,$e[wt]))return!1;return!0}function j(je){switch(je.length){case 1:return re(je[0]);case 2:return oe(je[0],je[1]);case 3:return _e(je[0],je[1],je[2])}}function re(je){return{x:je.x,y:je.y,r:je.r}}function oe(je,$e){var wt=je.x,Ie=je.y,xe=je.r,Ce=$e.x,vt=$e.y,nr=$e.r,ir=Ce-wt,pr=vt-Ie,oi=nr-xe,di=Math.sqrt(ir*ir+pr*pr);return{x:(wt+Ce+ir/di*oi)/2,y:(Ie+vt+pr/di*oi)/2,r:(di+xe+nr)/2}}function _e(je,$e,wt){var Ie=je.x,xe=je.y,Ce=je.r,vt=$e.x,nr=$e.y,ir=$e.r,pr=wt.x,oi=wt.y,di=wt.r,Jr=Ie-vt,fi=Ie-pr,Hi=xe-nr,Pn=xe-oi,wn=ir-Ce,pn=di-Ce,Vn=Ie*Ie+xe*xe-Ce*Ce,kn=Vn-vt*vt-nr*nr+ir*ir,ea=Vn-pr*pr-oi*oi+di*di,ua=fi*Hi-Jr*Pn,Vt=(Hi*ea-Pn*kn)/(ua*2)-Ie,_t=(Pn*wn-Hi*pn)/ua,tr=(fi*kn-Jr*ea)/(ua*2)-xe,ar=(Jr*pn-fi*wn)/ua,Er=_t*_t+ar*ar-1,Zr=2*(Ce+Vt*_t+tr*ar),ri=Vt*Vt+tr*tr-Ce*Ce,$r=-(Er?(Zr+Math.sqrt(Zr*Zr-4*Er*ri))/(2*Er):ri/Zr);return{x:Ie+Vt+_t*$r,y:xe+tr+ar*$r,r:$r}}function Me(je,$e,wt){var Ie=je.x-$e.x,xe,Ce,vt=je.y-$e.y,nr,ir,pr=Ie*Ie+vt*vt;pr?(Ce=$e.r+wt.r,Ce*=Ce,ir=je.r+wt.r,ir*=ir,Ce>ir?(xe=(pr+ir-Ce)/(2*pr),nr=Math.sqrt(Math.max(0,ir/pr-xe*xe)),wt.x=je.x-xe*Ie-nr*vt,wt.y=je.y-xe*vt+nr*Ie):(xe=(pr+Ce-ir)/(2*pr),nr=Math.sqrt(Math.max(0,Ce/pr-xe*xe)),wt.x=$e.x+xe*Ie-nr*vt,wt.y=$e.y+xe*vt+nr*Ie)):(wt.x=$e.x+wt.r,wt.y=$e.y)}function ke(je,$e){var wt=je.r+$e.r-1e-6,Ie=$e.x-je.x,xe=$e.y-je.y;return wt>0&&wt*wt>Ie*Ie+xe*xe}function me(je){var $e=je._,wt=je.next._,Ie=$e.r+wt.r,xe=($e.x*wt.r+wt.x*$e.r)/Ie,Ce=($e.y*wt.r+wt.y*$e.r)/Ie;return xe*xe+Ce*Ce}function ie(je){this._=je,this.next=null,this.previous=null}function Se(je){if(!(xe=je.length))return 0;var $e,wt,Ie,xe,Ce,vt,nr,ir,pr,oi,di;if($e=je[0],$e.x=0,$e.y=0,!(xe>1))return $e.r;if(wt=je[1],$e.x=-wt.r,wt.x=$e.r,wt.y=0,!(xe>2))return $e.r+wt.r;Me(wt,$e,Ie=je[2]),$e=new ie($e),wt=new ie(wt),Ie=new ie(Ie),$e.next=Ie.previous=wt,wt.next=$e.previous=Ie,Ie.next=wt.previous=$e;e:for(nr=3;nr<xe;++nr){Me($e._,wt._,Ie=je[nr]),Ie=new ie(Ie),ir=wt.next,pr=$e.previous,oi=wt._.r,di=$e._.r;do if(oi<=di){if(ke(ir._,Ie._)){wt=ir,$e.next=wt,wt.previous=$e,--nr;continue e}oi+=ir._.r,ir=ir.next}else{if(ke(pr._,Ie._)){$e=pr,$e.next=wt,wt.previous=$e,--nr;continue e}di+=pr._.r,pr=pr.previous}while(ir!==pr.next);for(Ie.previous=$e,Ie.next=wt,$e.next=wt.previous=wt=Ie,Ce=me($e);(Ie=Ie.next)!==wt;)(vt=me(Ie))<Ce&&($e=Ie,Ce=vt);wt=$e.next}for($e=[wt._],Ie=wt;(Ie=Ie.next)!==wt;)$e.push(Ie._);for(Ie=V($e),nr=0;nr<xe;++nr)$e=je[nr],$e.x-=Ie.x,$e.y-=Ie.y;return Ie.r}function Le(je){return Se(je),je}function Ae(je){return je==null?null:De(je)}function De(je){if(typeof je!=\"function\")throw new Error;return je}function Pe(){return 0}function ge(je){return function(){return je}}function Fe(je){return Math.sqrt(je.value)}function ce(){var je=null,$e=1,wt=1,Ie=Pe;function xe(Ce){return Ce.x=$e/2,Ce.y=wt/2,je?Ce.eachBefore(Ze(je)).eachAfter(ct(Ie,.5)).eachBefore(pt(1)):Ce.eachBefore(Ze(Fe)).eachAfter(ct(Pe,1)).eachAfter(ct(Ie,Ce.r/Math.min($e,wt))).eachBefore(pt(Math.min($e,wt)/(2*Ce.r))),Ce}return xe.radius=function(Ce){return arguments.length?(je=Ae(Ce),xe):je},xe.size=function(Ce){return arguments.length?($e=+Ce[0],wt=+Ce[1],xe):[$e,wt]},xe.padding=function(Ce){return arguments.length?(Ie=typeof Ce==\"function\"?Ce:ge(+Ce),xe):Ie},xe}function Ze(je){return function($e){$e.children||($e.r=Math.max(0,+je($e)||0))}}function ct(je,$e){return function(wt){if(Ie=wt.children){var Ie,xe,Ce=Ie.length,vt=je(wt)*$e||0,nr;if(vt)for(xe=0;xe<Ce;++xe)Ie[xe].r+=vt;if(nr=Se(Ie),vt)for(xe=0;xe<Ce;++xe)Ie[xe].r-=vt;wt.r=nr+vt}}}function pt(je){return function($e){var wt=$e.parent;$e.r*=je,wt&&($e.x=wt.x+je*$e.x,$e.y=wt.y+je*$e.y)}}function Wt(je){je.x0=Math.round(je.x0),je.y0=Math.round(je.y0),je.x1=Math.round(je.x1),je.y1=Math.round(je.y1)}function st(je,$e,wt,Ie,xe){for(var Ce=je.children,vt,nr=-1,ir=Ce.length,pr=je.value&&(Ie-$e)/je.value;++nr<ir;)vt=Ce[nr],vt.y0=wt,vt.y1=xe,vt.x0=$e,vt.x1=$e+=vt.value*pr}function lt(){var je=1,$e=1,wt=0,Ie=!1;function xe(vt){var nr=vt.height+1;return vt.x0=vt.y0=wt,vt.x1=je,vt.y1=$e/nr,vt.eachBefore(Ce($e,nr)),Ie&&vt.eachBefore(Wt),vt}function Ce(vt,nr){return function(ir){ir.children&&st(ir,ir.x0,vt*(ir.depth+1)/nr,ir.x1,vt*(ir.depth+2)/nr);var pr=ir.x0,oi=ir.y0,di=ir.x1-wt,Jr=ir.y1-wt;di<pr&&(pr=di=(pr+di)/2),Jr<oi&&(oi=Jr=(oi+Jr)/2),ir.x0=pr,ir.y0=oi,ir.x1=di,ir.y1=Jr}}return xe.round=function(vt){return arguments.length?(Ie=!!vt,xe):Ie},xe.size=function(vt){return arguments.length?(je=+vt[0],$e=+vt[1],xe):[je,$e]},xe.padding=function(vt){return arguments.length?(wt=+vt,xe):wt},xe}var Gt=\"$\",Nt={depth:-1},$t={};function sr(je){return je.id}function wr(je){return je.parentId}function ur(){var je=sr,$e=wr;function wt(Ie){var xe,Ce,vt=Ie.length,nr,ir,pr,oi=new Array(vt),di,Jr,fi={};for(Ce=0;Ce<vt;++Ce)xe=Ie[Ce],pr=oi[Ce]=new T(xe),(di=je(xe,Ce,Ie))!=null&&(di+=\"\")&&(Jr=Gt+(pr.id=di),fi[Jr]=Jr in fi?$t:pr);for(Ce=0;Ce<vt;++Ce)if(pr=oi[Ce],di=$e(Ie[Ce],Ce,Ie),di==null||!(di+=\"\")){if(nr)throw new Error(\"multiple roots\");nr=pr}else{if(ir=fi[Gt+di],!ir)throw new Error(\"missing: \"+di);if(ir===$t)throw new Error(\"ambiguous: \"+di);ir.children?ir.children.push(pr):ir.children=[pr],pr.parent=ir}if(!nr)throw new Error(\"no root\");if(nr.parent=Nt,nr.eachBefore(function(Hi){Hi.depth=Hi.parent.depth+1,--vt}).eachBefore(P),nr.parent=null,vt>0)throw new Error(\"cycle\");return nr}return wt.id=function(Ie){return arguments.length?(je=De(Ie),wt):je},wt.parentId=function(Ie){return arguments.length?($e=De(Ie),wt):$e},wt}function Qe(je,$e){return je.parent===$e.parent?1:2}function Et(je){var $e=je.children;return $e?$e[0]:je.t}function er(je){var $e=je.children;return $e?$e[$e.length-1]:je.t}function Ut(je,$e,wt){var Ie=wt/($e.i-je.i);$e.c-=Ie,$e.s+=wt,je.c+=Ie,$e.z+=wt,$e.m+=wt}function Ft(je){for(var $e=0,wt=0,Ie=je.children,xe=Ie.length,Ce;--xe>=0;)Ce=Ie[xe],Ce.z+=$e,Ce.m+=$e,$e+=Ce.s+(wt+=Ce.c)}function bt(je,$e,wt){return je.a.parent===$e.parent?je.a:wt}function yt(je,$e){this._=je,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=$e}yt.prototype=Object.create(T.prototype);function Yt(je){for(var $e=new yt(je,0),wt,Ie=[$e],xe,Ce,vt,nr;wt=Ie.pop();)if(Ce=wt._.children)for(wt.children=new Array(nr=Ce.length),vt=nr-1;vt>=0;--vt)Ie.push(xe=wt.children[vt]=new yt(Ce[vt],vt)),xe.parent=wt;return($e.parent=new yt(null,0)).children=[$e],$e}function lr(){var je=Qe,$e=1,wt=1,Ie=null;function xe(pr){var oi=Yt(pr);if(oi.eachAfter(Ce),oi.parent.m=-oi.z,oi.eachBefore(vt),Ie)pr.eachBefore(ir);else{var di=pr,Jr=pr,fi=pr;pr.eachBefore(function(Vn){Vn.x<di.x&&(di=Vn),Vn.x>Jr.x&&(Jr=Vn),Vn.depth>fi.depth&&(fi=Vn)});var Hi=di===Jr?1:je(di,Jr)/2,Pn=Hi-di.x,wn=$e/(Jr.x+Hi+Pn),pn=wt/(fi.depth||1);pr.eachBefore(function(Vn){Vn.x=(Vn.x+Pn)*wn,Vn.y=Vn.depth*pn})}return pr}function Ce(pr){var oi=pr.children,di=pr.parent.children,Jr=pr.i?di[pr.i-1]:null;if(oi){Ft(pr);var fi=(oi[0].z+oi[oi.length-1].z)/2;Jr?(pr.z=Jr.z+je(pr._,Jr._),pr.m=pr.z-fi):pr.z=fi}else Jr&&(pr.z=Jr.z+je(pr._,Jr._));pr.parent.A=nr(pr,Jr,pr.parent.A||di[0])}function vt(pr){pr._.x=pr.z+pr.parent.m,pr.m+=pr.parent.m}function nr(pr,oi,di){if(oi){for(var Jr=pr,fi=pr,Hi=oi,Pn=Jr.parent.children[0],wn=Jr.m,pn=fi.m,Vn=Hi.m,kn=Pn.m,ea;Hi=er(Hi),Jr=Et(Jr),Hi&&Jr;)Pn=Et(Pn),fi=er(fi),fi.a=pr,ea=Hi.z+Vn-Jr.z-wn+je(Hi._,Jr._),ea>0&&(Ut(bt(Hi,pr,di),pr,ea),wn+=ea,pn+=ea),Vn+=Hi.m,wn+=Jr.m,kn+=Pn.m,pn+=fi.m;Hi&&!er(fi)&&(fi.t=Hi,fi.m+=Vn-pn),Jr&&!Et(Pn)&&(Pn.t=Jr,Pn.m+=wn-kn,di=pr)}return di}function ir(pr){pr.x*=$e,pr.y=pr.depth*wt}return xe.separation=function(pr){return arguments.length?(je=pr,xe):je},xe.size=function(pr){return arguments.length?(Ie=!1,$e=+pr[0],wt=+pr[1],xe):Ie?null:[$e,wt]},xe.nodeSize=function(pr){return arguments.length?(Ie=!0,$e=+pr[0],wt=+pr[1],xe):Ie?[$e,wt]:null},xe}function Tr(je,$e,wt,Ie,xe){for(var Ce=je.children,vt,nr=-1,ir=Ce.length,pr=je.value&&(xe-wt)/je.value;++nr<ir;)vt=Ce[nr],vt.x0=$e,vt.x1=Ie,vt.y0=wt,vt.y1=wt+=vt.value*pr}var Rr=(1+Math.sqrt(5))/2;function ei(je,$e,wt,Ie,xe,Ce){for(var vt=[],nr=$e.children,ir,pr,oi=0,di=0,Jr=nr.length,fi,Hi,Pn=$e.value,wn,pn,Vn,kn,ea,ua,Vt;oi<Jr;){fi=xe-wt,Hi=Ce-Ie;do wn=nr[di++].value;while(!wn&&di<Jr);for(pn=Vn=wn,ua=Math.max(Hi/fi,fi/Hi)/(Pn*je),Vt=wn*wn*ua,ea=Math.max(Vn/Vt,Vt/pn);di<Jr;++di){if(wn+=pr=nr[di].value,pr<pn&&(pn=pr),pr>Vn&&(Vn=pr),Vt=wn*wn*ua,kn=Math.max(Vn/Vt,Vt/pn),kn>ea){wn-=pr;break}ea=kn}vt.push(ir={value:wn,dice:fi<Hi,children:nr.slice(oi,di)}),ir.dice?st(ir,wt,Ie,xe,Pn?Ie+=Hi*wn/Pn:Ce):Tr(ir,wt,Ie,Pn?wt+=fi*wn/Pn:xe,Ce),Pn-=wn,oi=di}return vt}var Wr=function je($e){function wt(Ie,xe,Ce,vt,nr){ei($e,Ie,xe,Ce,vt,nr)}return wt.ratio=function(Ie){return je((Ie=+Ie)>1?Ie:1)},wt}(Rr);function Ur(){var je=Wr,$e=!1,wt=1,Ie=1,xe=[0],Ce=Pe,vt=Pe,nr=Pe,ir=Pe,pr=Pe;function oi(Jr){return Jr.x0=Jr.y0=0,Jr.x1=wt,Jr.y1=Ie,Jr.eachBefore(di),xe=[0],$e&&Jr.eachBefore(Wt),Jr}function di(Jr){var fi=xe[Jr.depth],Hi=Jr.x0+fi,Pn=Jr.y0+fi,wn=Jr.x1-fi,pn=Jr.y1-fi;wn<Hi&&(Hi=wn=(Hi+wn)/2),pn<Pn&&(Pn=pn=(Pn+pn)/2),Jr.x0=Hi,Jr.y0=Pn,Jr.x1=wn,Jr.y1=pn,Jr.children&&(fi=xe[Jr.depth+1]=Ce(Jr)/2,Hi+=pr(Jr)-fi,Pn+=vt(Jr)-fi,wn-=nr(Jr)-fi,pn-=ir(Jr)-fi,wn<Hi&&(Hi=wn=(Hi+wn)/2),pn<Pn&&(Pn=pn=(Pn+pn)/2),je(Jr,Hi,Pn,wn,pn))}return oi.round=function(Jr){return arguments.length?($e=!!Jr,oi):$e},oi.size=function(Jr){return arguments.length?(wt=+Jr[0],Ie=+Jr[1],oi):[wt,Ie]},oi.tile=function(Jr){return arguments.length?(je=De(Jr),oi):je},oi.padding=function(Jr){return arguments.length?oi.paddingInner(Jr).paddingOuter(Jr):oi.paddingInner()},oi.paddingInner=function(Jr){return arguments.length?(Ce=typeof Jr==\"function\"?Jr:ge(+Jr),oi):Ce},oi.paddingOuter=function(Jr){return arguments.length?oi.paddingTop(Jr).paddingRight(Jr).paddingBottom(Jr).paddingLeft(Jr):oi.paddingTop()},oi.paddingTop=function(Jr){return arguments.length?(vt=typeof Jr==\"function\"?Jr:ge(+Jr),oi):vt},oi.paddingRight=function(Jr){return arguments.length?(nr=typeof Jr==\"function\"?Jr:ge(+Jr),oi):nr},oi.paddingBottom=function(Jr){return arguments.length?(ir=typeof Jr==\"function\"?Jr:ge(+Jr),oi):ir},oi.paddingLeft=function(Jr){return arguments.length?(pr=typeof Jr==\"function\"?Jr:ge(+Jr),oi):pr},oi}function dt(je,$e,wt,Ie,xe){var Ce=je.children,vt,nr=Ce.length,ir,pr=new Array(nr+1);for(pr[0]=ir=vt=0;vt<nr;++vt)pr[vt+1]=ir+=Ce[vt].value;oi(0,nr,je.value,$e,wt,Ie,xe);function oi(di,Jr,fi,Hi,Pn,wn,pn){if(di>=Jr-1){var Vn=Ce[di];Vn.x0=Hi,Vn.y0=Pn,Vn.x1=wn,Vn.y1=pn;return}for(var kn=pr[di],ea=fi/2+kn,ua=di+1,Vt=Jr-1;ua<Vt;){var _t=ua+Vt>>>1;pr[_t]<ea?ua=_t+1:Vt=_t}ea-pr[ua-1]<pr[ua]-ea&&di+1<ua&&--ua;var tr=pr[ua]-kn,ar=fi-tr;if(wn-Hi>pn-Pn){var Er=(Hi*ar+wn*tr)/fi;oi(di,ua,tr,Hi,Pn,Er,pn),oi(ua,Jr,ar,Er,Pn,wn,pn)}else{var Zr=(Pn*ar+pn*tr)/fi;oi(di,ua,tr,Hi,Pn,wn,Zr),oi(ua,Jr,ar,Hi,Zr,wn,pn)}}}function Ge(je,$e,wt,Ie,xe){(je.depth&1?Tr:st)(je,$e,wt,Ie,xe)}var Je=function je($e){function wt(Ie,xe,Ce,vt,nr){if((ir=Ie._squarify)&&ir.ratio===$e)for(var ir,pr,oi,di,Jr=-1,fi,Hi=ir.length,Pn=Ie.value;++Jr<Hi;){for(pr=ir[Jr],oi=pr.children,di=pr.value=0,fi=oi.length;di<fi;++di)pr.value+=oi[di].value;pr.dice?st(pr,xe,Ce,vt,Ce+=(nr-Ce)*pr.value/Pn):Tr(pr,xe,Ce,xe+=(vt-xe)*pr.value/Pn,nr),Pn-=pr.value}else Ie._squarify=ir=ei($e,Ie,xe,Ce,vt,nr),ir.ratio=$e}return wt.ratio=function(Ie){return je((Ie=+Ie)>1?Ie:1)},wt}(Rr);e.cluster=l,e.hierarchy=_,e.pack=ce,e.packEnclose=V,e.packSiblings=Le,e.partition=lt,e.stratify=ur,e.tree=lr,e.treemap=Ur,e.treemapBinary=dt,e.treemapDice=st,e.treemapResquarify=Je,e.treemapSlice=Tr,e.treemapSliceDice=Ge,e.treemapSquarify=Wr,Object.defineProperty(e,\"__esModule\",{value:!0})})});var IE=ye(PE=>{\"use strict\";var UCe=LE(),qkt=Eo(),wA=Dr(),Bkt=tc().makeColorScaleFuncFromTrace,Nkt=_A().makePullColorFn,Ukt=_A().generateExtendedColors,Vkt=tc().calc,Gkt=hs().ALMOST_EQUAL,Hkt={},jkt={},Wkt={};PE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=wA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=wA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(H,N){c[H]?c[H].push(N):c[H]=[N],f[N]=1},d=function(H){return H||typeof H==\"number\"},v=function(H){return!l||qkt(s[H])&&s[H]>=0},x,b,p;i?(x=Math.min(n.length,o.length),b=function(H){return d(n[H])&&v(H)},p=function(H){return String(n[H])}):(x=Math.min(a.length,o.length),b=function(H){return d(a[H])&&v(H)},p=function(H){return String(a[H])}),l&&(x=Math.min(x,s.length));for(var C=0;C<x;C++)if(b(C)){var E=p(C),A=d(o[C])?String(o[C]):\"\",L={i:C,id:E,pid:A,label:d(a[C])?String(a[C]):\"\"};l&&(L.v=+s[C]),u.push(L),h(A,E)}if(c[\"\"]){if(c[\"\"].length>1){for(var M=wA.randstr(),g=0;g<u.length;g++)u[g].pid===\"\"&&(u[g].pid=M);u.unshift({hasMultipleRoots:!0,id:M,pid:\"\",label:\"\"})}}else{var _=[],k;for(k in c)f[k]||_.push(k);if(_.length===1)k=_[0],u.unshift({hasImpliedRoot:!0,id:k,pid:\"\",label:k});else return wA.warn([\"Multiple implied roots, cannot build\",t.type,\"hierarchy of\",t.name+\".\",\"These roots include:\",_.join(\", \")].join(\" \"))}var P;try{P=UCe.stratify().id(function(H){return H.id}).parentId(function(H){return H.pid})(u)}catch(H){return wA.warn([\"Failed to build\",t.type,\"hierarchy of\",t.name+\".\",\"Error:\",H.message].join(\" \"))}var T=UCe.hierarchy(P),z=!1;if(l)switch(t.branchvalues){case\"remainder\":T.sum(function(H){return H.data.v});break;case\"total\":T.each(function(H){var N=H.data.data,j=N.v;if(H.children){var re=H.children.reduce(function(oe,_e){return oe+_e.data.data.v},0);if((N.hasImpliedRoot||N.hasMultipleRoots)&&(j=re),j<re*Gkt)return z=!0,wA.warn([\"Total value for node\",H.data.data.id,\"of\",t.name,\"is smaller than the sum of its children.\",`\n",
       "parent value =`,j,`\n",
       "children sum =`,re].join(\" \"))}H.value=j});break}else VCe(T,t,{branches:t.count.indexOf(\"branches\")!==-1,leaves:t.count.indexOf(\"leaves\")!==-1});if(!z){t.sort&&T.sort(function(H,N){return N.value-H.value});var O,V,G=t.marker.colors||[],Z=!!G.length;return t._hasColorscale?(Z||(G=l?t.values:t._values),Vkt(e,t,{vals:G,containerStr:\"marker\",cLetter:\"c\"}),V=Bkt(t.marker)):O=Nkt(r[\"_\"+t.type+\"colormap\"]),T.each(function(H){var N=H.data.data;N.color=t._hasColorscale?V(G[N.i]):O(G[N.i],N.id)}),u[0].hierarchy=T,u}};PE._runCrossTraceCalc=function(e,t){var r=t._fullLayout,n=t.calcdata,i=r[e+\"colorway\"],a=r[\"_\"+e+\"colormap\"];r[\"extend\"+e+\"colors\"]&&(i=Ukt(i,e===\"icicle\"?Wkt:e===\"treemap\"?jkt:Hkt));var o=0,s;function l(h){var d=h.data.data,v=d.id;d.color===!1&&(a[v]?d.color=a[v]:h.parent?h.parent.parent?d.color=h.parent.data.data.color:(a[v]=d.color=i[o%i.length],o++):d.color=s)}for(var u=0;u<n.length;u++){var c=n[u],f=c[0];f.trace.type===e&&f.hierarchy&&(s=f.trace.root.color,f.hierarchy.each(l))}};PE.crossTraceCalc=function(e){return PE._runCrossTraceCalc(\"sunburst\",e)};function VCe(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o<a;o++)n+=VCe(i[o],t,r);r.branches&&n++}else r.leaves&&n++;return e.value=e.data.data.value=n,t._values||(t._values=[]),t._values[e.data.data.i]=n,n}});function Zy(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function G_(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var yD=gu(()=>{});function Vm(){}function HCe(){return this.rgb().formatHex()}function e6t(){return this.rgb().formatHex8()}function t6t(){return JCe(this).formatHsl()}function jCe(){return this.rgb().formatRgb()}function j_(e){var t,r;return e=(e+\"\").trim().toLowerCase(),(t=Xkt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?WCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?_D(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?_D(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Zkt.exec(e))?new _d(t[1],t[2],t[3],1):(t=Ykt.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kkt.exec(e))?_D(t[1],t[2],t[3],t[4]):(t=Jkt.exec(e))?_D(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$kt.exec(e))?YCe(t[1],t[2]/100,t[3]/100,1):(t=Qkt.exec(e))?YCe(t[1],t[2]/100,t[3]/100,t[4]):GCe.hasOwnProperty(e)?WCe(GCe[e]):e===\"transparent\"?new _d(NaN,NaN,NaN,0):null}function WCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function _D(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function DE(e){return e instanceof Vm||(e=j_(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function AA(e,t,r,n){return arguments.length===1?DE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function XCe(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function r6t(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZCe(){let e=bD(this.opacity);return`${e===1?\"rgb(\":\"rgba(\"}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?\")\":`, ${e})`}`}function bD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?\"0\":\"\")+e.toString(16)}function YCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xg(e,t,r,n)}function JCe(e){if(e instanceof Xg)return new Xg(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=j_(e)),!e)return new Xg;if(e instanceof Xg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Xg(o,s,l,e.opacity)}function FE(e,t,r,n){return arguments.length===1?JCe(e):new Xg(e,t,r,n==null?1:n)}function Xg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function KCe(e){return e=(e||0)%360,e<0?e+360:e}function xD(e){return Math.max(0,Math.min(1,e||0))}function mW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var H_,C2,TA,RE,Um,Xkt,Zkt,Ykt,Kkt,Jkt,$kt,Qkt,GCe,wD=gu(()=>{yD();H_=.7,C2=1/H_,TA=\"\\\\s*([+-]?\\\\d+)\\\\s*\",RE=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",Um=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",Xkt=/^#([0-9a-f]{3,8})$/,Zkt=new RegExp(`^rgb\\\\(${TA},${TA},${TA}\\\\)$`),Ykt=new RegExp(`^rgb\\\\(${Um},${Um},${Um}\\\\)$`),Kkt=new RegExp(`^rgba\\\\(${TA},${TA},${TA},${RE}\\\\)$`),Jkt=new RegExp(`^rgba\\\\(${Um},${Um},${Um},${RE}\\\\)$`),$kt=new RegExp(`^hsl\\\\(${RE},${Um},${Um}\\\\)$`),Qkt=new RegExp(`^hsla\\\\(${RE},${Um},${Um},${RE}\\\\)$`),GCe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zy(Vm,j_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:HCe,formatHex:HCe,formatHex8:e6t,formatHsl:t6t,formatRgb:jCe,toString:jCe});Zy(_d,AA,G_(Vm,{brighter(e){return e=e==null?C2:Math.pow(C2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(E2(this.r),E2(this.g),E2(this.b),bD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:XCe,formatHex:XCe,formatHex8:r6t,formatRgb:ZCe,toString:ZCe}));Zy(Xg,FE,G_(Vm,{brighter(e){return e=e==null?C2:Math.pow(C2,e),new Xg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new Xg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(mW(e>=240?e-240:e+120,i,n),mW(e,i,n),mW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Xg(KCe(this.h),xD(this.s),xD(this.l),bD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=bD(this.opacity);return`${e===1?\"hsl(\":\"hsla(\"}${KCe(this.h)}, ${xD(this.s)*100}%, ${xD(this.l)*100}%${e===1?\")\":`, ${e})`}`}}))});var TD,AD,yW=gu(()=>{TD=Math.PI/180,AD=180/Math.PI});function ike(e){if(e instanceof Gm)return new Gm(e.l,e.a,e.b,e.opacity);if(e instanceof Yy)return nke(e);e instanceof _d||(e=DE(e));var t=wW(e.r),r=wW(e.g),n=wW(e.b),i=_W((.2225045*t+.7168786*r+.0606169*n)/QCe),a,o;return t===r&&r===n?a=o=i:(a=_W((.4360747*t+.3850649*r+.1430804*n)/$Ce),o=_W((.0139322*t+.0971045*r+.7141733*n)/eke)),new Gm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function MA(e,t,r,n){return arguments.length===1?ike(e):new Gm(e,t,r,n==null?1:n)}function Gm(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function _W(e){return e>i6t?Math.pow(e,1/3):e/rke+tke}function xW(e){return e>SA?e*e*e:rke*(e-tke)}function bW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function wW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function n6t(e){if(e instanceof Yy)return new Yy(e.h,e.c,e.l,e.opacity);if(e instanceof Gm||(e=ike(e)),e.a===0&&e.b===0)return new Yy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*AD;return new Yy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function zE(e,t,r,n){return arguments.length===1?n6t(e):new Yy(e,t,r,n==null?1:n)}function Yy(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function nke(e){if(isNaN(e.h))return new Gm(e.l,0,0,e.opacity);var t=e.h*TD;return new Gm(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var SD,$Ce,QCe,eke,tke,SA,rke,i6t,ake=gu(()=>{yD();wD();yW();SD=18,$Ce=.96422,QCe=1,eke=.82521,tke=4/29,SA=6/29,rke=3*SA*SA,i6t=SA*SA*SA;Zy(Gm,MA,G_(Vm,{brighter(e){return new Gm(this.l+SD*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Gm(this.l-SD*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=$Ce*xW(t),e=QCe*xW(e),r=eke*xW(r),new _d(bW(3.1338561*t-1.6168667*e-.4906146*r),bW(-.9787684*t+1.9161415*e+.033454*r),bW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Zy(Yy,zE,G_(Vm,{brighter(e){return new Yy(this.h,this.c,this.l+SD*(e==null?1:e),this.opacity)},darker(e){return new Yy(this.h,this.c,this.l-SD*(e==null?1:e),this.opacity)},rgb(){return nke(this).rgb()}}))});function a6t(e){if(e instanceof k2)return new k2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=DE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(lke*n+oke*t-ske*r)/(lke+oke-ske),a=n-i,o=(OE*(r-i)-AW*a)/MD,s=Math.sqrt(o*o+a*a)/(OE*i*(1-i)),l=s?Math.atan2(o,a)*AD-120:NaN;return new k2(l<0?l+360:l,s,i,e.opacity)}function EA(e,t,r,n){return arguments.length===1?a6t(e):new k2(e,t,r,n==null?1:n)}function k2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var uke,TW,AW,MD,OE,oke,ske,lke,cke=gu(()=>{yD();wD();yW();uke=-.14861,TW=1.78277,AW=-.29227,MD=-.90649,OE=1.97294,oke=OE*MD,ske=OE*TW,lke=TW*AW-MD*uke;Zy(k2,EA,G_(Vm,{brighter(e){return e=e==null?C2:Math.pow(C2,e),new k2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new k2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*TD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(uke*n+TW*i)),255*(t+r*(AW*n+MD*i)),255*(t+r*(OE*n)),this.opacity)}}))});var L2=gu(()=>{wD();ake();cke()});function SW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function ED(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n<t-1?e[n+2]:2*a-i;return SW((r-n/t)*t,o,i,a,s)}}var CD=gu(()=>{});function kD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return SW((r-n/t)*t,i,a,o,s)}}var MW=gu(()=>{CD()});var CA,EW=gu(()=>{CA=e=>()=>e});function fke(e,t){return function(r){return e+r*t}}function o6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function W_(e,t){var r=t-e;return r?fke(e,r>180||r<-180?r-360*Math.round(r/360):r):CA(isNaN(e)?t:e)}function hke(e){return(e=+e)==1?$f:function(t,r){return r-t?o6t(t,r,e):CA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?fke(e,r):CA(isNaN(e)?t:e)}var P2=gu(()=>{EW()});function dke(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o<r;++o)s=AA(t[o]),n[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return n=e(n),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=a(l),s+\"\"}}}var qE,vke,pke,CW=gu(()=>{L2();CD();MW();P2();qE=function e(t){var r=hke(t);function n(i,a){var o=r((i=AA(i)).r,(a=AA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+\"\"}}return n.gamma=e,n}(1);vke=dke(ED),pke=dke(kD)});function kA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function LD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var PD=gu(()=>{});function gke(e,t){return(LD(t)?kA:kW)(e,t)}function kW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=X_(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}var LW=gu(()=>{BE();PD()});function ID(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var PW=gu(()=>{});function Fp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var NE=gu(()=>{});function RD(e,t){var r={},n={},i;(e===null||typeof e!=\"object\")&&(e={}),(t===null||typeof t!=\"object\")&&(t={});for(i in t)i in e?r[i]=X_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var IW=gu(()=>{BE()});function s6t(e){return function(){return e}}function l6t(e){return function(t){return e(t)+\"\"}}function DD(e,t){var r=DW.lastIndex=RW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+\"\",t=t+\"\";(n=DW.exec(e))&&(i=RW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Fp(n,i)})),r=RW.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?l6t(l[0].x):s6t(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join(\"\")})}var DW,RW,FW=gu(()=>{NE();DW=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,RW=new RegExp(DW.source,\"g\")});function X_(e,t){var r=typeof t,n;return t==null||r===\"boolean\"?CA(t):(r===\"number\"?Fp:r===\"string\"?(n=j_(t))?(t=n,qE):DD:t instanceof j_?qE:t instanceof Date?ID:LD(t)?kA:Array.isArray(t)?kW:typeof t.valueOf!=\"function\"&&typeof t.toString!=\"function\"||isNaN(t)?RD:Fp)(e,t)}var BE=gu(()=>{L2();CW();LW();PW();NE();IW();FW();EW();PD()});function mke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var yke=gu(()=>{});function _ke(e,t){var r=W_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var xke=gu(()=>{P2()});function bke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var wke=gu(()=>{});function zW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Tke,skewX:Math.atan(l)*Tke,scaleX:o,scaleY:s}}var Tke,FD,Ake=gu(()=>{Tke=180/Math.PI,FD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Ske(e){let t=new(typeof DOMMatrix==\"function\"?DOMMatrix:WebKitCSSMatrix)(e+\"\");return t.isIdentity?FD:zW(t.a,t.b,t.c,t.d,t.e,t.f)}function Mke(e){return e==null?FD:(zD||(zD=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),zD.setAttribute(\"transform\",e),(e=zD.transform.baseVal.consolidate())?(e=e.matrix,zW(e.a,e.b,e.c,e.d,e.e,e.f)):FD)}var zD,Eke=gu(()=>{Ake()});function Cke(e,t,r,n){function i(u){return u.length?u.pop()+\" \":\"\"}function a(u,c,f,h,d,v){if(u!==f||c!==h){var x=d.push(\"translate(\",null,t,null,r);v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(c,h)})}else(f||h)&&d.push(\"translate(\"+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+\"rotate(\",null,n)-2,x:Fp(u,c)})):c&&f.push(i(f)+\"rotate(\"+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+\"skewX(\",null,n)-2,x:Fp(u,c)}):c&&f.push(i(f)+\"skewX(\"+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var x=d.push(i(d)+\"scale(\",null,\",\",null,\")\");v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+\"scale(\"+f+\",\"+h+\")\")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,x=h.length,b;++v<x;)f[(b=h[v]).i]=b.x(d);return f.join(\"\")}}}var kke,Lke,Pke=gu(()=>{NE();Eke();kke=Cke(Ske,\"px, \",\"px)\",\"deg)\"),Lke=Cke(Mke,\", \",\")\",\")\")});function Ike(e){return((e=Math.exp(e))+1/e)/2}function c6t(e){return((e=Math.exp(e))-1/e)/2}function f6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var u6t,Rke,Dke=gu(()=>{u6t=1e-12;Rke=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,x=d*d+v*v,b,p;if(x<u6t)p=Math.log(h/u)/t,b=function(k){return[s+k*d,l+k*v,u*Math.exp(t*k*p)]};else{var C=Math.sqrt(x),E=(h*h-u*u+n*x)/(2*u*r*C),A=(h*h-u*u-n*x)/(2*h*r*C),L=Math.log(Math.sqrt(E*E+1)-E),_=Math.log(Math.sqrt(A*A+1)-A);p=(_-L)/t,b=function(k){var M=k*p,g=Ike(L),P=u/(r*C)*(g*f6t(t*M+L)-c6t(L));return[s+P*d,l+P*v,u*g/Ike(t*M+L)]}}return b.duration=p*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},i}(Math.SQRT2,2,4)});function Fke(e){return function(t,r){var n=e((t=FE(t)).h,(r=FE(r)).h),i=$f(t.s,r.s),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+\"\"}}}var zke,Oke,qke=gu(()=>{L2();P2();zke=Fke(W_),Oke=Fke($f)});function OW(e,t){var r=$f((e=MA(e)).l,(t=MA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+\"\"}}var Bke=gu(()=>{L2();P2()});function Nke(e){return function(t,r){var n=e((t=zE(t)).h,(r=zE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+\"\"}}}var Uke,Vke,Gke=gu(()=>{L2();P2();Uke=Nke(W_),Vke=Nke($f)});function Hke(e){return function t(r){r=+r;function n(i,a){var o=e((i=EA(i)).h,(a=EA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+\"\"}}return n.gamma=t,n}(1)}var jke,Wke,Xke=gu(()=>{L2();P2();jke=Hke(W_),Wke=Hke($f)});function qW(e,t){t===void 0&&(t=e,e=X_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}var Zke=gu(()=>{BE()});function Yke(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var Kke=gu(()=>{});var I2={};uee(I2,{interpolate:()=>X_,interpolateArray:()=>gke,interpolateBasis:()=>ED,interpolateBasisClosed:()=>kD,interpolateCubehelix:()=>jke,interpolateCubehelixLong:()=>Wke,interpolateDate:()=>ID,interpolateDiscrete:()=>mke,interpolateHcl:()=>Uke,interpolateHclLong:()=>Vke,interpolateHsl:()=>zke,interpolateHslLong:()=>Oke,interpolateHue:()=>_ke,interpolateLab:()=>OW,interpolateNumber:()=>Fp,interpolateNumberArray:()=>kA,interpolateObject:()=>RD,interpolateRgb:()=>qE,interpolateRgbBasis:()=>vke,interpolateRgbBasisClosed:()=>pke,interpolateRound:()=>bke,interpolateString:()=>DD,interpolateTransformCss:()=>kke,interpolateTransformSvg:()=>Lke,interpolateZoom:()=>Rke,piecewise:()=>qW,quantize:()=>Yke});var R2=gu(()=>{BE();LW();CD();MW();PW();yke();xke();NE();PD();IW();wke();FW();Pke();Dke();CW();qke();Bke();Gke();Xke();Zke();Kke()});var OD=ye((Jvr,Jke)=>{\"use strict\";var h6t=So(),d6t=Ca();Jke.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),h6t.pointStyle(t,n,i,r)}else d6t.fill(t,l)}});var BW=ye(($vr,r6e)=>{\"use strict\";var $ke=Oa(),Qke=Ca(),e6e=Dr(),v6t=bv().resizeText,p6t=OD();function g6t(e){var t=e._fullLayout._sunburstlayer.selectAll(\".trace\");v6t(e,t,\"sunburst\"),t.each(function(r){var n=$ke.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){$ke.select(this).call(t6e,o,a,e)})})}function t6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=e6e.castOption(r,o,\"marker.line.color\")||Qke.defaultLine,l=e6e.castOption(r,o,\"marker.line.width\")||0;e.call(p6t,t,r,n).style(\"stroke-width\",l).call(Qke.stroke,s).style(\"opacity\",a?r.leaf.opacity:null)}r6e.exports={style:g6t,styleOne:t6e}});var Ky=ye(Ns=>{\"use strict\";var D2=Dr(),m6t=Ca(),y6t=Tg(),i6e=l_();Ns.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Ns.getPtId(n)===t)return r=n.copy()}),r||e};Ns.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a<i.length;a++){var o=i[a];if(Ns.getPtId(o)===t)return r=n.copy()}}),r||e};Ns.isEntry=function(e){return!e.parent};Ns.isLeaf=function(e){return!e.children};Ns.getPtId=function(e){return e.data.data.id};Ns.getPtLabel=function(e){return e.data.data.label};Ns.getValue=function(e){return e.value};Ns.isHierarchyRoot=function(e){return n6e(e)===\"\"};Ns.setSliceCursor=function(e,t,r){var n=r.isTransitioning;if(!n){var i=e.datum();n=r.hideOnRoot&&Ns.isHierarchyRoot(i)||r.hideOnLeaves&&Ns.isLeaf(i)}y6t(e,n?null:\"pointer\")};function _6t(e,t,r){return{color:Ns.getOutsideTextFontKey(\"color\",e,t,r),family:Ns.getOutsideTextFontKey(\"family\",e,t,r),size:Ns.getOutsideTextFontKey(\"size\",e,t,r),weight:Ns.getOutsideTextFontKey(\"weight\",e,t,r),style:Ns.getOutsideTextFontKey(\"style\",e,t,r),variant:Ns.getOutsideTextFontKey(\"variant\",e,t,r),textcase:Ns.getOutsideTextFontKey(\"textcase\",e,t,r),lineposition:Ns.getOutsideTextFontKey(\"lineposition\",e,t,r),shadow:Ns.getOutsideTextFontKey(\"shadow\",e,t,r)}}function x6t(e,t,r,n){var i=(n||{}).onPathbar,a=t.data.data,o=a.i,s=D2.castOption(e,o,(i?\"pathbar.textfont\":\"insidetextfont\")+\".color\");return!s&&e._input.textfont&&(s=D2.castOption(e._input,o,\"textfont.color\")),{color:s||m6t.contrast(a.color),family:Ns.getInsideTextFontKey(\"family\",e,t,r,n),size:Ns.getInsideTextFontKey(\"size\",e,t,r,n),weight:Ns.getInsideTextFontKey(\"weight\",e,t,r,n),style:Ns.getInsideTextFontKey(\"style\",e,t,r,n),variant:Ns.getInsideTextFontKey(\"variant\",e,t,r,n),textcase:Ns.getInsideTextFontKey(\"textcase\",e,t,r,n),lineposition:Ns.getInsideTextFontKey(\"lineposition\",e,t,r,n),shadow:Ns.getInsideTextFontKey(\"shadow\",e,t,r,n)}}Ns.getInsideTextFontKey=function(e,t,r,n,i){var a=(i||{}).onPathbar,o=a?\"pathbar.textfont\":\"insidetextfont\",s=r.data.data.i;return D2.castOption(t,s,o+\".\"+e)||D2.castOption(t,s,\"textfont.\"+e)||n.size};Ns.getOutsideTextFontKey=function(e,t,r,n){var i=r.data.data.i;return D2.castOption(t,i,\"outsidetextfont.\"+e)||D2.castOption(t,i,\"textfont.\"+e)||n.size};Ns.isOutsideText=function(e,t){return!e._hasColorscale&&Ns.isHierarchyRoot(t)};Ns.determineTextFont=function(e,t,r,n){return Ns.isOutsideText(e,t)?_6t(e,t,r):x6t(e,t,r,n)};Ns.hasTransition=function(e){return!!(e&&e.duration>0)};Ns.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Ns.isHeader=function(e,t){return!(Ns.isLeaf(e)||e.depth===t._maxDepth-1)};function n6e(e){return e.data.data.pid}Ns.getParent=function(e,t){return Ns.findEntryWithLevel(e,n6e(t))};Ns.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Ns.listPath(r,t).concat(n)};Ns.getPath=function(e){return Ns.listPath(e,\"label\").join(\"/\")+\"/\"};Ns.formatValue=i6e.formatPieValue;Ns.formatPercent=function(e,t){var r=D2.formatPercent(e,0);return r===\"0%\"&&(r=i6e.formatPiePercent(e,t)),r}});var GE=ye((epr,s6e)=>{\"use strict\";var LA=Oa(),a6e=qa(),b6t=rp().appendArrayPointValue,UE=vf(),o6e=Dr(),w6t=g3(),rd=Ky(),T6t=l_(),A6t=T6t.formatPieValue;s6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type===\"sunburst\",c=s.type===\"treemap\"||s.type===\"icicle\";\"_hasHoverLabel\"in s||(s._hasHoverLabel=!1),\"_hasHoverEvent\"in s||(s._hasHoverEvent=!1);var f=function(v){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,C=p.i,E=rd.isHierarchyRoot(v),A=rd.getParent(l,v),L=rd.getValue(v),_=function(Me){return o6e.castOption(b,C,Me)},k=_(\"hovertemplate\"),M=UE.castHoverinfo(b,x,C),g=x.separators,P;if(k||M&&M!==\"none\"&&M!==\"skip\"){var T,z;u&&(T=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(T=v._hoverX,z=v._hoverY);var O={},V=[],G=[],Z=function(Me){return V.indexOf(Me)!==-1};M&&(V=M===\"all\"?b._module.attributes.hoverinfo.flags:M.split(\"+\")),O.label=p.label,Z(\"label\")&&O.label&&G.push(O.label),p.hasOwnProperty(\"v\")&&(O.value=p.v,O.valueLabel=A6t(O.value,g),Z(\"value\")&&G.push(O.valueLabel)),O.currentPath=v.currentPath=rd.getPath(v.data),Z(\"current path\")&&!E&&G.push(O.currentPath);var H,N=[],j=function(){N.indexOf(H)===-1&&(G.push(H),N.push(H))};O.percentParent=v.percentParent=L/rd.getValue(A),O.parent=v.parentString=rd.getPtLabel(A),Z(\"percent parent\")&&(H=rd.formatPercent(O.percentParent,g)+\" of \"+O.parent,j()),O.percentEntry=v.percentEntry=L/rd.getValue(r),O.entry=v.entry=rd.getPtLabel(r),Z(\"percent entry\")&&!E&&!v.onPathbar&&(H=rd.formatPercent(O.percentEntry,g)+\" of \"+O.entry,j()),O.percentRoot=v.percentRoot=L/rd.getValue(l),O.root=v.root=rd.getPtLabel(l),Z(\"percent root\")&&!E&&(H=rd.formatPercent(O.percentRoot,g)+\" of \"+O.root,j()),O.text=_(\"hovertext\")||_(\"text\"),Z(\"text\")&&(H=O.text,o6e.isValidTextValue(H)&&G.push(H)),P=[VE(v,b,a.eventDataKeys)];var re={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join(\"<br>\"),name:k||Z(\"name\")?b.name:void 0,color:_(\"hoverlabel.bgcolor\")||p.color,borderColor:_(\"hoverlabel.bordercolor\"),fontFamily:_(\"hoverlabel.font.family\"),fontSize:_(\"hoverlabel.font.size\"),fontColor:_(\"hoverlabel.font.color\"),fontWeight:_(\"hoverlabel.font.weight\"),fontStyle:_(\"hoverlabel.font.style\"),fontVariant:_(\"hoverlabel.font.variant\"),nameLength:_(\"hoverlabel.namelength\"),textAlign:_(\"hoverlabel.align\"),hovertemplate:k,hovertemplateLabels:O,eventData:P};u&&(re.x0=T-v.rInscribed*v.rpx1,re.x1=T+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?\"left\":\"right\"),c&&(re.x=T,re.idealAlign=T<0?\"left\":\"right\");var oe=[];UE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select(\"path.surface\");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit(\"plotly_hover\",{points:P||[VE(v,b,a.eventDataKeys)],event:LA.event})}},h=function(v){var x=n._fullLayout,b=n._fullData[s.index],p=LA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=LA.event,n.emit(\"plotly_unhover\",{points:[VE(p,b,a.eventDataKeys)],event:LA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(UE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var C=t.select(\"path.surface\");a.styleOne(C,p,b,n,{hovered:!1})}},d=function(v){var x=n._fullLayout,b=n._fullData[s.index],p=u&&(rd.isHierarchyRoot(v)||rd.isLeaf(v)),C=rd.getPtId(v),E=rd.isEntry(v)?rd.findEntryWithChild(l,C):rd.findEntryWithLevel(l,C),A=rd.getPtId(E),L={points:[VE(v,b,a.eventDataKeys)],event:LA.event};p||(L.nextLevel=A);var _=w6t.triggerHandler(n,\"plotly_\"+s.type+\"click\",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[VE(v,b,a.eventDataKeys)],UE.click(n,LA.event)),!p&&_!==!1&&!n._dragging&&!n._transitioning){a6e.call(\"_storeDirectGUIEdit\",b,x._tracePreGUI[b.uid],{level:b.level});var k={data:[{level:A}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:\"immediate\",fromcurrent:!0};UE.loneUnhover(x._hoverlayer.node()),a6e.call(\"animate\",n,k,M)}};t.on(\"mouseover\",f),t.on(\"mouseout\",h),t.on(\"click\",d)};function VE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a<r.length;a++){var o=r[a];o in e&&(i[o]=e[o])}return\"parentString\"in e&&!rd.isHierarchyRoot(e)&&(i.parent=e.parentString),b6t(i,t,n.i),i}});var BD=ye(qD=>{\"use strict\";var HE=Oa(),S6t=LE(),Zg=(R2(),ab(I2)).interpolate,l6e=So(),Tv=Dr(),M6t=ru(),h6e=bv(),u6e=h6e.recordMinTextSize,E6t=h6e.clearMinTextSize,d6e=gD(),C6t=l_().getRotationAngle,k6t=d6e.computeTransform,L6t=d6e.transformInsideText,P6t=BW().styleOne,I6t=N0().resizeText,R6t=GE(),NW=pW(),Rl=Ky();qD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(E6t(\"sunburst\",i),o=a.selectAll(\"g.trace.sunburst\").data(t,function(f){return f[0].trace.uid}),o.enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),o.order(),u){n&&(s=n());var c=HE.transition().duration(r.duration).ease(r.easing).each(\"end\",function(){s&&s()}).each(\"interrupt\",function(){s&&s()});c.each(function(){a.selectAll(\"g.trace\").each(function(f){c6e(e,f,this,r)})})}else o.each(function(f){c6e(e,f,this,r)}),i.uniformtext.mode&&I6t(e,i._sunburstlayer.selectAll(\".trace\"),\"sunburst\");l&&o.exit().remove()};function c6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=HE.select(r),l=s.selectAll(\"g.slice\"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,x=c.domain,b=v.w*(x.x[1]-x.x[0]),p=v.h*(x.y[1]-x.y[0]),C=.5*Math.min(b,p),E=u.cx=v.l+v.w*(x.x[1]+x.x[0])/2,A=u.cy=v.t+v.h*(1-x.y[0])-p/2;if(!h)return l.remove();var L=null,_={};o&&l.each(function(me){_[Rl.getPtId(me)]={rpx0:me.rpx0,rpx1:me.rpx1,x0:me.x0,x1:me.x1,transform:me.transform},!L&&Rl.isEntry(me)&&(L=me)});var k=D6t(h).descendants(),M=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(k=k.slice(1),M-=1,g=1,P+=1),k=k.filter(function(me){return me.y1<=P});var T=C6t(c.rotation);T&&k.forEach(function(me){me.x0+=T,me.x1+=T});var z=Math.min(M,d),O=function(me){return(me-g)/z*C},V=function(me,ie){return[me*Math.cos(ie),-me*Math.sin(ie)]},G=function(me){return Tv.pathAnnulus(me.rpx0,me.rpx1,me.x0,me.x1,E,A)},Z=function(me){return E+f6e(me)[0]*(me.transform.rCenter||0)+(me.transform.x||0)},H=function(me){return A+f6e(me)[1]*(me.transform.rCenter||0)+(me.transform.y||0)};l=l.data(k,Rl.getPtId),l.enter().append(\"g\").classed(\"slice\",!0),o?l.exit().transition().each(function(){var me=HE.select(this),ie=me.select(\"path.surface\");ie.transition().attrTween(\"d\",function(Le){var Ae=oe(Le);return function(De){return G(Ae(De))}});var Se=me.select(\"g.slicetext\");Se.attr(\"opacity\",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var j=Rl.getPtId(L);l.each(function(me){N===null&&Rl.getPtId(me)===j&&(N=me.x1)})}var re=l;o&&(re=re.transition().each(\"end\",function(){var me=HE.select(this);Rl.setSliceCursor(me,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(me){var ie=HE.select(this),Se=Tv.ensureSingle(ie,\"path\",\"surface\",function(Fe){Fe.style(\"pointer-events\",i?\"none\":\"all\")});me.rpx0=O(me.y0),me.rpx1=O(me.y1),me.xmid=(me.x0+me.x1)/2,me.pxmid=V(me.rpx1,me.xmid),me.midangle=-(me.xmid-Math.PI/2),me.startangle=-(me.x0-Math.PI/2),me.stopangle=-(me.x1-Math.PI/2),me.halfangle=.5*Math.min(Tv.angleDelta(me.x0,me.x1)||Math.PI,Math.PI),me.ring=1-me.rpx0/me.rpx1,me.rInscribed=F6t(me,c),o?Se.transition().attrTween(\"d\",function(Fe){var ce=_e(Fe);return function(Ze){return G(ce(Ze))}}):Se.attr(\"d\",G),ie.call(R6t,h,e,t,{eventDataKeys:NW.eventDataKeys,transitionTime:NW.CLICK_TRANSITION_TIME,transitionEasing:NW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(P6t,me,c,e);var Le=Tv.ensureSingle(ie,\"g\",\"slicetext\"),Ae=Tv.ensureSingle(Le,\"text\",\"\",function(Fe){Fe.attr(\"data-notex\",1)}),De=Tv.ensureUniformFontSize(e,Rl.determineTextFont(c,me,a.font));Ae.text(qD.formatSliceLabel(me,h,c,t,a)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(l6e.font,De).call(M6t.convertToTspans,e);var Pe=l6e.bBox(Ae.node());me.transform=L6t(Pe,me,u),me.transform.targetX=Z(me),me.transform.targetY=H(me);var ge=function(Fe,ce){var Ze=Fe.transform;return k6t(Ze,ce),Ze.fontSize=De.size,u6e(c.type,Ze,a),Tv.getTextTransform(Ze)};o?Ae.transition().attrTween(\"transform\",function(Fe){var ce=Me(Fe);return function(Ze){return ge(ce(Ze),Pe)}}):Ae.attr(\"transform\",ge(me,Pe))});function oe(me){var ie=Rl.getPtId(me),Se=_[ie],Le=_[Rl.getPtId(h)],Ae;if(Le){var De=(me.x1>Le.x1?2*Math.PI:0)+T;Ae=me.rpx1<Le.rpx1?{x0:me.x0,x1:me.x1,rpx0:0,rpx1:0}:{x0:De,x1:De,rpx0:me.rpx0,rpx1:me.rpx1}}else{var Pe,ge=Rl.getPtId(me.parent);l.each(function(pt){if(Rl.getPtId(pt)===ge)return Pe=pt});var Fe=Pe.children,ce;Fe.forEach(function(pt,Wt){if(Rl.getPtId(pt)===ie)return ce=Wt});var Ze=Fe.length,ct=Zg(Pe.x0,Pe.x1);Ae={rpx0:C,rpx1:C,x0:ct(ce/Ze),x1:ct((ce+1)/Ze)}}return Zg(Se,Ae)}function _e(me){var ie=_[Rl.getPtId(me)],Se,Le={x0:me.x0,x1:me.x1,rpx0:me.rpx0,rpx1:me.rpx1};if(ie)Se=ie;else if(L)if(me.parent)if(N){var Ae=(me.x1>N?2*Math.PI:0)+T;Se={x0:Ae,x1:Ae}}else Se={rpx0:C,rpx1:C},Tv.extendFlat(Se,ke(me));else Se={rpx0:0,rpx1:0};else Se={x0:T,x1:T};return Zg(Se,Le)}function Me(me){var ie=_[Rl.getPtId(me)],Se,Le=me.transform;if(ie)Se=ie;else if(Se={rpx1:me.rpx1,transform:{textPosAngle:Le.textPosAngle,scale:0,rotate:Le.rotate,rCenter:Le.rCenter,x:Le.x,y:Le.y}},L)if(me.parent)if(N){var Ae=me.x1>N?2*Math.PI:0;Se.x0=Se.x1=Ae}else Tv.extendFlat(Se,ke(me));else Se.x0=Se.x1=T;else Se.x0=Se.x1=T;var De=Zg(Se.transform.textPosAngle,me.transform.textPosAngle),Pe=Zg(Se.rpx1,me.rpx1),ge=Zg(Se.x0,me.x0),Fe=Zg(Se.x1,me.x1),ce=Zg(Se.transform.scale,Le.scale),Ze=Zg(Se.transform.rotate,Le.rotate),ct=Le.rCenter===0?3:Se.transform.rCenter===0?1/3:1,pt=Zg(Se.transform.rCenter,Le.rCenter),Wt=function(st){return pt(Math.pow(st,ct))};return function(st){var lt=Pe(st),Gt=ge(st),Nt=Fe(st),$t=Wt(st),sr=V(lt,(Gt+Nt)/2),wr=De(st),ur={pxmid:sr,rpx1:lt,transform:{textPosAngle:wr,rCenter:$t,x:Le.x,y:Le.y}};return u6e(c.type,Le,a),{transform:{targetX:Z(ur),targetY:H(ur),scale:ce(st),rotate:Ze(st),rCenter:$t}}}}function ke(me){var ie=me.parent,Se=_[Rl.getPtId(ie)],Le={};if(Se){var Ae=ie.children,De=Ae.indexOf(me),Pe=Ae.length,ge=Zg(Se.x0,Se.x1);Le.x0=ge(De/Pe),Le.x1=ge(De/Pe)}else Le.x0=Le.x1=0;return Le}}function D6t(e){return S6t.partition().size([2*Math.PI,e.height+1])(e)}qD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o===\"none\"))return\"\";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split(\"+\"),x=function(g){return v.indexOf(g)!==-1},b=[],p;if(x(\"label\")&&u.label&&b.push(u.label),u.hasOwnProperty(\"v\")&&x(\"value\")&&b.push(Rl.formatValue(u.v,s)),!f){x(\"current path\")&&b.push(Rl.getPath(e.data));var C=0;x(\"percent parent\")&&C++,x(\"percent entry\")&&C++,x(\"percent root\")&&C++;var E=C>1;if(C){var A,L=function(g){p=Rl.formatPercent(A,s),E&&(p+=\" of \"+g),b.push(p)};x(\"percent parent\")&&!f&&(A=d/Rl.getValue(h),L(\"parent\")),x(\"percent entry\")&&(A=d/Rl.getValue(t),L(\"entry\")),x(\"percent root\")&&(A=d/Rl.getValue(c),L(\"root\"))}}return x(\"text\")&&(p=Tv.castOption(r,u.i,\"text\"),Tv.isValidTextValue(p)&&b.push(p)),b.join(\"<br>\")}var _=Tv.castOption(r,u.i,\"texttemplate\");if(!_)return\"\";var k={};u.label&&(k.label=u.label),u.hasOwnProperty(\"v\")&&(k.value=u.v,k.valueLabel=Rl.formatValue(u.v,s)),k.currentPath=Rl.getPath(e.data),f||(k.percentParent=d/Rl.getValue(h),k.percentParentLabel=Rl.formatPercent(k.percentParent,s),k.parent=Rl.getPtLabel(h)),k.percentEntry=d/Rl.getValue(t),k.percentEntryLabel=Rl.formatPercent(k.percentEntry,s),k.entry=Rl.getPtLabel(t),k.percentRoot=d/Rl.getValue(c),k.percentRootLabel=Rl.formatPercent(k.percentRoot,s),k.root=Rl.getPtLabel(c),u.hasOwnProperty(\"color\")&&(k.color=u.color);var M=Tv.castOption(r,u.i,\"text\");return(Tv.isValidTextValue(M)||M===\"\")&&(k.text=M),k.customdata=Tv.castOption(r,u.i,\"customdata\"),Tv.texttemplateString(_,k,i._d3locale,k,r._meta||{})};function F6t(e){return e.rpx0===0&&Tv.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function f6e(e){return z6t(e.rpx1,e.transform.textPosAngle)}function z6t(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var p6e=ye((rpr,v6e)=>{\"use strict\";v6e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:kCe(),categories:[],animatable:!0,attributes:kE(),layoutAttributes:gW(),supplyDefaults:OCe(),supplyLayoutDefaults:BCe(),calc:IE().calc,crossTraceCalc:IE().crossTraceCalc,plot:BD().plot,style:BW().style,colorbar:$d(),meta:{}}});var m6e=ye((ipr,g6e)=>{\"use strict\";g6e.exports=p6e()});var _6e=ye(PA=>{\"use strict\";var y6e=Mc();PA.name=\"treemap\";PA.plot=function(e,t,r,n){y6e.plotBasePlot(PA.name,e,t,r,n)};PA.clean=function(e,t,r,n){y6e.cleanBasePlot(PA.name,e,t,r,n)}});var F2=ye((apr,x6e)=>{\"use strict\";x6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}});var ND=ye((opr,w6e)=>{\"use strict\";var O6t=Qo().hovertemplateAttrs,q6t=Qo().texttemplateAttrs,B6t=Tu(),N6t=kc().attributes,z2=A2(),Q0=kE(),b6e=F2(),UW=Ao().extendFlat,U6t=Pd().pattern;w6e.exports={labels:Q0.labels,parents:Q0.parents,values:Q0.values,branchvalues:Q0.branchvalues,count:Q0.count,level:Q0.level,maxdepth:Q0.maxdepth,tiling:{packing:{valType:\"enumerated\",values:[\"squarify\",\"binary\",\"dice\",\"slice\",\"slice-dice\",\"dice-slice\"],dflt:\"squarify\",editType:\"plot\"},squarifyratio:{valType:\"number\",min:1,dflt:1,editType:\"plot\"},flip:{valType:\"flaglist\",flags:[\"x\",\"y\"],dflt:\"\",editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:3,editType:\"plot\"},editType:\"calc\"},marker:UW({pad:{t:{valType:\"number\",min:0,editType:\"plot\"},l:{valType:\"number\",min:0,editType:\"plot\"},r:{valType:\"number\",min:0,editType:\"plot\"},b:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\"},colors:Q0.marker.colors,pattern:U6t,depthfade:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],editType:\"style\"},line:Q0.marker.line,cornerradius:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},B6t(\"marker\",{colorAttr:\"colors\",anim:!1})),pathbar:{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},edgeshape:{valType:\"enumerated\",values:[\">\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:UW({},z2.textfont,{}),editType:\"calc\"},text:z2.text,textinfo:Q0.textinfo,texttemplate:q6t({editType:\"plot\"},{keys:b6e.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:z2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:O6t({},{keys:b6e.eventDataKeys}),textfont:z2.textfont,insidetextfont:z2.insidetextfont,outsidetextfont:UW({},z2.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:z2.sort,root:Q0.root,domain:N6t({name:\"treemap\",trace:!0,editType:\"calc\"})}});var VW=ye((spr,T6e)=>{\"use strict\";T6e.exports={treemapcolorway:{valType:\"colorlist\",editType:\"calc\"},extendtreemapcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var E6e=ye((lpr,M6e)=>{\"use strict\";var A6e=Dr(),V6t=ND(),G6t=Ca(),H6t=kc().defaults,j6t=r0().handleText,W6t=Qb().TEXTPAD,X6t=S2().handleMarkerDefaults,S6e=tc(),Z6t=S6e.hasColorscale,Y6t=S6e.handleDefaults;M6e.exports=function(t,r,n,i){function a(b,p){return A6e.coerce(t,r,V6t,b,p)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\");var u=a(\"tiling.packing\");u===\"squarify\"&&a(\"tiling.squarifyratio\"),a(\"tiling.flip\"),a(\"tiling.pad\");var c=a(\"text\");a(\"texttemplate\"),r.texttemplate||a(\"textinfo\",A6e.isArrayOrTypedArray(c)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\");var f=a(\"pathbar.visible\"),h=\"auto\";j6t(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"textposition\");var d=r.textposition.indexOf(\"bottom\")!==-1;X6t(t,r,i,a);var v=r._hasColorscale=Z6t(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;v?Y6t(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}):a(\"marker.depthfade\",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a(\"marker.pad.t\",d?x/4:x),a(\"marker.pad.l\",x/4),a(\"marker.pad.r\",x/4),a(\"marker.pad.b\",d?x:x/4),a(\"marker.cornerradius\"),r._hovered={marker:{line:{width:2,color:G6t.contrast(i.paper_bgcolor)}}},f&&(a(\"pathbar.thickness\",r.pathbar.textfont.size+2*W6t),a(\"pathbar.side\"),a(\"pathbar.edgeshape\")),a(\"sort\"),a(\"root.color\"),H6t(r,i,a),r._length=null}});var k6e=ye((upr,C6e)=>{\"use strict\";var K6t=Dr(),J6t=VW();C6e.exports=function(t,r){function n(i,a){return K6t.coerce(t,r,J6t,i,a)}n(\"treemapcolorway\",r.colorway),n(\"extendtreemapcolors\")}});var HW=ye(GW=>{\"use strict\";var L6e=IE();GW.calc=function(e,t){return L6e.calc(e,t)};GW.crossTraceCalc=function(e){return L6e._runCrossTraceCalc(\"treemap\",e)}});var jW=ye((fpr,P6e)=>{\"use strict\";P6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o<a.length;o++)e(a[o],r,n)}});var WW=ye((hpr,I6e)=>{\"use strict\";var IA=LE(),$6t=jW();I6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing===\"dice-slice\",s=n.pad[a?\"bottom\":\"top\"],l=n.pad[i?\"right\":\"left\"],u=n.pad[i?\"left\":\"right\"],c=n.pad[a?\"top\":\"bottom\"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=IA.treemap().tile(Q6t(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&$6t(h,r,{swapXY:o,flipX:i,flipY:a}),h};function Q6t(e,t){switch(e){case\"squarify\":return IA.treemapSquarify.ratio(t);case\"binary\":return IA.treemapBinary;case\"dice\":return IA.treemapDice;case\"slice\":return IA.treemapSlice;default:return IA.treemapSliceDice}}});var UD=ye((dpr,z6e)=>{\"use strict\";var R6e=Oa(),RA=Ca(),D6e=Dr(),XW=Ky(),eLt=bv().resizeText,tLt=OD();function rLt(e){var t=e._fullLayout._treemaplayer.selectAll(\".trace\");eLt(e,t,\"treemap\"),t.each(function(r){var n=R6e.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){R6e.select(this).call(F6e,o,a,e,{hovered:!1})})})}function F6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=XW.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l=\"rgba(0,0,0,0)\",u=0;else if(l=D6e.castOption(r,s,\"marker.line.color\")||RA.defaultLine,u=D6e.castOption(r,s,\"marker.line.width\")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=RA.combine(RA.addOpacity(r._backgroundColor,.75),c),x;if(d===!0){var b=XW.getMaxDepth(r);isFinite(b)?XW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var p=0;p<x;p++){var C=.5*p/x;c=RA.combine(RA.addOpacity(v,C),c)}}}e.call(tLt,t,r,n,c).style(\"stroke-width\",u).call(RA.stroke,l).style(\"opacity\",h)}z6e.exports={style:rLt,styleOne:F6e}});var U6e=ye((vpr,N6e)=>{\"use strict\";var O6e=Oa(),VD=Dr(),q6e=So(),iLt=ru(),nLt=WW(),B6e=UD().styleOne,ZW=F2(),DA=Ky(),aLt=GE(),YW=!0;N6e.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,C={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,k=L.hierarchy,M=s/_._entryDepth,g=DA.listPath(n.data,\"id\"),P=nLt(k.copy(),[s,l],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var O=g.indexOf(z.data.id);return O===-1?!1:(z.x0=M*O,z.x1=M*(O+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,DA.getPtId),i.enter().append(\"g\").classed(\"pathbar\",!0),x(i,YW,C,[s,l],f),i.order();var T=i;v&&(T=T.transition().each(\"end\",function(){var z=O6e.select(this);DA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var O=O6e.select(this),V=VD.ensureSingle(O,\"path\",\"surface\",function(N){N.style(\"pointer-events\",E?\"none\":\"all\")});v?V.transition().attrTween(\"d\",function(N){var j=b(N,YW,C,[s,l]);return function(re){return f(j(re))}}):V.attr(\"d\",f),O.call(aLt,n,t,r,{styleOne:B6e,eventDataKeys:ZW.eventDataKeys,transitionTime:ZW.CLICK_TRANSITION_TIME,transitionEasing:ZW.CLICK_TRANSITION_EASING}).call(DA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),V.call(B6e,z,_,t,{hovered:!1}),z._text=(DA.getPtLabel(z)||\"\").split(\"<br>\").join(\" \")||\"\";var G=VD.ensureSingle(O,\"g\",\"slicetext\"),Z=VD.ensureSingle(G,\"text\",\"\",function(N){N.attr(\"data-notex\",1)}),H=VD.ensureUniformFontSize(t,DA.determineTextFont(_,z,A.font,{onPathbar:!0}));Z.text(z._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(q6e.font,H).call(iLt.convertToTspans,t),z.textBB=q6e.bBox(Z.node()),z.transform=h(z,{fontSize:H.size,onPathbar:!0}),z.transform.fontSize=H.size,v?Z.transition().attrTween(\"transform\",function(N){var j=p(N,YW,C,[s,l]);return function(re){return d(j(re))}}):Z.attr(\"transform\",d(z))})}});var j6e=ye((ppr,H6e)=>{\"use strict\";var V6e=Oa(),KW=(R2(),ab(I2)).interpolate,Z_=Ky(),jE=Dr(),G6e=Qb().TEXTPAD,oLt=i2(),sLt=oLt.toMoveInsideBar,lLt=bv(),JW=lLt.recordMinTextSize,uLt=F2(),cLt=U6e();function O2(e){return Z_.isHierarchyRoot(e)?\"\":Z_.getPtId(e)}H6e.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u===\"icicle\",f=s.hierarchy,h=Z_.findEntryWithLevel(f,l.level),d=V6e.select(n),v=d.selectAll(\"g.pathbar\"),x=d.selectAll(\"g.slice\");if(!h){v.remove(),x.remove();return}var b=Z_.isHierarchyRoot(h),p=!o.uniformtext.mode&&Z_.hasTransition(i),C=Z_.getMaxDepth(l),E=function(Qe){return Qe.data.depth-h.data.depth<C},A=o._size,L=l.domain,_=A.w*(L.x[1]-L.x[0]),k=A.h*(L.y[1]-L.y[0]),M=_,g=l.pathbar.thickness,P=l.marker.line.width+uLt.gapWithPathbar,T=l.pathbar.visible?l.pathbar.side.indexOf(\"bottom\")>-1?k+P:-(g+P):0,z={x0:M,x1:M,y0:T,y1:T+g},O=function(Qe,Et,er){var Ut=l.tiling.pad,Ft=function(lr){return lr-Ut<=Et.x0},bt=function(lr){return lr+Ut>=Et.x1},yt=function(lr){return lr-Ut<=Et.y0},Yt=function(lr){return lr+Ut>=Et.y1};return Qe.x0===Et.x0&&Qe.x1===Et.x1&&Qe.y0===Et.y0&&Qe.y1===Et.y1?{x0:Qe.x0,x1:Qe.x1,y0:Qe.y0,y1:Qe.y1}:{x0:Ft(Qe.x0-Ut)?0:bt(Qe.x0-Ut)?er[0]:Qe.x0,x1:Ft(Qe.x1+Ut)?0:bt(Qe.x1+Ut)?er[0]:Qe.x1,y0:yt(Qe.y0-Ut)?0:Yt(Qe.y0-Ut)?er[1]:Qe.y0,y1:yt(Qe.y1+Ut)?0:Yt(Qe.y1+Ut)?er[1]:Qe.y1}},V=null,G={},Z={},H=null,N=function(Qe,Et){return Et?G[O2(Qe)]:Z[O2(Qe)]},j=function(Qe,Et,er,Ut){if(Et)return G[O2(f)]||z;var Ft=Z[l.level]||er;return E(Qe)?O(Qe,Ft,Ut):{}};s.hasMultipleRoots&&b&&C++,l._maxDepth=C,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-_/2+A.l+A.w*(L.x[1]+L.x[0])/2,oe=-k/2+A.t+A.h*(1-(L.y[1]+L.y[0])/2),_e=function(Qe){return re+Qe},Me=function(Qe){return oe+Qe},ke=Me(0),me=_e(0),ie=function(Qe){return me+Qe},Se=function(Qe){return ke+Qe};function Le(Qe,Et){return Qe+\",\"+Et}var Ae=ie(0),De=function(Qe){Qe.x=Math.max(Ae,Qe.x)},Pe=l.pathbar.edgeshape,ge=function(Qe){var Et=ie(Math.max(Math.min(Qe.x0,Qe.x0),0)),er=ie(Math.min(Math.max(Qe.x1,Qe.x1),M)),Ut=Se(Qe.y0),Ft=Se(Qe.y1),bt=g/2,yt={},Yt={};yt.x=Et,Yt.x=er,yt.y=Yt.y=(Ut+Ft)/2;var lr={x:Et,y:Ut},Tr={x:er,y:Ut},Rr={x:er,y:Ft},ei={x:Et,y:Ft};return Pe===\">\"?(lr.x-=bt,Tr.x-=bt,Rr.x-=bt,ei.x-=bt):Pe===\"/\"?(Rr.x-=bt,ei.x-=bt,yt.x-=bt/2,Yt.x-=bt/2):Pe===\"\\\\\"?(lr.x-=bt,Tr.x-=bt,yt.x-=bt/2,Yt.x-=bt/2):Pe===\"<\"&&(yt.x-=bt,Yt.x-=bt),De(lr),De(ei),De(yt),De(Tr),De(Rr),De(Yt),\"M\"+Le(lr.x,lr.y)+\"L\"+Le(Tr.x,Tr.y)+\"L\"+Le(Yt.x,Yt.y)+\"L\"+Le(Rr.x,Rr.y)+\"L\"+Le(ei.x,ei.y)+\"L\"+Le(yt.x,yt.y)+\"Z\"},Fe=l[c?\"tiling\":\"marker\"].pad,ce=function(Qe){return l.textposition.indexOf(Qe)!==-1},Ze=ce(\"top\"),ct=ce(\"left\"),pt=ce(\"right\"),Wt=ce(\"bottom\"),st=function(Qe){var Et=_e(Qe.x0),er=_e(Qe.x1),Ut=Me(Qe.y0),Ft=Me(Qe.y1),bt=er-Et,yt=Ft-Ut;if(!bt||!yt)return\"\";var Yt=l.marker.cornerradius||0,lr=Math.min(Yt,bt/2,yt/2);lr&&Qe.data&&Qe.data.data&&Qe.data.data.label&&(Ze&&(lr=Math.min(lr,Fe.t)),ct&&(lr=Math.min(lr,Fe.l)),pt&&(lr=Math.min(lr,Fe.r)),Wt&&(lr=Math.min(lr,Fe.b)));var Tr=function(Rr,ei){return lr?\"a\"+Le(lr,lr)+\" 0 0 1 \"+Le(Rr,ei):\"\"};return\"M\"+Le(Et,Ut+lr)+Tr(lr,-lr)+\"L\"+Le(er-lr,Ut)+Tr(lr,lr)+\"L\"+Le(er,Ft-lr)+Tr(-lr,lr)+\"L\"+Le(Et+lr,Ft)+Tr(-lr,-lr)+\"Z\"},lt=function(Qe,Et){var er=Qe.x0,Ut=Qe.x1,Ft=Qe.y0,bt=Qe.y1,yt=Qe.textBB,Yt=Ze||Et.isHeader&&!Wt,lr=Yt?\"start\":Wt?\"end\":\"middle\",Tr=ce(\"right\"),Rr=ce(\"left\")||Et.onPathbar,ei=Rr?-1:Tr?1:0;if(Et.isHeader){if(er+=(c?Fe:Fe.l)-G6e,Ut-=(c?Fe:Fe.r)-G6e,er>=Ut){var Wr=(er+Ut)/2;er=Wr,Ut=Wr}var Ur;Wt?(Ur=bt-(c?Fe:Fe.b),Ft<Ur&&Ur<bt&&(Ft=Ur)):(Ur=Ft+(c?Fe:Fe.t),Ft<Ur&&Ur<bt&&(bt=Ur))}var dt=sLt(er,Ut,Ft,bt,yt,{isHorizontal:!1,constrained:!0,angle:0,anchor:lr,leftToRight:ei});return dt.fontSize=Et.fontSize,dt.targetX=_e(dt.targetX),dt.targetY=Me(dt.targetY),isNaN(dt.targetX)||isNaN(dt.targetY)?{}:(er!==Ut&&Ft!==bt&&JW(l.type,dt,o),{scale:dt.scale,rotate:dt.rotate,textX:dt.textX,textY:dt.textY,anchorX:dt.anchorX,anchorY:dt.anchorY,targetX:dt.targetX,targetY:dt.targetY})},Gt=function(Qe,Et){for(var er,Ut=0,Ft=Qe;!er&&Ut<C;)Ut++,Ft=Ft.parent,Ft?er=N(Ft,Et):Ut=C;return er||{}},Nt=function(Qe,Et,er,Ut){var Ft=N(Qe,Et),bt;if(Et)bt=z;else{var yt=N(h,Et);yt?bt=O(Qe,yt,Ut):bt={}}return KW(Ft,bt)},$t=function(Qe,Et,er,Ut,Ft){var bt=N(Qe,Et),yt;if(bt)yt=bt;else if(Et)yt=z;else if(V)if(Qe.parent){var Yt=H||er;Yt&&!Et?yt=O(Qe,Yt,Ut):(yt={},jE.extendFlat(yt,Gt(Qe,Et)))}else yt=jE.extendFlat({},Qe),c&&(Ft.orientation===\"h\"?Ft.flipX?yt.x0=Qe.x1:yt.x1=0:Ft.flipY?yt.y0=Qe.y1:yt.y1=0);else yt={};return KW(yt,{x0:Qe.x0,x1:Qe.x1,y0:Qe.y0,y1:Qe.y1})},sr=function(Qe,Et,er,Ut){var Ft=N(Qe,Et),bt={},yt=j(Qe,Et,er,Ut);jE.extendFlat(bt,{transform:lt({x0:yt.x0,x1:yt.x1,y0:yt.y0,y1:yt.y1,textBB:Qe.textBB,_text:Qe._text},{isHeader:Z_.isHeader(Qe,l)})}),Ft?bt=Ft:Qe.parent&&jE.extendFlat(bt,Gt(Qe,Et));var Yt=Qe.transform;return Qe.x0!==Qe.x1&&Qe.y0!==Qe.y1&&JW(l.type,Yt,o),KW(bt,{transform:{scale:Yt.scale,rotate:Yt.rotate,textX:Yt.textX,textY:Yt.textY,anchorX:Yt.anchorX,anchorY:Yt.anchorY,targetX:Yt.targetX,targetY:Yt.targetY}})},wr=function(Qe,Et,er,Ut,Ft){var bt=Ut[0],yt=Ut[1];p?Qe.exit().transition().each(function(){var Yt=V6e.select(this),lr=Yt.select(\"path.surface\");lr.transition().attrTween(\"d\",function(Rr){var ei=Nt(Rr,Et,er,[bt,yt]);return function(Wr){return Ft(ei(Wr))}});var Tr=Yt.select(\"g.slicetext\");Tr.attr(\"opacity\",0)}).remove():Qe.exit().remove()},ur=function(Qe){var Et=Qe.transform;return Qe.x0!==Qe.x1&&Qe.y0!==Qe.y1&&JW(l.type,Et,o),jE.getTextTransform({textX:Et.textX,textY:Et.textY,anchorX:Et.anchorX,anchorY:Et.anchorY,targetX:Et.targetX,targetY:Et.targetY,scale:Et.scale,rotate:Et.rotate})};p&&(v.each(function(Qe){G[O2(Qe)]={x0:Qe.x0,x1:Qe.x1,y0:Qe.y0,y1:Qe.y1},Qe.transform&&(G[O2(Qe)].transform={textX:Qe.transform.textX,textY:Qe.transform.textY,anchorX:Qe.transform.anchorX,anchorY:Qe.transform.anchorY,targetX:Qe.transform.targetX,targetY:Qe.transform.targetY,scale:Qe.transform.scale,rotate:Qe.transform.rotate})}),x.each(function(Qe){Z[O2(Qe)]={x0:Qe.x0,x1:Qe.x1,y0:Qe.y0,y1:Qe.y1},Qe.transform&&(Z[O2(Qe)].transform={textX:Qe.transform.textX,textY:Qe.transform.textY,anchorX:Qe.transform.anchorX,anchorY:Qe.transform.anchorY,targetX:Qe.transform.targetX,targetY:Qe.transform.targetY,scale:Qe.transform.scale,rotate:Qe.transform.rotate}),!V&&Z_.isEntry(Qe)&&(V=Qe)})),H=a(t,r,h,x,{width:_,height:k,viewX:_e,viewY:Me,pathSlice:st,toMoveInsideSlice:lt,prevEntry:V,makeUpdateSliceInterpolator:$t,makeUpdateTextInterpolator:sr,handleSlicesExit:wr,hasTransition:p,strTransform:ur}),l.pathbar.visible?cLt(t,r,h,v,{barDifY:T,width:M,height:g,viewX:ie,viewY:Se,pathSlice:ge,toMoveInsideSlice:lt,makeUpdateSliceInterpolator:$t,makeUpdateTextInterpolator:sr,handleSlicesExit:wr,hasTransition:p,strTransform:ur}):v.remove()}});var $W=ye((gpr,X6e)=>{\"use strict\";var fLt=Oa(),hLt=Ky(),dLt=bv(),vLt=dLt.clearMinTextSize,pLt=N0().resizeText,W6e=j6e();X6e.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l[\"_\"+o+\"layer\"],c,f,h=!n;if(vLt(o,l),c=u.selectAll(\"g.trace.\"+o).data(r,function(v){return v[0].trace.uid}),c.enter().append(\"g\").classed(\"trace\",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&hLt.hasTransition(n)){i&&(f=i());var d=fLt.transition().duration(n.duration).ease(n.easing).each(\"end\",function(){f&&f()}).each(\"interrupt\",function(){f&&f()});d.each(function(){u.selectAll(\"g.trace\").each(function(v){W6e(t,v,this,n,s)})})}else c.each(function(v){W6e(t,v,this,n,s)}),l.uniformtext.mode&&pLt(t,u.selectAll(\".trace\"),o);h&&c.exit().remove()}});var $6e=ye((mpr,J6e)=>{\"use strict\";var Z6e=Oa(),GD=Dr(),Y6e=So(),gLt=ru(),mLt=WW(),K6e=UD().styleOne,QW=F2(),Y_=Ky(),yLt=GE(),_Lt=BD().formatSliceLabel,eX=!1;J6e.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,C={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,k=_.textposition.indexOf(\"left\")!==-1,M=_.textposition.indexOf(\"right\")!==-1,g=_.textposition.indexOf(\"bottom\")!==-1,P=!g&&!_.marker.pad.t||g&&!_.marker.pad.b,T=mLt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf(\"x\")>-1,flipY:_.tiling.flip.indexOf(\"y\")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),z=T.descendants(),O=1/0,V=-1/0;z.forEach(function(j){var re=j.depth;re>=_._maxDepth?(j.x0=j.x1=(j.x0+j.x1)/2,j.y0=j.y1=(j.y0+j.y1)/2):(O=Math.min(O,re),V=Math.max(V,re))}),i=i.data(z,Y_.getPtId),_._maxVisibleLayers=isFinite(V)?V-O+1:0,i.enter().append(\"g\").classed(\"slice\",!0),v(i,eX,C,[o,s],c),i.order();var G=null;if(d&&p){var Z=Y_.getPtId(p);i.each(function(j){G===null&&Y_.getPtId(j)===Z&&(G={x0:j.x0,x1:j.x1,y0:j.y0,y1:j.y1})})}var H=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each(\"end\",function(){var j=Z6e.select(this);Y_.setSliceCursor(j,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(j){var re=Y_.isHeader(j,_);j._x0=l(j.x0),j._x1=l(j.x1),j._y0=u(j.y0),j._y1=u(j.y1),j._hoverX=l(j.x1-_.marker.pad.r),j._hoverY=u(g?j.y1-_.marker.pad.b/2:j.y0+_.marker.pad.t/2);var oe=Z6e.select(this),_e=GD.ensureSingle(oe,\"path\",\"surface\",function(Le){Le.style(\"pointer-events\",E?\"none\":\"all\")});d?_e.transition().attrTween(\"d\",function(Le){var Ae=x(Le,eX,H(),[o,s]);return function(De){return c(Ae(De))}}):_e.attr(\"d\",c),oe.call(yLt,n,t,r,{styleOne:K6e,eventDataKeys:QW.eventDataKeys,transitionTime:QW.CLICK_TRANSITION_TIME,transitionEasing:QW.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(K6e,j,_,t,{hovered:!1}),j.x0===j.x1||j.y0===j.y1?j._text=\"\":re?j._text=P?\"\":Y_.getPtLabel(j)||\"\":j._text=_Lt(j,n,_,r,A)||\"\";var Me=GD.ensureSingle(oe,\"g\",\"slicetext\"),ke=GD.ensureSingle(Me,\"text\",\"\",function(Le){Le.attr(\"data-notex\",1)}),me=GD.ensureUniformFontSize(t,Y_.determineTextFont(_,j,A.font)),ie=j._text||\" \",Se=re&&ie.indexOf(\"<br>\")===-1;ke.text(ie).classed(\"slicetext\",!0).attr(\"text-anchor\",M?\"end\":k||Se?\"start\":\"middle\").call(Y6e.font,me).call(gLt.convertToTspans,t),j.textBB=Y6e.bBox(ke.node()),j.transform=f(j,{fontSize:me.size,isHeader:re}),j.transform.fontSize=me.size,d?ke.transition().attrTween(\"transform\",function(Le){var Ae=b(Le,eX,H(),[o,s]);return function(De){return h(Ae(De))}}):ke.attr(\"transform\",h(j))}),G}});var eLe=ye((ypr,Q6e)=>{\"use strict\";var xLt=$W(),bLt=$6e();Q6e.exports=function(t,r,n,i){return xLt(t,r,n,i,{type:\"treemap\",drawDescendants:bLt})}});var rLe=ye((_pr,tLe)=>{\"use strict\";tLe.exports={moduleType:\"trace\",name:\"treemap\",basePlotModule:_6e(),categories:[],animatable:!0,attributes:ND(),layoutAttributes:VW(),supplyDefaults:E6e(),supplyLayoutDefaults:k6e(),calc:HW().calc,crossTraceCalc:HW().crossTraceCalc,plot:eLe(),style:UD().style,colorbar:$d(),meta:{}}});var nLe=ye((xpr,iLe)=>{\"use strict\";iLe.exports=rLe()});var oLe=ye(FA=>{\"use strict\";var aLe=Mc();FA.name=\"icicle\";FA.plot=function(e,t,r,n){aLe.plotBasePlot(FA.name,e,t,r,n)};FA.clean=function(e,t,r,n){aLe.cleanBasePlot(FA.name,e,t,r,n)}});var tX=ye((wpr,lLe)=>{\"use strict\";var wLt=Qo().hovertemplateAttrs,TLt=Qo().texttemplateAttrs,ALt=Tu(),SLt=kc().attributes,WE=A2(),o0=kE(),HD=ND(),sLe=F2(),MLt=Ao().extendFlat,ELt=Pd().pattern;lLe.exports={labels:o0.labels,parents:o0.parents,values:o0.values,branchvalues:o0.branchvalues,count:o0.count,level:o0.level,maxdepth:o0.maxdepth,tiling:{orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"plot\"},flip:HD.tiling.flip,pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},marker:MLt({colors:o0.marker.colors,line:o0.marker.line,pattern:ELt,editType:\"calc\"},ALt(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:o0.leaf,pathbar:HD.pathbar,text:WE.text,textinfo:o0.textinfo,texttemplate:TLt({editType:\"plot\"},{keys:sLe.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:WE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:wLt({},{keys:sLe.eventDataKeys}),textfont:WE.textfont,insidetextfont:WE.insidetextfont,outsidetextfont:HD.outsidetextfont,textposition:HD.textposition,sort:WE.sort,root:o0.root,domain:SLt({name:\"icicle\",trace:!0,editType:\"calc\"})}});var rX=ye((Tpr,uLe)=>{\"use strict\";uLe.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var dLe=ye((Apr,hLe)=>{\"use strict\";var cLe=Dr(),CLt=tX(),kLt=Ca(),LLt=kc().defaults,PLt=r0().handleText,ILt=Qb().TEXTPAD,RLt=S2().handleMarkerDefaults,fLe=tc(),DLt=fLe.hasColorscale,FLt=fLe.handleDefaults;hLe.exports=function(t,r,n,i){function a(d,v){return cLe.coerce(t,r,CLt,d,v)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\"),a(\"tiling.orientation\"),a(\"tiling.flip\"),a(\"tiling.pad\");var u=a(\"text\");a(\"texttemplate\"),r.texttemplate||a(\"textinfo\",cLe.isArrayOrTypedArray(u)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\");var c=a(\"pathbar.visible\"),f=\"auto\";PLt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"textposition\"),RLt(t,r,i,a);var h=r._hasColorscale=DLt(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;h&&FLt(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),a(\"leaf.opacity\",h?1:.7),r._hovered={marker:{line:{width:2,color:kLt.contrast(i.paper_bgcolor)}}},c&&(a(\"pathbar.thickness\",r.pathbar.textfont.size+2*ILt),a(\"pathbar.side\"),a(\"pathbar.edgeshape\")),a(\"sort\"),a(\"root.color\"),LLt(r,i,a),r._length=null}});var pLe=ye((Spr,vLe)=>{\"use strict\";var zLt=Dr(),OLt=rX();vLe.exports=function(t,r){function n(i,a){return zLt.coerce(t,r,OLt,i,a)}n(\"iciclecolorway\",r.colorway),n(\"extendiciclecolors\")}});var nX=ye(iX=>{\"use strict\";var gLe=IE();iX.calc=function(e,t){return gLe.calc(e,t)};iX.crossTraceCalc=function(e){return gLe._runCrossTraceCalc(\"icicle\",e)}});var yLe=ye((Epr,mLe)=>{\"use strict\";var qLt=LE(),BLt=jW();mLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation===\"h\",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=qLt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&BLt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var aX=ye((Cpr,TLe)=>{\"use strict\";var _Le=Oa(),xLe=Ca(),bLe=Dr(),NLt=bv().resizeText,ULt=OD();function VLt(e){var t=e._fullLayout._iciclelayer.selectAll(\".trace\");NLt(e,t,\"icicle\"),t.each(function(r){var n=_Le.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){_Le.select(this).call(wLe,o,a,e)})})}function wLe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=bLe.castOption(r,o,\"marker.line.color\")||xLe.defaultLine,l=bLe.castOption(r,o,\"marker.line.width\")||0;e.call(ULt,t,r,n).style(\"stroke-width\",l).call(xLe.stroke,s).style(\"opacity\",a?r.leaf.opacity:null)}TLe.exports={style:VLt,styleOne:wLe}});var CLe=ye((kpr,ELe)=>{\"use strict\";var ALe=Oa(),jD=Dr(),SLe=So(),GLt=ru(),HLt=yLe(),MLe=aX().styleOne,oX=F2(),zA=Ky(),jLt=GE(),WLt=BD().formatSliceLabel,sX=!1;ELe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,C={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,k=_.textposition.indexOf(\"left\")!==-1,M=_.textposition.indexOf(\"right\")!==-1,g=_.textposition.indexOf(\"bottom\")!==-1,P=HLt(n,[o,s],{flipX:_.tiling.flip.indexOf(\"x\")>-1,flipY:_.tiling.flip.indexOf(\"y\")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=P.descendants(),z=1/0,O=-1/0;T.forEach(function(N){var j=N.depth;j>=_._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,j),O=Math.max(O,j))}),i=i.data(T,zA.getPtId),_._maxVisibleLayers=isFinite(O)?O-z+1:0,i.enter().append(\"g\").classed(\"slice\",!0),v(i,sX,C,[o,s],c),i.order();var V=null;if(d&&p){var G=zA.getPtId(p);i.each(function(N){V===null&&zA.getPtId(N)===G&&(V={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return V||{x0:0,x1:o,y0:0,y1:s}},H=i;return d&&(H=H.transition().each(\"end\",function(){var N=ALe.select(this);zA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-_.tiling.pad),N._hoverY=u(g?N.y1-_.tiling.pad/2:N.y0+_.tiling.pad/2);var j=ALe.select(this),re=jD.ensureSingle(j,\"path\",\"surface\",function(ke){ke.style(\"pointer-events\",E?\"none\":\"all\")});d?re.transition().attrTween(\"d\",function(ke){var me=x(ke,sX,Z(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf(\"x\")>-1,flipY:_.tiling.flip.indexOf(\"y\")>-1});return function(ie){return c(me(ie))}}):re.attr(\"d\",c),j.call(jLt,n,t,r,{styleOne:MLe,eventDataKeys:oX.eventDataKeys,transitionTime:oX.CLICK_TRANSITION_TIME,transitionEasing:oX.CLICK_TRANSITION_EASING}).call(zA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(MLe,N,_,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text=\"\":N._text=WLt(N,n,_,r,A)||\"\";var oe=jD.ensureSingle(j,\"g\",\"slicetext\"),_e=jD.ensureSingle(oe,\"text\",\"\",function(ke){ke.attr(\"data-notex\",1)}),Me=jD.ensureUniformFontSize(t,zA.determineTextFont(_,N,A.font));_e.text(N._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",M?\"end\":k?\"start\":\"middle\").call(SLe.font,Me).call(GLt.convertToTspans,t),N.textBB=SLe.bBox(_e.node()),N.transform=f(N,{fontSize:Me.size}),N.transform.fontSize=Me.size,d?_e.transition().attrTween(\"transform\",function(ke){var me=b(ke,sX,Z(),[o,s]);return function(ie){return h(me(ie))}}):_e.attr(\"transform\",h(N))}),V}});var LLe=ye((Lpr,kLe)=>{\"use strict\";var XLt=$W(),ZLt=CLe();kLe.exports=function(t,r,n,i){return XLt(t,r,n,i,{type:\"icicle\",drawDescendants:ZLt})}});var ILe=ye((Ppr,PLe)=>{\"use strict\";PLe.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:oLe(),categories:[],animatable:!0,attributes:tX(),layoutAttributes:rX(),supplyDefaults:dLe(),supplyLayoutDefaults:pLe(),calc:nX().calc,crossTraceCalc:nX().crossTraceCalc,plot:LLe(),style:aX().style,colorbar:$d(),meta:{}}});var DLe=ye((Ipr,RLe)=>{\"use strict\";RLe.exports=ILe()});var zLe=ye(OA=>{\"use strict\";var FLe=Mc();OA.name=\"funnelarea\";OA.plot=function(e,t,r,n){FLe.plotBasePlot(OA.name,e,t,r,n)};OA.clean=function(e,t,r,n){FLe.cleanBasePlot(OA.name,e,t,r,n)}});var lX=ye((Dpr,OLe)=>{\"use strict\";var iv=A2(),YLt=Gl(),KLt=kc().attributes,JLt=Qo().hovertemplateAttrs,$Lt=Qo().texttemplateAttrs,q2=Ao().extendFlat;OLe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:q2({},iv.marker.line.color,{dflt:null}),width:q2({},iv.marker.line.width,{dflt:1}),editType:\"calc\"},pattern:iv.marker.pattern,editType:\"calc\"},text:iv.text,hovertext:iv.hovertext,scalegroup:q2({},iv.scalegroup,{}),textinfo:q2({},iv.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:$Lt({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:q2({},YLt.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:JLt({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:q2({},iv.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:q2({},iv.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:KLt({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}});var uX=ye((Fpr,qLe)=>{\"use strict\";var QLt=hD().hiddenlabels;qLe.exports={hiddenlabels:QLt,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var ULe=ye((zpr,NLe)=>{\"use strict\";var BLe=Dr(),ePt=lX(),tPt=kc().defaults,rPt=r0().handleText,iPt=S2().handleLabelsAndValues,nPt=S2().handleMarkerDefaults;NLe.exports=function(t,r,n,i){function a(x,b){return BLe.coerce(t,r,ePt,x,b)}var o=a(\"labels\"),s=a(\"values\"),l=iPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a(\"label0\"),a(\"dlabel\")),!u){r.visible=!1;return}r._length=u,nPt(t,r,i,a),a(\"scalegroup\");var c=a(\"text\"),f=a(\"texttemplate\"),h;if(f||(h=a(\"textinfo\",Array.isArray(c)?\"text+percent\":\"percent\")),a(\"hovertext\"),a(\"hovertemplate\"),f||h&&h!==\"none\"){var d=a(\"textposition\");rPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h===\"none\"&&a(\"textposition\",\"none\");tPt(r,i,a);var v=a(\"title.text\");v&&(a(\"title.position\"),BLe.coerceFont(a,\"title.font\",i.font)),a(\"aspectratio\"),a(\"baseratio\")}});var GLe=ye((Opr,VLe)=>{\"use strict\";var aPt=Dr(),oPt=uX();VLe.exports=function(t,r){function n(i,a){return aPt.coerce(t,r,oPt,i,a)}n(\"hiddenlabels\"),n(\"funnelareacolorway\",r.colorway),n(\"extendfunnelareacolors\")}});var cX=ye((qpr,jLe)=>{\"use strict\";var HLe=_A();function sPt(e,t){return HLe.calc(e,t)}function lPt(e){HLe.crossTraceCalc(e,{type:\"funnelarea\"})}jLe.exports={calc:sPt,crossTraceCalc:lPt}});var KLe=ye((Bpr,YLe)=>{\"use strict\";var B2=Oa(),fX=So(),K_=Dr(),uPt=K_.strScale,WLe=K_.strTranslate,XLe=ru(),cPt=i2(),fPt=cPt.toMoveInsideBar,ZLe=bv(),hPt=ZLe.recordMinTextSize,dPt=ZLe.clearMinTextSize,vPt=l_(),qA=gD(),pPt=qA.attachFxHandlers,gPt=qA.determineInsideTextFont,mPt=qA.layoutAreas,yPt=qA.prerenderTitles,_Pt=qA.positionTitleOutside,xPt=qA.formatSliceLabel;YLe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;dPt(\"funnelarea\",i),yPt(r,t),mPt(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,\"trace\").each(function(a){var o=B2.select(this),s=a[0],l=s.trace;wPt(a),o.each(function(){var u=B2.select(this).selectAll(\"g.slice\").data(a);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){B2.select(this).selectAll(\"path,g\").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,x=B2.select(this),b=x.selectAll(\"path.surface\").data([f]);b.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":n?\"none\":\"all\"}),x.call(pPt,t,a);var p=\"M\"+(d+f.TR[0])+\",\"+(v+f.TR[1])+hX(f.TR,f.BR)+hX(f.BR,f.BL)+hX(f.BL,f.TL)+\"Z\";b.attr(\"d\",p),xPt(t,f,s);var C=vPt.castOption(l.textposition,f.pts),E=x.selectAll(\"g.slicetext\").data(f.text&&C!==\"none\"?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each(function(){var A=K_.ensureSingle(B2.select(this),\"text\",\"\",function(z){z.attr(\"data-notex\",1)}),L=K_.ensureUniformFontSize(t,gPt(l,f,i.font));A.text(f.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(fX.font,L).call(XLe.convertToTspans,t);var _=fX.bBox(A.node()),k,M,g,P=Math.min(f.BL[1],f.BR[1])+v,T=Math.max(f.TL[1],f.TR[1])+v;M=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,k=fPt(M,g,P,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"}),k.fontSize=L.size,hPt(l.type,k,i),a[h].transform=k,K_.setTransormAndDisplay(A,k)})});var c=B2.select(this).selectAll(\"g.titletext\").data(l.title.text?[0]:[]);c.enter().append(\"g\").classed(\"titletext\",!0),c.exit().remove(),c.each(function(){var f=K_.ensureSingle(B2.select(this),\"text\",\"\",function(v){v.attr(\"data-notex\",1)}),h=l.title.text;l._meta&&(h=K_.templateString(h,l._meta)),f.text(h).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(fX.font,l.title.font).call(XLe.convertToTspans,t);var d=_Pt(s,i._size);f.attr(\"transform\",WLe(d.x,d.y)+uPt(Math.min(1,d.scale))+WLe(d.tx,d.ty))})})})};function hX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return\"l\"+r+\",\"+n}function bPt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function wPt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var O=Math.sqrt(u);return{x:O,y:-O}}function f(){var O=c();return[O.x,O.y]}var h,d=[];d.push(f());var v,x;for(v=e.length-1;v>-1;v--)if(x=e[v],!x.hidden){var b=x.v/l;u+=b,d.push(f())}var p=1/0,C=-1/0;for(v=0;v<d.length;v++)h=d[v],p=Math.min(p,h[1]),C=Math.max(C,h[1]);for(v=0;v<d.length;v++)d[v][1]-=(C+p)/2;var E=d[d.length-1][0],A=t.r,L=(C-p)/2,_=A/E,k=A/L*n;for(t.r=k*L,v=0;v<d.length;v++)d[v][0]*=_,d[v][1]*=k;h=d[0];var M=[-h[0],h[1]],g=[h[0],h[1]],P=0;for(v=e.length-1;v>-1;v--)if(x=e[v],!x.hidden){P+=1;var T=d[P][0],z=d[P][1];x.TL=[-T,z],x.TR=[T,z],x.BL=M,x.BR=g,x.pxmid=bPt(x.TR,x.BR),M=x.TL,g=x.TR}}});var QLe=ye((Npr,$Le)=>{\"use strict\";var JLe=Oa(),TPt=F3(),APt=bv().resizeText;$Le.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(\".trace\");APt(t,r,\"funnelarea\"),r.each(function(n){var i=n[0],a=i.trace,o=JLe.select(this);o.style({opacity:a.opacity}),o.selectAll(\"path.surface\").each(function(s){JLe.select(this).call(TPt,s,a,t)})})}});var tPe=ye((Upr,ePe)=>{\"use strict\";ePe.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:zLe(),categories:[\"pie-like\",\"funnelarea\",\"showLegend\"],attributes:lX(),layoutAttributes:uX(),supplyDefaults:ULe(),supplyLayoutDefaults:GLe(),calc:cX().calc,crossTraceCalc:cX().crossTraceCalc,plot:KLe(),style:QLe(),styleOne:F3(),meta:{}}});var iPe=ye((Vpr,rPe)=>{\"use strict\";rPe.exports=tPe()});var Od=ye((Gpr,nPe)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){\"use strict\";var s;function l(Ie,xe){if(!(Ie instanceof xe))throw new TypeError(\"Cannot call a class as a function\")}function u(Ie,xe){for(var Ce=0;Ce<xe.length;Ce++){var vt=xe[Ce];vt.enumerable=vt.enumerable||!1,vt.configurable=!0,\"value\"in vt&&(vt.writable=!0),Object.defineProperty(Ie,f(vt.key),vt)}}function c(Ie,xe,Ce){return xe&&u(Ie.prototype,xe),Ce&&u(Ie,Ce),Object.defineProperty(Ie,\"prototype\",{writable:!1}),Ie}function f(Ie){var xe=h(Ie,\"string\");return A(xe)==\"symbol\"?xe:xe+\"\"}function h(Ie,xe){if(A(Ie)!=\"object\"||!Ie)return Ie;var Ce=Ie[Symbol.toPrimitive];if(Ce!==void 0){var vt=Ce.call(Ie,xe||\"default\");if(A(vt)!=\"object\")return vt;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(xe===\"string\"?String:Number)(Ie)}function d(Ie,xe,Ce){return xe=p(xe),v(Ie,b()?Reflect.construct(xe,Ce||[],p(Ie).constructor):xe.apply(Ie,Ce))}function v(Ie,xe){if(xe&&(A(xe)==\"object\"||typeof xe==\"function\"))return xe;if(xe!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return x(Ie)}function x(Ie){if(Ie===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return Ie}function b(){try{var Ie=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(xe){}return(b=function(){return!!Ie})()}function p(Ie){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(xe){return xe.__proto__||Object.getPrototypeOf(xe)},p(Ie)}function C(Ie,xe){if(typeof xe!=\"function\"&&xe!==null)throw new TypeError(\"Super expression must either be null or a function\");Ie.prototype=Object.create(xe&&xe.prototype,{constructor:{value:Ie,writable:!0,configurable:!0}}),Object.defineProperty(Ie,\"prototype\",{writable:!1}),xe&&E(Ie,xe)}function E(Ie,xe){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ce,vt){return Ce.__proto__=vt,Ce},E(Ie,xe)}function A(Ie){\"@babel/helpers - typeof\";return A=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(xe){return typeof xe}:function(xe){return xe&&typeof Symbol==\"function\"&&xe.constructor===Symbol&&xe!==Symbol.prototype?\"symbol\":typeof xe},A(Ie)}var L=o(7507),_=o(3778),k=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;a.hp=T,s=_e,a.IS=50;var M=2147483647;s=M,T.TYPED_ARRAY_SUPPORT=g(),!T.TYPED_ARRAY_SUPPORT&&typeof console!=\"undefined\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function g(){try{var Ie=new Uint8Array(1),xe={foo:function(){return 42}};return Object.setPrototypeOf(xe,Uint8Array.prototype),Object.setPrototypeOf(Ie,xe),Ie.foo()===42}catch(Ce){return!1}}Object.defineProperty(T.prototype,\"parent\",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,\"offset\",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function P(Ie){if(Ie>M)throw new RangeError('The value \"'+Ie+'\" is invalid for option \"size\"');var xe=new Uint8Array(Ie);return Object.setPrototypeOf(xe,T.prototype),xe}function T(Ie,xe,Ce){if(typeof Ie==\"number\"){if(typeof xe==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return G(Ie)}return z(Ie,xe,Ce)}T.poolSize=8192;function z(Ie,xe,Ce){if(typeof Ie==\"string\")return Z(Ie,xe);if(ArrayBuffer.isView(Ie))return N(Ie);if(Ie==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+A(Ie));if(Ge(Ie,ArrayBuffer)||Ie&&Ge(Ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer!=\"undefined\"&&(Ge(Ie,SharedArrayBuffer)||Ie&&Ge(Ie.buffer,SharedArrayBuffer)))return j(Ie,xe,Ce);if(typeof Ie==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var vt=Ie.valueOf&&Ie.valueOf();if(vt!=null&&vt!==Ie)return T.from(vt,xe,Ce);var nr=re(Ie);if(nr)return nr;if(typeof Symbol!=\"undefined\"&&Symbol.toPrimitive!=null&&typeof Ie[Symbol.toPrimitive]==\"function\")return T.from(Ie[Symbol.toPrimitive](\"string\"),xe,Ce);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+A(Ie))}T.from=function(Ie,xe,Ce){return z(Ie,xe,Ce)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function O(Ie){if(typeof Ie!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(Ie<0)throw new RangeError('The value \"'+Ie+'\" is invalid for option \"size\"')}function V(Ie,xe,Ce){return O(Ie),Ie<=0?P(Ie):xe!==void 0?typeof Ce==\"string\"?P(Ie).fill(xe,Ce):P(Ie).fill(xe):P(Ie)}T.alloc=function(Ie,xe,Ce){return V(Ie,xe,Ce)};function G(Ie){return O(Ie),P(Ie<0?0:oe(Ie)|0)}T.allocUnsafe=function(Ie){return G(Ie)},T.allocUnsafeSlow=function(Ie){return G(Ie)};function Z(Ie,xe){if((typeof xe!=\"string\"||xe===\"\")&&(xe=\"utf8\"),!T.isEncoding(xe))throw new TypeError(\"Unknown encoding: \"+xe);var Ce=Me(Ie,xe)|0,vt=P(Ce),nr=vt.write(Ie,xe);return nr!==Ce&&(vt=vt.slice(0,nr)),vt}function H(Ie){for(var xe=Ie.length<0?0:oe(Ie.length)|0,Ce=P(xe),vt=0;vt<xe;vt+=1)Ce[vt]=Ie[vt]&255;return Ce}function N(Ie){if(Ge(Ie,Uint8Array)){var xe=new Uint8Array(Ie);return j(xe.buffer,xe.byteOffset,xe.byteLength)}return H(Ie)}function j(Ie,xe,Ce){if(xe<0||Ie.byteLength<xe)throw new RangeError('\"offset\" is outside of buffer bounds');if(Ie.byteLength<xe+(Ce||0))throw new RangeError('\"length\" is outside of buffer bounds');var vt;return xe===void 0&&Ce===void 0?vt=new Uint8Array(Ie):Ce===void 0?vt=new Uint8Array(Ie,xe):vt=new Uint8Array(Ie,xe,Ce),Object.setPrototypeOf(vt,T.prototype),vt}function re(Ie){if(T.isBuffer(Ie)){var xe=oe(Ie.length)|0,Ce=P(xe);return Ce.length===0||Ie.copy(Ce,0,0,xe),Ce}if(Ie.length!==void 0)return typeof Ie.length!=\"number\"||Je(Ie.length)?P(0):H(Ie);if(Ie.type===\"Buffer\"&&Array.isArray(Ie.data))return H(Ie.data)}function oe(Ie){if(Ie>=M)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+M.toString(16)+\" bytes\");return Ie|0}function _e(Ie){return+Ie!=Ie&&(Ie=0),T.alloc(+Ie)}T.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==T.prototype},T.compare=function(xe,Ce){if(Ge(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),Ge(Ce,Uint8Array)&&(Ce=T.from(Ce,Ce.offset,Ce.byteLength)),!T.isBuffer(xe)||!T.isBuffer(Ce))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(xe===Ce)return 0;for(var vt=xe.length,nr=Ce.length,ir=0,pr=Math.min(vt,nr);ir<pr;++ir)if(xe[ir]!==Ce[ir]){vt=xe[ir],nr=Ce[ir];break}return vt<nr?-1:nr<vt?1:0},T.isEncoding=function(xe){switch(String(xe).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},T.concat=function(xe,Ce){if(!Array.isArray(xe))throw new TypeError('\"list\" argument must be an Array of Buffers');if(xe.length===0)return T.alloc(0);var vt;if(Ce===void 0)for(Ce=0,vt=0;vt<xe.length;++vt)Ce+=xe[vt].length;var nr=T.allocUnsafe(Ce),ir=0;for(vt=0;vt<xe.length;++vt){var pr=xe[vt];if(Ge(pr,Uint8Array))ir+pr.length>nr.length?(T.isBuffer(pr)||(pr=T.from(pr)),pr.copy(nr,ir)):Uint8Array.prototype.set.call(nr,pr,ir);else if(T.isBuffer(pr))pr.copy(nr,ir);else throw new TypeError('\"list\" argument must be an Array of Buffers');ir+=pr.length}return nr};function Me(Ie,xe){if(T.isBuffer(Ie))return Ie.length;if(ArrayBuffer.isView(Ie)||Ge(Ie,ArrayBuffer))return Ie.byteLength;if(typeof Ie!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(Ie));var Ce=Ie.length,vt=arguments.length>2&&arguments[2]===!0;if(!vt&&Ce===0)return 0;for(var nr=!1;;)switch(xe){case\"ascii\":case\"latin1\":case\"binary\":return Ce;case\"utf8\":case\"utf-8\":return Rr(Ie).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Ce*2;case\"hex\":return Ce>>>1;case\"base64\":return Ur(Ie).length;default:if(nr)return vt?-1:Rr(Ie).length;xe=(\"\"+xe).toLowerCase(),nr=!0}}T.byteLength=Me;function ke(Ie,xe,Ce){var vt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((Ce===void 0||Ce>this.length)&&(Ce=this.length),Ce<=0)||(Ce>>>=0,xe>>>=0,Ce<=xe))return\"\";for(Ie||(Ie=\"utf8\");;)switch(Ie){case\"hex\":return st(this,xe,Ce);case\"utf8\":case\"utf-8\":return ce(this,xe,Ce);case\"ascii\":return pt(this,xe,Ce);case\"latin1\":case\"binary\":return Wt(this,xe,Ce);case\"base64\":return Fe(this,xe,Ce);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return lt(this,xe,Ce);default:if(vt)throw new TypeError(\"Unknown encoding: \"+Ie);Ie=(Ie+\"\").toLowerCase(),vt=!0}}T.prototype._isBuffer=!0;function me(Ie,xe,Ce){var vt=Ie[xe];Ie[xe]=Ie[Ce],Ie[Ce]=vt}T.prototype.swap16=function(){var xe=this.length;if(xe%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var Ce=0;Ce<xe;Ce+=2)me(this,Ce,Ce+1);return this},T.prototype.swap32=function(){var xe=this.length;if(xe%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var Ce=0;Ce<xe;Ce+=4)me(this,Ce,Ce+3),me(this,Ce+1,Ce+2);return this},T.prototype.swap64=function(){var xe=this.length;if(xe%8!==0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var Ce=0;Ce<xe;Ce+=8)me(this,Ce,Ce+7),me(this,Ce+1,Ce+6),me(this,Ce+2,Ce+5),me(this,Ce+3,Ce+4);return this},T.prototype.toString=function(){var xe=this.length;return xe===0?\"\":arguments.length===0?ce(this,0,xe):ke.apply(this,arguments)},T.prototype.toLocaleString=T.prototype.toString,T.prototype.equals=function(xe){if(!T.isBuffer(xe))throw new TypeError(\"Argument must be a Buffer\");return this===xe?!0:T.compare(this,xe)===0},T.prototype.inspect=function(){var xe=\"\",Ce=a.IS;return xe=this.toString(\"hex\",0,Ce).replace(/(.{2})/g,\"$1 \").trim(),this.length>Ce&&(xe+=\" ... \"),\"<Buffer \"+xe+\">\"},k&&(T.prototype[k]=T.prototype.inspect),T.prototype.compare=function(xe,Ce,vt,nr,ir){if(Ge(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),!T.isBuffer(xe))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+A(xe));if(Ce===void 0&&(Ce=0),vt===void 0&&(vt=xe?xe.length:0),nr===void 0&&(nr=0),ir===void 0&&(ir=this.length),Ce<0||vt>xe.length||nr<0||ir>this.length)throw new RangeError(\"out of range index\");if(nr>=ir&&Ce>=vt)return 0;if(nr>=ir)return-1;if(Ce>=vt)return 1;if(Ce>>>=0,vt>>>=0,nr>>>=0,ir>>>=0,this===xe)return 0;for(var pr=ir-nr,oi=vt-Ce,di=Math.min(pr,oi),Jr=this.slice(nr,ir),fi=xe.slice(Ce,vt),Hi=0;Hi<di;++Hi)if(Jr[Hi]!==fi[Hi]){pr=Jr[Hi],oi=fi[Hi];break}return pr<oi?-1:oi<pr?1:0};function ie(Ie,xe,Ce,vt,nr){if(Ie.length===0)return-1;if(typeof Ce==\"string\"?(vt=Ce,Ce=0):Ce>2147483647?Ce=2147483647:Ce<-2147483648&&(Ce=-2147483648),Ce=+Ce,Je(Ce)&&(Ce=nr?0:Ie.length-1),Ce<0&&(Ce=Ie.length+Ce),Ce>=Ie.length){if(nr)return-1;Ce=Ie.length-1}else if(Ce<0)if(nr)Ce=0;else return-1;if(typeof xe==\"string\"&&(xe=T.from(xe,vt)),T.isBuffer(xe))return xe.length===0?-1:Se(Ie,xe,Ce,vt,nr);if(typeof xe==\"number\")return xe=xe&255,typeof Uint8Array.prototype.indexOf==\"function\"?nr?Uint8Array.prototype.indexOf.call(Ie,xe,Ce):Uint8Array.prototype.lastIndexOf.call(Ie,xe,Ce):Se(Ie,[xe],Ce,vt,nr);throw new TypeError(\"val must be string, number or Buffer\")}function Se(Ie,xe,Ce,vt,nr){var ir=1,pr=Ie.length,oi=xe.length;if(vt!==void 0&&(vt=String(vt).toLowerCase(),vt===\"ucs2\"||vt===\"ucs-2\"||vt===\"utf16le\"||vt===\"utf-16le\")){if(Ie.length<2||xe.length<2)return-1;ir=2,pr/=2,oi/=2,Ce/=2}function di(wn,pn){return ir===1?wn[pn]:wn.readUInt16BE(pn*ir)}var Jr;if(nr){var fi=-1;for(Jr=Ce;Jr<pr;Jr++)if(di(Ie,Jr)===di(xe,fi===-1?0:Jr-fi)){if(fi===-1&&(fi=Jr),Jr-fi+1===oi)return fi*ir}else fi!==-1&&(Jr-=Jr-fi),fi=-1}else for(Ce+oi>pr&&(Ce=pr-oi),Jr=Ce;Jr>=0;Jr--){for(var Hi=!0,Pn=0;Pn<oi;Pn++)if(di(Ie,Jr+Pn)!==di(xe,Pn)){Hi=!1;break}if(Hi)return Jr}return-1}T.prototype.includes=function(xe,Ce,vt){return this.indexOf(xe,Ce,vt)!==-1},T.prototype.indexOf=function(xe,Ce,vt){return ie(this,xe,Ce,vt,!0)},T.prototype.lastIndexOf=function(xe,Ce,vt){return ie(this,xe,Ce,vt,!1)};function Le(Ie,xe,Ce,vt){Ce=Number(Ce)||0;var nr=Ie.length-Ce;vt?(vt=Number(vt),vt>nr&&(vt=nr)):vt=nr;var ir=xe.length;vt>ir/2&&(vt=ir/2);var pr;for(pr=0;pr<vt;++pr){var oi=parseInt(xe.substr(pr*2,2),16);if(Je(oi))return pr;Ie[Ce+pr]=oi}return pr}function Ae(Ie,xe,Ce,vt){return dt(Rr(xe,Ie.length-Ce),Ie,Ce,vt)}function De(Ie,xe,Ce,vt){return dt(ei(xe),Ie,Ce,vt)}function Pe(Ie,xe,Ce,vt){return dt(Ur(xe),Ie,Ce,vt)}function ge(Ie,xe,Ce,vt){return dt(Wr(xe,Ie.length-Ce),Ie,Ce,vt)}T.prototype.write=function(xe,Ce,vt,nr){if(Ce===void 0)nr=\"utf8\",vt=this.length,Ce=0;else if(vt===void 0&&typeof Ce==\"string\")nr=Ce,vt=this.length,Ce=0;else if(isFinite(Ce))Ce=Ce>>>0,isFinite(vt)?(vt=vt>>>0,nr===void 0&&(nr=\"utf8\")):(nr=vt,vt=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");var ir=this.length-Ce;if((vt===void 0||vt>ir)&&(vt=ir),xe.length>0&&(vt<0||Ce<0)||Ce>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");nr||(nr=\"utf8\");for(var pr=!1;;)switch(nr){case\"hex\":return Le(this,xe,Ce,vt);case\"utf8\":case\"utf-8\":return Ae(this,xe,Ce,vt);case\"ascii\":case\"latin1\":case\"binary\":return De(this,xe,Ce,vt);case\"base64\":return Pe(this,xe,Ce,vt);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ge(this,xe,Ce,vt);default:if(pr)throw new TypeError(\"Unknown encoding: \"+nr);nr=(\"\"+nr).toLowerCase(),pr=!0}},T.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function Fe(Ie,xe,Ce){return xe===0&&Ce===Ie.length?L.fromByteArray(Ie):L.fromByteArray(Ie.slice(xe,Ce))}function ce(Ie,xe,Ce){Ce=Math.min(Ie.length,Ce);for(var vt=[],nr=xe;nr<Ce;){var ir=Ie[nr],pr=null,oi=ir>239?4:ir>223?3:ir>191?2:1;if(nr+oi<=Ce){var di=void 0,Jr=void 0,fi=void 0,Hi=void 0;switch(oi){case 1:ir<128&&(pr=ir);break;case 2:di=Ie[nr+1],(di&192)===128&&(Hi=(ir&31)<<6|di&63,Hi>127&&(pr=Hi));break;case 3:di=Ie[nr+1],Jr=Ie[nr+2],(di&192)===128&&(Jr&192)===128&&(Hi=(ir&15)<<12|(di&63)<<6|Jr&63,Hi>2047&&(Hi<55296||Hi>57343)&&(pr=Hi));break;case 4:di=Ie[nr+1],Jr=Ie[nr+2],fi=Ie[nr+3],(di&192)===128&&(Jr&192)===128&&(fi&192)===128&&(Hi=(ir&15)<<18|(di&63)<<12|(Jr&63)<<6|fi&63,Hi>65535&&Hi<1114112&&(pr=Hi))}}pr===null?(pr=65533,oi=1):pr>65535&&(pr-=65536,vt.push(pr>>>10&1023|55296),pr=56320|pr&1023),vt.push(pr),nr+=oi}return ct(vt)}var Ze=4096;function ct(Ie){var xe=Ie.length;if(xe<=Ze)return String.fromCharCode.apply(String,Ie);for(var Ce=\"\",vt=0;vt<xe;)Ce+=String.fromCharCode.apply(String,Ie.slice(vt,vt+=Ze));return Ce}function pt(Ie,xe,Ce){var vt=\"\";Ce=Math.min(Ie.length,Ce);for(var nr=xe;nr<Ce;++nr)vt+=String.fromCharCode(Ie[nr]&127);return vt}function Wt(Ie,xe,Ce){var vt=\"\";Ce=Math.min(Ie.length,Ce);for(var nr=xe;nr<Ce;++nr)vt+=String.fromCharCode(Ie[nr]);return vt}function st(Ie,xe,Ce){var vt=Ie.length;(!xe||xe<0)&&(xe=0),(!Ce||Ce<0||Ce>vt)&&(Ce=vt);for(var nr=\"\",ir=xe;ir<Ce;++ir)nr+=je[Ie[ir]];return nr}function lt(Ie,xe,Ce){for(var vt=Ie.slice(xe,Ce),nr=\"\",ir=0;ir<vt.length-1;ir+=2)nr+=String.fromCharCode(vt[ir]+vt[ir+1]*256);return nr}T.prototype.slice=function(xe,Ce){var vt=this.length;xe=~~xe,Ce=Ce===void 0?vt:~~Ce,xe<0?(xe+=vt,xe<0&&(xe=0)):xe>vt&&(xe=vt),Ce<0?(Ce+=vt,Ce<0&&(Ce=0)):Ce>vt&&(Ce=vt),Ce<xe&&(Ce=xe);var nr=this.subarray(xe,Ce);return Object.setPrototypeOf(nr,T.prototype),nr};function Gt(Ie,xe,Ce){if(Ie%1!==0||Ie<0)throw new RangeError(\"offset is not uint\");if(Ie+xe>Ce)throw new RangeError(\"Trying to access beyond buffer length\")}T.prototype.readUintLE=T.prototype.readUIntLE=function(xe,Ce,vt){xe=xe>>>0,Ce=Ce>>>0,vt||Gt(xe,Ce,this.length);for(var nr=this[xe],ir=1,pr=0;++pr<Ce&&(ir*=256);)nr+=this[xe+pr]*ir;return nr},T.prototype.readUintBE=T.prototype.readUIntBE=function(xe,Ce,vt){xe=xe>>>0,Ce=Ce>>>0,vt||Gt(xe,Ce,this.length);for(var nr=this[xe+--Ce],ir=1;Ce>0&&(ir*=256);)nr+=this[xe+--Ce]*ir;return nr},T.prototype.readUint8=T.prototype.readUInt8=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,1,this.length),this[xe]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,2,this.length),this[xe]|this[xe+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,2,this.length),this[xe]<<8|this[xe+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),(this[xe]|this[xe+1]<<8|this[xe+2]<<16)+this[xe+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},T.prototype.readBigUInt64LE=$e(function(xe){xe=xe>>>0,yt(xe,\"offset\");var Ce=this[xe],vt=this[xe+7];(Ce===void 0||vt===void 0)&&Yt(xe,this.length-8);var nr=Ce+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),ir=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+vt*Math.pow(2,24);return BigInt(nr)+(BigInt(ir)<<BigInt(32))}),T.prototype.readBigUInt64BE=$e(function(xe){xe=xe>>>0,yt(xe,\"offset\");var Ce=this[xe],vt=this[xe+7];(Ce===void 0||vt===void 0)&&Yt(xe,this.length-8);var nr=Ce*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],ir=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt;return(BigInt(nr)<<BigInt(32))+BigInt(ir)}),T.prototype.readIntLE=function(xe,Ce,vt){xe=xe>>>0,Ce=Ce>>>0,vt||Gt(xe,Ce,this.length);for(var nr=this[xe],ir=1,pr=0;++pr<Ce&&(ir*=256);)nr+=this[xe+pr]*ir;return ir*=128,nr>=ir&&(nr-=Math.pow(2,8*Ce)),nr},T.prototype.readIntBE=function(xe,Ce,vt){xe=xe>>>0,Ce=Ce>>>0,vt||Gt(xe,Ce,this.length);for(var nr=Ce,ir=1,pr=this[xe+--nr];nr>0&&(ir*=256);)pr+=this[xe+--nr]*ir;return ir*=128,pr>=ir&&(pr-=Math.pow(2,8*Ce)),pr},T.prototype.readInt8=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},T.prototype.readInt16LE=function(xe,Ce){xe=xe>>>0,Ce||Gt(xe,2,this.length);var vt=this[xe]|this[xe+1]<<8;return vt&32768?vt|4294901760:vt},T.prototype.readInt16BE=function(xe,Ce){xe=xe>>>0,Ce||Gt(xe,2,this.length);var vt=this[xe+1]|this[xe]<<8;return vt&32768?vt|4294901760:vt},T.prototype.readInt32LE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},T.prototype.readInt32BE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},T.prototype.readBigInt64LE=$e(function(xe){xe=xe>>>0,yt(xe,\"offset\");var Ce=this[xe],vt=this[xe+7];(Ce===void 0||vt===void 0)&&Yt(xe,this.length-8);var nr=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(vt<<24);return(BigInt(nr)<<BigInt(32))+BigInt(Ce+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24))}),T.prototype.readBigInt64BE=$e(function(xe){xe=xe>>>0,yt(xe,\"offset\");var Ce=this[xe],vt=this[xe+7];(Ce===void 0||vt===void 0)&&Yt(xe,this.length-8);var nr=(Ce<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(nr)<<BigInt(32))+BigInt(this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt)}),T.prototype.readFloatLE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),_.read(this,xe,!0,23,4)},T.prototype.readFloatBE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,4,this.length),_.read(this,xe,!1,23,4)},T.prototype.readDoubleLE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,8,this.length),_.read(this,xe,!0,52,8)},T.prototype.readDoubleBE=function(xe,Ce){return xe=xe>>>0,Ce||Gt(xe,8,this.length),_.read(this,xe,!1,52,8)};function Nt(Ie,xe,Ce,vt,nr,ir){if(!T.isBuffer(Ie))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(xe>nr||xe<ir)throw new RangeError('\"value\" argument is out of bounds');if(Ce+vt>Ie.length)throw new RangeError(\"Index out of range\")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(xe,Ce,vt,nr){if(xe=+xe,Ce=Ce>>>0,vt=vt>>>0,!nr){var ir=Math.pow(2,8*vt)-1;Nt(this,xe,Ce,vt,ir,0)}var pr=1,oi=0;for(this[Ce]=xe&255;++oi<vt&&(pr*=256);)this[Ce+oi]=xe/pr&255;return Ce+vt},T.prototype.writeUintBE=T.prototype.writeUIntBE=function(xe,Ce,vt,nr){if(xe=+xe,Ce=Ce>>>0,vt=vt>>>0,!nr){var ir=Math.pow(2,8*vt)-1;Nt(this,xe,Ce,vt,ir,0)}var pr=vt-1,oi=1;for(this[Ce+pr]=xe&255;--pr>=0&&(oi*=256);)this[Ce+pr]=xe/oi&255;return Ce+vt},T.prototype.writeUint8=T.prototype.writeUInt8=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,1,255,0),this[Ce]=xe&255,Ce+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,2,65535,0),this[Ce]=xe&255,this[Ce+1]=xe>>>8,Ce+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,2,65535,0),this[Ce]=xe>>>8,this[Ce+1]=xe&255,Ce+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,4,4294967295,0),this[Ce+3]=xe>>>24,this[Ce+2]=xe>>>16,this[Ce+1]=xe>>>8,this[Ce]=xe&255,Ce+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,4,4294967295,0),this[Ce]=xe>>>24,this[Ce+1]=xe>>>16,this[Ce+2]=xe>>>8,this[Ce+3]=xe&255,Ce+4};function $t(Ie,xe,Ce,vt,nr){bt(xe,vt,nr,Ie,Ce,7);var ir=Number(xe&BigInt(4294967295));Ie[Ce++]=ir,ir=ir>>8,Ie[Ce++]=ir,ir=ir>>8,Ie[Ce++]=ir,ir=ir>>8,Ie[Ce++]=ir;var pr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[Ce++]=pr,pr=pr>>8,Ie[Ce++]=pr,pr=pr>>8,Ie[Ce++]=pr,pr=pr>>8,Ie[Ce++]=pr,Ce}function sr(Ie,xe,Ce,vt,nr){bt(xe,vt,nr,Ie,Ce,7);var ir=Number(xe&BigInt(4294967295));Ie[Ce+7]=ir,ir=ir>>8,Ie[Ce+6]=ir,ir=ir>>8,Ie[Ce+5]=ir,ir=ir>>8,Ie[Ce+4]=ir;var pr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[Ce+3]=pr,pr=pr>>8,Ie[Ce+2]=pr,pr=pr>>8,Ie[Ce+1]=pr,pr=pr>>8,Ie[Ce]=pr,Ce+8}T.prototype.writeBigUInt64LE=$e(function(xe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,Ce,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),T.prototype.writeBigUInt64BE=$e(function(xe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,Ce,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),T.prototype.writeIntLE=function(xe,Ce,vt,nr){if(xe=+xe,Ce=Ce>>>0,!nr){var ir=Math.pow(2,8*vt-1);Nt(this,xe,Ce,vt,ir-1,-ir)}var pr=0,oi=1,di=0;for(this[Ce]=xe&255;++pr<vt&&(oi*=256);)xe<0&&di===0&&this[Ce+pr-1]!==0&&(di=1),this[Ce+pr]=(xe/oi>>0)-di&255;return Ce+vt},T.prototype.writeIntBE=function(xe,Ce,vt,nr){if(xe=+xe,Ce=Ce>>>0,!nr){var ir=Math.pow(2,8*vt-1);Nt(this,xe,Ce,vt,ir-1,-ir)}var pr=vt-1,oi=1,di=0;for(this[Ce+pr]=xe&255;--pr>=0&&(oi*=256);)xe<0&&di===0&&this[Ce+pr+1]!==0&&(di=1),this[Ce+pr]=(xe/oi>>0)-di&255;return Ce+vt},T.prototype.writeInt8=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,1,127,-128),xe<0&&(xe=255+xe+1),this[Ce]=xe&255,Ce+1},T.prototype.writeInt16LE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,2,32767,-32768),this[Ce]=xe&255,this[Ce+1]=xe>>>8,Ce+2},T.prototype.writeInt16BE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,2,32767,-32768),this[Ce]=xe>>>8,this[Ce+1]=xe&255,Ce+2},T.prototype.writeInt32LE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,4,2147483647,-2147483648),this[Ce]=xe&255,this[Ce+1]=xe>>>8,this[Ce+2]=xe>>>16,this[Ce+3]=xe>>>24,Ce+4},T.prototype.writeInt32BE=function(xe,Ce,vt){return xe=+xe,Ce=Ce>>>0,vt||Nt(this,xe,Ce,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[Ce]=xe>>>24,this[Ce+1]=xe>>>16,this[Ce+2]=xe>>>8,this[Ce+3]=xe&255,Ce+4},T.prototype.writeBigInt64LE=$e(function(xe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,Ce,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),T.prototype.writeBigInt64BE=$e(function(xe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,Ce,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function wr(Ie,xe,Ce,vt,nr,ir){if(Ce+vt>Ie.length)throw new RangeError(\"Index out of range\");if(Ce<0)throw new RangeError(\"Index out of range\")}function ur(Ie,xe,Ce,vt,nr){return xe=+xe,Ce=Ce>>>0,nr||wr(Ie,xe,Ce,4,34028234663852886e22,-34028234663852886e22),_.write(Ie,xe,Ce,vt,23,4),Ce+4}T.prototype.writeFloatLE=function(xe,Ce,vt){return ur(this,xe,Ce,!0,vt)},T.prototype.writeFloatBE=function(xe,Ce,vt){return ur(this,xe,Ce,!1,vt)};function Qe(Ie,xe,Ce,vt,nr){return xe=+xe,Ce=Ce>>>0,nr||wr(Ie,xe,Ce,8,17976931348623157e292,-17976931348623157e292),_.write(Ie,xe,Ce,vt,52,8),Ce+8}T.prototype.writeDoubleLE=function(xe,Ce,vt){return Qe(this,xe,Ce,!0,vt)},T.prototype.writeDoubleBE=function(xe,Ce,vt){return Qe(this,xe,Ce,!1,vt)},T.prototype.copy=function(xe,Ce,vt,nr){if(!T.isBuffer(xe))throw new TypeError(\"argument should be a Buffer\");if(vt||(vt=0),!nr&&nr!==0&&(nr=this.length),Ce>=xe.length&&(Ce=xe.length),Ce||(Ce=0),nr>0&&nr<vt&&(nr=vt),nr===vt||xe.length===0||this.length===0)return 0;if(Ce<0)throw new RangeError(\"targetStart out of bounds\");if(vt<0||vt>=this.length)throw new RangeError(\"Index out of range\");if(nr<0)throw new RangeError(\"sourceEnd out of bounds\");nr>this.length&&(nr=this.length),xe.length-Ce<nr-vt&&(nr=xe.length-Ce+vt);var ir=nr-vt;return this===xe&&typeof Uint8Array.prototype.copyWithin==\"function\"?this.copyWithin(Ce,vt,nr):Uint8Array.prototype.set.call(xe,this.subarray(vt,nr),Ce),ir},T.prototype.fill=function(xe,Ce,vt,nr){if(typeof xe==\"string\"){if(typeof Ce==\"string\"?(nr=Ce,Ce=0,vt=this.length):typeof vt==\"string\"&&(nr=vt,vt=this.length),nr!==void 0&&typeof nr!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof nr==\"string\"&&!T.isEncoding(nr))throw new TypeError(\"Unknown encoding: \"+nr);if(xe.length===1){var ir=xe.charCodeAt(0);(nr===\"utf8\"&&ir<128||nr===\"latin1\")&&(xe=ir)}}else typeof xe==\"number\"?xe=xe&255:typeof xe==\"boolean\"&&(xe=Number(xe));if(Ce<0||this.length<Ce||this.length<vt)throw new RangeError(\"Out of range index\");if(vt<=Ce)return this;Ce=Ce>>>0,vt=vt===void 0?this.length:vt>>>0,xe||(xe=0);var pr;if(typeof xe==\"number\")for(pr=Ce;pr<vt;++pr)this[pr]=xe;else{var oi=T.isBuffer(xe)?xe:T.from(xe,nr),di=oi.length;if(di===0)throw new TypeError('The value \"'+xe+'\" is invalid for argument \"value\"');for(pr=0;pr<vt-Ce;++pr)this[pr+Ce]=oi[pr%di]}return this};var Et={};function er(Ie,xe,Ce){Et[Ie]=function(vt){function nr(){var ir;return l(this,nr),ir=d(this,nr),Object.defineProperty(ir,\"message\",{value:xe.apply(ir,arguments),writable:!0,configurable:!0}),ir.name=\"\".concat(ir.name,\" [\").concat(Ie,\"]\"),ir.stack,delete ir.name,ir}return C(nr,vt),c(nr,[{key:\"code\",get:function(){return Ie},set:function(pr){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:pr,writable:!0})}},{key:\"toString\",value:function(){return\"\".concat(this.name,\" [\").concat(Ie,\"]: \").concat(this.message)}}])}(Ce)}er(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(Ie){return Ie?\"\".concat(Ie,\" is outside of buffer bounds\"):\"Attempt to access memory outside buffer bounds\"},RangeError),er(\"ERR_INVALID_ARG_TYPE\",function(Ie,xe){return'The \"'.concat(Ie,'\" argument must be of type number. Received type ').concat(A(xe))},TypeError),er(\"ERR_OUT_OF_RANGE\",function(Ie,xe,Ce){var vt='The value of \"'.concat(Ie,'\" is out of range.'),nr=Ce;return Number.isInteger(Ce)&&Math.abs(Ce)>Math.pow(2,32)?nr=Ut(String(Ce)):typeof Ce==\"bigint\"&&(nr=String(Ce),(Ce>Math.pow(BigInt(2),BigInt(32))||Ce<-Math.pow(BigInt(2),BigInt(32)))&&(nr=Ut(nr)),nr+=\"n\"),vt+=\" It must be \".concat(xe,\". Received \").concat(nr),vt},RangeError);function Ut(Ie){for(var xe=\"\",Ce=Ie.length,vt=Ie[0]===\"-\"?1:0;Ce>=vt+4;Ce-=3)xe=\"_\".concat(Ie.slice(Ce-3,Ce)).concat(xe);return\"\".concat(Ie.slice(0,Ce)).concat(xe)}function Ft(Ie,xe,Ce){yt(xe,\"offset\"),(Ie[xe]===void 0||Ie[xe+Ce]===void 0)&&Yt(xe,Ie.length-(Ce+1))}function bt(Ie,xe,Ce,vt,nr,ir){if(Ie>Ce||Ie<xe){var pr=typeof xe==\"bigint\"?\"n\":\"\",oi;throw ir>3?xe===0||xe===BigInt(0)?oi=\">= 0\".concat(pr,\" and < 2\").concat(pr,\" ** \").concat((ir+1)*8).concat(pr):oi=\">= -(2\".concat(pr,\" ** \").concat((ir+1)*8-1).concat(pr,\") and < 2 ** \")+\"\".concat((ir+1)*8-1).concat(pr):oi=\">= \".concat(xe).concat(pr,\" and <= \").concat(Ce).concat(pr),new Et.ERR_OUT_OF_RANGE(\"value\",oi,Ie)}Ft(vt,nr,ir)}function yt(Ie,xe){if(typeof Ie!=\"number\")throw new Et.ERR_INVALID_ARG_TYPE(xe,\"number\",Ie)}function Yt(Ie,xe,Ce){throw Math.floor(Ie)!==Ie?(yt(Ie,Ce),new Et.ERR_OUT_OF_RANGE(Ce||\"offset\",\"an integer\",Ie)):xe<0?new Et.ERR_BUFFER_OUT_OF_BOUNDS:new Et.ERR_OUT_OF_RANGE(Ce||\"offset\",\">= \".concat(Ce?1:0,\" and <= \").concat(xe),Ie)}var lr=/[^+/0-9A-Za-z-_]/g;function Tr(Ie){if(Ie=Ie.split(\"=\")[0],Ie=Ie.trim().replace(lr,\"\"),Ie.length<2)return\"\";for(;Ie.length%4!==0;)Ie=Ie+\"=\";return Ie}function Rr(Ie,xe){xe=xe||1/0;for(var Ce,vt=Ie.length,nr=null,ir=[],pr=0;pr<vt;++pr){if(Ce=Ie.charCodeAt(pr),Ce>55295&&Ce<57344){if(!nr){if(Ce>56319){(xe-=3)>-1&&ir.push(239,191,189);continue}else if(pr+1===vt){(xe-=3)>-1&&ir.push(239,191,189);continue}nr=Ce;continue}if(Ce<56320){(xe-=3)>-1&&ir.push(239,191,189),nr=Ce;continue}Ce=(nr-55296<<10|Ce-56320)+65536}else nr&&(xe-=3)>-1&&ir.push(239,191,189);if(nr=null,Ce<128){if((xe-=1)<0)break;ir.push(Ce)}else if(Ce<2048){if((xe-=2)<0)break;ir.push(Ce>>6|192,Ce&63|128)}else if(Ce<65536){if((xe-=3)<0)break;ir.push(Ce>>12|224,Ce>>6&63|128,Ce&63|128)}else if(Ce<1114112){if((xe-=4)<0)break;ir.push(Ce>>18|240,Ce>>12&63|128,Ce>>6&63|128,Ce&63|128)}else throw new Error(\"Invalid code point\")}return ir}function ei(Ie){for(var xe=[],Ce=0;Ce<Ie.length;++Ce)xe.push(Ie.charCodeAt(Ce)&255);return xe}function Wr(Ie,xe){for(var Ce,vt,nr,ir=[],pr=0;pr<Ie.length&&!((xe-=2)<0);++pr)Ce=Ie.charCodeAt(pr),vt=Ce>>8,nr=Ce%256,ir.push(nr),ir.push(vt);return ir}function Ur(Ie){return L.toByteArray(Tr(Ie))}function dt(Ie,xe,Ce,vt){var nr;for(nr=0;nr<vt&&!(nr+Ce>=xe.length||nr>=Ie.length);++nr)xe[nr+Ce]=Ie[nr];return nr}function Ge(Ie,xe){return Ie instanceof xe||Ie!=null&&Ie.constructor!=null&&Ie.constructor.name!=null&&Ie.constructor.name===xe.name}function Je(Ie){return Ie!==Ie}var je=function(){for(var Ie=\"0123456789abcdef\",xe=new Array(256),Ce=0;Ce<16;++Ce)for(var vt=Ce*16,nr=0;nr<16;++nr)xe[vt+nr]=Ie[Ce]+Ie[nr];return xe}();function $e(Ie){return typeof BigInt==\"undefined\"?wt:Ie}function wt(){throw new Error(\"BigInt not supported\")}},9216:function(i){\"use strict\";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\\d+|meego).+mobile|armv7l|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!=\"undefined\"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers[\"user-agent\"]==\"string\"&&(c=c.headers[\"user-agent\"]),typeof c!=\"string\")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf(\"Macintosh\")!==-1&&c.indexOf(\"Safari\")!==-1&&(f=!0),f}},6296:function(i,a,o){\"use strict\";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=v,this._active=d[v],this._active||(this._mode=\"turntable\",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var v=this._controllerList,x=0;x<v.length;++x)v[x].flush(d)},f.idle=function(d){for(var v=this._controllerList,x=0;x<v.length;++x)v[x].idle(d)},f.lookAt=function(d,v,x,b){for(var p=this._controllerList,C=0;C<p.length;++C)p[C].lookAt(d,v,x,b)},f.rotate=function(d,v,x,b){for(var p=this._controllerList,C=0;C<p.length;++C)p[C].rotate(d,v,x,b)},f.pan=function(d,v,x,b){for(var p=this._controllerList,C=0;C<p.length;++C)p[C].pan(d,v,x,b)},f.translate=function(d,v,x,b){for(var p=this._controllerList,C=0;C<p.length;++C)p[C].translate(d,v,x,b)},f.setMatrix=function(d,v){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setMatrix(d,v)},f.setDistanceLimits=function(d,v){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setDistanceLimits(d,v)},f.setDistance=function(d,v){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setDistance(d,v)},f.recalcMatrix=function(d){this._active.recalcMatrix(d)},f.getDistance=function(d){return this._active.getDistance(d)},f.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},f.lastT=function(){return this._active.lastT()},f.setMode=function(d){if(d!==this._mode){var v=this._controllerNames.indexOf(d);if(!(v<0)){var x=this._active,b=this._controllerList[v],p=Math.max(x.lastT(),b.lastT());x.recalcMatrix(p),b.setMatrix(p,x.computedMatrix),this._active=b,this._mode=d,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},f.getMode=function(){return this._mode};function h(d){d=d||{};var v=d.eye||[0,0,1],x=d.center||[0,0,0],b=d.up||[0,1,0],p=d.distanceLimits||[0,1/0],C=d.mode||\"turntable\",E=s(),A=l(),L=u();return E.setDistanceLimits(p[0],p[1]),E.lookAt(0,v,x,b),A.setDistanceLimits(p[0],p[1]),A.lookAt(0,v,x,b),L.setDistanceLimits(p[0],p[1]),L.lookAt(0,v,x,b),new c({turntable:E,orbit:A,matrix:L},C)}},7169:function(i,a,o){\"use strict\";var s=typeof WeakMap==\"undefined\"?o(1538):WeakMap,l=o(2762),u=o(8116),c=new s;function f(h){var d=c.get(h),v=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!v||!h.isBuffer(v)){var x=l(h,new Float32Array([-1,-1,-1,4,4,-1]));d=u(h,[{buffer:x,type:h.FLOAT,size:2}]),d._triangleBuffer=x,c.set(h,d)}d.bind(),h.drawArrays(h.TRIANGLES,0,3),d.unbind()}i.exports=f},1085:function(i,a,o){var s=o(1371);i.exports=l;function l(u,c,f){c=typeof c==\"number\"?c:1,f=f||\": \";var h=u.split(/\\r?\\n/),d=String(h.length+c-1).length;return h.map(function(v,x){var b=x+c,p=String(b).length,C=s(b,d-p);return C+f+v}).join(`\n",
       "`)}},3952:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d<c.length;++d)h[d]=c[d];for(var d=0;d<=c.length;++d){for(var v=c.length;v<=f;++v){for(var x=new Array(f),b=0;b<f;++b)x[b]=Math.pow(v+1-d,b);h[v]=x}var p=s.apply(void 0,h);if(p)return!0}return!1}function u(c){var f=c.length;if(f===0)return[];if(f===1)return[0];for(var h=c[0].length,d=[c[0]],v=[0],x=1;x<f;++x){if(d.push(c[x]),!l(d,h)){d.pop();continue}if(v.push(x),v.length===h+1)return v}return v}},5995:function(i,a,o){\"use strict\";i.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),v=0;v<h.length;++v)d[v]=f[h[v]];return l(d)*c<1})}},3502:function(i,a,o){i.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},6468:function(i){i.exports=function(o){return atob(o)}},2642:function(i,a,o){\"use strict\";i.exports=u;var s=o(727);function l(c){for(var f=0,h=0;h<c.length;++h)f+=c[h];return f}function u(c,f){for(var h=f.length,d=new Array(h+1),v=0;v<h;++v){for(var x=new Array(h+1),b=0;b<=h;++b)x[b]=c[b][v];d[v]=x}d[h]=new Array(h+1);for(var v=0;v<=h;++v)d[h][v]=1;for(var p=new Array(h+1),v=0;v<h;++v)p[v]=f[v];p[h]=1;var C=s(d,p),E=l(C[h+1]);E===0&&(E=1);for(var A=new Array(h+1),v=0;v<=h;++v)A[v]=l(C[v])/E;return A}},7507:function(i,a){\"use strict\";a.byteLength=d,a.toByteArray=x,a.fromByteArray=C;for(var o=[],s=[],l=typeof Uint8Array!=\"undefined\"?Uint8Array:Array,u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",c=0,f=u.length;c<f;++c)o[c]=u[c],s[u.charCodeAt(c)]=c;s[45]=62,s[95]=63;function h(E){var A=E.length;if(A%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var L=E.indexOf(\"=\");L===-1&&(L=A);var _=L===A?0:4-L%4;return[L,_]}function d(E){var A=h(E),L=A[0],_=A[1];return(L+_)*3/4-_}function v(E,A,L){return(A+L)*3/4-L}function x(E){var A,L=h(E),_=L[0],k=L[1],M=new l(v(E,_,k)),g=0,P=k>0?_-4:_,T;for(T=0;T<P;T+=4)A=s[E.charCodeAt(T)]<<18|s[E.charCodeAt(T+1)]<<12|s[E.charCodeAt(T+2)]<<6|s[E.charCodeAt(T+3)],M[g++]=A>>16&255,M[g++]=A>>8&255,M[g++]=A&255;return k===2&&(A=s[E.charCodeAt(T)]<<2|s[E.charCodeAt(T+1)]>>4,M[g++]=A&255),k===1&&(A=s[E.charCodeAt(T)]<<10|s[E.charCodeAt(T+1)]<<4|s[E.charCodeAt(T+2)]>>2,M[g++]=A>>8&255,M[g++]=A&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function p(E,A,L){for(var _,k=[],M=A;M<L;M+=3)_=(E[M]<<16&16711680)+(E[M+1]<<8&65280)+(E[M+2]&255),k.push(b(_));return k.join(\"\")}function C(E){for(var A,L=E.length,_=L%3,k=[],M=16383,g=0,P=L-_;g<P;g+=M)k.push(p(E,g,g+M>P?P:g+M));return _===1?(A=E[L-1],k.push(o[A>>2]+o[A<<4&63]+\"==\")):_===2&&(A=(E[L-2]<<8)+E[L-1],k.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+\"=\")),k.join(\"\")}},3865:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318:function(i){\"use strict\";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){\"use strict\";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,x){if(s(v))return x?h(v,d(x)):[v[0].clone(),v[1].clone()];var b=0,p,C;if(l(v))p=v.clone();else if(typeof v==\"string\")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(x))p.mul(x[1]),C=x[0].clone();else if(l(x))C=x.clone();else if(typeof x==\"string\")C=c(x);else if(!x)C=u(1);else if(x===Math.floor(x))C=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;C=u(x)}return b>0?p=p.ushln(b):b<0&&(C=C.ushln(-b)),f(p,C)}},6330:function(i,a,o){\"use strict\";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){\"use strict\";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d<c;d++){var v=f[d];h+=v*Math.pow(67108864,d)}return s(u)*h}},4025:function(i,a,o){\"use strict\";var s=o(2361),l=o(8828).countTrailingZeros;i.exports=u;function u(c){var f=l(s.lo(c));if(f<32)return f;var h=l(s.hi(c));return h>20?52:h+32}},1533:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return u&&typeof u==\"object\"&&!!u.words}},2651:function(i,a,o){\"use strict\";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){\"use strict\";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){\"use strict\";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){\"use strict\";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,x=s(v),b=d.mod,p=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return p*x;if(x){var C=l(x)+4,E=s(b.ushln(C).divRound(h));return p*(x+E*Math.pow(2,-C))}else{var A=h.bitLength()-b.bitLength()+53,E=s(b.ushln(A).divRound(h));return A<1023?p*E*Math.pow(2,-A):(E*=Math.pow(2,-1023),p*E*Math.pow(2,1023-A))}}},2478:function(i){\"use strict\";function a(f,h,d,v,x){for(var b=x+1;v<=x;){var p=v+x>>>1,C=f[p],E=d!==void 0?d(C,h):C-h;E>=0?(b=p,x=p-1):v=p+1}return b}function o(f,h,d,v,x){for(var b=x+1;v<=x;){var p=v+x>>>1,C=f[p],E=d!==void 0?d(C,h):C-h;E>0?(b=p,x=p-1):v=p+1}return b}function s(f,h,d,v,x){for(var b=v-1;v<=x;){var p=v+x>>>1,C=f[p],E=d!==void 0?d(C,h):C-h;E<0?(b=p,v=p+1):x=p-1}return b}function l(f,h,d,v,x){for(var b=v-1;v<=x;){var p=v+x>>>1,C=f[p],E=d!==void 0?d(C,h):C-h;E<=0?(b=p,v=p+1):x=p-1}return b}function u(f,h,d,v,x){for(;v<=x;){var b=v+x>>>1,p=f[b],C=d!==void 0?d(p,h):p-h;if(C===0)return b;C<=0?v=b+1:x=b-1}return-1}function c(f,h,d,v,x,b){return typeof d==\"function\"?b(f,h,d,v===void 0?0:v|0,x===void 0?f.length-1:x|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,x){return c(f,h,d,v,x,a)},gt:function(f,h,d,v,x){return c(f,h,d,v,x,o)},lt:function(f,h,d,v,x){return c(f,h,d,v,x,s)},le:function(f,h,d,v,x){return c(f,h,d,v,x,l)},eq:function(f,h,d,v,x){return c(f,h,d,v,x,u)}}},8828:function(i,a){\"use strict\";\"use restrict\";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,l){\"use strict\";function u(H,N){if(!H)throw new Error(N||\"Assertion failed\")}function c(H,N){H.super_=N;var j=function(){};j.prototype=N.prototype,H.prototype=new j,H.prototype.constructor=H}function f(H,N,j){if(f.isBN(H))return H;this.negative=0,this.words=null,this.length=0,this.red=null,H!==null&&((N===\"le\"||N===\"be\")&&(j=N,N=10),this._init(H||0,N||10,j||\"be\"))}typeof s==\"object\"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!=\"undefined\"&&typeof window.Buffer!=\"undefined\"?h=window.Buffer:h=o(7790).Buffer}catch(H){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N==\"object\"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,j){return N.cmp(j)>0?N:j},f.min=function(N,j){return N.cmp(j)<0?N:j},f.prototype._init=function(N,j,re){if(typeof N==\"number\")return this._initNumber(N,j,re);if(typeof N==\"object\")return this._initArray(N,j,re);j===\"hex\"&&(j=16),u(j===(j|0)&&j>=2&&j<=36),N=N.toString().replace(/\\s+/g,\"\");var oe=0;N[0]===\"-\"&&(oe++,this.negative=1),oe<N.length&&(j===16?this._parseHex(N,oe,re):(this._parseBase(N,j,oe),re===\"le\"&&this._initArray(this.toArray(),j,re)))},f.prototype._initNumber=function(N,j,re){N<0&&(this.negative=1,N=-N),N<67108864?(this.words=[N&67108863],this.length=1):N<4503599627370496?(this.words=[N&67108863,N/67108864&67108863],this.length=2):(u(N<9007199254740992),this.words=[N&67108863,N/67108864&67108863,1],this.length=3),re===\"le\"&&this._initArray(this.toArray(),j,re)},f.prototype._initArray=function(N,j,re){if(u(typeof N.length==\"number\"),N.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(N.length/3),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e,Me,ke=0;if(re===\"be\")for(oe=N.length-1,_e=0;oe>=0;oe-=3)Me=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=Me<<ke&67108863,this.words[_e+1]=Me>>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);else if(re===\"le\")for(oe=0,_e=0;oe<N.length;oe+=3)Me=N[oe]|N[oe+1]<<8|N[oe+2]<<16,this.words[_e]|=Me<<ke&67108863,this.words[_e+1]=Me>>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);return this.strip()};function d(H,N){var j=H.charCodeAt(N);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function v(H,N,j){var re=d(H,j);return j-1>=N&&(re|=d(H,j-1)<<4),re}f.prototype._parseHex=function(N,j,re){this.length=Math.ceil((N.length-j)/6),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e=0,Me=0,ke;if(re===\"be\")for(oe=N.length-1;oe>=j;oe-=2)ke=v(N,j,oe)<<_e,this.words[Me]|=ke&67108863,_e>=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8;else{var me=N.length-j;for(oe=me%2===0?j+1:j;oe<N.length;oe+=2)ke=v(N,j,oe)<<_e,this.words[Me]|=ke&67108863,_e>=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8}this.strip()};function x(H,N,j,re){for(var oe=0,_e=Math.min(H.length,j),Me=N;Me<_e;Me++){var ke=H.charCodeAt(Me)-48;oe*=re,ke>=49?oe+=ke-49+10:ke>=17?oe+=ke-17+10:oe+=ke}return oe}f.prototype._parseBase=function(N,j,re){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=j)oe++;oe--,_e=_e/j|0;for(var Me=N.length-re,ke=Me%oe,me=Math.min(Me,Me-ke)+re,ie=0,Se=re;Se<me;Se+=oe)ie=x(N,Se,Se+oe,j),this.imuln(_e),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie);if(ke!==0){var Le=1;for(ie=x(N,Se,N.length,j),Se=0;Se<ke;Se++)Le*=j;this.imuln(Le),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie)}this.strip()},f.prototype.copy=function(N){N.words=new Array(this.length);for(var j=0;j<this.length;j++)N.words[j]=this.words[j];N.length=this.length,N.negative=this.negative,N.red=this.red},f.prototype.clone=function(){var N=new f(null);return this.copy(N),N},f.prototype._expand=function(N){for(;this.length<N;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var b=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(N,j){N=N||10,j=j|0||1;var re;if(N===16||N===\"hex\"){re=\"\";for(var oe=0,_e=0,Me=0;Me<this.length;Me++){var ke=this.words[Me],me=((ke<<oe|_e)&16777215).toString(16);_e=ke>>>24-oe&16777215,_e!==0||Me!==this.length-1?re=b[6-me.length]+me+re:re=me+re,oe+=2,oe>=26&&(oe-=26,Me--)}for(_e!==0&&(re=_e.toString(16)+re);re.length%j!==0;)re=\"0\"+re;return this.negative!==0&&(re=\"-\"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=C[N];re=\"\";var Le=this.clone();for(Le.negative=0;!Le.isZero();){var Ae=Le.modn(Se).toString(N);Le=Le.idivn(Se),Le.isZero()?re=Ae+re:re=b[ie-Ae.length]+Ae+re}for(this.isZero()&&(re=\"0\"+re);re.length%j!==0;)re=\"0\"+re;return this.negative!==0&&(re=\"-\"+re),re}u(!1,\"Base should be between 2 and 36\")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,\"Number can only safely store up to 53 bits\"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,j){return u(typeof h!=\"undefined\"),this.toArrayLike(h,N,j)},f.prototype.toArray=function(N,j){return this.toArrayLike(Array,N,j)},f.prototype.toArrayLike=function(N,j,re){var oe=this.byteLength(),_e=re||Math.max(1,oe);u(oe<=_e,\"byte array longer than desired length\"),u(_e>0,\"Requested array length <= 0\"),this.strip();var Me=j===\"le\",ke=new N(_e),me,ie,Se=this.clone();if(Me){for(ie=0;!Se.isZero();ie++)me=Se.andln(255),Se.iushrn(8),ke[ie]=me;for(;ie<_e;ie++)ke[ie]=0}else{for(ie=0;ie<_e-oe;ie++)ke[ie]=0;for(ie=0;!Se.isZero();ie++)me=Se.andln(255),Se.iushrn(8),ke[_e-ie-1]=me}return ke},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var j=N,re=0;return j>=4096&&(re+=13,j>>>=13),j>=64&&(re+=7,j>>>=7),j>=8&&(re+=4,j>>>=4),j>=2&&(re+=2,j>>>=2),re+j},f.prototype._zeroBits=function(N){if(N===0)return 26;var j=N,re=0;return(j&8191)===0&&(re+=13,j>>>=13),(j&127)===0&&(re+=7,j>>>=7),(j&15)===0&&(re+=4,j>>>=4),(j&3)===0&&(re+=2,j>>>=2),(j&1)===0&&re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],j=this._countBits(N);return(this.length-1)*26+j};function E(H){for(var N=new Array(H.bitLength()),j=0;j<N.length;j++){var re=j/26|0,oe=j%26;N[j]=(H.words[re]&1<<oe)>>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,j=0;j<this.length;j++){var re=this._zeroBits(this.words[j]);if(N+=re,re!==26)break}return N},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(N){return this.negative!==0?this.abs().inotn(N).iaddn(1):this.clone()},f.prototype.fromTwos=function(N){return this.testn(N-1)?this.notn(N).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(N){for(;this.length<N.length;)this.words[this.length++]=0;for(var j=0;j<N.length;j++)this.words[j]=this.words[j]|N.words[j];return this.strip()},f.prototype.ior=function(N){return u((this.negative|N.negative)===0),this.iuor(N)},f.prototype.or=function(N){return this.length>N.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var j;this.length>N.length?j=N:j=this;for(var re=0;re<j.length;re++)this.words[re]=this.words[re]&N.words[re];return this.length=j.length,this.strip()},f.prototype.iand=function(N){return u((this.negative|N.negative)===0),this.iuand(N)},f.prototype.and=function(N){return this.length>N.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var j,re;this.length>N.length?(j=this,re=N):(j=N,re=this);for(var oe=0;oe<re.length;oe++)this.words[oe]=j.words[oe]^re.words[oe];if(this!==j)for(;oe<j.length;oe++)this.words[oe]=j.words[oe];return this.length=j.length,this.strip()},f.prototype.ixor=function(N){return u((this.negative|N.negative)===0),this.iuxor(N)},f.prototype.xor=function(N){return this.length>N.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N==\"number\"&&N>=0);var j=Math.ceil(N/26)|0,re=N%26;this._expand(j),re>0&&j--;for(var oe=0;oe<j;oe++)this.words[oe]=~this.words[oe]&67108863;return re>0&&(this.words[oe]=~this.words[oe]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,j){u(typeof N==\"number\"&&N>=0);var re=N/26|0,oe=N%26;return this._expand(re+1),j?this.words[re]=this.words[re]|1<<oe:this.words[re]=this.words[re]&~(1<<oe),this.strip()},f.prototype.iadd=function(N){var j;if(this.negative!==0&&N.negative===0)return this.negative=0,j=this.isub(N),this.negative^=1,this._normSign();if(this.negative===0&&N.negative!==0)return N.negative=0,j=this.isub(N),N.negative=1,j._normSign();var re,oe;this.length>N.length?(re=this,oe=N):(re=N,oe=this);for(var _e=0,Me=0;Me<oe.length;Me++)j=(re.words[Me]|0)+(oe.words[Me]|0)+_e,this.words[Me]=j&67108863,_e=j>>>26;for(;_e!==0&&Me<re.length;Me++)j=(re.words[Me]|0)+_e,this.words[Me]=j&67108863,_e=j>>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;Me<re.length;Me++)this.words[Me]=re.words[Me];return this},f.prototype.add=function(N){var j;return N.negative!==0&&this.negative===0?(N.negative=0,j=this.sub(N),N.negative^=1,j):N.negative===0&&this.negative!==0?(this.negative=0,j=N.sub(this),this.negative=1,j):this.length>N.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var j=this.iadd(N);return N.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;re>0?(oe=this,_e=N):(oe=N,_e=this);for(var Me=0,ke=0;ke<_e.length;ke++)j=(oe.words[ke]|0)-(_e.words[ke]|0)+Me,Me=j>>26,this.words[ke]=j&67108863;for(;Me!==0&&ke<oe.length;ke++)j=(oe.words[ke]|0)+Me,Me=j>>26,this.words[ke]=j&67108863;if(Me===0&&ke<oe.length&&oe!==this)for(;ke<oe.length;ke++)this.words[ke]=oe.words[ke];return this.length=Math.max(this.length,ke),oe!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(N){return this.clone().isub(N)};function A(H,N,j){j.negative=N.negative^H.negative;var re=H.length+N.length|0;j.length=re,re=re-1|0;var oe=H.words[0]|0,_e=N.words[0]|0,Me=oe*_e,ke=Me&67108863,me=Me/67108864|0;j.words[0]=ke;for(var ie=1;ie<re;ie++){for(var Se=me>>>26,Le=me&67108863,Ae=Math.min(ie,N.length-1),De=Math.max(0,ie-H.length+1);De<=Ae;De++){var Pe=ie-De|0;oe=H.words[Pe]|0,_e=N.words[De]|0,Me=oe*_e+Le,Se+=Me/67108864|0,Le=Me&67108863}j.words[ie]=Le|0,me=Se|0}return me!==0?j.words[ie]=me|0:j.length--,j.strip()}var L=function(N,j,re){var oe=N.words,_e=j.words,Me=re.words,ke=0,me,ie,Se,Le=oe[0]|0,Ae=Le&8191,De=Le>>>13,Pe=oe[1]|0,ge=Pe&8191,Fe=Pe>>>13,ce=oe[2]|0,Ze=ce&8191,ct=ce>>>13,pt=oe[3]|0,Wt=pt&8191,st=pt>>>13,lt=oe[4]|0,Gt=lt&8191,Nt=lt>>>13,$t=oe[5]|0,sr=$t&8191,wr=$t>>>13,ur=oe[6]|0,Qe=ur&8191,Et=ur>>>13,er=oe[7]|0,Ut=er&8191,Ft=er>>>13,bt=oe[8]|0,yt=bt&8191,Yt=bt>>>13,lr=oe[9]|0,Tr=lr&8191,Rr=lr>>>13,ei=_e[0]|0,Wr=ei&8191,Ur=ei>>>13,dt=_e[1]|0,Ge=dt&8191,Je=dt>>>13,je=_e[2]|0,$e=je&8191,wt=je>>>13,Ie=_e[3]|0,xe=Ie&8191,Ce=Ie>>>13,vt=_e[4]|0,nr=vt&8191,ir=vt>>>13,pr=_e[5]|0,oi=pr&8191,di=pr>>>13,Jr=_e[6]|0,fi=Jr&8191,Hi=Jr>>>13,Pn=_e[7]|0,wn=Pn&8191,pn=Pn>>>13,Vn=_e[8]|0,kn=Vn&8191,ea=Vn>>>13,ua=_e[9]|0,Vt=ua&8191,_t=ua>>>13;re.negative=N.negative^j.negative,re.length=19,me=Math.imul(Ae,Wr),ie=Math.imul(Ae,Ur),ie=ie+Math.imul(De,Wr)|0,Se=Math.imul(De,Ur);var tr=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(tr>>>26)|0,tr&=67108863,me=Math.imul(ge,Wr),ie=Math.imul(ge,Ur),ie=ie+Math.imul(Fe,Wr)|0,Se=Math.imul(Fe,Ur),me=me+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(De,Ge)|0,Se=Se+Math.imul(De,Je)|0;var ar=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(ar>>>26)|0,ar&=67108863,me=Math.imul(Ze,Wr),ie=Math.imul(Ze,Ur),ie=ie+Math.imul(ct,Wr)|0,Se=Math.imul(ct,Ur),me=me+Math.imul(ge,Ge)|0,ie=ie+Math.imul(ge,Je)|0,ie=ie+Math.imul(Fe,Ge)|0,Se=Se+Math.imul(Fe,Je)|0,me=me+Math.imul(Ae,$e)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(De,$e)|0,Se=Se+Math.imul(De,wt)|0;var Er=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Er>>>26)|0,Er&=67108863,me=Math.imul(Wt,Wr),ie=Math.imul(Wt,Ur),ie=ie+Math.imul(st,Wr)|0,Se=Math.imul(st,Ur),me=me+Math.imul(Ze,Ge)|0,ie=ie+Math.imul(Ze,Je)|0,ie=ie+Math.imul(ct,Ge)|0,Se=Se+Math.imul(ct,Je)|0,me=me+Math.imul(ge,$e)|0,ie=ie+Math.imul(ge,wt)|0,ie=ie+Math.imul(Fe,$e)|0,Se=Se+Math.imul(Fe,wt)|0,me=me+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,Ce)|0,ie=ie+Math.imul(De,xe)|0,Se=Se+Math.imul(De,Ce)|0;var Zr=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,me=Math.imul(Gt,Wr),ie=Math.imul(Gt,Ur),ie=ie+Math.imul(Nt,Wr)|0,Se=Math.imul(Nt,Ur),me=me+Math.imul(Wt,Ge)|0,ie=ie+Math.imul(Wt,Je)|0,ie=ie+Math.imul(st,Ge)|0,Se=Se+Math.imul(st,Je)|0,me=me+Math.imul(Ze,$e)|0,ie=ie+Math.imul(Ze,wt)|0,ie=ie+Math.imul(ct,$e)|0,Se=Se+Math.imul(ct,wt)|0,me=me+Math.imul(ge,xe)|0,ie=ie+Math.imul(ge,Ce)|0,ie=ie+Math.imul(Fe,xe)|0,Se=Se+Math.imul(Fe,Ce)|0,me=me+Math.imul(Ae,nr)|0,ie=ie+Math.imul(Ae,ir)|0,ie=ie+Math.imul(De,nr)|0,Se=Se+Math.imul(De,ir)|0;var ri=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(ri>>>26)|0,ri&=67108863,me=Math.imul(sr,Wr),ie=Math.imul(sr,Ur),ie=ie+Math.imul(wr,Wr)|0,Se=Math.imul(wr,Ur),me=me+Math.imul(Gt,Ge)|0,ie=ie+Math.imul(Gt,Je)|0,ie=ie+Math.imul(Nt,Ge)|0,Se=Se+Math.imul(Nt,Je)|0,me=me+Math.imul(Wt,$e)|0,ie=ie+Math.imul(Wt,wt)|0,ie=ie+Math.imul(st,$e)|0,Se=Se+Math.imul(st,wt)|0,me=me+Math.imul(Ze,xe)|0,ie=ie+Math.imul(Ze,Ce)|0,ie=ie+Math.imul(ct,xe)|0,Se=Se+Math.imul(ct,Ce)|0,me=me+Math.imul(ge,nr)|0,ie=ie+Math.imul(ge,ir)|0,ie=ie+Math.imul(Fe,nr)|0,Se=Se+Math.imul(Fe,ir)|0,me=me+Math.imul(Ae,oi)|0,ie=ie+Math.imul(Ae,di)|0,ie=ie+Math.imul(De,oi)|0,Se=Se+Math.imul(De,di)|0;var $r=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+($r>>>26)|0,$r&=67108863,me=Math.imul(Qe,Wr),ie=Math.imul(Qe,Ur),ie=ie+Math.imul(Et,Wr)|0,Se=Math.imul(Et,Ur),me=me+Math.imul(sr,Ge)|0,ie=ie+Math.imul(sr,Je)|0,ie=ie+Math.imul(wr,Ge)|0,Se=Se+Math.imul(wr,Je)|0,me=me+Math.imul(Gt,$e)|0,ie=ie+Math.imul(Gt,wt)|0,ie=ie+Math.imul(Nt,$e)|0,Se=Se+Math.imul(Nt,wt)|0,me=me+Math.imul(Wt,xe)|0,ie=ie+Math.imul(Wt,Ce)|0,ie=ie+Math.imul(st,xe)|0,Se=Se+Math.imul(st,Ce)|0,me=me+Math.imul(Ze,nr)|0,ie=ie+Math.imul(Ze,ir)|0,ie=ie+Math.imul(ct,nr)|0,Se=Se+Math.imul(ct,ir)|0,me=me+Math.imul(ge,oi)|0,ie=ie+Math.imul(ge,di)|0,ie=ie+Math.imul(Fe,oi)|0,Se=Se+Math.imul(Fe,di)|0,me=me+Math.imul(Ae,fi)|0,ie=ie+Math.imul(Ae,Hi)|0,ie=ie+Math.imul(De,fi)|0,Se=Se+Math.imul(De,Hi)|0;var zi=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(zi>>>26)|0,zi&=67108863,me=Math.imul(Ut,Wr),ie=Math.imul(Ut,Ur),ie=ie+Math.imul(Ft,Wr)|0,Se=Math.imul(Ft,Ur),me=me+Math.imul(Qe,Ge)|0,ie=ie+Math.imul(Qe,Je)|0,ie=ie+Math.imul(Et,Ge)|0,Se=Se+Math.imul(Et,Je)|0,me=me+Math.imul(sr,$e)|0,ie=ie+Math.imul(sr,wt)|0,ie=ie+Math.imul(wr,$e)|0,Se=Se+Math.imul(wr,wt)|0,me=me+Math.imul(Gt,xe)|0,ie=ie+Math.imul(Gt,Ce)|0,ie=ie+Math.imul(Nt,xe)|0,Se=Se+Math.imul(Nt,Ce)|0,me=me+Math.imul(Wt,nr)|0,ie=ie+Math.imul(Wt,ir)|0,ie=ie+Math.imul(st,nr)|0,Se=Se+Math.imul(st,ir)|0,me=me+Math.imul(Ze,oi)|0,ie=ie+Math.imul(Ze,di)|0,ie=ie+Math.imul(ct,oi)|0,Se=Se+Math.imul(ct,di)|0,me=me+Math.imul(ge,fi)|0,ie=ie+Math.imul(ge,Hi)|0,ie=ie+Math.imul(Fe,fi)|0,Se=Se+Math.imul(Fe,Hi)|0,me=me+Math.imul(Ae,wn)|0,ie=ie+Math.imul(Ae,pn)|0,ie=ie+Math.imul(De,wn)|0,Se=Se+Math.imul(De,pn)|0;var Ji=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,me=Math.imul(yt,Wr),ie=Math.imul(yt,Ur),ie=ie+Math.imul(Yt,Wr)|0,Se=Math.imul(Yt,Ur),me=me+Math.imul(Ut,Ge)|0,ie=ie+Math.imul(Ut,Je)|0,ie=ie+Math.imul(Ft,Ge)|0,Se=Se+Math.imul(Ft,Je)|0,me=me+Math.imul(Qe,$e)|0,ie=ie+Math.imul(Qe,wt)|0,ie=ie+Math.imul(Et,$e)|0,Se=Se+Math.imul(Et,wt)|0,me=me+Math.imul(sr,xe)|0,ie=ie+Math.imul(sr,Ce)|0,ie=ie+Math.imul(wr,xe)|0,Se=Se+Math.imul(wr,Ce)|0,me=me+Math.imul(Gt,nr)|0,ie=ie+Math.imul(Gt,ir)|0,ie=ie+Math.imul(Nt,nr)|0,Se=Se+Math.imul(Nt,ir)|0,me=me+Math.imul(Wt,oi)|0,ie=ie+Math.imul(Wt,di)|0,ie=ie+Math.imul(st,oi)|0,Se=Se+Math.imul(st,di)|0,me=me+Math.imul(Ze,fi)|0,ie=ie+Math.imul(Ze,Hi)|0,ie=ie+Math.imul(ct,fi)|0,Se=Se+Math.imul(ct,Hi)|0,me=me+Math.imul(ge,wn)|0,ie=ie+Math.imul(ge,pn)|0,ie=ie+Math.imul(Fe,wn)|0,Se=Se+Math.imul(Fe,pn)|0,me=me+Math.imul(Ae,kn)|0,ie=ie+Math.imul(Ae,ea)|0,ie=ie+Math.imul(De,kn)|0,Se=Se+Math.imul(De,ea)|0;var en=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(en>>>26)|0,en&=67108863,me=Math.imul(Tr,Wr),ie=Math.imul(Tr,Ur),ie=ie+Math.imul(Rr,Wr)|0,Se=Math.imul(Rr,Ur),me=me+Math.imul(yt,Ge)|0,ie=ie+Math.imul(yt,Je)|0,ie=ie+Math.imul(Yt,Ge)|0,Se=Se+Math.imul(Yt,Je)|0,me=me+Math.imul(Ut,$e)|0,ie=ie+Math.imul(Ut,wt)|0,ie=ie+Math.imul(Ft,$e)|0,Se=Se+Math.imul(Ft,wt)|0,me=me+Math.imul(Qe,xe)|0,ie=ie+Math.imul(Qe,Ce)|0,ie=ie+Math.imul(Et,xe)|0,Se=Se+Math.imul(Et,Ce)|0,me=me+Math.imul(sr,nr)|0,ie=ie+Math.imul(sr,ir)|0,ie=ie+Math.imul(wr,nr)|0,Se=Se+Math.imul(wr,ir)|0,me=me+Math.imul(Gt,oi)|0,ie=ie+Math.imul(Gt,di)|0,ie=ie+Math.imul(Nt,oi)|0,Se=Se+Math.imul(Nt,di)|0,me=me+Math.imul(Wt,fi)|0,ie=ie+Math.imul(Wt,Hi)|0,ie=ie+Math.imul(st,fi)|0,Se=Se+Math.imul(st,Hi)|0,me=me+Math.imul(Ze,wn)|0,ie=ie+Math.imul(Ze,pn)|0,ie=ie+Math.imul(ct,wn)|0,Se=Se+Math.imul(ct,pn)|0,me=me+Math.imul(ge,kn)|0,ie=ie+Math.imul(ge,ea)|0,ie=ie+Math.imul(Fe,kn)|0,Se=Se+Math.imul(Fe,ea)|0,me=me+Math.imul(Ae,Vt)|0,ie=ie+Math.imul(Ae,_t)|0,ie=ie+Math.imul(De,Vt)|0,Se=Se+Math.imul(De,_t)|0;var cn=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(cn>>>26)|0,cn&=67108863,me=Math.imul(Tr,Ge),ie=Math.imul(Tr,Je),ie=ie+Math.imul(Rr,Ge)|0,Se=Math.imul(Rr,Je),me=me+Math.imul(yt,$e)|0,ie=ie+Math.imul(yt,wt)|0,ie=ie+Math.imul(Yt,$e)|0,Se=Se+Math.imul(Yt,wt)|0,me=me+Math.imul(Ut,xe)|0,ie=ie+Math.imul(Ut,Ce)|0,ie=ie+Math.imul(Ft,xe)|0,Se=Se+Math.imul(Ft,Ce)|0,me=me+Math.imul(Qe,nr)|0,ie=ie+Math.imul(Qe,ir)|0,ie=ie+Math.imul(Et,nr)|0,Se=Se+Math.imul(Et,ir)|0,me=me+Math.imul(sr,oi)|0,ie=ie+Math.imul(sr,di)|0,ie=ie+Math.imul(wr,oi)|0,Se=Se+Math.imul(wr,di)|0,me=me+Math.imul(Gt,fi)|0,ie=ie+Math.imul(Gt,Hi)|0,ie=ie+Math.imul(Nt,fi)|0,Se=Se+Math.imul(Nt,Hi)|0,me=me+Math.imul(Wt,wn)|0,ie=ie+Math.imul(Wt,pn)|0,ie=ie+Math.imul(st,wn)|0,Se=Se+Math.imul(st,pn)|0,me=me+Math.imul(Ze,kn)|0,ie=ie+Math.imul(Ze,ea)|0,ie=ie+Math.imul(ct,kn)|0,Se=Se+Math.imul(ct,ea)|0,me=me+Math.imul(ge,Vt)|0,ie=ie+Math.imul(ge,_t)|0,ie=ie+Math.imul(Fe,Vt)|0,Se=Se+Math.imul(Fe,_t)|0;var yn=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,me=Math.imul(Tr,$e),ie=Math.imul(Tr,wt),ie=ie+Math.imul(Rr,$e)|0,Se=Math.imul(Rr,wt),me=me+Math.imul(yt,xe)|0,ie=ie+Math.imul(yt,Ce)|0,ie=ie+Math.imul(Yt,xe)|0,Se=Se+Math.imul(Yt,Ce)|0,me=me+Math.imul(Ut,nr)|0,ie=ie+Math.imul(Ut,ir)|0,ie=ie+Math.imul(Ft,nr)|0,Se=Se+Math.imul(Ft,ir)|0,me=me+Math.imul(Qe,oi)|0,ie=ie+Math.imul(Qe,di)|0,ie=ie+Math.imul(Et,oi)|0,Se=Se+Math.imul(Et,di)|0,me=me+Math.imul(sr,fi)|0,ie=ie+Math.imul(sr,Hi)|0,ie=ie+Math.imul(wr,fi)|0,Se=Se+Math.imul(wr,Hi)|0,me=me+Math.imul(Gt,wn)|0,ie=ie+Math.imul(Gt,pn)|0,ie=ie+Math.imul(Nt,wn)|0,Se=Se+Math.imul(Nt,pn)|0,me=me+Math.imul(Wt,kn)|0,ie=ie+Math.imul(Wt,ea)|0,ie=ie+Math.imul(st,kn)|0,Se=Se+Math.imul(st,ea)|0,me=me+Math.imul(Ze,Vt)|0,ie=ie+Math.imul(Ze,_t)|0,ie=ie+Math.imul(ct,Vt)|0,Se=Se+Math.imul(ct,_t)|0;var Mn=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,me=Math.imul(Tr,xe),ie=Math.imul(Tr,Ce),ie=ie+Math.imul(Rr,xe)|0,Se=Math.imul(Rr,Ce),me=me+Math.imul(yt,nr)|0,ie=ie+Math.imul(yt,ir)|0,ie=ie+Math.imul(Yt,nr)|0,Se=Se+Math.imul(Yt,ir)|0,me=me+Math.imul(Ut,oi)|0,ie=ie+Math.imul(Ut,di)|0,ie=ie+Math.imul(Ft,oi)|0,Se=Se+Math.imul(Ft,di)|0,me=me+Math.imul(Qe,fi)|0,ie=ie+Math.imul(Qe,Hi)|0,ie=ie+Math.imul(Et,fi)|0,Se=Se+Math.imul(Et,Hi)|0,me=me+Math.imul(sr,wn)|0,ie=ie+Math.imul(sr,pn)|0,ie=ie+Math.imul(wr,wn)|0,Se=Se+Math.imul(wr,pn)|0,me=me+Math.imul(Gt,kn)|0,ie=ie+Math.imul(Gt,ea)|0,ie=ie+Math.imul(Nt,kn)|0,Se=Se+Math.imul(Nt,ea)|0,me=me+Math.imul(Wt,Vt)|0,ie=ie+Math.imul(Wt,_t)|0,ie=ie+Math.imul(st,Vt)|0,Se=Se+Math.imul(st,_t)|0;var Ba=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,me=Math.imul(Tr,nr),ie=Math.imul(Tr,ir),ie=ie+Math.imul(Rr,nr)|0,Se=Math.imul(Rr,ir),me=me+Math.imul(yt,oi)|0,ie=ie+Math.imul(yt,di)|0,ie=ie+Math.imul(Yt,oi)|0,Se=Se+Math.imul(Yt,di)|0,me=me+Math.imul(Ut,fi)|0,ie=ie+Math.imul(Ut,Hi)|0,ie=ie+Math.imul(Ft,fi)|0,Se=Se+Math.imul(Ft,Hi)|0,me=me+Math.imul(Qe,wn)|0,ie=ie+Math.imul(Qe,pn)|0,ie=ie+Math.imul(Et,wn)|0,Se=Se+Math.imul(Et,pn)|0,me=me+Math.imul(sr,kn)|0,ie=ie+Math.imul(sr,ea)|0,ie=ie+Math.imul(wr,kn)|0,Se=Se+Math.imul(wr,ea)|0,me=me+Math.imul(Gt,Vt)|0,ie=ie+Math.imul(Gt,_t)|0,ie=ie+Math.imul(Nt,Vt)|0,Se=Se+Math.imul(Nt,_t)|0;var la=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(la>>>26)|0,la&=67108863,me=Math.imul(Tr,oi),ie=Math.imul(Tr,di),ie=ie+Math.imul(Rr,oi)|0,Se=Math.imul(Rr,di),me=me+Math.imul(yt,fi)|0,ie=ie+Math.imul(yt,Hi)|0,ie=ie+Math.imul(Yt,fi)|0,Se=Se+Math.imul(Yt,Hi)|0,me=me+Math.imul(Ut,wn)|0,ie=ie+Math.imul(Ut,pn)|0,ie=ie+Math.imul(Ft,wn)|0,Se=Se+Math.imul(Ft,pn)|0,me=me+Math.imul(Qe,kn)|0,ie=ie+Math.imul(Qe,ea)|0,ie=ie+Math.imul(Et,kn)|0,Se=Se+Math.imul(Et,ea)|0,me=me+Math.imul(sr,Vt)|0,ie=ie+Math.imul(sr,_t)|0,ie=ie+Math.imul(wr,Vt)|0,Se=Se+Math.imul(wr,_t)|0;var ma=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,me=Math.imul(Tr,fi),ie=Math.imul(Tr,Hi),ie=ie+Math.imul(Rr,fi)|0,Se=Math.imul(Rr,Hi),me=me+Math.imul(yt,wn)|0,ie=ie+Math.imul(yt,pn)|0,ie=ie+Math.imul(Yt,wn)|0,Se=Se+Math.imul(Yt,pn)|0,me=me+Math.imul(Ut,kn)|0,ie=ie+Math.imul(Ut,ea)|0,ie=ie+Math.imul(Ft,kn)|0,Se=Se+Math.imul(Ft,ea)|0,me=me+Math.imul(Qe,Vt)|0,ie=ie+Math.imul(Qe,_t)|0,ie=ie+Math.imul(Et,Vt)|0,Se=Se+Math.imul(Et,_t)|0;var Wa=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,me=Math.imul(Tr,wn),ie=Math.imul(Tr,pn),ie=ie+Math.imul(Rr,wn)|0,Se=Math.imul(Rr,pn),me=me+Math.imul(yt,kn)|0,ie=ie+Math.imul(yt,ea)|0,ie=ie+Math.imul(Yt,kn)|0,Se=Se+Math.imul(Yt,ea)|0,me=me+Math.imul(Ut,Vt)|0,ie=ie+Math.imul(Ut,_t)|0,ie=ie+Math.imul(Ft,Vt)|0,Se=Se+Math.imul(Ft,_t)|0;var Fa=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,me=Math.imul(Tr,kn),ie=Math.imul(Tr,ea),ie=ie+Math.imul(Rr,kn)|0,Se=Math.imul(Rr,ea),me=me+Math.imul(yt,Vt)|0,ie=ie+Math.imul(yt,_t)|0,ie=ie+Math.imul(Yt,Vt)|0,Se=Se+Math.imul(Yt,_t)|0;var Wo=(ke+me|0)+((ie&8191)<<13)|0;ke=(Se+(ie>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,me=Math.imul(Tr,Vt),ie=Math.imul(Tr,_t),ie=ie+Math.imul(Rr,Vt)|0,Se=Math.imul(Rr,_t);var da=(ke+me|0)+((ie&8191)<<13)|0;return ke=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,Me[0]=tr,Me[1]=ar,Me[2]=Er,Me[3]=Zr,Me[4]=ri,Me[5]=$r,Me[6]=zi,Me[7]=Ji,Me[8]=en,Me[9]=cn,Me[10]=yn,Me[11]=Mn,Me[12]=Ba,Me[13]=la,Me[14]=ma,Me[15]=Wa,Me[16]=Fa,Me[17]=Wo,Me[18]=da,ke!==0&&(Me[19]=ke,re.length++),re};Math.imul||(L=A);function _(H,N,j){j.negative=N.negative^H.negative,j.length=H.length+N.length;for(var re=0,oe=0,_e=0;_e<j.length-1;_e++){var Me=oe;oe=0;for(var ke=re&67108863,me=Math.min(_e,N.length-1),ie=Math.max(0,_e-H.length+1);ie<=me;ie++){var Se=_e-ie,Le=H.words[Se]|0,Ae=N.words[ie]|0,De=Le*Ae,Pe=De&67108863;Me=Me+(De/67108864|0)|0,Pe=Pe+ke|0,ke=Pe&67108863,Me=Me+(Pe>>>26)|0,oe+=Me>>>26,Me&=67108863}j.words[_e]=ke,re=Me,Me=oe}return re!==0?j.words[_e]=re:j.length--,j.strip()}function k(H,N,j){var re=new M;return re.mulp(H,N,j)}f.prototype.mulTo=function(N,j){var re,oe=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,j):oe<63?re=A(this,N,j):oe<1024?re=_(this,N,j):re=k(this,N,j),re};function M(H,N){this.x=H,this.y=N}M.prototype.makeRBT=function(N){for(var j=new Array(N),re=f.prototype._countBits(N)-1,oe=0;oe<N;oe++)j[oe]=this.revBin(oe,re,N);return j},M.prototype.revBin=function(N,j,re){if(N===0||N===re-1)return N;for(var oe=0,_e=0;_e<j;_e++)oe|=(N&1)<<j-_e-1,N>>=1;return oe},M.prototype.permute=function(N,j,re,oe,_e,Me){for(var ke=0;ke<Me;ke++)oe[ke]=j[N[ke]],_e[ke]=re[N[ke]]},M.prototype.transform=function(N,j,re,oe,_e,Me){this.permute(Me,N,j,re,oe,_e);for(var ke=1;ke<_e;ke<<=1)for(var me=ke<<1,ie=Math.cos(2*Math.PI/me),Se=Math.sin(2*Math.PI/me),Le=0;Le<_e;Le+=me)for(var Ae=ie,De=Se,Pe=0;Pe<ke;Pe++){var ge=re[Le+Pe],Fe=oe[Le+Pe],ce=re[Le+Pe+ke],Ze=oe[Le+Pe+ke],ct=Ae*ce-De*Ze;Ze=Ae*Ze+De*ce,ce=ct,re[Le+Pe]=ge+ce,oe[Le+Pe]=Fe+Ze,re[Le+Pe+ke]=ge-ce,oe[Le+Pe+ke]=Fe-Ze,Pe!==me&&(ct=ie*Ae-Se*De,De=ie*De+Se*Ae,Ae=ct)}},M.prototype.guessLen13b=function(N,j){var re=Math.max(j,N)|1,oe=re&1,_e=0;for(re=re/2|0;re;re=re>>>1)_e++;return 1<<_e+1+oe},M.prototype.conjugate=function(N,j,re){if(!(re<=1))for(var oe=0;oe<re/2;oe++){var _e=N[oe];N[oe]=N[re-oe-1],N[re-oe-1]=_e,_e=j[oe],j[oe]=-j[re-oe-1],j[re-oe-1]=-_e}},M.prototype.normalize13b=function(N,j){for(var re=0,oe=0;oe<j/2;oe++){var _e=Math.round(N[2*oe+1]/j)*8192+Math.round(N[2*oe]/j)+re;N[oe]=_e&67108863,_e<67108864?re=0:re=_e/67108864|0}return N},M.prototype.convert13b=function(N,j,re,oe){for(var _e=0,Me=0;Me<j;Me++)_e=_e+(N[Me]|0),re[2*Me]=_e&8191,_e=_e>>>13,re[2*Me+1]=_e&8191,_e=_e>>>13;for(Me=2*j;Me<oe;++Me)re[Me]=0;u(_e===0),u((_e&-8192)===0)},M.prototype.stub=function(N){for(var j=new Array(N),re=0;re<N;re++)j[re]=0;return j},M.prototype.mulp=function(N,j,re){var oe=2*this.guessLen13b(N.length,j.length),_e=this.makeRBT(oe),Me=this.stub(oe),ke=new Array(oe),me=new Array(oe),ie=new Array(oe),Se=new Array(oe),Le=new Array(oe),Ae=new Array(oe),De=re.words;De.length=oe,this.convert13b(N.words,N.length,ke,oe),this.convert13b(j.words,j.length,Se,oe),this.transform(ke,Me,me,ie,oe,_e),this.transform(Se,Me,Le,Ae,oe,_e);for(var Pe=0;Pe<oe;Pe++){var ge=me[Pe]*Le[Pe]-ie[Pe]*Ae[Pe];ie[Pe]=me[Pe]*Ae[Pe]+ie[Pe]*Le[Pe],me[Pe]=ge}return this.conjugate(me,ie,oe),this.transform(me,ie,De,Me,oe,_e),this.conjugate(De,Me,oe),this.normalize13b(De,oe),re.negative=N.negative^j.negative,re.length=N.length+j.length,re.strip()},f.prototype.mul=function(N){var j=new f(null);return j.words=new Array(this.length+N.length),this.mulTo(N,j)},f.prototype.mulf=function(N){var j=new f(null);return j.words=new Array(this.length+N.length),k(this,N,j)},f.prototype.imul=function(N){return this.clone().mulTo(N,this)},f.prototype.imuln=function(N){u(typeof N==\"number\"),u(N<67108864);for(var j=0,re=0;re<this.length;re++){var oe=(this.words[re]|0)*N,_e=(oe&67108863)+(j&67108863);j>>=26,j+=oe/67108864|0,j+=_e>>>26,this.words[re]=_e&67108863}return j!==0&&(this.words[re]=j,this.length++),this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var j=E(N);if(j.length===0)return new f(1);for(var re=this,oe=0;oe<j.length&&j[oe]===0;oe++,re=re.sqr());if(++oe<j.length)for(var _e=re.sqr();oe<j.length;oe++,_e=_e.sqr())j[oe]!==0&&(re=re.mul(_e));return re},f.prototype.iushln=function(N){u(typeof N==\"number\"&&N>=0);var j=N%26,re=(N-j)/26,oe=67108863>>>26-j<<26-j,_e;if(j!==0){var Me=0;for(_e=0;_e<this.length;_e++){var ke=this.words[_e]&oe,me=(this.words[_e]|0)-ke<<j;this.words[_e]=me|Me,Me=ke>>>26-j}Me&&(this.words[_e]=Me,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e<re;_e++)this.words[_e]=0;this.length+=re}return this.strip()},f.prototype.ishln=function(N){return u(this.negative===0),this.iushln(N)},f.prototype.iushrn=function(N,j,re){u(typeof N==\"number\"&&N>=0);var oe;j?oe=(j-j%26)/26:oe=0;var _e=N%26,Me=Math.min((N-_e)/26,this.length),ke=67108863^67108863>>>_e<<_e,me=re;if(oe-=Me,oe=Math.max(0,oe),me){for(var ie=0;ie<Me;ie++)me.words[ie]=this.words[ie];me.length=Me}if(Me!==0)if(this.length>Me)for(this.length-=Me,ie=0;ie<this.length;ie++)this.words[ie]=this.words[ie+Me];else this.words[0]=0,this.length=1;var Se=0;for(ie=this.length-1;ie>=0&&(Se!==0||ie>=oe);ie--){var Le=this.words[ie]|0;this.words[ie]=Se<<26-_e|Le>>>_e,Se=Le&ke}return me&&Se!==0&&(me.words[me.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,j,re){return u(this.negative===0),this.iushrn(N,j,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N==\"number\"&&N>=0);var j=N%26,re=(N-j)/26,oe=1<<j;if(this.length<=re)return!1;var _e=this.words[re];return!!(_e&oe)},f.prototype.imaskn=function(N){u(typeof N==\"number\"&&N>=0);var j=N%26,re=(N-j)/26;if(u(this.negative===0,\"imaskn works only with positive numbers\"),this.length<=re)return this;if(j!==0&&re++,this.length=Math.min(re,this.length),j!==0){var oe=67108863^67108863>>>j<<j;this.words[this.length-1]&=oe}return this.strip()},f.prototype.maskn=function(N){return this.clone().imaskn(N)},f.prototype.iaddn=function(N){return u(typeof N==\"number\"),u(N<67108864),N<0?this.isubn(-N):this.negative!==0?this.length===1&&(this.words[0]|0)<N?(this.words[0]=N-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(N),this.negative=1,this):this._iaddn(N)},f.prototype._iaddn=function(N){this.words[0]+=N;for(var j=0;j<this.length&&this.words[j]>=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},f.prototype.isubn=function(N){if(u(typeof N==\"number\"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j<this.length&&this.words[j]<0;j++)this.words[j]+=67108864,this.words[j+1]-=1;return this.strip()},f.prototype.addn=function(N){return this.clone().iaddn(N)},f.prototype.subn=function(N){return this.clone().isubn(N)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(N,j,re){var oe=N.length+re,_e;this._expand(oe);var Me,ke=0;for(_e=0;_e<N.length;_e++){Me=(this.words[_e+re]|0)+ke;var me=(N.words[_e]|0)*j;Me-=me&67108863,ke=(Me>>26)-(me/67108864|0),this.words[_e+re]=Me&67108863}for(;_e<this.length-re;_e++)Me=(this.words[_e+re]|0)+ke,ke=Me>>26,this.words[_e+re]=Me&67108863;if(ke===0)return this.strip();for(u(ke===-1),ke=0,_e=0;_e<this.length;_e++)Me=-(this.words[_e]|0)+ke,ke=Me>>26,this.words[_e]=Me&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,j){var re=this.length-N.length,oe=this.clone(),_e=N,Me=_e.words[_e.length-1]|0,ke=this._countBits(Me);re=26-ke,re!==0&&(_e=_e.ushln(re),oe.iushln(re),Me=_e.words[_e.length-1]|0);var me=oe.length-_e.length,ie;if(j!==\"mod\"){ie=new f(null),ie.length=me+1,ie.words=new Array(ie.length);for(var Se=0;Se<ie.length;Se++)ie.words[Se]=0}var Le=oe.clone()._ishlnsubmul(_e,1,me);Le.negative===0&&(oe=Le,ie&&(ie.words[me]=1));for(var Ae=me-1;Ae>=0;Ae--){var De=(oe.words[_e.length+Ae]|0)*67108864+(oe.words[_e.length+Ae-1]|0);for(De=Math.min(De/Me|0,67108863),oe._ishlnsubmul(_e,De,Ae);oe.negative!==0;)De--,oe.negative=0,oe._ishlnsubmul(_e,1,Ae),oe.isZero()||(oe.negative^=1);ie&&(ie.words[Ae]=De)}return ie&&ie.strip(),oe.strip(),j!==\"div\"&&re!==0&&oe.iushrn(re),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,j,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,Me;return this.negative!==0&&N.negative===0?(Me=this.neg().divmod(N,j),j!==\"mod\"&&(oe=Me.div.neg()),j!==\"div\"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(Me=this.divmod(N.neg(),j),j!==\"mod\"&&(oe=Me.div.neg()),{div:oe,mod:Me.mod}):(this.negative&N.negative)!==0?(Me=this.neg().divmod(N.neg(),j),j!==\"div\"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:Me.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?j===\"div\"?{div:this.divn(N.words[0]),mod:null}:j===\"mod\"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,j)},f.prototype.div=function(N){return this.divmod(N,\"div\",!1).div},f.prototype.mod=function(N){return this.divmod(N,\"mod\",!1).mod},f.prototype.umod=function(N){return this.divmod(N,\"mod\",!0).mod},f.prototype.divRound=function(N){var j=this.divmod(N);if(j.mod.isZero())return j.div;var re=j.div.negative!==0?j.mod.isub(N):j.mod,oe=N.ushrn(1),_e=N.andln(1),Me=re.cmp(oe);return Me<0||_e===1&&Me===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var j=(1<<26)%N,re=0,oe=this.length-1;oe>=0;oe--)re=(j*re+(this.words[oe]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var j=0,re=this.length-1;re>=0;re--){var oe=(this.words[re]|0)+j*67108864;this.words[re]=oe/N|0,j=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var j=this,re=N.clone();j.negative!==0?j=j.umod(N):j=j.clone();for(var oe=new f(1),_e=new f(0),Me=new f(0),ke=new f(1),me=0;j.isEven()&&re.isEven();)j.iushrn(1),re.iushrn(1),++me;for(var ie=re.clone(),Se=j.clone();!j.isZero();){for(var Le=0,Ae=1;(j.words[0]&Ae)===0&&Le<26;++Le,Ae<<=1);if(Le>0)for(j.iushrn(Le);Le-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var De=0,Pe=1;(re.words[0]&Pe)===0&&De<26;++De,Pe<<=1);if(De>0)for(re.iushrn(De);De-- >0;)(Me.isOdd()||ke.isOdd())&&(Me.iadd(ie),ke.isub(Se)),Me.iushrn(1),ke.iushrn(1);j.cmp(re)>=0?(j.isub(re),oe.isub(Me),_e.isub(ke)):(re.isub(j),Me.isub(oe),ke.isub(_e))}return{a:Me,b:ke,gcd:re.iushln(me)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var j=this,re=N.clone();j.negative!==0?j=j.umod(N):j=j.clone();for(var oe=new f(1),_e=new f(0),Me=re.clone();j.cmpn(1)>0&&re.cmpn(1)>0;){for(var ke=0,me=1;(j.words[0]&me)===0&&ke<26;++ke,me<<=1);if(ke>0)for(j.iushrn(ke);ke-- >0;)oe.isOdd()&&oe.iadd(Me),oe.iushrn(1);for(var ie=0,Se=1;(re.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Me),_e.iushrn(1);j.cmp(re)>=0?(j.isub(re),oe.isub(_e)):(re.isub(j),_e.isub(oe))}var Le;return j.cmpn(1)===0?Le=oe:Le=_e,Le.cmpn(0)<0&&Le.iadd(N),Le},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var j=this.clone(),re=N.clone();j.negative=0,re.negative=0;for(var oe=0;j.isEven()&&re.isEven();oe++)j.iushrn(1),re.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=j.cmp(re);if(_e<0){var Me=j;j=re,re=Me}else if(_e===0||re.cmpn(1)===0)break;j.isub(re)}while(!0);return re.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N==\"number\");var j=N%26,re=(N-j)/26,oe=1<<j;if(this.length<=re)return this._expand(re+1),this.words[re]|=oe,this;for(var _e=oe,Me=re;_e!==0&&Me<this.length;Me++){var ke=this.words[Me]|0;ke+=_e,_e=ke>>>26,ke&=67108863,this.words[Me]=ke}return _e!==0&&(this.words[Me]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var j=N<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var re;if(this.length>1)re=1;else{j&&(N=-N),u(N<=67108863,\"Number is too big\");var oe=this.words[0]|0;re=oe===N?0:oe<N?-1:1}return this.negative!==0?-re|0:re},f.prototype.cmp=function(N){if(this.negative!==0&&N.negative===0)return-1;if(this.negative===0&&N.negative!==0)return 1;var j=this.ucmp(N);return this.negative!==0?-j|0:j},f.prototype.ucmp=function(N){if(this.length>N.length)return 1;if(this.length<N.length)return-1;for(var j=0,re=this.length-1;re>=0;re--){var oe=this.words[re]|0,_e=N.words[re]|0;if(oe!==_e){oe<_e?j=-1:oe>_e&&(j=1);break}}return j},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,\"Already a number in reduction context\"),u(this.negative===0,\"red works only with positives\"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,\"Already a number in reduction context\"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,\"redAdd works only with red numbers\"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,\"redSub works only with red numbers\"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,\"redISub works only with red numbers\"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,\"redShl works only with red numbers\"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(H,N){this.name=H,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var j=N,re;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),re=j.bitLength();while(re>this.n);var oe=re<this.n?-1:j.ucmp(this.p);return oe===0?(j.words[0]=0,j.length=1):oe>0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},P.prototype.split=function(N,j){N.iushrn(this.n,0,j)},P.prototype.imulK=function(N){return N.imul(this.k)};function T(){P.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}c(T,P),T.prototype.split=function(N,j){for(var re=4194303,oe=Math.min(N.length,9),_e=0;_e<oe;_e++)j.words[_e]=N.words[_e];if(j.length=oe,N.length<=9){N.words[0]=0,N.length=1;return}var Me=N.words[9];for(j.words[j.length++]=Me&re,_e=10;_e<N.length;_e++){var ke=N.words[_e]|0;N.words[_e-10]=(ke&re)<<4|Me>>>22,Me=ke}Me>>>=22,N.words[_e-10]=Me,Me===0&&N.length>10?N.length-=10:N.length-=9},T.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var j=0,re=0;re<N.length;re++){var oe=N.words[re]|0;j+=oe*977,N.words[re]=j&67108863,j=oe*64+(j/67108864|0)}return N.words[N.length-1]===0&&(N.length--,N.words[N.length-1]===0&&N.length--),N};function z(){P.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}c(z,P);function O(){P.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}c(O,P);function V(){P.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}c(V,P),V.prototype.imulK=function(N){for(var j=0,re=0;re<N.length;re++){var oe=(N.words[re]|0)*19+j,_e=oe&67108863;oe>>>=26,N.words[re]=_e,j=oe}return j!==0&&(N.words[N.length++]=j),N},f._prime=function(N){if(g[N])return g[N];var j;if(N===\"k256\")j=new T;else if(N===\"p224\")j=new z;else if(N===\"p192\")j=new O;else if(N===\"p25519\")j=new V;else throw new Error(\"Unknown prime \"+N);return g[N]=j,j};function G(H){if(typeof H==\"string\"){var N=f._prime(H);this.m=N.p,this.prime=N}else u(H.gtn(1),\"modulus must be greater than 1\"),this.m=H,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,\"red works only with positives\"),u(N.red,\"red works only with red numbers\")},G.prototype._verify2=function(N,j){u((N.negative|j.negative)===0,\"red works only with positives\"),u(N.red&&N.red===j.red,\"red works only with red numbers\")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,j){this._verify2(N,j);var re=N.add(j);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},G.prototype.iadd=function(N,j){this._verify2(N,j);var re=N.iadd(j);return re.cmp(this.m)>=0&&re.isub(this.m),re},G.prototype.sub=function(N,j){this._verify2(N,j);var re=N.sub(j);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},G.prototype.isub=function(N,j){this._verify2(N,j);var re=N.isub(j);return re.cmpn(0)<0&&re.iadd(this.m),re},G.prototype.shl=function(N,j){return this._verify1(N),this.imod(N.ushln(j))},G.prototype.imul=function(N,j){return this._verify2(N,j),this.imod(N.imul(j))},G.prototype.mul=function(N,j){return this._verify2(N,j),this.imod(N.mul(j))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var j=this.m.andln(3);if(u(j%2===1),j===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var Me=new f(1).toRed(this),ke=Me.redNeg(),me=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,me).cmp(ke)!==0;)ie.redIAdd(ke);for(var Se=this.pow(ie,oe),Le=this.pow(N,oe.addn(1).iushrn(1)),Ae=this.pow(N,oe),De=_e;Ae.cmp(Me)!==0;){for(var Pe=Ae,ge=0;Pe.cmp(Me)!==0;ge++)Pe=Pe.redSqr();u(ge<De);var Fe=this.pow(Se,new f(1).iushln(De-ge-1));Le=Le.redMul(Fe),Se=Fe.redSqr(),Ae=Ae.redMul(Se),De=ge}return Le},G.prototype.invm=function(N){var j=N._invmp(this.m);return j.negative!==0?(j.negative=0,this.imod(j).redNeg()):this.imod(j)},G.prototype.pow=function(N,j){if(j.isZero())return new f(1).toRed(this);if(j.cmpn(1)===0)return N.clone();var re=4,oe=new Array(1<<re);oe[0]=new f(1).toRed(this),oe[1]=N;for(var _e=2;_e<oe.length;_e++)oe[_e]=this.mul(oe[_e-1],N);var Me=oe[0],ke=0,me=0,ie=j.bitLength()%26;for(ie===0&&(ie=26),_e=j.length-1;_e>=0;_e--){for(var Se=j.words[_e],Le=ie-1;Le>=0;Le--){var Ae=Se>>Le&1;if(Me!==oe[0]&&(Me=this.sqr(Me)),Ae===0&&ke===0){me=0;continue}ke<<=1,ke|=Ae,me++,!(me!==re&&(_e!==0||Le!==0))&&(Me=this.mul(Me,oe[ke]),me=0,ke=0)}ie=26}return Me},G.prototype.convertTo=function(N){var j=N.umod(this.m);return j===N?j.clone():j},G.prototype.convertFrom=function(N){var j=N.clone();return j.red=null,j},f.mont=function(N){return new Z(N)};function Z(H){G.call(this,H),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var j=this.imod(N.mul(this.rinv));return j.red=null,j},Z.prototype.imul=function(N,j){if(N.isZero()||j.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(j),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},Z.prototype.mul=function(N,j){if(N.isZero()||j.isZero())return new f(0)._forceRed(this);var re=N.mul(j),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},Z.prototype.invm=function(N){var j=this.imod(N._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(i,this)},6204:function(i){\"use strict\";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s<c;++s)f+=o[s].length;var h=new Array(f),d=0;for(s=0;s<c;++s){var v=o[s],x=v.length;for(l=0;l<x;++l){var b=h[d++]=new Array(x-1),p=0;for(u=0;u<x;++u)u!==l&&(b[p++]=v[u]);if(l&1){var C=b[1];b[1]=b[0],b[0]=C}}}return h}},6867:function(i,a,o){\"use strict\";i.exports=p;var s=o(1888),l=o(855),u=o(7150);function c(C,E){for(var A=0;A<C;++A)if(!(E[A]<=E[A+C]))return!0;return!1}function f(C,E,A,L){for(var _=0,k=0,M=0,g=C.length;M<g;++M){var P=C[M];if(!c(E,P)){for(var T=0;T<2*E;++T)A[_++]=P[T];L[k++]=M}}return k}function h(C,E,A,L){var _=C.length,k=E.length;if(!(_<=0||k<=0)){var M=C[0].length>>>1;if(!(M<=0)){var g,P=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=f(C,M,P,T),_>0){if(M===1&&L)l.init(_),g=l.sweepComplete(M,A,0,_,P,T,0,_,P,T);else{var z=s.mallocDouble(2*M*k),O=s.mallocInt32(k);k=f(E,M,z,O),k>0&&(l.init(_+k),M===1?g=l.sweepBipartite(M,A,0,_,P,T,0,k,z,O):g=u(M,A,L,_,P,T,k,z,O),s.free(z),s.free(O))}s.free(P),s.free(T)}return g}}}var d;function v(C,E){d.push([C,E])}function x(C){return d=[],h(C,C,v,!0),d}function b(C,E){return d=[],h(C,E,v,!1),d}function p(C,E,A){switch(arguments.length){case 1:return x(C);case 2:return typeof E==\"function\"?h(C,C,E,!0):b(C,E);case 3:return h(C,E,A,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}}},2455:function(i,a){\"use strict\";function o(){function u(h,d,v,x,b,p,C,E,A,L,_){for(var k=2*h,M=x,g=k*x;M<b;++M,g+=k){var P=p[d+g],T=p[d+g+h],z=C[M];e:for(var O=E,V=k*E;O<A;++O,V+=k){var G=L[d+V],Z=L[d+V+h],H=_[O];if(!(Z<P||T<G)){for(var N=d+1;N<h;++N){var j=p[N+g],re=p[N+h+g],oe=L[N+V],_e=L[N+h+V];if(re<oe||_e<j)continue e}var Me=v(z,H);if(Me!==void 0)return Me}}}}function c(h,d,v,x,b,p,C,E,A,L,_){for(var k=2*h,M=E,g=k*E;M<A;++M,g+=k){var P=L[d+g],T=L[d+g+h],z=_[M];e:for(var O=x,V=k*x;O<b;++O,V+=k){var G=p[d+V],Z=p[d+V+h],H=C[O];if(!(T<G||Z<P)){for(var N=d+1;N<h;++N){var j=p[N+V],re=p[N+h+V],oe=L[N+g],_e=L[N+h+g];if(re<oe||_e<j)continue e}var Me=v(H,z);if(Me!==void 0)return Me}}}}function f(h,d,v,x,b,p,C,E,A,L,_){return b-x>A-E?u(h,d,v,x,b,p,C,E,A,L,_):c(h,d,v,x,b,p,C,E,A,L,_)}return f}function s(){function u(v,x,b,p,C,E,A,L,_,k,M){for(var g=2*v,P=p,T=g*p;P<C;++P,T+=g){var z=E[x+T],O=E[x+T+v],V=A[P];e:for(var G=L,Z=g*L;G<_;++G,Z+=g){var H=k[x+Z],N=M[G];if(!(H<=z||O<H)){for(var j=x+1;j<v;++j){var re=E[j+T],oe=E[j+v+T],_e=k[j+Z],Me=k[j+v+Z];if(oe<_e||Me<re)continue e}var ke=b(N,V);if(ke!==void 0)return ke}}}}function c(v,x,b,p,C,E,A,L,_,k,M){for(var g=2*v,P=p,T=g*p;P<C;++P,T+=g){var z=E[x+T],O=E[x+T+v],V=A[P];e:for(var G=L,Z=g*L;G<_;++G,Z+=g){var H=k[x+Z],N=M[G];if(!(H<z||O<H)){for(var j=x+1;j<v;++j){var re=E[j+T],oe=E[j+v+T],_e=k[j+Z],Me=k[j+v+Z];if(oe<_e||Me<re)continue e}var ke=b(V,N);if(ke!==void 0)return ke}}}}function f(v,x,b,p,C,E,A,L,_,k,M){for(var g=2*v,P=L,T=g*L;P<_;++P,T+=g){var z=k[x+T],O=M[P];e:for(var V=p,G=g*p;V<C;++V,G+=g){var Z=E[x+G],H=E[x+G+v],N=A[V];if(!(z<=Z||H<z)){for(var j=x+1;j<v;++j){var re=E[j+G],oe=E[j+v+G],_e=k[j+T],Me=k[j+v+T];if(oe<_e||Me<re)continue e}var ke=b(O,N);if(ke!==void 0)return ke}}}}function h(v,x,b,p,C,E,A,L,_,k,M){for(var g=2*v,P=L,T=g*L;P<_;++P,T+=g){var z=k[x+T],O=M[P];e:for(var V=p,G=g*p;V<C;++V,G+=g){var Z=E[x+G],H=E[x+G+v],N=A[V];if(!(z<Z||H<z)){for(var j=x+1;j<v;++j){var re=E[j+G],oe=E[j+v+G],_e=k[j+T],Me=k[j+v+T];if(oe<_e||Me<re)continue e}var ke=b(N,O);if(ke!==void 0)return ke}}}}function d(v,x,b,p,C,E,A,L,_,k,M,g){return E-C>k-_?p?u(v,x,b,C,E,A,L,_,k,M,g):c(v,x,b,C,E,A,L,_,k,M,g):p?f(v,x,b,C,E,A,L,_,k,M,g):h(v,x,b,C,E,A,L,_,k,M,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){\"use strict\";i.exports=H;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),x=128,b=1<<22,p=1<<22,C=v(\"!(lo>=p0)&&!(p1>=hi)\"),E=v(\"lo===p0\"),A=v(\"lo<p0\"),L=v(\"hi<=p0\"),_=v(\"lo<=p0&&p0<=hi\"),k=v(\"lo<p0&&p0<=hi\"),M=6,g=2,P=1024,T=s.mallocInt32(P),z=s.mallocDouble(P);function O(N,j){var re=8*l.log2(j+1)*(N+1)|0,oe=l.nextPow2(M*re);T.length<oe&&(s.free(T),T=s.mallocInt32(oe));var _e=l.nextPow2(g*re);z.length<_e&&(s.free(z),z=s.mallocDouble(_e))}function V(N,j,re,oe,_e,Me,ke,me,ie){var Se=M*N;T[Se]=j,T[Se+1]=re,T[Se+2]=oe,T[Se+3]=_e,T[Se+4]=Me,T[Se+5]=ke;var Le=g*N;z[Le]=me,z[Le+1]=ie}function G(N,j,re,oe,_e,Me,ke,me,ie,Se,Le){var Ae=2*N,De=ie*Ae,Pe=Se[De+j];e:for(var ge=_e,Fe=_e*Ae;ge<Me;++ge,Fe+=Ae){var ce=ke[Fe+j],Ze=ke[Fe+j+N];if(!(Pe<ce||Ze<Pe)&&!(oe&&Pe===ce)){for(var ct=me[ge],pt=j+1;pt<N;++pt){var ce=ke[Fe+pt],Ze=ke[Fe+pt+N],Wt=Se[De+pt],st=Se[De+pt+N];if(Ze<Wt||st<ce)continue e}var lt;if(oe?lt=re(Le,ct):lt=re(ct,Le),lt!==void 0)return lt}}}function Z(N,j,re,oe,_e,Me,ke,me,ie,Se){var Le=2*N,Ae=me*Le,De=ie[Ae+j];e:for(var Pe=oe,ge=oe*Le;Pe<_e;++Pe,ge+=Le){var Fe=ke[Pe];if(Fe!==Se){var ce=Me[ge+j],Ze=Me[ge+j+N];if(!(De<ce||Ze<De)){for(var ct=j+1;ct<N;++ct){var ce=Me[ge+ct],Ze=Me[ge+ct+N],pt=ie[Ae+ct],Wt=ie[Ae+ct+N];if(Ze<pt||Wt<ce)continue e}var st=re(Fe,Se);if(st!==void 0)return st}}}}function H(N,j,re,oe,_e,Me,ke,me,ie){O(N,oe+ke);var Se=0,Le=2*N,Ae;for(V(Se++,0,0,oe,0,ke,re?16:0,-1/0,1/0),re||V(Se++,0,0,ke,0,oe,1,-1/0,1/0);Se>0;){Se-=1;var De=Se*M,Pe=T[De],ge=T[De+1],Fe=T[De+2],ce=T[De+3],Ze=T[De+4],ct=T[De+5],pt=Se*g,Wt=z[pt],st=z[pt+1],lt=ct&1,Gt=!!(ct&16),Nt=_e,$t=Me,sr=me,wr=ie;if(lt&&(Nt=me,$t=ie,sr=_e,wr=Me),!(ct&2&&(Fe=A(N,Pe,ge,Fe,Nt,$t,st),ge>=Fe))&&!(ct&4&&(ge=L(N,Pe,ge,Fe,Nt,$t,Wt),ge>=Fe))){var ur=Fe-ge,Qe=Ze-ce;if(Gt){if(N*ur*(ur+Qe)<p){if(Ae=h.scanComplete(N,Pe,j,ge,Fe,Nt,$t,ce,Ze,sr,wr),Ae!==void 0)return Ae;continue}}else if(N*Math.min(ur,Qe)<x){if(Ae=c(N,Pe,j,lt,ge,Fe,Nt,$t,ce,Ze,sr,wr),Ae!==void 0)return Ae;continue}else if(N*ur*Qe<b){if(Ae=h.scanBipartite(N,Pe,j,lt,ge,Fe,Nt,$t,ce,Ze,sr,wr),Ae!==void 0)return Ae;continue}var Et=C(N,Pe,ge,Fe,Nt,$t,Wt,st);if(ge<Et)if(N*(Et-ge)<x){if(Ae=f(N,Pe+1,j,ge,Et,Nt,$t,ce,Ze,sr,wr),Ae!==void 0)return Ae}else if(Pe===N-2){if(lt?Ae=h.sweepBipartite(N,j,ce,Ze,sr,wr,ge,Et,Nt,$t):Ae=h.sweepBipartite(N,j,ge,Et,Nt,$t,ce,Ze,sr,wr),Ae!==void 0)return Ae}else V(Se++,Pe+1,ge,Et,ce,Ze,lt,-1/0,1/0),V(Se++,Pe+1,ce,Ze,ge,Et,lt^1,-1/0,1/0);if(Et<Fe){var er=d(N,Pe,ce,Ze,sr,wr),Ut=sr[Le*er+Pe],Ft=E(N,Pe,er,Ze,sr,wr,Ut);if(Ft<Ze&&V(Se++,Pe,Et,Fe,Ft,Ze,(lt|4)+(Gt?16:0),Ut,st),ce<er&&V(Se++,Pe,Et,Fe,ce,er,(lt|2)+(Gt?16:0),Wt,Ut),er+1===Ft){if(Gt?Ae=Z(N,Pe,j,Et,Fe,Nt,$t,er,sr,wr[er]):Ae=G(N,Pe,j,lt,Et,Fe,Nt,$t,er,sr,wr[er]),Ae!==void 0)return Ae}else if(er<Ft){var bt;if(Gt){if(bt=_(N,Pe,Et,Fe,Nt,$t,Ut),Et<bt){var yt=E(N,Pe,Et,bt,Nt,$t,Ut);if(Pe===N-2){if(Et<yt&&(Ae=h.sweepComplete(N,j,Et,yt,Nt,$t,er,Ft,sr,wr),Ae!==void 0)||yt<bt&&(Ae=h.sweepBipartite(N,j,yt,bt,Nt,$t,er,Ft,sr,wr),Ae!==void 0))return Ae}else Et<yt&&V(Se++,Pe+1,Et,yt,er,Ft,16,-1/0,1/0),yt<bt&&(V(Se++,Pe+1,yt,bt,er,Ft,0,-1/0,1/0),V(Se++,Pe+1,er,Ft,yt,bt,1,-1/0,1/0))}}else lt?bt=k(N,Pe,Et,Fe,Nt,$t,Ut):bt=_(N,Pe,Et,Fe,Nt,$t,Ut),Et<bt&&(Pe===N-2?lt?Ae=h.sweepBipartite(N,j,er,Ft,sr,wr,Et,bt,Nt,$t):Ae=h.sweepBipartite(N,j,Et,bt,Nt,$t,er,Ft,sr,wr):(V(Se++,Pe+1,Et,bt,er,Ft,lt,-1/0,1/0),V(Se++,Pe+1,er,Ft,Et,bt,lt^1,-1/0,1/0)))}}}}}},3545:function(i,a,o){\"use strict\";i.exports=f;var s=o(8105),l=s(\"lo<p0\"),u=8;function c(h,d,v,x,b,p){for(var C=2*h,E=C*(v+1)+d,A=v+1;A<x;++A,E+=C)for(var L=b[E],_=A,k=C*(A-1);_>v&&b[k+d]>L;--_,k-=C){for(var M=k,g=k+C,P=0;P<C;++P,++M,++g){var T=b[M];b[M]=b[g],b[g]=T}var z=p[_];p[_]=p[_-1],p[_-1]=z}}function f(h,d,v,x,b,p){if(x<=v+1)return v;for(var C=v,E=x,A=x+v>>>1,L=2*h,_=A,k=b[L*A+d];C<E;){if(E-C<u){c(h,d,C,E,b,p),k=b[L*A+d];break}var M=E-C,g=Math.random()*M+C|0,P=b[L*g+d],T=Math.random()*M+C|0,z=b[L*T+d],O=Math.random()*M+C|0,V=b[L*O+d];P<=z?V>=z?(_=T,k=z):P>=V?(_=g,k=P):(_=O,k=V):z>=V?(_=T,k=z):V>=P?(_=g,k=P):(_=O,k=V);for(var H=L*(E-1),N=L*_,G=0;G<L;++G,++H,++N){var Z=b[H];b[H]=b[N],b[N]=Z}var j=p[E-1];p[E-1]=p[_],p[_]=j,_=l(h,d,C,E-1,b,p,k);for(var H=L*(E-1),N=L*_,G=0;G<L;++G,++H,++N){var Z=b[H];b[H]=b[N],b[N]=Z}var j=p[E-1];if(p[E-1]=p[_],p[_]=j,A<_){for(E=_-1;C<E&&b[L*(E-1)+d]===k;)E-=1;E+=1}else if(_<A)for(C=_+1;C<E&&b[L*C+d]===k;)C+=1;else break}return l(h,d,v,A,b,p,b[L*A+d])}},8105:function(i){\"use strict\";i.exports=o;var a={\"lo===p0\":s,\"lo<p0\":l,\"lo<=p0\":u,\"hi<=p0\":c,\"lo<p0&&p0<=hi\":h,\"lo<=p0&&p0<=hi\":f,\"!(lo>=p0)&&!(p1>=hi)\":d};function o(v){return a[v]}function s(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+g];if(z===A)if(M===T)M+=1,k+=L;else{for(var O=0;L>O;++O){var V=C[_+O];C[_+O]=C[k],C[k++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function l(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+g];if(z<A)if(M===T)M+=1,k+=L;else{for(var O=0;L>O;++O){var V=C[_+O];C[_+O]=C[k],C[k++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function u(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+P];if(z<=A)if(M===T)M+=1,k+=L;else{for(var O=0;L>O;++O){var V=C[_+O];C[_+O]=C[k],C[k++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function c(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+P];if(z<=A)if(M===T)M+=1,k+=L;else{for(var O=0;L>O;++O){var V=C[_+O];C[_+O]=C[k],C[k++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function f(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+g],O=C[_+P];if(z<=A&&A<=O)if(M===T)M+=1,k+=L;else{for(var V=0;L>V;++V){var G=C[_+V];C[_+V]=C[k],C[k++]=G}var Z=E[T];E[T]=E[M],E[M++]=Z}}return M}function h(v,x,b,p,C,E,A){for(var L=2*v,_=L*b,k=_,M=b,g=x,P=v+x,T=b;p>T;++T,_+=L){var z=C[_+g],O=C[_+P];if(z<A&&A<=O)if(M===T)M+=1,k+=L;else{for(var V=0;L>V;++V){var G=C[_+V];C[_+V]=C[k],C[k++]=G}var Z=E[T];E[T]=E[M],E[M++]=Z}}return M}function d(v,x,b,p,C,E,A,L){for(var _=2*v,k=_*b,M=k,g=b,P=x,T=v+x,z=b;p>z;++z,k+=_){var O=C[k+P],V=C[k+T];if(!(O>=A)&&!(L>=V))if(g===z)g+=1,M+=_;else{for(var G=0;_>G;++G){var Z=C[k+G];C[k+G]=C[M],C[M++]=Z}var H=E[z];E[z]=E[g],E[g++]=H}}return g}},4192:function(i){\"use strict\";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):v(0,b-1,x)}function s(x,b,p){for(var C=2*(x+1),E=x+1;E<=b;++E){for(var A=p[C++],L=p[C++],_=E,k=C-2;_-- >x;){var M=p[k-2],g=p[k-1];if(M<A)break;if(M===A&&g<L)break;p[k]=M,p[k+1]=g,k-=2}p[k]=A,p[k+1]=L}}function l(x,b,p){x*=2,b*=2;var C=p[x],E=p[x+1];p[x]=p[b],p[x+1]=p[b+1],p[b]=C,p[b+1]=E}function u(x,b,p){x*=2,b*=2,p[x]=p[b],p[x+1]=p[b+1]}function c(x,b,p,C){x*=2,b*=2,p*=2;var E=C[x],A=C[x+1];C[x]=C[b],C[x+1]=C[b+1],C[b]=C[p],C[b+1]=C[p+1],C[p]=E,C[p+1]=A}function f(x,b,p,C,E){x*=2,b*=2,E[x]=E[b],E[b]=p,E[x+1]=E[b+1],E[b+1]=C}function h(x,b,p){x*=2,b*=2;var C=p[x],E=p[b];return C<E?!1:C===E?p[x+1]>p[b+1]:!0}function d(x,b,p,C){x*=2;var E=C[x];return E<b?!0:E===b?C[x+1]<p:!1}function v(x,b,p){var C=(b-x+1)/6|0,E=x+C,A=b-C,L=x+b>>1,_=L-C,k=L+C,M=E,g=_,P=L,T=k,z=A,O=x+1,V=b-1,G=0;h(M,g,p)&&(G=M,M=g,g=G),h(T,z,p)&&(G=T,T=z,z=G),h(M,P,p)&&(G=M,M=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(M,T,p)&&(G=M,M=T,T=G),h(P,T,p)&&(G=P,P=T,T=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(T,z,p)&&(G=T,T=z,z=G);for(var Z=p[2*g],H=p[2*g+1],N=p[2*T],j=p[2*T+1],re=2*M,oe=2*P,_e=2*z,Me=2*E,ke=2*L,me=2*A,ie=0;ie<2;++ie){var Se=p[re+ie],Le=p[oe+ie],Ae=p[_e+ie];p[Me+ie]=Se,p[ke+ie]=Le,p[me+ie]=Ae}u(_,x,p),u(k,b,p);for(var De=O;De<=V;++De)if(d(De,Z,H,p))De!==O&&l(De,O,p),++O;else if(!d(De,N,j,p))for(;;)if(d(V,N,j,p)){d(V,Z,H,p)?(c(De,O,V,p),++O,--V):(l(De,V,p),--V);break}else{if(--V<De)break;continue}f(x,O-1,Z,H,p),f(b,V+1,N,j,p),O-2-x<=a?s(x,O-2,p):v(x,O-2,p),b-(V+2)<=a?s(V+2,b,p):v(V+2,b,p),V-O<=a?s(O,V,p):v(O,V,p)}},855:function(i,a,o){\"use strict\";i.exports={init:E,sweepBipartite:_,sweepComplete:k,scanBipartite:M,scanComplete:g};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),v=s.mallocInt32(f),x=s.mallocInt32(f),b=s.mallocInt32(f),p=s.mallocInt32(f),C=s.mallocDouble(f*8);function E(P){var T=l.nextPow2(P);h.length<T&&(s.free(h),h=s.mallocInt32(T)),d.length<T&&(s.free(d),d=s.mallocInt32(T)),v.length<T&&(s.free(v),v=s.mallocInt32(T)),x.length<T&&(s.free(x),x=s.mallocInt32(T)),b.length<T&&(s.free(b),b=s.mallocInt32(T)),p.length<T&&(s.free(p),p=s.mallocInt32(T));var z=8*T;C.length<z&&(s.free(C),C=s.mallocDouble(z))}function A(P,T,z,O){var V=T[O],G=P[z-1];P[V]=G,T[G]=V}function L(P,T,z,O){P[z]=O,T[O]=z}function _(P,T,z,O,V,G,Z,H,N,j){for(var re=0,oe=2*P,_e=P-1,Me=oe-1,ke=z;ke<O;++ke){var me=G[ke],ie=oe*ke;C[re++]=V[ie+_e],C[re++]=-(me+1),C[re++]=V[ie+Me],C[re++]=me}for(var ke=Z;ke<H;++ke){var me=j[ke]+c,Se=oe*ke;C[re++]=N[Se+_e],C[re++]=-me,C[re++]=N[Se+Me],C[re++]=me}var Le=re>>>1;u(C,Le);for(var Ae=0,De=0,ke=0;ke<Le;++ke){var Pe=C[2*ke+1]|0;if(Pe>=c)Pe=Pe-c|0,A(v,x,De--,Pe);else if(Pe>=0)A(h,d,Ae--,Pe);else if(Pe<=-c){Pe=-Pe-c|0;for(var ge=0;ge<Ae;++ge){var Fe=T(h[ge],Pe);if(Fe!==void 0)return Fe}L(v,x,De++,Pe)}else{Pe=-Pe-1|0;for(var ge=0;ge<De;++ge){var Fe=T(Pe,v[ge]);if(Fe!==void 0)return Fe}L(h,d,Ae++,Pe)}}}function k(P,T,z,O,V,G,Z,H,N,j){for(var re=0,oe=2*P,_e=P-1,Me=oe-1,ke=z;ke<O;++ke){var me=G[ke]+1<<1,ie=oe*ke;C[re++]=V[ie+_e],C[re++]=-me,C[re++]=V[ie+Me],C[re++]=me}for(var ke=Z;ke<H;++ke){var me=j[ke]+1<<1,Se=oe*ke;C[re++]=N[Se+_e],C[re++]=-me|1,C[re++]=N[Se+Me],C[re++]=me|1}var Le=re>>>1;u(C,Le);for(var Ae=0,De=0,Pe=0,ke=0;ke<Le;++ke){var ge=C[2*ke+1]|0,Fe=ge&1;if(ke<Le-1&&ge>>1===C[2*ke+3]>>1&&(Fe=2,ke+=1),ge<0){for(var ce=-(ge>>1)-1,Ze=0;Ze<Pe;++Ze){var ct=T(b[Ze],ce);if(ct!==void 0)return ct}if(Fe!==0)for(var Ze=0;Ze<Ae;++Ze){var ct=T(h[Ze],ce);if(ct!==void 0)return ct}if(Fe!==1)for(var Ze=0;Ze<De;++Ze){var ct=T(v[Ze],ce);if(ct!==void 0)return ct}Fe===0?L(h,d,Ae++,ce):Fe===1?L(v,x,De++,ce):Fe===2&&L(b,p,Pe++,ce)}else{var ce=(ge>>1)-1;Fe===0?A(h,d,Ae--,ce):Fe===1?A(v,x,De--,ce):Fe===2&&A(b,p,Pe--,ce)}}}function M(P,T,z,O,V,G,Z,H,N,j,re,oe){var _e=0,Me=2*P,ke=T,me=T+P,ie=1,Se=1;O?Se=c:ie=c;for(var Le=V;Le<G;++Le){var Ae=Le+ie,De=Me*Le;C[_e++]=Z[De+ke],C[_e++]=-Ae,C[_e++]=Z[De+me],C[_e++]=Ae}for(var Le=N;Le<j;++Le){var Ae=Le+Se,Pe=Me*Le;C[_e++]=re[Pe+ke],C[_e++]=-Ae}var ge=_e>>>1;u(C,ge);for(var Fe=0,Le=0;Le<ge;++Le){var ce=C[2*Le+1]|0;if(ce<0){var Ae=-ce,Ze=!1;if(Ae>=c?(Ze=!O,Ae-=c):(Ze=!!O,Ae-=1),Ze)L(h,d,Fe++,Ae);else{var ct=oe[Ae],pt=Me*Ae,Wt=re[pt+T+1],st=re[pt+T+1+P];e:for(var lt=0;lt<Fe;++lt){var Gt=h[lt],Nt=Me*Gt;if(!(st<Z[Nt+T+1]||Z[Nt+T+1+P]<Wt)){for(var $t=T+2;$t<P;++$t)if(re[pt+$t+P]<Z[Nt+$t]||Z[Nt+$t+P]<re[pt+$t])continue e;var sr=H[Gt],wr;if(O?wr=z(ct,sr):wr=z(sr,ct),wr!==void 0)return wr}}}}else A(h,d,Fe--,ce-ie)}}function g(P,T,z,O,V,G,Z,H,N,j,re){for(var oe=0,_e=2*P,Me=T,ke=T+P,me=O;me<V;++me){var ie=me+c,Se=_e*me;C[oe++]=G[Se+Me],C[oe++]=-ie,C[oe++]=G[Se+ke],C[oe++]=ie}for(var me=H;me<N;++me){var ie=me+1,Le=_e*me;C[oe++]=j[Le+Me],C[oe++]=-ie}var Ae=oe>>>1;u(C,Ae);for(var De=0,me=0;me<Ae;++me){var Pe=C[2*me+1]|0;if(Pe<0){var ie=-Pe;if(ie>=c)h[De++]=ie-c;else{ie-=1;var ge=re[ie],Fe=_e*ie,ce=j[Fe+T+1],Ze=j[Fe+T+1+P];e:for(var ct=0;ct<De;++ct){var pt=h[ct],Wt=Z[pt];if(Wt===ge)break;var st=_e*pt;if(!(Ze<G[st+T+1]||G[st+T+1+P]<ce)){for(var lt=T+2;lt<P;++lt)if(j[Fe+lt+P]<G[st+lt]||G[st+lt+P]<j[Fe+lt])continue e;var Gt=z(Wt,ge);if(Gt!==void 0)return Gt}}}}else{for(var ie=Pe-c,ct=De-1;ct>=0;--ct)if(h[ct]===ie){for(var lt=ct+1;lt<De;++lt)h[lt-1]=h[lt];break}--De}}}},2538:function(i,a,o){\"use strict\";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);i.exports=x;function f(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,p){return b[0]-p[0]||b[1]-p[1]}function d(b){return b.map(f).sort(h)}function v(b,p,C){return p in b?b[p]:C}function x(b,p,C){Array.isArray(p)?(C=C||{},p=p||[]):(C=p||{},p=[]);var E=!!v(C,\"delaunay\",!0),A=!!v(C,\"interior\",!0),L=!!v(C,\"exterior\",!0),_=!!v(C,\"infinity\",!1);if(!A&&!L||b.length===0)return[];var k=s(b,p);if(E||A!==L||_){for(var M=l(b.length,d(p)),g=0;g<k.length;++g){var P=k[g];M.addTriangle(P[0],P[1],P[2])}return E&&u(b,M),L?A?_?c(M,0,_):M.cells():c(M,1,_):c(M,-1)}else return k}},2272:function(i,a,o){\"use strict\";var s=o(2646)[4],l=o(2478);i.exports=c;function u(f,h,d,v,x,b){var p=h.opposite(v,x);if(!(p<0)){if(x<v){var C=v;v=x,x=C,C=b,b=p,p=C}h.isConstraint(v,x)||s(f[v],f[x],f[b],f[p])<0&&d.push(v,x)}}function c(f,h){for(var d=[],v=f.length,x=h.stars,b=0;b<v;++b)for(var p=x[b],C=1;C<p.length;C+=2){var E=p[C];if(!(E<b)&&!h.isConstraint(b,E)){for(var A=p[C-1],L=-1,_=1;_<p.length;_+=2)if(p[_-1]===E){L=p[_];break}L<0||s(f[b],f[E],f[A],f[L])<0&&d.push(b,E)}}for(;d.length>0;){for(var E=d.pop(),b=d.pop(),A=-1,L=-1,p=x[b],k=1;k<p.length;k+=2){var M=p[k-1],g=p[k];M===E?L=g:g===E&&(A=M)}A<0||L<0||s(f[b],f[E],f[A],f[L])>=0||(h.flip(b,E),u(f,h,d,A,b,L),u(f,h,d,b,L,A),u(f,h,d,L,E,A),u(f,h,d,E,A,L))}}},5023:function(i,a,o){\"use strict\";var s=o(2478);i.exports=d;function l(v,x,b,p,C,E,A){this.cells=v,this.neighbor=x,this.flags=p,this.constraint=b,this.active=C,this.next=E,this.boundary=A}var u=l.prototype;function c(v,x){return v[0]-x[0]||v[1]-x[1]||v[2]-x[2]}u.locate=function(){var v=[0,0,0];return function(x,b,p){var C=x,E=b,A=p;return b<p?b<x&&(C=b,E=p,A=x):p<x&&(C=p,E=x,A=b),C<0?-1:(v[0]=C,v[1]=E,v[2]=A,s.eq(this.cells,v,c))}}();function f(v,x){for(var b=v.cells(),p=b.length,C=0;C<p;++C){var E=b[C],A=E[0],L=E[1],_=E[2];L<_?L<A&&(E[0]=L,E[1]=_,E[2]=A):_<A&&(E[0]=_,E[1]=A,E[2]=L)}b.sort(c);for(var k=new Array(p),C=0;C<k.length;++C)k[C]=0;var M=[],g=[],P=new Array(3*p),T=new Array(3*p),z=null;x&&(z=[]);for(var O=new l(b,P,T,k,M,g,z),C=0;C<p;++C)for(var E=b[C],V=0;V<3;++V){var A=E[V],L=E[(V+1)%3],G=P[3*C+V]=O.locate(L,A,v.opposite(L,A)),Z=T[3*C+V]=v.isConstraint(A,L);G<0&&(Z?g.push(C):(M.push(C),k[C]=1),x&&z.push([L,A,-1]))}return O}function h(v,x,b){for(var p=0,C=0;C<v.length;++C)x[C]===b&&(v[p++]=v[C]);return v.length=p,v}function d(v,x,b){var p=f(v,b);if(x===0)return b?p.cells.concat(p.boundary):p.cells;for(var C=1,E=p.active,A=p.next,L=p.flags,_=p.cells,k=p.constraint,M=p.neighbor;E.length>0||A.length>0;){for(;E.length>0;){var g=E.pop();if(L[g]!==-C){L[g]=C;for(var P=_[g],T=0;T<3;++T){var z=M[3*g+T];z>=0&&L[z]===0&&(k[3*g+T]?A.push(z):(E.push(z),L[z]=C))}}}var O=A;A=E,E=O,A.length=0,C=-C}var V=h(_,L,x);return b?V.concat(p.boundary):V}},8902:function(i,a,o){\"use strict\";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=A;function h(L,_,k,M,g){this.a=L,this.b=_,this.idx=k,this.lowerIds=M,this.upperIds=g}function d(L,_,k,M){this.a=L,this.b=_,this.type=k,this.idx=M}function v(L,_){var k=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return k||L.type!==u&&(k=l(L.a,L.b,_.b),k)?k:L.idx-_.idx}function x(L,_){return l(L.a,L.b,_)}function b(L,_,k,M,g){for(var P=s.lt(_,M,x),T=s.gt(_,M,x),z=P;z<T;++z){for(var O=_[z],V=O.lowerIds,Z=V.length;Z>1&&l(k[V[Z-2]],k[V[Z-1]],M)>0;)L.push([V[Z-1],V[Z-2],g]),Z-=1;V.length=Z,V.push(g);for(var G=O.upperIds,Z=G.length;Z>1&&l(k[G[Z-2]],k[G[Z-1]],M)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,_){var k;return L.a[0]<_.a[0]?k=l(L.a,L.b,_.a):k=l(_.b,_.a,L.a),k||(_.b[0]<L.b[0]?k=l(L.a,L.b,_.b):k=l(_.b,_.a,L.b),k||L.idx-_.idx)}function C(L,_,k){var M=s.le(L,k,p),g=L[M],P=g.upperIds,T=P[P.length-1];g.upperIds=[T],L.splice(M+1,0,new h(k.a,k.b,k.idx,[T],P))}function E(L,_,k){var M=k.a;k.a=k.b,k.b=M;var g=s.eq(L,k,p),P=L[g],T=L[g-1];T.upperIds=P.upperIds,L.splice(g,1)}function A(L,_){for(var k=L.length,M=_.length,g=[],P=0;P<k;++P)g.push(new d(L[P],null,u,P));for(var P=0;P<M;++P){var T=_[P],z=L[T[0]],O=L[T[1]];z[0]<O[0]?g.push(new d(z,O,f,P),new d(O,z,c,P)):z[0]>O[0]&&g.push(new d(O,z,f,P),new d(z,O,c,P))}g.sort(v);for(var V=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([V,1],[V,0],-1,[],[],[],[])],Z=[],P=0,H=g.length;P<H;++P){var N=g[P],j=N.type;j===u?b(Z,G,L,N.a,N.idx):j===f?C(G,L,N):E(G,L,N)}return Z}},5542:function(i,a,o){\"use strict\";var s=o(2478);i.exports=f;function l(h,d){this.stars=h,this.edges=d}var u=l.prototype;function c(h,d,v){for(var x=1,b=h.length;x<b;x+=2)if(h[x-1]===d&&h[x]===v){h[x-1]=h[b-2],h[x]=h[b-1],h.length=b-2;return}}u.isConstraint=function(){var h=[0,0];function d(v,x){return v[0]-x[0]||v[1]-x[1]}return function(v,x){return h[0]=Math.min(v,x),h[1]=Math.max(v,x),s.eq(this.edges,h,d)>=0}}(),u.removeTriangle=function(h,d,v){var x=this.stars;c(x[h],d,v),c(x[d],v,h),c(x[v],h,d)},u.addTriangle=function(h,d,v){var x=this.stars;x[h].push(d,v),x[d].push(v,h),x[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],x=1,b=v.length;x<b;x+=2)if(v[x]===h)return v[x-1];return-1},u.flip=function(h,d){var v=this.opposite(h,d),x=this.opposite(d,h);this.removeTriangle(h,d,v),this.removeTriangle(d,h,x),this.addTriangle(h,x,v),this.addTriangle(d,v,x)},u.edges=function(){for(var h=this.stars,d=[],v=0,x=h.length;v<x;++v)for(var b=h[v],p=0,C=b.length;p<C;p+=2)d.push([b[p],b[p+1]]);return d},u.cells=function(){for(var h=this.stars,d=[],v=0,x=h.length;v<x;++v)for(var b=h[v],p=0,C=b.length;p<C;p+=2){var E=b[p],A=b[p+1];v<Math.min(E,A)&&d.push([v,E,A])}return d};function f(h,d){for(var v=new Array(h),x=0;x<h;++x)v[x]=[];return new l(v,d)}},2419:function(i){\"use strict\";i.exports=a;function a(o){for(var s=1,l=1;l<o.length;++l)for(var u=0;u<l;++u)if(o[l]<o[u])s=-s;else if(o[u]===o[l])return 0;return s}},3628:function(i,a,o){\"use strict\";var s=o(1338),l=o(727);function u(h,d){for(var v=0,x=h.length,b=0;b<x;++b)v+=h[b]*d[b];return v}function c(h){var d=h.length;if(d===0)return[];var v=h[0].length,x=s([h.length+1,h.length+1],1),b=s([h.length+1],1);x[d][d]=0;for(var p=0;p<d;++p){for(var C=0;C<=p;++C)x[C][p]=x[p][C]=2*u(h[p],h[C]);b[p]=u(h[p],h[p])}for(var E=l(x,b),A=0,L=E[d+1],p=0;p<L.length;++p)A+=L[p];for(var _=new Array(d),p=0;p<d;++p){for(var L=E[p],k=0,C=0;C<L.length;++C)k+=L[C];_[p]=k/A}return _}function f(h){if(h.length===0)return[];for(var d=h[0].length,v=s([d]),x=c(h),b=0;b<h.length;++b)for(var p=0;p<d;++p)v[p]+=h[b][p]*x[b];return v}f.barycenetric=c,i.exports=f},6037:function(i,a,o){i.exports=l;var s=o(3628);function l(u){for(var c=s(u),f=0,h=0;h<u.length;++h)for(var d=u[h],v=0;v<c.length;++v)f+=Math.pow(d[v]-c[v],2);return Math.sqrt(f/u.length)}},332:function(i,a,o){\"use strict\";i.exports=z;var s=o(1755),l=o(6867),u=o(1125),c=o(7842),f=o(1318),h=o(946),d=o(5838),v=o(1278),x=o(3637);function b(O){var V=h(O);return[v(V,-1/0),v(V,1/0)]}function p(O,V){for(var G=new Array(V.length),Z=0;Z<V.length;++Z){var H=V[Z],N=O[H[0]],j=O[H[1]];G[Z]=[v(Math.min(N[0],j[0]),-1/0),v(Math.min(N[1],j[1]),-1/0),v(Math.max(N[0],j[0]),1/0),v(Math.max(N[1],j[1]),1/0)]}return G}function C(O){for(var V=new Array(O.length),G=0;G<O.length;++G){var Z=O[G];V[G]=[v(Z[0],-1/0),v(Z[1],-1/0),v(Z[0],1/0),v(Z[1],1/0)]}return V}function E(O,V,G){var Z=[];return l(G,function(H,N){var j=V[H],re=V[N];if(!(j[0]===re[0]||j[0]===re[1]||j[1]===re[0]||j[1]===re[1])){var oe=O[j[0]],_e=O[j[1]],Me=O[re[0]],ke=O[re[1]];u(oe,_e,Me,ke)&&Z.push([H,N])}}),Z}function A(O,V,G,Z){var H=[];return l(G,Z,function(N,j){var re=V[N];if(!(re[0]===j||re[1]===j)){var oe=O[j],_e=O[re[0]],Me=O[re[1]];u(_e,Me,oe,oe)&&H.push([N,j])}}),H}function L(O,V,G,Z,H){var N,j,re=O.map(function(pt){return[c(pt[0]),c(pt[1])]});for(N=0;N<G.length;++N){var oe=G[N];j=oe[0];var _e=oe[1],Me=V[j],ke=V[_e],me=x(d(O[Me[0]]),d(O[Me[1]]),d(O[ke[0]]),d(O[ke[1]]));if(me){var ie=O.length;O.push([h(me[0]),h(me[1])]),re.push(me),Z.push([j,ie],[_e,ie])}}for(Z.sort(function(pt,Wt){if(pt[0]!==Wt[0])return pt[0]-Wt[0];var st=re[pt[1]],lt=re[Wt[1]];return f(st[0],lt[0])||f(st[1],lt[1])}),N=Z.length-1;N>=0;--N){var Se=Z[N];j=Se[0];var Le=V[j],Ae=Le[0],De=Le[1],Pe=O[Ae],ge=O[De];if((Pe[0]-ge[0]||Pe[1]-ge[1])<0){var Fe=Ae;Ae=De,De=Fe}Le[0]=Ae;var ce=Le[1]=Se[1],Ze;for(H&&(Ze=Le[2]);N>0&&Z[N-1][0]===j;){var Se=Z[--N],ct=Se[1];H?V.push([ce,ct,Ze]):V.push([ce,ct]),ce=ct}H?V.push([ce,De,Ze]):V.push([ce,De])}return re}function _(O,V,G){for(var Z=V.length,H=new s(Z),N=[],j=0;j<V.length;++j){var re=V[j],oe=b(re[0]),_e=b(re[1]);N.push([v(oe[0],-1/0),v(_e[0],-1/0),v(oe[1],1/0),v(_e[1],1/0)])}l(N,function(Se,Le){H.link(Se,Le)});for(var Me=!0,ke=new Array(Z),j=0;j<Z;++j){var me=H.find(j);me!==j&&(Me=!1,O[me]=[Math.min(O[j][0],O[me][0]),Math.min(O[j][1],O[me][1])])}if(Me)return null;for(var ie=0,j=0;j<Z;++j){var me=H.find(j);me===j?(ke[j]=ie,O[ie++]=O[j]):ke[j]=-1}O.length=ie;for(var j=0;j<Z;++j)ke[j]<0&&(ke[j]=ke[H.find(j)]);return ke}function k(O,V){return O[0]-V[0]||O[1]-V[1]}function M(O,V){var G=O[0]-V[0]||O[1]-V[1];return G||(O[2]<V[2]?-1:O[2]>V[2]?1:0)}function g(O,V,G){if(O.length!==0){if(V)for(var Z=0;Z<O.length;++Z){var H=O[Z],N=V[H[0]],j=V[H[1]];H[0]=Math.min(N,j),H[1]=Math.max(N,j)}else for(var Z=0;Z<O.length;++Z){var H=O[Z],N=H[0],j=H[1];H[0]=Math.min(N,j),H[1]=Math.max(N,j)}G?O.sort(M):O.sort(k);for(var re=1,Z=1;Z<O.length;++Z){var oe=O[Z-1],_e=O[Z];_e[0]===oe[0]&&_e[1]===oe[1]&&(!G||_e[2]===oe[2])||(O[re++]=_e)}O.length=re}}function P(O,V,G){var Z=_(O,[],C(O));return g(V,Z,G),!!Z}function T(O,V,G){var Z=p(O,V),H=E(O,V,Z),N=C(O),j=A(O,V,Z,N),re=L(O,V,H,j,G),oe=_(O,re,N);return g(V,oe,G),oe?!0:H.length>0||j.length>0}function z(O,V,G){var Z;if(G){Z=V;for(var H=new Array(V.length),N=0;N<V.length;++N){var j=V[N];H[N]=[j[0],j[1],G[N]]}V=H}for(var re=P(O,V,!!G);T(O,V,!!G);)re=!0;if(G&&re){Z.length=0,G.length=0;for(var N=0;N<V.length;++N){var j=V[N];Z.push([j[0],j[1]]),G.push(j[2])}}return re}},3637:function(i,a,o){\"use strict\";i.exports=x;var s=o(6504),l=o(8697),u=o(5572),c=o(7721),f=o(544),h=o(2653),d=o(8987);function v(b,p){return u(s(b[0],p[1]),s(b[1],p[0]))}function x(b,p,C,E){var A=f(p,b),L=f(E,C),_=v(A,L);if(c(_)===0)return null;var k=f(b,C),M=v(L,k),g=l(M,_),P=d(A,g),T=h(b,P);return T}},3642:function(i){i.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],\"rainbow-soft\":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],\"freesurface-blue\":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],\"freesurface-red\":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],\"velocity-blue\":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],\"velocity-green\":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(i,a,o){\"use strict\";var s=o(3642),l=o(395);i.exports=u;function u(d){var v,x,b,p,C,E,A,L,g,_,k;if(d||(d={}),L=(d.nshades||72)-1,A=d.format||\"hex\",E=d.colormap,E||(E=\"jet\"),typeof E==\"string\"){if(E=E.toLowerCase(),!s[E])throw Error(E+\" not a supported colorscale\");C=s[E]}else if(Array.isArray(E))C=E.slice();else throw Error(\"unsupported colormap option\",E);if(C.length>L+1)throw new Error(E+\" map requires nshades to be at least size \"+C.length);Array.isArray(d.alpha)?d.alpha.length!==2?_=[1,1]:_=d.alpha.slice():typeof d.alpha==\"number\"?_=[d.alpha,d.alpha]:_=[1,1],v=C.map(function(z){return Math.round(z.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=C.map(function(z,O){var V=C[O].index,G=C[O].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=_[0]+(_[1]-_[0])*V),G}),g=[];for(k=0;k<v.length-1;++k){p=v[k+1]-v[k],x=M[k],b=M[k+1];for(var P=0;P<p;P++){var T=P/p;g.push([Math.round(l(x[0],b[0],T)),Math.round(l(x[1],b[1],T)),Math.round(l(x[2],b[2],T)),l(x[3],b[3],T)])}}return g.push(C[C.length-1].rgb.concat(_[1])),A===\"hex\"?g=g.map(f):A===\"rgbaString\"?g=g.map(h):A===\"float\"&&(g=g.map(c)),g}function c(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function f(d){for(var v,x=\"#\",b=0;b<3;++b)v=d[b],v=v.toString(16),x+=(\"00\"+v).substr(v.length);return x}function h(d){return\"rgba(\"+d.join(\",\")+\")\"}},3140:function(i,a,o){\"use strict\";i.exports=d;var s=o(3250),l=o(8572),u=o(9362),c=o(5382),f=o(8210);function h(v,x,b){var p=u(v[0],-x[0]),C=u(v[1],-x[1]),E=u(b[0],-x[0]),A=u(b[1],-x[1]),L=f(c(p,E),c(C,A));return L[L.length-1]>=0}function d(v,x,b,p){var C=s(x,b,p);if(C===0){var E=l(s(v,x,b)),A=l(s(v,x,p));if(E===A){if(E===0){var L=h(v,x,b),_=h(v,x,p);return L===_?0:L?1:-1}return 0}else{if(A===0)return E>0||h(v,x,p)?-1:1;if(E===0)return A>0||h(v,x,b)?1:-1}return l(A-E)}var k=s(v,x,b);if(k>0)return C>0&&s(v,x,p)>0?1:-1;if(k<0)return C>0||s(v,x,p)>0?1:-1;var M=s(v,x,p);return M>0||h(v,x,b)?1:-1}},8572:function(i){\"use strict\";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),x=a(u[0],u[1]);return a(v,l[2])-a(x,u[2])||a(v+l[2],h)-a(x+u[2],d);case 4:var b=l[0],p=l[1],C=l[2],E=l[3],A=u[0],L=u[1],_=u[2],k=u[3];return b+p+C+E-(A+L+_+k)||a(b,p,C,E)-a(A,L,_,k,A)||a(b+p,b+C,b+E,p+C,p+E,C+E)-a(A+L,A+_,A+k,L+_,L+k,_+k)||a(b+p+C,b+p+E,b+C+E,p+C+E)-a(A+L+_,A+L+k,A+_+k,L+_+k);default:for(var M=l.slice().sort(o),g=u.slice().sort(o),P=0;P<c;++P)if(f=M[P]-g[P],f)return f;return 0}}},3788:function(i,a,o){\"use strict\";var s=o(8507),l=o(2419);i.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},7352:function(i,a,o){\"use strict\";var s=o(5721),l=o(4750),u=o(2690);i.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},5721:function(i){\"use strict\";i.exports=a;function a(o){for(var s=0,l=0,u=1;u<o.length;++u)o[u][0]<o[s][0]&&(s=u),o[u][0]>o[l][0]&&(l=u);return s<l?[[s],[l]]:s>l?[[l],[s]]:[[s]]}},4750:function(i,a,o){\"use strict\";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v<f;++v){var x=c[v];h[v]=[d,x],d=x}return h}},2690:function(i,a,o){\"use strict\";i.exports=f;var s=o(8954),l=o(3952);function u(h,d){for(var v=h.length,x=new Array(v),b=0;b<d.length;++b)x[b]=h[d[b]];for(var p=d.length,b=0;b<v;++b)d.indexOf(b)<0&&(x[p++]=h[b]);return x}function c(h,d){for(var v=h.length,x=d.length,b=0;b<v;++b)for(var p=h[b],C=0;C<p.length;++C){var E=p[C];if(E<x)p[C]=d[E];else{E=E-x;for(var A=0;A<x;++A)E>=d[A]&&(E+=1);p[C]=E}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var x=u(h,v),b=s(x,!0);return c(b,v)}}},4769:function(i){\"use strict\";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,x=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var p=s.length-1;p>=0;--p)h[p]=d*s[p]+v*l[p]+x*u[p]+b*c[p];return h}return d*s+v*l+x*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,x=d*d,b=(1+2*f)*x,p=f*x,C=v*(3-2*f),E=v*d;if(s.length){h||(h=new Array(s.length));for(var A=s.length-1;A>=0;--A)h[A]=b*s[A]+p*l[A]+C*u[A]+E*c[A];return h}return b*s+p*l+C*u+E*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){\"use strict\";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var x=d.point,b=v.point,p=x.length,C=0;C<p;++C){var E=b[C]-x[C];if(E)return E}return 0}function f(d,v,x){if(d===1)return x?[[-1,0]]:[];var b=v.map(function(L,_){return[L[0],_]});b.sort(function(L,_){return L[0]-_[0]});for(var p=new Array(d-1),C=1;C<d;++C){var E=b[C-1],A=b[C];p[C-1]=[E[1],A[1]]}return x&&p.push([-1,p[0][1]],[p[d-1][1],-1]),p}function h(d,v){var x=d.length;if(x===0)return[];var b=d[0].length;if(b<1)return[];if(b===1)return f(x,d,v);for(var p=new Array(x),C=1,E=0;E<x;++E){for(var A=d[E],L=new Array(b+1),_=0,k=0;k<b;++k){var M=A[k];L[k]=M,_+=M*M}L[b]=_,p[E]=new u(L,E),C=Math.max(_,C)}l(p,c),x=p.length;for(var g=new Array(x+b+1),P=new Array(x+b+1),T=(b+1)*(b+1)*C,z=new Array(b+1),E=0;E<=b;++E)z[E]=0;z[b]=T,g[0]=z.slice(),P[0]=-1;for(var E=0;E<=b;++E){var L=z.slice();L[E]=1,g[E+1]=L,P[E+1]=-1}for(var E=0;E<x;++E){var O=p[E];g[E+b+1]=O.point,P[E+b+1]=O.index}var V=s(g,!1);if(v?V=V.filter(function(G){for(var Z=0,H=0;H<=b;++H){var N=P[G[H]];if(N<0&&++Z>=2)return!1;G[H]=N}return!0}):V=V.filter(function(G){for(var Z=0;Z<=b;++Z){var H=P[G[Z]];if(H<0)return!1;G[Z]=H}return!0}),b&1)for(var E=0;E<V.length;++E){var O=V[E],L=O[0];O[0]=O[1],O[1]=L}return V}},2361:function(i){var a=!1;if(typeof Float64Array!=\"undefined\"){var o=new Float64Array(1),s=new Uint32Array(o.buffer);if(o[0]=1,a=!0,s[1]===1072693248){let C=function(L,_){return s[0]=L,s[1]=_,o[0]},E=function(L){return o[0]=L,s[0]},A=function(L){return o[0]=L,s[1]};var u=C,c=E,f=A;i.exports=function(_){return o[0]=_,[s[0],s[1]]},i.exports.pack=C,i.exports.lo=E,i.exports.hi=A}else if(s[0]===1072693248){let C=function(L,_){return s[1]=L,s[0]=_,o[0]},E=function(L){return o[0]=L,s[1]},A=function(L){return o[0]=L,s[0]};var h=C,d=E,v=A;i.exports=function(_){return o[0]=_,[s[1],s[0]]},i.exports.pack=C,i.exports.lo=E,i.exports.hi=A}else a=!1}if(!a){let C=function(L,_){return l.writeUInt32LE(L,0,!0),l.writeUInt32LE(_,4,!0),l.readDoubleLE(0,!0)},E=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(0,!0)},A=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(4,!0)};var x=C,b=E,p=A,l=new Buffer(8);i.exports=function(_){return l.writeDoubleLE(_,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},i.exports.pack=C,i.exports.lo=E,i.exports.hi=A}i.exports.sign=function(C){return i.exports.hi(C)>>>31},i.exports.exponent=function(C){var E=i.exports.hi(C);return(E<<1>>>21)-1023},i.exports.fraction=function(C){var E=i.exports.lo(C),A=i.exports.hi(C),L=A&(1<<20)-1;return A&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(C){var E=i.exports.hi(C);return!(E&2146435072)}},1338:function(i){\"use strict\";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d<f;++d)h[d]=u;else for(d=0;d<f;++d)h[d]=a(l,u,c+1);return h}function o(l,u){var c,f;for(c=new Array(l),f=0;f<l;++f)c[f]=u;return c}function s(l,u){switch(typeof u==\"undefined\"&&(u=0),typeof l){case\"number\":if(l>0)return o(l|0,u);break;case\"object\":if(typeof l.length==\"number\")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){\"use strict\";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!=\"number\"){c=0;for(var h=0;h<f;++h){var d=u[h];c=Math.max(c,d[0],d[1])}c=(c|0)+1}c=c|0;for(var v=new Array(c),h=0;h<c;++h)v[h]=[];for(var h=0;h<f;++h){var d=u[h];v[d[0]].push(d[1]),v[d[1]].push(d[0])}for(var x=0;x<c;++x)s(v[x],function(b,p){return b-p});return v}},5033:function(i){\"use strict\";i.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},9215:function(i,a,o){\"use strict\";i.exports=d;var s=o(4769),l=o(2478);function u(v,x,b){return Math.min(x,Math.max(v,b))}function c(v,x,b){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var p=0;p<this.dimension;++p)this.bounds[0][p]=-1/0,this.bounds[1][p]=1/0;this._state=v.slice().reverse(),this._velocity=x.slice().reverse(),this._time=[b],this._scratch=[v.slice(),v.slice(),v.slice(),v.slice(),v.slice()]}var f=c.prototype;f.flush=function(v){var x=l.gt(this._time,v)-1;x<=0||(this._time.splice(0,x),this._state.splice(0,x*this.dimension),this._velocity.splice(0,x*this.dimension))},f.curve=function(v){var x=this._time,b=x.length,p=l.le(x,v),C=this._scratch[0],E=this._state,A=this._velocity,L=this.dimension,_=this.bounds;if(p<0)for(var k=L-1,M=0;M<L;++M,--k)C[M]=E[k];else if(p>=b-1)for(var k=E.length-1,g=v-x[b-1],M=0;M<L;++M,--k)C[M]=E[k]+g*A[k];else{for(var k=L*(p+1)-1,P=x[p],T=x[p+1],z=T-P||1,O=this._scratch[1],V=this._scratch[2],G=this._scratch[3],Z=this._scratch[4],H=!0,M=0;M<L;++M,--k)O[M]=E[k],G[M]=A[k]*z,V[M]=E[k+L],Z[M]=A[k+L]*z,H=H&&O[M]===V[M]&&G[M]===Z[M]&&G[M]===0;if(H)for(var M=0;M<L;++M)C[M]=O[M];else s(O,G,V,Z,(v-P)/z,C)}for(var N=_[0],j=_[1],M=0;M<L;++M)C[M]=u(N[M],j[M],C[M]);return C},f.dcurve=function(v){var x=this._time,b=x.length,p=l.le(x,v),C=this._scratch[0],E=this._state,A=this._velocity,L=this.dimension;if(p>=b-1)for(var _=E.length-1,k=v-x[b-1],M=0;M<L;++M,--_)C[M]=A[_];else{for(var _=L*(p+1)-1,g=x[p],P=x[p+1],T=P-g||1,z=this._scratch[1],O=this._scratch[2],V=this._scratch[3],G=this._scratch[4],Z=!0,M=0;M<L;++M,--_)z[M]=E[_],V[M]=A[_]*T,O[M]=E[_+L],G[M]=A[_+L]*T,Z=Z&&z[M]===O[M]&&V[M]===G[M]&&V[M]===0;if(Z)for(var M=0;M<L;++M)C[M]=0;else{s.derivative(z,V,O,G,(v-g)/T,C);for(var M=0;M<L;++M)C[M]/=T}}return C},f.lastT=function(){var v=this._time;return v[v.length-1]},f.stable=function(){for(var v=this._velocity,x=v.length,b=this.dimension-1;b>=0;--b)if(v[--x])return!1;return!0},f.jump=function(v){var x=this.lastT(),b=this.dimension;if(!(v<x||arguments.length!==b+1)){var p=this._state,C=this._velocity,E=p.length-this.dimension,A=this.bounds,L=A[0],_=A[1];this._time.push(x,v);for(var k=0;k<2;++k)for(var M=0;M<b;++M)p.push(p[E++]),C.push(0);this._time.push(v);for(var M=b;M>0;--M)p.push(u(L[M-1],_[M-1],arguments[M])),C.push(0)}},f.push=function(v){var x=this.lastT(),b=this.dimension;if(!(v<x||arguments.length!==b+1)){var p=this._state,C=this._velocity,E=p.length-this.dimension,A=v-x,L=this.bounds,_=L[0],k=L[1],M=A>1e-6?1/A:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(_[g-1],k[g-1],arguments[g]);p.push(P),C.push((P-p[E++])*M)}}},f.set=function(v){var x=this.dimension;if(!(v<this.lastT()||arguments.length!==x+1)){var b=this._state,p=this._velocity,C=this.bounds,E=C[0],A=C[1];this._time.push(v);for(var L=x;L>0;--L)b.push(u(E[L-1],A[L-1],arguments[L])),p.push(0)}},f.move=function(v){var x=this.lastT(),b=this.dimension;if(!(v<=x||arguments.length!==b+1)){var p=this._state,C=this._velocity,E=p.length-this.dimension,A=this.bounds,L=A[0],_=A[1],k=v-x,M=k>1e-6?1/k:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],_[g-1],p[E++]+P)),C.push(P*M)}}},f.idle=function(v){var x=this.lastT();if(!(v<x)){var b=this.dimension,p=this._state,C=this._velocity,E=p.length-b,A=this.bounds,L=A[0],_=A[1],k=v-x;this._time.push(v);for(var M=b-1;M>=0;--M)p.push(u(L[M],_[M],p[E]+k*C[E])),C.push(0),E+=1}};function h(v){for(var x=new Array(v),b=0;b<v;++b)x[b]=0;return x}function d(v,x,b){switch(arguments.length){case 0:return new c([0],[0],0);case 1:if(typeof v==\"number\"){var p=h(v);return new c(p,p,0)}else return new c(v,h(v.length),0);case 2:if(typeof x==\"number\"){var p=h(v.length);return new c(v,p,+x)}else b=0;case 3:if(v.length!==x.length)throw new Error(\"state and velocity lengths must match\");return new c(v,x,b)}}},3840:function(i){\"use strict\";i.exports=L;var a=0,o=1;function s(_,k,M,g,P,T){this._color=_,this.key=k,this.value=M,this.left=g,this.right=P,this._count=T}function l(_){return new s(_._color,_.key,_.value,_.left,_.right,_._count)}function u(_,k){return new s(_,k.key,k.value,k.left,k.right,k._count)}function c(_){_._count=1+(_.left?_.left._count:0)+(_.right?_.right._count:0)}function f(_,k){this._compare=_,this.root=k}var h=f.prototype;Object.defineProperty(h,\"keys\",{get:function(){var _=[];return this.forEach(function(k,M){_.push(k)}),_}}),Object.defineProperty(h,\"values\",{get:function(){var _=[];return this.forEach(function(k,M){_.push(M)}),_}}),Object.defineProperty(h,\"length\",{get:function(){return this.root?this.root._count:0}}),h.insert=function(_,k){for(var M=this._compare,g=this.root,P=[],T=[];g;){var z=M(_,g.key);P.push(g),T.push(z),z<=0?g=g.left:g=g.right}P.push(new s(a,_,k,null,null,1));for(var O=P.length-2;O>=0;--O){var g=P[O];T[O]<=0?P[O]=new s(g._color,g.key,g.value,P[O+1],g.right,g._count+1):P[O]=new s(g._color,g.key,g.value,g.left,P[O+1],g._count+1)}for(var O=P.length-1;O>1;--O){var V=P[O-1],g=P[O];if(V._color===o||g._color===o)break;var G=P[O-2];if(G.left===V)if(V.left===g){var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.left=V.right,V._color=o,V.right=G,P[O-2]=V,P[O-1]=g,c(G),c(V),O>=3){var H=P[O-3];H.left===G?H.left=V:H.right=V}break}}else{var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(V.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=V,g.right=G,P[O-2]=g,P[O-1]=V,c(G),c(V),c(g),O>=3){var H=P[O-3];H.left===G?H.left=g:H.right=g}break}}else if(V.right===g){var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.right=V.left,V._color=o,V.left=G,P[O-2]=V,P[O-1]=g,c(G),c(V),O>=3){var H=P[O-3];H.right===G?H.right=V:H.left=V}break}}else{var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(V.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=V,g.left=G,P[O-2]=g,P[O-1]=V,c(G),c(V),c(g),O>=3){var H=P[O-3];H.right===G?H.right=g:H.left=g}break}}}return P[0]._color=o,new f(M,P[0])};function d(_,k){if(k.left){var M=d(_,k.left);if(M)return M}var M=_(k.key,k.value);if(M)return M;if(k.right)return d(_,k.right)}function v(_,k,M,g){var P=k(_,g.key);if(P<=0){if(g.left){var T=v(_,k,M,g.left);if(T)return T}var T=M(g.key,g.value);if(T)return T}if(g.right)return v(_,k,M,g.right)}function x(_,k,M,g,P){var T=M(_,P.key),z=M(k,P.key),O;if(T<=0&&(P.left&&(O=x(_,k,M,g,P.left),O)||z>0&&(O=g(P.key,P.value),O)))return O;if(z>0&&P.right)return x(_,k,M,g,P.right)}h.forEach=function(k,M,g){if(this.root)switch(arguments.length){case 1:return d(k,this.root);case 2:return v(M,this._compare,k,this.root);case 3:return this._compare(M,g)>=0?void 0:x(M,g,this._compare,k,this.root)}},Object.defineProperty(h,\"begin\",{get:function(){for(var _=[],k=this.root;k;)_.push(k),k=k.left;return new b(this,_)}}),Object.defineProperty(h,\"end\",{get:function(){for(var _=[],k=this.root;k;)_.push(k),k=k.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var k=this.root,M=[];;){if(M.push(k),k.left){if(_<k.left._count){k=k.left;continue}_-=k.left._count}if(!_)return new b(this,M);if(_-=1,k.right){if(_>=k.right._count)break;k=k.right}else break}return new b(this,[])},h.ge=function(_){for(var k=this._compare,M=this.root,g=[],P=0;M;){var T=k(_,M.key);g.push(M),T<=0&&(P=g.length),T<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.gt=function(_){for(var k=this._compare,M=this.root,g=[],P=0;M;){var T=k(_,M.key);g.push(M),T<0&&(P=g.length),T<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.lt=function(_){for(var k=this._compare,M=this.root,g=[],P=0;M;){var T=k(_,M.key);g.push(M),T>0&&(P=g.length),T<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.le=function(_){for(var k=this._compare,M=this.root,g=[],P=0;M;){var T=k(_,M.key);g.push(M),T>=0&&(P=g.length),T<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.find=function(_){for(var k=this._compare,M=this.root,g=[];M;){var P=k(_,M.key);if(g.push(M),P===0)return new b(this,g);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var k=this.find(_);return k?k.remove():this},h.get=function(_){for(var k=this._compare,M=this.root;M;){var g=k(_,M.key);if(g===0)return M.value;g<=0?M=M.left:M=M.right}};function b(_,k){this.tree=_,this._stack=k}var p=b.prototype;Object.defineProperty(p,\"valid\",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,\"node\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function C(_,k){_.key=k.key,_.value=k.value,_.left=k.left,_.right=k.right,_._color=k._color,_._count=k._count}function E(_){for(var k,M,g,P,T=_.length-1;T>=0;--T){if(k=_[T],T===0){k._color=o;return}if(M=_[T-1],M.left===k){if(g=M.right,g.right&&g.right._color===a){if(g=M.right=l(g),P=g.right=l(g.right),M.right=g.left,g.left=M,g.right=P,g._color=M._color,k._color=o,M._color=o,P._color=o,c(M),c(g),T>1){var z=_[T-2];z.left===M?z.left=g:z.right=g}_[T-1]=g;return}else if(g.left&&g.left._color===a){if(g=M.right=l(g),P=g.left=l(g.left),M.right=P.left,g.left=P.right,P.left=M,P.right=g,P._color=M._color,M._color=o,g._color=o,k._color=o,c(M),c(g),c(P),T>1){var z=_[T-2];z.left===M?z.left=P:z.right=P}_[T-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.right=u(a,g);return}else{M.right=u(a,g);continue}else{if(g=l(g),M.right=g.left,g.left=M,g._color=M._color,M._color=a,c(M),c(g),T>1){var z=_[T-2];z.left===M?z.left=g:z.right=g}_[T-1]=g,_[T]=M,T+1<_.length?_[T+1]=k:_.push(k),T=T+2}}else{if(g=M.left,g.left&&g.left._color===a){if(g=M.left=l(g),P=g.left=l(g.left),M.left=g.right,g.right=M,g.left=P,g._color=M._color,k._color=o,M._color=o,P._color=o,c(M),c(g),T>1){var z=_[T-2];z.right===M?z.right=g:z.left=g}_[T-1]=g;return}else if(g.right&&g.right._color===a){if(g=M.left=l(g),P=g.right=l(g.right),M.left=P.right,g.right=P.left,P.right=M,P.left=g,P._color=M._color,M._color=o,g._color=o,k._color=o,c(M),c(g),c(P),T>1){var z=_[T-2];z.right===M?z.right=P:z.left=P}_[T-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.left=u(a,g);return}else{M.left=u(a,g);continue}else{if(g=l(g),M.left=g.right,g.right=M,g._color=M._color,M._color=a,c(M),c(g),T>1){var z=_[T-2];z.right===M?z.right=g:z.left=g}_[T-1]=g,_[T]=M,T+1<_.length?_[T+1]=k:_.push(k),T=T+2}}}}p.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var k=new Array(_.length),M=_[_.length-1];k[k.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var g=_.length-2;g>=0;--g){var M=_[g];M.left===_[g+1]?k[g]=new s(M._color,M.key,M.value,k[g+1],M.right,M._count):k[g]=new s(M._color,M.key,M.value,M.left,k[g+1],M._count)}if(M=k[k.length-1],M.left&&M.right){var P=k.length;for(M=M.left;M.right;)k.push(M),M=M.right;var T=k[P-1];k.push(new s(M._color,T.key,T.value,M.left,M.right,M._count)),k[P-1].key=M.key,k[P-1].value=M.value;for(var g=k.length-2;g>=P;--g)M=k[g],k[g]=new s(M._color,M.key,M.value,M.left,k[g+1],M._count);k[P-1].left=k[P]}if(M=k[k.length-1],M._color===a){var z=k[k.length-2];z.left===M?z.left=null:z.right===M&&(z.right=null),k.pop();for(var g=0;g<k.length;++g)k[g]._count--;return new f(this.tree._compare,k[0])}else if(M.left||M.right){M.left?C(M,M.left):M.right&&C(M,M.right),M._color=o;for(var g=0;g<k.length-1;++g)k[g]._count--;return new f(this.tree._compare,k[0])}else{if(k.length===1)return new f(this.tree._compare,null);for(var g=0;g<k.length;++g)k[g]._count--;var O=k[k.length-2];E(k),O.left===M?O.left=null:O.right=null}return new f(this.tree._compare,k[0])},Object.defineProperty(p,\"key\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,\"value\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,\"index\",{get:function(){var _=0,k=this._stack;if(k.length===0){var M=this.tree.root;return M?M._count:0}else k[k.length-1].left&&(_=k[k.length-1].left._count);for(var g=k.length-2;g>=0;--g)k[g+1]===k[g].right&&(++_,k[g].left&&(_+=k[g].left._count));return _},enumerable:!0}),p.next=function(){var _=this._stack;if(_.length!==0){var k=_[_.length-1];if(k.right)for(k=k.right;k;)_.push(k),k=k.left;else for(_.pop();_.length>0&&_[_.length-1].right===k;)k=_[_.length-1],_.pop()}},Object.defineProperty(p,\"hasNext\",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var k=_.length-1;k>0;--k)if(_[k-1].left===_[k])return!0;return!1}}),p.update=function(_){var k=this._stack;if(k.length===0)throw new Error(\"Can't update empty node!\");var M=new Array(k.length),g=k[k.length-1];M[M.length-1]=new s(g._color,g.key,_,g.left,g.right,g._count);for(var P=k.length-2;P>=0;--P)g=k[P],g.left===k[P+1]?M[P]=new s(g._color,g.key,g.value,M[P+1],g.right,g._count):M[P]=new s(g._color,g.key,g.value,g.left,M[P+1],g._count);return new f(this.tree._compare,M[0])},p.prev=function(){var _=this._stack;if(_.length!==0){var k=_[_.length-1];if(k.left)for(k=k.left;k;)_.push(k),k=k.right;else for(_.pop();_.length>0&&_[_.length-1].left===k;)k=_[_.length-1],_.pop()}},Object.defineProperty(p,\"hasPrev\",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var k=_.length-1;k>0;--k)if(_[k-1].right===_[k])return!0;return!1}});function A(_,k){return _<k?-1:_>k?1:0}function L(_){return new f(_||A,null)}},3837:function(i,a,o){\"use strict\";i.exports=O;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function x(V){return d.isView(V)&&!(V instanceof v)}function b(V){return Array.isArray(V)||x(V)}function p(V,G){return V[0]=G[0],V[1]=G[1],V[2]=G[2],V}function C(V){this.gl=V,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickFontStyle=[\"normal\",\"normal\",\"normal\"],this.tickFontWeight=[\"normal\",\"normal\",\"normal\"],this.tickFontVariant=[\"normal\",\"normal\",\"normal\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=[\"auto\",\"auto\",\"auto\"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.labelFontStyle=[\"normal\",\"normal\",\"normal\"],this.labelFontWeight=[\"normal\",\"normal\",\"normal\"],this.labelFontVariant=[\"normal\",\"normal\",\"normal\"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=[\"auto\",\"auto\",\"auto\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(V)}var E=C.prototype;E.update=function(V){V=V||{};function G(Ae,De,Pe){if(Pe in V){var ge=V[Pe],Fe=this[Pe],ce;(Ae?b(ge)&&b(ge[0]):b(ge))?this[Pe]=ce=[De(ge[0]),De(ge[1]),De(ge[2])]:this[Pe]=ce=[De(ge),De(ge),De(ge)];for(var Ze=0;Ze<3;++Ze)if(ce[Ze]!==Fe[Ze])return!0}return!1}var Z=G.bind(this,!1,Number),H=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),j=G.bind(this,!0,function(Ae){if(b(Ae)){if(Ae.length===3)return[+Ae[0],+Ae[1],+Ae[2],1];if(Ae.length===4)return[+Ae[0],+Ae[1],+Ae[2],+Ae[3]]}return[0,0,0,1]}),re,oe=!1,_e=!1;if(\"bounds\"in V)for(var Me=V.bounds,ke=0;ke<2;++ke)for(var me=0;me<3;++me)Me[ke][me]!==this.bounds[ke][me]&&(_e=!0),this.bounds[ke][me]=Me[ke][me];if(\"ticks\"in V){re=V.ticks,oe=!0,this.autoTicks=!1;for(var ke=0;ke<3;++ke)this.tickSpacing[ke]=0}else Z(\"tickSpacing\")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&(\"ticks\"in V||\"tickSpacing\"in V||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var ke=0;ke<3;++ke)re[ke].sort(function(De,Pe){return De.x-Pe.x});f.equal(re,this.ticks)?oe=!1:this.ticks=re}H(\"tickEnable\"),N(\"tickFont\")&&(oe=!0),N(\"tickFontStyle\")&&(oe=!0),N(\"tickFontWeight\")&&(oe=!0),N(\"tickFontVariant\")&&(oe=!0),Z(\"tickSize\"),Z(\"tickAngle\"),Z(\"tickPad\"),j(\"tickColor\");var ie=N(\"labels\");N(\"labelFont\")&&(ie=!0),N(\"labelFontStyle\")&&(ie=!0),N(\"labelFontWeight\")&&(ie=!0),N(\"labelFontVariant\")&&(ie=!0),H(\"labelEnable\"),Z(\"labelSize\"),Z(\"labelPad\"),j(\"labelColor\"),H(\"lineEnable\"),H(\"lineMirror\"),Z(\"lineWidth\"),j(\"lineColor\"),H(\"lineTickEnable\"),H(\"lineTickMirror\"),Z(\"lineTickLength\"),Z(\"lineTickWidth\"),j(\"lineTickColor\"),H(\"gridEnable\"),Z(\"gridWidth\"),j(\"gridColor\"),H(\"zeroEnable\"),j(\"zeroLineColor\"),Z(\"zeroLineWidth\"),H(\"backgroundEnable\"),j(\"backgroundColor\");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Le=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Le):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Le),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new A,new A,new A];function _(V,G,Z,H,N){for(var j=V.primalOffset,re=V.primalMinor,oe=V.mirrorOffset,_e=V.mirrorMinor,Me=H[G],ke=0;ke<3;++ke)if(G!==ke){var me=j,ie=oe,Se=re,Le=_e;Me&1<<ke&&(me=oe,ie=j,Se=_e,Le=re),me[ke]=Z[0][ke],ie[ke]=Z[1][ke],N[ke]>0?(Se[ke]=-1,Le[ke]=0):(Se[ke]=0,Le[ke]=1)}}var k=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(V){};var g=0,P=[0,0,0],T=[0,0,0],z=[0,0,0];E.draw=function(V){V=V||M;for(var Pe=this.gl,G=V.model||h,Z=V.view||h,H=V.projection||h,N=this.bounds,j=V._ortho||!1,re=c(G,Z,H,N,j),oe=re.cubeEdges,_e=re.axis,Me=Z[12],ke=Z[13],me=Z[14],ie=Z[15],Se=j?2:1,Le=Se*this.pixelRatio*(H[3]*Me+H[7]*ke+H[11]*me+H[15]*ie)/Pe.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=oe[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var De=L,Ae=0;Ae<3;++Ae)_(L[Ae],Ae,this.bounds,oe,_e);for(var Pe=this.gl,ge=k,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?ge[Ae]=_e[Ae]:ge[Ae]=0;this._background.draw(G,Z,H,N,ge,this.backgroundColor),this._lines.bind(G,Z,H,this);for(var Ae=0;Ae<3;++Ae){var Fe=[0,0,0];_e[Ae]>0?Fe[Ae]=N[1][Ae]:Fe[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var Ze=(Ae+1+ce)%3,ct=(Ae+1+(ce^1))%3;this.gridEnable[Ze]&&this._lines.drawGrid(Ze,ct,this.bounds,Fe,this.gridColor[Ze],this.gridWidth[Ze]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var Ze=(Ae+1+ce)%3,ct=(Ae+1+(ce^1))%3;this.zeroEnable[ct]&&Math.min(N[0][ct],N[1][ct])<=0&&Math.max(N[0][ct],N[1][ct])>=0&&this._lines.drawZero(Ze,ct,this.bounds,Fe,this.zeroLineColor[ct],this.zeroLineWidth[ct]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,De[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,De[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var pt=p(P,De[Ae].primalMinor),Wt=p(T,De[Ae].mirrorMinor),st=this.lineTickLength,ce=0;ce<3;++ce){var lt=Le/G[5*ce];pt[ce]*=st[ce]*lt,Wt[ce]*=st[ce]*lt}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,De[Ae].primalOffset,pt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,De[Ae].mirrorOffset,Wt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,H,this.pixelRatio);var Gt,Nt=.5,$t,sr;function wr(Ft){sr=[0,0,0],sr[Ft]=1}function ur(Ft,bt,yt){var Yt=(Ft+1)%3,lr=(Ft+2)%3,Tr=bt[Yt],Rr=bt[lr],ei=yt[Yt],Wr=yt[lr];if(Tr>0&&Wr>0){wr(Yt);return}else if(Tr>0&&Wr<0){wr(Yt);return}else if(Tr<0&&Wr>0){wr(Yt);return}else if(Tr<0&&Wr<0){wr(Yt);return}else if(Rr>0&&ei>0){wr(lr);return}else if(Rr>0&&ei<0){wr(lr);return}else if(Rr<0&&ei>0){wr(lr);return}else if(Rr<0&&ei<0){wr(lr);return}}for(var Ae=0;Ae<3;++Ae){for(var Qe=De[Ae].primalMinor,Et=De[Ae].mirrorMinor,er=p(z,De[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(er[ce]+=Le*Qe[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Ut=[0,0,0];if(Ut[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]=\"auto\"):this.tickAlign[Ae]=-1,$t=1,Gt=[this.tickAlign[Ae],Nt,$t],Gt[0]===\"auto\"?Gt[0]=g:Gt[0]=parseInt(\"\"+Gt[0]),sr=[0,0,0],ur(Ae,Qe,Et);for(var ce=0;ce<3;++ce)er[ce]+=Le*Qe[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],er,this.tickColor[Ae],Ut,sr,Gt)}if(this.labelEnable[Ae]){$t=0,sr=[0,0,0],this.labels[Ae].length>4&&(wr(Ae),$t=1),Gt=[this.labelAlign[Ae],Nt,$t],Gt[0]===\"auto\"?Gt[0]=g:Gt[0]=parseInt(\"\"+Gt[0]);for(var ce=0;ce<3;++ce)er[ce]+=Le*Qe[ce]*this.labelPad[ce]/G[5*ce];er[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],er,this.labelColor[Ae],[0,0,0],sr,Gt)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(V,G){var Z=new C(V);return Z.update(G),Z}},5304:function(i,a,o){\"use strict\";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,x,b){this.gl=d,this.buffer=v,this.vao=x,this.shader=b}var f=c.prototype;f.draw=function(d,v,x,b,p,C){for(var E=!1,A=0;A<3;++A)E=E||p[A];if(E){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:x,bounds:b,enable:p,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],x=[],b=0,p=0;p<3;++p)for(var C=(p+1)%3,E=(p+2)%3,A=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),A[p]=_,L[p]=_;for(var k=-1;k<=1;k+=2){A[C]=k;for(var M=-1;M<=1;M+=2)A[E]=M,v.push(A[0],A[1],A[2],L[0],L[1],L[2]),b+=1}var g=C;C=E,E=g}var P=s(d,new Float32Array(v)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),z=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],T),O=u(d);return O.attributes.position.location=0,O.attributes.normal.location=1,new c(d,P,z,O)}},6429:function(i,a,o){\"use strict\";i.exports=_;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),x=[0,0,0];(function(){for(var k=0;k<8;++k)h[k]=[1,1,1,1],d[k]=[1,1,1]})();function b(k,M,g){for(var P=0;P<4;++P){k[P]=g[12+P];for(var T=0;T<3;++T)k[P]+=M[T]*g[4*T+P]}}var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function C(k){for(var M=0;M<p.length;++M)if(k=u.positive(k,p[M]),k.length<3)return 0;for(var g=k[0],P=g[0]/g[3],T=g[1]/g[3],z=0,M=1;M+1<k.length;++M){var O=k[M],V=k[M+1],G=O[0]/O[3],Z=O[1]/O[3],H=V[0]/V[3],N=V[1]/V[3],j=G-P,re=Z-T,oe=H-P,_e=N-T;z+=Math.abs(j*_e-re*oe)}return z}var E=[1,1,1],A=[0,0,0],L={cubeEdges:E,axis:A};function _(k,M,g,P,T){l(f,M,k),l(f,g,f);for(var z=0,O=0;O<2;++O){v[2]=P[O][2];for(var V=0;V<2;++V){v[1]=P[V][1];for(var G=0;G<2;++G)v[0]=P[G][0],b(h[z],v,f),z+=1}}for(var Z=-1,O=0;O<8;++O){for(var H=h[O][3],N=0;N<3;++N)d[O][N]=h[O][N]/H;T&&(d[O][2]*=-1),H<0&&(Z<0||d[O][2]<d[Z][2])&&(Z=O)}if(Z<0){Z=0;for(var j=0;j<3;++j){for(var re=(j+2)%3,oe=(j+1)%3,_e=-1,Me=-1,ke=0;ke<2;++ke){var me=ke<<j,ie=me+(ke<<re)+(1-ke<<oe),Se=me+(1-ke<<re)+(ke<<oe);c(d[me],d[ie],d[Se],x)<0||(ke?_e=1:Me=1)}if(_e<0||Me<0){Me>_e&&(Z|=1<<j);continue}for(var ke=0;ke<2;++ke){var me=ke<<j,ie=me+(ke<<re)+(1-ke<<oe),Se=me+(1-ke<<re)+(ke<<oe),Le=C([h[me],h[ie],h[Se],h[me+(1<<re)+(1<<oe)]]);ke?_e=Le:Me=Le}if(Me>_e){Z|=1<<j;continue}}}for(var Ae=7^Z,De=-1,O=0;O<8;++O)O===Z||O===Ae||(De<0||d[De][1]>d[O][1])&&(De=O);for(var Pe=-1,O=0;O<3;++O){var ge=De^1<<O;if(!(ge===Z||ge===Ae)){Pe<0&&(Pe=ge);var oe=d[ge];oe[0]<d[Pe][0]&&(Pe=ge)}}for(var Fe=-1,O=0;O<3;++O){var ge=De^1<<O;if(!(ge===Z||ge===Ae||ge===Pe)){Fe<0&&(Fe=ge);var oe=d[ge];oe[0]>d[Fe][0]&&(Fe=ge)}}var ce=E;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Pe^De)]=De&Pe,ce[s.log2(De^Fe)]=De&Fe;var Ze=Fe^7;Ze===Z||Ze===Ae?(Ze=Pe^7,ce[s.log2(Fe^Ze)]=Ze&Fe):ce[s.log2(Pe^Ze)]=Ze&Pe;for(var ct=A,pt=Z,j=0;j<3;++j)pt&1<<j?ct[j]=-1:ct[j]=1;return L}},501:function(i,a,o){\"use strict\";i.exports=E;var s=o(2762),l=o(8116),u=o(1879).n,c=[0,0,0],f=[0,0,0],h=[0,0,0],d=[0,0,0],v=[1,1];function x(A){return A[0]=A[1]=A[2]=0,A}function b(A,L){return A[0]=L[0],A[1]=L[1],A[2]=L[2],A}function p(A,L,_,k,M,g,P,T){this.gl=A,this.vertBuffer=L,this.vao=_,this.shader=k,this.tickCount=M,this.tickOffset=g,this.gridCount=P,this.gridOffset=T}var C=p.prototype;C.bind=function(A,L,_){this.shader.bind(),this.shader.uniforms.model=A,this.shader.uniforms.view=L,this.shader.uniforms.projection=_,v[0]=this.gl.drawingBufferWidth,v[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=v,this.vao.bind()},C.unbind=function(){this.vao.unbind()},C.drawAxisLine=function(A,L,_,k,M){var g=x(f);this.shader.uniforms.majorAxis=f,g[A]=L[1][A]-L[0][A],this.shader.uniforms.minorAxis=g;var P=b(d,_);P[A]+=L[0][A],this.shader.uniforms.offset=P,this.shader.uniforms.lineWidth=M,this.shader.uniforms.color=k;var T=x(h);T[(A+2)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6);var T=x(h);T[(A+1)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6)},C.drawAxisTicks=function(A,L,_,k,M){if(this.tickCount[A]){var g=x(c);g[A]=1,this.shader.uniforms.majorAxis=g,this.shader.uniforms.offset=L,this.shader.uniforms.minorAxis=_,this.shader.uniforms.color=k,this.shader.uniforms.lineWidth=M;var P=x(h);P[A]=1,this.shader.uniforms.screenAxis=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[A],this.tickOffset[A])}},C.drawGrid=function(A,L,_,k,M,g){if(this.gridCount[A]){var P=x(f);P[L]=_[1][L]-_[0][L],this.shader.uniforms.minorAxis=P;var T=b(d,k);T[L]+=_[0][L],this.shader.uniforms.offset=T;var z=x(c);z[A]=1,this.shader.uniforms.majorAxis=z;var O=x(h);O[A]=1,this.shader.uniforms.screenAxis=O,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=M,this.vao.draw(this.gl.TRIANGLES,this.gridCount[A],this.gridOffset[A])}},C.drawZero=function(A,L,_,k,M,g){var P=x(f);this.shader.uniforms.majorAxis=P,P[A]=_[1][A]-_[0][A],this.shader.uniforms.minorAxis=P;var T=b(d,k);T[A]+=_[0][A],this.shader.uniforms.offset=T;var z=x(h);z[L]=1,this.shader.uniforms.screenAxis=z,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=M,this.vao.draw(this.gl.TRIANGLES,6)},C.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function E(A,L,_){var k=[],M=[0,0,0],g=[0,0,0],P=[0,0,0],T=[0,0,0];k.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var z=0;z<3;++z){for(var G=k.length/3|0,O=0;O<_[z].length;++O){var V=+_[z][O].x;k.push(V,0,1,V,1,1,V,0,-1,V,0,-1,V,1,1,V,1,-1)}var H=k.length/3|0;M[z]=G,g[z]=H-G;for(var G=k.length/3|0,Z=0;Z<_[z].length;++Z){var V=+_[z][Z].x;k.push(V,0,1,V,1,1,V,0,-1,V,0,-1,V,1,1,V,1,-1)}var H=k.length/3|0;P[z]=G,T[z]=H-G}var N=s(A,new Float32Array(k)),j=l(A,[{buffer:N,type:A.FLOAT,size:3,stride:0,offset:0}]),re=u(A);return re.attributes.position.location=0,new p(A,N,j,re,g,M,T,P)}},1879:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 offset, majorAxis, minorAxis, screenAxis;\n",
       "uniform float lineWidth;\n",
       "uniform vec2 screenShape;\n",
       "\n",
       "vec3 project(vec3 p) {\n",
       "  vec4 pp = projection * (view * (model * vec4(p, 1.0)));\n",
       "  return pp.xyz / max(pp.w, 0.0001);\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  vec3 major = position.x * majorAxis;\n",
       "  vec3 minor = position.y * minorAxis;\n",
       "\n",
       "  vec3 vPosition = major + minor + offset;\n",
       "  vec3 pPosition = project(vPosition);\n",
       "  vec3 offset = project(vPosition + screenAxis * position.z);\n",
       "\n",
       "  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n",
       "\n",
       "  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 color;\n",
       "void main() {\n",
       "  gl_FragColor = color;\n",
       "}`]);a.n=function(x){return l(x,u,c,null,[{name:\"position\",type:\"vec3\"}])};var f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 offset, axis, alignDir, alignOpt;\n",
       "uniform float scale, angle, pixelScale;\n",
       "uniform vec2 resolution;\n",
       "\n",
       "vec3 project(vec3 p) {\n",
       "  vec4 pp = projection * (view * (model * vec4(p, 1.0)));\n",
       "  return pp.xyz / max(pp.w, 0.0001);\n",
       "}\n",
       "\n",
       "float computeViewAngle(vec3 a, vec3 b) {\n",
       "  vec3 A = project(a);\n",
       "  vec3 B = project(b);\n",
       "\n",
       "  return atan(\n",
       "    (B.y - A.y) * resolution.y,\n",
       "    (B.x - A.x) * resolution.x\n",
       "  );\n",
       "}\n",
       "\n",
       "const float PI = 3.141592;\n",
       "const float TWO_PI = 2.0 * PI;\n",
       "const float HALF_PI = 0.5 * PI;\n",
       "const float ONE_AND_HALF_PI = 1.5 * PI;\n",
       "\n",
       "int option = int(floor(alignOpt.x + 0.001));\n",
       "float hv_ratio =       alignOpt.y;\n",
       "bool enableAlign =    (alignOpt.z != 0.0);\n",
       "\n",
       "float mod_angle(float a) {\n",
       "  return mod(a, PI);\n",
       "}\n",
       "\n",
       "float positive_angle(float a) {\n",
       "  return mod_angle((a < 0.0) ?\n",
       "    a + TWO_PI :\n",
       "    a\n",
       "  );\n",
       "}\n",
       "\n",
       "float look_upwards(float a) {\n",
       "  float b = positive_angle(a);\n",
       "  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n",
       "    b - PI :\n",
       "    b;\n",
       "}\n",
       "\n",
       "float look_horizontal_or_vertical(float a, float ratio) {\n",
       "  // ratio controls the ratio between being horizontal to (vertical + horizontal)\n",
       "  // if ratio is set to 0.5 then it is 50%, 50%.\n",
       "  // when using a higher ratio e.g. 0.75 the result would\n",
       "  // likely be more horizontal than vertical.\n",
       "\n",
       "  float b = positive_angle(a);\n",
       "\n",
       "  return\n",
       "    (b < (      ratio) * HALF_PI) ? 0.0 :\n",
       "    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n",
       "    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n",
       "    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n",
       "                                    0.0;\n",
       "}\n",
       "\n",
       "float roundTo(float a, float b) {\n",
       "  return float(b * floor((a + 0.5 * b) / b));\n",
       "}\n",
       "\n",
       "float look_round_n_directions(float a, int n) {\n",
       "  float b = positive_angle(a);\n",
       "  float div = TWO_PI / float(n);\n",
       "  float c = roundTo(b, div);\n",
       "  return look_upwards(c);\n",
       "}\n",
       "\n",
       "float applyAlignOption(float rawAngle, float delta) {\n",
       "  return\n",
       "    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\n",
       "    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n",
       "    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\n",
       "    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n",
       "    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\n",
       "                    rawAngle;                // otherwise return back raw input angle\n",
       "}\n",
       "\n",
       "bool isAxisTitle = (axis.x == 0.0) &&\n",
       "                   (axis.y == 0.0) &&\n",
       "                   (axis.z == 0.0);\n",
       "\n",
       "void main() {\n",
       "  //Compute world offset\n",
       "  float axisDistance = position.z;\n",
       "  vec3 dataPosition = axisDistance * axis + offset;\n",
       "\n",
       "  float beta = angle; // i.e. user defined attributes for each tick\n",
       "\n",
       "  float axisAngle;\n",
       "  float clipAngle;\n",
       "  float flip;\n",
       "\n",
       "  if (enableAlign) {\n",
       "    axisAngle = (isAxisTitle) ? HALF_PI :\n",
       "                      computeViewAngle(dataPosition, dataPosition + axis);\n",
       "    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n",
       "\n",
       "    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n",
       "    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n",
       "\n",
       "    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n",
       "                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n",
       "\n",
       "    beta += applyAlignOption(clipAngle, flip * PI);\n",
       "  }\n",
       "\n",
       "  //Compute plane offset\n",
       "  vec2 planeCoord = position.xy * pixelScale;\n",
       "\n",
       "  mat2 planeXform = scale * mat2(\n",
       "     cos(beta), sin(beta),\n",
       "    -sin(beta), cos(beta)\n",
       "  );\n",
       "\n",
       "  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n",
       "\n",
       "  //Compute clip position\n",
       "  vec3 clipPosition = project(dataPosition);\n",
       "\n",
       "  //Apply text offset in clip coordinates\n",
       "  clipPosition += vec3(viewOffset, 0.0);\n",
       "\n",
       "  //Done\n",
       "  gl_Position = vec4(clipPosition, 1.0);\n",
       "}\n",
       "`]),h=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 color;\n",
       "void main() {\n",
       "  gl_FragColor = color;\n",
       "}`]);a.Q=function(x){return l(x,f,h,null,[{name:\"position\",type:\"vec3\"}])};var d=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec3 normal;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 enable;\n",
       "uniform vec3 bounds[2];\n",
       "\n",
       "varying vec3 colorChannel;\n",
       "\n",
       "void main() {\n",
       "\n",
       "  vec3 signAxis = sign(bounds[1] - bounds[0]);\n",
       "\n",
       "  vec3 realNormal = signAxis * normal;\n",
       "\n",
       "  if(dot(realNormal, enable) > 0.0) {\n",
       "    vec3 minRange = min(bounds[0], bounds[1]);\n",
       "    vec3 maxRange = max(bounds[0], bounds[1]);\n",
       "    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n",
       "    gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n",
       "  } else {\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  }\n",
       "\n",
       "  colorChannel = abs(realNormal);\n",
       "}\n",
       "`]),v=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 colors[3];\n",
       "\n",
       "varying vec3 colorChannel;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = colorChannel.x * colors[0] +\n",
       "                 colorChannel.y * colors[1] +\n",
       "                 colorChannel.z * colors[2];\n",
       "}`]);a.bg=function(x){return l(x,d,v,null,[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}])}},4935:function(i,a,o){\"use strict\";i.exports=C;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(E,A,L,_){this.gl=E,this.shader=A,this.buffer=L,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=v.prototype,b=[0,0];x.bind=function(E,A,L,_){this.vao.bind(),this.shader.bind();var k=this.shader.uniforms;k.model=E,k.view=A,k.projection=L,k.pixelScale=_,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},x.unbind=function(){this.vao.unbind()},x.update=function(E,A,L,_,k){var M=[];function g(j,re,oe,_e,Me,ke){var me=[oe.style,oe.weight,oe.variant,oe.family].join(\"_\"),ie=h[me];ie||(ie=h[me]={});var Se=ie[re];Se||(Se=ie[re]=p(re,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:\"center\",textBaseline:\"middle\",lineSpacing:Me,styletags:ke}));for(var Le=(_e||12)/12,Ae=Se.positions,De=Se.cells,Pe=0,ge=De.length;Pe<ge;++Pe)for(var Fe=De[Pe],ce=2;ce>=0;--ce){var Ze=Ae[Fe[ce]];M.push(Le*Ze[0],-Le*Ze[1],j)}}for(var P=[0,0,0],T=[0,0,0],z=[0,0,0],O=[0,0,0],V=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=M.length/d|0,g(.5*(E[0][Z]+E[1][Z]),A[Z],L[Z],12,V,G),O[Z]=(M.length/d|0)-z[Z],P[Z]=M.length/d|0;for(var H=0;H<_[Z].length;++H)if(_[Z][H].text){var N={family:_[Z][H].font||k[Z].family,style:k[Z].fontStyle||k[Z].style,weight:k[Z].fontWeight||k[Z].weight,variant:k[Z].fontVariant||k[Z].variant};g(_[Z][H].x,_[Z][H].text,N,_[Z][H].fontSize||12,V,G)}T[Z]=(M.length/d|0)-P[Z]}this.buffer.update(M),this.tickOffset=P,this.tickCount=T,this.labelOffset=z,this.labelCount=O},x.drawTicks=function(E,A,L,_,k,M,g,P){this.tickCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=k,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[E],this.tickOffset[E]))},x.drawLabel=function(E,A,L,_,k,M,g,P){this.labelCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=k,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.labelCount[E],this.labelOffset[E]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function p(E,A){try{return u(E,A)}catch(L){return console.warn('error vectorizing text:\"'+E+'\" error:',L),{cells:[],positions:[]}}}function C(E,A,L,_,k,M){var g=s(E),P=l(E,[{buffer:g,size:3}]),T=c(E);T.attributes.position.location=0;var z=new v(E,T,g,P);return z.update(A,L,_,k,M),z}},6444:function(i,a){\"use strict\";a.create=s,a.equal=l;function o(u,c){var f=u+\"\",h=f.indexOf(\".\"),d=0;h>=0&&(d=f.length-h-1);var v=Math.pow(10,d),x=Math.round(u*c*v),b=x+\"\";if(b.indexOf(\"e\")>=0)return b;var p=x/v,C=x%v;x<0?(p=-Math.ceil(p)|0,C=-C|0):(p=Math.floor(p)|0,C=C|0);var E=\"\"+p;if(x<0&&(E=\"-\"+E),d){for(var A=\"\"+C;A.length<d;)A=\"0\"+A;return E+\".\"+A}else return E}function s(u,c){for(var f=[],h=0;h<3;++h){for(var d=[],v=.5*(u[0][h]+u[1][h]),x=0;x*c[h]<=u[1][h];++x)d.push({x:x*c[h],text:o(c[h],x)});for(var x=-1;x*c[h]>=u[0][h];--x)d.push({x:x*c[h],text:o(c[h],x)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;h<u[f].length;++h){var d=u[f][h],v=c[f][h];if(d.x!==v.x||d.text!==v.text||d.font!==v.font||d.fontColor!==v.fontColor||d.fontSize!==v.fontSize||d.dx!==v.dx||d.dy!==v.dy)return!1}}return!0}},5445:function(i,a,o){\"use strict\";i.exports=L;var s=o(5033),l=o(5202),u=o(6429),c=o(6760),f=o(5665),h=o(5352),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=new Float32Array(16);function x(_,k,M){this.lo=_,this.hi=k,this.pixelsPerDataUnit=M}var b=[0,0,0,1],p=[0,0,0,1];function C(_,k,M,g,P){for(var T=0;T<3;++T){for(var z=b,O=p,V=0;V<3;++V)O[V]=z[V]=M[V];O[3]=z[3]=1,O[T]+=1,h(O,O,k),O[3]<0&&(_[T]=1/0),z[T]-=1,h(z,z,k),z[3]<0&&(_[T]=1/0);var G=(z[0]/z[3]-O[0]/O[3])*g,Z=(z[1]/z[3]-O[1]/O[3])*P;_[T]=.25*Math.sqrt(G*G+Z*Z)}return _}var E=[new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0)],A=[0,0,0];function L(_,k,M,g,Z){var T=k.model||d,z=k.view||d,O=k.projection||d,V=k._ortho||!1,G=_.bounds,Z=Z||u(T,z,O,G,V),H=Z.axis;c(v,z,T),c(v,O,v);for(var N=E,j=0;j<3;++j)N[j].lo=1/0,N[j].hi=-1/0,N[j].pixelsPerDataUnit=1/0;var re=s(f(v,v));f(v,v);for(var oe=0;oe<3;++oe){var _e=(oe+1)%3,Me=(oe+2)%3,ke=A;e:for(var j=0;j<2;++j){var me=[];if(H[oe]<0!=!!j){ke[oe]=G[j][oe];for(var ie=0;ie<2;++ie){ke[_e]=G[ie^j][_e];for(var Se=0;Se<2;++Se)ke[Me]=G[Se^ie^j][Me],me.push(ke.slice())}for(var Le=V?5:4,ie=Le;ie===Le;++ie){if(me.length===0)continue e;me=l.positive(me,re[ie])}for(var ie=0;ie<me.length;++ie)for(var Me=me[ie],Ae=C(A,v,Me,M,g),Se=0;Se<3;++Se)N[Se].lo=Math.min(N[Se].lo,Me[Se]),N[Se].hi=Math.max(N[Se].hi,Me[Se]),Se!==oe&&(N[Se].pixelsPerDataUnit=Math.min(N[Se].pixelsPerDataUnit,Math.abs(Ae[Se])))}}}return N}},2762:function(i,a,o){\"use strict\";var s=o(1888),l=o(5298),u=o(9618),c=[\"uint8\",\"uint8_clamped\",\"uint16\",\"uint32\",\"int8\",\"int16\",\"int32\",\"float32\"];function f(p,C,E,A,L){this.gl=p,this.type=C,this.handle=E,this.length=A,this.usage=L}var h=f.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function d(p,C,E,A,L,_){var k=L.length*L.BYTES_PER_ELEMENT;if(_<0)return p.bufferData(C,L,A),k;if(k+_>E)throw new Error(\"gl-buffer: If resizing buffer, must not specify offset\");return p.bufferSubData(C,_,L),E}function v(p,C){for(var E=s.malloc(p.length,C),A=p.length,L=0;L<A;++L)E[L]=p[L];return E}function x(p,C){for(var E=1,A=C.length-1;A>=0;--A){if(C[A]!==E)return!1;E*=p[A]}return!0}h.update=function(p,C){if(typeof C!=\"number\"&&(C=-1),this.bind(),typeof p==\"object\"&&typeof p.shape!=\"undefined\"){var E=p.dtype;if(c.indexOf(E)<0&&(E=\"float32\"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension(\"OES_element_index_uint\");A&&E!==\"uint16\"?E=\"uint32\":E=\"uint16\"}if(E===p.dtype&&x(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,C):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),C);else{var L=s.malloc(p.size,E),_=u(L,p.shape);l.assign(_,p),C<0?this.length=d(this.gl,this.type,this.length,this.usage,L,C):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),C),s.free(L)}}else if(Array.isArray(p)){var k;this.type===this.gl.ELEMENT_ARRAY_BUFFER?k=v(p,\"uint16\"):k=v(p,\"float32\"),C<0?this.length=d(this.gl,this.type,this.length,this.usage,k,C):this.length=d(this.gl,this.type,this.length,this.usage,k.subarray(0,p.length),C),s.free(k)}else if(typeof p==\"object\"&&typeof p.length==\"number\")this.length=d(this.gl,this.type,this.length,this.usage,p,C);else if(typeof p==\"number\"||p===void 0){if(C>=0)throw new Error(\"gl-buffer: Cannot specify offset when resizing buffer\");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error(\"gl-buffer: Invalid data type\")};function b(p,C,E,A){if(E=E||p.ARRAY_BUFFER,A=A||p.DYNAMIC_DRAW,E!==p.ARRAY_BUFFER&&E!==p.ELEMENT_ARRAY_BUFFER)throw new Error(\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\");if(A!==p.DYNAMIC_DRAW&&A!==p.STATIC_DRAW&&A!==p.STREAM_DRAW)throw new Error(\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\");var L=p.createBuffer(),_=new f(p,E,L,0,A);return _.update(C),_}i.exports=b},6405:function(i,a,o){\"use strict\";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,x=1/0,b=-1/0,p=1/0,C=-1/0,E=1/0,A=-1/0,L=null,_=null,k=[],M=1/0,g=!1,P=u.coneSizemode===\"raw\",T=0;T<f.length;T++){var z=f[T];x=Math.min(z[0],x),b=Math.max(z[0],b),p=Math.min(z[1],p),C=Math.max(z[1],C),E=Math.min(z[2],E),A=Math.max(z[2],A);var O=h[T];if(s.length(O)>v&&(v=s.length(O)),T&&!P){var V=2*s.distance(L,z)/(s.length(_)+s.length(O));V?(M=Math.min(M,V),g=!1):g=!0}g||(L=z,_=O),k.push(O)}var G=[x,p,E],Z=[b,C,A];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var H=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*H),d.coneScale=N;for(var T=0,j=0;T<f.length;T++)for(var z=f[T],re=z[0],oe=z[1],_e=z[2],Me=k[T],ke=s.length(Me)*H,me=0,ie=8;me<ie;me++){d.positions.push([re,oe,_e,j++]),d.positions.push([re,oe,_e,j++]),d.positions.push([re,oe,_e,j++]),d.positions.push([re,oe,_e,j++]),d.positions.push([re,oe,_e,j++]),d.positions.push([re,oe,_e,j++]),d.vectors.push(Me),d.vectors.push(Me),d.vectors.push(Me),d.vectors.push(Me),d.vectors.push(Me),d.vectors.push(Me),d.vertexIntensity.push(ke,ke,ke),d.vertexIntensity.push(ke,ke,ke);var Se=d.positions.length;d.cells.push([Se-6,Se-5,Se-4],[Se-3,Se-2,Se-1])}return d};var l=o(614);i.exports.createMesh=o(9060),i.exports.createConeMesh=function(u,c){return i.exports.createMesh(u,c,{shaders:l,traceType:\"cone\"})}},9060:function(i,a,o){\"use strict\";var s=o(9405),l=o(2762),u=o(8116),c=o(7766),f=o(6760),h=o(7608),d=o(9618),v=o(6729),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(k,M,g,P,T,z,O,V,G,Z,H){this.gl=k,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=M,this.dirty=!0,this.triShader=g,this.pickShader=P,this.trianglePositions=T,this.triangleVectors=z,this.triangleColors=V,this.triangleUVs=G,this.triangleIds=O,this.triangleVAO=Z,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=H,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=x,this._view=x,this._projection=x,this._resolution=[1,1]}var p=b.prototype;p.isOpaque=function(){return this.opacity>=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(k){this.pickId=k};function C(k){for(var M=v({colormap:k,nshades:256,format:\"rgba\"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var T=M[P],z=0;z<3;++z)g[4*P+z]=T[z];g[4*P+3]=T[3]*255}return d(g,[256,256,4],[4,0,1])}function E(k){for(var M=k.length,g=new Array(M),P=0;P<M;++P)g[P]=k[P][2];return g}p.update=function(k){k=k||{};var M=this.gl;this.dirty=!0,\"lightPosition\"in k&&(this.lightPosition=k.lightPosition),\"opacity\"in k&&(this.opacity=k.opacity),\"ambient\"in k&&(this.ambientLight=k.ambient),\"diffuse\"in k&&(this.diffuseLight=k.diffuse),\"specular\"in k&&(this.specularLight=k.specular),\"roughness\"in k&&(this.roughness=k.roughness),\"fresnel\"in k&&(this.fresnel=k.fresnel),k.tubeScale!==void 0&&(this.tubeScale=k.tubeScale),k.vectorScale!==void 0&&(this.vectorScale=k.vectorScale),k.coneScale!==void 0&&(this.coneScale=k.coneScale),k.coneOffset!==void 0&&(this.coneOffset=k.coneOffset),k.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=M.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=M.LINEAR,this.texture.setPixels(C(k.colormap)),this.texture.generateMipmap());var g=k.cells,P=k.positions,T=k.vectors;if(!(!P||!g||!T)){var z=[],O=[],V=[],G=[],Z=[];this.cells=g,this.positions=P,this.vectors=T;var H=k.meshColor||[1,1,1,1],N=k.vertexIntensity,j=1/0,re=-1/0;if(N)if(k.vertexIntensityBounds)j=+k.vertexIntensityBounds[0],re=+k.vertexIntensityBounds[1];else for(var oe=0;oe<N.length;++oe){var _e=N[oe];j=Math.min(j,_e),re=Math.max(re,_e)}else for(var oe=0;oe<P.length;++oe){var _e=P[oe][2];j=Math.min(j,_e),re=Math.max(re,_e)}N?this.intensity=N:this.intensity=E(P),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var oe=0;oe<P.length;++oe)for(var Me=P[oe],ke=0;ke<3;++ke)isNaN(Me[ke])||!isFinite(Me[ke])||(this.bounds[0][ke]=Math.min(this.bounds[0][ke],Me[ke]),this.bounds[1][ke]=Math.max(this.bounds[1][ke],Me[ke]));var me=0;e:for(var oe=0;oe<g.length;++oe){var ie=g[oe];switch(ie.length){case 3:for(var ke=0;ke<3;++ke)for(var Se=ie[ke],Me=P[Se],Le=0;Le<3;++Le)if(isNaN(Me[Le])||!isFinite(Me[Le]))continue e;for(var ke=0;ke<3;++ke){var Se=ie[2-ke],Me=P[Se];z.push(Me[0],Me[1],Me[2],Me[3]);var Ae=T[Se];O.push(Ae[0],Ae[1],Ae[2],Ae[3]||0);var De=H;De.length===3?V.push(De[0],De[1],De[2],1):V.push(De[0],De[1],De[2],De[3]);var Pe;N?Pe=[(N[Se]-j)/(re-j),0]:Pe=[(Me[2]-j)/(re-j),0],G.push(Pe[0],Pe[1]),Z.push(oe)}me+=1;break;default:break}}this.triangleCount=me,this.trianglePositions.update(z),this.triangleVectors.update(O),this.triangleColors.update(V),this.triangleUVs.update(G),this.triangleIds.update(new Uint32Array(Z))}},p.drawTransparent=p.draw=function(k){k=k||{};for(var M=this.gl,g=k.model||x,P=k.view||x,T=k.projection||x,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);var V={model:g,view:P,projection:T,inverseModel:x.slice(),clipBounds:z,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};V.inverseModel=h(V.inverseModel,V.model),M.disable(M.CULL_FACE),this.texture.bind(0);var G=new Array(16);f(G,V.view,V.model),f(G,V.projection,G),h(G,G);for(var O=0;O<3;++O)V.eyePosition[O]=G[12+O]/G[15];for(var Z=G[15],O=0;O<3;++O)Z+=this.lightPosition[O]*G[4*O+3];for(var O=0;O<3;++O){for(var H=G[12+O],N=0;N<3;++N)H+=G[4*N+O]*this.lightPosition[N];V.lightPosition[O]=H/Z}if(this.triangleCount>0){var j=this.triShader;j.bind(),j.uniforms=V,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(k){k=k||{};for(var M=this.gl,g=k.model||x,P=k.view||x,T=k.projection||x,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var V={model:g,view:P,projection:T,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=V,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(k){if(!k||k.id!==this.pickId)return null;var M=k.value[0]+256*k.value[1]+65536*k.value[2],g=this.cells[M],P=this.positions[g[1]].slice(0,3),T={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType===\"cone\"?T.index=Math.floor(g[1]/48):this.traceType===\"streamtube\"&&(T.intensity=this.intensity[g[1]],T.velocity=this.vectors[g[1]].slice(0,3),T.divergence=this.vectors[g[1]][3],T.index=M),T},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(k,M){var g=s(k,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(k,M){var g=s(k,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function _(k,M,g){var P=g.shaders;arguments.length===1&&(M=k,k=M.gl);var T=A(k,P),z=L(k,P),O=c(k,d(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=k.LINEAR_MIPMAP_LINEAR,O.magFilter=k.LINEAR;var V=l(k),G=l(k),Z=l(k),H=l(k),N=l(k),j=u(k,[{buffer:V,type:k.FLOAT,size:4},{buffer:N,type:k.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:k.FLOAT,size:4},{buffer:H,type:k.FLOAT,size:2},{buffer:G,type:k.FLOAT,size:4}]),re=new b(k,O,T,z,V,G,N,Z,H,j,g.traceType||\"cone\");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 getOrthogonalVector(vec3 v) {\n",
       "  // Return up-vector for only-z vector.\n",
       "  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n",
       "  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n",
       "  // Assign z = 0, x = -b, y = a:\n",
       "  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n",
       "  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n",
       "    return normalize(vec3(-v.y, v.x, 0.0));\n",
       "  } else {\n",
       "    return normalize(vec3(0.0, v.z, -v.y));\n",
       "  }\n",
       "}\n",
       "\n",
       "// Calculate the cone vertex and normal at the given index.\n",
       "//\n",
       "// The returned vertex is for a cone with its top at origin and height of 1.0,\n",
       "// pointing in the direction of the vector attribute.\n",
       "//\n",
       "// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n",
       "// These vertices are used to make up the triangles of the cone by the following:\n",
       "//   segment + 0 top vertex\n",
       "//   segment + 1 perimeter vertex a+1\n",
       "//   segment + 2 perimeter vertex a\n",
       "//   segment + 3 center base vertex\n",
       "//   segment + 4 perimeter vertex a\n",
       "//   segment + 5 perimeter vertex a+1\n",
       "// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n",
       "// To go from index to segment, floor(index / 6)\n",
       "// To go from segment to angle, 2*pi * (segment/segmentCount)\n",
       "// To go from index to segment index, index - (segment*6)\n",
       "//\n",
       "vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n",
       "\n",
       "  const float segmentCount = 8.0;\n",
       "\n",
       "  float index = rawIndex - floor(rawIndex /\n",
       "    (segmentCount * 6.0)) *\n",
       "    (segmentCount * 6.0);\n",
       "\n",
       "  float segment = floor(0.001 + index/6.0);\n",
       "  float segmentIndex = index - (segment*6.0);\n",
       "\n",
       "  normal = -normalize(d);\n",
       "\n",
       "  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n",
       "    return mix(vec3(0.0), -d, coneOffset);\n",
       "  }\n",
       "\n",
       "  float nextAngle = (\n",
       "    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n",
       "    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n",
       "  ) ? 1.0 : 0.0;\n",
       "  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n",
       "\n",
       "  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n",
       "  vec3 v2 = v1 - d;\n",
       "\n",
       "  vec3 u = getOrthogonalVector(d);\n",
       "  vec3 v = normalize(cross(u, d));\n",
       "\n",
       "  vec3 x = u * cos(angle) * length(d)*0.25;\n",
       "  vec3 y = v * sin(angle) * length(d)*0.25;\n",
       "  vec3 v3 = v2 + x + y;\n",
       "  if (segmentIndex < 3.0) {\n",
       "    vec3 tx = u * sin(angle);\n",
       "    vec3 ty = v * -cos(angle);\n",
       "    vec3 tangent = tx + ty;\n",
       "    normal = normalize(cross(v3 - v1, tangent));\n",
       "  }\n",
       "\n",
       "  if (segmentIndex == 0.0) {\n",
       "    return mix(d, vec3(0.0), coneOffset);\n",
       "  }\n",
       "  return v3;\n",
       "}\n",
       "\n",
       "attribute vec3 vector;\n",
       "attribute vec4 color, position;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform float vectorScale, coneScale, coneOffset;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 eyePosition, lightPosition;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  // Scale the vector magnitude to stay constant with\n",
       "  // model & view changes.\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n",
       "  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * conePosition;\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  // vec4 m_position  = model * vec4(conePosition, 1.0);\n",
       "  vec4 t_position  = view * conePosition;\n",
       "  gl_Position      = projection * t_position;\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = conePosition.xyz;\n",
       "  f_position       = position.xyz;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float beckmannDistribution(float x, float roughness) {\n",
       "  float NdotH = max(x, 0.0001);\n",
       "  float cos2Alpha = NdotH * NdotH;\n",
       "  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n",
       "  float roughness2 = roughness * roughness;\n",
       "  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n",
       "  return exp(tan2Alpha / roughness2) / denom;\n",
       "}\n",
       "\n",
       "float cookTorranceSpecular(\n",
       "  vec3 lightDirection,\n",
       "  vec3 viewDirection,\n",
       "  vec3 surfaceNormal,\n",
       "  float roughness,\n",
       "  float fresnel) {\n",
       "\n",
       "  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n",
       "  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n",
       "\n",
       "  //Half angle vector\n",
       "  vec3 H = normalize(lightDirection + viewDirection);\n",
       "\n",
       "  //Geometric term\n",
       "  float NdotH = max(dot(surfaceNormal, H), 0.0);\n",
       "  float VdotH = max(dot(viewDirection, H), 0.000001);\n",
       "  float LdotH = max(dot(lightDirection, H), 0.000001);\n",
       "  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n",
       "  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n",
       "  float G = min(1.0, min(G1, G2));\n",
       "  \n",
       "  //Distribution term\n",
       "  float D = beckmannDistribution(NdotH, roughness);\n",
       "\n",
       "  //Fresnel term\n",
       "  float F = pow(1.0 - VdotN, fresnel);\n",
       "\n",
       "  //Multiply terms and done\n",
       "  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n",
       "}\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "  vec3 N = normalize(f_normal);\n",
       "  vec3 L = normalize(f_lightDirection);\n",
       "  vec3 V = normalize(f_eyeDirection);\n",
       "\n",
       "  if(gl_FrontFacing) {\n",
       "    N = -N;\n",
       "  }\n",
       "\n",
       "  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n",
       "  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n",
       "\n",
       "  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n",
       "  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n",
       "\n",
       "  gl_FragColor = litColor * opacity;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 getOrthogonalVector(vec3 v) {\n",
       "  // Return up-vector for only-z vector.\n",
       "  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n",
       "  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n",
       "  // Assign z = 0, x = -b, y = a:\n",
       "  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n",
       "  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n",
       "    return normalize(vec3(-v.y, v.x, 0.0));\n",
       "  } else {\n",
       "    return normalize(vec3(0.0, v.z, -v.y));\n",
       "  }\n",
       "}\n",
       "\n",
       "// Calculate the cone vertex and normal at the given index.\n",
       "//\n",
       "// The returned vertex is for a cone with its top at origin and height of 1.0,\n",
       "// pointing in the direction of the vector attribute.\n",
       "//\n",
       "// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n",
       "// These vertices are used to make up the triangles of the cone by the following:\n",
       "//   segment + 0 top vertex\n",
       "//   segment + 1 perimeter vertex a+1\n",
       "//   segment + 2 perimeter vertex a\n",
       "//   segment + 3 center base vertex\n",
       "//   segment + 4 perimeter vertex a\n",
       "//   segment + 5 perimeter vertex a+1\n",
       "// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n",
       "// To go from index to segment, floor(index / 6)\n",
       "// To go from segment to angle, 2*pi * (segment/segmentCount)\n",
       "// To go from index to segment index, index - (segment*6)\n",
       "//\n",
       "vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n",
       "\n",
       "  const float segmentCount = 8.0;\n",
       "\n",
       "  float index = rawIndex - floor(rawIndex /\n",
       "    (segmentCount * 6.0)) *\n",
       "    (segmentCount * 6.0);\n",
       "\n",
       "  float segment = floor(0.001 + index/6.0);\n",
       "  float segmentIndex = index - (segment*6.0);\n",
       "\n",
       "  normal = -normalize(d);\n",
       "\n",
       "  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n",
       "    return mix(vec3(0.0), -d, coneOffset);\n",
       "  }\n",
       "\n",
       "  float nextAngle = (\n",
       "    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n",
       "    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n",
       "  ) ? 1.0 : 0.0;\n",
       "  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n",
       "\n",
       "  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n",
       "  vec3 v2 = v1 - d;\n",
       "\n",
       "  vec3 u = getOrthogonalVector(d);\n",
       "  vec3 v = normalize(cross(u, d));\n",
       "\n",
       "  vec3 x = u * cos(angle) * length(d)*0.25;\n",
       "  vec3 y = v * sin(angle) * length(d)*0.25;\n",
       "  vec3 v3 = v2 + x + y;\n",
       "  if (segmentIndex < 3.0) {\n",
       "    vec3 tx = u * sin(angle);\n",
       "    vec3 ty = v * -cos(angle);\n",
       "    vec3 tangent = tx + ty;\n",
       "    normal = normalize(cross(v3 - v1, tangent));\n",
       "  }\n",
       "\n",
       "  if (segmentIndex == 0.0) {\n",
       "    return mix(d, vec3(0.0), coneOffset);\n",
       "  }\n",
       "  return v3;\n",
       "}\n",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float vectorScale, coneScale, coneOffset;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n",
       "  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "  gl_Position = projection * (view * conePosition);\n",
       "  f_id        = id;\n",
       "  f_position  = position.xyz;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec3\"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec3\"}]}},737:function(i){i.exports={0:\"NONE\",1:\"ONE\",2:\"LINE_LOOP\",3:\"LINE_STRIP\",4:\"TRIANGLES\",5:\"TRIANGLE_STRIP\",6:\"TRIANGLE_FAN\",256:\"DEPTH_BUFFER_BIT\",512:\"NEVER\",513:\"LESS\",514:\"EQUAL\",515:\"LEQUAL\",516:\"GREATER\",517:\"NOTEQUAL\",518:\"GEQUAL\",519:\"ALWAYS\",768:\"SRC_COLOR\",769:\"ONE_MINUS_SRC_COLOR\",770:\"SRC_ALPHA\",771:\"ONE_MINUS_SRC_ALPHA\",772:\"DST_ALPHA\",773:\"ONE_MINUS_DST_ALPHA\",774:\"DST_COLOR\",775:\"ONE_MINUS_DST_COLOR\",776:\"SRC_ALPHA_SATURATE\",1024:\"STENCIL_BUFFER_BIT\",1028:\"FRONT\",1029:\"BACK\",1032:\"FRONT_AND_BACK\",1280:\"INVALID_ENUM\",1281:\"INVALID_VALUE\",1282:\"INVALID_OPERATION\",1285:\"OUT_OF_MEMORY\",1286:\"INVALID_FRAMEBUFFER_OPERATION\",2304:\"CW\",2305:\"CCW\",2849:\"LINE_WIDTH\",2884:\"CULL_FACE\",2885:\"CULL_FACE_MODE\",2886:\"FRONT_FACE\",2928:\"DEPTH_RANGE\",2929:\"DEPTH_TEST\",2930:\"DEPTH_WRITEMASK\",2931:\"DEPTH_CLEAR_VALUE\",2932:\"DEPTH_FUNC\",2960:\"STENCIL_TEST\",2961:\"STENCIL_CLEAR_VALUE\",2962:\"STENCIL_FUNC\",2963:\"STENCIL_VALUE_MASK\",2964:\"STENCIL_FAIL\",2965:\"STENCIL_PASS_DEPTH_FAIL\",2966:\"STENCIL_PASS_DEPTH_PASS\",2967:\"STENCIL_REF\",2968:\"STENCIL_WRITEMASK\",2978:\"VIEWPORT\",3024:\"DITHER\",3042:\"BLEND\",3088:\"SCISSOR_BOX\",3089:\"SCISSOR_TEST\",3106:\"COLOR_CLEAR_VALUE\",3107:\"COLOR_WRITEMASK\",3317:\"UNPACK_ALIGNMENT\",3333:\"PACK_ALIGNMENT\",3379:\"MAX_TEXTURE_SIZE\",3386:\"MAX_VIEWPORT_DIMS\",3408:\"SUBPIXEL_BITS\",3410:\"RED_BITS\",3411:\"GREEN_BITS\",3412:\"BLUE_BITS\",3413:\"ALPHA_BITS\",3414:\"DEPTH_BITS\",3415:\"STENCIL_BITS\",3553:\"TEXTURE_2D\",4352:\"DONT_CARE\",4353:\"FASTEST\",4354:\"NICEST\",5120:\"BYTE\",5121:\"UNSIGNED_BYTE\",5122:\"SHORT\",5123:\"UNSIGNED_SHORT\",5124:\"INT\",5125:\"UNSIGNED_INT\",5126:\"FLOAT\",5386:\"INVERT\",5890:\"TEXTURE\",6401:\"STENCIL_INDEX\",6402:\"DEPTH_COMPONENT\",6406:\"ALPHA\",6407:\"RGB\",6408:\"RGBA\",6409:\"LUMINANCE\",6410:\"LUMINANCE_ALPHA\",7680:\"KEEP\",7681:\"REPLACE\",7682:\"INCR\",7683:\"DECR\",7936:\"VENDOR\",7937:\"RENDERER\",7938:\"VERSION\",9728:\"NEAREST\",9729:\"LINEAR\",9984:\"NEAREST_MIPMAP_NEAREST\",9985:\"LINEAR_MIPMAP_NEAREST\",9986:\"NEAREST_MIPMAP_LINEAR\",9987:\"LINEAR_MIPMAP_LINEAR\",10240:\"TEXTURE_MAG_FILTER\",10241:\"TEXTURE_MIN_FILTER\",10242:\"TEXTURE_WRAP_S\",10243:\"TEXTURE_WRAP_T\",10497:\"REPEAT\",10752:\"POLYGON_OFFSET_UNITS\",16384:\"COLOR_BUFFER_BIT\",32769:\"CONSTANT_COLOR\",32770:\"ONE_MINUS_CONSTANT_COLOR\",32771:\"CONSTANT_ALPHA\",32772:\"ONE_MINUS_CONSTANT_ALPHA\",32773:\"BLEND_COLOR\",32774:\"FUNC_ADD\",32777:\"BLEND_EQUATION_RGB\",32778:\"FUNC_SUBTRACT\",32779:\"FUNC_REVERSE_SUBTRACT\",32819:\"UNSIGNED_SHORT_4_4_4_4\",32820:\"UNSIGNED_SHORT_5_5_5_1\",32823:\"POLYGON_OFFSET_FILL\",32824:\"POLYGON_OFFSET_FACTOR\",32854:\"RGBA4\",32855:\"RGB5_A1\",32873:\"TEXTURE_BINDING_2D\",32926:\"SAMPLE_ALPHA_TO_COVERAGE\",32928:\"SAMPLE_COVERAGE\",32936:\"SAMPLE_BUFFERS\",32937:\"SAMPLES\",32938:\"SAMPLE_COVERAGE_VALUE\",32939:\"SAMPLE_COVERAGE_INVERT\",32968:\"BLEND_DST_RGB\",32969:\"BLEND_SRC_RGB\",32970:\"BLEND_DST_ALPHA\",32971:\"BLEND_SRC_ALPHA\",33071:\"CLAMP_TO_EDGE\",33170:\"GENERATE_MIPMAP_HINT\",33189:\"DEPTH_COMPONENT16\",33306:\"DEPTH_STENCIL_ATTACHMENT\",33635:\"UNSIGNED_SHORT_5_6_5\",33648:\"MIRRORED_REPEAT\",33901:\"ALIASED_POINT_SIZE_RANGE\",33902:\"ALIASED_LINE_WIDTH_RANGE\",33984:\"TEXTURE0\",33985:\"TEXTURE1\",33986:\"TEXTURE2\",33987:\"TEXTURE3\",33988:\"TEXTURE4\",33989:\"TEXTURE5\",33990:\"TEXTURE6\",33991:\"TEXTURE7\",33992:\"TEXTURE8\",33993:\"TEXTURE9\",33994:\"TEXTURE10\",33995:\"TEXTURE11\",33996:\"TEXTURE12\",33997:\"TEXTURE13\",33998:\"TEXTURE14\",33999:\"TEXTURE15\",34e3:\"TEXTURE16\",34001:\"TEXTURE17\",34002:\"TEXTURE18\",34003:\"TEXTURE19\",34004:\"TEXTURE20\",34005:\"TEXTURE21\",34006:\"TEXTURE22\",34007:\"TEXTURE23\",34008:\"TEXTURE24\",34009:\"TEXTURE25\",34010:\"TEXTURE26\",34011:\"TEXTURE27\",34012:\"TEXTURE28\",34013:\"TEXTURE29\",34014:\"TEXTURE30\",34015:\"TEXTURE31\",34016:\"ACTIVE_TEXTURE\",34024:\"MAX_RENDERBUFFER_SIZE\",34041:\"DEPTH_STENCIL\",34055:\"INCR_WRAP\",34056:\"DECR_WRAP\",34067:\"TEXTURE_CUBE_MAP\",34068:\"TEXTURE_BINDING_CUBE_MAP\",34069:\"TEXTURE_CUBE_MAP_POSITIVE_X\",34070:\"TEXTURE_CUBE_MAP_NEGATIVE_X\",34071:\"TEXTURE_CUBE_MAP_POSITIVE_Y\",34072:\"TEXTURE_CUBE_MAP_NEGATIVE_Y\",34073:\"TEXTURE_CUBE_MAP_POSITIVE_Z\",34074:\"TEXTURE_CUBE_MAP_NEGATIVE_Z\",34076:\"MAX_CUBE_MAP_TEXTURE_SIZE\",34338:\"VERTEX_ATTRIB_ARRAY_ENABLED\",34339:\"VERTEX_ATTRIB_ARRAY_SIZE\",34340:\"VERTEX_ATTRIB_ARRAY_STRIDE\",34341:\"VERTEX_ATTRIB_ARRAY_TYPE\",34342:\"CURRENT_VERTEX_ATTRIB\",34373:\"VERTEX_ATTRIB_ARRAY_POINTER\",34466:\"NUM_COMPRESSED_TEXTURE_FORMATS\",34467:\"COMPRESSED_TEXTURE_FORMATS\",34660:\"BUFFER_SIZE\",34661:\"BUFFER_USAGE\",34816:\"STENCIL_BACK_FUNC\",34817:\"STENCIL_BACK_FAIL\",34818:\"STENCIL_BACK_PASS_DEPTH_FAIL\",34819:\"STENCIL_BACK_PASS_DEPTH_PASS\",34877:\"BLEND_EQUATION_ALPHA\",34921:\"MAX_VERTEX_ATTRIBS\",34922:\"VERTEX_ATTRIB_ARRAY_NORMALIZED\",34930:\"MAX_TEXTURE_IMAGE_UNITS\",34962:\"ARRAY_BUFFER\",34963:\"ELEMENT_ARRAY_BUFFER\",34964:\"ARRAY_BUFFER_BINDING\",34965:\"ELEMENT_ARRAY_BUFFER_BINDING\",34975:\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\",35040:\"STREAM_DRAW\",35044:\"STATIC_DRAW\",35048:\"DYNAMIC_DRAW\",35632:\"FRAGMENT_SHADER\",35633:\"VERTEX_SHADER\",35660:\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\",35661:\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\",35663:\"SHADER_TYPE\",35664:\"FLOAT_VEC2\",35665:\"FLOAT_VEC3\",35666:\"FLOAT_VEC4\",35667:\"INT_VEC2\",35668:\"INT_VEC3\",35669:\"INT_VEC4\",35670:\"BOOL\",35671:\"BOOL_VEC2\",35672:\"BOOL_VEC3\",35673:\"BOOL_VEC4\",35674:\"FLOAT_MAT2\",35675:\"FLOAT_MAT3\",35676:\"FLOAT_MAT4\",35678:\"SAMPLER_2D\",35680:\"SAMPLER_CUBE\",35712:\"DELETE_STATUS\",35713:\"COMPILE_STATUS\",35714:\"LINK_STATUS\",35715:\"VALIDATE_STATUS\",35716:\"INFO_LOG_LENGTH\",35717:\"ATTACHED_SHADERS\",35718:\"ACTIVE_UNIFORMS\",35719:\"ACTIVE_UNIFORM_MAX_LENGTH\",35720:\"SHADER_SOURCE_LENGTH\",35721:\"ACTIVE_ATTRIBUTES\",35722:\"ACTIVE_ATTRIBUTE_MAX_LENGTH\",35724:\"SHADING_LANGUAGE_VERSION\",35725:\"CURRENT_PROGRAM\",36003:\"STENCIL_BACK_REF\",36004:\"STENCIL_BACK_VALUE_MASK\",36005:\"STENCIL_BACK_WRITEMASK\",36006:\"FRAMEBUFFER_BINDING\",36007:\"RENDERBUFFER_BINDING\",36048:\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\",36049:\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\",36050:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\",36051:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\",36053:\"FRAMEBUFFER_COMPLETE\",36054:\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\",36055:\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\",36057:\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\",36061:\"FRAMEBUFFER_UNSUPPORTED\",36064:\"COLOR_ATTACHMENT0\",36096:\"DEPTH_ATTACHMENT\",36128:\"STENCIL_ATTACHMENT\",36160:\"FRAMEBUFFER\",36161:\"RENDERBUFFER\",36162:\"RENDERBUFFER_WIDTH\",36163:\"RENDERBUFFER_HEIGHT\",36164:\"RENDERBUFFER_INTERNAL_FORMAT\",36168:\"STENCIL_INDEX8\",36176:\"RENDERBUFFER_RED_SIZE\",36177:\"RENDERBUFFER_GREEN_SIZE\",36178:\"RENDERBUFFER_BLUE_SIZE\",36179:\"RENDERBUFFER_ALPHA_SIZE\",36180:\"RENDERBUFFER_DEPTH_SIZE\",36181:\"RENDERBUFFER_STENCIL_SIZE\",36194:\"RGB565\",36336:\"LOW_FLOAT\",36337:\"MEDIUM_FLOAT\",36338:\"HIGH_FLOAT\",36339:\"LOW_INT\",36340:\"MEDIUM_INT\",36341:\"HIGH_INT\",36346:\"SHADER_COMPILER\",36347:\"MAX_VERTEX_UNIFORM_VECTORS\",36348:\"MAX_VARYING_VECTORS\",36349:\"MAX_FRAGMENT_UNIFORM_VECTORS\",37440:\"UNPACK_FLIP_Y_WEBGL\",37441:\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\",37442:\"CONTEXT_LOST_WEBGL\",37443:\"UNPACK_COLORSPACE_CONVERSION_WEBGL\",37444:\"BROWSER_DEFAULT_WEBGL\"}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},9165:function(i,a,o){\"use strict\";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,C,E,A){this.gl=p,this.shader=A,this.buffer=C,this.vao=E,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var C=this.gl,E=this.shader.uniforms;this.shader.bind();var A=E.view=p.view||c,L=E.projection=p.projection||c;E.model=p.model||c,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var _=A[12],k=A[13],M=A[14],g=A[15],P=p._ortho||!1,T=P?2:1,z=T*this.pixelRatio*(L[3]*_+L[7]*k+L[11]*M+L[15]*g)/C.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)C.lineWidth(this.lineWidth[O]*this.pixelRatio),E.capSize=this.capSize[O]*z,this.lineCount[O]&&C.drawArrays(C.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function d(p,C){for(var E=0;E<3;++E)p[0][E]=Math.min(p[0][E],C[E]),p[1][E]=Math.max(p[1][E],C[E])}var v=function(){for(var p=new Array(3),C=0;C<3;++C){for(var E=[],A=1;A<=2;++A)for(var L=-1;L<=1;L+=2){var _=(A+C)%3,k=[0,0,0];k[_]=L,E.push(k)}p[C]=E}return p}();function x(p,C,E,A){for(var L=v[A],_=0;_<L.length;++_){var k=L[_];p.push(C[0],C[1],C[2],E[0],E[1],E[2],E[3],k[0],k[1],k[2])}return L.length}h.update=function(p){p=p||{},\"lineWidth\"in p&&(this.lineWidth=p.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),\"capSize\"in p&&(this.capSize=p.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,\"opacity\"in p&&(this.opacity=+p.opacity,this.opacity<1&&(this.hasAlpha=!0));var C=p.color||[[0,0,0],[0,0,0],[0,0,0]],E=p.position,A=p.error;if(Array.isArray(C[0])||(C=[C,C,C]),E&&A){var L=[],_=E.length,k=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var M=0;M<3;++M){this.lineOffset[M]=k;e:for(var g=0;g<_;++g){for(var P=E[g],T=0;T<3;++T)if(isNaN(P[T])||!isFinite(P[T]))continue e;var z=A[g],O=C[M];if(Array.isArray(O[0])&&(O=C[g]),O.length===3?O=[O[0],O[1],O[2],1]:O.length===4&&(O=[O[0],O[1],O[2],O[3]],!this.hasAlpha&&O[3]<1&&(this.hasAlpha=!0)),!(isNaN(z[0][M])||isNaN(z[1][M]))){if(z[0][M]<0){var V=P.slice();V[M]+=z[0][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,V[0],V[1],V[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,V),k+=2+x(L,V,O,M)}if(z[1][M]>0){var V=P.slice();V[M]+=z[1][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,V[0],V[1],V[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,V),k+=2+x(L,V,O,M)}}}this.lineCount[M]=k-this.lineOffset[M]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var C=p.gl,E=s(C),A=l(C,[{buffer:E,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:C.FLOAT,size:3,offset:28,stride:40}]),L=u(C);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new f(C,E,A,L);return _.update(p),_}},3436:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, offset;\n",
       "attribute vec4 color;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float capSize;\n",
       "varying vec4 fragColor;\n",
       "varying vec3 fragPosition;\n",
       "\n",
       "void main() {\n",
       "  vec4 worldPosition  = model * vec4(position, 1.0);\n",
       "  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n",
       "  gl_Position         = projection * (view * worldPosition);\n",
       "  fragColor           = color;\n",
       "  fragPosition        = position;\n",
       "}`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float opacity;\n",
       "varying vec3 fragPosition;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n",
       "    fragColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "\n",
       "  gl_FragColor = opacity * fragColor;\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"offset\",type:\"vec3\"}])}},2260:function(i,a,o){\"use strict\";var s=o(7766);i.exports=k;var l=null,u,c,f,h;function d(M){var g=M.getParameter(M.FRAMEBUFFER_BINDING),P=M.getParameter(M.RENDERBUFFER_BINDING),T=M.getParameter(M.TEXTURE_BINDING_2D);return[g,P,T]}function v(M,g){M.bindFramebuffer(M.FRAMEBUFFER,g[0]),M.bindRenderbuffer(M.RENDERBUFFER,g[1]),M.bindTexture(M.TEXTURE_2D,g[2])}function x(M,g){var P=M.getParameter(g.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var T=0;T<=P;++T){for(var z=new Array(P),O=0;O<T;++O)z[O]=M.COLOR_ATTACHMENT0+O;for(var O=T;O<P;++O)z[O]=M.NONE;l[T]=z}}function b(M){switch(M){case u:throw new Error(\"gl-fbo: Framebuffer unsupported\");case c:throw new Error(\"gl-fbo: Framebuffer incomplete attachment\");case f:throw new Error(\"gl-fbo: Framebuffer incomplete dimensions\");case h:throw new Error(\"gl-fbo: Framebuffer incomplete missing attachment\");default:throw new Error(\"gl-fbo: Framebuffer failed for unspecified reason\")}}function p(M,g,P,T,z,O){if(!T)return null;var V=s(M,g,P,z,T);return V.magFilter=M.NEAREST,V.minFilter=M.NEAREST,V.mipSamples=1,V.bind(),M.framebufferTexture2D(M.FRAMEBUFFER,O,M.TEXTURE_2D,V.handle,0),V}function C(M,g,P,T,z){var O=M.createRenderbuffer();return M.bindRenderbuffer(M.RENDERBUFFER,O),M.renderbufferStorage(M.RENDERBUFFER,T,g,P),M.framebufferRenderbuffer(M.FRAMEBUFFER,z,M.RENDERBUFFER,O),O}function E(M){var g=d(M.gl),P=M.gl,T=M.handle=P.createFramebuffer(),z=M._shape[0],O=M._shape[1],V=M.color.length,G=M._ext,Z=M._useStencil,H=M._useDepth,N=M._colorType;P.bindFramebuffer(P.FRAMEBUFFER,T);for(var j=0;j<V;++j)M.color[j]=p(P,z,O,N,P.RGBA,P.COLOR_ATTACHMENT0+j);V===0?(M._color_rb=C(P,z,O,P.RGBA4,P.COLOR_ATTACHMENT0),G&&G.drawBuffersWEBGL(l[0])):V>1&&G.drawBuffersWEBGL(l[V]);var re=P.getExtension(\"WEBGL_depth_texture\");re?Z?M.depth=p(P,z,O,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):H&&(M.depth=p(P,z,O,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):H&&Z?M._depth_rb=C(P,z,O,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):H?M._depth_rb=C(P,z,O,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(M._depth_rb=C(P,z,O,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){M._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(P.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var j=0;j<M.color.length;++j)M.color[j].dispose(),M.color[j]=null;M._color_rb&&(P.deleteRenderbuffer(M._color_rb),M._color_rb=null),v(P,g),b(oe)}v(P,g)}function A(M,g,P,T,z,O,V,G){this.gl=M,this._shape=[g|0,P|0],this._destroyed=!1,this._ext=G,this.color=new Array(z);for(var Z=0;Z<z;++Z)this.color[Z]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=T,this._useDepth=O,this._useStencil=V;var H=this,N=[g|0,P|0];Object.defineProperties(N,{0:{get:function(){return H._shape[0]},set:function(j){return H.width=j}},1:{get:function(){return H._shape[1]},set:function(j){return H.height=j}}}),this._shapeVector=N,E(this)}var L=A.prototype;function _(M,g,P){if(M._destroyed)throw new Error(\"gl-fbo: Can't resize destroyed FBO\");if(!(M._shape[0]===g&&M._shape[1]===P)){var T=M.gl,z=T.getParameter(T.MAX_RENDERBUFFER_SIZE);if(g<0||g>z||P<0||P>z)throw new Error(\"gl-fbo: Can't resize FBO, invalid dimensions\");M._shape[0]=g,M._shape[1]=P;for(var O=d(T),V=0;V<M.color.length;++V)M.color[V].shape=M._shape;M._color_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,M._color_rb),T.renderbufferStorage(T.RENDERBUFFER,T.RGBA4,M._shape[0],M._shape[1])),M.depth&&(M.depth.shape=M._shape),M._depth_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,M._depth_rb),M._useDepth&&M._useStencil?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_STENCIL,M._shape[0],M._shape[1]):M._useDepth?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_COMPONENT16,M._shape[0],M._shape[1]):M._useStencil&&T.renderbufferStorage(T.RENDERBUFFER,T.STENCIL_INDEX,M._shape[0],M._shape[1])),T.bindFramebuffer(T.FRAMEBUFFER,M.handle);var G=T.checkFramebufferStatus(T.FRAMEBUFFER);G!==T.FRAMEBUFFER_COMPLETE&&(M.dispose(),v(T,O),b(G)),v(T,O)}}Object.defineProperties(L,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(M){if(Array.isArray(M)||(M=[M|0,M|0]),M.length!==2)throw new Error(\"gl-fbo: Shape vector must be length 2\");var g=M[0]|0,P=M[1]|0;return _(this,g,P),[g,P]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(M){return M=M|0,_(this,M,this._shape[1]),M},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(M){return M=M|0,_(this,this._shape[0],M),M},enumerable:!1}}),L.bind=function(){if(!this._destroyed){var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,this.handle),M.viewport(0,0,this._shape[0],this._shape[1])}},L.dispose=function(){if(!this._destroyed){this._destroyed=!0;var M=this.gl;M.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(M.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var g=0;g<this.color.length;++g)this.color[g].dispose(),this.color[g]=null;this._color_rb&&(M.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function k(M,g,P,T){u||(u=M.FRAMEBUFFER_UNSUPPORTED,c=M.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,f=M.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=M.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var z=M.getExtension(\"WEBGL_draw_buffers\");if(!l&&z&&x(M,z),Array.isArray(g)&&(T=P,P=g[1]|0,g=g[0]|0),typeof g!=\"number\")throw new Error(\"gl-fbo: Missing shape parameter\");var O=M.getParameter(M.MAX_RENDERBUFFER_SIZE);if(g<0||g>O||P<0||P>O)throw new Error(\"gl-fbo: Parameters are too large for FBO\");T=T||{};var V=1;if(\"color\"in T){if(V=Math.max(T.color|0,0),V<0)throw new Error(\"gl-fbo: Must specify a nonnegative number of colors\");if(V>1)if(z){if(V>M.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\"gl-fbo: Context does not support \"+V+\" draw buffers\")}else throw new Error(\"gl-fbo: Multiple draw buffer extension not supported\")}var G=M.UNSIGNED_BYTE,Z=M.getExtension(\"OES_texture_float\");if(T.float&&V>0){if(!Z)throw new Error(\"gl-fbo: Context does not support floating point textures\");G=M.FLOAT}else T.preferFloat&&V>0&&Z&&(G=M.FLOAT);var H=!0;\"depth\"in T&&(H=!!T.depth);var N=!1;return\"stencil\"in T&&(N=!!T.stencil),new A(M,g,P,G,V,H,N,z)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){\"use strict\";var x=u(d)||\"of unknown name (see npm glsl-shader-name)\",b=\"unknown type\";v!==void 0&&(b=v===l.FRAGMENT_SHADER?\"fragment\":\"vertex\");for(var p=s(`Error compiling %s shader %s:\n",
       "`,b,x),C=s(\"%s%s\",p,h),E=h.split(`\n",
       "`),A={},L=0;L<E.length;L++){var _=E[L];if(!(_===\"\"||_===\"\\0\")){var k=parseInt(_.split(\":\")[2]);if(isNaN(k))throw new Error(s(\"Could not parse error: %s\",_));A[k]=_}}for(var M=c(d).split(`\n",
       "`),L=0;L<M.length;L++)if(!(!A[L+3]&&!A[L+2]&&!A[L+1])){var g=M[L];if(p+=g+`\n",
       "`,A[L+1]){var P=A[L+1];P=P.substr(P.split(\":\",3).join(\":\").length+1).trim(),p+=s(`^^^ %s\n",
       "\n",
       "`,P)}}return{long:p.trim(),short:C.trim()}}},7319:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, nextPosition;\n",
       "attribute float arcLength, lineWidth;\n",
       "attribute vec4 color;\n",
       "\n",
       "uniform vec2 screenShape;\n",
       "uniform float pixelRatio;\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec3 worldPosition;\n",
       "varying float pixelArcLength;\n",
       "\n",
       "vec4 project(vec3 p) {\n",
       "  return projection * (view * (model * vec4(p, 1.0)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  vec4 startPoint = project(position);\n",
       "  vec4 endPoint   = project(nextPosition);\n",
       "\n",
       "  vec2 A = startPoint.xy / startPoint.w;\n",
       "  vec2 B =   endPoint.xy /   endPoint.w;\n",
       "\n",
       "  float clipAngle = atan(\n",
       "    (B.y - A.y) * screenShape.y,\n",
       "    (B.x - A.x) * screenShape.x\n",
       "  );\n",
       "\n",
       "  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\n",
       "    sin(clipAngle),\n",
       "    -cos(clipAngle)\n",
       "  ) / screenShape;\n",
       "\n",
       "  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\n",
       "\n",
       "  worldPosition = position;\n",
       "  pixelArcLength = arcLength;\n",
       "  fragColor = color;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3      clipBounds[2];\n",
       "uniform sampler2D dashTexture;\n",
       "uniform float     dashScale;\n",
       "uniform float     opacity;\n",
       "\n",
       "varying vec3    worldPosition;\n",
       "varying float   pixelArcLength;\n",
       "varying vec4    fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n",
       "    fragColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "\n",
       "  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n",
       "  if(dashWeight < 0.5) {\n",
       "    discard;\n",
       "  }\n",
       "  gl_FragColor = fragColor * opacity;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "#define FLOAT_MAX  1.70141184e38\n",
       "#define FLOAT_MIN  1.17549435e-38\n",
       "\n",
       "// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\n",
       "vec4 packFloat(float v) {\n",
       "  float av = abs(v);\n",
       "\n",
       "  //Handle special cases\n",
       "  if(av < FLOAT_MIN) {\n",
       "    return vec4(0.0, 0.0, 0.0, 0.0);\n",
       "  } else if(v > FLOAT_MAX) {\n",
       "    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n",
       "  } else if(v < -FLOAT_MAX) {\n",
       "    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n",
       "  }\n",
       "\n",
       "  vec4 c = vec4(0,0,0,0);\n",
       "\n",
       "  //Compute exponent and mantissa\n",
       "  float e = floor(log2(av));\n",
       "  float m = av * pow(2.0, -e) - 1.0;\n",
       "\n",
       "  //Unpack mantissa\n",
       "  c[1] = floor(128.0 * m);\n",
       "  m -= c[1] / 128.0;\n",
       "  c[2] = floor(32768.0 * m);\n",
       "  m -= c[2] / 32768.0;\n",
       "  c[3] = floor(8388608.0 * m);\n",
       "\n",
       "  //Unpack exponent\n",
       "  float ebias = e + 127.0;\n",
       "  c[0] = floor(ebias / 2.0);\n",
       "  ebias -= c[0] * 2.0;\n",
       "  c[1] += floor(ebias) * 128.0;\n",
       "\n",
       "  //Unpack sign bit\n",
       "  c[0] += 128.0 * step(0.0, -v);\n",
       "\n",
       "  //Scale back to range\n",
       "  return c / 255.0;\n",
       "}\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform float pickId;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec3 worldPosition;\n",
       "varying float pixelArcLength;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n",
       "}`]),h=[{name:\"position\",type:\"vec3\"},{name:\"nextPosition\",type:\"vec3\"},{name:\"arcLength\",type:\"float\"},{name:\"lineWidth\",type:\"float\"},{name:\"color\",type:\"vec4\"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714:function(i,a,o){\"use strict\";i.exports=M;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(g,P,T,z){return c[0]=z,c[1]=T,c[2]=P,c[3]=g,f[0]}var d=o(2478),v=o(9618),x=o(7319),b=x.createShader,p=x.createPickShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(g,P){for(var T=0,z=0;z<3;++z){var O=g[z]-P[z];T+=O*O}return Math.sqrt(T)}function A(g){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)P[0][T]=Math.max(g[0][T],P[0][T]),P[1][T]=Math.min(g[1][T],P[1][T]);return P}function L(g,P,T,z){this.arcLength=g,this.position=P,this.index=T,this.dataCoordinate=z}function _(g,P,T,z,O,V){this.gl=g,this.shader=P,this.pickShader=T,this.buffer=z,this.vao=O,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=V,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var k=_.prototype;k.isTransparent=function(){return this.hasAlpha},k.isOpaque=function(){return!this.hasAlpha},k.pickSlots=1,k.setPickBase=function(g){this.pickId=g},k.drawTransparent=k.draw=function(g){if(this.vertexCount){var P=this.gl,T=this.shader,z=this.vao;T.bind(),T.uniforms={model:g.model||C,view:g.view||C,projection:g.projection||C,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},k.drawPick=function(g){if(this.vertexCount){var P=this.gl,T=this.pickShader,z=this.vao;T.bind(),T.uniforms={model:g.model||C,view:g.view||C,projection:g.projection||C,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},k.update=function(g){var P,T;this.dirty=!0;var z=!!g.connectGaps;\"dashScale\"in g&&(this.dashScale=g.dashScale),this.hasAlpha=!1,\"opacity\"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var O=[],V=[],G=[],Z=0,H=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=g.position||g.positions;if(j){var re=g.color||g.colors||[0,0,0,1],oe=g.lineWidth||1,_e=!1;e:for(P=1;P<j.length;++P){var Me=j[P-1],ke=j[P];for(V.push(Z),G.push(Me.slice()),T=0;T<3;++T){if(isNaN(Me[T])||isNaN(ke[T])||!isFinite(Me[T])||!isFinite(ke[T])){if(!z&&O.length>0){for(var me=0;me<24;++me)O.push(O[O.length-12]);H+=2,_e=!0}continue e}N[0][T]=Math.min(N[0][T],Me[T],ke[T]),N[1][T]=Math.max(N[1][T],Me[T],ke[T])}var ie,Se;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Se=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Se=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Le;Array.isArray(oe)?Le=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Le=oe;var Ae=Z;if(Z+=E(Me,ke),_e){for(T=0;T<2;++T)O.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Le,ie[0],ie[1],ie[2],ie[3]);H+=2,_e=!1}O.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Le,ie[0],ie[1],ie[2],ie[3],Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,-Le,ie[0],ie[1],ie[2],ie[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],Z,-Le,Se[0],Se[1],Se[2],Se[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],Z,Le,Se[0],Se[1],Se[2],Se[3]),H+=4}}if(this.buffer.update(O),V.push(Z),G.push(j[j.length-1].slice()),this.bounds=N,this.vertexCount=H,this.points=G,this.arcLength=V,\"dashes\"in g){var De=g.dashes,Pe=De.slice();for(Pe.unshift(0),P=1;P<Pe.length;++P)Pe[P]=Pe[P-1]+Pe[P];var ge=v(new Array(256*4),[256,1,4]);for(P=0;P<256;++P){for(T=0;T<4;++T)ge.set(P,0,T,0);d.le(Pe,Pe[Pe.length-1]*P/255)&1?ge.set(P,0,0,0):ge.set(P,0,0,255)}this.texture.setPixels(ge)}},k.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},k.pick=function(g){if(!g||g.id!==this.pickId)return null;var P=h(g.value[0],g.value[1],g.value[2],0),T=d.le(this.arcLength,P);if(T<0)return null;if(T===this.arcLength.length-1)return new L(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),T);for(var z=this.points[T],O=this.points[Math.min(T+1,this.points.length-1)],V=(P-this.arcLength[T])/(this.arcLength[T+1]-this.arcLength[T]),G=1-V,Z=[0,0,0],H=0;H<3;++H)Z[H]=G*z[H]+V*O[H];var N=Math.min(V<.5?T:T+1,this.points.length-1);return new L(P,Z,N,this.points[N])};function M(g){var P=g.gl||g.scene&&g.scene.gl,T=b(P);T.attributes.position.location=0,T.attributes.nextPosition.location=1,T.attributes.arcLength.location=2,T.attributes.lineWidth.location=3,T.attributes.color.location=4;var z=p(P);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var O=s(P),V=l(P,[{buffer:O,size:3,offset:0,stride:48},{buffer:O,size:3,offset:12,stride:48},{buffer:O,size:1,offset:24,stride:48},{buffer:O,size:1,offset:28,stride:48},{buffer:O,size:4,offset:32,stride:48}]),G=v(new Array(256*4),[256,1,4]),Z=0;Z<1024;++Z)G.data[Z]=255;var H=u(P,G);H.wrap=P.REPEAT;var N=new _(P,T,z,O,V,H);return N.update(g),N}},1903:function(i){i.exports=a;function a(o){var s=new Float32Array(16);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[8]=o[8],s[9]=o[9],s[10]=o[10],s[11]=o[11],s[12]=o[12],s[13]=o[13],s[14]=o[14],s[15]=o[15],s}},6864:function(i){i.exports=a;function a(){var o=new Float32Array(16);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},9921:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3],f=o[4],h=o[5],d=o[6],v=o[7],x=o[8],b=o[9],p=o[10],C=o[11],E=o[12],A=o[13],L=o[14],_=o[15],k=s*h-l*f,M=s*d-u*f,g=s*v-c*f,P=l*d-u*h,T=l*v-c*h,z=u*v-c*d,O=x*A-b*E,V=x*L-p*E,G=x*_-C*E,Z=b*L-p*A,H=b*_-C*A,N=p*_-C*L;return k*N-M*H+g*Z+P*G-T*V+z*O}},7399:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,v=c+c,x=l*h,b=u*h,p=u*d,C=c*h,E=c*d,A=c*v,L=f*h,_=f*d,k=f*v;return o[0]=1-p-A,o[1]=b+k,o[2]=C-_,o[3]=0,o[4]=b-k,o[5]=1-x-A,o[6]=E+L,o[7]=0,o[8]=C+_,o[9]=E-L,o[10]=1-x-p,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6743:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=u+u,v=c+c,x=f+f,b=u*d,p=u*v,C=u*x,E=c*v,A=c*x,L=f*x,_=h*d,k=h*v,M=h*x;return o[0]=1-(E+L),o[1]=p+M,o[2]=C-k,o[3]=0,o[4]=p-M,o[5]=1-(b+L),o[6]=A+_,o[7]=0,o[8]=C+k,o[9]=A-_,o[10]=1-(b+E),o[11]=0,o[12]=l[0],o[13]=l[1],o[14]=l[2],o[15]=1,o}},7894:function(i){i.exports=a;function a(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7608:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=s[4],d=s[5],v=s[6],x=s[7],b=s[8],p=s[9],C=s[10],E=s[11],A=s[12],L=s[13],_=s[14],k=s[15],M=l*d-u*h,g=l*v-c*h,P=l*x-f*h,T=u*v-c*d,z=u*x-f*d,O=c*x-f*v,V=b*L-p*A,G=b*_-C*A,Z=b*k-E*A,H=p*_-C*L,N=p*k-E*L,j=C*k-E*_,re=M*j-g*N+P*H+T*Z-z*G+O*V;return re?(re=1/re,o[0]=(d*j-v*N+x*H)*re,o[1]=(c*N-u*j-f*H)*re,o[2]=(L*O-_*z+k*T)*re,o[3]=(C*z-p*O-E*T)*re,o[4]=(v*Z-h*j-x*G)*re,o[5]=(l*j-c*Z+f*G)*re,o[6]=(_*P-A*O-k*g)*re,o[7]=(b*O-C*P+E*g)*re,o[8]=(h*N-d*Z+x*V)*re,o[9]=(u*Z-l*N-f*V)*re,o[10]=(A*z-L*P+k*M)*re,o[11]=(p*P-b*z-E*M)*re,o[12]=(d*G-h*H-v*V)*re,o[13]=(l*H-u*G+c*V)*re,o[14]=(L*g-A*T-_*M)*re,o[15]=(b*T-p*g+C*M)*re,o):null}},6582:function(i,a,o){var s=o(7894);i.exports=l;function l(u,c,f,h){var d,v,x,b,p,C,E,A,L,_,k=c[0],M=c[1],g=c[2],P=h[0],T=h[1],z=h[2],O=f[0],V=f[1],G=f[2];return Math.abs(k-O)<1e-6&&Math.abs(M-V)<1e-6&&Math.abs(g-G)<1e-6?s(u):(E=k-O,A=M-V,L=g-G,_=1/Math.sqrt(E*E+A*A+L*L),E*=_,A*=_,L*=_,d=T*L-z*A,v=z*E-P*L,x=P*A-T*E,_=Math.sqrt(d*d+v*v+x*x),_?(_=1/_,d*=_,v*=_,x*=_):(d=0,v=0,x=0),b=A*x-L*v,p=L*d-E*x,C=E*v-A*d,_=Math.sqrt(b*b+p*p+C*C),_?(_=1/_,b*=_,p*=_,C*=_):(b=0,p=0,C=0),u[0]=d,u[1]=b,u[2]=E,u[3]=0,u[4]=v,u[5]=p,u[6]=A,u[7]=0,u[8]=x,u[9]=C,u[10]=L,u[11]=0,u[12]=-(d*k+v*M+x*g),u[13]=-(b*k+p*M+C*g),u[14]=-(E*k+A*M+L*g),u[15]=1,u)}},6760:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=s[4],v=s[5],x=s[6],b=s[7],p=s[8],C=s[9],E=s[10],A=s[11],L=s[12],_=s[13],k=s[14],M=s[15],g=l[0],P=l[1],T=l[2],z=l[3];return o[0]=g*u+P*d+T*p+z*L,o[1]=g*c+P*v+T*C+z*_,o[2]=g*f+P*x+T*E+z*k,o[3]=g*h+P*b+T*A+z*M,g=l[4],P=l[5],T=l[6],z=l[7],o[4]=g*u+P*d+T*p+z*L,o[5]=g*c+P*v+T*C+z*_,o[6]=g*f+P*x+T*E+z*k,o[7]=g*h+P*b+T*A+z*M,g=l[8],P=l[9],T=l[10],z=l[11],o[8]=g*u+P*d+T*p+z*L,o[9]=g*c+P*v+T*C+z*_,o[10]=g*f+P*x+T*E+z*k,o[11]=g*h+P*b+T*A+z*M,g=l[12],P=l[13],T=l[14],z=l[15],o[12]=g*u+P*d+T*p+z*L,o[13]=g*c+P*v+T*C+z*_,o[14]=g*f+P*x+T*E+z*k,o[15]=g*h+P*b+T*A+z*M,o}},4040:function(i){i.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),v=1/(u-c),x=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*v,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*x,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*v,o[14]=(h+f)*x,o[15]=1,o}},4772:function(i){i.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},6079:function(i){i.exports=a;function a(o,s,l,u){var c=u[0],f=u[1],h=u[2],d=Math.sqrt(c*c+f*f+h*h),v,x,b,p,C,E,A,L,_,k,M,g,P,T,z,O,V,G,Z,H,N,j,re,oe;return Math.abs(d)<1e-6?null:(d=1/d,c*=d,f*=d,h*=d,v=Math.sin(l),x=Math.cos(l),b=1-x,p=s[0],C=s[1],E=s[2],A=s[3],L=s[4],_=s[5],k=s[6],M=s[7],g=s[8],P=s[9],T=s[10],z=s[11],O=c*c*b+x,V=f*c*b+h*v,G=h*c*b-f*v,Z=c*f*b-h*v,H=f*f*b+x,N=h*f*b+c*v,j=c*h*b+f*v,re=f*h*b-c*v,oe=h*h*b+x,o[0]=p*O+L*V+g*G,o[1]=C*O+_*V+P*G,o[2]=E*O+k*V+T*G,o[3]=A*O+M*V+z*G,o[4]=p*Z+L*H+g*N,o[5]=C*Z+_*H+P*N,o[6]=E*Z+k*H+T*N,o[7]=A*Z+M*H+z*N,o[8]=p*j+L*re+g*oe,o[9]=C*j+_*re+P*oe,o[10]=E*j+k*re+T*oe,o[11]=A*j+M*re+z*oe,s!==o&&(o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o)}},5567:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[4],h=s[5],d=s[6],v=s[7],x=s[8],b=s[9],p=s[10],C=s[11];return s!==o&&(o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[4]=f*c+x*u,o[5]=h*c+b*u,o[6]=d*c+p*u,o[7]=v*c+C*u,o[8]=x*c-f*u,o[9]=b*c-h*u,o[10]=p*c-d*u,o[11]=C*c-v*u,o}},2408:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],x=s[8],b=s[9],p=s[10],C=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-x*u,o[1]=h*c-b*u,o[2]=d*c-p*u,o[3]=v*c-C*u,o[8]=f*u+x*c,o[9]=h*u+b*c,o[10]=d*u+p*c,o[11]=v*u+C*c,o}},7089:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],x=s[4],b=s[5],p=s[6],C=s[7];return s!==o&&(o[8]=s[8],o[9]=s[9],o[10]=s[10],o[11]=s[11],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c+x*u,o[1]=h*c+b*u,o[2]=d*c+p*u,o[3]=v*c+C*u,o[4]=x*c-f*u,o[5]=b*c-h*u,o[6]=p*c-d*u,o[7]=C*c-v*u,o}},2504:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},7656:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2],h,d,v,x,b,p,C,E,A,L,_,k;return s===o?(o[12]=s[0]*u+s[4]*c+s[8]*f+s[12],o[13]=s[1]*u+s[5]*c+s[9]*f+s[13],o[14]=s[2]*u+s[6]*c+s[10]*f+s[14],o[15]=s[3]*u+s[7]*c+s[11]*f+s[15]):(h=s[0],d=s[1],v=s[2],x=s[3],b=s[4],p=s[5],C=s[6],E=s[7],A=s[8],L=s[9],_=s[10],k=s[11],o[0]=h,o[1]=d,o[2]=v,o[3]=x,o[4]=b,o[5]=p,o[6]=C,o[7]=E,o[8]=A,o[9]=L,o[10]=_,o[11]=k,o[12]=h*u+b*c+A*f+s[12],o[13]=d*u+p*c+L*f+s[13],o[14]=v*u+C*c+_*f+s[14],o[15]=x*u+E*c+k*f+s[15]),o}},5665:function(i){i.exports=a;function a(o,s){if(o===s){var l=s[1],u=s[2],c=s[3],f=s[6],h=s[7],d=s[11];o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=l,o[6]=s[9],o[7]=s[13],o[8]=u,o[9]=f,o[11]=s[14],o[12]=c,o[13]=h,o[14]=d}else o[0]=s[0],o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=s[1],o[5]=s[5],o[6]=s[9],o[7]=s[13],o[8]=s[2],o[9]=s[6],o[10]=s[10],o[11]=s[14],o[12]=s[3],o[13]=s[7],o[14]=s[11],o[15]=s[15];return o}},7626:function(i,a,o){\"use strict\";var s=o(2642),l=o(9346);i.exports=d;function u(v,x){for(var b=[0,0,0,0],p=0;p<4;++p)for(var C=0;C<4;++C)b[C]+=v[4*p+C]*x[p];return b}function c(v,x,b,p,C){for(var E=u(p,u(b,u(x,[v[0],v[1],v[2],1]))),A=0;A<3;++A)E[A]/=E[3];return[.5*C[0]*(1+E[0]),.5*C[1]*(1-E[1])]}function f(v,x){if(v.length===2){for(var b=0,p=0,C=0;C<2;++C)b+=Math.pow(x[C]-v[0][C],2),p+=Math.pow(x[C]-v[1][C],2);return b=Math.sqrt(b),p=Math.sqrt(p),b+p<1e-6?[1,0]:[p/(b+p),b/(p+b)]}else if(v.length===3){var E=[0,0];return l(v[0],v[1],v[2],x,E),s(v,E)}return[]}function h(v,x){for(var b=[0,0,0],p=0;p<v.length;++p)for(var C=v[p],E=x[p],A=0;A<3;++A)b[A]+=E*C[A];return b}function d(v,x,b,p,C,E){if(v.length===1)return[0,v[0].slice()];for(var A=new Array(v.length),L=0;L<v.length;++L)A[L]=c(v[L],b,p,C,E);for(var _=0,k=1/0,L=0;L<A.length;++L){for(var M=0,g=0;g<2;++g)M+=Math.pow(A[L][g]-x[g],2);M<k&&(k=M,_=L)}for(var P=f(A,x),T=0,L=0;L<3;++L){if(P[L]<-.001||P[L]>1.0001)return null;T+=P[L]}return Math.abs(T-1)>.001?null:[_,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, normal;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform mat4 model\n",
       "           , view\n",
       "           , projection\n",
       "           , inverseModel;\n",
       "uniform vec3 eyePosition\n",
       "           , lightPosition;\n",
       "\n",
       "varying vec3 f_normal\n",
       "           , f_lightDirection\n",
       "           , f_eyeDirection\n",
       "           , f_data;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "vec4 project(vec3 p) {\n",
       "  return projection * (view * (model * vec4(p, 1.0)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  gl_Position      = project(position);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * vec4(position , 1.0);\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = position;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float beckmannDistribution(float x, float roughness) {\n",
       "  float NdotH = max(x, 0.0001);\n",
       "  float cos2Alpha = NdotH * NdotH;\n",
       "  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n",
       "  float roughness2 = roughness * roughness;\n",
       "  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n",
       "  return exp(tan2Alpha / roughness2) / denom;\n",
       "}\n",
       "\n",
       "float cookTorranceSpecular(\n",
       "  vec3 lightDirection,\n",
       "  vec3 viewDirection,\n",
       "  vec3 surfaceNormal,\n",
       "  float roughness,\n",
       "  float fresnel) {\n",
       "\n",
       "  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n",
       "  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n",
       "\n",
       "  //Half angle vector\n",
       "  vec3 H = normalize(lightDirection + viewDirection);\n",
       "\n",
       "  //Geometric term\n",
       "  float NdotH = max(dot(surfaceNormal, H), 0.0);\n",
       "  float VdotH = max(dot(viewDirection, H), 0.000001);\n",
       "  float LdotH = max(dot(lightDirection, H), 0.000001);\n",
       "  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n",
       "  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n",
       "  float G = min(1.0, min(G1, G2));\n",
       "  \n",
       "  //Distribution term\n",
       "  float D = beckmannDistribution(NdotH, roughness);\n",
       "\n",
       "  //Fresnel term\n",
       "  float F = pow(1.0 - VdotN, fresnel);\n",
       "\n",
       "  //Multiply terms and done\n",
       "  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n",
       "}\n",
       "\n",
       "//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness\n",
       "            , fresnel\n",
       "            , kambient\n",
       "            , kdiffuse\n",
       "            , kspecular;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal\n",
       "           , f_lightDirection\n",
       "           , f_eyeDirection\n",
       "           , f_data;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (f_color.a == 0.0 ||\n",
       "    outOfRange(clipBounds[0], clipBounds[1], f_data)\n",
       "  ) discard;\n",
       "\n",
       "  vec3 N = normalize(f_normal);\n",
       "  vec3 L = normalize(f_lightDirection);\n",
       "  vec3 V = normalize(f_eyeDirection);\n",
       "\n",
       "  if(gl_FrontFacing) {\n",
       "    N = -N;\n",
       "  }\n",
       "\n",
       "  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n",
       "  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n",
       "\n",
       "  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n",
       "\n",
       "  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n",
       "  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n",
       "\n",
       "  gl_FragColor = litColor * f_color.a;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec3 f_data;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "  f_color = color;\n",
       "  f_data  = position;\n",
       "  f_uv    = uv;\n",
       "}`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform sampler2D texture;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec3 f_data;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n",
       "\n",
       "  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n",
       "}`]),h=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "attribute float pointSize;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n",
       "  } else {\n",
       "    gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "  }\n",
       "  gl_PointSize = pointSize;\n",
       "  f_color = color;\n",
       "  f_uv = uv;\n",
       "}`]),d=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform sampler2D texture;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n",
       "  if(dot(pointR, pointR) > 0.25) {\n",
       "    discard;\n",
       "  }\n",
       "  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n",
       "}`]),v=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "  f_id        = id;\n",
       "  f_position  = position;\n",
       "}`]),x=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]),b=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3  position;\n",
       "attribute float pointSize;\n",
       "attribute vec4  id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n",
       "  } else {\n",
       "    gl_Position  = projection * (view * (model * vec4(position, 1.0)));\n",
       "    gl_PointSize = pointSize;\n",
       "  }\n",
       "  f_id         = id;\n",
       "  f_position   = position;\n",
       "}`]),p=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "}`]),C=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec3 contourColor;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = vec4(contourColor, 1.0);\n",
       "}\n",
       "`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"pointSize\",type:\"float\"}]},a.pickShader={vertex:v,fragment:x,attributes:[{name:\"position\",type:\"vec3\"},{name:\"id\",type:\"vec4\"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:\"position\",type:\"vec3\"},{name:\"pointSize\",type:\"float\"},{name:\"id\",type:\"vec4\"}]},a.contourShader={vertex:p,fragment:C,attributes:[{name:\"position\",type:\"vec3\"}]}},7201:function(i,a,o){\"use strict\";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),x=o(7608),b=o(9618),p=o(6729),C=o(7765),E=o(1888),A=o(840),L=o(7626),_=A.meshShader,k=A.wireShader,M=A.pointShader,g=A.pickShader,P=A.pointPickShader,T=A.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(me,ie,Se,Le,Ae,De,Pe,ge,Fe,ce,Ze,ct,pt,Wt,st,lt,Gt,Nt,$t,sr,wr,ur,Qe,Et,er,Ut,Ft){this.gl=me,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ie,this.dirty=!0,this.triShader=Se,this.lineShader=Le,this.pointShader=Ae,this.pickShader=De,this.pointPickShader=Pe,this.contourShader=ge,this.trianglePositions=Fe,this.triangleColors=Ze,this.triangleNormals=pt,this.triangleUVs=ct,this.triangleIds=ce,this.triangleVAO=Wt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=st,this.edgeColors=Gt,this.edgeUVs=Nt,this.edgeIds=lt,this.edgeVAO=$t,this.edgeCount=0,this.pointPositions=sr,this.pointColors=ur,this.pointUVs=Qe,this.pointSizes=Et,this.pointIds=wr,this.pointVAO=er,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ut,this.contourVAO=Ft,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var V=O.prototype;V.isOpaque=function(){return!this.hasAlpha},V.isTransparent=function(){return this.hasAlpha},V.pickSlots=1,V.setPickBase=function(me){this.pickId=me};function G(me,ie){if(!ie||!ie.length)return 1;for(var Se=0;Se<ie.length;++Se){if(ie.length<2)return 1;if(ie[Se][0]===me)return ie[Se][1];if(ie[Se][0]>me&&Se>0){var Le=(ie[Se][0]-me)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Le)+Le*ie[Se-1][1]}}return 1}function Z(me,ie){for(var Se=p({colormap:me,nshades:256,format:\"rgba\"}),Le=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var De=Se[Ae],Pe=0;Pe<3;++Pe)Le[4*Ae+Pe]=De[Pe];ie?Le[4*Ae+3]=255*G(Ae/255,ie):Le[4*Ae+3]=255*De[3]}return b(Le,[256,256,4],[4,0,1])}function H(me){for(var ie=me.length,Se=new Array(ie),Le=0;Le<ie;++Le)Se[Le]=me[Le][2];return Se}V.highlight=function(me){if(!me||!this.contourEnable){this.contourCount=0;return}for(var ie=C(this.cells,this.intensity,me.intensity),Se=ie.cells,Le=ie.vertexIds,Ae=ie.vertexWeights,De=Se.length,Pe=E.mallocFloat32(2*3*De),ge=0,Fe=0;Fe<De;++Fe)for(var ce=Se[Fe],Ze=0;Ze<2;++Ze){var ct=ce[0];ce.length===2&&(ct=ce[Ze]);for(var pt=Le[ct][0],Wt=Le[ct][1],st=Ae[ct],lt=1-st,Gt=this.positions[pt],Nt=this.positions[Wt],$t=0;$t<3;++$t)Pe[ge++]=st*Gt[$t]+lt*Nt[$t]}this.contourCount=ge/3|0,this.contourPositions.update(Pe.subarray(0,ge)),E.free(Pe)},V.update=function(me){me=me||{};var ie=this.gl;this.dirty=!0,\"contourEnable\"in me&&(this.contourEnable=me.contourEnable),\"contourColor\"in me&&(this.contourColor=me.contourColor),\"lineWidth\"in me&&(this.lineWidth=me.lineWidth),\"lightPosition\"in me&&(this.lightPosition=me.lightPosition),this.hasAlpha=!1,\"opacity\"in me&&(this.opacity=me.opacity,this.opacity<1&&(this.hasAlpha=!0)),\"opacityscale\"in me&&(this.opacityscale=me.opacityscale,this.hasAlpha=!0),\"ambient\"in me&&(this.ambientLight=me.ambient),\"diffuse\"in me&&(this.diffuseLight=me.diffuse),\"specular\"in me&&(this.specularLight=me.specular),\"roughness\"in me&&(this.roughness=me.roughness),\"fresnel\"in me&&(this.fresnel=me.fresnel),me.texture?(this.texture.dispose(),this.texture=h(ie,me.texture)):me.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=ie.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=ie.LINEAR,this.texture.setPixels(Z(me.colormap,this.opacityscale)),this.texture.generateMipmap());var Se=me.cells,Le=me.positions;if(!(!Le||!Se)){var Ae=[],De=[],Pe=[],ge=[],Fe=[],ce=[],Ze=[],ct=[],pt=[],Wt=[],st=[],lt=[],Gt=[],Nt=[];this.cells=Se,this.positions=Le;var $t=me.vertexNormals,sr=me.cellNormals,wr=me.vertexNormalsEpsilon===void 0?s:me.vertexNormalsEpsilon,ur=me.faceNormalsEpsilon===void 0?l:me.faceNormalsEpsilon;me.useFacetNormals&&!sr&&(sr=d.faceNormals(Se,Le,ur)),!sr&&!$t&&($t=d.vertexNormals(Se,Le,wr));var Qe=me.vertexColors,Et=me.cellColors,er=me.meshColor||[1,1,1,1],Ut=me.vertexUVs,Ft=me.vertexIntensity,bt=me.cellUVs,yt=me.cellIntensity,Yt=1/0,lr=-1/0;if(!Ut&&!bt)if(Ft)if(me.vertexIntensityBounds)Yt=+me.vertexIntensityBounds[0],lr=+me.vertexIntensityBounds[1];else for(var Tr=0;Tr<Ft.length;++Tr){var Rr=Ft[Tr];Yt=Math.min(Yt,Rr),lr=Math.max(lr,Rr)}else if(yt)if(me.cellIntensityBounds)Yt=+me.cellIntensityBounds[0],lr=+me.cellIntensityBounds[1];else for(var Tr=0;Tr<yt.length;++Tr){var Rr=yt[Tr];Yt=Math.min(Yt,Rr),lr=Math.max(lr,Rr)}else for(var Tr=0;Tr<Le.length;++Tr){var Rr=Le[Tr][2];Yt=Math.min(Yt,Rr),lr=Math.max(lr,Rr)}Ft?this.intensity=Ft:yt?this.intensity=yt:this.intensity=H(Le),this.pickVertex=!(yt||Et);var ei=me.pointSizes,Wr=me.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Tr=0;Tr<Le.length;++Tr)for(var Ur=Le[Tr],dt=0;dt<3;++dt)isNaN(Ur[dt])||!isFinite(Ur[dt])||(this.bounds[0][dt]=Math.min(this.bounds[0][dt],Ur[dt]),this.bounds[1][dt]=Math.max(this.bounds[1][dt],Ur[dt]));var Ge=0,Je=0,je=0;e:for(var Tr=0;Tr<Se.length;++Tr){var $e=Se[Tr];switch($e.length){case 1:for(var wt=$e[0],Ur=Le[wt],dt=0;dt<3;++dt)if(isNaN(Ur[dt])||!isFinite(Ur[dt]))continue e;Wt.push(Ur[0],Ur[1],Ur[2]);var Ie;Qe?Ie=Qe[wt]:Et?Ie=Et[Tr]:Ie=er,this.opacityscale&&Ft?De.push(Ie[0],Ie[1],Ie[2],this.opacity*G((Ft[wt]-Yt)/(lr-Yt),this.opacityscale)):Ie.length===3?st.push(Ie[0],Ie[1],Ie[2],this.opacity):(st.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var xe;Ut?xe=Ut[wt]:Ft?xe=[(Ft[wt]-Yt)/(lr-Yt),0]:bt?xe=bt[Tr]:yt?xe=[(yt[Tr]-Yt)/(lr-Yt),0]:xe=[(Ur[2]-Yt)/(lr-Yt),0],lt.push(xe[0],xe[1]),ei?Gt.push(ei[wt]):Gt.push(Wr),Nt.push(Tr),je+=1;break;case 2:for(var dt=0;dt<2;++dt)for(var wt=$e[dt],Ur=Le[wt],Ce=0;Ce<3;++Ce)if(isNaN(Ur[Ce])||!isFinite(Ur[Ce]))continue e;for(var dt=0;dt<2;++dt){var wt=$e[dt],Ur=Le[wt];ce.push(Ur[0],Ur[1],Ur[2]);var Ie;Qe?Ie=Qe[wt]:Et?Ie=Et[Tr]:Ie=er,this.opacityscale&&Ft?De.push(Ie[0],Ie[1],Ie[2],this.opacity*G((Ft[wt]-Yt)/(lr-Yt),this.opacityscale)):Ie.length===3?Ze.push(Ie[0],Ie[1],Ie[2],this.opacity):(Ze.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var xe;Ut?xe=Ut[wt]:Ft?xe=[(Ft[wt]-Yt)/(lr-Yt),0]:bt?xe=bt[Tr]:yt?xe=[(yt[Tr]-Yt)/(lr-Yt),0]:xe=[(Ur[2]-Yt)/(lr-Yt),0],ct.push(xe[0],xe[1]),pt.push(Tr)}Je+=1;break;case 3:for(var dt=0;dt<3;++dt)for(var wt=$e[dt],Ur=Le[wt],Ce=0;Ce<3;++Ce)if(isNaN(Ur[Ce])||!isFinite(Ur[Ce]))continue e;for(var dt=0;dt<3;++dt){var wt=$e[2-dt],Ur=Le[wt];Ae.push(Ur[0],Ur[1],Ur[2]);var Ie;Qe?Ie=Qe[wt]:Et?Ie=Et[Tr]:Ie=er,Ie?this.opacityscale&&Ft?De.push(Ie[0],Ie[1],Ie[2],this.opacity*G((Ft[wt]-Yt)/(lr-Yt),this.opacityscale)):Ie.length===3?De.push(Ie[0],Ie[1],Ie[2],this.opacity):(De.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0)):De.push(.5,.5,.5,1);var xe;Ut?xe=Ut[wt]:Ft?xe=[(Ft[wt]-Yt)/(lr-Yt),0]:bt?xe=bt[Tr]:yt?xe=[(yt[Tr]-Yt)/(lr-Yt),0]:xe=[(Ur[2]-Yt)/(lr-Yt),0],ge.push(xe[0],xe[1]);var vt;$t?vt=$t[wt]:vt=sr[Tr],Pe.push(vt[0],vt[1],vt[2]),Fe.push(Tr)}Ge+=1;break;default:break}}this.pointCount=je,this.edgeCount=Je,this.triangleCount=Ge,this.pointPositions.update(Wt),this.pointColors.update(st),this.pointUVs.update(lt),this.pointSizes.update(Gt),this.pointIds.update(new Uint32Array(Nt)),this.edgePositions.update(ce),this.edgeColors.update(Ze),this.edgeUVs.update(ct),this.edgeIds.update(new Uint32Array(pt)),this.trianglePositions.update(Ae),this.triangleColors.update(De),this.triangleUVs.update(ge),this.triangleNormals.update(Pe),this.triangleIds.update(new Uint32Array(Fe))}},V.drawTransparent=V.draw=function(me){me=me||{};for(var ie=this.gl,Se=me.model||z,Le=me.view||z,Ae=me.projection||z,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)De[0][Pe]=Math.max(De[0][Pe],this.clipBounds[0][Pe]),De[1][Pe]=Math.min(De[1][Pe],this.clipBounds[1][Pe]);var ge={model:Se,view:Le,projection:Ae,inverseModel:z.slice(),clipBounds:De,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};ge.inverseModel=x(ge.inverseModel,ge.model),ie.disable(ie.CULL_FACE),this.texture.bind(0);var Fe=new Array(16);v(Fe,ge.view,ge.model),v(Fe,ge.projection,Fe),x(Fe,Fe);for(var Pe=0;Pe<3;++Pe)ge.eyePosition[Pe]=Fe[12+Pe]/Fe[15];for(var ce=Fe[15],Pe=0;Pe<3;++Pe)ce+=this.lightPosition[Pe]*Fe[4*Pe+3];for(var Pe=0;Pe<3;++Pe){for(var Ze=Fe[12+Pe],ct=0;ct<3;++ct)Ze+=Fe[4*ct+Pe]*this.lightPosition[ct];ge.lightPosition[Pe]=Ze/ce}if(this.triangleCount>0){var pt=this.triShader;pt.bind(),pt.uniforms=ge,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var pt=this.lineShader;pt.bind(),pt.uniforms=ge,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var pt=this.pointShader;pt.bind(),pt.uniforms=ge,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var pt=this.contourShader;pt.bind(),pt.uniforms=ge,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},V.drawPick=function(me){me=me||{};for(var ie=this.gl,Se=me.model||z,Le=me.view||z,Ae=me.projection||z,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)De[0][Pe]=Math.max(De[0][Pe],this.clipBounds[0][Pe]),De[1][Pe]=Math.min(De[1][Pe],this.clipBounds[1][Pe]);this._model=[].slice.call(Se),this._view=[].slice.call(Le),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var ge={model:Se,view:Le,projection:Ae,clipBounds:De,pickId:this.pickId/255},Fe=this.pickShader;if(Fe.bind(),Fe.uniforms=ge,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Fe=this.pointPickShader;Fe.bind(),Fe.uniforms=ge,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},V.pick=function(me){if(!me||me.id!==this.pickId)return null;for(var ie=me.value[0]+256*me.value[1]+65536*me.value[2],Se=this.cells[ie],Le=this.positions,Ae=new Array(Se.length),De=0;De<Se.length;++De)Ae[De]=Le[Se[De]];var Pe=me.coord[0],ge=me.coord[1];if(!this.pickVertex){var Fe=this.positions[Se[0]],ce=this.positions[Se[1]],Ze=this.positions[Se[2]],ct=[(Fe[0]+ce[0]+Ze[0])/3,(Fe[1]+ce[1]+Ze[1])/3,(Fe[2]+ce[2]+Ze[2])/3];return{_cellCenter:!0,position:[Pe,ge],index:ie,cell:Se,cellId:ie,intensity:this.intensity[ie],dataCoordinate:ct}}var pt=L(Ae,[Pe*this.pixelRatio,this._resolution[1]-ge*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!pt)return null;for(var Wt=pt[2],st=0,De=0;De<Se.length;++De)st+=Wt[De]*this.intensity[Se[De]];return{position:pt[1],index:Se[pt[0]],cell:Se,cellId:ie,intensity:st,dataCoordinate:this.positions[Se[pt[0]]]}},V.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function N(me){var ie=u(me,_.vertex,_.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.normal.location=4,ie}function j(me){var ie=u(me,k.vertex,k.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie}function re(me){var ie=u(me,M.vertex,M.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.pointSize.location=4,ie}function oe(me){var ie=u(me,g.vertex,g.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie}function _e(me){var ie=u(me,P.vertex,P.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie.attributes.pointSize.location=4,ie}function Me(me){var ie=u(me,T.vertex,T.fragment);return ie.attributes.position.location=0,ie}function ke(me,ie){arguments.length===1&&(ie=me,me=ie.gl);var Se=me.getExtension(\"OES_standard_derivatives\")||me.getExtension(\"MOZ_OES_standard_derivatives\")||me.getExtension(\"WEBKIT_OES_standard_derivatives\");if(!Se)throw new Error(\"derivatives not supported\");var Le=N(me),Ae=j(me),De=re(me),Pe=oe(me),ge=_e(me),Fe=Me(me),ce=h(me,b(new Uint8Array([255,255,255,255]),[1,1,4]));ce.generateMipmap(),ce.minFilter=me.LINEAR_MIPMAP_LINEAR,ce.magFilter=me.LINEAR;var Ze=c(me),ct=c(me),pt=c(me),Wt=c(me),st=c(me),lt=f(me,[{buffer:Ze,type:me.FLOAT,size:3},{buffer:st,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ct,type:me.FLOAT,size:4},{buffer:pt,type:me.FLOAT,size:2},{buffer:Wt,type:me.FLOAT,size:3}]),Gt=c(me),Nt=c(me),$t=c(me),sr=c(me),wr=f(me,[{buffer:Gt,type:me.FLOAT,size:3},{buffer:sr,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Nt,type:me.FLOAT,size:4},{buffer:$t,type:me.FLOAT,size:2}]),ur=c(me),Qe=c(me),Et=c(me),er=c(me),Ut=c(me),Ft=f(me,[{buffer:ur,type:me.FLOAT,size:3},{buffer:Ut,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Qe,type:me.FLOAT,size:4},{buffer:Et,type:me.FLOAT,size:2},{buffer:er,type:me.FLOAT,size:1}]),bt=c(me),yt=f(me,[{buffer:bt,type:me.FLOAT,size:3}]),Yt=new O(me,ce,Le,Ae,De,Pe,ge,Fe,Ze,st,ct,pt,Wt,lt,Gt,sr,Nt,$t,wr,ur,Ut,Qe,Et,er,Ft,bt,yt);return Yt.update(ie),Yt}i.exports=ke},4437:function(i,a,o){\"use strict\";i.exports=d;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),h=o(7520);function d(v,x){v=v||document.body,x=x||{};var b=[.01,1/0];\"distanceLimits\"in x&&(b[0]=x.distanceLimits[0],b[1]=x.distanceLimits[1]),\"zoomMin\"in x&&(b[0]=x.zoomMin),\"zoomMax\"in x&&(b[1]=x.zoomMax);var p=l({center:x.center||[0,0,0],up:x.up||[0,1,0],eye:x.eye||[0,0,10],mode:x.mode||\"orbit\",distanceLimits:b}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E=0,A=v.clientWidth,L=v.clientHeight,_={keyBindingMode:\"rotate\",enableWheel:!0,view:p,element:v,delay:x.delay||16,rotateSpeed:x.rotateSpeed||1,zoomSpeed:x.zoomSpeed||1,translateSpeed:x.translateSpeed||1,flipX:!!x.flipX,flipY:!!x.flipY,modes:p.modes,_ortho:x._ortho||x.projection&&x.projection.type===\"orthographic\"||!1,tick:function(){var k=s(),M=this.delay,g=k-2*M;p.idle(k-M),p.recalcMatrix(g),p.flush(k-(100+M*2));for(var P=!0,T=p.computedMatrix,z=0;z<16;++z)P=P&&C[z]===T[z],C[z]=T[z];var O=v.clientWidth===A&&v.clientHeight===L;return A=v.clientWidth,L=v.clientHeight,P?!O:(E=Math.exp(p.computedRadius[0]),!0)},lookAt:function(k,M,g){p.lookAt(p.lastT(),k,M,g)},rotate:function(k,M,g){p.rotate(p.lastT(),k,M,g)},pan:function(k,M,g){p.pan(p.lastT(),k,M,g)},translate:function(k,M,g){p.translate(p.lastT(),k,M,g)}};return Object.defineProperties(_,{matrix:{get:function(){return p.computedMatrix},set:function(k){return p.setMatrix(p.lastT(),k),p.computedMatrix},enumerable:!0},mode:{get:function(){return p.getMode()},set:function(k){var M=p.computedUp.slice(),g=p.computedEye.slice(),P=p.computedCenter.slice();if(p.setMode(k),k===\"turntable\"){var T=s();p._active.lookAt(T,g,P,M),p._active.lookAt(T+500,g,P,[0,0,1]),p._active.flush(T)}return p.getMode()},enumerable:!0},center:{get:function(){return p.computedCenter},set:function(k){return p.lookAt(p.lastT(),null,k),p.computedCenter},enumerable:!0},eye:{get:function(){return p.computedEye},set:function(k){return p.lookAt(p.lastT(),k),p.computedEye},enumerable:!0},up:{get:function(){return p.computedUp},set:function(k){return p.lookAt(p.lastT(),null,null,k),p.computedUp},enumerable:!0},distance:{get:function(){return E},set:function(k){return p.setDistance(p.lastT(),k),k},enumerable:!0},distanceLimits:{get:function(){return p.getDistanceLimits(b)},set:function(k){return p.setDistanceLimits(k),k},enumerable:!0}}),v.addEventListener(\"contextmenu\",function(k){return k.preventDefault(),!1}),_._lastX=-1,_._lastY=-1,_._lastMods={shift:!1,control:!1,alt:!1,meta:!1},_.enableMouseListeners=function(){_.mouseListener=u(v,k),v.addEventListener(\"touchstart\",function(M){var g=f(M.changedTouches[0],v);k(0,g[0],g[1],_._lastMods),k(1,g[0],g[1],_._lastMods)},h?{passive:!0}:!1),v.addEventListener(\"touchmove\",function(M){var g=f(M.changedTouches[0],v);k(1,g[0],g[1],_._lastMods),M.preventDefault()},h?{passive:!1}:!1),v.addEventListener(\"touchend\",function(M){k(0,_._lastX,_._lastY,_._lastMods)},h?{passive:!0}:!1);function k(M,g,P,T){var z=_.keyBindingMode;if(z!==!1){var O=z===\"rotate\",V=z===\"pan\",G=z===\"zoom\",Z=!!T.control,H=!!T.alt,N=!!T.shift,j=!!(M&1),re=!!(M&2),oe=!!(M&4),_e=1/v.clientHeight,Me=_e*(g-_._lastX),ke=_e*(P-_._lastY),me=_.flipX?1:-1,ie=_.flipY?1:-1,Se=Math.PI*_.rotateSpeed,Le=s();if(_._lastX!==-1&&_._lastY!==-1&&((O&&j&&!Z&&!H&&!N||j&&!Z&&!H&&N)&&p.rotate(Le,me*Se*Me,-ie*Se*ke,0),(V&&j&&!Z&&!H&&!N||re||j&&Z&&!H&&!N)&&p.pan(Le,-_.translateSpeed*Me*E,_.translateSpeed*ke*E,0),G&&j&&!Z&&!H&&!N||oe||j&&!Z&&H&&!N)){var Ae=-_.zoomSpeed*ke/window.innerHeight*(Le-p.lastT())*100;p.pan(Le,0,0,E*(Math.exp(Ae)-1))}return _._lastX=g,_._lastY=P,_._lastMods=T,!0}}_.wheelListener=c(v,function(M,g){if(_.keyBindingMode!==!1&&_.enableWheel){var P=_.flipX?1:-1,T=_.flipY?1:-1,z=s();if(Math.abs(M)>Math.abs(g))p.rotate(z,0,0,-M*P*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var O=-_.zoomSpeed*T*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,E*(Math.exp(O)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "attribute vec2 position;\n",
       "varying vec2 uv;\n",
       "void main() {\n",
       "  uv = position;\n",
       "  gl_Position = vec4(position, 0, 1);\n",
       "}`]),c=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform sampler2D accumBuffer;\n",
       "varying vec2 uv;\n",
       "\n",
       "void main() {\n",
       "  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n",
       "  gl_FragColor = min(vec4(1,1,1,1), accum);\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec2\"}])}},4100:function(i,a,o){\"use strict\";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),x=o(4772),b=o(4040),p=o(799),C=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:k,createCamera:s};function E(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(g,P){var T=null;try{T=g.getContext(\"webgl\",P),T||(T=g.getContext(\"experimental-webgl\",P))}catch(z){return null}return T}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var T=Math.round(Math.pow(10,-P));return Math.ceil(g*T)/T}else if(P>0){var T=Math.round(Math.pow(10,P));return Math.ceil(g/T)*T}return Math.ceil(g)}function _(g){return typeof g==\"boolean\"?g:!0}function k(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement(\"canvas\"),g.container){var T=g.container;T.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(C=!!g.glOptions.preserveDrawingBuffer),z=A(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!z)throw new Error(\"webgl not supported\");var O=g.bounds||[[-10,-10,-10],[10,10,10]],V=new E,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!C}),Z=p(z),H=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type===\"orthographic\"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||\"turntable\",_ortho:H},j=g.axes||{},re=l(z,j);re.enable=!j.disable;var oe=g.spikes||{},_e=c(z,oe),Me=[],ke=[],me=[],ie=[],Se=!0,Pe=!0,Le=new Array(16),Ae=new Array(16),De={view:null,projection:Le,model:Ae,_ortho:!1},Pe=!0,ge=[z.drawingBufferWidth,z.drawingBufferHeight],Fe=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:V,camera:Fe,axes:re,axesPixels:null,spikes:_e,bounds:O,objects:Me,shape:ge,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:_(g.autoResize),autoBounds:_(g.autoBounds),autoScale:!!g.autoScale,autoCenter:_(g.autoCenter),clipToBounds:_(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:De,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(sr){this.aspect[0]=sr.x,this.aspect[1]=sr.y,this.aspect[2]=sr.z,Pe=!0},setBounds:function(sr,wr){this.bounds[0][sr]=wr.min,this.bounds[1][sr]=wr.max},setClearColor:function(sr){this.clearColor=sr},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},Ze=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function ct(){if(!ce._stopped&&ce.autoResize){var sr=P.parentNode,wr=1,ur=1;sr&&sr!==document.body?(wr=sr.clientWidth,ur=sr.clientHeight):(wr=window.innerWidth,ur=window.innerHeight);var Qe=Math.ceil(wr*ce.pixelRatio)|0,Et=Math.ceil(ur*ce.pixelRatio)|0;if(Qe!==P.width||Et!==P.height){P.width=Qe,P.height=Et;var er=P.style;er.position=er.position||\"absolute\",er.left=\"0px\",er.top=\"0px\",er.width=wr+\"px\",er.height=ur+\"px\",Se=!0}}}ce.autoResize&&ct(),window.addEventListener(\"resize\",ct);function pt(){for(var sr=Me.length,wr=ie.length,ur=0;ur<wr;++ur)me[ur]=0;e:for(var ur=0;ur<sr;++ur){var Qe=Me[ur],Et=Qe.pickSlots;if(!Et){ke[ur]=-1;continue}for(var er=0;er<wr;++er)if(me[er]+Et<255){ke[ur]=er,Qe.setPickBase(me[er]+1),me[er]+=Et;continue e}var Ut=f(z,ge);ke[ur]=wr,ie.push(Ut),me.push(Et),Qe.setPickBase(1),wr+=1}for(;wr>0&&me[wr-1]===0;)me.pop(),ie.pop().dispose()}ce.update=function(sr){ce._stopped||(sr=sr||{},Se=!0,Pe=!0)},ce.add=function(sr){ce._stopped||(sr.axes=re,Me.push(sr),ke.push(-1),Se=!0,Pe=!0,pt())},ce.remove=function(sr){if(!ce._stopped){var wr=Me.indexOf(sr);wr<0||(Me.splice(wr,1),ke.pop(),Se=!0,Pe=!0,pt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener(\"resize\",ct),P.removeEventListener(\"webglcontextlost\",Wt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var sr=0;sr<Me.length;++sr)Me[sr].dispose();G.dispose();for(var sr=0;sr<ie.length;++sr)ie[sr].dispose();Z.dispose(),z=null,re=null,_e=null,Me=[]}},ce._mouseRotating=!1,ce._prevButtons=0,ce.enableMouseListeners=function(){ce.mouseListener=v(P,function(sr,wr,ur){if(!ce._stopped){var Qe=ie.length,Et=Me.length,er=V.object;V.distance=1/0,V.mouse[0]=wr,V.mouse[1]=ur,V.object=null,V.screen=null,V.dataCoordinate=V.dataPosition=null;var Ut=!1;if(sr&&ce._prevButtons)ce._mouseRotating=!0;else{ce._mouseRotating&&(Pe=!0),ce._mouseRotating=!1;for(var Ft=0;Ft<Qe;++Ft){var bt=ie[Ft].query(wr,Ze[1]-ur-1,ce.pickRadius);if(bt){if(bt.distance>V.distance)continue;for(var yt=0;yt<Et;++yt){var Yt=Me[yt];if(ke[yt]===Ft){var lr=Yt.pick(bt);lr&&(V.buttons=sr,V.screen=bt.coord,V.distance=bt.distance,V.object=Yt,V.index=lr.distance,V.dataPosition=lr.position,V.dataCoordinate=lr.dataCoordinate,V.data=lr,Ut=!0)}}}}}er&&er!==V.object&&(er.highlight&&er.highlight(null),Se=!0),V.object&&(V.object.highlight&&V.object.highlight(V.data),Se=!0),Ut=Ut||V.object!==er,Ut&&ce.onselect&&ce.onselect(V),sr&1&&!(ce._prevButtons&1)&&ce.onclick&&ce.onclick(V),ce._prevButtons=sr}})};function Wt(){if(ce.contextLost)return!0;z.isContextLost()&&(ce.contextLost=!0,ce.mouseListener.enabled=!1,ce.selection.object=null,ce.oncontextloss&&ce.oncontextloss())}P.addEventListener(\"webglcontextlost\",Wt);function st(){if(!Wt()){z.colorMask(!0,!0,!0,!0),z.depthMask(!0),z.disable(z.BLEND),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL);for(var sr=Me.length,wr=ie.length,ur=0;ur<wr;++ur){var Qe=ie[ur];Qe.shape=Ze,Qe.begin();for(var Et=0;Et<sr;++Et)if(ke[Et]===ur){var er=Me[Et];er.drawPick&&(er.pixelRatio=1,er.drawPick(De))}Qe.end()}}}var lt=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Gt=[lt[0].slice(),lt[1].slice()];function Nt(){if(!Wt()){ct();var sr=ce.camera.tick();De.view=ce.camera.matrix,Se=Se||sr,Pe=Pe||sr,re.pixelRatio=ce.pixelRatio,_e.pixelRatio=ce.pixelRatio;var wr=Me.length,ur=lt[0],Qe=lt[1];ur[0]=ur[1]=ur[2]=1/0,Qe[0]=Qe[1]=Qe[2]=-1/0;for(var Et=0;Et<wr;++Et){var er=Me[Et];er.pixelRatio=ce.pixelRatio,er.axes=ce.axes,Se=Se||!!er.dirty,Pe=Pe||!!er.dirty;var Ut=er.bounds;if(Ut)for(var Ft=Ut[0],bt=Ut[1],yt=0;yt<3;++yt)ur[yt]=Math.min(ur[yt],Ft[yt]),Qe[yt]=Math.max(Qe[yt],bt[yt])}var Yt=ce.bounds;if(ce.autoBounds)for(var yt=0;yt<3;++yt){if(Qe[yt]<ur[yt])ur[yt]=-1,Qe[yt]=1;else{ur[yt]===Qe[yt]&&(ur[yt]-=1,Qe[yt]+=1);var lr=.05*(Qe[yt]-ur[yt]);ur[yt]=ur[yt]-lr,Qe[yt]=Qe[yt]+lr}Yt[0][yt]=ur[yt],Yt[1][yt]=Qe[yt]}for(var Tr=!1,yt=0;yt<3;++yt)Tr=Tr||Gt[0][yt]!==Yt[0][yt]||Gt[1][yt]!==Yt[1][yt],Gt[0][yt]=Yt[0][yt],Gt[1][yt]=Yt[1][yt];if(Pe=Pe||Tr,Se=Se||Tr,!!Se){if(Tr){for(var Rr=[0,0,0],Et=0;Et<3;++Et)Rr[Et]=L((Yt[1][Et]-Yt[0][Et])/10);re.autoTicks?re.update({bounds:Yt,tickSpacing:Rr}):re.update({bounds:Yt})}var ei=z.drawingBufferWidth,Wr=z.drawingBufferHeight;ge[0]=ei,ge[1]=Wr,Ze[0]=Math.max(ei/ce.pixelRatio,1)|0,Ze[1]=Math.max(Wr/ce.pixelRatio,1)|0,M(ce,H);for(var Et=0;Et<wr;++Et){var er=Me[Et];er.axesBounds=Yt,ce.clipToBounds&&(er.clipBounds=Yt)}V.object&&(ce.snapToData?_e.position=V.dataCoordinate:_e.position=V.dataPosition,_e.bounds=Yt),Pe&&(Pe=!1,st()),ce.axesPixels=u(ce.axes,De,ei,Wr),ce.onrender&&ce.onrender(),z.bindFramebuffer(z.FRAMEBUFFER,null),z.viewport(0,0,ei,Wr),ce.clearRGBA(),z.depthMask(!0),z.colorMask(!0,!0,!0,!0),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL),z.disable(z.BLEND),z.disable(z.CULL_FACE);var Ur=!1;re.enable&&(Ur=Ur||re.isTransparent(),re.draw(De)),_e.axes=re,V.object&&_e.draw(De),z.disable(z.CULL_FACE);for(var Et=0;Et<wr;++Et){var er=Me[Et];er.axes=re,er.pixelRatio=ce.pixelRatio,er.isOpaque&&er.isOpaque()&&er.draw(De),er.isTransparent&&er.isTransparent()&&(Ur=!0)}if(Ur){G.shape=ge,G.bind(),z.clear(z.DEPTH_BUFFER_BIT),z.colorMask(!1,!1,!1,!1),z.depthMask(!0),z.depthFunc(z.LESS),re.enable&&re.isTransparent()&&re.drawTransparent(De);for(var Et=0;Et<wr;++Et){var er=Me[Et];er.isOpaque&&er.isOpaque()&&er.draw(De)}z.enable(z.BLEND),z.blendEquation(z.FUNC_ADD),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.colorMask(!0,!0,!0,!0),z.depthMask(!1),z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT),re.isTransparent()&&re.drawTransparent(De);for(var Et=0;Et<wr;++Et){var er=Me[Et];er.isTransparent&&er.isTransparent()&&er.drawTransparent(De)}z.bindFramebuffer(z.FRAMEBUFFER,null),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.disable(z.DEPTH_TEST),Z.bind(),G.color[0].bind(0),Z.uniforms.accumBuffer=0,d(z),z.disable(z.BLEND)}Se=!1;for(var Et=0;Et<wr;++Et)Me[Et].dirty=!1}}}function $t(){ce._stopped||ce.contextLost||(Nt(),requestAnimationFrame($t))}return ce.enableMouseListeners(),$t(),ce.redraw=function(){ce._stopped||(Se=!0,Nt())},ce}function M(g,P){var T=g.bounds,z=g.cameraParams,O=z.projection,V=z.model,G=g.gl.drawingBufferWidth,Z=g.gl.drawingBufferHeight,H=g.zNear,N=g.zFar,j=g.fovy,re=G/Z;P?(b(O,-re,re,-1,1,H,N),z._ortho=!0):(x(O,j,re,H,N),z._ortho=!1);for(var oe=0;oe<16;++oe)V[oe]=0;V[15]=1;for(var _e=0,oe=0;oe<3;++oe)_e=Math.max(_e,T[1][oe]-T[0][oe]);for(var oe=0;oe<3;++oe)g.autoScale?V[5*oe]=g.aspect[oe]/(T[1][oe]-T[0][oe]):V[5*oe]=1/_e,g.autoCenter&&(V[12+oe]=-V[5*oe]*.5*(T[0][oe]+T[1][oe]))}},783:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3],v=l[0],x=l[1],b=l[2],p=l[3],C,E,A,L,_;return E=c*v+f*x+h*b+d*p,E<0&&(E=-E,v=-v,x=-x,b=-b,p=-p),1-E>1e-6?(C=Math.acos(E),A=Math.sin(C),L=Math.sin((1-u)*C)/A,_=Math.sin(u*C)/A):(L=1-u,_=u),o[0]=L*c+_*v,o[1]=L*f+_*x,o[2]=L*h+_*b,o[3]=L*d+_*p,o}},5964:function(i){\"use strict\";i.exports=function(a){return!a&&a!==0?\"\":a.toString()}},9366:function(i,a,o){\"use strict\";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join(\"_\"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var x={textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(c,x);x.triangles=!1;var p=s(c,x),C,E;if(h&&h!==1){for(C=0;C<b.positions.length;++C)for(E=0;E<b.positions[C].length;++E)b.positions[C][E]/=h;for(C=0;C<p.positions.length;++C)for(E=0;E<p.positions[C].length;++E)p.positions[C][E]/=h}var A=[[1/0,1/0],[-1/0,-1/0]],L=p.positions.length;for(C=0;C<L;++C){var _=p.positions[C];for(E=0;E<2;++E)A[0][E]=Math.min(A[0][E],_[E]),A[1][E]=Math.max(A[1][E],_[E])}return v[c]=[b,p,A]}},1283:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform vec4 highlightId;\n",
       "uniform float highlightScale;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float scale = 1.0;\n",
       "    if(distance(highlightId, id) < 0.0001) {\n",
       "      scale = highlightScale;\n",
       "    }\n",
       "\n",
       "    vec4 worldPosition = model * vec4(position, 1);\n",
       "    vec4 viewPosition = view * worldPosition;\n",
       "    viewPosition = viewPosition / viewPosition.w;\n",
       "    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n",
       "\n",
       "    gl_Position = clipPosition;\n",
       "    interpColor = color;\n",
       "    pickId = id;\n",
       "    dataCoordinate = position;\n",
       "  }\n",
       "}`]),c=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec2 screenSize;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float highlightScale, pixelRatio;\n",
       "uniform vec4 highlightId;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float scale = pixelRatio;\n",
       "    if(distance(highlightId.bgr, id.bgr) < 0.001) {\n",
       "      scale *= highlightScale;\n",
       "    }\n",
       "\n",
       "    vec4 worldPosition = model * vec4(position, 1.0);\n",
       "    vec4 viewPosition = view * worldPosition;\n",
       "    vec4 clipPosition = projection * viewPosition;\n",
       "    clipPosition /= clipPosition.w;\n",
       "\n",
       "    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n",
       "    interpColor = color;\n",
       "    pickId = id;\n",
       "    dataCoordinate = position;\n",
       "  }\n",
       "}`]),f=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform float highlightScale;\n",
       "uniform vec4 highlightId;\n",
       "uniform vec3 axes[2];\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec2 screenSize;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float scale, pixelRatio;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float lscale = pixelRatio * scale;\n",
       "    if(distance(highlightId, id) < 0.0001) {\n",
       "      lscale *= highlightScale;\n",
       "    }\n",
       "\n",
       "    vec4 clipCenter   = projection * (view * (model * vec4(position, 1)));\n",
       "    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n",
       "    vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n",
       "\n",
       "    gl_Position = clipPosition;\n",
       "    interpColor = color;\n",
       "    pickId = id;\n",
       "    dataCoordinate = dataPosition;\n",
       "  }\n",
       "}\n",
       "`]),h=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 fragClipBounds[2];\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n",
       "    interpColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "  gl_FragColor = interpColor * opacity;\n",
       "}\n",
       "`]),d=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 fragClipBounds[2];\n",
       "uniform float pickGroup;\n",
       "\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickGroup, pickId.bgr);\n",
       "}`]),v=[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"glyph\",type:\"vec2\"},{name:\"id\",type:\"vec4\"}],x={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},C={vertex:u,fragment:d,attributes:v},E={vertex:c,fragment:d,attributes:v},A={vertex:f,fragment:d,attributes:v};function L(_,k){var M=s(_,k),g=M.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,M}a.createPerspective=function(_){return L(_,x)},a.createOrtho=function(_){return L(_,b)},a.createProject=function(_){return L(_,p)},a.createPickPerspective=function(_){return L(_,C)},a.createPickOrtho=function(_){return L(_,E)},a.createPickProject=function(_){return L(_,A)}},8418:function(i,a,o){\"use strict\";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function C(Ae){return b.isView(Ae)&&!(Ae instanceof p)}function E(Ae){return Array.isArray(Ae)||C(Ae)}i.exports=Le;function A(Ae,De){var Pe=Ae[0],ge=Ae[1],Fe=Ae[2],ce=Ae[3];return Ae[0]=De[0]*Pe+De[4]*ge+De[8]*Fe+De[12]*ce,Ae[1]=De[1]*Pe+De[5]*ge+De[9]*Fe+De[13]*ce,Ae[2]=De[2]*Pe+De[6]*ge+De[10]*Fe+De[14]*ce,Ae[3]=De[3]*Pe+De[7]*ge+De[11]*Fe+De[15]*ce,Ae}function L(Ae,De,Pe,ge){return A(ge,ge,Pe),A(ge,ge,De),A(ge,ge,Ae)}function _(Ae,De){this.index=Ae,this.dataCoordinate=this.position=De}function k(Ae){return Ae===!0||Ae>1?1:Ae}function M(Ae,De,Pe,ge,Fe,ce,Ze,ct,pt,Wt,st,lt){this.gl=Ae,this.pixelRatio=1,this.shader=De,this.orthoShader=Pe,this.projectShader=ge,this.pointBuffer=Fe,this.colorBuffer=ce,this.glyphBuffer=Ze,this.idBuffer=ct,this.vao=pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Wt,this.pickOrthoShader=st,this.pickProjectShader=lt,this.points=[],this._selectResult=new _(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var g=M.prototype;g.pickSlots=1,g.setPickBase=function(Ae){this.pickId=Ae},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],T=[0,0,0],z=[0,0,0],O=[0,0,0,1],V=[0,0,0,1],G=x.slice(),Z=[0,0,0],H=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function j(Ae,De){return Ae[0]=De[0],Ae[1]=De[1],Ae[2]=De[2],Ae[3]=1,Ae}function re(Ae,De,Pe,ge){return Ae[0]=De[0],Ae[1]=De[1],Ae[2]=De[2],Ae[Pe]=ge,Ae}function oe(Ae){for(var De=H,Pe=0;Pe<2;++Pe)for(var ge=0;ge<3;++ge)De[Pe][ge]=Math.max(Math.min(Ae[Pe][ge],1e8),-1e8);return De}function _e(Ae,De,Pe,ge){var Fe=De.axesProject,ce=De.gl,Ze=Ae.uniforms,ct=Pe.model||x,pt=Pe.view||x,Wt=Pe.projection||x,st=De.axesBounds,lt=oe(De.clipBounds),Gt;De.axes&&De.axes.lastCubeProps?Gt=De.axes.lastCubeProps.axis:Gt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),Ze.view=pt,Ze.projection=Wt,Ze.screenSize=P,Ze.highlightId=De.highlightId,Ze.highlightScale=De.highlightScale,Ze.clipBounds=lt,Ze.pickGroup=De.pickId/255,Ze.pixelRatio=ge;for(var Nt=0;Nt<3;++Nt)if(Fe[Nt]){Ze.scale=De.projectScale[Nt],Ze.opacity=De.projectOpacity[Nt];for(var $t=G,sr=0;sr<16;++sr)$t[sr]=0;for(var sr=0;sr<4;++sr)$t[5*sr]=1;$t[5*Nt]=0,Gt[Nt]<0?$t[12+Nt]=st[0][Nt]:$t[12+Nt]=st[1][Nt],f($t,ct,$t),Ze.model=$t;var wr=(Nt+1)%3,ur=(Nt+2)%3,Qe=N(T),Et=N(z);Qe[wr]=1,Et[ur]=1;var er=L(Wt,pt,ct,j(O,Qe)),Ut=L(Wt,pt,ct,j(V,Et));if(Math.abs(er[1])>Math.abs(Ut[1])){var Ft=er;er=Ut,Ut=Ft,Ft=Qe,Qe=Et,Et=Ft;var bt=wr;wr=ur,ur=bt}er[0]<0&&(Qe[wr]=-1),Ut[1]>0&&(Et[ur]=-1);for(var yt=0,Yt=0,sr=0;sr<4;++sr)yt+=Math.pow(ct[4*wr+sr],2),Yt+=Math.pow(ct[4*ur+sr],2);Qe[wr]/=Math.sqrt(yt),Et[ur]/=Math.sqrt(Yt),Ze.axes[0]=Qe,Ze.axes[1]=Et,Ze.fragClipBounds[0]=re(Z,lt[0],Nt,-1e8),Ze.fragClipBounds[1]=re(Z,lt[1],Nt,1e8),De.vao.bind(),De.vao.draw(ce.TRIANGLES,De.vertexCount),De.lineWidth>0&&(ce.lineWidth(De.lineWidth*ge),De.vao.draw(ce.LINES,De.lineVertexCount,De.vertexCount)),De.vao.unbind()}}var Me=[-1e8,-1e8,-1e8],ke=[1e8,1e8,1e8],me=[Me,ke];function ie(Ae,De,Pe,ge,Fe,ce,Ze){var ct=Pe.gl;if((ce===Pe.projectHasAlpha||Ze)&&_e(De,Pe,ge,Fe),ce===Pe.hasAlpha||Ze){Ae.bind();var pt=Ae.uniforms;pt.model=ge.model||x,pt.view=ge.view||x,pt.projection=ge.projection||x,P[0]=2/ct.drawingBufferWidth,P[1]=2/ct.drawingBufferHeight,pt.screenSize=P,pt.highlightId=Pe.highlightId,pt.highlightScale=Pe.highlightScale,pt.fragClipBounds=me,pt.clipBounds=Pe.axes.bounds,pt.opacity=Pe.opacity,pt.pickGroup=Pe.pickId/255,pt.pixelRatio=Fe,Pe.vao.bind(),Pe.vao.draw(ct.TRIANGLES,Pe.vertexCount),Pe.lineWidth>0&&(ct.lineWidth(Pe.lineWidth*Fe),Pe.vao.draw(ct.LINES,Pe.lineVertexCount,Pe.vertexCount)),Pe.vao.unbind()}}g.draw=function(Ae){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},g.drawTransparent=function(Ae){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},g.drawPick=function(Ae){var De=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(De,this.pickProjectShader,this,Ae,1,!0,!0)},g.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var De=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(De>=this.pointCount||De<0)return null;var Pe=this.points[De],ge=this._selectResult;ge.index=De;for(var Fe=0;Fe<3;++Fe)ge.position[Fe]=ge.dataCoordinate[Fe]=Pe[Fe];return ge},g.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var De=Ae.index,Pe=De&255,ge=De>>8&255,Fe=De>>16&255;this.highlightId=[Pe/255,ge/255,Fe/255,0]}};function Se(Ae,De,Pe,ge){var Fe;E(Ae)?De<Ae.length?Fe=Ae[De]:Fe=void 0:Fe=Ae,Fe=v(Fe);var ce=!0;s(Fe)&&(Fe=\"\\u25BC\",ce=!1),Pe||(Pe={});var Ze=Pe.family;E(Ze)&&(Ze=Ze[De]),Ze||(Ze=\"normal\");var ct=Pe.weight;E(ct)&&(ct=ct[De]),ct||(ct=\"normal\");var pt=Pe.style;E(pt)&&(pt=pt[De]),pt||(pt=\"normal\");var Wt=Pe.variant;E(Wt)&&(Wt=Wt[De]),Wt||(Wt=\"normal\");var st=d(Fe,{family:Ze,weight:ct,style:pt,variant:Wt},ge),st=d(Fe,Pe,ge);return{mesh:st[0],lines:st[1],bounds:st[2],visible:ce}}g.update=function(Ae){if(Ae=Ae||{},\"perspective\"in Ae&&(this.useOrtho=!Ae.perspective),\"orthographic\"in Ae&&(this.useOrtho=!!Ae.orthographic),\"lineWidth\"in Ae&&(this.lineWidth=Ae.lineWidth),\"project\"in Ae)if(E(Ae.project))this.axesProject=Ae.project;else{var De=!!Ae.project;this.axesProject=[De,De,De]}if(\"projectScale\"in Ae)if(E(Ae.projectScale))this.projectScale=Ae.projectScale.slice();else{var Pe=+Ae.projectScale;this.projectScale=[Pe,Pe,Pe]}if(this.projectHasAlpha=!1,\"projectOpacity\"in Ae){if(E(Ae.projectOpacity))this.projectOpacity=Ae.projectOpacity.slice();else{var Pe=+Ae.projectOpacity;this.projectOpacity=[Pe,Pe,Pe]}for(var ge=0;ge<3;++ge)this.projectOpacity[ge]=k(this.projectOpacity[ge]),this.projectOpacity[ge]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,\"opacity\"in Ae&&(this.opacity=k(Ae.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Fe=Ae.position,ce={family:Ae.font||\"normal\",style:Ae.fontStyle||\"normal\",weight:Ae.fontWeight||\"normal\",variant:Ae.fontVariant||\"normal\"},Ze=Ae.alignment||[0,0],ct,pt;if(Ze.length===2)ct=Ze[0],pt=Ze[1];else{ct=[],pt=[];for(var ge=0;ge<Ze.length;++ge)ct[ge]=Ze[ge][0],pt[ge]=Ze[ge][1]}var Wt=[1/0,1/0,1/0],st=[-1/0,-1/0,-1/0],lt=Ae.glyph,Gt=Ae.color,Nt=Ae.size,$t=Ae.angle,sr=Ae.lineColor,wr=-1,ur=0,Qe=0,Et=0;if(Fe.length){Et=Fe.length;e:for(var ge=0;ge<Et;++ge){for(var er=Fe[ge],Ut=0;Ut<3;++Ut)if(isNaN(er[Ut])||!isFinite(er[Ut]))continue e;var Ft=Se(lt,ge,ce,this.pixelRatio),bt=Ft.mesh,yt=Ft.lines,Yt=Ft.bounds;ur+=bt.cells.length*3,Qe+=yt.edges.length*2}}var lr=ur+Qe,Tr=c.mallocFloat(3*lr),Rr=c.mallocFloat(4*lr),ei=c.mallocFloat(2*lr),Wr=c.mallocUint32(lr);if(lr>0){var Ur=0,dt=ur,Ge=[0,0,0,1],Je=[0,0,0,1],je=E(Gt)&&E(Gt[0]),$e=E(sr)&&E(sr[0]);e:for(var ge=0;ge<Et;++ge){wr+=1;for(var er=Fe[ge],Ut=0;Ut<3;++Ut){if(isNaN(er[Ut])||!isFinite(er[Ut]))continue e;st[Ut]=Math.max(st[Ut],er[Ut]),Wt[Ut]=Math.min(Wt[Ut],er[Ut])}var Ft=Se(lt,ge,ce,this.pixelRatio),bt=Ft.mesh,yt=Ft.lines,Yt=Ft.bounds,wt=Ft.visible;if(!wt)Ge=[1,1,1,0];else if(E(Gt)){var Ie;if(je?ge<Gt.length?Ie=Gt[ge]:Ie=[0,0,0,0]:Ie=Gt,Ie.length===3){for(var Ut=0;Ut<3;++Ut)Ge[Ut]=Ie[Ut];Ge[3]=1}else if(Ie.length===4){for(var Ut=0;Ut<4;++Ut)Ge[Ut]=Ie[Ut];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else Ge[0]=Ge[1]=Ge[2]=0,Ge[3]=1;if(!wt)Je=[1,1,1,0];else if(E(sr)){var Ie;if($e?ge<sr.length?Ie=sr[ge]:Ie=[0,0,0,0]:Ie=sr,Ie.length===3){for(var Ut=0;Ut<3;++Ut)Je[Ut]=Ie[Ut];Je[Ut]=1}else if(Ie.length===4){for(var Ut=0;Ut<4;++Ut)Je[Ut]=Ie[Ut];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else Je[0]=Je[1]=Je[2]=0,Je[3]=1;var xe=.5;wt?E(Nt)?ge<Nt.length?xe=+Nt[ge]:xe=12:Nt?xe=+Nt:this.useOrtho&&(xe=12):xe=0;var Ce=0;E($t)?ge<$t.length?Ce=+$t[ge]:Ce=0:$t&&(Ce=+$t);for(var vt=Math.cos(Ce),nr=Math.sin(Ce),er=Fe[ge],Ut=0;Ut<3;++Ut)st[Ut]=Math.max(st[Ut],er[Ut]),Wt[Ut]=Math.min(Wt[Ut],er[Ut]);var ir=ct,pr=pt,ir=0;E(ct)?ge<ct.length?ir=ct[ge]:ir=0:ct&&(ir=ct);var pr=0;E(pt)?ge<pt.length?pr=pt[ge]:pr=0:pt&&(pr=pt),ir*=ir>0?1-Yt[0][0]:ir<0?1+Yt[1][0]:1,pr*=pr>0?1-Yt[0][1]:pr<0?1+Yt[1][1]:1;for(var oi=[ir,pr],Pn=bt.cells||[],wn=bt.positions||[],Ut=0;Ut<Pn.length;++Ut)for(var di=Pn[Ut],Jr=0;Jr<3;++Jr){for(var fi=0;fi<3;++fi)Tr[3*Ur+fi]=er[fi];for(var fi=0;fi<4;++fi)Rr[4*Ur+fi]=Ge[fi];Wr[Ur]=wr;var Hi=wn[di[Jr]];ei[2*Ur]=xe*(vt*Hi[0]-nr*Hi[1]+oi[0]),ei[2*Ur+1]=xe*(nr*Hi[0]+vt*Hi[1]+oi[1]),Ur+=1}for(var Pn=yt.edges,wn=yt.positions,Ut=0;Ut<Pn.length;++Ut)for(var di=Pn[Ut],Jr=0;Jr<2;++Jr){for(var fi=0;fi<3;++fi)Tr[3*dt+fi]=er[fi];for(var fi=0;fi<4;++fi)Rr[4*dt+fi]=Je[fi];Wr[dt]=wr;var Hi=wn[di[Jr]];ei[2*dt]=xe*(vt*Hi[0]-nr*Hi[1]+oi[0]),ei[2*dt+1]=xe*(nr*Hi[0]+vt*Hi[1]+oi[1]),dt+=1}}}this.bounds=[Wt,st],this.points=Fe,this.pointCount=Fe.length,this.vertexCount=ur,this.lineVertexCount=Qe,this.pointBuffer.update(Tr),this.colorBuffer.update(Rr),this.glyphBuffer.update(ei),this.idBuffer.update(Wr),c.free(Tr),c.free(Rr),c.free(ei),c.free(Wr)},g.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function Le(Ae){var De=Ae.gl,Pe=h.createPerspective(De),ge=h.createOrtho(De),Fe=h.createProject(De),ce=h.createPickPerspective(De),Ze=h.createPickOrtho(De),ct=h.createPickProject(De),pt=l(De),Wt=l(De),st=l(De),lt=l(De),Gt=u(De,[{buffer:pt,size:3,type:De.FLOAT},{buffer:Wt,size:4,type:De.FLOAT},{buffer:st,size:2,type:De.FLOAT},{buffer:lt,size:4,type:De.UNSIGNED_BYTE,normalized:!0}]),Nt=new M(De,Pe,ge,Fe,pt,Wt,st,lt,Gt,ce,Ze,ct);return Nt.update(Ae),Nt}},3589:function(i,a,o){\"use strict\";i.exports=x;var s=o(2260),l=o(1888),u=o(9618),c=o(8828).nextPow2,f=function(b,p,C){for(var E=1e8,A=-1,L=-1,_=b.shape[0],k=b.shape[1],M=0;M<_;M++)for(var g=0;g<k;g++){var P=b.get(M,g,0),T=b.get(M,g,1),z=b.get(M,g,2),O=b.get(M,g,3);if(P<255||T<255||z<255||O<255){var V=p-M,G=C-g,Z=V*V+G*G;Z<E&&(E=Z,A=M,L=g)}}return[A,L,E]};function h(b,p,C,E,A){this.coord=[b,p],this.id=C,this.value=E,this.distance=A}function d(b,p,C){this.gl=b,this.fbo=p,this.buffer=C,this._readTimeout=null;var E=this;this._readCallback=function(){E.gl&&(p.bind(),b.readPixels(0,0,p.shape[0],p.shape[1],b.RGBA,b.UNSIGNED_BYTE,E.buffer),E._readTimeout=null)}}var v=d.prototype;Object.defineProperty(v,\"shape\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(b){if(this.gl){this.fbo.shape=b;var p=this.fbo.shape[0],C=this.fbo.shape[1];if(C*p*4>this.buffer.length){l.free(this.buffer);for(var E=this.buffer=l.mallocUint8(c(C*p*4)),A=0;A<C*p*4;++A)E[A]=255}return b}}}),v.begin=function(){var b=this.gl,p=this.shape;b&&(this.fbo.bind(),b.clearColor(1,1,1,1),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT))},v.end=function(){var b=this.gl;b&&(b.bindFramebuffer(b.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},v.query=function(b,p,C){if(!this.gl)return null;var E=this.fbo.shape.slice();b=b|0,p=p|0,typeof C!=\"number\"&&(C=1);var A=Math.min(Math.max(b-C,0),E[0])|0,L=Math.min(Math.max(b+C,0),E[0])|0,_=Math.min(Math.max(p-C,0),E[1])|0,k=Math.min(Math.max(p+C,0),E[1])|0;if(L<=A||k<=_)return null;var M=[L-A,k-_],g=u(this.buffer,[M[0],M[1],4],[4,E[0]*4,1],4*(A+E[0]*_)),P=f(g.hi(M[0],M[1],1),C,C),T=P[0],z=P[1];if(T<0||Math.pow(this.radius,2)<P[2])return null;var O=g.get(T,z,0),V=g.get(T,z,1),G=g.get(T,z,2),Z=g.get(T,z,3);return new h(T+A|0,z+_|0,O,[V,G,Z],Math.sqrt(P[2]))},v.dispose=function(){this.gl&&(this.fbo.dispose(),l.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function x(b,p){var C=p[0],E=p[1],A={},L=s(b,C,E,A),_=l.mallocUint8(C*E*4);return new d(b,L,_)}},9405:function(i,a,o){\"use strict\";var s=o(3327),l=o(8731),u=o(216),c=o(5091),f=o(2145),h=o(8866);function d(p){this.gl=p,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var v=d.prototype;v.bind=function(){this.program||this._relink();var p,C=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),E=this.gl.lastAttribCount;if(C>E)for(p=E;p<C;p++)this.gl.enableVertexAttribArray(p);else if(E>C)for(p=C;p<E;p++)this.gl.disableVertexAttribArray(p);this.gl.lastAttribCount=C,this.gl.useProgram(this.program)},v.dispose=function(){for(var p=this.gl.lastAttribCount,C=0;C<p;C++)this.gl.disableVertexAttribArray(C);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function x(p,C){return p.name<C.name?-1:1}v.update=function(p,C,E,A){if(!C||arguments.length===1){var L=p;p=L.vertex,C=L.fragment,E=L.uniforms,A=L.attributes}var _=this,k=_.gl,M=_._vref;_._vref=c.shader(k,k.VERTEX_SHADER,p),M&&M.dispose(),_.vertShader=_._vref.shader;var g=this._fref;if(_._fref=c.shader(k,k.FRAGMENT_SHADER,C),g&&g.dispose(),_.fragShader=_._fref.shader,!E||!A){var P=k.createProgram();if(k.attachShader(P,_.fragShader),k.attachShader(P,_.vertShader),k.linkProgram(P),!k.getProgramParameter(P,k.LINK_STATUS)){var T=k.getProgramInfoLog(P);throw new h(T,\"Error linking program:\"+T)}E=E||f.uniforms(k,P),A=A||f.attributes(k,P),k.deleteProgram(P)}A=A.slice(),A.sort(x);var z=[],O=[],V=[],G;for(G=0;G<A.length;++G){var Z=A[G];if(Z.type.indexOf(\"mat\")>=0){for(var H=Z.type.charAt(Z.type.length-1)|0,N=new Array(H),j=0;j<H;++j)N[j]=V.length,O.push(Z.name+\"[\"+j+\"]\"),typeof Z.location==\"number\"?V.push(Z.location+j):Array.isArray(Z.location)&&Z.location.length===H&&typeof Z.location[j]==\"number\"?V.push(Z.location[j]|0):V.push(-1);z.push({name:Z.name,type:Z.type,locations:N})}else z.push({name:Z.name,type:Z.type,locations:[V.length]}),O.push(Z.name),typeof Z.location==\"number\"?V.push(Z.location|0):V.push(-1)}var re=0;for(G=0;G<V.length;++G)if(V[G]<0){for(;V.indexOf(re)>=0;)re+=1;V[G]=re}var oe=new Array(E.length);function _e(){_.program=c.program(k,_._vref,_._fref,O,V);for(var Me=0;Me<E.length;++Me)oe[Me]=k.getUniformLocation(_.program,E[Me].name)}_e(),_._relink=_e,_.types={uniforms:u(E),attributes:u(A)},_.attributes=l(k,_,z,V),Object.defineProperty(_,\"uniforms\",s(k,_,E,oe))};function b(p,C,E,A,L){var _=new d(p);return _.update(C,E,A,L),_}i.exports=b},8866:function(i){function a(o,s,l){this.shortMessage=s||\"\",this.longMessage=l||\"\",this.rawError=o||\"\",this.message=\"gl-shader: \"+(s||o||\"\")+(l?`\n",
       "`+l:\"\"),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name=\"GLError\",a.prototype.constructor=a,i.exports=a},8731:function(i,a,o){\"use strict\";i.exports=d;var s=o(8866);function l(v,x,b,p,C,E){this._gl=v,this._wrapper=x,this._index=b,this._locations=p,this._dimension=C,this._constFunc=E}var u=l.prototype;u.pointer=function(x,b,p,C){var E=this,A=E._gl,L=E._locations[E._index];A.vertexAttribPointer(L,E._dimension,x||A.FLOAT,!!b,p||0,C||0),A.enableVertexAttribArray(L)},u.set=function(v,x,b,p){return this._constFunc(this._locations[this._index],v,x,b,p)},Object.defineProperty(u,\"location\",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var c=[function(v,x,b){return b.length===void 0?v.vertexAttrib1f(x,b):v.vertexAttrib1fv(x,b)},function(v,x,b,p){return b.length===void 0?v.vertexAttrib2f(x,b,p):v.vertexAttrib2fv(x,b)},function(v,x,b,p,C){return b.length===void 0?v.vertexAttrib3f(x,b,p,C):v.vertexAttrib3fv(x,b)},function(v,x,b,p,C,E){return b.length===void 0?v.vertexAttrib4f(x,b,p,C,E):v.vertexAttrib4fv(x,b)}];function f(v,x,b,p,C,E,A){var L=c[C],_=new l(v,x,b,p,C,L);Object.defineProperty(E,A,{set:function(k){return v.disableVertexAttribArray(p[b]),L(v,p[b],k),k},get:function(){return _},enumerable:!0})}function h(v,x,b,p,C,E,A){for(var L=new Array(C),_=new Array(C),k=0;k<C;++k)f(v,x,b[k],p,C,L,k),_[k]=L[k];Object.defineProperty(L,\"location\",{set:function(P){if(Array.isArray(P))for(var T=0;T<C;++T)_[T].location=P[T];else for(var T=0;T<C;++T)_[T].location=P+T;return P},get:function(){for(var P=new Array(C),T=0;T<C;++T)P[T]=p[b[T]];return P},enumerable:!0}),L.pointer=function(P,T,z,O){P=P||v.FLOAT,T=!!T,z=z||C*C,O=O||0;for(var V=0;V<C;++V){var G=p[b[V]];v.vertexAttribPointer(G,C,P,T,z,O+V*C),v.enableVertexAttribArray(G)}};var M=new Array(C),g=v[\"vertexAttrib\"+C+\"fv\"];Object.defineProperty(E,A,{set:function(P){for(var T=0;T<C;++T){var z=p[b[T]];if(v.disableVertexAttribArray(z),Array.isArray(P[0]))g.call(v,z,P[T]);else{for(var O=0;O<C;++O)M[O]=P[C*T+O];g.call(v,z,M)}}return P},get:function(){return L},enumerable:!0})}function d(v,x,b,p){for(var C={},E=0,A=b.length;E<A;++E){var L=b[E],_=L.name,k=L.type,M=L.locations;switch(k){case\"bool\":case\"int\":case\"float\":f(v,x,M[0],p,1,C,_);break;default:if(k.indexOf(\"vec\")>=0){var g=k.charCodeAt(k.length-1)-48;if(g<2||g>4)throw new s(\"\",\"Invalid data type for attribute \"+_+\": \"+k);f(v,x,M[0],p,g,C,_)}else if(k.indexOf(\"mat\")>=0){var g=k.charCodeAt(k.length-1)-48;if(g<2||g>4)throw new s(\"\",\"Invalid data type for attribute \"+_+\": \"+k);h(v,x,M,p,g,C,_)}else throw new s(\"\",\"Unknown data type for attribute \"+_+\": \"+k);break}}return C}},3327:function(i,a,o){\"use strict\";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),x=0;x<h;++x)v[x]=d;return v}function f(h,d,v,x){function b(k){return function(M,g,P){return M.getUniform(g.program,P[k])}}function p(k){return function(g){for(var P=C(\"\",k),T=0;T<P.length;++T){var z=P[T],O=z[0],V=z[1];if(x[V]){var G=g;if(typeof O==\"string\"&&(O.indexOf(\".\")===0||O.indexOf(\"[\")===0)){var Z=O;if(O.indexOf(\".\")===0&&(Z=O.slice(1)),Z.indexOf(\"]\")===Z.length-1){var H=Z.indexOf(\"[\"),N=Z.slice(0,H),j=Z.slice(H+1,Z.length-1);G=N?g[N][j]:g[j]}else G=g[Z]}var re=v[V].type,oe;switch(re){case\"bool\":case\"int\":case\"sampler2D\":case\"samplerCube\":h.uniform1i(x[V],G);break;case\"float\":h.uniform1f(x[V],G);break;default:var _e=re.indexOf(\"vec\");if(0<=_e&&_e<=1&&re.length===4+_e){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l(\"\",\"Invalid data type\");switch(re.charAt(0)){case\"b\":case\"i\":h[\"uniform\"+oe+\"iv\"](x[V],G);break;case\"v\":h[\"uniform\"+oe+\"fv\"](x[V],G);break;default:throw new l(\"\",\"Unrecognized data type for vector \"+name+\": \"+re)}}else if(re.indexOf(\"mat\")===0&&re.length===4){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+re);h[\"uniformMatrix\"+oe+\"fv\"](x[V],!1,G);break}else throw new l(\"\",\"Unknown uniform data type for \"+name+\": \"+re)}}}}}function C(k,M){if(typeof M!=\"object\")return[[k,M]];var g=[];for(var P in M){var T=M[P],z=k;parseInt(P)+\"\"===P?z+=\"[\"+P+\"]\":z+=\".\"+P,typeof T==\"object\"?g.push.apply(g,C(z,T)):g.push([z,T])}return g}function E(k){switch(k){case\"bool\":return!1;case\"int\":case\"sampler2D\":case\"samplerCube\":return 0;case\"float\":return 0;default:var M=k.indexOf(\"vec\");if(0<=M&&M<=1&&k.length===4+M){var g=k.charCodeAt(k.length-1)-48;if(g<2||g>4)throw new l(\"\",\"Invalid data type\");return k.charAt(0)===\"b\"?c(g,!1):c(g,0)}else if(k.indexOf(\"mat\")===0&&k.length===4){var g=k.charCodeAt(k.length-1)-48;if(g<2||g>4)throw new l(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+k);return c(g*g,0)}else throw new l(\"\",\"Unknown uniform data type for \"+name+\": \"+k)}}function A(k,M,g){if(typeof g==\"object\"){var P=L(g);Object.defineProperty(k,M,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else x[g]?Object.defineProperty(k,M,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):k[M]=E(v[g].type)}function L(k){var M;if(Array.isArray(k)){M=new Array(k.length);for(var g=0;g<k.length;++g)A(M,g,k[g])}else{M={};for(var P in k)A(M,P,k[P])}return M}var _=s(v,!0);return{get:u(L(_)),set:p(_),enumerable:!0,configurable:!0}}},216:function(i){\"use strict\";i.exports=a;function a(o,s){for(var l={},u=0;u<o.length;++u)for(var c=o[u].name,f=c.split(\".\"),h=l,d=0;d<f.length;++d){var v=f[d].split(\"[\");if(v.length>1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var x=1;x<v.length;++x){var b=parseInt(v[x]);x<v.length-1||d<f.length-1?(b in h||(x<v.length-1?h[b]=[]:h[b]={}),h=h[b]):s?h[b]=u:h[b]=o[u].type}}else d<f.length-1?(v[0]in h||(h[v[0]]={}),h=h[v[0]]):s?h[v[0]]=u:h[v[0]]=o[u].type}return l}},2145:function(i,a){\"use strict\";a.uniforms=u,a.attributes=c;var o={FLOAT:\"float\",FLOAT_VEC2:\"vec2\",FLOAT_VEC3:\"vec3\",FLOAT_VEC4:\"vec4\",INT:\"int\",INT_VEC2:\"ivec2\",INT_VEC3:\"ivec3\",INT_VEC4:\"ivec4\",BOOL:\"bool\",BOOL_VEC2:\"bvec2\",BOOL_VEC3:\"bvec3\",BOOL_VEC4:\"bvec4\",FLOAT_MAT2:\"mat2\",FLOAT_MAT3:\"mat3\",FLOAT_MAT4:\"mat4\",SAMPLER_2D:\"sampler2D\",SAMPLER_CUBE:\"samplerCube\"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var v=0;v<d.length;++v){var x=d[v];s[f[x]]=o[x]}}return s[h]}function u(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_UNIFORMS),v=[],x=0;x<d;++x){var b=f.getActiveUniform(h,x);if(b){var p=l(f,b.type);if(b.size>1)for(var C=0;C<b.size;++C)v.push({name:b.name.replace(\"[0]\",\"[\"+C+\"]\"),type:p});else v.push({name:b.name,type:p})}}return v}function c(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_ATTRIBUTES),v=[],x=0;x<d;++x){var b=f.getActiveAttrib(h,x);b&&v.push({name:b.name,type:l(f,b.type)})}return v}},5091:function(i,a,o){\"use strict\";a.shader=C,a.program=E;var s=o(8866),l=o(2992),u=typeof WeakMap==\"undefined\"?o(606):WeakMap,c=new u,f=0;function h(A,L,_,k,M,g,P){this.id=A,this.src=L,this.type=_,this.shader=k,this.count=g,this.programs=[],this.cache=P}h.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,L=A.gl,_=this.programs,k=0,M=_.length;k<M;++k){var g=A.programs[_[k]];g&&(delete A.programs[k],L.deleteProgram(g))}L.deleteShader(this.shader),delete A.shaders[this.type===L.FRAGMENT_SHADER|0][this.src]}};function d(A){this.gl=A,this.shaders=[{},{}],this.programs={}}var v=d.prototype;function x(A,L,_){var k=A.createShader(L);if(A.shaderSource(k,_),A.compileShader(k),!A.getShaderParameter(k,A.COMPILE_STATUS)){var M=A.getShaderInfoLog(k);try{var g=l(M,_,L)}catch(P){throw console.warn(\"Failed to format compiler error: \"+P),new s(M,`Error compiling shader:\n",
       "`+M)}throw new s(M,g.short,g.long)}return k}v.getShaderReference=function(A,L){var _=this.gl,k=this.shaders[A===_.FRAGMENT_SHADER|0],M=k[L];if(!M||!_.isShader(M.shader)){var g=x(_,A,L);M=k[L]=new h(f++,L,A,g,[],1,this)}else M.count+=1;return M};function b(A,L,_,k,M){var g=A.createProgram();A.attachShader(g,L),A.attachShader(g,_);for(var P=0;P<k.length;++P)A.bindAttribLocation(g,M[P],k[P]);if(A.linkProgram(g),!A.getProgramParameter(g,A.LINK_STATUS)){var T=A.getProgramInfoLog(g);throw new s(T,\"Error linking program: \"+T)}return g}v.getProgram=function(A,L,_,k){var M=[A.id,L.id,_.join(\":\"),k.join(\":\")].join(\"@\"),g=this.programs[M];return(!g||!this.gl.isProgram(g))&&(this.programs[M]=g=b(this.gl,A.shader,L.shader,_,k),A.programs.push(M),L.programs.push(M)),g};function p(A){var L=c.get(A);return L||(L=new d(A),c.set(A,L)),L}function C(A,L,_){return p(A).getShaderReference(L,_)}function E(A,L,_,k,M){return p(A).getProgram(L,_,k,M)}},1493:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, color;\n",
       "attribute float weight;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 coordinates[3];\n",
       "uniform vec4 colors[3];\n",
       "uniform vec2 screenShape;\n",
       "uniform float lineWidth;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  vec3 vertexPosition = mix(coordinates[0],\n",
       "    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n",
       "\n",
       "  vec4 clipPos = projection * (view * (model * vec4(vertexPosition, 1.0)));\n",
       "  vec2 clipOffset = (projection * (view * (model * vec4(color, 0.0)))).xy;\n",
       "  vec2 delta = weight * clipOffset * screenShape;\n",
       "  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n",
       "\n",
       "  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n",
       "  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n",
       "}\n",
       "`]),c=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = fragColor;\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec3\"},{name:\"weight\",type:\"float\"}])}},4449:function(i,a,o){\"use strict\";var s=o(2762),l=o(8116),u=o(1493);i.exports=b;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,C,E,A){this.gl=p,this.buffer=C,this.vao=E,this.shader=A,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=f.prototype,d=[0,0,0],v=[0,0,0],x=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(p){},h.draw=function(p){var C=this.gl,E=this.vao,A=this.shader;E.bind(),A.bind();var L=p.model||c,_=p.view||c,k=p.projection||c,M;this.axes&&(M=this.axes.lastCubeProps.axis);for(var g=d,P=v,T=0;T<3;++T)M&&M[T]<0?(g[T]=this.bounds[0][T],P[T]=this.bounds[1][T]):(g[T]=this.bounds[1][T],P[T]=this.bounds[0][T]);x[0]=C.drawingBufferWidth,x[1]=C.drawingBufferHeight,A.uniforms.model=L,A.uniforms.view=_,A.uniforms.projection=k,A.uniforms.coordinates=[this.position,g,P],A.uniforms.colors=this.colors,A.uniforms.screenShape=x;for(var T=0;T<3;++T)A.uniforms.lineWidth=this.lineWidth[T]*this.pixelRatio,this.enabled[T]&&(E.draw(C.TRIANGLES,6,6*T),this.drawSides[T]&&E.draw(C.TRIANGLES,12,18+12*T));E.unbind()},h.update=function(p){p&&(\"bounds\"in p&&(this.bounds=p.bounds),\"position\"in p&&(this.position=p.position),\"lineWidth\"in p&&(this.lineWidth=p.lineWidth),\"colors\"in p&&(this.colors=p.colors),\"enabled\"in p&&(this.enabled=p.enabled),\"drawSides\"in p&&(this.drawSides=p.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(p,C){var E=[];function A(g,P,T,z,O,V){var G=[g,P,T,0,0,0,1];G[z+3]=1,G[z]=O,E.push.apply(E,G),G[6]=-1,E.push.apply(E,G),G[z]=V,E.push.apply(E,G),E.push.apply(E,G),G[6]=1,E.push.apply(E,G),G[z]=O,E.push.apply(E,G)}A(0,0,0,0,0,1),A(0,0,0,1,0,1),A(0,0,0,2,0,1),A(1,0,0,1,-1,1),A(1,0,0,2,-1,1),A(0,1,0,0,-1,1),A(0,1,0,2,-1,1),A(0,0,1,0,-1,1),A(0,0,1,1,-1,1);var L=s(p,E),_=l(p,[{type:p.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:p.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:p.FLOAT,buffer:L,size:1,offset:24,stride:28}]),k=u(p);k.attributes.position.location=0,k.attributes.color.location=1,k.attributes.weight.location=2;var M=new f(p,L,_,k);return M.update(C),M}},6740:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 getOrthogonalVector(vec3 v) {\n",
       "  // Return up-vector for only-z vector.\n",
       "  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n",
       "  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n",
       "  // Assign z = 0, x = -b, y = a:\n",
       "  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n",
       "  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n",
       "    return normalize(vec3(-v.y, v.x, 0.0));\n",
       "  } else {\n",
       "    return normalize(vec3(0.0, v.z, -v.y));\n",
       "  }\n",
       "}\n",
       "\n",
       "// Calculate the tube vertex and normal at the given index.\n",
       "//\n",
       "// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n",
       "//\n",
       "// Each tube segment is made up of a ring of vertices.\n",
       "// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n",
       "// The indexes of tube segments run from 0 to 8.\n",
       "//\n",
       "vec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n",
       "  float segmentCount = 8.0;\n",
       "\n",
       "  float angle = 2.0 * 3.14159 * (index / segmentCount);\n",
       "\n",
       "  vec3 u = getOrthogonalVector(d);\n",
       "  vec3 v = normalize(cross(u, d));\n",
       "\n",
       "  vec3 x = u * cos(angle) * length(d);\n",
       "  vec3 y = v * sin(angle) * length(d);\n",
       "  vec3 v3 = x + y;\n",
       "\n",
       "  normal = normalize(v3);\n",
       "\n",
       "  return v3;\n",
       "}\n",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 color, position;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform float vectorScale, tubeScale;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 eyePosition, lightPosition;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  // Scale the vector magnitude to stay constant with\n",
       "  // model & view changes.\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n",
       "  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * tubePosition;\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  // vec4 m_position  = model * vec4(tubePosition, 1.0);\n",
       "  vec4 t_position  = view * tubePosition;\n",
       "  gl_Position      = projection * t_position;\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = tubePosition.xyz;\n",
       "  f_position       = position.xyz;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float beckmannDistribution(float x, float roughness) {\n",
       "  float NdotH = max(x, 0.0001);\n",
       "  float cos2Alpha = NdotH * NdotH;\n",
       "  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n",
       "  float roughness2 = roughness * roughness;\n",
       "  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n",
       "  return exp(tan2Alpha / roughness2) / denom;\n",
       "}\n",
       "\n",
       "float cookTorranceSpecular(\n",
       "  vec3 lightDirection,\n",
       "  vec3 viewDirection,\n",
       "  vec3 surfaceNormal,\n",
       "  float roughness,\n",
       "  float fresnel) {\n",
       "\n",
       "  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n",
       "  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n",
       "\n",
       "  //Half angle vector\n",
       "  vec3 H = normalize(lightDirection + viewDirection);\n",
       "\n",
       "  //Geometric term\n",
       "  float NdotH = max(dot(surfaceNormal, H), 0.0);\n",
       "  float VdotH = max(dot(viewDirection, H), 0.000001);\n",
       "  float LdotH = max(dot(lightDirection, H), 0.000001);\n",
       "  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n",
       "  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n",
       "  float G = min(1.0, min(G1, G2));\n",
       "  \n",
       "  //Distribution term\n",
       "  float D = beckmannDistribution(NdotH, roughness);\n",
       "\n",
       "  //Fresnel term\n",
       "  float F = pow(1.0 - VdotN, fresnel);\n",
       "\n",
       "  //Multiply terms and done\n",
       "  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n",
       "}\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "  vec3 N = normalize(f_normal);\n",
       "  vec3 L = normalize(f_lightDirection);\n",
       "  vec3 V = normalize(f_eyeDirection);\n",
       "\n",
       "  if(gl_FrontFacing) {\n",
       "    N = -N;\n",
       "  }\n",
       "\n",
       "  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n",
       "  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n",
       "\n",
       "  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n",
       "  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n",
       "\n",
       "  gl_FragColor = litColor * opacity;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 getOrthogonalVector(vec3 v) {\n",
       "  // Return up-vector for only-z vector.\n",
       "  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n",
       "  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n",
       "  // Assign z = 0, x = -b, y = a:\n",
       "  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n",
       "  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n",
       "    return normalize(vec3(-v.y, v.x, 0.0));\n",
       "  } else {\n",
       "    return normalize(vec3(0.0, v.z, -v.y));\n",
       "  }\n",
       "}\n",
       "\n",
       "// Calculate the tube vertex and normal at the given index.\n",
       "//\n",
       "// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n",
       "//\n",
       "// Each tube segment is made up of a ring of vertices.\n",
       "// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n",
       "// The indexes of tube segments run from 0 to 8.\n",
       "//\n",
       "vec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n",
       "  float segmentCount = 8.0;\n",
       "\n",
       "  float angle = 2.0 * 3.14159 * (index / segmentCount);\n",
       "\n",
       "  vec3 u = getOrthogonalVector(d);\n",
       "  vec3 v = normalize(cross(u, d));\n",
       "\n",
       "  vec3 x = u * cos(angle) * length(d);\n",
       "  vec3 y = v * sin(angle) * length(d);\n",
       "  vec3 v3 = x + y;\n",
       "\n",
       "  normal = normalize(v3);\n",
       "\n",
       "  return v3;\n",
       "}\n",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float tubeScale;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n",
       "  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  gl_Position = projection * (view * tubePosition);\n",
       "  f_id        = id;\n",
       "  f_position  = position.xyz;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec4\"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec4\"}]}},7815:function(i,a,o){\"use strict\";var s=o(2931),l=o(9970),u=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"],c=function(A,L,_,k){for(var M=A.points,g=A.velocities,P=A.divergences,T=[],z=[],O=[],V=[],G=[],Z=[],H=0,N=0,j=l.create(),re=l.create(),oe=8,_e=0;_e<M.length;_e++){var Me=M[_e],ke=g[_e],me=P[_e];L===0&&(me=_*.05),N=s.length(ke)/k,j=l.create(),s.copy(j,ke),j[3]=me;for(var ie=0;ie<oe;ie++)G[ie]=[Me[0],Me[1],Me[2],ie];if(V.length>0)for(var ie=0;ie<oe;ie++){var Se=(ie+1)%oe;T.push(V[ie],G[ie],G[Se],G[Se],V[Se],V[ie]),O.push(re,j,j,j,re,re),Z.push(H,N,N,N,H,H);var Le=T.length;z.push([Le-6,Le-5,Le-4],[Le-3,Le-2,Le-1])}var Ae=V;V=G,G=Ae;var De=re;re=j,j=De;var Pe=H;H=N,N=Pe}return{positions:T,cells:z,vectors:O,vertexIntensity:Z}},f=function(A,L,_,k){for(var M=0,g=0;g<A.length;g++)for(var P=A[g].velocities,T=0;T<P.length;T++)M=Math.max(M,s.length(P[T]));for(var z=A.map(function(_e){return c(_e,_,k,M)}),O=[],V=[],G=[],Z=[],g=0;g<z.length;g++){var H=z[g],N=O.length;O=O.concat(H.positions),G=G.concat(H.vectors),Z=Z.concat(H.vertexIntensity);for(var T=0;T<H.cells.length;T++){var j=H.cells[T],re=[];V.push(re);for(var oe=0;oe<j.length;oe++)re.push(j[oe]+N)}}return{positions:O,cells:V,vectors:G,vertexIntensity:Z,colormap:L}},h=function(A,L){var _=A.length,k;for(k=0;k<_;k++){var M=A[k];if(M===L)return k;if(M>L)return k-1}return k},d=function(A,L,_){return A<L?L:A>_?_:A},v=function(A,L,_){var k=L.vectors,M=L.meshgrid,g=A[0],P=A[1],T=A[2],z=M[0].length,O=M[1].length,V=M[2].length,G=h(M[0],g),Z=h(M[1],P),H=h(M[2],T),N=G+1,j=Z+1,re=H+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,O-1),j=d(j,0,O-1),H=d(H,0,V-1),re=d(re,0,V-1),G<0||Z<0||H<0||N>z-1||j>O-1||re>V-1)return s.create();var oe=M[0][G],_e=M[0][N],Me=M[1][Z],ke=M[1][j],me=M[2][H],ie=M[2][re],Se=(g-oe)/(_e-oe),Le=(P-Me)/(ke-Me),Ae=(T-me)/(ie-me);isFinite(Se)||(Se=.5),isFinite(Le)||(Le=.5),isFinite(Ae)||(Ae=.5);var De,Pe,ge,Fe,ce,Ze;switch(_.reversedX&&(G=z-1-G,N=z-1-N),_.reversedY&&(Z=O-1-Z,j=O-1-j),_.reversedZ&&(H=V-1-H,re=V-1-re),_.filled){case 5:ce=H,Ze=re,ge=Z*V,Fe=j*V,De=G*V*O,Pe=N*V*O;break;case 4:ce=H,Ze=re,De=G*V,Pe=N*V,ge=Z*V*z,Fe=j*V*z;break;case 3:ge=Z,Fe=j,ce=H*O,Ze=re*O,De=G*O*V,Pe=N*O*V;break;case 2:ge=Z,Fe=j,De=G*O,Pe=N*O,ce=H*O*z,Ze=re*O*z;break;case 1:De=G,Pe=N,ce=H*z,Ze=re*z,ge=Z*z*V,Fe=j*z*V;break;default:De=G,Pe=N,ge=Z*z,Fe=j*z,ce=H*z*O,Ze=re*z*O;break}var ct=k[De+ge+ce],pt=k[De+ge+Ze],Wt=k[De+Fe+ce],st=k[De+Fe+Ze],lt=k[Pe+ge+ce],Gt=k[Pe+ge+Ze],Nt=k[Pe+Fe+ce],$t=k[Pe+Fe+Ze],sr=s.create(),wr=s.create(),ur=s.create(),Qe=s.create();s.lerp(sr,ct,lt,Se),s.lerp(wr,pt,Gt,Se),s.lerp(ur,Wt,Nt,Se),s.lerp(Qe,st,$t,Se);var Et=s.create(),er=s.create();s.lerp(Et,sr,ur,Le),s.lerp(er,wr,Qe,Le);var Ut=s.create();return s.lerp(Ut,Et,er,Ae),Ut},x=function(A,L){var _=L[0],k=L[1],M=L[2];return A[0]=_<0?-_:_,A[1]=k<0?-k:k,A[2]=M<0?-M:M,A},b=function(A){var L=1/0;A.sort(function(g,P){return g-P});for(var _=A.length,k=1;k<_;k++){var M=Math.abs(A[k]-A[k-1]);M<L&&(L=M)}return L},p=function(A){for(var L=[],_=[],k=[],M={},g={},P={},T=A.length,z=0;z<T;z++){var O=A[z],V=O[0],G=O[1],Z=O[2];M[V]||(L.push(V),M[V]=!0),g[G]||(_.push(G),g[G]=!0),P[Z]||(k.push(Z),P[Z]=!0)}var H=b(L),N=b(_),j=b(k),re=Math.min(H,N,j);return isFinite(re)?re:1};i.exports=function(A,L){var _=A.startingPositions,k=A.maxLength||1e3,M=A.tubeSize||1,g=A.absoluteTubeSize,P=A.gridFill||\"+x+y+z\",T={};P.indexOf(\"-x\")!==-1&&(T.reversedX=!0),P.indexOf(\"-y\")!==-1&&(T.reversedY=!0),P.indexOf(\"-z\")!==-1&&(T.reversedZ=!0),T.filled=u.indexOf(P.replace(/-/g,\"\").replace(/\\+/g,\"\"));var z=A.getVelocity||function(Gt){return v(Gt,A,T)},O=A.getDivergence||function(Gt,Nt){var $t=s.create(),sr=1e-4;s.add($t,Gt,[sr,0,0]);var wr=z($t);s.subtract(wr,wr,Nt),s.scale(wr,wr,1/sr),s.add($t,Gt,[0,sr,0]);var ur=z($t);s.subtract(ur,ur,Nt),s.scale(ur,ur,1/sr),s.add($t,Gt,[0,0,sr]);var Qe=z($t);return s.subtract(Qe,Qe,Nt),s.scale(Qe,Qe,1/sr),s.add($t,wr,ur),s.add($t,$t,Qe),$t},V=[],G=L[0][0],Z=L[0][1],H=L[0][2],N=L[1][0],j=L[1][1],re=L[1][2],oe=function(Gt){var Nt=Gt[0],$t=Gt[1],sr=Gt[2];return!(Nt<G||Nt>N||$t<Z||$t>j||sr<H||sr>re)},_e=s.distance(L[0],L[1]),Me=10*_e/k,ke=Me*Me,me=1,ie=0,Se=_.length;Se>1&&(me=p(_));for(var Le=0;Le<Se;Le++){var Ae=s.create();s.copy(Ae,_[Le]);var De=[Ae],Pe=[],ge=z(Ae),Fe=Ae;Pe.push(ge);var ce=[],Ze=O(Ae,ge),ct=s.length(Ze);isFinite(ct)&&ct>ie&&(ie=ct),ce.push(ct),V.push({points:De,velocities:Pe,divergences:ce});for(var pt=0;pt<k*100&&De.length<k&&oe(Ae);){pt++;var Wt=s.clone(ge),st=s.squaredLength(Wt);if(st===0)break;if(st>ke&&s.scale(Wt,Wt,Me/Math.sqrt(st)),s.add(Wt,Wt,Ae),ge=z(Wt),s.squaredDistance(Fe,Wt)-ke>-1e-4*ke){De.push(Wt),Fe=Wt,Pe.push(ge);var Ze=O(Wt,ge),ct=s.length(Ze);isFinite(ct)&&ct>ie&&(ie=ct),ce.push(ct)}Ae=Wt}}var lt=f(V,A.colormap,ie,me);return g?lt.tubeScale=g:(ie===0&&(ie=1),lt.tubeScale=M*.5*me/ie),lt};var C=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(A,L){return E(A,L,{shaders:C,traceType:\"streamtube\"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec4 uv;\n",
       "attribute vec3 f;\n",
       "attribute vec3 normal;\n",
       "\n",
       "uniform vec3 objectOffset;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 lightPosition, eyePosition;\n",
       "uniform sampler2D colormap;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  vec3 localCoordinate = vec3(uv.zw, f.x);\n",
       "  worldCoordinate = objectOffset + localCoordinate;\n",
       "  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n",
       "  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);\n",
       "  vec4 clipPosition = projection * (view * worldPosition);\n",
       "  gl_Position = clipPosition;\n",
       "  kill = f.y;\n",
       "  value = f.z;\n",
       "  planeCoordinate = uv.xy;\n",
       "\n",
       "  vColor = texture2D(colormap, vec2(value, value));\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * worldPosition;\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\n",
       "}\n",
       "`]),c=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float beckmannDistribution(float x, float roughness) {\n",
       "  float NdotH = max(x, 0.0001);\n",
       "  float cos2Alpha = NdotH * NdotH;\n",
       "  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n",
       "  float roughness2 = roughness * roughness;\n",
       "  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n",
       "  return exp(tan2Alpha / roughness2) / denom;\n",
       "}\n",
       "\n",
       "float beckmannSpecular(\n",
       "  vec3 lightDirection,\n",
       "  vec3 viewDirection,\n",
       "  vec3 surfaceNormal,\n",
       "  float roughness) {\n",
       "  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n",
       "}\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 lowerBound, upperBound;\n",
       "uniform float contourTint;\n",
       "uniform vec4 contourColor;\n",
       "uniform sampler2D colormap;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform float vertexColor;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    kill > 0.0 ||\n",
       "    vColor.a == 0.0 ||\n",
       "    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n",
       "  ) discard;\n",
       "\n",
       "  vec3 N = normalize(surfaceNormal);\n",
       "  vec3 V = normalize(eyeDirection);\n",
       "  vec3 L = normalize(lightDirection);\n",
       "\n",
       "  if(gl_FrontFacing) {\n",
       "    N = -N;\n",
       "  }\n",
       "\n",
       "  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n",
       "  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n",
       "\n",
       "  //decide how to interpolate color \\u2014 in vertex or in fragment\n",
       "  vec4 surfaceColor =\n",
       "    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n",
       "    step(.5, vertexColor) * vColor;\n",
       "\n",
       "  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n",
       "\n",
       "  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n",
       "}\n",
       "`]),f=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec4 uv;\n",
       "attribute float f;\n",
       "\n",
       "uniform vec3 objectOffset;\n",
       "uniform mat3 permutation;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float height, zOffset;\n",
       "uniform sampler2D colormap;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n",
       "  worldCoordinate = objectOffset + dataCoordinate;\n",
       "  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n",
       "  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n",
       "\n",
       "  vec4 clipPosition = projection * (view * worldPosition);\n",
       "  clipPosition.z += zOffset;\n",
       "\n",
       "  gl_Position = clipPosition;\n",
       "  value = f + objectOffset.z;\n",
       "  kill = -1.0;\n",
       "  planeCoordinate = uv.zw;\n",
       "\n",
       "  vColor = texture2D(colormap, vec2(value, value));\n",
       "\n",
       "  //Don't do lighting for contours\n",
       "  surfaceNormal   = vec3(1,0,0);\n",
       "  eyeDirection    = vec3(0,1,0);\n",
       "  lightDirection  = vec3(0,0,1);\n",
       "}\n",
       "`]),h=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec2 shape;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 surfaceNormal;\n",
       "\n",
       "vec2 splitFloat(float v) {\n",
       "  float vh = 255.0 * v;\n",
       "  float upper = floor(vh);\n",
       "  float lower = fract(vh);\n",
       "  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  if ((kill > 0.0) ||\n",
       "      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n",
       "\n",
       "  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n",
       "  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n",
       "  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n",
       "}\n",
       "`]);a.createShader=function(d){var v=s(d,u,c,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(i,a,o){\"use strict\";i.exports=De;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),v=o(9994),x=o(9618),b=o(3711),p=o(6760),C=o(7608),E=o(2478),A=o(6199),L=o(990),_=L.createShader,k=L.createContourShader,M=L.createPickShader,g=L.createPickContourShader,P=4*10,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var Pe=0;Pe<3;++Pe){var ge=O[Pe],Fe=(Pe+1)%3,ce=(Pe+2)%3;ge[Fe+0]=1,ge[ce+3]=1,ge[Pe+6]=1}})();function V(Pe,ge,Fe,ce,Ze){this.position=Pe,this.index=ge,this.uv=Fe,this.level=ce,this.dataCoordinate=Ze}var G=256;function Z(Pe,ge,Fe,ce,Ze,ct,pt,Wt,st,lt,Gt,Nt,$t,sr,wr){this.gl=Pe,this.shape=ge,this.bounds=Fe,this.objectOffset=wr,this.intensityBounds=[],this._shader=ce,this._pickShader=Ze,this._coordinateBuffer=ct,this._vao=pt,this._colorMap=Wt,this._contourShader=st,this._contourPickShader=lt,this._contourBuffer=Gt,this._contourVAO=Nt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new V([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=$t,this._dynamicVAO=sr,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var H=Z.prototype;H.genColormap=function(Pe,ge){var Fe=!1,ce=v([h({colormap:Pe,nshades:G,format:\"rgba\"}).map(function(Ze,ct){var pt=ge?N(ct/255,ge):Ze[3];return pt<1&&(Fe=!0),[Ze[0],Ze[1],Ze[2],255*pt]})]);return d.divseq(ce,255),this.hasAlphaScale=Fe,ce},H.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},H.isOpaque=function(){return!this.isTransparent()},H.pickSlots=1,H.setPickBase=function(Pe){this.pickId=Pe};function N(Pe,ge){if(!ge||!ge.length)return 1;for(var Fe=0;Fe<ge.length;++Fe){if(ge.length<2)return 1;if(ge[Fe][0]===Pe)return ge[Fe][1];if(ge[Fe][0]>Pe&&Fe>0){var ce=(ge[Fe][0]-Pe)/(ge[Fe][0]-ge[Fe-1][0]);return ge[Fe][1]*(1-ce)+ce*ge[Fe-1][1]}}return 1}var j=[0,0,0],re={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Pe,ge){var Fe,ce,Ze,ct=ge.axes&&ge.axes.lastCubeProps.axis||j,pt=ge.showSurface,Wt=ge.showContour;for(Fe=0;Fe<3;++Fe)for(pt=pt||ge.surfaceProject[Fe],ce=0;ce<3;++ce)Wt=Wt||ge.contourProject[Fe][ce];for(Fe=0;Fe<3;++Fe){var st=re.projections[Fe];for(ce=0;ce<16;++ce)st[ce]=0;for(ce=0;ce<4;++ce)st[5*ce]=1;st[5*Fe]=0,st[12+Fe]=ge.axesBounds[+(ct[Fe]>0)][Fe],p(st,Pe.model,st);var lt=re.clipBounds[Fe];for(Ze=0;Ze<2;++Ze)for(ce=0;ce<3;++ce)lt[Ze][ce]=Pe.clipBounds[Ze][ce];lt[0][Fe]=-1e8,lt[1][Fe]=1e8}return re.showSurface=pt,re.showContour=Wt,re}var _e={model:T,view:T,projection:T,inverseModel:T.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},Me=T.slice(),ke=[1,0,0,0,1,0,0,0,1];function me(Pe,ge){Pe=Pe||{};var Fe=this.gl;Fe.disable(Fe.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Pe.model||T,ce.view=Pe.view||T,ce.projection=Pe.projection||T,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=C(ce.inverseModel,ce.model);for(var Ze=0;Ze<2;++Ze)for(var ct=ce.clipBounds[Ze],pt=0;pt<3;++pt)ct[pt]=Math.min(Math.max(this.clipBounds[Ze][pt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=ke,ce.vertexColor=this.vertexColor;var Wt=Me;for(p(Wt,ce.view,ce.model),p(Wt,ce.projection,Wt),C(Wt,Wt),Ze=0;Ze<3;++Ze)ce.eyePosition[Ze]=Wt[12+Ze]/Wt[15];var st=Wt[15];for(Ze=0;Ze<3;++Ze)st+=this.lightPosition[Ze]*Wt[4*Ze+3];for(Ze=0;Ze<3;++Ze){var lt=Wt[12+Ze];for(pt=0;pt<3;++pt)lt+=Wt[4*pt+Ze]*this.lightPosition[pt];ce.lightPosition[Ze]=lt/st}var Gt=oe(ce,this);if(Gt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Fe.TRIANGLES,this._vertexCount),Ze=0;Ze<3;++Ze)!this.surfaceProject[Ze]||!this.vertexCount||(this._shader.uniforms.model=Gt.projections[Ze],this._shader.uniforms.clipBounds=Gt.clipBounds[Ze],this._vao.draw(Fe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Gt.showContour){var Nt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Nt.bind(),Nt.uniforms=ce;var $t=this._contourVAO;for($t.bind(),Ze=0;Ze<3;++Ze)for(Nt.uniforms.permutation=O[Ze],Fe.lineWidth(this.contourWidth[Ze]*this.pixelRatio),pt=0;pt<this.contourLevels[Ze].length;++pt)pt===this.highlightLevel[Ze]?(Nt.uniforms.contourColor=this.highlightColor[Ze],Nt.uniforms.contourTint=this.highlightTint[Ze]):(pt===0||pt-1===this.highlightLevel[Ze])&&(Nt.uniforms.contourColor=this.contourColor[Ze],Nt.uniforms.contourTint=this.contourTint[Ze]),this._contourCounts[Ze][pt]&&(Nt.uniforms.height=this.contourLevels[Ze][pt],$t.draw(Fe.LINES,this._contourCounts[Ze][pt],this._contourOffsets[Ze][pt]));for(Ze=0;Ze<3;++Ze)for(Nt.uniforms.model=Gt.projections[Ze],Nt.uniforms.clipBounds=Gt.clipBounds[Ze],pt=0;pt<3;++pt)if(this.contourProject[Ze][pt]){Nt.uniforms.permutation=O[pt],Fe.lineWidth(this.contourWidth[pt]*this.pixelRatio);for(var sr=0;sr<this.contourLevels[pt].length;++sr)sr===this.highlightLevel[pt]?(Nt.uniforms.contourColor=this.highlightColor[pt],Nt.uniforms.contourTint=this.highlightTint[pt]):(sr===0||sr-1===this.highlightLevel[pt])&&(Nt.uniforms.contourColor=this.contourColor[pt],Nt.uniforms.contourTint=this.contourTint[pt]),this._contourCounts[pt][sr]&&(Nt.uniforms.height=this.contourLevels[pt][sr],$t.draw(Fe.LINES,this._contourCounts[pt][sr],this._contourOffsets[pt][sr]))}for($t.unbind(),$t=this._dynamicVAO,$t.bind(),Ze=0;Ze<3;++Ze)if(this._dynamicCounts[Ze]!==0)for(Nt.uniforms.model=ce.model,Nt.uniforms.clipBounds=ce.clipBounds,Nt.uniforms.permutation=O[Ze],Fe.lineWidth(this.dynamicWidth[Ze]*this.pixelRatio),Nt.uniforms.contourColor=this.dynamicColor[Ze],Nt.uniforms.contourTint=this.dynamicTint[Ze],Nt.uniforms.height=this.dynamicLevel[Ze],$t.draw(Fe.LINES,this._dynamicCounts[Ze],this._dynamicOffsets[Ze]),pt=0;pt<3;++pt)this.contourProject[pt][Ze]&&(Nt.uniforms.model=Gt.projections[pt],Nt.uniforms.clipBounds=Gt.clipBounds[pt],$t.draw(Fe.LINES,this._dynamicCounts[Ze],this._dynamicOffsets[Ze]));$t.unbind()}}H.draw=function(Pe){return me.call(this,Pe,!1)},H.drawTransparent=function(Pe){return me.call(this,Pe,!0)};var ie={model:T,view:T,projection:T,inverseModel:T,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};H.drawPick=function(Pe){Pe=Pe||{};var ge=this.gl;ge.disable(ge.CULL_FACE);var Fe=ie;Fe.model=Pe.model||T,Fe.view=Pe.view||T,Fe.projection=Pe.projection||T,Fe.shape=this._field[2].shape,Fe.pickId=this.pickId/255,Fe.lowerBound=this.bounds[0],Fe.upperBound=this.bounds[1],Fe.objectOffset=this.objectOffset,Fe.permutation=ke;for(var ce=0;ce<2;++ce)for(var Ze=Fe.clipBounds[ce],ct=0;ct<3;++ct)Ze[ct]=Math.min(Math.max(this.clipBounds[ce][ct],-1e8),1e8);var pt=oe(Fe,this);if(pt.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Fe,this._vao.bind(),this._vao.draw(ge.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)this.surfaceProject[ce]&&(this._pickShader.uniforms.model=pt.projections[ce],this._pickShader.uniforms.clipBounds=pt.clipBounds[ce],this._vao.draw(ge.TRIANGLES,this._vertexCount));this._vao.unbind()}if(pt.showContour){var Wt=this._contourPickShader;Wt.bind(),Wt.uniforms=Fe;var st=this._contourVAO;for(st.bind(),ct=0;ct<3;++ct)for(ge.lineWidth(this.contourWidth[ct]*this.pixelRatio),Wt.uniforms.permutation=O[ct],ce=0;ce<this.contourLevels[ct].length;++ce)this._contourCounts[ct][ce]&&(Wt.uniforms.height=this.contourLevels[ct][ce],st.draw(ge.LINES,this._contourCounts[ct][ce],this._contourOffsets[ct][ce]));for(ce=0;ce<3;++ce)for(Wt.uniforms.model=pt.projections[ce],Wt.uniforms.clipBounds=pt.clipBounds[ce],ct=0;ct<3;++ct)if(this.contourProject[ce][ct]){Wt.uniforms.permutation=O[ct],ge.lineWidth(this.contourWidth[ct]*this.pixelRatio);for(var lt=0;lt<this.contourLevels[ct].length;++lt)this._contourCounts[ct][lt]&&(Wt.uniforms.height=this.contourLevels[ct][lt],st.draw(ge.LINES,this._contourCounts[ct][lt],this._contourOffsets[ct][lt]))}st.unbind()}},H.pick=function(Pe){if(!Pe||Pe.id!==this.pickId)return null;var ge=this._field[2].shape,Fe=this._pickResult,ce=ge[0]*(Pe.value[0]+(Pe.value[2]>>4)/16)/255,Ze=Math.floor(ce),ct=ce-Ze,pt=ge[1]*(Pe.value[1]+(Pe.value[2]&15)/16)/255,Wt=Math.floor(pt),st=pt-Wt;Ze+=1,Wt+=1;var lt=Fe.position;lt[0]=lt[1]=lt[2]=0;for(var Gt=0;Gt<2;++Gt)for(var Nt=Gt?ct:1-ct,$t=0;$t<2;++$t)for(var sr=$t?st:1-st,wr=Ze+Gt,ur=Wt+$t,Qe=Nt*sr,Et=0;Et<3;++Et)lt[Et]+=this._field[Et].get(wr,ur)*Qe;for(var er=this._pickResult.level,Ut=0;Ut<3;++Ut)if(er[Ut]=E.le(this.contourLevels[Ut],lt[Ut]),er[Ut]<0)this.contourLevels[Ut].length>0&&(er[Ut]=0);else if(er[Ut]<this.contourLevels[Ut].length-1){var Ft=this.contourLevels[Ut][er[Ut]],bt=this.contourLevels[Ut][er[Ut]+1];Math.abs(Ft-lt[Ut])>Math.abs(bt-lt[Ut])&&(er[Ut]+=1)}for(Fe.index[0]=ct<.5?Ze:Ze+1,Fe.index[1]=st<.5?Wt:Wt+1,Fe.uv[0]=ce/ge[0],Fe.uv[1]=pt/ge[1],Et=0;Et<3;++Et)Fe.dataCoordinate[Et]=this._field[Et].get(Fe.index[0],Fe.index[1]);return Fe},H.padField=function(Pe,ge){var Fe=ge.shape.slice(),ce=Pe.shape.slice();d.assign(Pe.lo(1,1).hi(Fe[0],Fe[1]),ge),d.assign(Pe.lo(1).hi(Fe[0],1),ge.hi(Fe[0],1)),d.assign(Pe.lo(1,ce[1]-1).hi(Fe[0],1),ge.lo(0,Fe[1]-1).hi(Fe[0],1)),d.assign(Pe.lo(0,1).hi(1,Fe[1]),ge.hi(1)),d.assign(Pe.lo(ce[0]-1,1).hi(1,Fe[1]),ge.lo(Fe[0]-1)),Pe.set(0,0,ge.get(0,0)),Pe.set(0,ce[1]-1,ge.get(0,Fe[1]-1)),Pe.set(ce[0]-1,0,ge.get(Fe[0]-1,0)),Pe.set(ce[0]-1,ce[1]-1,ge.get(Fe[0]-1,Fe[1]-1))};function Se(Pe,ge){return Array.isArray(Pe)?[ge(Pe[0]),ge(Pe[1]),ge(Pe[2])]:[ge(Pe),ge(Pe),ge(Pe)]}function Le(Pe){return Array.isArray(Pe)?Pe.length===3?[Pe[0],Pe[1],Pe[2],1]:[Pe[0],Pe[1],Pe[2],Pe[3]]:[0,0,0,1]}function Ae(Pe){if(Array.isArray(Pe)){if(Array.isArray(Pe))return[Le(Pe[0]),Le(Pe[1]),Le(Pe[2])];var ge=Le(Pe);return[ge.slice(),ge.slice(),ge.slice()]}}H.update=function(Pe){Pe=Pe||{},this.objectOffset=Pe.objectOffset||this.objectOffset,this.dirty=!0,\"contourWidth\"in Pe&&(this.contourWidth=Se(Pe.contourWidth,Number)),\"showContour\"in Pe&&(this.showContour=Se(Pe.showContour,Boolean)),\"showSurface\"in Pe&&(this.showSurface=!!Pe.showSurface),\"contourTint\"in Pe&&(this.contourTint=Se(Pe.contourTint,Boolean)),\"contourColor\"in Pe&&(this.contourColor=Ae(Pe.contourColor)),\"contourProject\"in Pe&&(this.contourProject=Se(Pe.contourProject,function(yn){return Se(yn,Boolean)})),\"surfaceProject\"in Pe&&(this.surfaceProject=Pe.surfaceProject),\"dynamicColor\"in Pe&&(this.dynamicColor=Ae(Pe.dynamicColor)),\"dynamicTint\"in Pe&&(this.dynamicTint=Se(Pe.dynamicTint,Number)),\"dynamicWidth\"in Pe&&(this.dynamicWidth=Se(Pe.dynamicWidth,Number)),\"opacity\"in Pe&&(this.opacity=Pe.opacity),\"opacityscale\"in Pe&&(this.opacityscale=Pe.opacityscale),\"colorBounds\"in Pe&&(this.colorBounds=Pe.colorBounds),\"vertexColor\"in Pe&&(this.vertexColor=Pe.vertexColor?1:0),\"colormap\"in Pe&&this._colorMap.setPixels(this.genColormap(Pe.colormap,this.opacityscale));var ge=Pe.field||Pe.coords&&Pe.coords[2]||null,Fe=!1;if(ge||(this._field[2].shape[0]||this._field[2].shape[2]?ge=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):ge=this._field[2].hi(0,0)),\"field\"in Pe||\"coords\"in Pe){var ce=(ge.shape[0]+2)*(ge.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=x(this._field[2].data,[ge.shape[0]+2,ge.shape[1]+2]),this.padField(this._field[2],ge),this.shape=ge.shape.slice();for(var Ze=this.shape,ct=0;ct<2;++ct)this._field[2].size>this._field[ct].data.length&&(f.freeFloat(this._field[ct].data),this._field[ct].data=f.mallocFloat(this._field[2].size)),this._field[ct]=x(this._field[ct].data,[Ze[0]+2,Ze[1]+2]);if(Pe.coords){var pt=Pe.coords;if(!Array.isArray(pt)||pt.length!==3)throw new Error(\"gl-surface: invalid coordinates for x/y\");for(ct=0;ct<2;++ct){var Wt=pt[ct];for($t=0;$t<2;++$t)if(Wt.shape[$t]!==Ze[$t])throw new Error(\"gl-surface: coords have incorrect shape\");this.padField(this._field[ct],Wt)}}else if(Pe.ticks){var st=Pe.ticks;if(!Array.isArray(st)||st.length!==2)throw new Error(\"gl-surface: invalid ticks\");for(ct=0;ct<2;++ct){var lt=st[ct];if((Array.isArray(lt)||lt.length)&&(lt=x(lt)),lt.shape[0]!==Ze[ct])throw new Error(\"gl-surface: invalid tick length\");var Gt=x(lt.data,Ze);Gt.stride[ct]=lt.stride[0],Gt.stride[ct^1]=0,this.padField(this._field[ct],Gt)}}else{for(ct=0;ct<2;++ct){var Nt=[0,0];Nt[ct]=1,this._field[ct]=x(this._field[ct].data,[Ze[0]+2,Ze[1]+2],Nt,0)}this._field[0].set(0,0,0);for(var $t=0;$t<Ze[0];++$t)this._field[0].set($t+1,0,$t);for(this._field[0].set(Ze[0]+1,0,Ze[0]-1),this._field[1].set(0,0,0),$t=0;$t<Ze[1];++$t)this._field[1].set(0,$t+1,$t);this._field[1].set(0,Ze[1]+1,Ze[1]-1)}var sr=this._field,wr=x(f.mallocFloat(sr[2].size*3*2),[3,Ze[0]+2,Ze[1]+2,2]);for(ct=0;ct<3;++ct)A(wr.pick(ct),sr[ct],\"mirror\");var ur=x(f.mallocFloat(sr[2].size*3),[Ze[0]+2,Ze[1]+2,3]);for(ct=0;ct<Ze[0]+2;++ct)for($t=0;$t<Ze[1]+2;++$t){var Qe=wr.get(0,ct,$t,0),Et=wr.get(0,ct,$t,1),er=wr.get(1,ct,$t,0),Ut=wr.get(1,ct,$t,1),Ft=wr.get(2,ct,$t,0),bt=wr.get(2,ct,$t,1),yt=er*bt-Ut*Ft,Yt=Ft*Et-bt*Qe,lr=Qe*Ut-Et*er,Tr=Math.sqrt(yt*yt+Yt*Yt+lr*lr);Tr<1e-8?(Tr=Math.max(Math.abs(yt),Math.abs(Yt),Math.abs(lr)),Tr<1e-8?(lr=1,Yt=yt=0,Tr=1):Tr=1/Tr):Tr=1/Math.sqrt(Tr),ur.set(ct,$t,0,yt*Tr),ur.set(ct,$t,1,Yt*Tr),ur.set(ct,$t,2,lr*Tr)}f.free(wr.data);var Rr=[1/0,1/0,1/0],ei=[-1/0,-1/0,-1/0],Wr=1/0,Ur=-1/0,dt=(Ze[0]-1)*(Ze[1]-1)*6,Ge=f.mallocFloat(s.nextPow2(10*dt)),Je=0,je=0;for(ct=0;ct<Ze[0]-1;++ct)e:for($t=0;$t<Ze[1]-1;++$t){for(var $e=0;$e<2;++$e)for(var wt=0;wt<2;++wt)for(var Ie=0;Ie<3;++Ie){var xe=this._field[Ie].get(1+ct+$e,1+$t+wt);if(isNaN(xe)||!isFinite(xe))continue e}for(Ie=0;Ie<6;++Ie){var Ce=ct+z[Ie][0],vt=$t+z[Ie][1],nr=this._field[0].get(Ce+1,vt+1),ir=this._field[1].get(Ce+1,vt+1);xe=this._field[2].get(Ce+1,vt+1),yt=ur.get(Ce+1,vt+1,0),Yt=ur.get(Ce+1,vt+1,1),lr=ur.get(Ce+1,vt+1,2),Pe.intensity&&(pr=Pe.intensity.get(Ce,vt));var pr=Pe.intensity?Pe.intensity.get(Ce,vt):xe+this.objectOffset[2];Ge[Je++]=Ce,Ge[Je++]=vt,Ge[Je++]=nr,Ge[Je++]=ir,Ge[Je++]=xe,Ge[Je++]=0,Ge[Je++]=pr,Ge[Je++]=yt,Ge[Je++]=Yt,Ge[Je++]=lr,Rr[0]=Math.min(Rr[0],nr+this.objectOffset[0]),Rr[1]=Math.min(Rr[1],ir+this.objectOffset[1]),Rr[2]=Math.min(Rr[2],xe+this.objectOffset[2]),Wr=Math.min(Wr,pr),ei[0]=Math.max(ei[0],nr+this.objectOffset[0]),ei[1]=Math.max(ei[1],ir+this.objectOffset[1]),ei[2]=Math.max(ei[2],xe+this.objectOffset[2]),Ur=Math.max(Ur,pr),je+=1}}for(Pe.intensityBounds&&(Wr=+Pe.intensityBounds[0],Ur=+Pe.intensityBounds[1]),ct=6;ct<Je;ct+=10)Ge[ct]=(Ge[ct]-Wr)/(Ur-Wr);this._vertexCount=je,this._coordinateBuffer.update(Ge.subarray(0,Je)),f.freeFloat(Ge),f.free(ur.data),this.bounds=[Rr,ei],this.intensity=Pe.intensity||this._field[2],(this.intensityBounds[0]!==Wr||this.intensityBounds[1]!==Ur)&&(Fe=!0),this.intensityBounds=[Wr,Ur]}if(\"levels\"in Pe){var oi=Pe.levels;for(Array.isArray(oi[0])?oi=oi.slice():oi=[[],[],oi],ct=0;ct<3;++ct)oi[ct]=oi[ct].slice(),oi[ct].sort(function(yn,Mn){return yn-Mn});for(ct=0;ct<3;++ct)for($t=0;$t<oi[ct].length;++$t)oi[ct][$t]-=this.objectOffset[ct];e:for(ct=0;ct<3;++ct){if(oi[ct].length!==this.contourLevels[ct].length){Fe=!0;break}for($t=0;$t<oi[ct].length;++$t)if(oi[ct][$t]!==this.contourLevels[ct][$t]){Fe=!0;break e}}this.contourLevels=oi}if(Fe){sr=this._field,Ze=this.shape;for(var di=[],Jr=0;Jr<3;++Jr){var fi=this.contourLevels[Jr],Hi=[],Pn=[],wn=[0,0,0];for(ct=0;ct<fi.length;++ct){var pn=b(this._field[Jr],fi[ct]);Hi.push(di.length/5|0),je=0;e:for($t=0;$t<pn.cells.length;++$t){var Vn=pn.cells[$t];for(Ie=0;Ie<2;++Ie){var kn=pn.positions[Vn[Ie]],ea=kn[0],ua=Math.floor(ea)|0,Vt=ea-ua,_t=kn[1],tr=Math.floor(_t)|0,ar=_t-tr,Er=!1;t:for(var Zr=0;Zr<3;++Zr){wn[Zr]=0;var ri=(Jr+Zr+1)%3;for($e=0;$e<2;++$e){var $r=$e?Vt:1-Vt;for(Ce=Math.min(Math.max(ua+$e,0),Ze[0])|0,wt=0;wt<2;++wt){var zi=wt?ar:1-ar;if(vt=Math.min(Math.max(tr+wt,0),Ze[1])|0,Zr<2?xe=this._field[ri].get(Ce,vt):xe=(this.intensity.get(Ce,vt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(xe)||isNaN(xe)){Er=!0;break t}var Ji=$r*zi;wn[Zr]+=Ji*xe}}}if(!Er)di.push(wn[0],wn[1],kn[0],kn[1],wn[2]),je+=1;else{if(Ie>0){for(var en=0;en<5;++en)di.pop();je-=1}continue e}}}Pn.push(je)}this._contourOffsets[Jr]=Hi,this._contourCounts[Jr]=Pn}var cn=f.mallocFloat(di.length);for(ct=0;ct<di.length;++ct)cn[ct]=di[ct];this._contourBuffer.update(cn),f.freeFloat(cn)}},H.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var Pe=0;Pe<3;++Pe)f.freeFloat(this._field[Pe].data)},H.highlight=function(Pe){var ge;if(!Pe){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(ge=0;ge<3;++ge)this.enableHighlight[ge]?this.highlightLevel[ge]=Pe.level[ge]:this.highlightLevel[ge]=-1;var Fe;for(this.snapToData?Fe=Pe.dataCoordinate:Fe=Pe.position,ge=0;ge<3;++ge)Fe[ge]-=this.objectOffset[ge];if(!((!this.enableDynamic[0]||Fe[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||Fe[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||Fe[2]===this.dynamicLevel[2]))){for(var ce=0,Ze=this.shape,ct=f.mallocFloat(12*Ze[0]*Ze[1]),pt=0;pt<3;++pt){if(!this.enableDynamic[pt]){this.dynamicLevel[pt]=NaN,this._dynamicCounts[pt]=0;continue}this.dynamicLevel[pt]=Fe[pt];var Wt=(pt+1)%3,st=(pt+2)%3,lt=this._field[pt],Gt=this._field[Wt],Nt=this._field[st],$t=b(lt,Fe[pt]),sr=$t.cells,wr=$t.positions;for(this._dynamicOffsets[pt]=ce,ge=0;ge<sr.length;++ge)for(var ur=sr[ge],Qe=0;Qe<2;++Qe){var Et=wr[ur[Qe]],er=+Et[0],Ut=er|0,Ft=Math.min(Ut+1,Ze[0])|0,bt=er-Ut,yt=1-bt,Yt=+Et[1],lr=Yt|0,Tr=Math.min(lr+1,Ze[1])|0,Rr=Yt-lr,ei=1-Rr,Wr=yt*ei,Ur=yt*Rr,dt=bt*ei,Ge=bt*Rr,Je=Wr*Gt.get(Ut,lr)+Ur*Gt.get(Ut,Tr)+dt*Gt.get(Ft,lr)+Ge*Gt.get(Ft,Tr),je=Wr*Nt.get(Ut,lr)+Ur*Nt.get(Ut,Tr)+dt*Nt.get(Ft,lr)+Ge*Nt.get(Ft,Tr);if(isNaN(Je)||isNaN(je)){Qe&&(ce-=1);break}ct[2*ce+0]=Je,ct[2*ce+1]=je,ce+=1}this._dynamicCounts[pt]=ce-this._dynamicOffsets[pt]}this._dynamicBuffer.update(ct.subarray(0,2*ce)),f.freeFloat(ct)}};function De(Pe){var ge=Pe.gl,Fe=_(ge),ce=M(ge),Ze=k(ge),ct=g(ge),pt=l(ge),Wt=u(ge,[{buffer:pt,size:4,stride:P,offset:0},{buffer:pt,size:3,stride:P,offset:16},{buffer:pt,size:3,stride:P,offset:28}]),st=l(ge),lt=u(ge,[{buffer:st,size:4,stride:20,offset:0},{buffer:st,size:1,stride:20,offset:16}]),Gt=l(ge),Nt=u(ge,[{buffer:Gt,size:2,type:ge.FLOAT}]),$t=c(ge,1,G,ge.RGBA,ge.UNSIGNED_BYTE);$t.minFilter=ge.LINEAR,$t.magFilter=ge.LINEAR;var sr=new Z(ge,[0,0],[[0,0,0],[0,0,0]],Fe,ce,pt,Wt,$t,Ze,ct,st,lt,Gt,Nt,[0,0,0]),wr={levels:[[],[],[]]};for(var ur in Pe)wr[ur]=Pe[ur];return wr.colormap=wr.colormap||\"jet\",sr.update(wr),sr}},7766:function(i,a,o){\"use strict\";var s=o(9618),l=o(5298),u=o(1888);i.exports=g;var c=null,f=null,h=null;function d(P){c=[P.LINEAR,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_NEAREST],f=[P.NEAREST,P.LINEAR,P.NEAREST_MIPMAP_NEAREST,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_LINEAR],h=[P.REPEAT,P.CLAMP_TO_EDGE,P.MIRRORED_REPEAT]}function v(P){return typeof HTMLCanvasElement!=\"undefined\"&&P instanceof HTMLCanvasElement||typeof HTMLImageElement!=\"undefined\"&&P instanceof HTMLImageElement||typeof HTMLVideoElement!=\"undefined\"&&P instanceof HTMLVideoElement||typeof ImageData!=\"undefined\"&&P instanceof ImageData}var x=function(P,T){l.muls(P,T,255)};function b(P,T,z){var O=P.gl,V=O.getParameter(O.MAX_TEXTURE_SIZE);if(T<0||T>V||z<0||z>V)throw new Error(\"gl-texture2d: Invalid texture size\");return P._shape=[T,z],P.bind(),O.texImage2D(O.TEXTURE_2D,0,P.format,T,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,T,z,O,V,G){this.gl=P,this.handle=T,this.format=V,this.type=G,this._shape=[z,O],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,H=[this._wrapS,this._wrapT];Object.defineProperties(H,[{get:function(){return Z._wrapS},set:function(j){return Z.wrapS=j}},{get:function(){return Z._wrapT},set:function(j){return Z.wrapT=j}}]),this._wrapVector=H;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(j){return Z.width=j}},{get:function(){return Z._shape[1]},set:function(j){return Z.height=j}}]),this._shapeVector=N}var C=p.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var T=this.gl;if(this.type===T.FLOAT&&c.indexOf(P)>=0&&(T.getExtension(\"OES_texture_float_linear\")||(P=T.NEAREST)),f.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+P);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var T=this.gl;if(this.type===T.FLOAT&&c.indexOf(P)>=0&&(T.getExtension(\"OES_texture_float_linear\")||(P=T.NEAREST)),f.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+P);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var T=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,T!==this._anisoSamples){var z=this.gl.getExtension(\"EXT_texture_filter_anisotropic\");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error(\"gl-texture2d: Must specify wrap mode for rows and columns\");for(var T=0;T<2;++T)if(h.indexOf(P[T])<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error(\"gl-texture2d: Invalid texture shape\");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),C.bind=function(P){var T=this.gl;return P!==void 0&&T.activeTexture(T.TEXTURE0+(P|0)),T.bindTexture(T.TEXTURE_2D,this.handle),P!==void 0?P|0:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),T=0;P>0;++T,P>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},C.setPixels=function(P,T,z,O){var V=this.gl;this.bind(),Array.isArray(T)?(O=z,z=T[1]|0,T=T[0]|0):(T=T||0,z=z||0),O=O||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(O)<0;Z?(V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(O)):V.texSubImage2D(V.TEXTURE_2D,O,T,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||T+P.shape[1]>this._shape[1]>>>O||z+P.shape[0]>this._shape[0]>>>O||T<0||z<0)throw new Error(\"gl-texture2d: Texture dimensions are out of bounds\");A(V,T,z,O,this.format,this.type,this._mipLevels,P)}else throw new Error(\"gl-texture2d: Unsupported data type\")};function E(P,T){return P.length===3?T[2]===1&&T[1]===P[0]*P[2]&&T[0]===P[2]:T[0]===1&&T[1]===P[0]}function A(P,T,z,O,V,G,Z,H){var N=H.dtype,j=H.shape.slice();if(j.length<2||j.length>3)throw new Error(\"gl-texture2d: Invalid ndarray, must be 2d or 3d\");var re=0,oe=0,_e=E(j,H.stride.slice());N===\"float32\"?re=P.FLOAT:N===\"float64\"?(re=P.FLOAT,_e=!1,N=\"float32\"):N===\"uint8\"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N=\"uint8\");var Me=1;if(j.length===2)oe=P.LUMINANCE,j=[j[0],j[1],1],H=s(H.data,j,[H.stride[0],H.stride[1],1],H.offset);else if(j.length===3){if(j[2]===1)oe=P.ALPHA;else if(j[2]===2)oe=P.LUMINANCE_ALPHA;else if(j[2]===3)oe=P.RGB;else if(j[2]===4)oe=P.RGBA;else throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");Me=j[2]}else throw new Error(\"gl-texture2d: Invalid shape for texture\");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(V===P.LUMINANCE||V===P.ALPHA)&&(oe=V),oe!==V)throw new Error(\"gl-texture2d: Incompatible texture format for setPixels\");var ke=H.size,me=Z.indexOf(O)<0;if(me&&Z.push(O),re===G&&_e)H.offset===0&&H.data.length===ke?me?P.texImage2D(P.TEXTURE_2D,O,V,j[0],j[1],0,V,G,H.data):P.texSubImage2D(P.TEXTURE_2D,O,T,z,j[0],j[1],V,G,H.data):me?P.texImage2D(P.TEXTURE_2D,O,V,j[0],j[1],0,V,G,H.data.subarray(H.offset,H.offset+ke)):P.texSubImage2D(P.TEXTURE_2D,O,T,z,j[0],j[1],V,G,H.data.subarray(H.offset,H.offset+ke));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(ke):ie=u.mallocUint8(ke);var Se=s(ie,j,[j[2],j[2]*j[0],1]);re===P.FLOAT&&G===P.UNSIGNED_BYTE?x(Se,H):l.assign(Se,H),me?P.texImage2D(P.TEXTURE_2D,O,V,j[0],j[1],0,V,G,ie.subarray(0,ke)):P.texSubImage2D(P.TEXTURE_2D,O,T,z,j[0],j[1],V,G,ie.subarray(0,ke)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var T=P.createTexture();return P.bindTexture(P.TEXTURE_2D,T),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),T}function _(P,T,z,O,V){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(T<0||T>G||z<0||z>G)throw new Error(\"gl-texture2d: Invalid texture shape\");if(V===P.FLOAT&&!P.getExtension(\"OES_texture_float\"))throw new Error(\"gl-texture2d: Floating point textures not supported on this platform\");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,O,T,z,0,O,V,null),new p(P,Z,T,z,O,V)}function k(P,T,z,O,V,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,V,V,G,T),new p(P,Z,z,O,V,G)}function M(P,T){var z=T.dtype,O=T.shape.slice(),V=P.getParameter(P.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>V||O[1]<0||O[1]>V)throw new Error(\"gl-texture2d: Invalid texture size\");var G=E(O,T.stride.slice()),Z=0;z===\"float32\"?Z=P.FLOAT:z===\"float64\"?(Z=P.FLOAT,G=!1,z=\"float32\"):z===\"uint8\"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z=\"uint8\");var H=0;if(O.length===2)H=P.LUMINANCE,O=[O[0],O[1],1],T=s(T.data,O,[T.stride[0],T.stride[1],1],T.offset);else if(O.length===3)if(O[2]===1)H=P.ALPHA;else if(O[2]===2)H=P.LUMINANCE_ALPHA;else if(O[2]===3)H=P.RGB;else if(O[2]===4)H=P.RGBA;else throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");else throw new Error(\"gl-texture2d: Invalid shape for texture\");Z===P.FLOAT&&!P.getExtension(\"OES_texture_float\")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,j,re=T.size;if(G)T.offset===0&&T.data.length===re?N=T.data:N=T.data.subarray(T.offset,T.offset+re);else{var oe=[O[2],O[2]*O[0],1];j=u.malloc(re,z);var _e=s(j,O,oe,0);(z===\"float32\"||z===\"float64\")&&Z===P.UNSIGNED_BYTE?x(_e,T):l.assign(_e,T),N=j.subarray(0,re)}var Me=L(P);return P.texImage2D(P.TEXTURE_2D,0,H,O[0],O[1],0,H,Z,N),G||u.free(j),new p(P,Me,O[0],O[1],H,Z)}function g(P){if(arguments.length<=1)throw new Error(\"gl-texture2d: Missing arguments for texture2d constructor\");if(c||d(P),typeof arguments[1]==\"number\")return _(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]==\"object\"){var T=arguments[1],z=v(T)?T:T.raw;if(z)return k(P,z,T.width|0,T.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return M(P,T)}throw new Error(\"gl-texture2d: Invalid arguments for texture2d constructor\")}},1433:function(i){\"use strict\";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error(\"gl-vao: Too many vertex attributes\");for(var c=0;c<l.length;++c){var f=l[c];if(f.buffer){var h=f.buffer,d=f.size||4,v=f.type||o.FLOAT,x=!!f.normalized,b=f.stride||0,p=f.offset||0;h.bind(),o.enableVertexAttribArray(c),o.vertexAttribPointer(c,d,v,x,b,p)}else{if(typeof f==\"number\")o.vertexAttrib1f(c,f);else if(f.length===1)o.vertexAttrib1f(c,f[0]);else if(f.length===2)o.vertexAttrib2f(c,f[0],f[1]);else if(f.length===3)o.vertexAttrib3f(c,f[0],f[1],f[2]);else if(f.length===4)o.vertexAttrib4f(c,f[0],f[1],f[2],f[3]);else throw new Error(\"gl-vao: Invalid vertex attribute\");o.disableVertexAttribArray(c)}}for(;c<u;++c)o.disableVertexAttribArray(c)}else{o.bindBuffer(o.ARRAY_BUFFER,null);for(var c=0;c<u;++c)o.disableVertexAttribArray(c)}}i.exports=a},870:function(i,a,o){\"use strict\";var s=o(1433);function l(c){this.gl=c,this._elements=null,this._attributes=null,this._elementsType=c.UNSIGNED_SHORT}l.prototype.bind=function(){s(this.gl,this._elements,this._attributes)},l.prototype.update=function(c,f,h){this._elements=f,this._attributes=c,this._elementsType=h||this.gl.UNSIGNED_SHORT},l.prototype.dispose=function(){},l.prototype.unbind=function(){},l.prototype.draw=function(c,f,h){h=h||0;var d=this.gl;this._elements?d.drawElements(c,f,this._elementsType,h):d.drawArrays(c,h,f)};function u(c){return new l(c)}i.exports=u},7518:function(i,a,o){\"use strict\";var s=o(1433);function l(f,h,d,v,x,b){this.location=f,this.dimension=h,this.a=d,this.b=v,this.c=x,this.d=b}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f<this._attribs.length;++f)this._attribs[f].bind(this.gl)},u.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},u.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},u.prototype.update=function(f,h,d){if(this.bind(),s(this.gl,h,f),this.unbind(),this._attribs.length=0,f)for(var v=0;v<f.length;++v){var x=f[v];typeof x==\"number\"?this._attribs.push(new l(v,1,x)):Array.isArray(x)&&this._attribs.push(new l(v,x.length,x[0],x[1],x[2],x[3]))}this._useElements=!!h,this._elementsType=d||this.gl.UNSIGNED_SHORT},u.prototype.draw=function(f,h,d){d=d||0;var v=this.gl;this._useElements?v.drawElements(f,h,this._elementsType,d):v.drawArrays(f,d,h)};function c(f,h){return new u(f,h,h.createVertexArrayOES())}i.exports=c},8116:function(i,a,o){\"use strict\";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,v){var x=f.createVertexArray?new u(f):f.getExtension(\"OES_vertex_array_object\"),b;return x?b=s(f,x):b=l(f),b.update(h,d,v),b}i.exports=c},5632:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o}},8192:function(i,a,o){i.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),v=s(h[0],h[1],h[2]);l(d,d),l(v,v);var x=u(d,v);return x>1?0:Math.acos(x)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],x=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var x,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,x=f;x<b;x+=c)s[0]=u[x],s[1]=u[x+1],s[2]=u[x+2],d(s,s,v),u[x]=s[0],u[x+1]=s[1],u[x+2]=s[2];return u}},2825:function(i){i.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931:function(i,a,o){i.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},811:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}},868:function(i,a,o){i.exports=o(1387)},1387:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}},6658:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o}},7417:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},8107:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},4505:function(i,a,o){i.exports=o(5847)},5847:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}},5093:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}},3536:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+h*x-d*v,o[2]=f+h*v+d*x,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+d*v+h*x,o[1]=s[1],o[2]=f+d*x-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+h*x-d*v,o[1]=f+h*v+d*x,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,p=x*c+v*u-h*f,C=x*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*x+E*-h+p*-v-C*-d,o[1]=p*x+E*-d+C*-h-b*-v,o[2]=C*x+E*-v+b*-d-p*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,p=x*c+v*u-h*f,C=x*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*x+E*-h+p*-v-C*-d,o[1]=p*x+E*-d+C*-h-b*-v,o[2]=C*x+E*-v+b*-d-p*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h<f.length;h++){var d=f[h];if(d.type===\"preprocessor\"){var v=d.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/);if(v&&v[2]){var x=v[1],b=v[2];return(x?l(b):b).trim()}}}}},5874:function(i,a,o){i.exports=T;var s=o(620),l=o(7827),u=o(6852),c=o(7932),f=o(3508),h=999,d=9999,v=0,x=1,b=2,p=3,C=4,E=5,A=6,L=7,_=8,k=9,M=10,g=11,P=[\"block-comment\",\"line-comment\",\"preprocessor\",\"operator\",\"integer\",\"float\",\"ident\",\"builtin\",\"keyword\",\"whitespace\",\"eof\",\"integer\"];function T(z){var O=0,V=0,G=h,Z,H,N=[],j=[],re=0,oe=0,_e=1,Me=0,ke=0,me=!1,ie=!1,Se=\"\",Le;z=z||{};var Ae=u,De=s;z.version===\"300 es\"&&(Ae=f,De=c);for(var Pe={},ge={},O=0;O<Ae.length;O++)Pe[Ae[O]]=!0;for(var O=0;O<De.length;O++)ge[De[O]]=!0;return function(Qe){return j=[],Qe!==null?ce(Qe):Ze()};function Fe(Qe){Qe.length&&j.push({type:P[G],data:Qe,position:ke,line:_e,column:Me})}function ce(Qe){O=0,Qe.toString&&(Qe=Qe.toString()),Se+=Qe.replace(/\\r\\n/g,`\n",
       "`),Le=Se.length;for(var Et;Z=Se[O],O<Le;){switch(Et=O,G){case v:O=lt();break;case x:O=st();break;case b:O=Wt();break;case p:O=Gt();break;case C:O=sr();break;case g:O=$t();break;case E:O=wr();break;case d:O=ur();break;case k:O=pt();break;case h:O=ct();break}if(Et!==O)switch(Se[Et]){case`\n",
       "`:Me=0,++_e;break;default:++Me;break}}return V+=O,Se=Se.slice(O),j}function Ze(Qe){return N.length&&Fe(N.join(\"\")),G=M,Fe(\"(eof)\"),j}function ct(){return N=N.length?[]:N,H===\"/\"&&Z===\"*\"?(ke=V+O-1,G=v,H=Z,O+1):H===\"/\"&&Z===\"/\"?(ke=V+O-1,G=x,H=Z,O+1):Z===\"#\"?(G=b,ke=V+O,O):/\\s/.test(Z)?(G=k,ke=V+O,O):(me=/\\d/.test(Z),ie=/[^\\w_]/.test(Z),ke=V+O,G=me?C:ie?p:d,O)}function pt(){return/[^\\s]/g.test(Z)?(Fe(N.join(\"\")),G=h,O):(N.push(Z),H=Z,O+1)}function Wt(){return(Z===\"\\r\"||Z===`\n",
       "`)&&H!==\"\\\\\"?(Fe(N.join(\"\")),G=h,O):(N.push(Z),H=Z,O+1)}function st(){return Wt()}function lt(){return Z===\"/\"&&H===\"*\"?(N.push(Z),Fe(N.join(\"\")),G=h,O+1):(N.push(Z),H=Z,O+1)}function Gt(){if(H===\".\"&&/\\d/.test(Z))return G=E,O;if(H===\"/\"&&Z===\"*\")return G=v,O;if(H===\"/\"&&Z===\"/\")return G=x,O;if(Z===\".\"&&N.length){for(;Nt(N););return G=E,O}if(Z===\";\"||Z===\")\"||Z===\"(\"){if(N.length)for(;Nt(N););return Fe(Z),G=h,O+1}var Qe=N.length===2&&Z!==\"=\";if(/[\\w_\\d\\s]/.test(Z)||Qe){for(;Nt(N););return G=h,O}return N.push(Z),H=Z,O+1}function Nt(Qe){var Et=0,er,Ut;do{if(er=l.indexOf(Qe.slice(0,Qe.length+Et).join(\"\")),Ut=l[er],er===-1){if(Et--+Qe.length>0)continue;Ut=Qe.slice(0,1).join(\"\")}return Fe(Ut),ke+=Ut.length,N=N.slice(Ut.length),N.length}while(!0)}function $t(){return/[^a-fA-F0-9]/.test(Z)?(Fe(N.join(\"\")),G=h,O):(N.push(Z),H=Z,O+1)}function sr(){return Z===\".\"||/[eE]/.test(Z)?(N.push(Z),G=E,H=Z,O+1):Z===\"x\"&&N.length===1&&N[0]===\"0\"?(G=g,N.push(Z),H=Z,O+1):/[^\\d]/.test(Z)?(Fe(N.join(\"\")),G=h,O):(N.push(Z),H=Z,O+1)}function wr(){return Z===\"f\"&&(N.push(Z),H=Z,O+=1),/[eE]/.test(Z)||(Z===\"-\"||Z===\"+\")&&/[eE]/.test(H)?(N.push(Z),H=Z,O+1):/[^\\d]/.test(Z)?(Fe(N.join(\"\")),G=h,O):(N.push(Z),H=Z,O+1)}function ur(){if(/[^\\d\\w_]/.test(Z)){var Qe=N.join(\"\");return ge[Qe]?G=_:Pe[Qe]?G=L:G=A,Fe(N.join(\"\")),G=h,O}return N.push(Z),H=Z,O+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\\_|texture)/.test(l)}),i.exports=s.concat([\"gl_VertexID\",\"gl_InstanceID\",\"gl_Position\",\"gl_PointSize\",\"gl_FragCoord\",\"gl_FrontFacing\",\"gl_FragDepth\",\"gl_PointCoord\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexUniformVectors\",\"gl_MaxVertexOutputVectors\",\"gl_MaxFragmentInputVectors\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxTextureImageUnits\",\"gl_MaxFragmentUniformVectors\",\"gl_MaxDrawBuffers\",\"gl_MinProgramTexelOffset\",\"gl_MaxProgramTexelOffset\",\"gl_DepthRangeParameters\",\"gl_DepthRange\",\"trunc\",\"round\",\"roundEven\",\"isnan\",\"isinf\",\"floatBitsToInt\",\"floatBitsToUint\",\"intBitsToFloat\",\"uintBitsToFloat\",\"packSnorm2x16\",\"unpackSnorm2x16\",\"packUnorm2x16\",\"unpackUnorm2x16\",\"packHalf2x16\",\"unpackHalf2x16\",\"outerProduct\",\"transpose\",\"determinant\",\"inverse\",\"texture\",\"textureSize\",\"textureProj\",\"textureLod\",\"textureOffset\",\"texelFetch\",\"texelFetchOffset\",\"textureProjOffset\",\"textureLodOffset\",\"textureProjLod\",\"textureProjLodOffset\",\"textureGrad\",\"textureGradOffset\",\"textureProjGrad\",\"textureProjGradOffset\"])},6852:function(i){i.exports=[\"abs\",\"acos\",\"all\",\"any\",\"asin\",\"atan\",\"ceil\",\"clamp\",\"cos\",\"cross\",\"dFdx\",\"dFdy\",\"degrees\",\"distance\",\"dot\",\"equal\",\"exp\",\"exp2\",\"faceforward\",\"floor\",\"fract\",\"gl_BackColor\",\"gl_BackLightModelProduct\",\"gl_BackLightProduct\",\"gl_BackMaterial\",\"gl_BackSecondaryColor\",\"gl_ClipPlane\",\"gl_ClipVertex\",\"gl_Color\",\"gl_DepthRange\",\"gl_DepthRangeParameters\",\"gl_EyePlaneQ\",\"gl_EyePlaneR\",\"gl_EyePlaneS\",\"gl_EyePlaneT\",\"gl_Fog\",\"gl_FogCoord\",\"gl_FogFragCoord\",\"gl_FogParameters\",\"gl_FragColor\",\"gl_FragCoord\",\"gl_FragData\",\"gl_FragDepth\",\"gl_FragDepthEXT\",\"gl_FrontColor\",\"gl_FrontFacing\",\"gl_FrontLightModelProduct\",\"gl_FrontLightProduct\",\"gl_FrontMaterial\",\"gl_FrontSecondaryColor\",\"gl_LightModel\",\"gl_LightModelParameters\",\"gl_LightModelProducts\",\"gl_LightProducts\",\"gl_LightSource\",\"gl_LightSourceParameters\",\"gl_MaterialParameters\",\"gl_MaxClipPlanes\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxDrawBuffers\",\"gl_MaxFragmentUniformComponents\",\"gl_MaxLights\",\"gl_MaxTextureCoords\",\"gl_MaxTextureImageUnits\",\"gl_MaxTextureUnits\",\"gl_MaxVaryingFloats\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxVertexUniformComponents\",\"gl_ModelViewMatrix\",\"gl_ModelViewMatrixInverse\",\"gl_ModelViewMatrixInverseTranspose\",\"gl_ModelViewMatrixTranspose\",\"gl_ModelViewProjectionMatrix\",\"gl_ModelViewProjectionMatrixInverse\",\"gl_ModelViewProjectionMatrixInverseTranspose\",\"gl_ModelViewProjectionMatrixTranspose\",\"gl_MultiTexCoord0\",\"gl_MultiTexCoord1\",\"gl_MultiTexCoord2\",\"gl_MultiTexCoord3\",\"gl_MultiTexCoord4\",\"gl_MultiTexCoord5\",\"gl_MultiTexCoord6\",\"gl_MultiTexCoord7\",\"gl_Normal\",\"gl_NormalMatrix\",\"gl_NormalScale\",\"gl_ObjectPlaneQ\",\"gl_ObjectPlaneR\",\"gl_ObjectPlaneS\",\"gl_ObjectPlaneT\",\"gl_Point\",\"gl_PointCoord\",\"gl_PointParameters\",\"gl_PointSize\",\"gl_Position\",\"gl_ProjectionMatrix\",\"gl_ProjectionMatrixInverse\",\"gl_ProjectionMatrixInverseTranspose\",\"gl_ProjectionMatrixTranspose\",\"gl_SecondaryColor\",\"gl_TexCoord\",\"gl_TextureEnvColor\",\"gl_TextureMatrix\",\"gl_TextureMatrixInverse\",\"gl_TextureMatrixInverseTranspose\",\"gl_TextureMatrixTranspose\",\"gl_Vertex\",\"greaterThan\",\"greaterThanEqual\",\"inversesqrt\",\"length\",\"lessThan\",\"lessThanEqual\",\"log\",\"log2\",\"matrixCompMult\",\"max\",\"min\",\"mix\",\"mod\",\"normalize\",\"not\",\"notEqual\",\"pow\",\"radians\",\"reflect\",\"refract\",\"sign\",\"sin\",\"smoothstep\",\"sqrt\",\"step\",\"tan\",\"texture2D\",\"texture2DLod\",\"texture2DProj\",\"texture2DProjLod\",\"textureCube\",\"textureCubeLod\",\"texture2DLodEXT\",\"texture2DProjLodEXT\",\"textureCubeLodEXT\",\"texture2DGradEXT\",\"texture2DProjGradEXT\",\"textureCubeGradEXT\"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat([\"layout\",\"centroid\",\"smooth\",\"case\",\"mat2x2\",\"mat2x3\",\"mat2x4\",\"mat3x2\",\"mat3x3\",\"mat3x4\",\"mat4x2\",\"mat4x3\",\"mat4x4\",\"uvec2\",\"uvec3\",\"uvec4\",\"samplerCubeShadow\",\"sampler2DArray\",\"sampler2DArrayShadow\",\"isampler2D\",\"isampler3D\",\"isamplerCube\",\"isampler2DArray\",\"usampler2D\",\"usampler3D\",\"usamplerCube\",\"usampler2DArray\",\"coherent\",\"restrict\",\"readonly\",\"writeonly\",\"resource\",\"atomic_uint\",\"noperspective\",\"patch\",\"sample\",\"subroutine\",\"common\",\"partition\",\"active\",\"filter\",\"image1D\",\"image2D\",\"image3D\",\"imageCube\",\"iimage1D\",\"iimage2D\",\"iimage3D\",\"iimageCube\",\"uimage1D\",\"uimage2D\",\"uimage3D\",\"uimageCube\",\"image1DArray\",\"image2DArray\",\"iimage1DArray\",\"iimage2DArray\",\"uimage1DArray\",\"uimage2DArray\",\"image1DShadow\",\"image2DShadow\",\"image1DArrayShadow\",\"image2DArrayShadow\",\"imageBuffer\",\"iimageBuffer\",\"uimageBuffer\",\"sampler1DArray\",\"sampler1DArrayShadow\",\"isampler1D\",\"isampler1DArray\",\"usampler1D\",\"usampler1DArray\",\"isampler2DRect\",\"usampler2DRect\",\"samplerBuffer\",\"isamplerBuffer\",\"usamplerBuffer\",\"sampler2DMS\",\"isampler2DMS\",\"usampler2DMS\",\"sampler2DMSArray\",\"isampler2DMSArray\",\"usampler2DMSArray\"])},620:function(i){i.exports=[\"precision\",\"highp\",\"mediump\",\"lowp\",\"attribute\",\"const\",\"uniform\",\"varying\",\"break\",\"continue\",\"do\",\"for\",\"while\",\"if\",\"else\",\"in\",\"out\",\"inout\",\"float\",\"int\",\"uint\",\"void\",\"bool\",\"true\",\"false\",\"discard\",\"return\",\"mat2\",\"mat3\",\"mat4\",\"vec2\",\"vec3\",\"vec4\",\"ivec2\",\"ivec3\",\"ivec4\",\"bvec2\",\"bvec3\",\"bvec4\",\"sampler1D\",\"sampler2D\",\"sampler3D\",\"samplerCube\",\"sampler1DShadow\",\"sampler2DShadow\",\"struct\",\"asm\",\"class\",\"union\",\"enum\",\"typedef\",\"template\",\"this\",\"packed\",\"goto\",\"switch\",\"default\",\"inline\",\"noinline\",\"volatile\",\"public\",\"static\",\"extern\",\"external\",\"interface\",\"long\",\"short\",\"double\",\"half\",\"fixed\",\"unsigned\",\"input\",\"output\",\"hvec2\",\"hvec3\",\"hvec4\",\"dvec2\",\"dvec3\",\"dvec4\",\"fvec2\",\"fvec3\",\"fvec4\",\"sampler2DRect\",\"sampler3DRect\",\"sampler2DRectShadow\",\"sizeof\",\"cast\",\"namespace\",\"using\"]},7827:function(i){i.exports=[\"<<=\",\">>=\",\"++\",\"--\",\"<<\",\">>\",\"<=\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"+=\",\"-=\",\"*=\",\"/=\",\"%=\",\"&=\",\"^^\",\"^=\",\"|=\",\"(\",\")\",\"[\",\"]\",\".\",\"!\",\"~\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\">\",\"&\",\"^\",\"|\",\"?\",\":\",\"=\",\",\",\";\",\"{\",\"}\"]},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a==\"string\"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l<a.length-1;l++)s.push(a[l],o[l]||\"\");return s.push(a[l]),s.join(\"\")}},7520:function(i,a,o){\"use strict\";var s=o(9507);function l(){var u=!1;try{var c=Object.defineProperty({},\"passive\",{get:function(){u=!0}});window.addEventListener(\"test\",null,c),window.removeEventListener(\"test\",null,c)}catch(f){u=!1}return u}i.exports=s&&l()},3778:function(i,a){a.read=function(o,s,l,u,c){var f,h,d=c*8-u-1,v=(1<<d)-1,x=v>>1,b=-7,p=l?c-1:0,C=l?-1:1,E=o[s+p];for(p+=C,f=E&(1<<-b)-1,E>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=C,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=C,b-=8);if(f===0)f=1-x;else{if(f===v)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-x}return(E?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,x=f*8-c-1,b=(1<<x)-1,p=b>>1,C=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=u?0:f-1,A=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=C/v:s+=C*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+E]=d&255,E+=A,d/=256,c-=8);for(h=h<<c|d,x+=c;x>0;o[l+E]=h&255,E+=A,h/=256,x-=8);o[l+E-A]|=L*128}},8954:function(i,a,o){\"use strict\";i.exports=p;var s=o(3250),l=o(6803).Fw;function u(C,E,A){this.vertices=C,this.adjacent=E,this.boundary=A,this.lastVisited=-1}u.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var E=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=E};function c(C,E,A){this.vertices=C,this.cell=E,this.index=A}function f(C,E){return l(C.vertices,E.vertices)}function h(C){return function(){var E=this.tuple;return C.apply(this,E)}}function d(C){var E=s[C+1];return E||(E=s),h(E)}var v=[];function x(C,E,A){this.dimension=C,this.vertices=E,this.simplices=A,this.interior=A.filter(function(k){return!k.boundary}),this.tuple=new Array(C+1);for(var L=0;L<=C;++L)this.tuple[L]=this.vertices[L];var _=v[C];_||(_=v[C]=d(C)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(C,E){var A=this.dimension,L=this.vertices.length-1,_=this.tuple,k=this.vertices,M=[C];for(C.lastVisited=-L;M.length>0;){C=M.pop();for(var g=C.adjacent,P=0;P<=A;++P){var T=g[P];if(!(!T.boundary||T.lastVisited<=-L)){for(var z=T.vertices,O=0;O<=A;++O){var V=z[O];V<0?_[O]=E:_[O]=k[V]}var G=this.orient();if(G>0)return T;T.lastVisited=-L,G===0&&M.push(T)}}}return null},b.walk=function(C,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,k=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[M];e:for(;!g.boundary;){for(var P=g.vertices,T=g.adjacent,z=0;z<=L;++z)k[z]=_[P[z]];g.lastVisited=A;for(var z=0;z<=L;++z){var O=T[z];if(!(O.lastVisited>=A)){var V=k[z];k[z]=C;var G=this.orient();if(k[z]=V,G<0){g=O;continue e}else O.boundary?O.lastVisited=-A:O.lastVisited=A}}return}return g},b.addPeaks=function(C,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,k=this.tuple,M=this.interior,g=this.simplices,P=[E];E.lastVisited=A,E.vertices[E.vertices.indexOf(-1)]=A,E.boundary=!1,M.push(E);for(var T=[];P.length>0;){var E=P.pop(),z=E.vertices,O=E.adjacent,V=z.indexOf(A);if(!(V<0)){for(var G=0;G<=L;++G)if(G!==V){var Z=O[G];if(!(!Z.boundary||Z.lastVisited>=A)){var H=Z.vertices;if(Z.lastVisited!==-A){for(var N=0,j=0;j<=L;++j)H[j]<0?(N=j,k[j]=C):k[j]=_[H[j]];var re=this.orient();if(re>0){H[N]=A,Z.boundary=!1,M.push(Z),P.push(Z),Z.lastVisited=A;continue}else Z.lastVisited=-A}var oe=Z.adjacent,_e=z.slice(),Me=O.slice(),ke=new u(_e,Me,!0);g.push(ke);var me=oe.indexOf(E);if(!(me<0)){oe[me]=ke,Me[V]=Z,_e[G]=-1,Me[G]=E,O[G]=ke,ke.flip();for(var j=0;j<=L;++j){var ie=_e[j];if(!(ie<0||ie===A)){for(var Se=new Array(L-1),Le=0,Ae=0;Ae<=L;++Ae){var De=_e[Ae];De<0||Ae===j||(Se[Le++]=De)}T.push(new c(Se,ke,j))}}}}}}}T.sort(f);for(var G=0;G+1<T.length;G+=2){var Pe=T[G],ge=T[G+1],Fe=Pe.index,ce=ge.index;Fe<0||ce<0||(Pe.cell.adjacent[Pe.index]=ge.cell,ge.cell.adjacent[ge.index]=Pe.cell)}},b.insert=function(C,E){var A=this.vertices;A.push(C);var L=this.walk(C,E);if(L){for(var _=this.dimension,k=this.tuple,M=0;M<=_;++M){var g=L.vertices[M];g<0?k[M]=C:k[M]=A[g]}var P=this.orient(k);P<0||P===0&&(L=this.handleBoundaryDegeneracy(L,C),!L)||this.addPeaks(C,L)}},b.boundary=function(){for(var C=this.dimension,E=[],A=this.simplices,L=A.length,_=0;_<L;++_){var k=A[_];if(k.boundary){for(var M=new Array(C),g=k.vertices,P=0,T=0,z=0;z<=C;++z)g[z]>=0?M[P++]=g[z]:T=z&1;if(T===(C&1)){var O=M[0];M[0]=M[1],M[1]=O}E.push(M)}}return E};function p(C,E){var A=C.length;if(A===0)throw new Error(\"Must have at least d+1 points\");var L=C[0].length;if(A<=L)throw new Error(\"Must input at least d+1 points\");var _=C.slice(0,L+1),k=s.apply(void 0,_);if(k===0)throw new Error(\"Input not in general position\");for(var M=new Array(L+1),g=0;g<=L;++g)M[g]=g;k<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),T=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var O=M.slice(),V=0;V<=L;++V)V===g&&(O[V]=-1);var G=O[0];O[0]=O[1],O[1]=G;var Z=new u(O,new Array(L+1),!0);T[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var O=T[g].vertices,H=T[g].adjacent,V=0;V<=L;++V){var N=O[V];if(N<0){H[V]=P;continue}for(var j=0;j<=L;++j)T[j].vertices.indexOf(N)<0&&(H[V]=T[j])}for(var re=new x(L,_,z),oe=!!E,g=L+1;g<A;++g)re.insert(C[g],oe);return re.boundary()}},3352:function(i,a,o){\"use strict\";var s=o(2478),l=0,u=1,c=2;i.exports=P;function f(T,z,O,V,G){this.mid=T,this.left=z,this.right=O,this.leftPoints=V,this.rightPoints=G,this.count=(z?z.count:0)+(O?O.count:0)+V.length}var h=f.prototype;function d(T,z){T.mid=z.mid,T.left=z.left,T.right=z.right,T.leftPoints=z.leftPoints,T.rightPoints=z.rightPoints,T.count=z.count}function v(T,z){var O=k(z);T.mid=O.mid,T.left=O.left,T.right=O.right,T.leftPoints=O.leftPoints,T.rightPoints=O.rightPoints,T.count=O.count}function x(T,z){var O=T.intervals([]);O.push(z),v(T,O)}function b(T,z){var O=T.intervals([]),V=O.indexOf(z);return V<0?l:(O.splice(V,1),v(T,O),u)}h.intervals=function(T){return T.push.apply(T,this.leftPoints),this.left&&this.left.intervals(T),this.right&&this.right.intervals(T),T},h.insert=function(T){var z=this.count-this.leftPoints.length;if(this.count+=1,T[1]<this.mid)this.left?4*(this.left.count+1)>3*(z+1)?x(this,T):this.left.insert(T):this.left=k([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?x(this,T):this.right.insert(T):this.right=k([T]);else{var O=s.ge(this.leftPoints,T,L),V=s.ge(this.rightPoints,T,_);this.leftPoints.splice(O,0,T),this.rightPoints.splice(V,0,T)}},h.remove=function(T){var z=this.count-this.leftPoints;if(T[1]<this.mid){if(!this.left)return l;var O=this.right?this.right.count:0;if(4*O>3*(z-1))return b(this,T);var V=this.left.remove(T);return V===c?(this.left=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else if(T[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,T);var V=this.right.remove(T);return V===c?(this.right=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else{if(this.count===1)return this.leftPoints[0]===T?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var Z=this,H=this.left;H.right;)Z=H,H=H.right;if(Z===this)H.right=this.right;else{var N=this.left,V=this.right;Z.count-=H.count,Z.right=H.left,H.left=N,H.right=V}d(this,H),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,T,L);N<this.leftPoints.length&&this.leftPoints[N][0]===T[0];++N)if(this.leftPoints[N]===T){this.count-=1,this.leftPoints.splice(N,1);for(var V=s.ge(this.rightPoints,T,_);V<this.rightPoints.length&&this.rightPoints[V][1]===T[1];++V)if(this.rightPoints[V]===T)return this.rightPoints.splice(V,1),u}return l}};function p(T,z,O){for(var V=0;V<T.length&&T[V][0]<=z;++V){var G=O(T[V]);if(G)return G}}function C(T,z,O){for(var V=T.length-1;V>=0&&T[V][1]>=z;--V){var G=O(T[V]);if(G)return G}}function E(T,z){for(var O=0;O<T.length;++O){var V=z(T[O]);if(V)return V}}h.queryPoint=function(T,z){if(T<this.mid){if(this.left){var O=this.left.queryPoint(T,z);if(O)return O}return p(this.leftPoints,T,z)}else if(T>this.mid){if(this.right){var O=this.right.queryPoint(T,z);if(O)return O}return C(this.rightPoints,T,z)}else return E(this.leftPoints,z)},h.queryInterval=function(T,z,O){if(T<this.mid&&this.left){var V=this.left.queryInterval(T,z,O);if(V)return V}if(z>this.mid&&this.right){var V=this.right.queryInterval(T,z,O);if(V)return V}return z<this.mid?p(this.leftPoints,z,O):T>this.mid?C(this.rightPoints,T,O):E(this.leftPoints,O)};function A(T,z){return T-z}function L(T,z){var O=T[0]-z[0];return O||T[1]-z[1]}function _(T,z){var O=T[1]-z[1];return O||T[0]-z[0]}function k(T){if(T.length===0)return null;for(var z=[],O=0;O<T.length;++O)z.push(T[O][0],T[O][1]);z.sort(A);for(var V=z[z.length>>1],G=[],Z=[],H=[],O=0;O<T.length;++O){var N=T[O];N[1]<V?G.push(N):V<N[0]?Z.push(N):H.push(N)}var j=H,re=H.slice();return j.sort(L),re.sort(_),new f(V,k(G),k(Z),j,re)}function M(T){this.root=T}var g=M.prototype;g.insert=function(T){this.root?this.root.insert(T):this.root=new f(T[0],null,null,[T],[T])},g.remove=function(T){if(this.root){var z=this.root.remove(T);return z===c&&(this.root=null),z!==l}return!1},g.queryPoint=function(T,z){if(this.root)return this.root.queryPoint(T,z)},g.queryInterval=function(T,z,O){if(T<=z&&this.root)return this.root.queryInterval(T,z,O)},Object.defineProperty(g,\"count\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(g,\"intervals\",{get:function(){return this.root?this.root.intervals([]):[]}});function P(T){return!T||T.length===0?new M(null):new M(k(T))}},9507:function(i){i.exports=!0},7163:function(i){i.exports=function(s){return s!=null&&(a(s)||o(s)||!!s._isBuffer)};function a(s){return!!s.constructor&&typeof s.constructor.isBuffer==\"function\"&&s.constructor.isBuffer(s)}function o(s){return typeof s.readFloatLE==\"function\"&&typeof s.slice==\"function\"&&a(s.slice(0,0))}},5219:function(i){\"use strict\";i.exports=function(a){for(var o=a.length,s,l=0;l<o;l++)if(s=a.charCodeAt(l),(s<9||s>13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),x=l(),b=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];i.exports=function(k,M,g,P,T,z){if(M||(M=[0,0,0]),g||(g=[0,0,0]),P||(P=[0,0,0]),T||(T=[0,0,0,1]),z||(z=[0,0,0,1]),!s(v,k)||(u(x,v),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var O=v[3],V=v[7],G=v[11],Z=v[12],H=v[13],N=v[14],j=v[15];if(O!==0||V!==0||G!==0){b[0]=O,b[1]=V,b[2]=G,b[3]=j;var re=f(x,x);if(!re)return!1;h(x,x),E(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=Z,M[1]=H,M[2]=N,A(p,v),g[0]=d.length(p[0]),d.normalize(p[0],p[0]),P[0]=d.dot(p[0],p[1]),L(p[1],p[1],p[0],1,-P[0]),g[1]=d.length(p[1]),d.normalize(p[1],p[1]),P[0]/=g[1],P[1]=d.dot(p[0],p[2]),L(p[2],p[2],p[0],1,-P[1]),P[2]=d.dot(p[1],p[2]),L(p[2],p[2],p[1],1,-P[2]),g[2]=d.length(p[2]),d.normalize(p[2],p[2]),P[1]/=g[2],P[2]/=g[2],d.cross(C,p[1],p[2]),d.dot(p[0],C)<0)for(var oe=0;oe<3;oe++)g[oe]*=-1,p[oe][0]*=-1,p[oe][1]*=-1,p[oe][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function E(_,k,M){var g=k[0],P=k[1],T=k[2],z=k[3];return _[0]=M[0]*g+M[4]*P+M[8]*T+M[12]*z,_[1]=M[1]*g+M[5]*P+M[9]*T+M[13]*z,_[2]=M[2]*g+M[6]*P+M[10]*T+M[14]*z,_[3]=M[3]*g+M[7]*P+M[11]*T+M[15]*z,_}function A(_,k){_[0][0]=k[0],_[0][1]=k[1],_[0][2]=k[2],_[1][0]=k[4],_[1][1]=k[5],_[1][2]=k[6],_[2][0]=k[8],_[2][1]=k[9],_[2][2]=k[10]}function L(_,k,M,g,P){_[0]=k[0]*g+M[0]*P,_[1]=k[1]*g+M[1]*P,_[2]=k[2]*g+M[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=x;function x(E,A,L,_){if(c(A)===0||c(L)===0)return!1;var k=u(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!k||!M?!1:(s(v.translate,h.translate,d.translate,_),s(v.skew,h.skew,d.skew,_),s(v.scale,h.scale,d.scale,_),s(v.perspective,h.perspective,d.perspective,_),f(v.quaternion,h.quaternion,d.quaternion,_),l(E,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:C(),quaternion:C()}}function p(E){return[E||0,E||0,E||0]}function C(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,x,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){\"use strict\";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),x=o(2504),b=o(3536),p=[0,0,0];i.exports=L;function C(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var E=C.prototype;E.recalcMatrix=function(_){var k=this._time,M=s.le(k,_),g=this.computedMatrix;if(!(M<0)){var P=this._components;if(M===k.length-1)for(var T=16*M,z=0;z<16;++z)g[z]=P[T++];else{for(var O=k[M+1]-k[M],T=16*M,V=this.prevMatrix,G=!0,z=0;z<16;++z)V[z]=P[T++];for(var Z=this.nextMatrix,z=0;z<16;++z)Z[z]=P[T++],G=G&&V[z]===Z[z];if(O<1e-6||G)for(var z=0;z<16;++z)g[z]=V[z];else l(g,V,Z,(_-k[M])/O)}var H=this.computedUp;H[0]=g[1],H[1]=g[5],H[2]=g[9],b(H,H);var N=this.computedInverse;u(N,g);var j=this.computedEye,re=N[15];j[0]=N[12]/re,j[1]=N[13]/re,j[2]=N[14]/re;for(var oe=this.computedCenter,_e=Math.exp(this.computedRadius[0]),z=0;z<3;++z)oe[z]=j[z]-g[2+4*z]*_e}},E.idle=function(_){if(!(_<this.lastT())){for(var k=this._components,M=k.length-16,g=0;g<16;++g)k.push(k[M++]);this._time.push(_)}},E.flush=function(_){var k=s.gt(this._time,_)-2;k<0||(this._time.splice(0,k),this._components.splice(0,16*k))},E.lastT=function(){return this._time[this._time.length-1]},E.lookAt=function(_,k,M,g){this.recalcMatrix(_),k=k||this.computedEye,M=M||p,g=g||this.computedUp,this.setMatrix(_,d(this.computedMatrix,k,M,g));for(var P=0,T=0;T<3;++T)P+=Math.pow(M[T]-k[T],2);P=Math.log(Math.sqrt(P)),this.computedRadius[0]=P},E.rotate=function(_,k,M,g){this.recalcMatrix(_);var P=this.computedInverse;k&&f(P,P,k),M&&c(P,P,M),g&&h(P,P,g),this.setMatrix(_,u(this.computedMatrix,P))};var A=[0,0,0];E.pan=function(_,k,M,g){A[0]=-(k||0),A[1]=-(M||0),A[2]=-(g||0),this.recalcMatrix(_);var P=this.computedInverse;v(P,P,A),this.setMatrix(_,u(P,P))},E.translate=function(_,k,M,g){A[0]=k||0,A[1]=M||0,A[2]=g||0,this.recalcMatrix(_);var P=this.computedMatrix;v(P,P,A),this.setMatrix(_,P)},E.setMatrix=function(_,k){if(!(_<this.lastT())){this._time.push(_);for(var M=0;M<16;++M)this._components.push(k[M])}},E.setDistance=function(_,k){this.computedRadius[0]=k},E.setDistanceLimits=function(_,k){var M=this._limits;M[0]=_,M[1]=k},E.getDistanceLimits=function(_){var k=this._limits;return _?(_[0]=k[0],_[1]=k[1],_):k};function L(_){_=_||{};var k=_.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new C(k)}},3090:function(i,a,o){\"use strict\";i.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var C=new Array(c),f=0;f<c;++f)C[f]=f;return c===2&&u[0][0]===u[1][0]&&u[0][1]===u[1][1]?[0]:C}for(var h=new Array(c),f=0;f<c;++f)h[f]=f;h.sort(function(_,k){var M=u[_][0]-u[k][0];return M||u[_][1]-u[k][1]});for(var d=[h[0],h[1]],v=[h[0],h[1]],f=2;f<c;++f){for(var x=h[f],b=u[x],p=d.length;p>1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(x),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(x)}for(var C=new Array(v.length+d.length-2),E=0,f=0,A=d.length;f<A;++f)C[E++]=d[f];for(var L=v.length-2;L>0;--L)C[E++]=v[L];return C}},351:function(i,a,o){\"use strict\";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var z=!1;return\"altKey\"in T&&(z=z||T.altKey!==v.alt,v.alt=!!T.altKey),\"shiftKey\"in T&&(z=z||T.shiftKey!==v.shift,v.shift=!!T.shiftKey),\"ctrlKey\"in T&&(z=z||T.ctrlKey!==v.control,v.control=!!T.ctrlKey),\"metaKey\"in T&&(z=z||T.metaKey!==v.meta,v.meta=!!T.metaKey),z}function p(T,z){var O=s.x(z),V=s.y(z);\"buttons\"in z&&(T=z.buttons|0),(T!==f||O!==h||V!==d||b(z))&&(f=T|0,h=O||0,d=V||0,c&&c(f,h,d,v))}function C(T){p(0,T)}function E(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function A(T){b(T)&&c&&c(f,h,d,v)}function L(T){s.buttons(T)===0?p(0,T):p(f,T)}function _(T){p(f|s.buttons(T),T)}function k(T){p(f&~s.buttons(T),T)}function M(){x||(x=!0,u.addEventListener(\"mousemove\",L),u.addEventListener(\"mousedown\",_),u.addEventListener(\"mouseup\",k),u.addEventListener(\"mouseleave\",C),u.addEventListener(\"mouseenter\",C),u.addEventListener(\"mouseout\",C),u.addEventListener(\"mouseover\",C),u.addEventListener(\"blur\",E),u.addEventListener(\"keyup\",A),u.addEventListener(\"keydown\",A),u.addEventListener(\"keypress\",A),u!==window&&(window.addEventListener(\"blur\",E),window.addEventListener(\"keyup\",A),window.addEventListener(\"keydown\",A),window.addEventListener(\"keypress\",A)))}function g(){x&&(x=!1,u.removeEventListener(\"mousemove\",L),u.removeEventListener(\"mousedown\",_),u.removeEventListener(\"mouseup\",k),u.removeEventListener(\"mouseleave\",C),u.removeEventListener(\"mouseenter\",C),u.removeEventListener(\"mouseout\",C),u.removeEventListener(\"mouseover\",C),u.removeEventListener(\"blur\",E),u.removeEventListener(\"keyup\",A),u.removeEventListener(\"keydown\",A),u.removeEventListener(\"keypress\",A),u!==window&&(window.removeEventListener(\"blur\",E),window.removeEventListener(\"keyup\",A),window.removeEventListener(\"keydown\",A),window.removeEventListener(\"keypress\",A)))}M();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return x},set:function(T){T?M():g()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){\"use strict\";function o(c){if(typeof c==\"object\"){if(\"buttons\"in c)return c.buttons;if(\"which\"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<<f-1}else if(\"button\"in c){var f=c.button;if(f===1)return 4;if(f===2)return 2;if(f>=0)return 1<<f}}return 0}a.buttons=o;function s(c){return c.target||c.srcElement||window}a.element=s;function l(c){if(typeof c==\"object\"){if(\"offsetX\"in c)return c.offsetX;var f=s(c),h=f.getBoundingClientRect();return c.clientX-h.left}return 0}a.x=l;function u(c){if(typeof c==\"object\"){if(\"offsetY\"in c)return c.offsetY;var f=s(c),h=f.getBoundingClientRect();return c.clientY-h.top}return 0}a.y=u},8512:function(i,a,o){\"use strict\";var s=o(665);i.exports=l;function l(u,c,f){typeof u==\"function\"&&(f=!!c,c=u,u=window);var h=s(\"ex\",u),d=function(v){f&&v.preventDefault();var x=v.deltaX||0,b=v.deltaY||0,p=v.deltaZ||0,C=v.deltaMode,E=1;switch(C){case 1:E=h;break;case 2:E=window.innerHeight;break}if(x*=E,b*=E,p*=E,x||b||p)return c(x,b,p,v)};return u.addEventListener(\"wheel\",d),d}},2640:function(i,a,o){\"use strict\";var s=o(1888);i.exports=c;var l={\"false,0,1\":function(h,d,v,x,b){return function(C,E,A,L){var _=C.shape[0]|0,k=C.shape[1]|0,M=C.data,g=C.offset|0,P=C.stride[0]|0,T=C.stride[1]|0,z=g,O,V=-P|0,G=0,Z=-T|0,H=0,N=-P-T|0,j=0,re=P|0,oe=T-P*_|0,_e=0,Me=0,ke=0,me=2*_|0,ie=x(me),Se=x(me),Le=0,Ae=0,De=-1,Pe=-1,ge=0,Fe=-_|0,ce=_|0,Ze=0,ct=-_-1|0,pt=_-1|0,Wt=0,st=0,lt=0;for(_e=0;_e<_;++_e)ie[Le++]=v(M[z],E,A,L),z+=re;if(z+=oe,k>0){if(Me=1,ie[Le++]=v(M[z],E,A,L),z+=re,_>0)for(_e=1,O=M[z],Ae=ie[Le]=v(O,E,A,L),ge=ie[Le+De],Ze=ie[Le+Fe],Wt=ie[Le+ct],(Ae!==ge||Ae!==Ze||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,ge,Ze,Wt,E,A,L),st=Se[Le]=ke++),Le+=1,z+=re,_e=2;_e<_;++_e)O=M[z],Ae=ie[Le]=v(O,E,A,L),ge=ie[Le+De],Ze=ie[Le+Fe],Wt=ie[Le+ct],(Ae!==ge||Ae!==Ze||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,ge,Ze,Wt,E,A,L),st=Se[Le]=ke++,Wt!==ge&&d(Se[Le+De],st,j,G,Wt,ge,E,A,L)),Le+=1,z+=re;for(z+=oe,Le=0,lt=De,De=Pe,Pe=lt,lt=Fe,Fe=ce,ce=lt,lt=ct,ct=pt,pt=lt,Me=2;Me<k;++Me){if(ie[Le++]=v(M[z],E,A,L),z+=re,_>0)for(_e=1,O=M[z],Ae=ie[Le]=v(O,E,A,L),ge=ie[Le+De],Ze=ie[Le+Fe],Wt=ie[Le+ct],(Ae!==ge||Ae!==Ze||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,ge,Ze,Wt,E,A,L),st=Se[Le]=ke++,Wt!==Ze&&d(Se[Le+Fe],st,H,j,Ze,Wt,E,A,L)),Le+=1,z+=re,_e=2;_e<_;++_e)O=M[z],Ae=ie[Le]=v(O,E,A,L),ge=ie[Le+De],Ze=ie[Le+Fe],Wt=ie[Le+ct],(Ae!==ge||Ae!==Ze||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,ge,Ze,Wt,E,A,L),st=Se[Le]=ke++,Wt!==Ze&&d(Se[Le+Fe],st,H,j,Ze,Wt,E,A,L),Wt!==ge&&d(Se[Le+De],st,j,G,Wt,ge,E,A,L)),Le+=1,z+=re;Me&1&&(Le=0),lt=De,De=Pe,Pe=lt,lt=Fe,Fe=ce,ce=lt,lt=ct,ct=pt,pt=lt,z+=oe}}b(Se),b(ie)}},\"false,1,0\":function(h,d,v,x,b){return function(C,E,A,L){var _=C.shape[0]|0,k=C.shape[1]|0,M=C.data,g=C.offset|0,P=C.stride[0]|0,T=C.stride[1]|0,z=g,O,V=-P|0,G=0,Z=-T|0,H=0,N=-P-T|0,j=0,re=T|0,oe=P-T*k|0,_e=0,Me=0,ke=0,me=2*k|0,ie=x(me),Se=x(me),Le=0,Ae=0,De=-1,Pe=-1,ge=0,Fe=-k|0,ce=k|0,Ze=0,ct=-k-1|0,pt=k-1|0,Wt=0,st=0,lt=0;for(Me=0;Me<k;++Me)ie[Le++]=v(M[z],E,A,L),z+=re;if(z+=oe,_>0){if(_e=1,ie[Le++]=v(M[z],E,A,L),z+=re,k>0)for(Me=1,O=M[z],Ae=ie[Le]=v(O,E,A,L),Ze=ie[Le+Fe],ge=ie[Le+De],Wt=ie[Le+ct],(Ae!==Ze||Ae!==ge||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,Ze,ge,Wt,E,A,L),st=Se[Le]=ke++),Le+=1,z+=re,Me=2;Me<k;++Me)O=M[z],Ae=ie[Le]=v(O,E,A,L),Ze=ie[Le+Fe],ge=ie[Le+De],Wt=ie[Le+ct],(Ae!==Ze||Ae!==ge||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,Ze,ge,Wt,E,A,L),st=Se[Le]=ke++,Wt!==ge&&d(Se[Le+De],st,H,j,ge,Wt,E,A,L)),Le+=1,z+=re;for(z+=oe,Le=0,lt=Fe,Fe=ce,ce=lt,lt=De,De=Pe,Pe=lt,lt=ct,ct=pt,pt=lt,_e=2;_e<_;++_e){if(ie[Le++]=v(M[z],E,A,L),z+=re,k>0)for(Me=1,O=M[z],Ae=ie[Le]=v(O,E,A,L),Ze=ie[Le+Fe],ge=ie[Le+De],Wt=ie[Le+ct],(Ae!==Ze||Ae!==ge||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,Ze,ge,Wt,E,A,L),st=Se[Le]=ke++,Wt!==Ze&&d(Se[Le+Fe],st,j,G,Wt,Ze,E,A,L)),Le+=1,z+=re,Me=2;Me<k;++Me)O=M[z],Ae=ie[Le]=v(O,E,A,L),Ze=ie[Le+Fe],ge=ie[Le+De],Wt=ie[Le+ct],(Ae!==Ze||Ae!==ge||Ae!==Wt)&&(G=M[z+V],H=M[z+Z],j=M[z+N],h(_e,Me,O,G,H,j,Ae,Ze,ge,Wt,E,A,L),st=Se[Le]=ke++,Wt!==ge&&d(Se[Le+De],st,H,j,ge,Wt,E,A,L),Wt!==Ze&&d(Se[Le+Fe],st,j,G,Wt,Ze,E,A,L)),Le+=1,z+=re;_e&1&&(Le=0),lt=Fe,Fe=ce,ce=lt,lt=De,De=Pe,Pe=lt,lt=ct,ct=pt,pt=lt,z+=oe}}b(Se),b(ie)}}};function u(f,h,d,v,x,b){var p=[b,x].join(\",\"),C=l[p];return C(f,h,d,s.mallocUint32,s.freeUint32)}function c(f){function h(E){throw new Error(\"ndarray-extract-contour: \"+E)}typeof f!=\"object\"&&h(\"Must specify arguments\");var d=f.order;Array.isArray(d)||h(\"Must specify order\");var v=f.arrayArguments||1;v<1&&h(\"Must have at least one array argument\");var x=f.scalarArguments||0;x<0&&h(\"Scalar arg count must be > 0\"),typeof f.vertex!=\"function\"&&h(\"Must specify vertex creation function\"),typeof f.cell!=\"function\"&&h(\"Must specify cell creation function\"),typeof f.phase!=\"function\"&&h(\"Must specify phase function\");for(var b=f.getters||[],p=new Array(v),C=0;C<v;++C)b.indexOf(C)>=0?p[C]=!0:p[C]=!1;return u(f.vertex,f.cell,f.phase,x,d,p)}},6199:function(i,a,o){\"use strict\";var s=o(1338),l={zero:function(L,_,k,M){var g=L[0],P=k[0];M|=0;var T=0,z=P;for(T=0;T<g;++T)_[M]=0,M+=z},fdTemplate1:function(L,_,k,M,g,P,T){var z=L[0],O=k[0],V=P[0],G=-1*O,Z=O;M|=0,T|=0;var H=0,N=O,j=V;for(H=0;H<z;++H)g[T]=.5*(_[M+G]-_[M+Z]),M+=N,T+=j},fdTemplate2:function(L,_,k,M,g,P,T,z,O,V){var G=L[0],Z=L[1],H=k[0],N=k[1],j=P[0],re=P[1],oe=O[0],_e=O[1],Me=-1*H,ke=H,me=-1*N,ie=N;M|=0,T|=0,V|=0;var Se=0,Le=0,Ae=N,De=H-Z*N,Pe=re,ge=j-Z*re,Fe=_e,ce=oe-Z*_e;for(Le=0;Le<G;++Le){for(Se=0;Se<Z;++Se)g[T]=.5*(_[M+Me]-_[M+ke]),z[V]=.5*(_[M+me]-_[M+ie]),M+=Ae,T+=Pe,V+=Fe;M+=De,T+=ge,V+=ce}}},u={cdiff:function(L){var _={};return function(M,g,P){var T=M.dtype,z=M.order,O=g.dtype,V=g.order,G=P.dtype,Z=P.order,H=[T,z.join(),O,V.join(),G,Z.join()].join(),N=_[H];return N||(_[H]=N=L([T,z,O,V,G,Z])),N(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}},zero:function(L){var _={};return function(M){var g=M.dtype,P=M.order,T=[g,P.join()].join(),z=_[T];return z||(_[T]=z=L([g,P])),z(M.shape.slice(0),M.data,M.stride,M.offset|0)}},fdTemplate1:function(L){var _={};return function(M,g){var P=M.dtype,T=M.order,z=g.dtype,O=g.order,V=[P,T.join(),z,O.join()].join(),G=_[V];return G||(_[V]=G=L([P,T,z,O])),G(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0)}},fdTemplate2:function(L){var _={};return function(M,g,P){var T=M.dtype,z=M.order,O=g.dtype,V=g.order,G=P.dtype,Z=P.order,H=[T,z.join(),O,V.join(),G,Z.join()].join(),N=_[H];return N||(_[H]=N=L([T,z,O,V,G,Z])),N(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}}};function c(L){var _=u[L.funcName];return _(f.bind(void 0,L))}function f(L){return l[L.funcName]}function h(L){return c({funcName:L.funcName})}var d={},v={},x={body:\"\",args:[],thisVars:[],localVars:[]},b=h({funcName:\"cdiff\"}),p=h({funcName:\"zero\"});function C(L){return L in d?d[L]:d[L]=h({funcName:\"fdTemplate\"+L})}function E(L,_,k,M){return function(g,P){var T=P.shape.slice();return T[0]>2&&T[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),g.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),g.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(k(P.pick(0,-1).lo(1).hi(T[1]-2),g.pick(0,-1,1).lo(1).hi(T[1]-2)),_(g.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(k(P.pick(T[0]-1,-1).lo(1).hi(T[1]-2),g.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(g.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(k(P.pick(-1,0).lo(1).hi(T[0]-2),g.pick(-1,0,0).lo(1).hi(T[0]-2)),_(g.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(k(P.pick(-1,T[1]-1).lo(1).hi(T[0]-2),g.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(g.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(T[0]-1,0,0,0),g.set(T[0]-1,0,1,0),g.set(0,T[1]-1,0,0),g.set(0,T[1]-1,1,0),g.set(T[0]-1,T[1]-1,0,0),g.set(T[0]-1,T[1]-1,1,0),g}}function A(L){var _=L.join(),T=v[_];if(T)return T;for(var k=L.length,M=[b,p],g=1;g<=k;++g)M.push(C(g));var P=E,T=P.apply(void 0,M);return v[_]=T,T}i.exports=function(_,k,M){if(Array.isArray(M)||(typeof M==\"string\"?M=s(k.dimension,M):M=s(k.dimension,\"clamp\")),k.size===0)return _;if(k.dimension===0)return _.set(0),_;var g=A(M);return g(_,k)}},4317:function(i){\"use strict\";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h<c.shape[0],x=0<=h+1&&h+1<c.shape[0],b=v?+c.get(h):0,p=x?+c.get(h+1):0;return(1-d)*b+d*p}function o(c,f,h){var d=Math.floor(f),v=f-d,x=0<=d&&d<c.shape[0],b=0<=d+1&&d+1<c.shape[0],p=Math.floor(h),C=h-p,E=0<=p&&p<c.shape[1],A=0<=p+1&&p+1<c.shape[1],L=x&&E?c.get(d,p):0,_=x&&A?c.get(d,p+1):0,k=b&&E?c.get(d+1,p):0,M=b&&A?c.get(d+1,p+1):0;return(1-C)*((1-v)*L+v*k)+C*((1-v)*_+v*M)}function s(c,f,h,d){var v=Math.floor(f),x=f-v,b=0<=v&&v<c.shape[0],p=0<=v+1&&v+1<c.shape[0],C=Math.floor(h),E=h-C,A=0<=C&&C<c.shape[1],L=0<=C+1&&C+1<c.shape[1],_=Math.floor(d),k=d-_,M=0<=_&&_<c.shape[2],g=0<=_+1&&_+1<c.shape[2],P=b&&A&&M?c.get(v,C,_):0,T=b&&L&&M?c.get(v,C+1,_):0,z=p&&A&&M?c.get(v+1,C,_):0,O=p&&L&&M?c.get(v+1,C+1,_):0,V=b&&A&&g?c.get(v,C,_+1):0,G=b&&L&&g?c.get(v,C+1,_+1):0,Z=p&&A&&g?c.get(v+1,C,_+1):0,H=p&&L&&g?c.get(v+1,C+1,_+1):0;return(1-k)*((1-E)*((1-x)*P+x*z)+E*((1-x)*T+x*O))+k*((1-E)*((1-x)*V+x*Z)+E*((1-x)*G+x*H))}function l(c){var f=c.shape.length|0,h=new Array(f),d=new Array(f),v=new Array(f),x=new Array(f),b,p;for(b=0;b<f;++b)p=+arguments[b+1],h[b]=Math.floor(p),d[b]=p-h[b],v[b]=0<=h[b]&&h[b]<c.shape[b],x[b]=0<=h[b]+1&&h[b]+1<c.shape[b];var C=0,E,A,L;e:for(b=0;b<1<<f;++b){for(A=1,L=c.offset,E=0;E<f;++E)if(b&1<<E){if(!x[E])continue e;A*=d[E],L+=c.stride[E]*(h[E]+1)}else{if(!v[E])continue e;A*=1-d[E],L+=c.stride[E]*h[E]}C+=A*c.data[L]}return C}function u(c,f,h,d){switch(c.shape.length){case 0:return 0;case 1:return a(c,f);case 2:return o(c,f,h);case 3:return s(c,f,h,d);default:return l.apply(void 0,arguments)}}i.exports=u,i.exports.d1=a,i.exports.d2=o,i.exports.d3=s},5298:function(i,a){\"use strict\";var o={\"float64,2,1,0\":function(){return function(v,x,b,p,C){var E=v[0],A=v[1],L=v[2],_=b[0],k=b[1],M=b[2];p|=0;var g=0,P=0,T=0,z=M,O=k-L*M,V=_-A*k;for(T=0;T<E;++T){for(P=0;P<A;++P){for(g=0;g<L;++g)x[p]/=C,p+=z;p+=O}p+=V}}},\"uint8,2,0,1,float64,2,1,0\":function(){return function(v,x,b,p,C,E,A,L){var _=v[0],k=v[1],M=v[2],g=b[0],P=b[1],T=b[2],z=E[0],O=E[1],V=E[2];p|=0,A|=0;for(var G=p,Z=A,H=v[0]|0;H>0;){H<64?(_=H,H=0):(_=64,H-=64);for(var N=v[1]|0;N>0;){N<64?(k=N,N=0):(k=64,N-=64),p=G+H*g+N*P,A=Z+H*z+N*O;var j=0,re=0,oe=0,_e=T,Me=g-M*T,ke=P-_*g,me=V,ie=z-M*V,Se=O-_*z;for(oe=0;oe<k;++oe){for(re=0;re<_;++re){for(j=0;j<M;++j)x[p]=C[A]*L,p+=_e,A+=me;p+=Me,A+=ie}p+=ke,A+=Se}}}}},\"float32,1,0,float32,1,0\":function(){return function(v,x,b,p,C,E,A){var L=v[0],_=v[1],k=b[0],M=b[1],g=E[0],P=E[1];p|=0,A|=0;var T=0,z=0,O=M,V=k-_*M,G=P,Z=g-_*P;for(z=0;z<L;++z){for(T=0;T<_;++T)x[p]=C[A],p+=O,A+=G;p+=V,A+=Z}}},\"float32,1,0,float32,0,1\":function(){return function(v,x,b,p,C,E,A){var L=v[0],_=v[1],k=b[0],M=b[1],g=E[0],P=E[1];p|=0,A|=0;for(var T=p,z=A,O=v[1]|0;O>0;){O<64?(_=O,O=0):(_=64,O-=64);for(var V=v[0]|0;V>0;){V<64?(L=V,V=0):(L=64,V-=64),p=T+O*M+V*k,A=z+O*P+V*g;var G=0,Z=0,H=M,N=k-_*M,j=P,re=g-_*P;for(Z=0;Z<L;++Z){for(G=0;G<_;++G)x[p]=C[A],p+=H,A+=j;p+=N,A+=re}}}}},\"uint8,2,0,1,uint8,1,2,0\":function(){return function(v,x,b,p,C,E,A){var L=v[0],_=v[1],k=v[2],M=b[0],g=b[1],P=b[2],T=E[0],z=E[1],O=E[2];p|=0,A|=0;for(var V=p,G=A,Z=v[2]|0;Z>0;){Z<64?(k=Z,Z=0):(k=64,Z-=64);for(var H=v[0]|0;H>0;){H<64?(L=H,H=0):(L=64,H-=64);for(var N=v[1]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),p=V+Z*P+H*M+N*g,A=G+Z*O+H*T+N*z;var j=0,re=0,oe=0,_e=P,Me=M-k*P,ke=g-L*M,me=O,ie=T-k*O,Se=z-L*T;for(oe=0;oe<_;++oe){for(re=0;re<L;++re){for(j=0;j<k;++j)x[p]=C[A],p+=_e,A+=me;p+=Me,A+=ie}p+=ke,A+=Se}}}}}},\"uint8,2,0,1,array,2,0,1\":function(){return function(v,x,b,p,C,E,A){var L=v[0],_=v[1],k=v[2],M=b[0],g=b[1],P=b[2],T=E[0],z=E[1],O=E[2];p|=0,A|=0;var V=0,G=0,Z=0,H=P,N=M-k*P,j=g-L*M,re=O,oe=T-k*O,_e=z-L*T;for(Z=0;Z<_;++Z){for(G=0;G<L;++G){for(V=0;V<k;++V)x[p]=C[A],p+=H,A+=re;p+=N,A+=oe}p+=j,A+=_e}}}};function s(d,v){var x=v.join(\",\"),b=o[x];return b()}var l=s,u={mul:function(d){var v={};return function(b,p,C){var E=b.dtype,A=b.order,L=p.dtype,_=p.order,k=C.dtype,M=C.order,g=[E,A.join(),L,_.join(),k,M.join()].join(),P=v[g];return P||(v[g]=P=d([E,A,L,_,k,M])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,C.data,C.stride,C.offset|0)}},muls:function(d){var v={};return function(b,p,C){var E=b.dtype,A=b.order,L=p.dtype,_=p.order,k=[E,A.join(),L,_.join()].join(),M=v[k];return M||(v[k]=M=d([E,A,L,_])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,C)}},mulseq:function(d){var v={};return function(b,p){var C=b.dtype,E=b.order,A=[C,E.join()].join(),L=v[A];return L||(v[A]=L=d([C,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},div:function(d){var v={};return function(b,p,C){var E=b.dtype,A=b.order,L=p.dtype,_=p.order,k=C.dtype,M=C.order,g=[E,A.join(),L,_.join(),k,M.join()].join(),P=v[g];return P||(v[g]=P=d([E,A,L,_,k,M])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,C.data,C.stride,C.offset|0)}},divs:function(d){var v={};return function(b,p,C){var E=b.dtype,A=b.order,L=p.dtype,_=p.order,k=[E,A.join(),L,_.join()].join(),M=v[k];return M||(v[k]=M=d([E,A,L,_])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,C)}},divseq:function(d){var v={};return function(b,p){var C=b.dtype,E=b.order,A=[C,E.join()].join(),L=v[A];return L||(v[A]=L=d([C,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},assign:function(d){var v={};return function(b,p){var C=b.dtype,E=b.order,A=p.dtype,L=p.order,_=[C,E.join(),A,L.join()].join(),k=v[_];return k||(v[_]=k=d([C,E,A,L])),k(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0)}}};function c(d){var v=u[d.funcName];return v(l.bind(void 0,d))}function f(d){return c({funcName:d.funcName})}var h={mul:\"*\",div:\"/\"};(function(){for(var d in h)a[d]=f({funcName:d}),a[d+\"s\"]=f({funcName:d+\"s\"}),a[d+\"seq\"]=f({funcName:d+\"seq\"})})(),a.assign=f({funcName:\"assign\"})},9994:function(i,a,o){\"use strict\";var s=o(9618),l=o(8277);i.exports=function(c,f){for(var h=[],d=c,v=1;Array.isArray(d);)h.push(d.length),v*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(v),h)),l(f,c),f)}},8277:function(i){\"use strict\";function a(){return function(f,h,d,v,x){var b=f[0],p=f[1],C=f[2],E=d[0],A=d[1],L=d[2],_=[0,0,0];v|=0;var k=0,M=0,g=0,P=L,T=A-C*L,z=E-p*A;for(g=0;g<b;++g){for(M=0;M<p;++M){for(k=0;k<C;++k){{var O=x,V;for(V=0;V<_.length-1;++V)O=O[_[V]];h[v]=O[_[_.length-1]]}v+=P,++_[2]}v+=T,_[2]-=C,++_[1]}v+=z,_[1]-=p,++_[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,x){var b=v.dtype,p=v.order,C=[b,p.join()].join(),E=h[C];return E||(h[C]=E=f([b,p])),E(v.shape.slice(0),v.data,v.stride,v.offset|0,x)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:\"convert\"})},7640:function(i,a,o){\"use strict\";var s=o(1888);function l(x){switch(x){case\"uint32\":return[s.mallocUint32,s.freeUint32];default:return null}}var u={\"uint32,1,0\":function(x,b){return function(C,E,A,L,_,k,M,g,P,T,z){var O,V,G,Z=C*_+L,H,N=x(g),j,re,oe,_e;for(O=C+1;O<=E;++O){for(V=O,Z+=_,G=Z,j=0,re=Z,H=0;H<g;++H)N[j++]=A[re],re+=P;e:for(;V-- >C;){j=0,re=G-_;t:for(H=0;H<g;++H){if(oe=A[re],_e=N[j],oe<_e)break e;if(oe>_e)break t;re+=T,j+=z}for(j=G,re=G-_,H=0;H<g;++H)A[j]=A[re],j+=P,re+=P;G-=_}for(j=G,re=0,H=0;H<g;++H)A[j]=N[re++],j+=P}b(N)}}};function c(x,b){var p=l(b),C=[b,x].join(\",\"),E=u[C];return p?E(p[0],p[1]):E()}var f={\"uint32,1,0\":function(x,b,p){return function C(E,A,L,_,k,M,g,P,T,z,O){var V=(A-E+1)/6|0,G=E+V,Z=A-V,H=E+A>>1,N=H-V,j=H+V,re=G,oe=N,_e=H,Me=j,ke=Z,me=E+1,ie=A-1,Se=!0,Le,Ae,De,Pe,ge,Fe,ce,Ze,ct,pt=0,Wt=0,st=0,lt,Gt,Nt,$t,sr,wr,ur,Qe,Et,er,Ut,Ft,bt,yt,Yt,lr,Tr=P,Rr=b(Tr),ei=b(Tr);Gt=k*re,Nt=k*oe,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=re,re=oe,oe=Ae;break e}if(st<0)break e;lr+=z}Gt=k*Me,Nt=k*ke,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=Me,Me=ke,ke=Ae;break e}if(st<0)break e;lr+=z}Gt=k*re,Nt=k*_e,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=re,re=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=k*oe,Nt=k*_e,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=oe,oe=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=k*re,Nt=k*Me,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=re,re=Me,Me=Ae;break e}if(st<0)break e;lr+=z}Gt=k*_e,Nt=k*Me,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=_e,_e=Me,Me=Ae;break e}if(st<0)break e;lr+=z}Gt=k*oe,Nt=k*ke,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=oe,oe=ke,ke=Ae;break e}if(st<0)break e;lr+=z}Gt=k*oe,Nt=k*_e,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=oe,oe=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=k*Me,Nt=k*ke,lr=_;e:for(lt=0;lt<P;++lt){if(ce=Gt+lr,Ze=Nt+lr,st=L[ce]-L[Ze],st>0){Ae=Me,Me=ke,ke=Ae;break e}if(st<0)break e;lr+=z}for(Gt=k*re,Nt=k*oe,$t=k*_e,sr=k*Me,wr=k*ke,ur=k*G,Qe=k*H,Et=k*Z,Yt=0,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,ct=$t+lr,er=sr+lr,Ut=wr+lr,Ft=ur+lr,bt=Qe+lr,yt=Et+lr,Rr[Yt]=L[Ze],ei[Yt]=L[er],Se=Se&&Rr[Yt]===ei[Yt],De=L[ce],Pe=L[ct],ge=L[Ut],L[Ft]=De,L[bt]=Pe,L[yt]=ge,++Yt,lr+=T;for(Gt=k*N,Nt=k*E,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,L[ce]=L[Ze],lr+=T;for(Gt=k*j,Nt=k*A,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,L[ce]=L[Ze],lr+=T;if(Se)for(Fe=me;Fe<=ie;++Fe){ce=_+Fe*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-Rr[Yt],st!==0)break e;Yt+=O,ce+=z}if(st!==0)if(st<0){if(Fe!==me)for(Gt=k*Fe,Nt=k*me,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;++me}else for(;;){ce=_+ie*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-Rr[Yt],st!==0)break e;Yt+=O,ce+=z}if(st>0)ie--;else if(st<0){for(Gt=k*Fe,Nt=k*me,$t=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,ct=$t+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=L[ct],L[ct]=Le,lr+=T;++me,--ie;break}else{for(Gt=k*Fe,Nt=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;--ie;break}}}else for(Fe=me;Fe<=ie;++Fe){ce=_+Fe*k,Yt=0;e:for(lt=0;lt<P;++lt){if(pt=L[ce]-Rr[Yt],pt!==0)break e;Yt+=O,ce+=z}if(pt<0){if(Fe!==me)for(Gt=k*Fe,Nt=k*me,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;++me}else{ce=_+Fe*k,Yt=0;e:for(lt=0;lt<P;++lt){if(Wt=L[ce]-ei[Yt],Wt!==0)break e;Yt+=O,ce+=z}if(Wt>0)for(;;){ce=_+ie*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-ei[Yt],st!==0)break e;Yt+=O,ce+=z}if(st>0){if(--ie<Fe)break;continue}else{ce=_+ie*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-Rr[Yt],st!==0)break e;Yt+=O,ce+=z}if(st<0){for(Gt=k*Fe,Nt=k*me,$t=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,ct=$t+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=L[ct],L[ct]=Le,lr+=T;++me,--ie}else{for(Gt=k*Fe,Nt=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;--ie}break}}}}for(Gt=k*E,Nt=k*(me-1),Yt=0,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,L[ce]=L[Ze],L[Ze]=Rr[Yt],++Yt,lr+=T;for(Gt=k*A,Nt=k*(ie+1),Yt=0,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,L[ce]=L[Ze],L[Ze]=ei[Yt],++Yt,lr+=T;if(me-2-E<=32?x(E,me-2,L,_,k,M,g,P,T,z,O):C(E,me-2,L,_,k,M,g,P,T,z,O),A-(ie+2)<=32?x(ie+2,A,L,_,k,M,g,P,T,z,O):C(ie+2,A,L,_,k,M,g,P,T,z,O),Se){p(Rr),p(ei);return}if(me<G&&ie>Z){e:for(;;){for(ce=_+me*k,Yt=0,lr=_,lt=0;lt<P;++lt){if(L[ce]!==Rr[Yt])break e;++Yt,ce+=T}++me}e:for(;;){for(ce=_+ie*k,Yt=0,lr=_,lt=0;lt<P;++lt){if(L[ce]!==ei[Yt])break e;++Yt,ce+=T}--ie}for(Fe=me;Fe<=ie;++Fe){ce=_+Fe*k,Yt=0;e:for(lt=0;lt<P;++lt){if(pt=L[ce]-Rr[Yt],pt!==0)break e;Yt+=O,ce+=z}if(pt===0){if(Fe!==me)for(Gt=k*Fe,Nt=k*me,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;++me}else{ce=_+Fe*k,Yt=0;e:for(lt=0;lt<P;++lt){if(Wt=L[ce]-ei[Yt],Wt!==0)break e;Yt+=O,ce+=z}if(Wt===0)for(;;){ce=_+ie*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-ei[Yt],st!==0)break e;Yt+=O,ce+=z}if(st===0){if(--ie<Fe)break;continue}else{ce=_+ie*k,Yt=0;e:for(lt=0;lt<P;++lt){if(st=L[ce]-Rr[Yt],st!==0)break e;Yt+=O,ce+=z}if(st<0){for(Gt=k*Fe,Nt=k*me,$t=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,ct=$t+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=L[ct],L[ct]=Le,lr+=T;++me,--ie}else{for(Gt=k*Fe,Nt=k*ie,lr=_,lt=0;lt<P;++lt)ce=Gt+lr,Ze=Nt+lr,Le=L[ce],L[ce]=L[Ze],L[Ze]=Le,lr+=T;--ie}break}}}}}p(Rr),p(ei),ie-me<=32?x(me,ie,L,_,k,M,g,P,T,z,O):C(me,ie,L,_,k,M,g,P,T,z,O)}}};function h(x,b,p){var C=l(b),E=[b,x].join(\",\"),A=f[E];return x.length>1&&C?A(p,C[0],C[1]):A(p)}var d={\"uint32,1,0\":function(x,b){return function(p){var C=p.data,E=p.offset|0,A=p.shape,L=p.stride,_=L[0]|0,k=A[0]|0,M=L[1]|0,g=A[1]|0,P=M,T=M,z=1;k<=32?x(0,k-1,C,E,_,M,k,g,P,T,z):b(0,k-1,C,E,_,M,k,g,P,T,z)}}};function v(x,b){var p=[b,x].join(\",\"),C=d[p],E=c(x,b),A=h(x,b,E);return C(E,A)}i.exports=v},446:function(i,a,o){\"use strict\";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(\":\"),x=l[v];return x||(l[v]=x=s(f,h)),x(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!=\"undefined\";function u(b,p){return b[0]-p[0]}function c(){var b=this.stride,p=new Array(b.length),C;for(C=0;C<p.length;++C)p[C]=[Math.abs(b[C]),C];p.sort(u);var E=new Array(p.length);for(C=0;C<E.length;++C)E[C]=p[C][1];return E}var f={T:function(b){function p(E){this.data=E}var C=p.prototype;return C.dtype=b,C.index=function(){return-1},C.size=0,C.dimension=-1,C.shape=C.stride=C.order=[],C.lo=C.hi=C.transpose=C.step=function(){return new p(this.data)},C.get=C.set=function(){},C.pick=function(){return null},function(A){return new p(A)}},0:function(b,p){function C(A,L){this.data=A,this.offset=L}var E=C.prototype;return E.dtype=b,E.index=function(){return this.offset},E.dimension=0,E.size=1,E.shape=E.stride=E.order=[],E.lo=E.hi=E.transpose=E.step=function(){return new C(this.data,this.offset)},E.pick=function(){return p(this.data)},E.valueOf=E.get=function(){return b===\"generic\"?this.data.get(this.offset):this.data[this.offset]},E.set=function(L){return b===\"generic\"?this.data.set(this.offset,L):this.data[this.offset]=L},function(L,_,k,M){return new C(L,M)}},1:function(b,p,C){function E(L,_,k,M){this.data=L,this.shape=[_],this.stride=[k],this.offset=M|0}var A=E.prototype;return A.dtype=b,A.dimension=1,Object.defineProperty(A,\"size\",{get:function(){return this.shape[0]}}),A.order=[0],A.set=function(_,k){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*_,k):this.data[this.offset+this.stride[0]*_]=k},A.get=function(_){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*_):this.data[this.offset+this.stride[0]*_]},A.index=function(_){return this.offset+this.stride[0]*_},A.hi=function(_){return new E(this.data,typeof _!=\"number\"||_<0?this.shape[0]:_|0,this.stride[0],this.offset)},A.lo=function(_){var k=this.offset,M=0,g=this.shape[0],P=this.stride[0];return typeof _==\"number\"&&_>=0&&(M=_|0,k+=P*M,g-=M),new E(this.data,g,P,k)},A.step=function(_){var k=this.shape[0],M=this.stride[0],g=this.offset,P=0,T=Math.ceil;return typeof _==\"number\"&&(P=_|0,P<0?(g+=M*(k-1),k=T(-k/P)):k=T(k/P),M*=P),new E(this.data,k,M,g)},A.transpose=function(_){_=_===void 0?0:_|0;var k=this.shape,M=this.stride;return new E(this.data,k[_],M[_],this.offset)},A.pick=function(_){var k=[],M=[],g=this.offset;typeof _==\"number\"&&_>=0?g=g+this.stride[0]*_|0:(k.push(this.shape[0]),M.push(this.stride[0]));var P=p[k.length+1];return P(this.data,k,M,g)},function(_,k,M,g){return new E(_,k[0],M[0],g)}},2:function(b,p,C){function E(L,_,k,M,g,P){this.data=L,this.shape=[_,k],this.stride=[M,g],this.offset=P|0}var A=E.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,\"size\",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,\"order\",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(_,k,M){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*k,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*k]=M},A.get=function(_,k){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*k):this.data[this.offset+this.stride[0]*_+this.stride[1]*k]},A.index=function(_,k){return this.offset+this.stride[0]*_+this.stride[1]*k},A.hi=function(_,k){return new E(this.data,typeof _!=\"number\"||_<0?this.shape[0]:_|0,typeof k!=\"number\"||k<0?this.shape[1]:k|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(_,k){var M=this.offset,g=0,P=this.shape[0],T=this.shape[1],z=this.stride[0],O=this.stride[1];return typeof _==\"number\"&&_>=0&&(g=_|0,M+=z*g,P-=g),typeof k==\"number\"&&k>=0&&(g=k|0,M+=O*g,T-=g),new E(this.data,P,T,z,O,M)},A.step=function(_,k){var M=this.shape[0],g=this.shape[1],P=this.stride[0],T=this.stride[1],z=this.offset,O=0,V=Math.ceil;return typeof _==\"number\"&&(O=_|0,O<0?(z+=P*(M-1),M=V(-M/O)):M=V(M/O),P*=O),typeof k==\"number\"&&(O=k|0,O<0?(z+=T*(g-1),g=V(-g/O)):g=V(g/O),T*=O),new E(this.data,M,g,P,T,z)},A.transpose=function(_,k){_=_===void 0?0:_|0,k=k===void 0?1:k|0;var M=this.shape,g=this.stride;return new E(this.data,M[_],M[k],g[_],g[k],this.offset)},A.pick=function(_,k){var M=[],g=[],P=this.offset;typeof _==\"number\"&&_>=0?P=P+this.stride[0]*_|0:(M.push(this.shape[0]),g.push(this.stride[0])),typeof k==\"number\"&&k>=0?P=P+this.stride[1]*k|0:(M.push(this.shape[1]),g.push(this.stride[1]));var T=p[M.length+1];return T(this.data,M,g,P)},function(_,k,M,g){return new E(_,k[0],k[1],M[0],M[1],g)}},3:function(b,p,C){function E(L,_,k,M,g,P,T,z){this.data=L,this.shape=[_,k,M],this.stride=[g,P,T],this.offset=z|0}var A=E.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,\"order\",{get:function(){var _=Math.abs(this.stride[0]),k=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>k?k>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>k?[0,1,2]:[0,2,1]}}),A.set=function(_,k,M,g){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M,g):this.data[this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M]=g},A.get=function(_,k,M){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M]},A.index=function(_,k,M){return this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M},A.hi=function(_,k,M){return new E(this.data,typeof _!=\"number\"||_<0?this.shape[0]:_|0,typeof k!=\"number\"||k<0?this.shape[1]:k|0,typeof M!=\"number\"||M<0?this.shape[2]:M|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(_,k,M){var g=this.offset,P=0,T=this.shape[0],z=this.shape[1],O=this.shape[2],V=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof _==\"number\"&&_>=0&&(P=_|0,g+=V*P,T-=P),typeof k==\"number\"&&k>=0&&(P=k|0,g+=G*P,z-=P),typeof M==\"number\"&&M>=0&&(P=M|0,g+=Z*P,O-=P),new E(this.data,T,z,O,V,G,Z,g)},A.step=function(_,k,M){var g=this.shape[0],P=this.shape[1],T=this.shape[2],z=this.stride[0],O=this.stride[1],V=this.stride[2],G=this.offset,Z=0,H=Math.ceil;return typeof _==\"number\"&&(Z=_|0,Z<0?(G+=z*(g-1),g=H(-g/Z)):g=H(g/Z),z*=Z),typeof k==\"number\"&&(Z=k|0,Z<0?(G+=O*(P-1),P=H(-P/Z)):P=H(P/Z),O*=Z),typeof M==\"number\"&&(Z=M|0,Z<0?(G+=V*(T-1),T=H(-T/Z)):T=H(T/Z),V*=Z),new E(this.data,g,P,T,z,O,V,G)},A.transpose=function(_,k,M){_=_===void 0?0:_|0,k=k===void 0?1:k|0,M=M===void 0?2:M|0;var g=this.shape,P=this.stride;return new E(this.data,g[_],g[k],g[M],P[_],P[k],P[M],this.offset)},A.pick=function(_,k,M){var g=[],P=[],T=this.offset;typeof _==\"number\"&&_>=0?T=T+this.stride[0]*_|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof k==\"number\"&&k>=0?T=T+this.stride[1]*k|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof M==\"number\"&&M>=0?T=T+this.stride[2]*M|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,T)},function(_,k,M,g){return new E(_,k[0],k[1],k[2],M[0],M[1],M[2],g)}},4:function(b,p,C){function E(L,_,k,M,g,P,T,z,O,V){this.data=L,this.shape=[_,k,M,g],this.stride=[P,T,z,O],this.offset=V|0}var A=E.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,\"order\",{get:C}),A.set=function(_,k,M,g,P){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M+this.stride[3]*g]=P},A.get=function(_,k,M,g){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M+this.stride[3]*g):this.data[this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M+this.stride[3]*g]},A.index=function(_,k,M,g){return this.offset+this.stride[0]*_+this.stride[1]*k+this.stride[2]*M+this.stride[3]*g},A.hi=function(_,k,M,g){return new E(this.data,typeof _!=\"number\"||_<0?this.shape[0]:_|0,typeof k!=\"number\"||k<0?this.shape[1]:k|0,typeof M!=\"number\"||M<0?this.shape[2]:M|0,typeof g!=\"number\"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(_,k,M,g){var P=this.offset,T=0,z=this.shape[0],O=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.stride[0],H=this.stride[1],N=this.stride[2],j=this.stride[3];return typeof _==\"number\"&&_>=0&&(T=_|0,P+=Z*T,z-=T),typeof k==\"number\"&&k>=0&&(T=k|0,P+=H*T,O-=T),typeof M==\"number\"&&M>=0&&(T=M|0,P+=N*T,V-=T),typeof g==\"number\"&&g>=0&&(T=g|0,P+=j*T,G-=T),new E(this.data,z,O,V,G,Z,H,N,j,P)},A.step=function(_,k,M,g){var P=this.shape[0],T=this.shape[1],z=this.shape[2],O=this.shape[3],V=this.stride[0],G=this.stride[1],Z=this.stride[2],H=this.stride[3],N=this.offset,j=0,re=Math.ceil;return typeof _==\"number\"&&(j=_|0,j<0?(N+=V*(P-1),P=re(-P/j)):P=re(P/j),V*=j),typeof k==\"number\"&&(j=k|0,j<0?(N+=G*(T-1),T=re(-T/j)):T=re(T/j),G*=j),typeof M==\"number\"&&(j=M|0,j<0?(N+=Z*(z-1),z=re(-z/j)):z=re(z/j),Z*=j),typeof g==\"number\"&&(j=g|0,j<0?(N+=H*(O-1),O=re(-O/j)):O=re(O/j),H*=j),new E(this.data,P,T,z,O,V,G,Z,H,N)},A.transpose=function(_,k,M,g){_=_===void 0?0:_|0,k=k===void 0?1:k|0,M=M===void 0?2:M|0,g=g===void 0?3:g|0;var P=this.shape,T=this.stride;return new E(this.data,P[_],P[k],P[M],P[g],T[_],T[k],T[M],T[g],this.offset)},A.pick=function(_,k,M,g){var P=[],T=[],z=this.offset;typeof _==\"number\"&&_>=0?z=z+this.stride[0]*_|0:(P.push(this.shape[0]),T.push(this.stride[0])),typeof k==\"number\"&&k>=0?z=z+this.stride[1]*k|0:(P.push(this.shape[1]),T.push(this.stride[1])),typeof M==\"number\"&&M>=0?z=z+this.stride[2]*M|0:(P.push(this.shape[2]),T.push(this.stride[2])),typeof g==\"number\"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),T.push(this.stride[3]));var O=p[P.length+1];return O(this.data,P,T,z)},function(_,k,M,g){return new E(_,k[0],k[1],k[2],k[3],M[0],M[1],M[2],M[3],g)}},5:function(p,C,E){function A(_,k,M,g,P,T,z,O,V,G,Z,H){this.data=_,this.shape=[k,M,g,P,T],this.stride=[z,O,V,G,Z],this.offset=H|0}var L=A.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,\"order\",{get:E}),L.set=function(k,M,g,P,T,z){return p===\"generic\"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T,z):this.data[this.offset+this.stride[0]*k+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T]=z},L.get=function(k,M,g,P,T){return p===\"generic\"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T):this.data[this.offset+this.stride[0]*k+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T]},L.index=function(k,M,g,P,T){return this.offset+this.stride[0]*k+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T},L.hi=function(k,M,g,P,T){return new A(this.data,typeof k!=\"number\"||k<0?this.shape[0]:k|0,typeof M!=\"number\"||M<0?this.shape[1]:M|0,typeof g!=\"number\"||g<0?this.shape[2]:g|0,typeof P!=\"number\"||P<0?this.shape[3]:P|0,typeof T!=\"number\"||T<0?this.shape[4]:T|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(k,M,g,P,T){var z=this.offset,O=0,V=this.shape[0],G=this.shape[1],Z=this.shape[2],H=this.shape[3],N=this.shape[4],j=this.stride[0],re=this.stride[1],oe=this.stride[2],_e=this.stride[3],Me=this.stride[4];return typeof k==\"number\"&&k>=0&&(O=k|0,z+=j*O,V-=O),typeof M==\"number\"&&M>=0&&(O=M|0,z+=re*O,G-=O),typeof g==\"number\"&&g>=0&&(O=g|0,z+=oe*O,Z-=O),typeof P==\"number\"&&P>=0&&(O=P|0,z+=_e*O,H-=O),typeof T==\"number\"&&T>=0&&(O=T|0,z+=Me*O,N-=O),new A(this.data,V,G,Z,H,N,j,re,oe,_e,Me,z)},L.step=function(k,M,g,P,T){var z=this.shape[0],O=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.shape[4],H=this.stride[0],N=this.stride[1],j=this.stride[2],re=this.stride[3],oe=this.stride[4],_e=this.offset,Me=0,ke=Math.ceil;return typeof k==\"number\"&&(Me=k|0,Me<0?(_e+=H*(z-1),z=ke(-z/Me)):z=ke(z/Me),H*=Me),typeof M==\"number\"&&(Me=M|0,Me<0?(_e+=N*(O-1),O=ke(-O/Me)):O=ke(O/Me),N*=Me),typeof g==\"number\"&&(Me=g|0,Me<0?(_e+=j*(V-1),V=ke(-V/Me)):V=ke(V/Me),j*=Me),typeof P==\"number\"&&(Me=P|0,Me<0?(_e+=re*(G-1),G=ke(-G/Me)):G=ke(G/Me),re*=Me),typeof T==\"number\"&&(Me=T|0,Me<0?(_e+=oe*(Z-1),Z=ke(-Z/Me)):Z=ke(Z/Me),oe*=Me),new A(this.data,z,O,V,G,Z,H,N,j,re,oe,_e)},L.transpose=function(k,M,g,P,T){k=k===void 0?0:k|0,M=M===void 0?1:M|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,T=T===void 0?4:T|0;var z=this.shape,O=this.stride;return new A(this.data,z[k],z[M],z[g],z[P],z[T],O[k],O[M],O[g],O[P],O[T],this.offset)},L.pick=function(k,M,g,P,T){var z=[],O=[],V=this.offset;typeof k==\"number\"&&k>=0?V=V+this.stride[0]*k|0:(z.push(this.shape[0]),O.push(this.stride[0])),typeof M==\"number\"&&M>=0?V=V+this.stride[1]*M|0:(z.push(this.shape[1]),O.push(this.stride[1])),typeof g==\"number\"&&g>=0?V=V+this.stride[2]*g|0:(z.push(this.shape[2]),O.push(this.stride[2])),typeof P==\"number\"&&P>=0?V=V+this.stride[3]*P|0:(z.push(this.shape[3]),O.push(this.stride[3])),typeof T==\"number\"&&T>=0?V=V+this.stride[4]*T|0:(z.push(this.shape[4]),O.push(this.stride[4]));var G=C[z.length+1];return G(this.data,z,O,V)},function(k,M,g,P){return new A(k,M[0],M[1],M[2],M[3],M[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var C=p===-1?\"T\":String(p),E=f[C];return p===-1?E(b):p===0?E(b,v[b][0]):E(b,v[b],c)}function d(b){if(s(b))return\"buffer\";if(l)switch(Object.prototype.toString.call(b)){case\"[object Float64Array]\":return\"float64\";case\"[object Float32Array]\":return\"float32\";case\"[object Int8Array]\":return\"int8\";case\"[object Int16Array]\":return\"int16\";case\"[object Int32Array]\":return\"int32\";case\"[object Uint8ClampedArray]\":return\"uint8_clamped\";case\"[object Uint8Array]\":return\"uint8\";case\"[object Uint16Array]\":return\"uint16\";case\"[object Uint32Array]\":return\"uint32\";case\"[object BigInt64Array]\":return\"bigint64\";case\"[object BigUint64Array]\":return\"biguint64\"}return Array.isArray(b)?\"array\":\"generic\"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(b,p,C,E){if(b===void 0){var g=v.array[0];return g([])}else typeof b==\"number\"&&(b=[b]);p===void 0&&(p=[b.length]);var A=p.length;if(C===void 0){C=new Array(A);for(var L=A-1,_=1;L>=0;--L)C[L]=_,_*=p[L]}if(E===void 0){E=0;for(var L=0;L<A;++L)C[L]<0&&(E-=(p[L]-1)*C[L])}for(var k=d(b),M=v[k];M.length<=A+1;)M.push(h(k,M.length-1));var g=M[A+1];return g(b,p,C,E)}i.exports=x},1278:function(i,a,o){\"use strict\";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;v<f;++v)h[v]=[0,0,0];for(var v=0;v<l.length;++v)for(var x=l[v],b=0,p=x[x.length-1],C=x[0],E=0;E<x.length;++E){b=p,p=C,C=x[(E+1)%x.length];for(var A=u[b],L=u[p],_=u[C],k=new Array(3),M=0,g=new Array(3),P=0,T=0;T<3;++T)k[T]=A[T]-L[T],M+=k[T]*k[T],g[T]=_[T]-L[T],P+=g[T]*g[T];if(M*P>d)for(var z=h[p],O=1/Math.sqrt(M*P),T=0;T<3;++T){var V=(T+1)%3,G=(T+2)%3;z[T]+=O*(g[V]*k[G]-g[G]*k[V])}}for(var v=0;v<f;++v){for(var z=h[v],Z=0,T=0;T<3;++T)Z+=z[T]*z[T];if(Z>d)for(var O=1/Math.sqrt(Z),T=0;T<3;++T)z[T]*=O;else for(var T=0;T<3;++T)z[T]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;v<f;++v){for(var x=l[v],b=new Array(3),p=0;p<3;++p)b[p]=u[x[p]];for(var C=new Array(3),E=new Array(3),p=0;p<3;++p)C[p]=b[1][p]-b[0][p],E[p]=b[2][p]-b[0][p];for(var A=new Array(3),L=0,p=0;p<3;++p){var _=(p+1)%3,k=(p+2)%3;A[p]=C[_]*E[k]-C[k]*E[_],L+=A[p]*A[p]}L>d?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)A[p]*=L;h[v]=A}return h}},4081:function(i){\"use strict\";i.exports=a;function a(o,s,l,u,c,f,h,d,v,x){var b=s+f+x;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var C=Math.max(s,f,x),p=Math.sqrt(2*C-b+1);s>=C?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=C?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},9977:function(i,a,o){\"use strict\";i.exports=p;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(C,E,A){return Math.sqrt(Math.pow(C,2)+Math.pow(E,2)+Math.pow(A,2))}function d(C,E,A,L){return Math.sqrt(Math.pow(C,2)+Math.pow(E,2)+Math.pow(A,2)+Math.pow(L,2))}function v(C,E){var A=E[0],L=E[1],_=E[2],k=E[3],M=d(A,L,_,k);M>1e-6?(C[0]=A/M,C[1]=L/M,C[2]=_/M,C[3]=k/M):(C[0]=C[1]=C[2]=0,C[3]=1)}function x(C,E,A){this.radius=s([A]),this.center=s(E),this.rotation=s(C),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var b=x.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var E=this.computedRotation;v(E,E);var A=this.computedMatrix;u(A,E);var L=this.computedCenter,_=this.computedEye,k=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*A[2],_[1]=L[1]+M*A[6],_[2]=L[2]+M*A[10],k[0]=A[1],k[1]=A[5],k[2]=A[9];for(var g=0;g<3;++g){for(var P=0,T=0;T<3;++T)P+=A[g+4*T]*_[T];A[12+g]=-P}},b.getMatrix=function(C,E){this.recalcMatrix(C);var A=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=A[L];return E}return A},b.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},b.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},b.pan=function(C,E,A,L){E=E||0,A=A||0,L=L||0,this.recalcMatrix(C);var _=this.computedMatrix,k=_[1],M=_[5],g=_[9],P=h(k,M,g);k/=P,M/=P,g/=P;var T=_[0],z=_[4],O=_[8],V=T*k+z*M+O*g;T-=k*V,z-=M*V,O-=g*V;var G=h(T,z,O);T/=G,z/=G,O/=G;var Z=_[2],H=_[6],N=_[10],j=Z*k+H*M+N*g,re=Z*T+H*z+N*O;Z-=j*k+re*T,H-=j*M+re*z,N-=j*g+re*O;var oe=h(Z,H,N);Z/=oe,H/=oe,N/=oe;var _e=T*E+k*A,Me=z*E+M*A,ke=O*E+g*A;this.center.move(C,_e,Me,ke);var me=Math.exp(this.computedRadius[0]);me=Math.max(1e-4,me+L),this.radius.set(C,Math.log(me))},b.rotate=function(C,E,A,L){this.recalcMatrix(C),E=E||0,A=A||0;var _=this.computedMatrix,k=_[0],M=_[4],g=_[8],P=_[1],T=_[5],z=_[9],O=_[2],V=_[6],G=_[10],Z=E*k+A*P,H=E*M+A*T,N=E*g+A*z,j=-(V*N-G*H),re=-(G*Z-O*N),oe=-(O*H-V*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(re,2)-Math.pow(oe,2))),Me=d(j,re,oe,_e);Me>1e-6?(j/=Me,re/=Me,oe/=Me,_e/=Me):(j=re=oe=0,_e=1);var ke=this.computedRotation,me=ke[0],ie=ke[1],Se=ke[2],Le=ke[3],Ae=me*_e+Le*j+ie*oe-Se*re,De=ie*_e+Le*re+Se*j-me*oe,Pe=Se*_e+Le*oe+me*re-ie*j,ge=Le*_e-me*j-ie*re-Se*oe;if(L){j=O,re=V,oe=G;var Fe=Math.sin(L)/h(j,re,oe);j*=Fe,re*=Fe,oe*=Fe,_e=Math.cos(E),Ae=Ae*_e+ge*j+De*oe-Pe*re,De=De*_e+ge*re+Pe*j-Ae*oe,Pe=Pe*_e+ge*oe+Ae*re-De*j,ge=ge*_e-Ae*j-De*re-Pe*oe}var ce=d(Ae,De,Pe,ge);ce>1e-6?(Ae/=ce,De/=ce,Pe/=ce,ge/=ce):(Ae=De=Pe=0,ge=1),this.rotation.set(C,Ae,De,Pe,ge)},b.lookAt=function(C,E,A,L){this.recalcMatrix(C),A=A||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;l(_,E,A,L);var k=this.computedRotation;f(k,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),v(k,k),this.rotation.set(C,k[0],k[1],k[2],k[3]);for(var M=0,g=0;g<3;++g)M+=Math.pow(A[g]-E[g],2);this.radius.set(C,.5*Math.log(Math.max(M,1e-6))),this.center.set(C,A[0],A[1],A[2])},b.translate=function(C,E,A,L){this.center.move(C,E||0,A||0,L||0)},b.setMatrix=function(C,E){var A=this.computedRotation;f(A,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),v(A,A),this.rotation.set(C,A[0],A[1],A[2],A[3]);var L=this.computedMatrix;c(L,E);var _=L[15];if(Math.abs(_)>1e-6){var k=L[12]/_,M=L[13]/_,g=L[14]/_;this.recalcMatrix(C);var P=Math.exp(this.computedRadius[0]);this.center.set(C,k-L[2]*P,M-L[6]*P,g-L[10]*P),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},b.setDistance=function(C,E){E>0&&this.radius.set(C,Math.log(E))},b.setDistanceLimits=function(C,E){C>0?C=Math.log(C):C=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=E},b.getDistanceLimits=function(C){var E=this.radius.bounds;return C?(C[0]=Math.exp(E[0][0]),C[1]=Math.exp(E[1][0]),C):[Math.exp(E[0][0]),Math.exp(E[1][0])]},b.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},b.fromJSON=function(C){var E=this.lastT(),A=C.center;A&&this.center.set(E,A[0],A[1],A[2]);var L=C.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var _=C.distance;_&&_>0&&this.radius.set(E,Math.log(_)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function p(C){C=C||{};var E=C.center||[0,0,0],A=C.rotation||[0,0,0,1],L=C.radius||1;E=[].slice.call(E,0,3),A=[].slice.call(A,0,4),v(A,A);var _=new x(A,E,Math.log(L));return _.setDistanceLimits(C.zoomMin,C.zoomMax),(\"eye\"in C||\"up\"in C)&&_.lookAt(0,C.eye,C.center,C.up),_}},1371:function(i,a,o){\"use strict\";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!=\"undefined\"?f+\"\":\" \",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,\"\"]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",s}},3088:function(i,a,o){\"use strict\";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v<f;++v)d[0][v]=[],d[1][v]=[];for(var v=0;v<h;++v){var x=u[v];d[0][x[0]].push(x),d[1][x[1]].push(x)}for(var b=[],v=0;v<f;++v)d[0][v].length+d[1][v].length===0&&b.push([v]);function p(g,P){var T=d[P][g[P]];T.splice(T.indexOf(g),1)}function C(g,P,T){for(var z,O,V,G=0;G<2;++G)if(d[G][P].length>0){z=d[G][P][0],V=G;break}O=z[V^1];for(var Z=0;Z<2;++Z)for(var H=d[Z][P],N=0;N<H.length;++N){var j=H[N],re=j[Z^1],oe=s(c[g],c[P],c[O],c[re]);oe>0&&(z=j,O=re,V=Z)}return T||z&&p(z,V),O}function E(g,P){var T=d[P][g][0],z=[g];p(T,P);for(var O=T[P^1],V=P;;){for(;O!==g;)z.push(O),O=C(z[z.length-2],O,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,H=z[1],N=C(G,Z,!0);if(s(c[G],c[Z],c[H],c[N])<0)break;z.push(g),O=C(G,Z)}return z}function A(g,P){return P[1]===P[P.length-1]}for(var v=0;v<f;++v)for(var L=0;L<2;++L){for(var _=[];d[L][v].length>0;){var k=d[0][v].length,M=E(v,L);A(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){\"use strict\";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],x=0;x<c.length;++x){var b=f[x].length;d[x]=b,h[x]=!0,b<=1&&v.push(x)}for(;v.length>0;){var p=v.pop();h[p]=!1;for(var C=f[p],x=0;x<C.length;++x){var E=C[x];--d[E]===0&&v.push(E)}}for(var A=new Array(c.length),L=[],x=0;x<c.length;++x)if(h[x]){var p=L.length;A[x]=p,L.push(c[x])}else A[x]=-1;for(var _=[],x=0;x<u.length;++x){var k=u[x];h[k[0]]&&h[k[1]]&&_.push([A[k[0]],A[k[1]]])}return[_,L]}},2095:function(i,a,o){\"use strict\";i.exports=b;var s=o(3134),l=o(3088),u=o(5085),c=o(5250),f=o(8210),h=o(1682),d=o(5609);function v(p,C){for(var E=new Array(p),A=0;A<p;++A)E[A]=C;return E}function x(p){for(var C=new Array(p),E=0;E<p;++E)C[E]=[];return C}function b(p,C){var Fe=d(p,C);p=Fe[0],C=Fe[1];for(var E=C.length,A=p.length,L=s(p,C.length),_=0;_<E;++_)if(L[_].length%2===1)throw new Error(\"planar-graph-to-polyline: graph must be manifold\");var k=l(p,C);function M(lt){for(var Gt=lt.length,Nt=[0],$t=0;$t<Gt;++$t){var sr=C[lt[$t]],wr=C[lt[($t+1)%Gt]],ur=c(-sr[0],sr[1]),Qe=c(-sr[0],wr[1]),Et=c(wr[0],sr[1]),er=c(wr[0],wr[1]);Nt=f(Nt,f(f(ur,Qe),f(Et,er)))}return Nt[Nt.length-1]>0}k=k.filter(M);for(var g=k.length,P=new Array(g),T=new Array(g),_=0;_<g;++_){P[_]=_;var z=new Array(g),O=k[_].map(function(Gt){return C[Gt]}),V=u([O]),G=0;e:for(var Z=0;Z<g;++Z)if(z[Z]=0,_!==Z){for(var H=k[Z],N=H.length,j=0;j<N;++j){var re=V(C[H[j]]);if(re!==0){re<0&&(z[Z]=1,G+=1);continue e}}z[Z]=1,G+=1}T[_]=[G,_,z]}T.sort(function(lt,Gt){return Gt[0]-lt[0]});for(var _=0;_<g;++_)for(var z=T[_],oe=z[1],_e=z[2],Z=0;Z<g;++Z)_e[Z]&&(P[Z]=oe);for(var Me=x(g),_=0;_<g;++_)Me[_].push(P[_]),Me[P[_]].push(_);for(var ke={},me=v(E,!1),_=0;_<g;++_)for(var H=k[_],N=H.length,Z=0;Z<N;++Z){var ie=H[Z],Se=H[(Z+1)%N],Le=Math.min(ie,Se)+\":\"+Math.max(ie,Se);if(Le in ke){var Ae=ke[Le];Me[Ae].push(_),Me[_].push(Ae),me[ie]=me[Se]=!0}else ke[Le]=_}function De(lt){for(var Gt=lt.length,Nt=0;Nt<Gt;++Nt)if(!me[lt[Nt]])return!1;return!0}for(var Pe=[],ge=v(g,-1),_=0;_<g;++_)P[_]===_&&!De(k[_])?(Pe.push(_),ge[_]=0):ge[_]=-1;for(var Fe=[];Pe.length>0;){var ce=Pe.pop(),Ze=Me[ce];h(Ze,function(lt,Gt){return lt-Gt});var ct=Ze.length,pt=ge[ce],Wt;if(pt===0){var H=k[ce];Wt=[H]}for(var _=0;_<ct;++_){var st=Ze[_];if(!(ge[st]>=0)&&(ge[st]=pt^1,Pe.push(st),pt===0)){var H=k[st];De(H)||(H.reverse(),Wt.push(H))}}pt===0&&Fe.push(Wt)}return Fe}},5085:function(i,a,o){i.exports=C;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(E){return function(A,L){var _=E[A];return _?!!_.queryPoint(L,f):!1}}function d(E){for(var A={},L=0;L<E.length;++L){var _=E[L],k=_[0][0],M=_[0][1],g=_[1][1],P=[Math.min(M,g),Math.max(M,g)];k in A?A[k].push(P):A[k]=[P]}for(var T={},z=Object.keys(A),L=0;L<z.length;++L){var O=A[z[L]];T[z[L]]=u(O)}return h(T)}function v(E,A){return function(L){var _=c.le(A,L[0]);if(_<0)return 1;var k=E[_];if(!k)if(_>0&&A[_]===L[0])k=E[_-1];else return 1;for(var M=1;k;){var g=k.key,P=s(L,g[0],g[1]);if(g[0][0]<g[1][0])if(P<0)k=k.left;else if(P>0)M=-1,k=k.right;else return 0;else if(P>0)k=k.left;else if(P<0)M=1,k=k.right;else return 0}return M}}function x(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function p(E,A){return function(_){return E(_[0],_[1])?0:A(_)}}function C(E){for(var A=E.length,L=[],_=[],k=0,M=0;M<A;++M)for(var g=E[M],P=g.length,T=P-1,z=0;z<P;T=z++){var O=g[T],V=g[z];O[0]===V[0]?_.push([O,V]):L.push([O,V])}if(L.length===0)return _.length===0?x:b(d(_));var G=l(L),Z=v(G.slabs,G.coordinates);return _.length===0?Z:p(d(_),Z)}},9346:function(i){\"use strict\";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length<h.length&&(a=new Float64Array(h.length),o=new Float64Array(h.length),s=new Float64Array(h.length));for(var v=0;v<h.length;++v)a[v]=u[v]-h[v],o[v]=c[v]-u[v],s[v]=f[v]-u[v];for(var x=0,b=0,p=0,C=0,E=0,A=0,v=0;v<h.length;++v){var L=o[v],_=s[v],k=a[v];x+=L*L,b+=L*_,p+=_*_,C+=k*L,E+=k*_,A+=k*k}var M=Math.abs(x*p-b*b),g=b*E-p*C,P=b*C-x*E,T;if(g+P<=M)if(g<0)P<0&&C<0?(P=0,-C>=x?(g=1,T=x+2*C+A):(g=-C/x,T=C*g+A)):(g=0,E>=0?(P=0,T=A):-E>=p?(P=1,T=p+2*E+A):(P=-E/p,T=E*P+A));else if(P<0)P=0,C>=0?(g=0,T=A):-C>=x?(g=1,T=x+2*C+A):(g=-C/x,T=C*g+A);else{var z=1/M;g*=z,P*=z,T=g*(x*g+b*P+2*C)+P*(b*g+p*P+2*E)+A}else{var O,V,G,Z;g<0?(O=b+C,V=p+E,V>O?(G=V-O,Z=x-2*b+p,G>=Z?(g=1,P=0,T=x+2*C+A):(g=G/Z,P=1-g,T=g*(x*g+b*P+2*C)+P*(b*g+p*P+2*E)+A)):(g=0,V<=0?(P=1,T=p+2*E+A):E>=0?(P=0,T=A):(P=-E/p,T=E*P+A))):P<0?(O=b+E,V=x+C,V>O?(G=V-O,Z=x-2*b+p,G>=Z?(P=1,g=0,T=p+2*E+A):(P=G/Z,g=1-P,T=g*(x*g+b*P+2*C)+P*(b*g+p*P+2*E)+A)):(P=0,V<=0?(g=1,T=x+2*C+A):C>=0?(g=0,T=A):(g=-C/x,T=C*g+A))):(G=p+E-b-C,G<=0?(g=0,P=1,T=p+2*E+A):(Z=x-2*b+p,G>=Z?(g=1,P=0,T=x+2*C+A):(g=G/Z,P=1-g,T=g*(x*g+b*P+2*C)+P*(b*g+p*P+2*E)+A)))}for(var H=1-g-P,v=0;v<h.length;++v)d[v]=H*u[v]+g*c[v]+P*f[v];return T<0?0:T}i.exports=l},8648:function(i,a,o){i.exports=o(783)},2653:function(i,a,o){\"use strict\";var s=o(3865);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5838:function(i,a,o){\"use strict\";i.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f<u.length;++f)c[f]=s(u[f]);return c}},8987:function(i,a,o){\"use strict\";var s=o(7842),l=o(6504);i.exports=u;function u(c,f){for(var h=s(f),d=c.length,v=new Array(d),x=0;x<d;++x)v[x]=l(c[x],h);return v}},544:function(i,a,o){\"use strict\";var s=o(5572);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5771:function(i,a,o){\"use strict\";var s=o(8507),l=o(3788),u=o(2419);i.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,v=0;v<h;++v){var x=f[v],b=u(x);if(b!==0){if(d>0){var p=f[d-1];if(s(x,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=x}}return f.length=d,f}},3233:function(i){\"use strict\";var a=\"\",o;i.exports=s;function s(l,u){if(typeof l!=\"string\")throw new TypeError(\"expected a string\");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o==\"undefined\")o=l,a=\"\";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){\"use strict\";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var x=0,c=u;c<s;++c){var f=o[c],h=l;l=f+h;var d=l-f,v=h-d;v&&(o[x++]=v)}return o[x++]=l,o.length=x,o}},2962:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(A,L,_,k){return function(g){return k(A(_(g[0][0],g[1][1]),_(-g[0][1],g[1][0])))}}function d(A,L,_,k){return function(g){return k(A(L(A(_(g[1][1],g[2][2]),_(-g[1][2],g[2][1])),g[0][0]),A(L(A(_(g[1][0],g[2][2]),_(-g[1][2],g[2][0])),-g[0][1]),L(A(_(g[1][0],g[2][1]),_(-g[1][1],g[2][0])),g[0][2]))))}}function v(A,L,_,k){return function(g){return k(A(A(L(A(L(A(_(g[2][2],g[3][3]),_(-g[2][3],g[3][2])),g[1][1]),A(L(A(_(g[2][1],g[3][3]),_(-g[2][3],g[3][1])),-g[1][2]),L(A(_(g[2][1],g[3][2]),_(-g[2][2],g[3][1])),g[1][3]))),g[0][0]),L(A(L(A(_(g[2][2],g[3][3]),_(-g[2][3],g[3][2])),g[1][0]),A(L(A(_(g[2][0],g[3][3]),_(-g[2][3],g[3][0])),-g[1][2]),L(A(_(g[2][0],g[3][2]),_(-g[2][2],g[3][0])),g[1][3]))),-g[0][1])),A(L(A(L(A(_(g[2][1],g[3][3]),_(-g[2][3],g[3][1])),g[1][0]),A(L(A(_(g[2][0],g[3][3]),_(-g[2][3],g[3][0])),-g[1][1]),L(A(_(g[2][0],g[3][1]),_(-g[2][1],g[3][0])),g[1][3]))),g[0][2]),L(A(L(A(_(g[2][1],g[3][2]),_(-g[2][2],g[3][1])),g[1][0]),A(L(A(_(g[2][0],g[3][2]),_(-g[2][2],g[3][0])),-g[1][1]),L(A(_(g[2][0],g[3][1]),_(-g[2][1],g[3][0])),g[1][2]))),-g[0][3]))))}}function x(A,L,_,k){return function(g){return k(A(A(L(A(A(L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][2]),A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),-g[2][3]),L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][4]))),g[1][1]),L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][1]),A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),-g[2][3]),L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),g[2][4]))),-g[1][2])),A(L(A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),g[2][1]),A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),-g[2][2]),L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][4]))),g[1][3]),L(A(L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][1]),A(L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),-g[2][2]),L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][3]))),-g[1][4]))),g[0][0]),L(A(A(L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][2]),A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),-g[2][3]),L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][4]))),g[1][0]),L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][3]),L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),g[2][4]))),-g[1][2])),A(L(A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][2]),L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),g[2][4]))),g[1][3]),L(A(L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][0]),A(L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),-g[2][2]),L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),g[2][3]))),-g[1][4]))),-g[0][1])),A(L(A(A(L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][1]),A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),-g[2][3]),L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),g[2][4]))),g[1][0]),L(A(L(A(_(g[3][3],g[4][4]),_(-g[3][4],g[4][3])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][3]),L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),g[2][4]))),-g[1][1])),A(L(A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][4]))),g[1][3]),L(A(L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][3]))),-g[1][4]))),g[0][2]),A(L(A(A(L(A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),g[2][1]),A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),-g[2][2]),L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][4]))),g[1][0]),L(A(L(A(_(g[3][2],g[4][4]),_(-g[3][4],g[4][2])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][2]),L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),g[2][4]))),-g[1][1])),A(L(A(L(A(_(g[3][1],g[4][4]),_(-g[3][4],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][4]),_(-g[3][4],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][4]))),g[1][2]),L(A(L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][2]))),-g[1][4]))),-g[0][3]),L(A(A(L(A(L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][1]),A(L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),-g[2][2]),L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][3]))),g[1][0]),L(A(L(A(_(g[3][2],g[4][3]),_(-g[3][3],g[4][2])),g[2][0]),A(L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),-g[2][2]),L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),g[2][3]))),-g[1][1])),A(L(A(L(A(_(g[3][1],g[4][3]),_(-g[3][3],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][3]),_(-g[3][3],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][3]))),g[1][2]),L(A(L(A(_(g[3][1],g[4][2]),_(-g[3][2],g[4][1])),g[2][0]),A(L(A(_(g[3][0],g[4][2]),_(-g[3][2],g[4][0])),-g[2][1]),L(A(_(g[3][0],g[4][1]),_(-g[3][1],g[4][0])),g[2][2]))),-g[1][3]))),g[0][4])))))}}function b(A){var L=A===2?h:A===3?d:A===4?v:A===5?x:void 0;return L(l,u,s,c)}var p=[function(){return[0]},function(L){return[L[0][0]]}];function C(A,L,_,k,M,g,P,T){return function(O){switch(O.length){case 0:return A(O);case 1:return L(O);case 2:return _(O);case 3:return k(O);case 4:return M(O);case 5:return g(O)}var V=P[O.length];return V||(V=P[O.length]=T(O.length)),V(O)}}function E(){for(;p.length<f;)p.push(b(p.length));i.exports=C.apply(void 0,p.concat([p,b]));for(var A=0;A<p.length;++A)i.exports[A]=p[A]}E()},1944:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210);i.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d<c.length;++d)h=l(h,s(c[d],f[d]));return h}},2646:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(8545),c=o(3012),f=6;function h(M){var g=M===3?b:M===4?p:M===5?C:E;return g(l,u,s,c)}function d(){return 0}function v(){return 0}function x(){return 0}function b(M,g,P,T){function z(O,V,G){var Z=P(O[0],O[0]),H=T(Z,V[0]),N=T(Z,G[0]),j=P(V[0],V[0]),re=T(j,O[0]),oe=T(j,G[0]),_e=P(G[0],G[0]),Me=T(_e,O[0]),ke=T(_e,V[0]),me=M(g(ke,oe),g(re,H)),ie=g(Me,N),Se=g(me,ie);return Se[Se.length-1]}return z}function p(M,g,P,T){function z(O,V,G,Z){var H=M(P(O[0],O[0]),P(O[1],O[1])),N=T(H,V[0]),j=T(H,G[0]),re=T(H,Z[0]),oe=M(P(V[0],V[0]),P(V[1],V[1])),_e=T(oe,O[0]),Me=T(oe,G[0]),ke=T(oe,Z[0]),me=M(P(G[0],G[0]),P(G[1],G[1])),ie=T(me,O[0]),Se=T(me,V[0]),Le=T(me,Z[0]),Ae=M(P(Z[0],Z[0]),P(Z[1],Z[1])),De=T(Ae,O[0]),Pe=T(Ae,V[0]),ge=T(Ae,G[0]),Fe=M(M(T(g(ge,Le),V[1]),M(T(g(Pe,ke),-G[1]),T(g(Se,Me),Z[1]))),M(T(g(Pe,ke),O[1]),M(T(g(De,re),-V[1]),T(g(_e,N),Z[1])))),ce=M(M(T(g(ge,Le),O[1]),M(T(g(De,re),-G[1]),T(g(ie,j),Z[1]))),M(T(g(Se,Me),O[1]),M(T(g(ie,j),-V[1]),T(g(_e,N),G[1])))),Ze=g(Fe,ce);return Ze[Ze.length-1]}return z}function C(M,g,P,T){function z(O,V,G,Z,H){var N=M(P(O[0],O[0]),M(P(O[1],O[1]),P(O[2],O[2]))),j=T(N,V[0]),re=T(N,G[0]),oe=T(N,Z[0]),_e=T(N,H[0]),Me=M(P(V[0],V[0]),M(P(V[1],V[1]),P(V[2],V[2]))),ke=T(Me,O[0]),me=T(Me,G[0]),ie=T(Me,Z[0]),Se=T(Me,H[0]),Le=M(P(G[0],G[0]),M(P(G[1],G[1]),P(G[2],G[2]))),Ae=T(Le,O[0]),De=T(Le,V[0]),Pe=T(Le,Z[0]),ge=T(Le,H[0]),Fe=M(P(Z[0],Z[0]),M(P(Z[1],Z[1]),P(Z[2],Z[2]))),ce=T(Fe,O[0]),Ze=T(Fe,V[0]),ct=T(Fe,G[0]),pt=T(Fe,H[0]),Wt=M(P(H[0],H[0]),M(P(H[1],H[1]),P(H[2],H[2]))),st=T(Wt,O[0]),lt=T(Wt,V[0]),Gt=T(Wt,G[0]),Nt=T(Wt,Z[0]),$t=M(M(M(T(M(T(g(Nt,pt),G[1]),M(T(g(Gt,ge),-Z[1]),T(g(ct,Pe),H[1]))),V[2]),M(T(M(T(g(Nt,pt),V[1]),M(T(g(lt,Se),-Z[1]),T(g(Ze,ie),H[1]))),-G[2]),T(M(T(g(Gt,ge),V[1]),M(T(g(lt,Se),-G[1]),T(g(De,me),H[1]))),Z[2]))),M(T(M(T(g(ct,Pe),V[1]),M(T(g(Ze,ie),-G[1]),T(g(De,me),Z[1]))),-H[2]),M(T(M(T(g(Nt,pt),V[1]),M(T(g(lt,Se),-Z[1]),T(g(Ze,ie),H[1]))),O[2]),T(M(T(g(Nt,pt),O[1]),M(T(g(st,_e),-Z[1]),T(g(ce,oe),H[1]))),-V[2])))),M(M(T(M(T(g(lt,Se),O[1]),M(T(g(st,_e),-V[1]),T(g(ke,j),H[1]))),Z[2]),M(T(M(T(g(Ze,ie),O[1]),M(T(g(ce,oe),-V[1]),T(g(ke,j),Z[1]))),-H[2]),T(M(T(g(ct,Pe),V[1]),M(T(g(Ze,ie),-G[1]),T(g(De,me),Z[1]))),O[2]))),M(T(M(T(g(ct,Pe),O[1]),M(T(g(ce,oe),-G[1]),T(g(Ae,re),Z[1]))),-V[2]),M(T(M(T(g(Ze,ie),O[1]),M(T(g(ce,oe),-V[1]),T(g(ke,j),Z[1]))),G[2]),T(M(T(g(De,me),O[1]),M(T(g(Ae,re),-V[1]),T(g(ke,j),G[1]))),-Z[2]))))),sr=M(M(M(T(M(T(g(Nt,pt),G[1]),M(T(g(Gt,ge),-Z[1]),T(g(ct,Pe),H[1]))),O[2]),T(M(T(g(Nt,pt),O[1]),M(T(g(st,_e),-Z[1]),T(g(ce,oe),H[1]))),-G[2])),M(T(M(T(g(Gt,ge),O[1]),M(T(g(st,_e),-G[1]),T(g(Ae,re),H[1]))),Z[2]),T(M(T(g(ct,Pe),O[1]),M(T(g(ce,oe),-G[1]),T(g(Ae,re),Z[1]))),-H[2]))),M(M(T(M(T(g(Gt,ge),V[1]),M(T(g(lt,Se),-G[1]),T(g(De,me),H[1]))),O[2]),T(M(T(g(Gt,ge),O[1]),M(T(g(st,_e),-G[1]),T(g(Ae,re),H[1]))),-V[2])),M(T(M(T(g(lt,Se),O[1]),M(T(g(st,_e),-V[1]),T(g(ke,j),H[1]))),G[2]),T(M(T(g(De,me),O[1]),M(T(g(Ae,re),-V[1]),T(g(ke,j),G[1]))),-H[2])))),wr=g($t,sr);return wr[wr.length-1]}return z}function E(M,g,P,T){function z(O,V,G,Z,H,N){var j=M(M(P(O[0],O[0]),P(O[1],O[1])),M(P(O[2],O[2]),P(O[3],O[3]))),re=T(j,V[0]),oe=T(j,G[0]),_e=T(j,Z[0]),Me=T(j,H[0]),ke=T(j,N[0]),me=M(M(P(V[0],V[0]),P(V[1],V[1])),M(P(V[2],V[2]),P(V[3],V[3]))),ie=T(me,O[0]),Se=T(me,G[0]),Le=T(me,Z[0]),Ae=T(me,H[0]),De=T(me,N[0]),Pe=M(M(P(G[0],G[0]),P(G[1],G[1])),M(P(G[2],G[2]),P(G[3],G[3]))),ge=T(Pe,O[0]),Fe=T(Pe,V[0]),ce=T(Pe,Z[0]),Ze=T(Pe,H[0]),ct=T(Pe,N[0]),pt=M(M(P(Z[0],Z[0]),P(Z[1],Z[1])),M(P(Z[2],Z[2]),P(Z[3],Z[3]))),Wt=T(pt,O[0]),st=T(pt,V[0]),lt=T(pt,G[0]),Gt=T(pt,H[0]),Nt=T(pt,N[0]),$t=M(M(P(H[0],H[0]),P(H[1],H[1])),M(P(H[2],H[2]),P(H[3],H[3]))),sr=T($t,O[0]),wr=T($t,V[0]),ur=T($t,G[0]),Qe=T($t,Z[0]),Et=T($t,N[0]),er=M(M(P(N[0],N[0]),P(N[1],N[1])),M(P(N[2],N[2]),P(N[3],N[3]))),Ut=T(er,O[0]),Ft=T(er,V[0]),bt=T(er,G[0]),yt=T(er,Z[0]),Yt=T(er,H[0]),lr=M(M(M(T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),G[2]),T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),H[2]),T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),-N[2]))),V[3]),M(T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),V[2]),T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),H[2]),T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),-N[2]))),-G[3]),T(M(M(T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),V[2]),T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),-G[2])),M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),H[2]),T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),-N[2]))),Z[3]))),M(M(T(M(M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),V[2]),T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),-G[2])),M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),Z[2]),T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),-N[2]))),-H[3]),T(M(M(T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),V[2]),T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),-G[2])),M(T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),Z[2]),T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),-H[2]))),N[3])),M(T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),V[2]),T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),H[2]),T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),-N[2]))),O[3]),T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),H[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-N[2]))),-V[3])))),M(M(M(T(M(M(T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),H[2]),T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),-N[2]))),Z[3]),T(M(M(T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),O[2]),T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),Z[2]),T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),-N[2]))),-H[3])),M(T(M(M(T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),O[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-V[2])),M(T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),Z[2]),T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),-H[2]))),N[3]),T(M(M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),V[2]),T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),-G[2])),M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),Z[2]),T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),-N[2]))),O[3]))),M(M(T(M(M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),O[2]),T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),-G[2])),M(T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),Z[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-N[2]))),-V[3]),T(M(M(T(M(T(g(yt,Nt),V[1]),M(T(g(Ft,De),-Z[1]),T(g(st,Le),N[1]))),O[2]),T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),Z[2]),T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),-N[2]))),G[3])),M(T(M(M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),O[2]),T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-N[2]))),-Z[3]),T(M(M(T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),O[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-V[2])),M(T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-Z[2]))),N[3]))))),Tr=M(M(M(T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),G[2]),T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),H[2]),T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),-N[2]))),O[3]),M(T(M(M(T(M(T(g(Yt,Et),Z[1]),M(T(g(yt,Nt),-H[1]),T(g(Qe,Gt),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-Z[2])),M(T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),H[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-N[2]))),-G[3]),T(M(M(T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-G[2])),M(T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),H[2]),T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),-N[2]))),Z[3]))),M(M(T(M(M(T(M(T(g(yt,Nt),G[1]),M(T(g(bt,ct),-Z[1]),T(g(lt,ce),N[1]))),O[2]),T(M(T(g(yt,Nt),O[1]),M(T(g(Ut,ke),-Z[1]),T(g(Wt,_e),N[1]))),-G[2])),M(T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),Z[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-N[2]))),-H[3]),T(M(M(T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),O[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-G[2])),M(T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),Z[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-H[2]))),N[3])),M(T(M(M(T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),V[2]),T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),-G[2])),M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),H[2]),T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),-N[2]))),O[3]),T(M(M(T(M(T(g(Yt,Et),G[1]),M(T(g(bt,ct),-H[1]),T(g(ur,Ze),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-G[2])),M(T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),H[2]),T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),-N[2]))),-V[3])))),M(M(M(T(M(M(T(M(T(g(Yt,Et),V[1]),M(T(g(Ft,De),-H[1]),T(g(wr,Ae),N[1]))),O[2]),T(M(T(g(Yt,Et),O[1]),M(T(g(Ut,ke),-H[1]),T(g(sr,Me),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),H[2]),T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),-N[2]))),G[3]),T(M(M(T(M(T(g(bt,ct),V[1]),M(T(g(Ft,De),-G[1]),T(g(Fe,Se),N[1]))),O[2]),T(M(T(g(bt,ct),O[1]),M(T(g(Ut,ke),-G[1]),T(g(ge,oe),N[1]))),-V[2])),M(T(M(T(g(Ft,De),O[1]),M(T(g(Ut,ke),-V[1]),T(g(ie,re),N[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-N[2]))),-H[3])),M(T(M(M(T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),O[2]),T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),-V[2])),M(T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-H[2]))),N[3]),T(M(M(T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),V[2]),T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),-G[2])),M(T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),Z[2]),T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),-H[2]))),O[3]))),M(M(T(M(M(T(M(T(g(Qe,Gt),G[1]),M(T(g(ur,Ze),-Z[1]),T(g(lt,ce),H[1]))),O[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-G[2])),M(T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),Z[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-H[2]))),-V[3]),T(M(M(T(M(T(g(Qe,Gt),V[1]),M(T(g(wr,Ae),-Z[1]),T(g(st,Le),H[1]))),O[2]),T(M(T(g(Qe,Gt),O[1]),M(T(g(sr,Me),-Z[1]),T(g(Wt,_e),H[1]))),-V[2])),M(T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),Z[2]),T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),-H[2]))),G[3])),M(T(M(M(T(M(T(g(ur,Ze),V[1]),M(T(g(wr,Ae),-G[1]),T(g(Fe,Se),H[1]))),O[2]),T(M(T(g(ur,Ze),O[1]),M(T(g(sr,Me),-G[1]),T(g(ge,oe),H[1]))),-V[2])),M(T(M(T(g(wr,Ae),O[1]),M(T(g(sr,Me),-V[1]),T(g(ie,re),H[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-H[2]))),-Z[3]),T(M(M(T(M(T(g(lt,ce),V[1]),M(T(g(st,Le),-G[1]),T(g(Fe,Se),Z[1]))),O[2]),T(M(T(g(lt,ce),O[1]),M(T(g(Wt,_e),-G[1]),T(g(ge,oe),Z[1]))),-V[2])),M(T(M(T(g(st,Le),O[1]),M(T(g(Wt,_e),-V[1]),T(g(ie,re),Z[1]))),G[2]),T(M(T(g(Fe,Se),O[1]),M(T(g(ge,oe),-V[1]),T(g(ie,re),G[1]))),-Z[2]))),H[3]))))),Rr=g(lr,Tr);return Rr[Rr.length-1]}return z}var A=[d,v,x];function L(M){var g=A[M.length];return g||(g=A[M.length]=h(M.length)),g.apply(void 0,M)}function _(M,g,P,T,z,O,V,G){function Z(H,N,j,re,oe,_e){switch(arguments.length){case 0:case 1:return 0;case 2:return T(H,N);case 3:return z(H,N,j);case 4:return O(H,N,j,re);case 5:return V(H,N,j,re,oe);case 6:return G(H,N,j,re,oe,_e)}for(var Me=new Array(arguments.length),ke=0;ke<arguments.length;++ke)Me[ke]=arguments[ke];return M(Me)}return Z}function k(){for(;A.length<=f;)A.push(h(A.length));i.exports=_.apply(void 0,[L].concat(A));for(var M=0;M<=f;++M)i.exports[M]=A[M]}k()},727:function(i,a,o){\"use strict\";var s=o(2962),l=6;function u(A){var L=A===2?h:A===3?d:A===4?v:A===5?x:b;return A<6?L(s[A]):L(s)}function c(){return[[0]]}function f(A,L){return[[L[0]],[A[0][0]]]}function h(A){return function(_,k){return[A([[+k[0],+_[0][1]],[+k[1],+_[1][1]]]),A([[+_[0][0],+k[0]],[+_[1][0],+k[1]]]),A(_)]}}function d(A){return function(_,k){return[A([[+k[0],+_[0][1],+_[0][2]],[+k[1],+_[1][1],+_[1][2]],[+k[2],+_[2][1],+_[2][2]]]),A([[+_[0][0],+k[0],+_[0][2]],[+_[1][0],+k[1],+_[1][2]],[+_[2][0],+k[2],+_[2][2]]]),A([[+_[0][0],+_[0][1],+k[0]],[+_[1][0],+_[1][1],+k[1]],[+_[2][0],+_[2][1],+k[2]]]),A(_)]}}function v(A){return function(_,k){return[A([[+k[0],+_[0][1],+_[0][2],+_[0][3]],[+k[1],+_[1][1],+_[1][2],+_[1][3]],[+k[2],+_[2][1],+_[2][2],+_[2][3]],[+k[3],+_[3][1],+_[3][2],+_[3][3]]]),A([[+_[0][0],+k[0],+_[0][2],+_[0][3]],[+_[1][0],+k[1],+_[1][2],+_[1][3]],[+_[2][0],+k[2],+_[2][2],+_[2][3]],[+_[3][0],+k[3],+_[3][2],+_[3][3]]]),A([[+_[0][0],+_[0][1],+k[0],+_[0][3]],[+_[1][0],+_[1][1],+k[1],+_[1][3]],[+_[2][0],+_[2][1],+k[2],+_[2][3]],[+_[3][0],+_[3][1],+k[3],+_[3][3]]]),A([[+_[0][0],+_[0][1],+_[0][2],+k[0]],[+_[1][0],+_[1][1],+_[1][2],+k[1]],[+_[2][0],+_[2][1],+_[2][2],+k[2]],[+_[3][0],+_[3][1],+_[3][2],+k[3]]]),A(_)]}}function x(A){return function(_,k){return[A([[+k[0],+_[0][1],+_[0][2],+_[0][3],+_[0][4]],[+k[1],+_[1][1],+_[1][2],+_[1][3],+_[1][4]],[+k[2],+_[2][1],+_[2][2],+_[2][3],+_[2][4]],[+k[3],+_[3][1],+_[3][2],+_[3][3],+_[3][4]],[+k[4],+_[4][1],+_[4][2],+_[4][3],+_[4][4]]]),A([[+_[0][0],+k[0],+_[0][2],+_[0][3],+_[0][4]],[+_[1][0],+k[1],+_[1][2],+_[1][3],+_[1][4]],[+_[2][0],+k[2],+_[2][2],+_[2][3],+_[2][4]],[+_[3][0],+k[3],+_[3][2],+_[3][3],+_[3][4]],[+_[4][0],+k[4],+_[4][2],+_[4][3],+_[4][4]]]),A([[+_[0][0],+_[0][1],+k[0],+_[0][3],+_[0][4]],[+_[1][0],+_[1][1],+k[1],+_[1][3],+_[1][4]],[+_[2][0],+_[2][1],+k[2],+_[2][3],+_[2][4]],[+_[3][0],+_[3][1],+k[3],+_[3][3],+_[3][4]],[+_[4][0],+_[4][1],+k[4],+_[4][3],+_[4][4]]]),A([[+_[0][0],+_[0][1],+_[0][2],+k[0],+_[0][4]],[+_[1][0],+_[1][1],+_[1][2],+k[1],+_[1][4]],[+_[2][0],+_[2][1],+_[2][2],+k[2],+_[2][4]],[+_[3][0],+_[3][1],+_[3][2],+k[3],+_[3][4]],[+_[4][0],+_[4][1],+_[4][2],+k[4],+_[4][4]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+k[0]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+k[1]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+k[2]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+k[3]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+k[4]]]),A(_)]}}function b(A){return function(_,k){return[A([[+k[0],+_[0][1],+_[0][2],+_[0][3],+_[0][4],+_[0][5]],[+k[1],+_[1][1],+_[1][2],+_[1][3],+_[1][4],+_[1][5]],[+k[2],+_[2][1],+_[2][2],+_[2][3],+_[2][4],+_[2][5]],[+k[3],+_[3][1],+_[3][2],+_[3][3],+_[3][4],+_[3][5]],[+k[4],+_[4][1],+_[4][2],+_[4][3],+_[4][4],+_[4][5]],[+k[5],+_[5][1],+_[5][2],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+k[0],+_[0][2],+_[0][3],+_[0][4],+_[0][5]],[+_[1][0],+k[1],+_[1][2],+_[1][3],+_[1][4],+_[1][5]],[+_[2][0],+k[2],+_[2][2],+_[2][3],+_[2][4],+_[2][5]],[+_[3][0],+k[3],+_[3][2],+_[3][3],+_[3][4],+_[3][5]],[+_[4][0],+k[4],+_[4][2],+_[4][3],+_[4][4],+_[4][5]],[+_[5][0],+k[5],+_[5][2],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+k[0],+_[0][3],+_[0][4],+_[0][5]],[+_[1][0],+_[1][1],+k[1],+_[1][3],+_[1][4],+_[1][5]],[+_[2][0],+_[2][1],+k[2],+_[2][3],+_[2][4],+_[2][5]],[+_[3][0],+_[3][1],+k[3],+_[3][3],+_[3][4],+_[3][5]],[+_[4][0],+_[4][1],+k[4],+_[4][3],+_[4][4],+_[4][5]],[+_[5][0],+_[5][1],+k[5],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+k[0],+_[0][4],+_[0][5]],[+_[1][0],+_[1][1],+_[1][2],+k[1],+_[1][4],+_[1][5]],[+_[2][0],+_[2][1],+_[2][2],+k[2],+_[2][4],+_[2][5]],[+_[3][0],+_[3][1],+_[3][2],+k[3],+_[3][4],+_[3][5]],[+_[4][0],+_[4][1],+_[4][2],+k[4],+_[4][4],+_[4][5]],[+_[5][0],+_[5][1],+_[5][2],+k[5],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+k[0],+_[0][5]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+k[1],+_[1][5]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+k[2],+_[2][5]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+k[3],+_[3][5]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+k[4],+_[4][5]],[+_[5][0],+_[5][1],+_[5][2],+_[5][3],+k[5],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+_[0][4],+k[0]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+_[1][4],+k[1]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+_[2][4],+k[2]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+_[3][4],+k[3]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+_[4][4],+k[4]],[+_[5][0],+_[5][1],+_[5][2],+_[5][3],+_[5][4],+k[5]]]),A(_)]}}var p=[c,f];function C(A,L,_,k,M,g,P,T){return function(O,V){switch(O.length){case 0:return A(O,V);case 1:return L(O,V);case 2:return _(O,V);case 3:return k(O,V);case 4:return M(O,V);case 5:return g(O,V)}var G=P[O.length];return G||(G=P[O.length]=T(O.length)),G(O,V)}}function E(){for(;p.length<l;)p.push(u(p.length));i.exports=C.apply(void 0,p.concat([p,u]));for(var A=0;A<l;++A)i.exports[A]=p[A]}E()},3250:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(3012),c=o(8545),f=5,h=11102230246251565e-32,d=(3+16*h)*h,v=(7+56*h)*h;function x(g,P,T,z){return function(V,G,Z){var H=g(g(P(G[1],Z[0]),P(-Z[1],G[0])),g(P(V[1],G[0]),P(-G[1],V[0]))),N=g(P(V[1],Z[0]),P(-Z[1],V[0])),j=z(H,N);return j[j.length-1]}}function b(g,P,T,z){return function(V,G,Z,H){var N=g(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),G[2]),g(T(g(P(G[1],H[0]),P(-H[1],G[0])),-Z[2]),T(g(P(G[1],Z[0]),P(-Z[1],G[0])),H[2]))),g(T(g(P(G[1],H[0]),P(-H[1],G[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),H[2])))),j=g(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-Z[2]),T(g(P(V[1],Z[0]),P(-Z[1],V[0])),H[2]))),g(T(g(P(G[1],Z[0]),P(-Z[1],G[0])),V[2]),g(T(g(P(V[1],Z[0]),P(-Z[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),Z[2])))),re=z(N,j);return re[re.length-1]}}function p(g,P,T,z){return function(V,G,Z,H,N){var j=g(g(g(T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),Z[2]),g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),-H[2]),T(g(P(Z[1],H[0]),P(-H[1],Z[0])),N[2]))),G[3]),g(T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),G[2]),g(T(g(P(G[1],N[0]),P(-N[1],G[0])),-H[2]),T(g(P(G[1],H[0]),P(-H[1],G[0])),N[2]))),-Z[3]),T(g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(T(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),T(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),H[3]))),g(T(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),G[2]),g(T(g(P(G[1],H[0]),P(-H[1],G[0])),-Z[2]),T(g(P(G[1],Z[0]),P(-Z[1],G[0])),H[2]))),-N[3]),g(T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),G[2]),g(T(g(P(G[1],N[0]),P(-N[1],G[0])),-H[2]),T(g(P(G[1],H[0]),P(-H[1],G[0])),N[2]))),V[3]),T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-H[2]),T(g(P(V[1],H[0]),P(-H[1],V[0])),N[2]))),-G[3])))),g(g(T(g(T(g(P(G[1],N[0]),P(-N[1],G[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),N[2]))),H[3]),g(T(g(T(g(P(G[1],H[0]),P(-H[1],G[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),H[2]))),-N[3]),T(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),G[2]),g(T(g(P(G[1],H[0]),P(-H[1],G[0])),-Z[2]),T(g(P(G[1],Z[0]),P(-Z[1],G[0])),H[2]))),V[3]))),g(T(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-Z[2]),T(g(P(V[1],Z[0]),P(-Z[1],V[0])),H[2]))),-G[3]),g(T(g(T(g(P(G[1],H[0]),P(-H[1],G[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),H[2]))),Z[3]),T(g(T(g(P(G[1],Z[0]),P(-Z[1],G[0])),V[2]),g(T(g(P(V[1],Z[0]),P(-Z[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),Z[2]))),-H[3]))))),re=g(g(g(T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),Z[2]),g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),-H[2]),T(g(P(Z[1],H[0]),P(-H[1],Z[0])),N[2]))),V[3]),T(g(T(g(P(H[1],N[0]),P(-N[1],H[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-H[2]),T(g(P(V[1],H[0]),P(-H[1],V[0])),N[2]))),-Z[3])),g(T(g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-Z[2]),T(g(P(V[1],Z[0]),P(-Z[1],V[0])),N[2]))),H[3]),T(g(T(g(P(Z[1],H[0]),P(-H[1],Z[0])),V[2]),g(T(g(P(V[1],H[0]),P(-H[1],V[0])),-Z[2]),T(g(P(V[1],Z[0]),P(-Z[1],V[0])),H[2]))),-N[3]))),g(g(T(g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(T(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),T(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),V[3]),T(g(T(g(P(Z[1],N[0]),P(-N[1],Z[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-Z[2]),T(g(P(V[1],Z[0]),P(-Z[1],V[0])),N[2]))),-G[3])),g(T(g(T(g(P(G[1],N[0]),P(-N[1],G[0])),V[2]),g(T(g(P(V[1],N[0]),P(-N[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),N[2]))),Z[3]),T(g(T(g(P(G[1],Z[0]),P(-Z[1],G[0])),V[2]),g(T(g(P(V[1],Z[0]),P(-Z[1],V[0])),-G[2]),T(g(P(V[1],G[0]),P(-G[1],V[0])),Z[2]))),-N[3])))),oe=z(j,re);return oe[oe.length-1]}}function C(g){var P=g===3?x:g===4?b:p;return P(l,s,u,c)}var E=C(3),A=C(4),L=[function(){return 0},function(){return 0},function(P,T){return T[0]-P[0]},function(P,T,z){var O=(P[1]-z[1])*(T[0]-z[0]),V=(P[0]-z[0])*(T[1]-z[1]),G=O-V,Z;if(O>0){if(V<=0)return G;Z=O+V}else if(O<0){if(V>=0)return G;Z=-(O+V)}else return G;var H=d*Z;return G>=H||G<=-H?G:E(P,T,z)},function(P,T,z,O){var V=P[0]-O[0],G=T[0]-O[0],Z=z[0]-O[0],H=P[1]-O[1],N=T[1]-O[1],j=z[1]-O[1],re=P[2]-O[2],oe=T[2]-O[2],_e=z[2]-O[2],Me=G*j,ke=Z*N,me=Z*H,ie=V*j,Se=V*N,Le=G*H,Ae=re*(Me-ke)+oe*(me-ie)+_e*(Se-Le),De=(Math.abs(Me)+Math.abs(ke))*Math.abs(re)+(Math.abs(me)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Le))*Math.abs(_e),Pe=v*De;return Ae>Pe||-Ae>Pe?Ae:A(P,T,z,O)}];function _(g){var P=L[g.length];return P||(P=L[g.length]=C(g.length)),P.apply(void 0,g)}function k(g,P,T,z,O,V,G){return function(H,N,j,re,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(H,N);case 3:return O(H,N,j);case 4:return V(H,N,j,re);case 5:return G(H,N,j,re,oe)}for(var _e=new Array(arguments.length),Me=0;Me<arguments.length;++Me)_e[Me]=arguments[Me];return g(_e)}}function M(){for(;L.length<=f;)L.push(C(L.length));i.exports=k.apply(void 0,[_].concat(L));for(var g=0;g<=f;++g)i.exports[g]=L[g]}M()},5382:function(i,a,o){\"use strict\";var s=o(8210),l=o(3012);i.exports=u;function u(c,f){if(c.length===1)return l(f,c[0]);if(f.length===1)return l(c,f[0]);if(c.length===0||f.length===0)return[0];var h=[0];if(c.length<f.length)for(var d=0;d<c.length;++d)h=s(h,l(f,c[d]));else for(var d=0;d<f.length;++d)h=s(h,l(c,f[d]));return h}},3012:function(i,a,o){\"use strict\";var s=o(5250),l=o(9362);i.exports=u;function u(c,f){var h=c.length;if(h===1){var d=s(c[0],f);return d[0]?d:[d[1]]}var v=new Array(2*h),x=[.1,.1],b=[.1,.1],p=0;s(c[0],f,x),x[0]&&(v[p++]=x[0]);for(var C=1;C<h;++C){s(c[C],f,b);var E=x[1];l(E,b[0],x),x[0]&&(v[p++]=x[0]);var A=b[1],L=x[1],_=A+L,k=_-A,M=L-k;x[1]=_,M&&(v[p++]=M)}return x[1]&&(v[p++]=x[1]),p===0&&(v[p++]=0),v.length=p,v}},1125:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var v=0;v<2;++v){var x=c[v],b=f[v],p=Math.min(x,b),C=Math.max(x,b),E=h[v],A=d[v],L=Math.min(E,A),_=Math.max(E,A);if(_<p||C<L)return!1}return!0}function u(c,f,h,d){var v=s(c,h,d),x=s(f,h,d);if(v>0&&x>0||v<0&&x<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&x===0&&b===0&&p===0?l(c,f,h,d):!0}},8545:function(i){\"use strict\";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,x=0,b=Math.abs,p=s[v],C=b(p),E=-l[x],A=b(E),L,_;C<A?(_=p,v+=1,v<u&&(p=s[v],C=b(p))):(_=E,x+=1,x<c&&(E=-l[x],A=b(E))),v<u&&C<A||x>=c?(L=p,v+=1,v<u&&(p=s[v],C=b(p))):(L=E,x+=1,x<c&&(E=-l[x],A=b(E)));for(var k=L+_,M=k-L,g=_-M,P=g,T=k,z,O,V,G,Z;v<u&&x<c;)C<A?(L=p,v+=1,v<u&&(p=s[v],C=b(p))):(L=E,x+=1,x<c&&(E=-l[x],A=b(E))),_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z;for(;v<u;)L=p,_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z,v+=1,v<u&&(p=s[v]);for(;x<c;)L=E,_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z,x+=1,x<c&&(E=-l[x]);return P&&(h[d++]=P),T&&(h[d++]=T),d||(h[d++]=0),h.length=d,h}},8210:function(i){\"use strict\";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,v=0,x=0,b=Math.abs,p=s[v],C=b(p),E=l[x],A=b(E),L,_;C<A?(_=p,v+=1,v<u&&(p=s[v],C=b(p))):(_=E,x+=1,x<c&&(E=l[x],A=b(E))),v<u&&C<A||x>=c?(L=p,v+=1,v<u&&(p=s[v],C=b(p))):(L=E,x+=1,x<c&&(E=l[x],A=b(E)));for(var k=L+_,M=k-L,g=_-M,P=g,T=k,z,O,V,G,Z;v<u&&x<c;)C<A?(L=p,v+=1,v<u&&(p=s[v],C=b(p))):(L=E,x+=1,x<c&&(E=l[x],A=b(E))),_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z;for(;v<u;)L=p,_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z,v+=1,v<u&&(p=s[v]);for(;x<c;)L=E,_=P,k=L+_,M=k-L,g=_-M,g&&(h[d++]=g),z=T+k,O=z-T,V=z-O,G=k-O,Z=T-V,P=Z+G,T=z,x+=1,x<c&&(E=l[x]);return P&&(h[d++]=P),T&&(h[d++]=T),d||(h[d++]=0),h.length=d,h}},9127:function(i,a,o){\"use strict\";i.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},7765:function(i,a,o){\"use strict\";i.exports=p;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(C){for(var E=C.length,A=0,L=0;L<E;++L)A=Math.max(A,C[L].length)|0;return A-1}function h(C,E){for(var A=C.length,L=l.mallocUint8(A),_=0;_<A;++_)L[_]=C[_]<E|0;return L}function d(C,E){for(var A=C.length,L=E*(E+1)/2*A|0,_=l.mallocUint32(L*2),k=0,M=0;M<A;++M)for(var g=C[M],E=g.length,P=0;P<E;++P)for(var T=0;T<P;++T){var z=g[T],O=g[P];_[k++]=Math.min(z,O)|0,_[k++]=Math.max(z,O)|0}var V=k/2|0;u(s(_,[V,2]));for(var G=2,M=2;M<k;M+=2)_[M-2]===_[M]&&_[M-1]===_[M+1]||(_[G++]=_[M],_[G++]=_[M+1]);return s(_,[G/2|0,2])}function v(C,E,A,L){for(var _=C.data,k=C.shape[0],M=l.mallocDouble(k),g=0,P=0;P<k;++P){var T=_[2*P],z=_[2*P+1];if(A[T]!==A[z]){var O=E[T],V=E[z];_[2*g]=T,_[2*g+1]=z,M[g++]=(V-L)/(V-O)}}return C.shape[0]=g,s(M,[g])}function x(C,E){var A=l.mallocInt32(E*2),L=C.shape[0],_=C.data;A[0]=0;for(var k=0,M=0;M<L;++M){var g=_[2*M];if(g!==k){for(A[2*k+1]=M;++k<g;)A[2*k]=M,A[2*k+1]=M;A[2*k]=M}}for(A[2*k+1]=L;++k<E;)A[2*k]=A[2*k+1]=L;return A}function b(C){for(var E=C.shape[0]|0,A=C.data,L=new Array(E),_=0;_<E;++_)L[_]=[A[2*_],A[2*_+1]];return L}function p(C,E,A,L){A=A||0,typeof L==\"undefined\"&&(L=f(C));var _=C.length;if(_===0||L<1)return{cells:[],vertexIds:[],vertexWeights:[]};var k=h(E,+A),M=d(C,L),g=v(M,E,k,+A),P=x(M,E.length|0),T=c(L)(C,M.data,P,k),z=b(M),O=[].slice.call(g.data,0,g.shape[0]);return l.free(k),l.free(M.data),l.free(g.data),l.free(P),{cells:T,vertexIds:z,vertexWeights:O}}},1570:function(i){\"use strict\";i.exports=o;var a=[function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,x=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var C=b+p>>1,E=f[2*C+1];if(E===x)return C;x<E?p=C:b=C+1}return b}function u(c,f,h,d){for(var v=c.length,x=[],b=0;b<v;++b)var p=c[b],C=p.length;return x}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,x=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var C=b+p>>1,E=f[2*C+1];if(E===x)return C;x<E?p=C:b=C+1}return b}function u(c,f,h,d){for(var v=c.length,x=[],b=0;b<v;++b){var p=c[b],C=p.length;if(C===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[1])]);break;case 2:x.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return x}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,x=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var C=b+p>>1,E=f[2*C+1];if(E===x)return C;x<E?p=C:b=C+1}return b}function u(c,f,h,d){for(var v=c.length,x=[],b=0;b<v;++b){var p=c[b],C=p.length;if(C===3){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:x.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:x.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:x.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:x.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:x.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(C===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[1])]);break;case 2:x.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return x}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,x=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var C=b+p>>1,E=f[2*C+1];if(E===x)return C;x<E?p=C:b=C+1}return b}function u(c,f,h,d){for(var v=c.length,x=[],b=0;b<v;++b){var p=c[b],C=p.length;if(C===4){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2)+(d[p[3]]<<3);if(E===0||E===15)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[1]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])]);break;case 2:x.push([l(h,f,p[1],p[2]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])]);break;case 3:x.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])],[l(h,f,p[1],p[3]),l(h,f,p[1],p[2]),l(h,f,p[0],p[3])]);break;case 4:x.push([l(h,f,p[2],p[0]),l(h,f,p[2],p[1]),l(h,f,p[2],p[3])]);break;case 5:x.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[0],p[3])],[l(h,f,p[2],p[1]),l(h,f,p[2],p[3]),l(h,f,p[0],p[3])]);break;case 6:x.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])],[l(h,f,p[2],p[3]),l(h,f,p[2],p[0]),l(h,f,p[1],p[3])]);break;case 7:x.push([l(h,f,p[0],p[3]),l(h,f,p[1],p[3]),l(h,f,p[2],p[3])]);break;case 8:x.push([l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[3],p[2])]);break;case 9:x.push([l(h,f,p[3],p[1]),l(h,f,p[0],p[1]),l(h,f,p[0],p[2])],[l(h,f,p[3],p[2]),l(h,f,p[3],p[1]),l(h,f,p[0],p[2])]);break;case 10:x.push([l(h,f,p[1],p[0]),l(h,f,p[3],p[0]),l(h,f,p[1],p[2])],[l(h,f,p[3],p[0]),l(h,f,p[3],p[2]),l(h,f,p[1],p[2])]);break;case 11:x.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[3],p[2])]);break;case 12:x.push([l(h,f,p[3],p[0]),l(h,f,p[2],p[0]),l(h,f,p[2],p[1])],[l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[2],p[1])]);break;case 13:x.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[3],p[1])]);break;case 14:x.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[3],p[0])]);break;case 15:break}}else if(C===3){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:x.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:x.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:x.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:x.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:x.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(C===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([l(h,f,p[0],p[1])]);break;case 2:x.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return x}return u}];function o(s){return a[s]()}},6803:function(i,a,o){\"use strict\";var s,l=o(8828),u=o(1755);function c(P){for(var T=0,z=Math.max,O=0,V=P.length;O<V;++O)T=z(T,P[O].length);return T-1}s=c;function f(P){for(var T=-1,z=Math.max,O=0,V=P.length;O<V;++O)for(var G=P[O],Z=0,H=G.length;Z<H;++Z)T=z(T,G[Z]);return T+1}s=f;function h(P){for(var T=new Array(P.length),z=0,O=P.length;z<O;++z)T[z]=P[z].slice(0);return T}s=h;function d(P,T){var z=P.length,O=P.length-T.length,V=Math.min;if(O)return O;switch(z){case 0:return 0;case 1:return P[0]-T[0];case 2:var j=P[0]+P[1]-T[0]-T[1];return j||V(P[0],P[1])-V(T[0],T[1]);case 3:var G=P[0]+P[1],Z=T[0]+T[1];if(j=G+P[2]-(Z+T[2]),j)return j;var H=V(P[0],P[1]),N=V(T[0],T[1]),j=V(H,P[2])-V(N,T[2]);return j||V(H+P[2],G)-V(N+T[2],Z);default:var re=P.slice(0);re.sort();var oe=T.slice(0);oe.sort();for(var _e=0;_e<z;++_e)if(O=re[_e]-oe[_e],O)return O;return 0}}a.Fw=d;function v(P,T){return d(P[0],T[0])}function x(P,T){if(T){for(var z=P.length,O=new Array(z),V=0;V<z;++V)O[V]=[P[V],T[V]];O.sort(v);for(var V=0;V<z;++V)P[V]=O[V][0],T[V]=O[V][1];return P}else return P.sort(d),P}s=x;function b(P){if(P.length===0)return[];for(var T=1,z=P.length,O=1;O<z;++O){var V=P[O];if(d(V,P[O-1])){if(O===T){T++;continue}P[T++]=V}}return P.length=T,P}s=b;function p(P,T){for(var z=0,O=P.length-1,V=-1;z<=O;){var G=z+O>>1,Z=d(P[G],T);Z<=0?(Z===0&&(V=G),z=G+1):Z>0&&(O=G-1)}return V}s=p;function C(P,T){for(var z=new Array(P.length),O=0,V=z.length;O<V;++O)z[O]=[];for(var G=[],O=0,Z=T.length;O<Z;++O)for(var H=T[O],N=H.length,j=1,re=1<<N;j<re;++j){G.length=l.popCount(j);for(var oe=0,_e=0;_e<N;++_e)j&1<<_e&&(G[oe++]=H[_e]);var Me=p(P,G);if(!(Me<0))for(;z[Me++].push(O),!(Me>=P.length||d(P[Me],G)!==0););}return z}s=C;function E(P,T){if(!T)return C(b(L(P,0)),P,0);for(var z=new Array(T),O=0;O<T;++O)z[O]=[];for(var O=0,V=P.length;O<V;++O)for(var G=P[O],Z=0,H=G.length;Z<H;++Z)z[G[Z]].push(O);return z}s=E;function A(P){for(var T=[],z=0,O=P.length;z<O;++z)for(var V=P[z],G=V.length|0,Z=1,H=1<<G;Z<H;++Z){for(var N=[],j=0;j<G;++j)Z>>>j&1&&N.push(V[j]);T.push(N)}return x(T)}s=A;function L(P,T){if(T<0)return[];for(var z=[],O=(1<<T+1)-1,V=0;V<P.length;++V)for(var G=P[V],Z=O;Z<1<<G.length;Z=l.nextCombination(Z)){for(var H=new Array(T+1),N=0,j=0;j<G.length;++j)Z&1<<j&&(H[N++]=G[j]);z.push(H)}return x(z)}s=L;function _(P){for(var T=[],z=0,O=P.length;z<O;++z)for(var V=P[z],G=0,Z=V.length;G<Z;++G){for(var H=new Array(V.length-1),N=0,j=0;N<Z;++N)N!==G&&(H[j++]=V[N]);T.push(H)}return x(T)}s=_;function k(P,T){for(var z=new u(T),O=0;O<P.length;++O)for(var V=P[O],G=0;G<V.length;++G)for(var Z=G+1;Z<V.length;++Z)z.link(V[G],V[Z]);for(var H=[],N=z.ranks,O=0;O<N.length;++O)N[O]=-1;for(var O=0;O<P.length;++O){var j=z.find(P[O][0]);N[j]<0?(N[j]=H.length,H.push([P[O].slice(0)])):H[N[j]].push(P[O].slice(0))}return H}function M(P){for(var T=b(x(L(P,0))),z=new u(T.length),O=0;O<P.length;++O)for(var V=P[O],G=0;G<V.length;++G)for(var Z=p(T,[V[G]]),H=G+1;H<V.length;++H)z.link(Z,p(T,[V[H]]));for(var N=[],j=z.ranks,O=0;O<j.length;++O)j[O]=-1;for(var O=0;O<P.length;++O){var re=z.find(p(T,[P[O][0]]));j[re]<0?(j[re]=N.length,N.push([P[O].slice(0)])):N[j[re]].push(P[O].slice(0))}return N}function g(P,T){return T?k(P,T):M(P)}s=g},3105:function(i,a){\"use strict\";\"use restrict\";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014:function(i,a,o){\"use strict\";\"use restrict\";var s=o(3105),l=o(4623);function u(g){for(var P=0,T=Math.max,z=0,O=g.length;z<O;++z)P=T(P,g[z].length);return P-1}a.dimension=u;function c(g){for(var P=-1,T=Math.max,z=0,O=g.length;z<O;++z)for(var V=g[z],G=0,Z=V.length;G<Z;++G)P=T(P,V[G]);return P+1}a.countVertices=c;function f(g){for(var P=new Array(g.length),T=0,z=g.length;T<z;++T)P[T]=g[T].slice(0);return P}a.cloneCells=f;function h(g,P){var T=g.length,z=g.length-P.length,O=Math.min;if(z)return z;switch(T){case 0:return 0;case 1:return g[0]-P[0];case 2:var N=g[0]+g[1]-P[0]-P[1];return N||O(g[0],g[1])-O(P[0],P[1]);case 3:var V=g[0]+g[1],G=P[0]+P[1];if(N=V+g[2]-(G+P[2]),N)return N;var Z=O(g[0],g[1]),H=O(P[0],P[1]),N=O(Z,g[2])-O(H,P[2]);return N||O(Z+g[2],V)-O(H+P[2],G);default:var j=g.slice(0);j.sort();var re=P.slice(0);re.sort();for(var oe=0;oe<T;++oe)if(z=j[oe]-re[oe],z)return z;return 0}}a.compareCells=h;function d(g,P){return h(g[0],P[0])}function v(g,P){if(P){for(var T=g.length,z=new Array(T),O=0;O<T;++O)z[O]=[g[O],P[O]];z.sort(d);for(var O=0;O<T;++O)g[O]=z[O][0],P[O]=z[O][1];return g}else return g.sort(h),g}a.normalize=v;function x(g){if(g.length===0)return[];for(var P=1,T=g.length,z=1;z<T;++z){var O=g[z];if(h(O,g[z-1])){if(z===P){P++;continue}g[P++]=O}}return g.length=P,g}a.unique=x;function b(g,P){for(var T=0,z=g.length-1,O=-1;T<=z;){var V=T+z>>1,G=h(g[V],P);G<=0?(G===0&&(O=V),T=V+1):G>0&&(z=V-1)}return O}a.findCell=b;function p(g,P){for(var T=new Array(g.length),z=0,O=T.length;z<O;++z)T[z]=[];for(var V=[],z=0,G=P.length;z<G;++z)for(var Z=P[z],H=Z.length,N=1,j=1<<H;N<j;++N){V.length=s.popCount(N);for(var re=0,oe=0;oe<H;++oe)N&1<<oe&&(V[re++]=Z[oe]);var _e=b(g,V);if(!(_e<0))for(;T[_e++].push(z),!(_e>=g.length||h(g[_e],V)!==0););}return T}a.incidence=p;function C(g,P){if(!P)return p(x(A(g,0)),g,0);for(var T=new Array(P),z=0;z<P;++z)T[z]=[];for(var z=0,O=g.length;z<O;++z)for(var V=g[z],G=0,Z=V.length;G<Z;++G)T[V[G]].push(z);return T}a.dual=C;function E(g){for(var P=[],T=0,z=g.length;T<z;++T)for(var O=g[T],V=O.length|0,G=1,Z=1<<V;G<Z;++G){for(var H=[],N=0;N<V;++N)G>>>N&1&&H.push(O[N]);P.push(H)}return v(P)}a.explode=E;function A(g,P){if(P<0)return[];for(var T=[],z=(1<<P+1)-1,O=0;O<g.length;++O)for(var V=g[O],G=z;G<1<<V.length;G=s.nextCombination(G)){for(var Z=new Array(P+1),H=0,N=0;N<V.length;++N)G&1<<N&&(Z[H++]=V[N]);T.push(Z)}return v(T)}a.skeleton=A;function L(g){for(var P=[],T=0,z=g.length;T<z;++T)for(var O=g[T],V=0,G=O.length;V<G;++V){for(var Z=new Array(O.length-1),H=0,N=0;H<G;++H)H!==V&&(Z[N++]=O[H]);P.push(Z)}return v(P)}a.boundary=L;function _(g,P){for(var T=new l(P),z=0;z<g.length;++z)for(var O=g[z],V=0;V<O.length;++V)for(var G=V+1;G<O.length;++G)T.link(O[V],O[G]);for(var Z=[],H=T.ranks,z=0;z<H.length;++z)H[z]=-1;for(var z=0;z<g.length;++z){var N=T.find(g[z][0]);H[N]<0?(H[N]=Z.length,Z.push([g[z].slice(0)])):Z[H[N]].push(g[z].slice(0))}return Z}function k(g){for(var P=x(v(A(g,0))),T=new l(P.length),z=0;z<g.length;++z)for(var O=g[z],V=0;V<O.length;++V)for(var G=b(P,[O[V]]),Z=V+1;Z<O.length;++Z)T.link(G,b(P,[O[Z]]));for(var H=[],N=T.ranks,z=0;z<N.length;++z)N[z]=-1;for(var z=0;z<g.length;++z){var j=T.find(b(P,[g[z][0]]));N[j]<0?(N[j]=H.length,H.push([g[z].slice(0)])):H[N[j]].push(g[z].slice(0))}return H}function M(g,P){return P?_(g,P):k(g)}a.connectedComponents=M},4623:function(i){\"use strict\";\"use restrict\";i.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s<o;++s)this.roots[s]=s,this.ranks[s]=0}a.prototype.length=function(){return this.roots.length},a.prototype.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},a.prototype.find=function(o){for(var s=this.roots;s[o]!==o;){var l=s[o];s[o]=s[l],o=l}return o},a.prototype.link=function(o,s){var l=this.find(o),u=this.find(s);if(l!==u){var c=this.ranks,f=this.roots,h=c[l],d=c[u];h<d?f[l]=u:d<h?f[u]=l:(f[u]=l,++c[l])}}},5878:function(i,a,o){\"use strict\";i.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var v=Math.abs(s(f,h,d)),x=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return v/x}function c(f,h,d){for(var v=h.length,x=f.length,b=new Array(v),p=new Array(v),C=new Array(v),E=new Array(v),A=0;A<v;++A)b[A]=p[A]=-1,C[A]=1/0,E[A]=!1;for(var A=0;A<x;++A){var L=f[A];if(L.length!==2)throw new Error(\"Input must be a graph\");var _=L[1],k=L[0];p[k]!==-1?p[k]=-2:p[k]=_,b[_]!==-1?b[_]=-2:b[_]=k}function M(ie){if(E[ie])return 1/0;var Se=b[ie],Le=p[ie];return Se<0||Le<0?1/0:u(h[ie],h[Se],h[Le])}function g(ie,Se){var Le=H[ie],Ae=H[Se];H[ie]=Ae,H[Se]=Le,N[Le]=Se,N[Ae]=ie}function P(ie){return C[H[ie]]}function T(ie){return ie&1?ie-1>>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Le=Se,Ae=2*ie+1,De=2*(ie+1),Pe=ie;if(Ae<re){var ge=P(Ae);ge<Le&&(Pe=Ae,Le=ge)}if(De<re){var Fe=P(De);Fe<Le&&(Pe=De)}if(Pe===ie)return ie;g(ie,Pe),ie=Pe}}function O(ie){for(var Se=P(ie);ie>0;){var Le=T(ie);if(Le>=0){var Ae=P(Le);if(Se<Ae){g(ie,Le),ie=Le;continue}}return ie}}function V(){if(re>0){var ie=H[0];return g(0,re-1),re-=1,z(0),ie}return-1}function G(ie,Se){var Le=H[ie];return C[Le]===Se?ie:(C[Le]=-1/0,O(ie),V(),C[Le]=Se,re+=1,O(re-1))}function Z(ie){if(!E[ie]){E[ie]=!0;var Se=b[ie],Le=p[ie];b[Le]>=0&&(b[Le]=Se),p[Se]>=0&&(p[Se]=Le),N[Se]>=0&&G(N[Se],M(Se)),N[Le]>=0&&G(N[Le],M(Le))}}for(var H=[],N=new Array(v),A=0;A<v;++A){var j=C[A]=M(A);j<1/0?(N[A]=H.length,H.push(A)):N[A]=-1}for(var re=H.length,A=re>>1;A>=0;--A)z(A);for(;;){var oe=V();if(oe<0||C[oe]>d)break;Z(oe)}for(var _e=[],A=0;A<v;++A)E[A]||(N[A]=_e.length,_e.push(h[A].slice()));var Me=_e.length;function ke(ie,Se){if(ie[Se]<0)return Se;var Le=Se,Ae=Se;do{var De=ie[Ae];if(!E[Ae]||De<0||De===Ae||(Ae=De,De=ie[Ae],!E[Ae]||De<0||De===Ae))break;Ae=De,Le=ie[Le]}while(Le!==Ae);for(var Pe=Se;Pe!==Ae;Pe=ie[Pe])ie[Pe]=Ae;return Ae}var me=[];return f.forEach(function(ie){var Se=ke(b,ie[0]),Le=ke(p,ie[1]);if(Se>=0&&Le>=0&&Se!==Le){var Ae=N[Se],De=N[Le];Ae!==De&&me.push([Ae,De])}}),l.unique(l.normalize(me)),{positions:_e,edges:me}}},1303:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return x<b?x-b:v>p?v-p:x-p}var C,E;c[0][1]<c[1][1]?(C=c[0],E=c[1]):(C=c[1],E=c[0]);var A=s(d,h,C);return A||(A=s(d,h,E),A)?A:E-d}function u(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else return l(f,c);var v,x;if(c[0][0]<c[1][0])v=c[0],x=c[1];else if(c[0][0]>c[1][0])v=c[1],x=c[0];else return-l(c,f);var b=s(h,d,x),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(x,v,d),p=s(x,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-x[0]}},4209:function(i,a,o){\"use strict\";i.exports=p;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(C,E,A){this.slabs=C,this.coordinates=E,this.horizontal=A}var h=f.prototype;function d(C,E){return C.y-E}function v(C,E){for(var A=null;C;){var L=C.key,_,k;L[0][0]<L[1][0]?(_=L[0],k=L[1]):(_=L[1],k=L[0]);var M=u(_,k,E);if(M<0)C=C.left;else if(M>0)if(E[0]!==L[1][0])A=C,C=C.right;else{var g=v(C.right,E);if(g)return g;C=C.left}else{if(E[0]!==L[1][0])return C;var g=v(C.right,E);if(g)return g;C=C.left}}return A}h.castUp=function(C){var E=s.le(this.coordinates,C[0]);if(E<0)return-1;var A=this.slabs[E],L=v(this.slabs[E],C),_=-1;if(L&&(_=L.value),this.coordinates[E]===C[0]){var k=null;if(L&&(k=L.key),E>0){var M=v(this.slabs[E-1],C);M&&(k?c(M.key,k)>0&&(k=M.key,_=M.value):(_=M.value,k=M.key))}var g=this.horizontal[E];if(g.length>0){var P=s.ge(g,C[1],d);if(P<g.length){var T=g[P];if(C[1]===T.y){if(T.closed)return T.index;for(;P<g.length-1&&g[P+1].y===C[1];)if(P=P+1,T=g[P],T.closed)return T.index;if(T.y===C[1]&&!T.start){if(P=P+1,P>=g.length)return _;T=g[P]}}if(T.start)if(k){var z=u(k[0],k[1],[C[0],T.y]);k[0][0]>k[1][0]&&(z=-z),z>0&&(_=T.index)}else _=T.index;else T.y!==C[1]&&(_=T.index)}}}return _};function x(C,E,A,L){this.y=C,this.index=E,this.start=A,this.closed=L}function b(C,E,A,L){this.x=C,this.segment=E,this.create=A,this.index=L}function p(C){for(var E=C.length,A=2*E,L=new Array(A),_=0;_<E;++_){var k=C[_],M=k[0][0]<k[1][0];L[2*_]=new b(k[0][0],k,M,_),L[2*_+1]=new b(k[1][0],k,!M,_)}L.sort(function(H,N){var j=H.x-N.x;return j||(j=H.create-N.create,j)?j:Math.min(H.segment[0][1],H.segment[1][1])-Math.min(N.segment[0][1],N.segment[1][1])});for(var g=l(c),P=[],T=[],z=[],O=-1/0,_=0;_<A;){for(var V=L[_].x,G=[];_<A;){var Z=L[_];if(Z.x!==V)break;_+=1,Z.segment[0][0]===Z.x&&Z.segment[1][0]===Z.x?Z.create&&(Z.segment[0][1]<Z.segment[1][1]?(G.push(new x(Z.segment[0][1],Z.index,!0,!0)),G.push(new x(Z.segment[1][1],Z.index,!1,!1))):(G.push(new x(Z.segment[1][1],Z.index,!0,!1)),G.push(new x(Z.segment[0][1],Z.index,!1,!0)))):Z.create?g=g.insert(Z.segment,Z.index):g=g.remove(Z.segment)}P.push(g.root),T.push(V),z.push(G)}return new f(P,T,z)}},5202:function(i,a,o){\"use strict\";var s=o(1944),l=o(8210);i.exports=f,i.exports.positive=h,i.exports.negative=d;function u(v,x){var b=l(s(v,x),[x[x.length-1]]);return b[b.length-1]}function c(v,x,b,p){var C=p-x,E=-x/C;E<0?E=0:E>1&&(E=1);for(var A=1-E,L=v.length,_=new Array(L),k=0;k<L;++k)_[k]=E*v[k]+A*b[k];return _}function f(v,x){for(var b=[],p=[],C=u(v[v.length-1],x),E=v[v.length-1],A=v[0],L=0;L<v.length;++L,E=A){A=v[L];var _=u(A,x);if(C<0&&_>0||C>0&&_<0){var k=c(E,_,A,C);b.push(k),p.push(k.slice())}_<0?p.push(A.slice()):_>0?b.push(A.slice()):(b.push(A.slice()),p.push(A.slice())),C=_}return{positive:b,negative:p}}function h(v,x){for(var b=[],p=u(v[v.length-1],x),C=v[v.length-1],E=v[0],A=0;A<v.length;++A,C=E){E=v[A];var L=u(E,x);(p<0&&L>0||p>0&&L<0)&&b.push(c(C,L,E,p)),L>=0&&b.push(E.slice()),p=L}return b}function d(v,x){for(var b=[],p=u(v[v.length-1],x),C=v[v.length-1],E=v[0],A=0;A<v.length;++A,C=E){E=v[A];var L=u(E,x);(p<0&&L>0||p>0&&L<0)&&b.push(c(C,L,E,p)),L<=0&&b.push(E.slice()),p=L}return b}},3387:function(i,a,o){var s;(function(){\"use strict\";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function u(v){return f(d(v),arguments)}function c(v,x){return u.apply(null,[v].concat(x||[]))}function f(v,x){var b=1,p=v.length,C,E=\"\",A,L,_,k,M,g,P,T;for(A=0;A<p;A++)if(typeof v[A]==\"string\")E+=v[A];else if(typeof v[A]==\"object\"){if(_=v[A],_.keys)for(C=x[b],L=0;L<_.keys.length;L++){if(C==null)throw new Error(u('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',_.keys[L],_.keys[L-1]));C=C[_.keys[L]]}else _.param_no?C=x[_.param_no]:C=x[b++];if(l.not_type.test(_.type)&&l.not_primitive.test(_.type)&&C instanceof Function&&(C=C()),l.numeric_arg.test(_.type)&&typeof C!=\"number\"&&isNaN(C))throw new TypeError(u(\"[sprintf] expecting number but found %T\",C));switch(l.number.test(_.type)&&(P=C>=0),_.type){case\"b\":C=parseInt(C,10).toString(2);break;case\"c\":C=String.fromCharCode(parseInt(C,10));break;case\"d\":case\"i\":C=parseInt(C,10);break;case\"j\":C=JSON.stringify(C,null,_.width?parseInt(_.width):0);break;case\"e\":C=_.precision?parseFloat(C).toExponential(_.precision):parseFloat(C).toExponential();break;case\"f\":C=_.precision?parseFloat(C).toFixed(_.precision):parseFloat(C);break;case\"g\":C=_.precision?String(Number(C.toPrecision(_.precision))):parseFloat(C);break;case\"o\":C=(parseInt(C,10)>>>0).toString(8);break;case\"s\":C=String(C),C=_.precision?C.substring(0,_.precision):C;break;case\"t\":C=String(!!C),C=_.precision?C.substring(0,_.precision):C;break;case\"T\":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=_.precision?C.substring(0,_.precision):C;break;case\"u\":C=parseInt(C,10)>>>0;break;case\"v\":C=C.valueOf(),C=_.precision?C.substring(0,_.precision):C;break;case\"x\":C=(parseInt(C,10)>>>0).toString(16);break;case\"X\":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}l.json.test(_.type)?E+=C:(l.number.test(_.type)&&(!P||_.sign)?(T=P?\"+\":\"-\",C=C.toString().replace(l.sign,\"\")):T=\"\",M=_.pad_char?_.pad_char===\"0\"?\"0\":_.pad_char.charAt(1):\" \",g=_.width-(T+C).length,k=_.width&&g>0?M.repeat(g):\"\",E+=_.align?T+C+k:M===\"0\"?T+k+C:k+T+C)}return E}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var x=v,b,p=[],C=0;x;){if((b=l.text.exec(x))!==null)p.push(b[0]);else if((b=l.modulo.exec(x))!==null)p.push(\"%\");else if((b=l.placeholder.exec(x))!==null){if(b[2]){C|=1;var E=[],A=b[2],L=[];if((L=l.key.exec(A))!==null)for(E.push(L[1]);(A=A.substring(L[0].length))!==\"\";)if((L=l.key_access.exec(A))!==null)E.push(L[1]);else if((L=l.index_access.exec(A))!==null)E.push(L[1]);else throw new SyntaxError(\"[sprintf] failed to parse named argument key\");else throw new SyntaxError(\"[sprintf] failed to parse named argument key\");b[2]=E}else C|=2;if(C===3)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError(\"[sprintf] unexpected placeholder\");x=x.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!=\"undefined\"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){\"use strict\";i.exports=d;var s=o(2640),l=o(781),u={\"2d\":function(v,x,b){var p=v({order:x,scalarArguments:3,getters:b===\"generic\"?[0]:void 0,phase:function(E,A,L,_){return E>_|0},vertex:function(E,A,L,_,k,M,g,P,T,z,O,V,G){var Z=(g<<0)+(P<<1)+(T<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:O.push([E-.5,A-.5]);break;case 1:O.push([E-.25-.25*(_+L-2*G)/(L-_),A-.25-.25*(k+L-2*G)/(L-k)]);break;case 2:O.push([E-.75-.25*(-_-L+2*G)/(_-L),A-.25-.25*(M+_-2*G)/(_-M)]);break;case 3:O.push([E-.5,A-.5-.5*(k+L+M+_-4*G)/(L-k+_-M)]);break;case 4:O.push([E-.25-.25*(M+k-2*G)/(k-M),A-.75-.25*(-k-L+2*G)/(k-L)]);break;case 5:O.push([E-.5-.5*(_+L+M+k-4*G)/(L-_+k-M),A-.5]);break;case 6:O.push([E-.5-.25*(-_-L+M+k)/(_-L+k-M),A-.5-.25*(-k-L+M+_)/(k-L+_-M)]);break;case 7:O.push([E-.75-.25*(M+k-2*G)/(k-M),A-.75-.25*(M+_-2*G)/(_-M)]);break;case 8:O.push([E-.75-.25*(-M-k+2*G)/(M-k),A-.75-.25*(-M-_+2*G)/(M-_)]);break;case 9:O.push([E-.5-.25*(_+L+-M-k)/(L-_+M-k),A-.5-.25*(k+L+-M-_)/(L-k+M-_)]);break;case 10:O.push([E-.5-.5*(-_-L+-M-k+4*G)/(_-L+M-k),A-.5]);break;case 11:O.push([E-.25-.25*(-M-k+2*G)/(M-k),A-.75-.25*(k+L-2*G)/(L-k)]);break;case 12:O.push([E-.5,A-.5-.5*(-k-L+-M-_+4*G)/(k-L+M-_)]);break;case 13:O.push([E-.75-.25*(_+L-2*G)/(L-_),A-.25-.25*(-M-_+2*G)/(M-_)]);break;case 14:O.push([E-.25-.25*(-_-L+2*G)/(_-L),A-.25-.25*(-k-L+2*G)/(k-L)]);break;case 15:O.push([E-.5,A-.5]);break}},cell:function(E,A,L,_,k,M,g,P,T){k?P.push([E,A]):P.push([A,E])}});return function(C,E){var A=[],L=[];return p(C,A,L,E),{positions:A,cells:L}}}};function c(v,x){var b=v.length+\"d\",p=u[b];if(p)return p(s,v,x)}function f(v,x){for(var b=l(v,x),p=b.length,C=new Array(p),E=new Array(p),A=0;A<p;++A)C[A]=[b[A]],E[A]=[A];return{positions:C,cells:E}}var h={};function d(v,C){if(v.dimension<=0)return{positions:[],cells:[]};if(v.dimension===1)return f(v,C);var b=v.order.join()+\"-\"+v.dtype,p=h[b],C=+C||0;return p||(p=h[b]=c(v.order,v.dtype)),p(v,C)}},665:function(i,a,o){\"use strict\";var s=o(3202);i.exports=f;var l=96;function u(h,d){var v=s(getComputedStyle(h).getPropertyValue(d));return v[0]*f(v[1],h)}function c(h,d){var v=document.createElement(\"div\");v.style[\"font-size\"]=\"128\"+h,d.appendChild(v);var x=u(v,\"font-size\")/128;return d.removeChild(v),x}function f(h,d){switch(d=d||document.body,h=(h||\"px\").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case\"%\":return d.clientHeight/100;case\"ch\":case\"ex\":return c(h,d);case\"em\":return u(d,\"font-size\");case\"rem\":return u(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return l;case\"cm\":return l/2.54;case\"mm\":return l/25.4;case\"pt\":return l/72;case\"pc\":return l/6}return 1}},7261:function(i,a,o){\"use strict\";i.exports=E;var s=o(9215),l=o(7608),u=o(6079),c=o(5911),f=o(3536),h=o(244);function d(A,L,_){return Math.sqrt(Math.pow(A,2)+Math.pow(L,2)+Math.pow(_,2))}function v(A){return Math.min(1,Math.max(-1,A))}function x(A){var L=Math.abs(A[0]),_=Math.abs(A[1]),k=Math.abs(A[2]),M=[0,0,0];L>Math.max(_,k)?M[2]=1:_>Math.max(L,k)?M[0]=1:M[1]=1;for(var g=0,P=0,T=0;T<3;++T)g+=A[T]*A[T],P+=M[T]*A[T];for(var T=0;T<3;++T)M[T]-=P/g*A[T];return f(M,M),M}function b(A,L,_,k,M,g,P,T){this.center=s(_),this.up=s(k),this.right=s(M),this.radius=s([g]),this.angle=s([P,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(A,L){A>0?A=Math.log(A):A=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(A){var L=this.radius.bounds[0];return A?(A[0]=Math.exp(L[0][0]),A[1]=Math.exp(L[1][0]),A):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var L=this.computedUp,_=this.computedRight,k=0,M=0,g=0;g<3;++g)M+=L[g]*_[g],k+=L[g]*L[g];for(var P=Math.sqrt(k),T=0,g=0;g<3;++g)_[g]-=L[g]*M/k,T+=_[g]*_[g],L[g]/=P;for(var z=Math.sqrt(T),g=0;g<3;++g)_[g]/=z;var O=this.computedToward;c(O,L,_),f(O,O);for(var V=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],H=Math.cos(G),N=Math.sin(G),j=Math.cos(Z),re=Math.sin(Z),oe=this.computedCenter,_e=H*j,Me=N*j,ke=re,me=-H*re,ie=-N*re,Se=j,Le=this.computedEye,Ae=this.computedMatrix,g=0;g<3;++g){var De=_e*_[g]+Me*O[g]+ke*L[g];Ae[4*g+1]=me*_[g]+ie*O[g]+Se*L[g],Ae[4*g+2]=De,Ae[4*g+3]=0}var Pe=Ae[1],ge=Ae[5],Fe=Ae[9],ce=Ae[2],Ze=Ae[6],ct=Ae[10],pt=ge*ct-Fe*Ze,Wt=Fe*ce-Pe*ct,st=Pe*Ze-ge*ce,lt=d(pt,Wt,st);pt/=lt,Wt/=lt,st/=lt,Ae[0]=pt,Ae[4]=Wt,Ae[8]=st;for(var g=0;g<3;++g)Le[g]=oe[g]+Ae[2+4*g]*V;for(var g=0;g<3;++g){for(var T=0,Gt=0;Gt<3;++Gt)T+=Ae[g+4*Gt]*Le[Gt];Ae[12+g]=-T}Ae[15]=1},p.getMatrix=function(A,L){this.recalcMatrix(A);var _=this.computedMatrix;if(L){for(var k=0;k<16;++k)L[k]=_[k];return L}return _};var C=[0,0,0];p.rotate=function(A,L,_,k){if(this.angle.move(A,L,_),k){this.recalcMatrix(A);var M=this.computedMatrix;C[0]=M[2],C[1]=M[6],C[2]=M[10];for(var g=this.computedUp,P=this.computedRight,T=this.computedToward,z=0;z<3;++z)M[4*z]=g[z],M[4*z+1]=P[z],M[4*z+2]=T[z];u(M,M,k,C);for(var z=0;z<3;++z)g[z]=M[4*z],P[z]=M[4*z+1];this.up.set(A,g[0],g[1],g[2]),this.right.set(A,P[0],P[1],P[2])}},p.pan=function(A,L,_,k){L=L||0,_=_||0,k=k||0,this.recalcMatrix(A);var M=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=M[1],T=M[5],z=M[9],O=d(P,T,z);P/=O,T/=O,z/=O;var V=M[0],G=M[4],Z=M[8],H=V*P+G*T+Z*z;V-=P*H,G-=T*H,Z-=z*H;var N=d(V,G,Z);V/=N,G/=N,Z/=N;var j=V*L+P*_,re=G*L+T*_,oe=Z*L+z*_;this.center.move(A,j,re,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+k),this.radius.set(A,Math.log(_e))},p.translate=function(A,L,_,k){this.center.move(A,L||0,_||0,k||0)},p.setMatrix=function(A,L,_,k){var M=1;typeof _==\"number\"&&(M=_|0),(M<0||M>3)&&(M=1);var g=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(A),L=this.computedMatrix);var T=L[M],z=L[M+4],O=L[M+8];if(k){var G=Math.abs(T),Z=Math.abs(z),H=Math.abs(O),N=Math.max(G,Z,H);G===N?(T=T<0?-1:1,z=O=0):H===N?(O=O<0?-1:1,T=z=0):(z=z<0?-1:1,T=O=0)}else{var V=d(T,z,O);T/=V,z/=V,O/=V}var j=L[g],re=L[g+4],oe=L[g+8],_e=j*T+re*z+oe*O;j-=T*_e,re-=z*_e,oe-=O*_e;var Me=d(j,re,oe);j/=Me,re/=Me,oe/=Me;var ke=z*oe-O*re,me=O*j-T*oe,ie=T*re-z*j,Se=d(ke,me,ie);ke/=Se,me/=Se,ie/=Se,this.center.jump(A,ur,Qe,Et),this.radius.idle(A),this.up.jump(A,T,z,O),this.right.jump(A,j,re,oe);var Le,Ae;if(M===2){var De=L[1],Pe=L[5],ge=L[9],Fe=De*j+Pe*re+ge*oe,ce=De*ke+Pe*me+ge*ie;Wt<0?Le=-Math.PI/2:Le=Math.PI/2,Ae=Math.atan2(ce,Fe)}else{var Ze=L[2],ct=L[6],pt=L[10],Wt=Ze*T+ct*z+pt*O,st=Ze*j+ct*re+pt*oe,lt=Ze*ke+ct*me+pt*ie;Le=Math.asin(v(Wt)),Ae=Math.atan2(lt,st)}this.angle.jump(A,Ae,Le),this.recalcMatrix(A);var Gt=L[2],Nt=L[6],$t=L[10],sr=this.computedMatrix;l(sr,L);var wr=sr[15],ur=sr[12]/wr,Qe=sr[13]/wr,Et=sr[14]/wr,er=Math.exp(this.computedRadius[0]);this.center.jump(A,ur-Gt*er,Qe-Nt*er,Et-$t*er)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},p.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},p.setDistance=function(A,L){L>0&&this.radius.set(A,Math.log(L))},p.lookAt=function(A,L,_,k){this.recalcMatrix(A),L=L||this.computedEye,_=_||this.computedCenter,k=k||this.computedUp;var M=k[0],g=k[1],P=k[2],T=d(M,g,P);if(!(T<1e-6)){M/=T,g/=T,P/=T;var z=L[0]-_[0],O=L[1]-_[1],V=L[2]-_[2],G=d(z,O,V);if(!(G<1e-6)){z/=G,O/=G,V/=G;var Z=this.computedRight,H=Z[0],N=Z[1],j=Z[2],re=M*H+g*N+P*j;H-=re*M,N-=re*g,j-=re*P;var oe=d(H,N,j);if(!(oe<.01&&(H=g*V-P*O,N=P*z-M*V,j=M*O-g*z,oe=d(H,N,j),oe<1e-6))){H/=oe,N/=oe,j/=oe,this.up.set(A,M,g,P),this.right.set(A,H,N,j),this.center.set(A,_[0],_[1],_[2]),this.radius.set(A,Math.log(G));var _e=g*j-P*N,Me=P*H-M*j,ke=M*N-g*H,me=d(_e,Me,ke);_e/=me,Me/=me,ke/=me;var ie=M*z+g*O+P*V,Se=H*z+N*O+j*V,Le=_e*z+Me*O+ke*V,Ae=Math.asin(v(ie)),De=Math.atan2(Le,Se),Pe=this.angle._state,ge=Pe[Pe.length-1],Fe=Pe[Pe.length-2];ge=ge%(2*Math.PI);var ce=Math.abs(ge+2*Math.PI-De),Ze=Math.abs(ge-De),ct=Math.abs(ge-2*Math.PI-De);ce<Ze&&(ge+=2*Math.PI),ct<Ze&&(ge-=2*Math.PI),this.angle.jump(this.angle.lastT(),ge,Fe),this.angle.set(A,De,Ae)}}}};function E(A){A=A||{};var L=A.center||[0,0,0],_=A.up||[0,1,0],k=A.right||x(_),M=A.radius||1,g=A.theta||0,P=A.phi||0;if(L=[].slice.call(L,0,3),_=[].slice.call(_,0,3),f(_,_),k=[].slice.call(k,0,3),f(k,k),\"eye\"in A){var T=A.eye,z=[T[0]-L[0],T[1]-L[1],T[2]-L[2]];c(k,z,_),d(k[0],k[1],k[2])<1e-6?k=x(_):f(k,k),M=d(z[0],z[1],z[2]);var O=h(_,z)/M,V=h(k,z)/M;P=Math.acos(O),g=Math.acos(V)}return M=Math.log(M),new b(A.zoomMin,A.zoomMax,L,_,k,M,g,P)}},5250:function(i){\"use strict\";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,v=s-d,x=a*l,b=x-l,p=x-b,C=l-p,E=c-d*p,A=E-v*p,L=A-d*C,_=v*C-L;return u?(u[0]=_,u[1]=c,u):[_,c]}},9362:function(i){\"use strict\";i.exports=a;function a(o,s,l){var u=o+s,c=u-o,f=u-c,h=s-c,d=o-f;return l?(l[0]=d+h,l[1]=u,l):[d+h,u]}},1888:function(i,a,o){\"use strict\";var s=o(8828),l=o(1338),u=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!=\"undefined\",f=typeof BigUint64Array!=\"undefined\",h=typeof BigInt64Array!=\"undefined\",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var v=d.DATA,x=d.BUFFER;a.free=function(H){if(u.isBuffer(H))x[s.log2(H.length)].push(H);else{if(Object.prototype.toString.call(H)!==\"[object ArrayBuffer]\"&&(H=H.buffer),!H)return;var N=H.length||H.byteLength,j=s.log2(N)|0;v[j].push(H)}};function b(Z){if(Z){var H=Z.length||Z.byteLength,N=s.log2(H);v[N].push(Z)}}function p(Z){b(Z.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=p,a.freeArrayBuffer=b,a.freeBuffer=function(H){x[s.log2(H.length)].push(H)},a.malloc=function(H,N){if(N===void 0||N===\"arraybuffer\")return C(H);switch(N){case\"uint8\":return E(H);case\"uint16\":return A(H);case\"uint32\":return L(H);case\"int8\":return _(H);case\"int16\":return k(H);case\"int32\":return M(H);case\"float\":case\"float32\":return g(H);case\"double\":case\"float64\":return P(H);case\"uint8_clamped\":return T(H);case\"bigint64\":return O(H);case\"biguint64\":return z(H);case\"buffer\":return G(H);case\"data\":case\"dataview\":return V(H);default:return null}return null};function C(H){var H=s.nextPow2(H),N=s.log2(H),j=v[N];return j.length>0?j.pop():new ArrayBuffer(H)}a.mallocArrayBuffer=C;function E(Z){return new Uint8Array(C(Z),0,Z)}a.mallocUint8=E;function A(Z){return new Uint16Array(C(2*Z),0,Z)}a.mallocUint16=A;function L(Z){return new Uint32Array(C(4*Z),0,Z)}a.mallocUint32=L;function _(Z){return new Int8Array(C(Z),0,Z)}a.mallocInt8=_;function k(Z){return new Int16Array(C(2*Z),0,Z)}a.mallocInt16=k;function M(Z){return new Int32Array(C(4*Z),0,Z)}a.mallocInt32=M;function g(Z){return new Float32Array(C(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(C(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function T(Z){return c?new Uint8ClampedArray(C(Z),0,Z):E(Z)}a.mallocUint8Clamped=T;function z(Z){return f?new BigUint64Array(C(8*Z),0,Z):null}a.mallocBigUint64=z;function O(Z){return h?new BigInt64Array(C(8*Z),0,Z):null}a.mallocBigInt64=O;function V(Z){return new DataView(C(Z),0,Z)}a.mallocDataView=V;function G(Z){Z=s.nextPow2(Z);var H=s.log2(Z),N=x[H];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var H=0;H<32;++H)d.UINT8[H].length=0,d.UINT16[H].length=0,d.UINT32[H].length=0,d.INT8[H].length=0,d.INT16[H].length=0,d.INT32[H].length=0,d.FLOAT[H].length=0,d.DOUBLE[H].length=0,d.BIGUINT64[H].length=0,d.BIGINT64[H].length=0,d.UINT8C[H].length=0,v[H].length=0,x[H].length=0}},1755:function(i){\"use strict\";\"use restrict\";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l<s;++l)this.roots[l]=l,this.ranks[l]=0}var o=a.prototype;Object.defineProperty(o,\"length\",{get:function(){return this.roots.length}}),o.makeSet=function(){var s=this.roots.length;return this.roots.push(s),this.ranks.push(0),s},o.find=function(s){for(var l=s,u=this.roots;u[s]!==s;)s=u[s];for(;u[l]!==s;){var c=u[l];u[l]=s,l=c}return s},o.link=function(s,l){var u=this.find(s),c=this.find(l);if(u!==c){var f=this.ranks,h=this.roots,d=f[u],v=f[c];d<v?h[u]=c:v<d?h[c]=u:(h[c]=u,++f[u])}}},1682:function(i){\"use strict\";function a(l,u){for(var c=1,f=l.length,h=l[0],d=l[0],v=1;v<f;++v)if(d=h,h=l[v],u(h,d)){if(v===c){c++;continue}l[c++]=h}return l.length=c,l}function o(l){for(var u=1,c=l.length,f=l[0],h=l[0],d=1;d<c;++d,h=f)if(h=f,f=l[d],f!==h){if(d===u){u++;continue}l[u++]=f}return l.length=u,l}function s(l,u,c){return l.length===0?l:u?(c||l.sort(u),a(l,u)):(c||l.sort(),o(l))}i.exports=s},4359:function(i,a,o){\"use strict\";i.exports=c;var s=o(7718),l=null,u=null;typeof document!=\"undefined\"&&(l=document.createElement(\"canvas\"),l.width=8192,l.height=1024,u=l.getContext(\"2d\"));function c(f,h){return(typeof h!=\"object\"||h===null)&&(h={}),s(f,h.canvas||l,h.context||u,h)}},7718:function(i,a,o){i.exports=O,i.exports.processPixels=z;var s=o(3711),l=o(9618),u=o(5878),c=o(332),f=o(2538),h=o(2095),d=\"b\",v=\"b|\",x=\"i\",b=\"i|\",p=\"sup\",C=\"+\",E=\"+1\",A=\"sub\",L=\"-\",_=\"-1\";function k(V,G,Z,H){for(var N=\"<\"+V+\">\",j=\"</\"+V+\">\",re=N.length,oe=j.length,_e=G[0]===C||G[0]===L,Me=0,ke=-oe;Me>-1&&(Me=Z.indexOf(N,Me),!(Me===-1||(ke=Z.indexOf(j,Me+re),ke===-1)||ke<=Me));){for(var me=Me;me<ke+oe;++me)if(me<Me+re||me>=ke)H[me]=null,Z=Z.substr(0,me)+\" \"+Z.substr(me+1);else if(H[me]!==null){var ie=H[me].indexOf(G[0]);ie===-1?H[me]+=G:_e&&(H[me]=H[me].substr(0,ie+1)+(1+parseInt(H[me][ie+1]))+H[me].substr(ie+2))}var Se=Me+re,Le=Z.substr(Se,ke-Se),Ae=Le.indexOf(N);Ae!==-1?Me=Ae:Me=ke+oe}return H}function M(V,G,Z){for(var H=G.textAlign||\"start\",N=G.textBaseline||\"alphabetic\",j=[1<<30,1<<30],re=[0,0],oe=V.length,_e=0;_e<oe;++_e)for(var Me=V[_e],ke=0;ke<2;++ke)j[ke]=Math.min(j[ke],Me[ke])|0,re[ke]=Math.max(re[ke],Me[ke])|0;var me=0;switch(H){case\"center\":me=-.5*(j[0]+re[0]);break;case\"right\":case\"end\":me=-re[0];break;case\"left\":case\"start\":me=-j[0];break;default:throw new Error(\"vectorize-text: Unrecognized textAlign: '\"+H+\"'\")}var ie=0;switch(N){case\"hanging\":case\"top\":ie=-j[1];break;case\"middle\":ie=-.5*(j[1]+re[1]);break;case\"alphabetic\":case\"ideographic\":ie=-3*Z;break;case\"bottom\":ie=-re[1];break;default:throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\"+N+\"'\")}var Se=1/Z;return\"lineHeight\"in G?Se*=+G.lineHeight:\"width\"in G?Se=G.width/(re[0]-j[0]):\"height\"in G&&(Se=G.height/(re[1]-j[1])),V.map(function(Le){return[Se*(Le[0]+me),Se*(Le[1]+ie)]})}function g(V,G,Z,H,N,j){Z=Z.replace(/\\n/g,\"\"),j.breaklines===!0?Z=Z.replace(/\\<br\\>/g,`\n",
       "`):Z=Z.replace(/\\<br\\>/g,\" \");var re=\"\",oe=[];for(ge=0;ge<Z.length;++ge)oe[ge]=re;j.bolds===!0&&(oe=k(d,v,Z,oe)),j.italics===!0&&(oe=k(x,b,Z,oe)),j.superscripts===!0&&(oe=k(p,E,Z,oe)),j.subscripts===!0&&(oe=k(A,_,Z,oe));var _e=[],Me=\"\";for(ge=0;ge<Z.length;++ge)oe[ge]!==null&&(Me+=Z[ge],_e.push(oe[ge]));var ke=Me.split(`\n",
       "`),me=ke.length,ie=Math.round(N*H),Se=H,Le=H*2,Ae=0,De=me*ie+Le;V.height<De&&(V.height=De),G.fillStyle=\"#000\",G.fillRect(0,0,V.width,V.height),G.fillStyle=\"#fff\";var Pe,ge,Fe,ce,Ze,ct=0,pt=\"\";function Wt(){if(pt!==\"\"){var Qe=G.measureText(pt).width;G.fillText(pt,Se+Fe,Le+ce),Fe+=Qe}}function st(){return\"\"+Math.round(Ze)+\"px \"}function lt(Qe,Et){var er=\"\"+G.font;if(j.subscripts===!0){var Ut=Qe.indexOf(L),Ft=Et.indexOf(L),bt=Ut>-1?parseInt(Qe[1+Ut]):0,yt=Ft>-1?parseInt(Et[1+Ft]):0;bt!==yt&&(er=er.replace(st(),\"?px \"),Ze*=Math.pow(.75,yt-bt),er=er.replace(\"?px \",st())),ce+=.25*ie*(yt-bt)}if(j.superscripts===!0){var Yt=Qe.indexOf(C),lr=Et.indexOf(C),Tr=Yt>-1?parseInt(Qe[1+Yt]):0,Rr=lr>-1?parseInt(Et[1+lr]):0;Tr!==Rr&&(er=er.replace(st(),\"?px \"),Ze*=Math.pow(.75,Rr-Tr),er=er.replace(\"?px \",st())),ce-=.25*ie*(Rr-Tr)}if(j.bolds===!0){var ei=Qe.indexOf(v)>-1,Wr=Et.indexOf(v)>-1;!ei&&Wr&&(Ur?er=er.replace(\"italic \",\"italic bold \"):er=\"bold \"+er),ei&&!Wr&&(er=er.replace(\"bold \",\"\"))}if(j.italics===!0){var Ur=Qe.indexOf(b)>-1,dt=Et.indexOf(b)>-1;!Ur&&dt&&(er=\"italic \"+er),Ur&&!dt&&(er=er.replace(\"italic \",\"\"))}G.font=er}for(Pe=0;Pe<me;++Pe){var Gt=ke[Pe]+`\n",
       "`;for(Fe=0,ce=Pe*ie,Ze=H,pt=\"\",ge=0;ge<Gt.length;++ge){var Nt=ge+ct<_e.length?_e[ge+ct]:_e[_e.length-1];re===Nt?pt+=Gt[ge]:(Wt(),pt=Gt[ge],Nt!==void 0&&(lt(re,Nt),re=Nt))}Wt(),ct+=Gt.length;var $t=Math.round(Fe+2*Se)|0;Ae<$t&&(Ae=$t)}var sr=Ae,wr=Le+ie*me,ur=l(G.getImageData(0,0,sr,wr).data,[wr,sr,4]);return ur.pick(-1,-1,0).transpose(1,0)}function P(V,G){var Z=s(V,128);return G?u(Z.cells,Z.positions,.25):{edges:Z.cells,positions:Z.positions}}function T(V,G,Z,H){var N=P(V,H),j=M(N.positions,G,Z),re=N.edges,oe=G.orientation===\"ccw\";if(c(j,re),G.polygons||G.polygon||G.polyline){for(var _e=h(re,j),Me=new Array(_e.length),ke=0;ke<_e.length;++ke){for(var me=_e[ke],ie=new Array(me.length),Se=0;Se<me.length;++Se){for(var Le=me[Se],Ae=new Array(Le.length),De=0;De<Le.length;++De)Ae[De]=j[Le[De]].slice();oe&&Ae.reverse(),ie[Se]=Ae}Me[ke]=ie}return Me}else return G.triangles||G.triangulate||G.triangle?{cells:f(j,re,{delaunay:!1,exterior:!1,interior:!0}),positions:j}:{edges:re,positions:j}}function z(V,G,Z){try{return T(V,G,Z,!0)}catch(H){}try{return T(V,G,Z,!1)}catch(H){}return G.polygons||G.polyline||G.polygon?[]:G.triangles||G.triangulate||G.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function O(V,G,Z,H){var N=64,j=1.25,re={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};H&&(H.size&&H.size>0&&(N=H.size),H.lineSpacing&&H.lineSpacing>0&&(j=H.lineSpacing),H.styletags&&H.styletags.breaklines&&(re.breaklines=!!H.styletags.breaklines),H.styletags&&H.styletags.bolds&&(re.bolds=!!H.styletags.bolds),H.styletags&&H.styletags.italics&&(re.italics=!!H.styletags.italics),H.styletags&&H.styletags.subscripts&&(re.subscripts=!!H.styletags.subscripts),H.styletags&&H.styletags.superscripts&&(re.superscripts=!!H.styletags.superscripts)),Z.font=[H.fontStyle,H.fontVariant,H.fontWeight,N+\"px\",H.font].filter(function(_e){return _e}).join(\" \"),Z.textAlign=\"start\",Z.textBaseline=\"alphabetic\",Z.direction=\"ltr\";var oe=g(G,Z,V,N,j,re);return z(oe,H,N)}},1538:function(i){(function(){\"use strict\";if(typeof ses!=\"undefined\"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!=\"undefined\"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap==\"function\"){var l=WeakMap;if(!(typeof navigator!=\"undefined\"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,x=\"weakmap:\",b=x+\"ident:\"+Math.random()+\"___\";if(typeof crypto!=\"undefined\"&&typeof crypto.getRandomValues==\"function\"&&typeof ArrayBuffer==\"function\"&&typeof Uint8Array==\"function\"){var p=new ArrayBuffer(25),C=new Uint8Array(p);crypto.getRandomValues(C),b=x+\"rand:\"+Array.prototype.map.call(C,function(T){return(T%36).toString(36)}).join(\"\")+\"___\"}function E(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)===\"___\")}if(d(Object,\"getOwnPropertyNames\",{value:function(z){return h(z).filter(E)}}),\"getPropertyNames\"in Object){var A=Object.getPropertyNames;d(Object,\"getPropertyNames\",{value:function(z){return A(z).filter(E)}})}function L(T){if(T!==Object(T))throw new TypeError(\"Not an object: \"+T);var z=T[b];if(z&&z.key===T)return z;if(v(T)){z={key:T};try{return d(T,b,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch(O){return}}}(function(){var T=Object.freeze;d(Object,\"freeze\",{value:function(G){return L(G),T(G)}});var z=Object.seal;d(Object,\"seal\",{value:function(G){return L(G),z(G)}});var O=Object.preventExtensions;d(Object,\"preventExtensions\",{value:function(G){return L(G),O(G)}})})();function _(T){return T.prototype=null,Object.freeze(T)}var k=!1;function M(){!k&&typeof console!=\"undefined\"&&(k=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}var g=0,P=function(){this instanceof P||M();var T=[],z=[],O=g++;function V(N,j){var re,oe=L(N);return oe?O in oe?oe[O]:j:(re=T.indexOf(N),re>=0?z[re]:j)}function G(N){var j=L(N);return j?O in j:T.indexOf(N)>=0}function Z(N,j){var re,oe=L(N);return oe?oe[O]=j:(re=T.indexOf(N),re>=0?z[re]=j:(re=T.length,z[re]=j,T[re]=N)),this}function H(N){var j=L(N),re,oe;return j?O in j&&delete j[O]:(re=T.indexOf(N),re<0?!1:(oe=T.length-1,T[re]=void 0,z[re]=z[oe],T[re]=T[oe],T.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:_(V)},has___:{value:_(G)},set___:{value:_(Z)},delete___:{value:_(H)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,O){return this.get___(z,O)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,O){return this.set___(z,O)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l==\"function\"?function(){s&&typeof Proxy!=\"undefined\"&&(Proxy=void 0);function T(){this instanceof P||M();var z=new l,O=void 0,V=!1;function G(j,re){return O?z.has(j)?z.get(j):O.get___(j,re):z.get(j,re)}function Z(j){return z.has(j)||(O?O.has___(j):!1)}var H;s?H=function(j,re){return z.set(j,re),z.has(j)||(O||(O=new P),O.set(j,re)),this}:H=function(j,re){if(V)try{z.set(j,re)}catch(oe){O||(O=new P),O.set___(j,re)}else z.set(j,re);return this};function N(j){var re=!!z.delete(j);return O&&O.delete___(j)||re}return Object.create(P.prototype,{get___:{value:_(G)},has___:{value:_(Z)},set___:{value:_(H)},delete___:{value:_(N)},permitHostObjects___:{value:_(function(j){if(j===o)V=!0;else throw new Error(\"bogus call to permitHostObjects___\")})}})}T.prototype=P.prototype,i.exports=T,Object.defineProperty(WeakMap.prototype,\"constructor\",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!=\"undefined\"&&(Proxy=void 0),i.exports=P)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!=\"object\"||c===null)&&typeof c!=\"function\")throw new Error(\"Weakmap-shim: Key must be object\");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,\"valueOf\",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty(\"value\")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return\"value\"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){\"use strict\";function a(){return function(f,h,d,v,x,b){var p=f[0],C=d[0],E=[0],A=C;v|=0;var L=0,_=C;for(L=0;L<p;++L){{var k=h[v]-b,M=h[v+A]-b;k>=0!=M>=0&&x.push(E[0]+.5+.5*(k+M)/(k-M))}v+=_,++E[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,x,b){var p=v.dtype,C=v.order,E=[p,C.join()].join(),A=h[E];return A||(h[E]=A=f([p,C])),A(v.shape.slice(0),v.data,v.stride,v.offset|0,x,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:\"zeroCrossings\"})},781:function(i,a,o){\"use strict\";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis==\"object\")return globalThis;try{return this||new Function(\"return this\")()}catch(i){if(typeof window==\"object\")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);nPe.exports=n})()});var dX=ye((Hpr,aPe)=>{\"use strict\";aPe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var uPe=ye((jpr,lPe)=>{\"use strict\";var oPe=dX();lPe.exports=SPt;var sPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function SPt(e){var t,r=[],n=1,i;if(typeof e==\"string\")if(e=e.toLowerCase(),oPe[e])r=oPe[e].slice(),i=\"rgb\";else if(e===\"transparent\")n=0,i=\"rgb\",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i=\"rgb\"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(e)){var l=t[1],u=l===\"rgb\",a=l.replace(/a$/,\"\");i=a;var o=a===\"cmyk\"?4:a===\"gray\"?1:3;r=t[2].trim().split(/\\s*[,\\/]\\s*|\\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a===\"rgb\"?parseFloat(h)*255/100:parseFloat(h);if(a[d]===\"h\"){if(/deg$/.test(h))return parseFloat(h);if(sPe[h]!==void 0)return sPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\\s|\\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join(\"\").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i=\"rgb\",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i=\"rgb\",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i=\"hsl\",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i=\"rgb\",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var fPe=ye((Wpr,cPe)=>{\"use strict\";var MPt=uPe();cPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=MPt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]===\"h\"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]===\"h\"&&(r=EPt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function EPt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var XE=ye((Xpr,hPe)=>{hPe.exports=CPt;function CPt(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var WD=ye((Zpr,dPe)=>{dPe.exports=function(e){switch(e){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}});var J_=ye((Ypr,vPe)=>{\"use strict\";var kPt=fPe(),XD=XE(),LPt=WD();vPe.exports=function(t,r){(r===\"float\"||!r)&&(r=\"array\"),r===\"uint\"&&(r=\"uint8\"),r===\"uint_clamped\"&&(r=\"uint8_clamped\");var n=LPt(r),i=new n(4),a=r!==\"uint8\"&&r!==\"uint8_clamped\";return(!t.length||typeof t==\"string\")&&(t=kPt(t),t[0]/=255,t[1]/=255,t[2]/=255),PPt(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=XD(Math.floor(t[0]*255),0,255),i[1]=XD(Math.floor(t[1]*255),0,255),i[2]=XD(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:XD(Math.floor(t[3]*255),0,255)),i)};function PPt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var Jy=ye((Kpr,pPe)=>{\"use strict\";var IPt=J_();function RPt(e){return e?IPt(e):[0,0,0,1]}pPe.exports=RPt});var $y=ye((Jpr,wPe)=>{\"use strict\";var xPe=Eo(),DPt=cd(),ZD=J_(),YD=tc(),FPt=Eh().defaultLine,gPe=vv().isArrayOrTypedArray,vX=ZD(FPt),bPe=1;function mPe(e,t){var r=e;return r[3]*=t,r}function yPe(e){if(xPe(e))return vX;var t=ZD(e);return t.length?t:vX}function _Pe(e){return xPe(e)?e:bPe}function zPt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=gPe(n),a=gPe(t),o=YD.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=YD.makeColorScaleFuncFromTrace(e):l=yPe,i?u=function(v,x){return v[x]===void 0?vX:ZD(l(v[x]))}:u=yPe,a?c=function(v,x){return v[x]===void 0?bPe:_Pe(v[x])}:c=_Pe,i||a)for(var d=0;d<r;d++)f=u(n,d),h=c(t,d),s[d]=mPe(f,h);else s=mPe(ZD(n),t);return s}function OPt(e){var t=YD.extractOpts(e),r=t.colorscale;return t.reversescale&&(r=YD.flipScale(t.colorscale)),r.map(function(n){var i=n[0],a=DPt(n[1]),o=a.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}wPe.exports={formatColor:zPt,parseColorScale:OPt}});var pX=ye(($pr,TPe)=>{\"use strict\";TPe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var KD=ye((Qpr,APe)=>{\"use strict\";APe.exports={circle:\"\\u25CF\",\"circle-open\":\"\\u25CB\",square:\"\\u25A0\",\"square-open\":\"\\u25A1\",diamond:\"\\u25C6\",\"diamond-open\":\"\\u25C7\",cross:\"+\",x:\"\\u274C\"}});var MPe=ye((e0r,SPe)=>{\"use strict\";var qPt=qa();function gX(e,t,r,n){if(!t||!t.visible)return null;for(var i=qPt.getComponentMethod(\"errorbars\",\"makeComputeError\")(t),a=new Array(e.length),o=0;o<e.length;o++){var s=i(+e[o],o);if(n.type===\"log\"){var l=n.c2l(e[o]),u=e[o]-s[0],c=e[o]+s[1];if(a[o]=[(n.c2l(u,!0)-l)*r,(n.c2l(c,!0)-l)*r],u>0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function BPt(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function NPt(e,t,r){var n=[gX(e.x,e.error_x,t[0],r.xaxis),gX(e.y,e.error_y,t[1],r.yaxis),gX(e.z,e.error_z,t[2],r.zaxis)],i=BPt(n);if(i===0)return null;for(var a=new Array(i),o=0;o<i;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(n[l])for(var u=0;u<2;u++)s[u][l]=n[l][o][u];a[o]=s}return a}SPe.exports=NPt});var FPe=ye((t0r,DPe)=>{\"use strict\";var UPt=Od().gl_line3d,EPe=Od().gl_scatter3d,VPt=Od().gl_error3d,GPt=Od().gl_mesh3d,HPt=Od().delaunay_triangulate,Qy=Dr(),IPe=Jy(),JD=$y().formatColor,jPt=S3(),mX=pX(),WPt=KD(),XPt=ho(),ZPt=rp().appendArrayPointValue,YPt=MPe();function RPe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\"\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var _X=RPe.prototype;_X.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel=\"\",this.textLabels&&(Qy.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function KPt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s<e.length;++s){var l=e[s];isNaN(l[n])||!isFinite(l[n])||isNaN(l[i])||!isFinite(l[i])||(a.push([l[n],l[i]]),o.push(s))}var u=HPt(a);for(s=0;s<u.length;++s)for(var c=u[s],f=0;f<c.length;++f)c[f]=o[c[f]];return{positions:e,cells:u,meshColor:t}}function JPt(e){for(var t=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=e[i];a&&a.copy_zstyle!==!1&&e[2].visible!==!1&&(a=e[2]),!(!a||!a.visible)&&(t[i]=a.width/2,r[i]=IPe(a.color),n[i]=a.thickness)}return{capSize:t,color:r,lineWidth:n}}function CPe(e){return e==null?0:e.indexOf(\"left\")>-1?-1:e.indexOf(\"right\")>-1?1:0}function kPe(e){return e==null?0:e.indexOf(\"top\")>-1?-1:e.indexOf(\"bottom\")>-1?1:0}function $Pt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i<e.length;i++)n[i]=[t,r],e[i]&&(n[i][0]=CPe(e[i]),n[i][1]=kPe(e[i]));else n[0]=CPe(e),n[1]=kPe(e);return n}function QPt(e,t){return t(e*4)}function eIt(e){return WPt[e]}function yX(e,t,r,n,i){var a=null;if(Qy.isArrayOrTypedArray(e)){a=[];for(var o=0;o<t;o++)e[o]===void 0?a[o]=n:a[o]=r(e[o],i)}else a=r(e,Qy.identity);return a}function tIt(e,t){var r=[],n=e.fullSceneLayout,i=e.dataScale,a=n.xaxis,o=n.yaxis,s=n.zaxis,l=t.marker,u=t.line,c=t.x||[],f=t.y||[],h=t.z||[],d=c.length,v=t.xcalendar,x=t.ycalendar,b=t.zcalendar,p,C,E,A,L,_;for(L=0;L<d;L++)p=a.d2l(c[L],0,v)*i[0],C=o.d2l(f[L],0,x)*i[1],E=s.d2l(h[L],0,b)*i[2],r[L]=[p,C,E];if(Array.isArray(t.text))_=t.text;else if(Qy.isTypedArray(t.text))_=Array.from(t.text);else if(t.text!==void 0)for(_=new Array(d),L=0;L<d;L++)_[L]=t.text;function k(_e,Me){var ke=n[_e];return XPt.tickText(ke,ke.d2l(Me),!0).text}var M=t.texttemplate;if(M){var g=e.fullLayout,P=g._d3locale,T=Array.isArray(M),z=T?Math.min(M.length,d):d,O=T?function(_e){return M[_e]}:function(){return M};for(_=new Array(z),L=0;L<z;L++){var V={x:c[L],y:f[L],z:h[L]},G={xLabel:k(\"xaxis\",c[L]),yLabel:k(\"yaxis\",f[L]),zLabel:k(\"zaxis\",h[L])},Z={};ZPt(Z,t,L);var H=t._meta||{};_[L]=Qy.texttemplateString(O(L),G,P,Z,V,H)}}if(A={position:r,mode:t.mode,text:_},\"line\"in t&&(A.lineColor=JD(u,1,d),A.lineWidth=u.width,A.lineDashes=u.dash),\"marker\"in t){var N=jPt(t);A.scatterColor=JD(l,1,d),A.scatterSize=yX(l.size,d,QPt,20,N),A.scatterMarker=yX(l.symbol,d,eIt,\"\\u25CF\"),A.scatterLineWidth=l.line.width,A.scatterLineColor=JD(l.line,1,d),A.scatterAngle=0}\"textposition\"in t&&(A.textOffset=$Pt(t.textposition),A.textColor=JD(t.textfont,1,d),A.textSize=yX(t.textfont.size,d,Qy.identity,12),A.textFontFamily=t.textfont.family,A.textFontWeight=t.textfont.weight,A.textFontStyle=t.textfont.style,A.textFontVariant=t.textfont.variant,A.textAngle=0);var j=[\"x\",\"y\",\"z\"];for(A.project=[!1,!1,!1],A.projectScale=[1,1,1],A.projectOpacity=[1,1,1],L=0;L<3;++L){var re=t.projection[j[L]];(A.project[L]=re.show)&&(A.projectOpacity[L]=re.opacity,A.projectScale[L]=re.scale)}A.errorBounds=YPt(t,i,n);var oe=JPt([t.error_x,t.error_y,t.error_z]);return A.errorColor=oe.color,A.errorLineWidth=oe.lineWidth,A.errorCapSize=oe.capSize,A.delaunayAxis=t.surfaceaxis,A.delaunayColor=IPe(t.surfacecolor),A}function LPe(e){if(Qy.isArrayOrTypedArray(e)){var t=e[0];return Qy.isArrayOrTypedArray(t)&&(e=t),\"rgb(\"+e.slice(0,3).map(function(r){return Math.round(r*255)})+\")\"}return null}function PPe(e){return Qy.isArrayOrTypedArray(e)?e.length===4&&typeof e[0]==\"number\"?LPe(e):e.map(LPe):null}_X.update=function(e){var t=this.scene.glplot.gl,r,n,i,a,o=mX.solid;this.data=e;var s=tIt(this.scene,e);\"mode\"in s&&(this.mode=s.mode),\"lineDashes\"in s&&s.lineDashes in mX&&(o=mX[s.lineDashes]),this.color=PPe(s.scatterColor)||PPe(s.lineColor),this.dataPoints=s.position,r={gl:this.scene.glplot.gl,position:s.position,color:s.lineColor,lineWidth:s.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:e.opacity,connectGaps:e.connectgaps},this.mode.indexOf(\"lines\")!==-1?this.linePlot?this.linePlot.update(r):(this.linePlot=UPt(r),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var l=e.opacity;if(e.marker&&e.marker.opacity!==void 0&&(l*=e.marker.opacity),n={gl:this.scene.glplot.gl,position:s.position,color:s.scatterColor,size:s.scatterSize,glyph:s.scatterMarker,opacity:l,orthographic:!0,lineWidth:s.scatterLineWidth,lineColor:s.scatterLineColor,project:s.project,projectScale:s.projectScale,projectOpacity:s.projectOpacity},this.mode.indexOf(\"markers\")!==-1?this.scatterPlot?this.scatterPlot.update(n):(this.scatterPlot=EPe(n),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),a={gl:this.scene.glplot.gl,position:s.position,glyph:s.text,color:s.textColor,size:s.textSize,angle:s.textAngle,alignment:s.textOffset,font:s.textFontFamily,fontWeight:s.textFontWeight,fontStyle:s.textFontStyle,fontVariant:s.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,this.mode.indexOf(\"text\")!==-1?this.textMarkers?this.textMarkers.update(a):(this.textMarkers=EPe(a),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),i={gl:this.scene.glplot.gl,position:s.position,color:s.errorColor,error:s.errorBounds,lineWidth:s.errorLineWidth,capSize:s.errorCapSize,opacity:e.opacity},this.errorBars?s.errorBounds?this.errorBars.update(i):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):s.errorBounds&&(this.errorBars=VPt(i),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),s.delaunayAxis>=0){var u=KPt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=GPt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};_X.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function rIt(e,t){var r=new RPe(e,t.uid);return r.update(t),r}DPe.exports=rIt});var AX=ye((r0r,qPe)=>{\"use strict\";var e1=pf(),iIt=ec(),TX=Tu(),xX=df().axisHoverFormat,nIt=Qo().hovertemplateAttrs,aIt=Qo().texttemplateAttrs,zPe=Gl(),oIt=pX(),sIt=KD(),Yg=Ao().extendFlat,lIt=mc().overrideAll,OPe=Z1(),uIt=e1.line,N2=e1.marker,cIt=N2.line,fIt=Yg({width:uIt.width,dash:{valType:\"enumerated\",values:OPe(oIt),dflt:\"solid\"}},TX(\"line\"));function bX(e){return{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}}}var wX=qPe.exports=lIt({x:e1.x,y:e1.y,z:{valType:\"data_array\"},text:Yg({},e1.text,{}),texttemplate:aIt({},{}),hovertext:Yg({},e1.hovertext,{}),hovertemplate:nIt(),xhoverformat:xX(\"x\"),yhoverformat:xX(\"y\"),zhoverformat:xX(\"z\"),mode:Yg({},e1.mode,{dflt:\"lines+markers\"}),surfaceaxis:{valType:\"enumerated\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\"color\"},projection:{x:bX(\"x\"),y:bX(\"y\"),z:bX(\"z\")},connectgaps:e1.connectgaps,line:fIt,marker:Yg({symbol:{valType:\"enumerated\",values:OPe(sIt),dflt:\"circle\",arrayOk:!0},size:Yg({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yg({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yg({width:Yg({},cIt.width,{arrayOk:!1})},TX(\"marker.line\"))},TX(\"marker\")),textposition:Yg({},e1.textposition,{dflt:\"top center\"}),textfont:iIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:\"calc\",colorEditType:\"style\",arrayOk:!0,variantValues:[\"normal\",\"small-caps\"]}),opacity:zPe.opacity,hoverinfo:Yg({},zPe.hoverinfo)},\"calc\",\"nested\");wX.x.editType=wX.y.editType=wX.z.editType=\"calc+clearAxisTypes\"});var UPe=ye((i0r,NPe)=>{\"use strict\";var BPe=qa(),hIt=Dr(),SX=Ru(),dIt=$p(),vIt=R0(),pIt=D0(),gIt=AX();NPe.exports=function(t,r,n,i){function a(d,v){return hIt.coerce(t,r,gIt,d,v)}var o=mIt(t,r,a,i);if(!o){r.visible=!1;return}a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),a(\"mode\"),SX.hasMarkers(r)&&dIt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),SX.hasLines(r)&&(a(\"connectgaps\"),vIt(t,r,n,i,a)),SX.hasText(r)&&(a(\"texttemplate\"),pIt(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a(\"surfaceaxis\")>=0&&a(\"surfacecolor\",s||l);for(var u=[\"x\",\"y\",\"z\"],c=0;c<3;++c){var f=\"projection.\"+u[c];a(f+\".show\")&&(a(f+\".opacity\"),a(f+\".scale\"))}var h=BPe.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,s||l||n,{axis:\"z\"}),h(t,r,s||l||n,{axis:\"y\",inherit:\"z\"}),h(t,r,s||l||n,{axis:\"x\",inherit:\"z\"})};function mIt(e,t,r,n){var i=0,a=r(\"x\"),o=r(\"y\"),s=r(\"z\"),l=BPe.getComponentMethod(\"calendars\",\"handleTraceDefaults\");return l(e,t,[\"x\",\"y\",\"z\"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var GPe=ye((n0r,VPe)=>{\"use strict\";var yIt=Cm(),_It=F0();VPe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return yIt(n,r),_It(t,r),n}});var jPe=ye((a0r,HPe)=>{HPe.exports=xIt;function xIt(e,t){if(typeof e!=\"string\")throw new TypeError(\"must specify type string\");if(t=t||{},typeof document==\"undefined\"&&!t.canvas)return null;var r=t.canvas||document.createElement(\"canvas\");typeof t.width==\"number\"&&(r.width=t.width),typeof t.height==\"number\"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf(\"webgl\")===0&&a.push(\"experimental-\"+e);for(var o=0;o<a.length;o++)if(i=r.getContext(a[o],n),i)return i}catch(s){i=null}return i||null}});var XPe=ye((o0r,WPe)=>{var bIt=jPe();WPe.exports=function(t){return bIt(\"webgl\",t)}});var MX=ye((s0r,YPe)=>{\"use strict\";var ZPe=Ca(),wIt=function(){};YPe.exports=function(t){for(var r in t)typeof t[r]==\"function\"&&(t[r]=wIt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement(\"div\");n.className=\"no-webgl\",n.style.cursor=\"pointer\",n.style.fontSize=\"24px\",n.style.color=ZPe.defaults[0],n.style.position=\"absolute\",n.style.left=n.style.top=\"0px\",n.style.width=n.style.height=\"100%\",n.style[\"background-color\"]=ZPe.lightLine,n.style[\"z-index\"]=30;var i=document.createElement(\"p\");return i.textContent=\"WebGL is not supported by your browser - visit https://get.webgl.org for more info\",i.style.position=\"relative\",i.style.top=\"50%\",i.style.left=\"50%\",i.style.height=\"30%\",i.style.width=\"50%\",i.style.margin=\"-15% 0 0 -25%\",n.appendChild(i),t.container.appendChild(n),t.container.style.background=\"#FFFFFF\",t.container.onclick=function(){window.open(\"https://get.webgl.org\")},!1}});var $Pe=ye((l0r,JPe)=>{\"use strict\";var U2=Jy(),TIt=Dr(),AIt=[\"xaxis\",\"yaxis\",\"zaxis\"];function KPe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickFontWeight=[\"normal\",\"normal\",\"normal\",\"normal\"],this.tickFontStyle=[\"normal\",\"normal\",\"normal\",\"normal\"],this.tickFontVariant=[\"normal\",\"normal\",\"normal\",\"normal\"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"Open Sans\",\"Open Sans\",\"Open Sans\"],this.labelSize=[20,20,20],this.labelFontWeight=[\"normal\",\"normal\",\"normal\",\"normal\"],this.labelFontStyle=[\"normal\",\"normal\",\"normal\",\"normal\"],this.labelFontVariant=[\"normal\",\"normal\",\"normal\",\"normal\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var SIt=KPe.prototype;SIt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[AIt[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?TIt.templateString(i.title.text,e._meta):i.title.text,\"font\"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),\"showline\"in i&&(r.lineEnable[n]=i.showline),\"linecolor\"in i&&(r.lineColor[n]=U2(i.linecolor)),\"linewidth\"in i&&(r.lineWidth[n]=i.linewidth),\"showgrid\"in i&&(r.gridEnable[n]=i.showgrid),\"gridcolor\"in i&&(r.gridColor[n]=U2(i.gridcolor)),\"gridwidth\"in i&&(r.gridWidth[n]=i.gridwidth),i.type===\"log\"?r.zeroEnable[n]=!1:\"zeroline\"in i&&(r.zeroEnable[n]=i.zeroline),\"zerolinecolor\"in i&&(r.zeroLineColor[n]=U2(i.zerolinecolor)),\"zerolinewidth\"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),\"ticks\"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,\"ticklen\"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),\"tickcolor\"in i&&(r.lineTickColor[n]=U2(i.tickcolor)),\"tickwidth\"in i&&(r.lineTickWidth[n]=i.tickwidth),\"tickangle\"in i&&(r.tickAngle[n]=i.tickangle===\"auto\"?-3600:Math.PI*-i.tickangle/180),\"showticklabels\"in i&&(r.tickEnable[n]=i.showticklabels),\"tickfont\"in i&&(i.tickfont.color&&(r.tickColor[n]=U2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),\"mirror\"in i?[\"ticks\",\"all\",\"allticks\"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,\"showbackground\"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function MIt(e,t){var r=new KPe;return r.merge(e,t),r}JPe.exports=MIt});var tIe=ye((u0r,eIe)=>{\"use strict\";var EIt=Jy(),CIt=[\"xaxis\",\"yaxis\",\"zaxis\"];function QPe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var kIt=QPe.prototype;kIt.merge=function(e){for(var t=0;t<3;++t){var r=e[CIt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=EIt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function LIt(e){var t=new QPe;return t.merge(e),t}eIe.exports=LIt});var nIe=ye((c0r,iIe)=>{\"use strict\";iIe.exports=FIt;var rIe=ho(),PIt=Dr(),IIt=[\"xaxis\",\"yaxis\",\"zaxis\"],RIt=[0,0,0];function DIt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;t[r]=i}return t}function FIt(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,n=e.fullSceneLayout,i=[[],[],[]],a=0;a<3;++a){var o=n[IIt[a]];if(o._length=(r[a].hi-r[a].lo)*r[a].pixelsPerDataUnit/e.dataScale[a],Math.abs(o._length)===1/0||isNaN(o._length))i[a]=[];else{o._input_range=o.range.slice(),o.range[0]=r[a].lo/e.dataScale[a],o.range[1]=r[a].hi/e.dataScale[a],o._m=1/(e.dataScale[a]*r[a].pixelsPerDataUnit),o.range[0]===o.range[1]&&(o.range[0]-=1,o.range[1]+=1);var s=o.tickmode;if(o.tickmode===\"auto\"){o.tickmode=\"linear\";var l=o.nticks||PIt.constrain(o._length/40,4,9);rIe.autoTicks(o,Math.abs(o.range[1]-o.range[0])/l)}for(var u=rIe.calcTicks(o,{msUTC:!0}),c=0;c<u.length;++c)u[c].x=u[c].x*e.dataScale[a],o.type===\"date\"&&(u[c].text=u[c].text.replace(/\\<br\\>/g,\" \"));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){RIt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=DIt(i)}});var fIe=ye((f0r,cIe)=>{\"use strict\";var sIe=Od().gl_plot3d,zIt=sIe.createCamera,aIe=sIe.createScene,OIt=XPe(),qIt=PL(),eF=qa(),lp=Dr(),QD=lp.preserveDrawingBuffer(),tF=ho(),Kg=vf(),BIt=Jy(),NIt=MX(),UIt=BU(),VIt=$Pe(),GIt=tIe(),HIt=nIe(),jIt=wg().applyAutorangeOptions,ZE,$D,lIe=!1;function uIe(e,t){var r=document.createElement(\"div\"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");i.style.position=\"absolute\",i.style.top=i.style.left=\"0px\",i.style.width=i.style.height=\"100%\",i.style[\"z-index\"]=20,i.style[\"pointer-events\"]=\"none\",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position=\"absolute\",r.style.top=r.style.left=\"0px\",r.style.width=r.style.height=\"100%\",n.appendChild(r),this.fullLayout=t,this.id=e.id||\"scene\",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=VIt(t,t[this.id]),this.spikeOptions=GIt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=eF.getComponentMethod(\"annotations3d\",\"convert\"),this.drawAnnotations=eF.getComponentMethod(\"annotations3d\",\"draw\"),this.initializeGLPlot()}var Av=uIe.prototype;Av.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:QD,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!$D&&(ZE=document.createElement(\"canvas\"),$D=OIt({canvas:ZE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!$D))throw new Error(\"error creating static canvas/context for image server\");t.gl=$D,t.canvas=ZE}return t};var oIe=!0;Av.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=aIe(t)}catch(n){if(e.staticMode||!oIe||QD)r=!1;else{lp.warn([\"webgl setup failed possibly due to\",\"false preserveDrawingBuffer config.\",\"The mobile/tablet device may not be detected by is-mobile module.\",\"Enabling preserveDrawingBuffer in second attempt to create webgl scene...\"].join(\" \"));try{QD=t.glOptions.preserveDrawingBuffer=!0,e.glplot=aIe(t)}catch(i){QD=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return oIe=!1,r};Av.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type===\"orthographic\";e.camera=zIt(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:\"orbit\"})};Av.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return NIt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+\".camera\"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+\".aspectratio\"]=e.glplot.getAspectratio(),n[e.id].aspectmode!==\"manual\"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+\".aspectmode\"]=\"manual\")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit(\"plotly_relayout\",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener(\"mouseup\",function(){a(e)}),e.glplot.canvas.addEventListener(\"touchstart\",function(){lIe=!0}),e.glplot.canvas.addEventListener(\"wheel\",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},qIt?{passive:!1}:!1),e.glplot.canvas.addEventListener(\"mousemove\",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit(\"plotly_relayouting\",o)}}),e.staticMode||e.glplot.canvas.addEventListener(\"webglcontextlost\",function(o){r&&r.emit&&r.emit(\"plotly_webglcontextlost\",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Av.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),HIt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h<u.length;++h)r=e.traces[u[h]],r.data.hoverinfo!==\"skip\"&&r.handlePick(f)&&(c=r),r.setContourLevels&&r.setContourLevels();function d(P,T,z){var O=e.fullSceneLayout[P+\"axis\"];return O.type!==\"log\"&&(T=O.d2l(T)),tF.hoverLabelText(O,T,z)}if(c!==null){var v=UIt(e.glplot.cameraParams,f.dataCoordinate);r=c.data;var x=t._fullData[r.index],b=f.index,p={xLabel:d(\"x\",f.traceCoordinate[0],r.xhoverformat),yLabel:d(\"y\",f.traceCoordinate[1],r.yhoverformat),zLabel:d(\"z\",f.traceCoordinate[2],r.zhoverformat)},C=Kg.castHoverinfo(x,e.fullLayout,b),E=(C||\"\").split(\"+\"),A=C&&C===\"all\";!x.hovertemplate&&!A&&(E.indexOf(\"x\")===-1&&(p.xLabel=void 0),E.indexOf(\"y\")===-1&&(p.yLabel=void 0),E.indexOf(\"z\")===-1&&(p.zLabel=void 0),E.indexOf(\"text\")===-1&&(f.textLabel=void 0),E.indexOf(\"name\")===-1&&(c.name=void 0));var L,_=[];r.type===\"cone\"||r.type===\"streamtube\"?(p.uLabel=d(\"x\",f.traceCoordinate[3],r.uhoverformat),(A||E.indexOf(\"u\")!==-1)&&_.push(\"u: \"+p.uLabel),p.vLabel=d(\"y\",f.traceCoordinate[4],r.vhoverformat),(A||E.indexOf(\"v\")!==-1)&&_.push(\"v: \"+p.vLabel),p.wLabel=d(\"z\",f.traceCoordinate[5],r.whoverformat),(A||E.indexOf(\"w\")!==-1)&&_.push(\"w: \"+p.wLabel),p.normLabel=f.traceCoordinate[6].toPrecision(3),(A||E.indexOf(\"norm\")!==-1)&&_.push(\"norm: \"+p.normLabel),r.type===\"streamtube\"&&(p.divergenceLabel=f.traceCoordinate[7].toPrecision(3),(A||E.indexOf(\"divergence\")!==-1)&&_.push(\"divergence: \"+p.divergenceLabel)),f.textLabel&&_.push(f.textLabel),L=_.join(\"<br>\")):r.type===\"isosurface\"||r.type===\"volume\"?(p.valueLabel=tF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),_.push(\"value: \"+p.valueLabel),f.textLabel&&_.push(f.textLabel),L=_.join(\"<br>\")):L=f.textLabel;var k={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Kg.appendArrayPointValue(k,x,b),r._module.eventData&&(k=x._module.eventData(k,f,x,{},b));var M={points:[k]};if(e.fullSceneLayout.hovermode){var g=[];Kg.loneHover({trace:x,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Kg.castHoverOption(x,b,\"bgcolor\")||c.color,borderColor:Kg.castHoverOption(x,b,\"bordercolor\"),fontFamily:Kg.castHoverOption(x,b,\"font.family\"),fontSize:Kg.castHoverOption(x,b,\"font.size\"),fontColor:Kg.castHoverOption(x,b,\"font.color\"),nameLength:Kg.castHoverOption(x,b,\"namelength\"),textAlign:Kg.castHoverOption(x,b,\"align\"),hovertemplate:lp.castOption(x,b,\"hovertemplate\"),hovertemplateLabels:lp.extendFlat({},k,p),eventData:[k]},{container:n,gd:t,inOut_bbox:g}),k.bbox=g[0]}f.distance<5&&(f.buttons||lIe)?t.emit(\"plotly_click\",M):t.emit(\"plotly_hover\",M),this.oldEventData=M}else Kg.loneUnhover(n),this.oldEventData&&t.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Av.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){lp.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var YE=[\"xaxis\",\"yaxis\",\"zaxis\"];function WIt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=YE[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+\"calendar\"],c=t[\"_\"+o+\"length\"];if(!lp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(lp.isArrayOrTypedArray(l[h]))for(var d=0;d<l[h].length;++d)f=s.d2l(l[h][d],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f));else f=s.d2l(l[h],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f))}}function XIt(e,t){for(var r=e.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=YE[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var u=n[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(t[0][i]=Math.min(t[0][i],c),t[1][i]=Math.max(t[1][i],c))}}}Av.plot=function(e,t,r){var n=this;if(n.plotArgs=[e,t,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=t[n.id],f=r[n.id];n.fullLayout=t,n.fullSceneLayout=c,n.axesOptions.merge(t,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(BIt(c.bgcolor)),n.setConvert(l),e?Array.isArray(e)||(e=[e]):e=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&WIt(this,i,h);XIt(this,h);var d=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=d,n.convertAnnotations(this),o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&(a=n.traces[i.uid],a?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var v=Object.keys(n.traces);e:for(o=0;o<v.length;++o){for(s=0;s<e.length;++s)if(e[s].uid===v[o]&&e[s].visible===!0&&e[s]._length!==0)continue e;a=n.traces[v[o]],a.dispose(),delete n.traces[v[o]]}n.glplot.objects.sort(function(oe,_e){return oe._trace.data.index-_e._trace.data.index});var x=[[0,0,0],[0,0,0]],b=[],p={};for(o=0;o<3;++o){l=c[YE[o]],u=l.type,u in p?(p[u].acc*=d[o],p[u].count+=1):p[u]={acc:d[o],count:1};var C;if(l.autorange){x[0][o]=1/0,x[1][o]=-1/0;var E=n.glplot.objects,A=n.fullSceneLayout.annotations||[],L=l._name.charAt(0);for(s=0;s<E.length;s++){var _=E[s],k=_.bounds,M=_._trace.data._pad||0;_.constructor.name===\"ErrorBars\"&&l._lowerLogErrorBound?x[0][o]=Math.min(x[0][o],l._lowerLogErrorBound):x[0][o]=Math.min(x[0][o],k[0][o]/d[o]-M),x[1][o]=Math.max(x[1][o],k[1][o]/d[o]+M)}for(s=0;s<A.length;s++){var g=A[s];if(g.visible){var P=l.r2l(g[L]);x[0][o]=Math.min(x[0][o],P),x[1][o]=Math.max(x[1][o],P)}}if(\"rangemode\"in l&&l.rangemode===\"tozero\"&&(x[0][o]=Math.min(x[0][o],0),x[1][o]=Math.max(x[1][o],0)),x[0][o]>x[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(C=[x[0][o],x[1][o]],C=jIt(C,l),x[0][o]=C[0],x[1][o]=C[1],l.isReversed()){var z=x[0][o];x[0][o]=x[1][o],x[1][o]=z}}else C=l.range,x[0][o]=l.r2l(C[0]),x[1][o]=l.r2l(C[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var O,V=c.aspectmode;if(V===\"cube\")O=[1,1,1];else if(V===\"manual\"){var G=c.aspectratio;O=[G.x,G.y,G.z]}else if(V===\"auto\"||V===\"data\"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[YE[o]],u=l.type;var H=p[u];Z[o]=Math.pow(H.acc,1/H.count)/d[o]}V===\"data\"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?O=Z:O=[1,1,1]}else throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");c.aspectratio.x=f.aspectratio.x=O[0],c.aspectratio.y=f.aspectratio.y=O[1],c.aspectratio.z=f.aspectratio.z=O[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,j=t._size||null;if(N&&j){var re=n.container.style;re.position=\"absolute\",re.left=j.l+N.x[0]*j.w+\"px\",re.top=j.t+(1-N.y[1])*j.h+\"px\",re.width=j.w*(N.x[1]-N.x[0])+\"px\",re.height=j.h*(N.y[1]-N.y[0])+\"px\"}n.glplot.redraw()}};Av.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener(\"wheel\",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function ZIt(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function YIt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?\"orthographic\":\"perspective\"}}}Av.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),YIt(e.camera)};Av.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,ZIt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type===\"orthographic\",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Av.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=lp.nestedProperty(e,t.id+\".camera\"),i=n.get();function a(u,c,f,h){var d=[\"up\",\"center\",\"eye\"],v=[\"x\",\"y\",\"z\"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Av.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=lp.nestedProperty(e,t.id+\".aspectratio\"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Av.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=lp.nestedProperty(e,t.id+\".camera\"),a=i.get(),h[t.id+\".camera\"]=a),c&&(o=t.glplot.getAspectratio(),s=lp.nestedProperty(e,t.id+\".aspectratio\"),l=s.get(),h[t.id+\".aspectratio\"]=l),eF.call(\"_storeDirectGUIEdit\",e,r._preGUI,h),u){i.set(n);var d=lp.nestedProperty(r,t.id+\".camera\");d.set(n)}if(c){s.set(o);var v=lp.nestedProperty(r,t.id+\".aspectratio\");v.set(o),t.glplot.redraw()}}return f};Av.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e===\"orbit\")n.mode=\"orbit\",n.keyBindingMode=\"rotate\";else if(e===\"turntable\"){n.up=[0,0,1],n.mode=\"turntable\",n.keyBindingMode=\"rotate\";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+\".camera.up\",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;eF.call(\"_storeDirectGUIEdit\",d,a._preGUI,h),o.up=f,lp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function KIt(e,t,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<t;++a)for(var o=0;o<4;++o){var s=4*(t*n+a)+o,l=4*(t*i+a)+o,u=e[s];e[s]=e[l],e[l]=u}}function JIt(e,t,r){for(var n=0;n<r;++n)for(var i=0;i<t;++i){var a=4*(t*n+i),o=e[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Av.toImage=function(e){var t=this;e||(e=\"png\"),t.staticMode&&t.container.appendChild(ZE),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),KIt(a,n,i),JIt(a,n,i);var o=document.createElement(\"canvas\");o.width=n,o.height=i;var s=o.getContext(\"2d\",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case\"jpeg\":u=o.toDataURL(\"image/jpeg\");break;case\"webp\":u=o.toDataURL(\"image/webp\");break;default:u=o.toDataURL(\"image/png\")}return t.staticMode&&t.container.removeChild(ZE),u};Av.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[YE[t]];tF.setConvert(r,e.fullLayout),r.setScale=lp.noop}};Av.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},tF.setConvert(e._mockAxis,r)};cIe.exports=uIe});var dIe=ye((h0r,hIe)=>{\"use strict\";hIe.exports={scene:{valType:\"subplotid\",dflt:\"scene\",editType:\"calc+clearAxisTypes\"}}});var CX=ye((d0r,vIe)=>{\"use strict\";var $It=Ca(),bs=Rd(),EX=Ao().extendFlat,QIt=mc().overrideAll;vIe.exports=QIt({visible:bs.visible,showspikes:{valType:\"boolean\",dflt:!0},spikesides:{valType:\"boolean\",dflt:!0},spikethickness:{valType:\"number\",min:0,dflt:2},spikecolor:{valType:\"color\",dflt:$It.defaultLine},showbackground:{valType:\"boolean\",dflt:!1},backgroundcolor:{valType:\"color\",dflt:\"rgba(204, 204, 204, 0.5)\"},showaxeslabels:{valType:\"boolean\",dflt:!0},color:bs.color,categoryorder:bs.categoryorder,categoryarray:bs.categoryarray,title:{text:bs.title.text,font:bs.title.font},type:EX({},bs.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:bs.autotypenumbers,autorange:bs.autorange,autorangeoptions:{minallowed:bs.autorangeoptions.minallowed,maxallowed:bs.autorangeoptions.maxallowed,clipmin:bs.autorangeoptions.clipmin,clipmax:bs.autorangeoptions.clipmax,include:bs.autorangeoptions.include,editType:\"plot\"},rangemode:bs.rangemode,minallowed:bs.minallowed,maxallowed:bs.maxallowed,range:EX({},bs.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],anim:!1}),tickmode:bs.minor.tickmode,nticks:bs.nticks,tick0:bs.tick0,dtick:bs.dtick,tickvals:bs.tickvals,ticktext:bs.ticktext,ticks:bs.ticks,mirror:bs.mirror,ticklen:bs.ticklen,tickwidth:bs.tickwidth,tickcolor:bs.tickcolor,showticklabels:bs.showticklabels,labelalias:bs.labelalias,tickfont:bs.tickfont,tickangle:bs.tickangle,tickprefix:bs.tickprefix,showtickprefix:bs.showtickprefix,ticksuffix:bs.ticksuffix,showticksuffix:bs.showticksuffix,showexponent:bs.showexponent,exponentformat:bs.exponentformat,minexponent:bs.minexponent,separatethousands:bs.separatethousands,tickformat:bs.tickformat,tickformatstops:bs.tickformatstops,hoverformat:bs.hoverformat,showline:bs.showline,linecolor:bs.linecolor,linewidth:bs.linewidth,showgrid:bs.showgrid,gridcolor:EX({},bs.gridcolor,{dflt:\"rgb(204, 204, 204)\"}),gridwidth:bs.gridwidth,zeroline:bs.zeroline,zerolinecolor:bs.zerolinecolor,zerolinewidth:bs.zerolinewidth},\"plot\",\"from-root\")});var IX=ye((v0r,pIe)=>{\"use strict\";var kX=CX(),e8t=kc().attributes,LX=Ao().extendFlat,t8t=Dr().counterRegex;function PX(e,t,r){return{x:{valType:\"number\",dflt:e,editType:\"camera\"},y:{valType:\"number\",dflt:t,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}pIe.exports={_arrayAttrRegexps:[t8t(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:LX(PX(0,0,1),{}),center:LX(PX(0,0,0),{}),eye:LX(PX(1.25,1.25,1.25),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},editType:\"camera\"},domain:e8t({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:kX,yaxis:kX,zaxis:kX,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\"}});var _Ie=ye((p0r,yIe)=>{\"use strict\";var r8t=cd().mix,gIe=Dr(),i8t=pl(),n8t=CX(),a8t=TU(),o8t=t4(),mIe=[\"xaxis\",\"yaxis\",\"zaxis\"],s8t=100*136/187;yIe.exports=function(t,r,n){var i,a;function o(u,c){return gIe.coerce(i,a,n8t,u,c)}for(var s=0;s<mIe.length;s++){var l=mIe[s];i=t[l]||{},a=i8t.newContainer(r,l),a._id=l[0]+n.scene,a._name=l,a8t(i,a,o,n),o8t(i,a,o,{font:n.font,letter:l[0],data:n.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:n.bgColor,calendar:n.calendar},n.fullLayout),o(\"gridcolor\",r8t(a.color,n.bgColor,s8t).toRgbString()),o(\"title.text\",l[0]),a.setScale=gIe.noop,o(\"showspikes\")&&(o(\"spikesides\"),o(\"spikethickness\"),o(\"spikecolor\",a.color)),o(\"showaxeslabels\"),o(\"showbackground\")&&o(\"backgroundcolor\")}}});var TIe=ye((g0r,wIe)=>{\"use strict\";var l8t=Dr(),u8t=Ca(),c8t=qa(),f8t=C_(),h8t=_Ie(),xIe=IX(),d8t=Id().getSubplotData,bIe=\"gl3d\";wIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=l8t.validate(t[o],xIe[o]);if(s)return t[o]}}f8t(t,r,n,{type:bIe,attributes:xIe,handleDefaults:v8t,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function v8t(e,t,r,n){for(var i=r(\"bgcolor\"),a=u8t.combine(i,n.paper_bgcolor),o=[\"up\",\"center\",\"eye\"],s=0;s<o.length;s++)r(\"camera.\"+o[s]+\".x\"),r(\"camera.\"+o[s]+\".y\"),r(\"camera.\"+o[s]+\".z\");r(\"camera.projection.type\");var l=!!r(\"aspectratio.x\")&&!!r(\"aspectratio.y\")&&!!r(\"aspectratio.z\"),u=l?\"manual\":\"auto\",c=r(\"aspectmode\",u);l||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},c===\"manual\"&&(t.aspectmode=\"auto\"),e.aspectmode=t.aspectmode);var f=d8t(n.fullData,bIe,n.id);h8t(e,t,{font:n.font,scene:n.id,data:f,bgColor:a,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),c8t.getComponentMethod(\"annotations3d\",\"handleDefaults\")(e,t,n);var h=n.getDfltFromLayout(\"dragmode\");if(h!==!1&&!h)if(h=\"orbit\",e.camera&&e.camera.up){var d=e.camera.up.x,v=e.camera.up.y,x=e.camera.up.z;x!==0&&(!d||!v||!x||x/Math.sqrt(d*d+v*v+x*x)>.999)&&(h=\"turntable\")}else h=\"turntable\";r(\"dragmode\",h),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}});var $_=ye(up=>{\"use strict\";var p8t=mc().overrideAll,g8t=B1(),m8t=fIe(),y8t=Id().getSubplotData,_8t=Dr(),x8t=Wp(),BA=\"gl3d\",RX=\"scene\";up.name=BA;up.attr=RX;up.idRoot=RX;up.idRegex=up.attrRegex=_8t.counterRegex(\"scene\");up.attributes=dIe();up.layoutAttributes=IX();up.baseLayoutAttrOverrides=p8t({hoverlabel:g8t.hoverlabel},\"plot\",\"nested\");up.supplyLayoutDefaults=TIe();up.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[BA],a=0;a<i.length;a++){var o=i[a],s=y8t(n,BA,o),l=r[o],u=l.camera,c=l._scene;c||(c=new m8t({id:o,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:u},r),l._scene=c),c.viewInitial||(c.viewInitial={up:{x:u.up.x,y:u.up.y,z:u.up.z},eye:{x:u.eye.x,y:u.eye.y,z:u.eye.z},center:{x:u.center.x,y:u.center.y,z:u.center.z}}),c.plot(s,r,t.layout)}};up.clean=function(e,t,r,n){for(var i=n._subplots[BA]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\".annotation-\"+o).remove())}};up.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[BA],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._scene,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:x8t.svg,\"xlink:href\":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"}),s.destroy()}};up.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var r=t.substr(5);return r===\"1\"&&(r=\"\"),RX+r}};up.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[BA],n=0;n<r.length;n++){var i=t[r[n]]._scene;i.updateFx(t.dragmode,t.hovermode)}}});var SIe=ye((y0r,AIe)=>{\"use strict\";AIe.exports={plot:FPe(),attributes:AX(),markerSymbols:KD(),supplyDefaults:UPe(),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:GPe(),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:$_(),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var EIe=ye((_0r,MIe)=>{\"use strict\";MIe.exports=SIe()});var KE=ye((x0r,LIe)=>{\"use strict\";var CIe=Ca(),b8t=Tu(),DX=df().axisHoverFormat,w8t=Qo().hovertemplateAttrs,kIe=Gl(),FX=Ao().extendFlat,T8t=mc().overrideAll;function zX(e){return{valType:\"boolean\",dflt:!1}}function OX(e){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},project:{x:zX(\"x\"),y:zX(\"y\"),z:zX(\"z\")},color:{valType:\"color\",dflt:CIe.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:CIe.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var qX=LIe.exports=T8t(FX({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:w8t(),xhoverformat:DX(\"x\"),yhoverformat:DX(\"y\"),zhoverformat:DX(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},b8t(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:OX(\"x\"),y:OX(\"y\"),z:OX(\"z\")},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05},roughness:{valType:\"number\",min:0,max:1,dflt:.5},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},opacityscale:{valType:\"any\",editType:\"calc\"},hoverinfo:FX({},kIe.hoverinfo),showlegend:FX({},kIe.showlegend,{dflt:!1})}),\"calc\",\"nested\");qX.x.editType=qX.y.editType=qX.z.editType=\"calc+clearAxisTypes\"});var NX=ye((b0r,RIe)=>{\"use strict\";var A8t=qa(),PIe=Dr(),S8t=Jh(),M8t=KE(),BX=.1;function E8t(e,t){for(var r=[],n=32,i=0;i<n;i++){var a=i/(n-1),o=t+(1-t)*(1-Math.pow(Math.sin(e*a*Math.PI),2));r.push([a,Math.max(0,Math.min(1,o))])}return r}function C8t(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var n=e[r];if(n.length!==2||+n[0]<t)return!1;t=+n[0]}return!0}function k8t(e,t,r,n){var i,a;function o(b,p){return PIe.coerce(e,t,M8t,b,p)}var s=o(\"x\"),l=o(\"y\"),u=o(\"z\");if(!u||!u.length||s&&s.length<1||l&&l.length<1){t.visible=!1;return}t._xlength=Array.isArray(s)&&PIe.isArrayOrTypedArray(s[0])?u.length:u[0].length,t._ylength=u.length;var c=A8t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");c(e,t,[\"x\",\"y\",\"z\"],n),o(\"text\"),o(\"hovertext\"),o(\"hovertemplate\"),o(\"xhoverformat\"),o(\"yhoverformat\"),o(\"zhoverformat\"),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"hidesurface\",\"connectgaps\",\"opacity\"].forEach(function(b){o(b)});var f=o(\"surfacecolor\"),h=[\"x\",\"y\",\"z\"];for(i=0;i<3;++i){var d=\"contours.\"+h[i],v=o(d+\".show\"),x=o(d+\".highlight\");if(v||x)for(a=0;a<3;++a)o(d+\".project.\"+h[a]);v&&(o(d+\".color\"),o(d+\".width\"),o(d+\".usecolormap\")),x&&(o(d+\".highlightcolor\"),o(d+\".highlightwidth\")),o(d+\".start\"),o(d+\".end\"),o(d+\".size\")}S8t(e,t,n,o,{prefix:\"\",cLetter:\"c\"}),IIe(e,t,n,o),t._length=null}function IIe(e,t,r,n){var i=n(\"opacityscale\");i===\"max\"?t.opacityscale=[[0,BX],[1,1]]:i===\"min\"?t.opacityscale=[[0,1],[1,BX]]:i===\"extremes\"?t.opacityscale=E8t(1,BX):C8t(i)||(t.opacityscale=void 0)}RIe.exports={supplyDefaults:k8t,opacityscaleDefaults:IIe}});var zIe=ye((w0r,FIe)=>{\"use strict\";var DIe=gv();FIe.exports=function(t,r){r.surfacecolor?DIe(t,r,{vals:r.surfacecolor,containerStr:\"\",cLetter:\"c\"}):DIe(t,r,{vals:r.z,containerStr:\"\",cLetter:\"c\"})}});var VIe=ye((T0r,UIe)=>{\"use strict\";var L8t=Od().gl_surface3d,NA=Od().ndarray,P8t=Od().ndarray_linear_interpolate.d2,I8t=i8(),R8t=n8(),JE=Dr().isArrayOrTypedArray,D8t=$y().parseColorScale,OIe=Jy(),F8t=tc().extractOpts;function BIe(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var Jg=BIe.prototype;Jg.getXat=function(e,t,r,n){var i=JE(this.data.x)?JE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jg.getYat=function(e,t,r,n){var i=JE(this.data.y)?JE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jg.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};Jg.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return JE(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel=\"\",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function z8t(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var UA=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function O8t(e,t){if(e<t)return 0;for(var r=0;Math.floor(e%t)===0;)e/=t,r++;return r}function UX(e){for(var t=[],r=0;r<UA.length;r++){var n=UA[r];t.push(O8t(e,n))}return t}function q8t(e){for(var t=UX(e),r=e,n=0;n<UA.length;n++)if(t[n]>0){r=UA[n];break}return r}function B8t(e,t){if(!(e<1||t<1)){for(var r=UX(e),n=UX(t),i=1,a=0;a<UA.length;a++)i*=Math.pow(UA[a],Math.max(r[a],n[a]));return i}}function N8t(e){if(e.length!==0){for(var t=1,r=0;r<e.length;r++)t=B8t(t,e[r]);return t}}Jg.calcXnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getXat(t-1,0),i=this.getXat(t,0);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};Jg.calcYnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getYat(0,t-1),i=this.getYat(0,t);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};var NIe=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],qIe=NIe[9],rF=NIe[13];Jg.estimateScale=function(e,t){for(var r=t===0?this.calcXnums(e):this.calcYnums(e),n=1+N8t(r);n<qIe;)n*=2;for(;n>rF;)n--,n/=q8t(n),n++,n<qIe&&(n=rF);var i=Math.round(n/e);return i>1?i:1};function U8t(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function V8t(e,t,r){return G8t(e,t,U8t,r),e}function G8t(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s<a;s++)for(var l=0;l<o;l++)r(i,[s,l],n),e.set(s,l,P8t(t,i[0],i[1]));return e}Jg.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],i=e[0].shape[1],a=Math.floor(e[0].shape[0]*t+1)|0,o=Math.floor(e[0].shape[1]*r+1)|0,s=1+n+1,l=1+i+1,u=NA(new Float32Array(s*l),[s,l]),c=[1/t,0,0,0,1/r,0,0,0,1],f=0;f<e.length;++f){this.surface.padField(u,e[f]);var h=NA(new Float32Array(a*o),[a,o]);V8t(h,u,c),e[f]=h}};function H8t(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}r===!1&&e.push(t)}Jg.setContourLevels=function(){var e=[[],[],[]],t=[!1,!1,!1],r=!1,n,i,a;for(n=0;n<3;++n)if(this.showContour[n]&&(r=!0,this.contourSize[n]>0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];i<this.contourEnd[n];i+=this.contourSize[n])a=i*this.scene.dataScale[n],H8t(e[n],a);if(r){var o=[[],[],[]];for(n=0;n<3;++n)this.showContour[n]&&(o[n]=t[n]?e[n]:this.scene.contourLevels[n]);this.surface.update({levels:o})}};Jg.update=function(e){var t=this.scene,r=t.fullSceneLayout,n=this.surface,i=D8t(e),a=t.dataScale,o=e.z[0].length,s=e._ylength,l=t.contourLevels;this.data=e;var u,c,f,h,d=[];for(u=0;u<3;u++)for(d[u]=[],c=0;c<o;c++)d[u][c]=[];for(c=0;c<o;c++)for(f=0;f<s;f++)d[0][c][f]=this.getXat(c,f,e.xcalendar,r.xaxis),d[1][c][f]=this.getYat(c,f,e.ycalendar,r.yaxis),d[2][c][f]=this.getZat(c,f,e.zcalendar,r.zaxis);if(e.connectgaps)for(e._emptypoints=R8t(d[2]),I8t(d[2],e._emptypoints),e._interpolatedZ=[],c=0;c<o;c++)for(e._interpolatedZ[c]=[],f=0;f<s;f++)e._interpolatedZ[c][f]=d[2][c][f];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h==null?d[u][c][f]=NaN:h=d[u][c][f]*=a[u];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(this.minValues[u]>h&&(this.minValues[u]=h),this.maxValues[u]<h&&(this.maxValues[u]=h));for(u=0;u<3;u++)this.objectOffset[u]=.5*(this.minValues[u]+this.maxValues[u]);for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(d[u][c][f]-=this.objectOffset[u]);var v=[NA(new Float32Array(o*s),[o,s]),NA(new Float32Array(o*s),[o,s]),NA(new Float32Array(o*s),[o,s])];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)v[u].set(c,f,d[u][c][f]);d=[];var x={colormap:i,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!e.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:e.opacityscale,opacity:e.opacity},b=F8t(e);if(x.intensityBounds=[b.min,b.max],e.surfacecolor){var p=NA(new Float32Array(o*s),[o,s]);for(c=0;c<o;c++)for(f=0;f<s;f++)p.set(c,f,e.surfacecolor[f][c]);v.push(p)}else x.intensityBounds[0]*=a[2],x.intensityBounds[1]*=a[2];(rF<v[0].shape[0]||rF<v[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(v[0].shape[0],0),this.dataScaleY=this.estimateScale(v[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(v)),e.surfacecolor&&(x.intensity=v.pop());var C=[!0,!0,!0],E=[\"x\",\"y\",\"z\"];for(u=0;u<3;++u){var A=e.contours[E[u]];C[u]=A.highlight,x.showContour[u]=A.show||A.highlight,x.showContour[u]&&(x.contourProject[u]=[A.project.x,A.project.y,A.project.z],A.show?(this.showContour[u]=!0,x.levels[u]=l[u],n.highlightColor[u]=x.contourColor[u]=OIe(A.color),A.usecolormap?n.highlightTint[u]=x.contourTint[u]=0:n.highlightTint[u]=x.contourTint[u]=1,x.contourWidth[u]=A.width,this.contourStart[u]=A.start,this.contourEnd[u]=A.end,this.contourSize[u]=A.size):(this.showContour[u]=!1,this.contourStart[u]=null,this.contourEnd[u]=null,this.contourSize[u]=0),A.highlight&&(x.dynamicColor[u]=OIe(A.highlightcolor),x.dynamicWidth[u]=A.highlightwidth))}z8t(i)&&(x.vertexColor=!0),x.objectOffset=this.objectOffset,x.coords=v,n.update(x),n.visible=e.visible,n.enableDynamic=C,n.enableHighlight=C,n.snapToData=!0,\"lighting\"in e&&(n.ambientLight=e.lighting.ambient,n.diffuseLight=e.lighting.diffuse,n.specularLight=e.lighting.specular,n.roughness=e.lighting.roughness,n.fresnel=e.lighting.fresnel),\"lightposition\"in e&&(n.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z])};Jg.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function j8t(e,t){var r=e.glplot.gl,n=L8t({gl:r}),i=new BIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}UIe.exports=j8t});var HIe=ye((A0r,GIe)=>{\"use strict\";GIe.exports={attributes:KE(),supplyDefaults:NX().supplyDefaults,colorbar:{min:\"cmin\",max:\"cmax\"},calc:zIe(),plot:VIe(),moduleType:\"trace\",name:\"surface\",basePlotModule:$_(),categories:[\"gl3d\",\"2dMap\",\"showLegend\"],meta:{}}});var WIe=ye((S0r,jIe)=>{\"use strict\";jIe.exports=HIe()});var VA=ye((M0r,ZIe)=>{\"use strict\";var W8t=Tu(),VX=df().axisHoverFormat,X8t=Qo().hovertemplateAttrs,Q_=KE(),XIe=Gl(),ex=Ao().extendFlat;ZIe.exports=ex({x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:X8t({editType:\"calc\"}),xhoverformat:VX(\"x\"),yhoverformat:VX(\"y\"),zhoverformat:VX(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"}},W8t(\"\",{colorAttr:\"`intensity`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:Q_.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:ex({},Q_.contours.x.show,{}),color:Q_.contours.x.color,width:Q_.contours.x.width,editType:\"calc\"},lightposition:{x:ex({},Q_.lightposition.x,{dflt:1e5}),y:ex({},Q_.lightposition.y,{dflt:1e5}),z:ex({},Q_.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:ex({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\"},editType:\"calc\"},Q_.lighting),hoverinfo:ex({},XIe.hoverinfo,{editType:\"calc\"}),showlegend:ex({},XIe.showlegend,{dflt:!1})})});var nF=ye((E0r,KIe)=>{\"use strict\";var Z8t=Tu(),iF=df().axisHoverFormat,Y8t=Qo().hovertemplateAttrs,$E=VA(),YIe=Gl(),GX=Ao().extendFlat,K8t=mc().overrideAll;function HX(e){return{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}}function jX(e){return{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}}var GA=KIe.exports=K8t(GX({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:HX(\"x\"),y:HX(\"y\"),z:HX(\"z\")},caps:{x:jX(\"x\"),y:jX(\"y\"),z:jX(\"z\")},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:Y8t(),xhoverformat:iF(\"x\"),yhoverformat:iF(\"y\"),zhoverformat:iF(\"z\"),valuehoverformat:iF(\"value\",1),showlegend:GX({},YIe.showlegend,{dflt:!1})},Z8t(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:$E.opacity,lightposition:$E.lightposition,lighting:$E.lighting,flatshading:$E.flatshading,contour:$E.contour,hoverinfo:GX({},YIe.hoverinfo)}),\"calc\",\"nested\");GA.flatshading.dflt=!0;GA.lighting.facenormalsepsilon.dflt=0;GA.x.editType=GA.y.editType=GA.z.editType=GA.value.editType=\"calc+clearAxisTypes\"});var WX=ye((C0r,$Ie)=>{\"use strict\";var J8t=Dr(),$8t=qa(),Q8t=nF(),eRt=Jh();function tRt(e,t,r,n){function i(a,o){return J8t.coerce(e,t,Q8t,a,o)}JIe(e,t,r,n,i)}function JIe(e,t,r,n,i){var a=i(\"isomin\"),o=i(\"isomax\");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i(\"x\"),l=i(\"y\"),u=i(\"z\"),c=i(\"value\");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=$8t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");f(e,t,[\"x\",\"y\",\"z\"],n),i(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach(function(x){i(x+\"hoverformat\");var b=\"caps.\"+x,p=i(b+\".show\");p&&i(b+\".fill\");var C=\"slices.\"+x,E=i(C+\".show\");E&&(i(C+\".fill\"),i(C+\".locations\"))});var h=i(\"spaceframe.show\");h&&i(\"spaceframe.fill\");var d=i(\"surface.show\");d&&(i(\"surface.count\"),i(\"surface.fill\"),i(\"surface.pattern\"));var v=i(\"contour.show\");v&&(i(\"contour.color\"),i(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach(function(x){i(x)}),eRt(e,t,n,i,{prefix:\"\",cLetter:\"c\"}),t._length=null}$Ie.exports={supplyDefaults:tRt,supplyIsoDefaults:JIe}});var aF=ye((k0r,e8e)=>{\"use strict\";var ZX=Dr(),rRt=gv();function iRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=Hm(t.u,t._len),t._v=Hm(t.v,t._len),t._w=Hm(t.w,t._len),t._x=Hm(t.x,t._len),t._y=Hm(t.y,t._len),t._z=Hm(t.z,t._len);var r=QIe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=Hm(t.starts.x||[]),a=Hm(t.starts.y||[]),o=Hm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u<t._len;u++){var c=t._u[u],f=t._v[u],h=t._w[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}for(rRt(e,t,{vals:[l,s],containerStr:\"\",cLetter:\"c\"}),u=0;u<n;u++){var v=i[u];r.xMax=Math.max(r.xMax,v),r.xMin=Math.min(r.xMin,v);var x=a[u];r.yMax=Math.max(r.yMax,x),r.yMin=Math.min(r.yMin,x);var b=o[u];r.zMax=Math.max(r.zMax,b),r.zMin=Math.min(r.zMin,b)}t._slen=n,t._normMax=s,t._xbnds=[r.xMin,r.xMax],t._ybnds=[r.yMin,r.yMax],t._zbnds=[r.zMin,r.zMax]}function QIe(e){var t=e._x,r=e._y,n=e._z,i=e._len,a,o,s,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,d=1/0,v=\"\",x,b,p,C,E,A,L,_,k;for(i&&(C=t[0],A=r[0],_=n[0]),i>1&&(E=t[i-1],L=r[i-1],k=n[i-1]),a=0;a<i;a++)l=Math.max(l,t[a]),u=Math.min(u,t[a]),c=Math.max(c,r[a]),f=Math.min(f,r[a]),h=Math.max(h,n[a]),d=Math.min(d,n[a]),!x&&t[a]!==C&&(x=!0,v+=\"x\"),!b&&r[a]!==A&&(b=!0,v+=\"y\"),!p&&n[a]!==_&&(p=!0,v+=\"z\");x||(v+=\"x\"),b||(v+=\"y\"),p||(v+=\"z\");var M=XX(e._x),g=XX(e._y),P=XX(e._z);v=v.replace(\"x\",(C>E?\"-\":\"+\")+\"x\"),v=v.replace(\"y\",(A>L?\"-\":\"+\")+\"y\"),v=v.replace(\"z\",(_>k?\"-\":\"+\")+\"z\");var T=function(){i=0,M=[],g=[],P=[]};(!i||i<M.length*g.length*P.length)&&T();var z=function(De){return De===\"x\"?t:De===\"y\"?r:n},O=function(De){return De===\"x\"?M:De===\"y\"?g:P},V=function(De){return De[i-1]<De[0]?-1:1},G=z(v[1]),Z=z(v[3]),H=z(v[5]),N=O(v[1]).length,j=O(v[3]).length,re=O(v[5]).length,oe=!1,_e=function(De,Pe,ge){return N*(j*De+Pe)+ge},Me=V(z(v[1])),ke=V(z(v[3])),me=V(z(v[5]));for(a=0;a<re-1;a++){for(o=0;o<j-1;o++){for(s=0;s<N-1;s++){var ie=_e(a,o,s),Se=_e(a,o,s+1),Le=_e(a,o+1,s),Ae=_e(a+1,o,s);if((!(G[ie]*Me<G[Se]*Me)||!(Z[ie]*ke<Z[Le]*ke)||!(H[ie]*me<H[Ae]*me))&&(oe=!0),oe)break}if(oe)break}if(oe)break}return oe&&(ZX.warn(\"Encountered arbitrary coordinates! Unable to input data grid.\"),T()),{xMin:u,yMin:f,zMin:d,xMax:l,yMax:c,zMax:h,Xs:M,Ys:g,Zs:P,len:i,fill:v}}function XX(e){return ZX.distinctVals(e).vals}function Hm(e,t){if(t===void 0&&(t=e.length),ZX.isTypedArray(e))return e.subarray(0,t);for(var r=[],n=0;n<t;n++)r[n]=+e[n];return r}e8e.exports={calc:iRt,filter:Hm,processGrid:QIe}});var YX=ye((L0r,t8e)=>{\"use strict\";var nRt=gv(),aRt=aF().processGrid,oF=aF().filter;t8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=oF(r.x,r._len),r._y=oF(r.y,r._len),r._z=oF(r.z,r._len),r._value=oF(r.value,r._len);var n=aRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o<r._len;o++){var s=r._value[o];i=Math.min(i,s),a=Math.max(a,s)}r._minValues=i,r._maxValues=a,r._vMin=r.isomin===void 0||r.isomin===null?i:r.isomin,r._vMax=r.isomax===void 0||r.isomax===null?a:r.isomax,nRt(t,r,{vals:[r._vMin,r._vMax],containerStr:\"\",cLetter:\"c\"})}});var HA=ye((P0r,r8e)=>{\"use strict\";r8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o<i;o++)a[o]=[t[o],r[o],n[o]];return a}});var sF=ye((I0r,o8e)=>{\"use strict\";var oRt=Od().gl_mesh3d,sRt=$y().parseColorScale,lRt=Dr().isArrayOrTypedArray,uRt=Jy(),cRt=tc().extractOpts,i8e=HA(),QE=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n<e&&e<=i)return{id:r,distRatio:(i-e)/(i-n)}}return{id:0,distRatio:0}};function n8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.data=null,this.showContour=!1}var KX=n8e.prototype;KX.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=QE(r,this.data._Xs).id,l=QE(n,this.data._Ys).id,u=QE(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return lRt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};KX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=a8e(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=i8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=i8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:uRt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=cRt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=sRt(e),this.mesh.update(o)};KX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var fRt=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"];function a8e(e){e._meshI=[],e._meshJ=[],e._meshK=[];var t=e.surface.show,r=e.spaceframe.show,n=e.surface.fill,i=e.spaceframe.fill,a=!1,o=!1,s=0,l,u,c=e._Xs,f=e._Ys,h=e._Zs,d=c.length,v=f.length,x=h.length,b=fRt.indexOf(e._gridFill.replace(/-/g,\"\").replace(/\\+/g,\"\")),p=function(er,Ut,Ft){switch(b){case 5:return Ft+x*Ut+x*v*er;case 4:return Ft+x*er+x*d*Ut;case 3:return Ut+v*Ft+v*x*er;case 2:return Ut+v*er+v*d*Ft;case 1:return er+d*Ft+d*x*Ut;default:return er+d*Ut+d*v*Ft}},C=e._minValues,E=e._maxValues,A=e._vMin,L=e._vMax,_,k,M,g;function P(er,Ut,Ft){for(var bt=g.length,yt=u;yt<bt;yt++)if(er===_[yt]&&Ut===k[yt]&&Ft===M[yt])return yt;return-1}function T(){u=l}function z(){_=[],k=[],M=[],g=[],l=0,T()}function O(er,Ut,Ft,bt){return _.push(er),k.push(Ut),M.push(Ft),g.push(bt),l++,l-1}function V(er,Ut,Ft){return e._meshI.push(er),e._meshJ.push(Ut),e._meshK.push(Ft),s++,s-1}function G(er,Ut,Ft){for(var bt=[],yt=0;yt<er.length;yt++)bt[yt]=(er[yt]+Ut[yt]+Ft[yt])/3;return bt}function Z(er,Ut,Ft){for(var bt=[],yt=0;yt<er.length;yt++)bt[yt]=er[yt]*(1-Ft)+Ft*Ut[yt];return bt}var H;function N(er){H=er}function j(er,Ut){var Ft=er[0],bt=er[1],yt=er[2],Yt=G(Ft,bt,yt),lr=Math.sqrt(1-H),Tr=Z(Yt,Ft,lr),Rr=Z(Yt,bt,lr),ei=Z(Yt,yt,lr),Wr=Ut[0],Ur=Ut[1],dt=Ut[2];return{xyzv:[[Ft,bt,Rr],[Rr,Tr,Ft],[bt,yt,ei],[ei,Rr,bt],[yt,Ft,Tr],[Tr,ei,yt]],abc:[[Wr,Ur,-1],[-1,-1,Wr],[Ur,dt,-1],[-1,-1,Ur],[dt,Wr,-1],[-1,-1,dt]]}}function re(er,Ut){return er===\"all\"||er===null?!0:er.indexOf(Ut)>-1}function oe(er,Ut){return er===null?Ut:er}function _e(er,Ut,Ft){T();var bt=[Ut],yt=[Ft];if(H>=1)bt=[Ut],yt=[Ft];else if(H>0){var Yt=j(Ut,Ft);bt=Yt.xyzv,yt=Yt.abc}for(var lr=0;lr<bt.length;lr++){Ut=bt[lr],Ft=yt[lr];for(var Tr=[],Rr=0;Rr<3;Rr++){var ei=Ut[Rr][0],Wr=Ut[Rr][1],Ur=Ut[Rr][2],dt=Ut[Rr][3],Ge=Ft[Rr]>-1?Ft[Rr]:P(ei,Wr,Ur);Ge>-1?Tr[Rr]=Ge:Tr[Rr]=O(ei,Wr,Ur,oe(er,dt))}V(Tr[0],Tr[1],Tr[2])}}function Me(er,Ut,Ft){var bt=function(yt,Yt,lr){_e(er,[Ut[yt],Ut[Yt],Ut[lr]],[Ft[yt],Ft[Yt],Ft[lr]])};bt(0,1,2),bt(2,3,0)}function ke(er,Ut,Ft){var bt=function(yt,Yt,lr){_e(er,[Ut[yt],Ut[Yt],Ut[lr]],[Ft[yt],Ft[Yt],Ft[lr]])};bt(0,1,2),bt(3,0,1),bt(2,3,0),bt(1,2,3)}function me(er,Ut,Ft,bt){var yt=er[3];yt<Ft&&(yt=Ft),yt>bt&&(yt=bt);for(var Yt=(er[3]-yt)/(er[3]-Ut[3]+1e-9),lr=[],Tr=0;Tr<4;Tr++)lr[Tr]=(1-Yt)*er[Tr]+Yt*Ut[Tr];return lr}function ie(er,Ut,Ft){return er>=Ut&&er<=Ft}function Se(er){var Ut=.001*(L-A);return er>=A-Ut&&er<=L+Ut}function Le(er){for(var Ut=[],Ft=0;Ft<4;Ft++){var bt=er[Ft];Ut.push([e._x[bt],e._y[bt],e._z[bt],e._value[bt]])}return Ut}var Ae=3;function De(er,Ut,Ft,bt,yt,Yt){Yt||(Yt=1),Ft=[-1,-1,-1];var lr=!1,Tr=[ie(Ut[0][3],bt,yt),ie(Ut[1][3],bt,yt),ie(Ut[2][3],bt,yt)];if(!Tr[0]&&!Tr[1]&&!Tr[2])return!1;var Rr=function(Wr,Ur,dt){return Se(Ur[0][3])&&Se(Ur[1][3])&&Se(Ur[2][3])?(_e(Wr,Ur,dt),!0):Yt<Ae?De(Wr,Ur,dt,A,L,++Yt):!1};if(Tr[0]&&Tr[1]&&Tr[2])return Rr(er,Ut,Ft)||lr;var ei=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Wr){if(Tr[Wr[0]]&&Tr[Wr[1]]&&!Tr[Wr[2]]){var Ur=Ut[Wr[0]],dt=Ut[Wr[1]],Ge=Ut[Wr[2]],Je=me(Ge,Ur,bt,yt),je=me(Ge,dt,bt,yt);lr=Rr(er,[je,Je,Ur],[-1,-1,Ft[Wr[0]]])||lr,lr=Rr(er,[Ur,dt,je],[Ft[Wr[0]],Ft[Wr[1]],-1])||lr,ei=!0}}),ei||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Wr){if(Tr[Wr[0]]&&!Tr[Wr[1]]&&!Tr[Wr[2]]){var Ur=Ut[Wr[0]],dt=Ut[Wr[1]],Ge=Ut[Wr[2]],Je=me(dt,Ur,bt,yt),je=me(Ge,Ur,bt,yt);lr=Rr(er,[je,Je,Ur],[-1,-1,Ft[Wr[0]]])||lr,ei=!0}}),lr}function Pe(er,Ut,Ft,bt){var yt=!1,Yt=Le(Ut),lr=[ie(Yt[0][3],Ft,bt),ie(Yt[1][3],Ft,bt),ie(Yt[2][3],Ft,bt),ie(Yt[3][3],Ft,bt)];if(!lr[0]&&!lr[1]&&!lr[2]&&!lr[3])return yt;if(lr[0]&&lr[1]&&lr[2]&&lr[3])return o&&(yt=ke(er,Yt,Ut)||yt),yt;var Tr=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Rr){if(lr[Rr[0]]&&lr[Rr[1]]&&lr[Rr[2]]&&!lr[Rr[3]]){var ei=Yt[Rr[0]],Wr=Yt[Rr[1]],Ur=Yt[Rr[2]],dt=Yt[Rr[3]];if(o)yt=_e(er,[ei,Wr,Ur],[Ut[Rr[0]],Ut[Rr[1]],Ut[Rr[2]]])||yt;else{var Ge=me(dt,ei,Ft,bt),Je=me(dt,Wr,Ft,bt),je=me(dt,Ur,Ft,bt);yt=_e(null,[Ge,Je,je],[-1,-1,-1])||yt}Tr=!0}}),Tr||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(Rr){if(lr[Rr[0]]&&lr[Rr[1]]&&!lr[Rr[2]]&&!lr[Rr[3]]){var ei=Yt[Rr[0]],Wr=Yt[Rr[1]],Ur=Yt[Rr[2]],dt=Yt[Rr[3]],Ge=me(Ur,ei,Ft,bt),Je=me(Ur,Wr,Ft,bt),je=me(dt,Wr,Ft,bt),$e=me(dt,ei,Ft,bt);o?(yt=_e(er,[ei,$e,Ge],[Ut[Rr[0]],-1,-1])||yt,yt=_e(er,[Wr,Je,je],[Ut[Rr[1]],-1,-1])||yt):yt=Me(null,[Ge,Je,je,$e],[-1,-1,-1,-1])||yt,Tr=!0}}),Tr)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Rr){if(lr[Rr[0]]&&!lr[Rr[1]]&&!lr[Rr[2]]&&!lr[Rr[3]]){var ei=Yt[Rr[0]],Wr=Yt[Rr[1]],Ur=Yt[Rr[2]],dt=Yt[Rr[3]],Ge=me(Wr,ei,Ft,bt),Je=me(Ur,ei,Ft,bt),je=me(dt,ei,Ft,bt);o?(yt=_e(er,[ei,Ge,Je],[Ut[Rr[0]],-1,-1])||yt,yt=_e(er,[ei,Je,je],[Ut[Rr[0]],-1,-1])||yt,yt=_e(er,[ei,je,Ge],[Ut[Rr[0]],-1,-1])||yt):yt=_e(null,[Ge,Je,je],[-1,-1,-1])||yt,Tr=!0}}),yt}function ge(er,Ut,Ft,bt,yt,Yt,lr,Tr,Rr,ei,Wr){var Ur=!1;return a&&(re(er,\"A\")&&(Ur=Pe(null,[Ut,Ft,bt,Yt],ei,Wr)||Ur),re(er,\"B\")&&(Ur=Pe(null,[Ft,bt,yt,Rr],ei,Wr)||Ur),re(er,\"C\")&&(Ur=Pe(null,[Ft,Yt,lr,Rr],ei,Wr)||Ur),re(er,\"D\")&&(Ur=Pe(null,[bt,Yt,Tr,Rr],ei,Wr)||Ur),re(er,\"E\")&&(Ur=Pe(null,[Ft,bt,Yt,Rr],ei,Wr)||Ur)),o&&(Ur=Pe(er,[Ft,bt,Yt,Rr],ei,Wr)||Ur),Ur}function Fe(er,Ut,Ft,bt,yt,Yt,lr,Tr){return[Tr[0]===!0?!0:De(er,Le([Ut,Ft,bt]),[Ut,Ft,bt],Yt,lr),Tr[1]===!0?!0:De(er,Le([bt,yt,Ut]),[bt,yt,Ut],Yt,lr)]}function ce(er,Ut,Ft,bt,yt,Yt,lr,Tr,Rr){return Tr?Fe(er,Ut,Ft,yt,bt,Yt,lr,Rr):Fe(er,Ft,yt,bt,Ut,Yt,lr,Rr)}function Ze(er,Ut,Ft,bt,yt,Yt,lr){var Tr=!1,Rr,ei,Wr,Ur,dt=function(){Tr=De(er,[Rr,ei,Wr],[-1,-1,-1],yt,Yt)||Tr,Tr=De(er,[Wr,Ur,Rr],[-1,-1,-1],yt,Yt)||Tr},Ge=lr[0],Je=lr[1],je=lr[2];return Ge&&(Rr=Z(Le([p(Ut,Ft-0,bt-0)])[0],Le([p(Ut-1,Ft-0,bt-0)])[0],Ge),ei=Z(Le([p(Ut,Ft-0,bt-1)])[0],Le([p(Ut-1,Ft-0,bt-1)])[0],Ge),Wr=Z(Le([p(Ut,Ft-1,bt-1)])[0],Le([p(Ut-1,Ft-1,bt-1)])[0],Ge),Ur=Z(Le([p(Ut,Ft-1,bt-0)])[0],Le([p(Ut-1,Ft-1,bt-0)])[0],Ge),dt()),Je&&(Rr=Z(Le([p(Ut-0,Ft,bt-0)])[0],Le([p(Ut-0,Ft-1,bt-0)])[0],Je),ei=Z(Le([p(Ut-0,Ft,bt-1)])[0],Le([p(Ut-0,Ft-1,bt-1)])[0],Je),Wr=Z(Le([p(Ut-1,Ft,bt-1)])[0],Le([p(Ut-1,Ft-1,bt-1)])[0],Je),Ur=Z(Le([p(Ut-1,Ft,bt-0)])[0],Le([p(Ut-1,Ft-1,bt-0)])[0],Je),dt()),je&&(Rr=Z(Le([p(Ut-0,Ft-0,bt)])[0],Le([p(Ut-0,Ft-0,bt-1)])[0],je),ei=Z(Le([p(Ut-0,Ft-1,bt)])[0],Le([p(Ut-0,Ft-1,bt-1)])[0],je),Wr=Z(Le([p(Ut-1,Ft-1,bt)])[0],Le([p(Ut-1,Ft-1,bt-1)])[0],je),Ur=Z(Le([p(Ut-1,Ft-0,bt)])[0],Le([p(Ut-1,Ft-0,bt-1)])[0],je),dt()),Tr}function ct(er,Ut,Ft,bt,yt,Yt,lr,Tr,Rr,ei,Wr,Ur){var dt=er;return Ur?(a&&er===\"even\"&&(dt=null),ge(dt,Ut,Ft,bt,yt,Yt,lr,Tr,Rr,ei,Wr)):(a&&er===\"odd\"&&(dt=null),ge(dt,Rr,Tr,lr,Yt,yt,bt,Ft,Ut,ei,Wr))}function pt(er,Ut,Ft,bt,yt){for(var Yt=[],lr=0,Tr=0;Tr<Ut.length;Tr++)for(var Rr=Ut[Tr],ei=1;ei<x;ei++)for(var Wr=1;Wr<v;Wr++)Yt.push(ce(er,p(Rr,Wr-1,ei-1),p(Rr,Wr-1,ei),p(Rr,Wr,ei-1),p(Rr,Wr,ei),Ft,bt,(Rr+Wr+ei)%2,yt&&yt[lr]?yt[lr]:[])),lr++;return Yt}function Wt(er,Ut,Ft,bt,yt){for(var Yt=[],lr=0,Tr=0;Tr<Ut.length;Tr++)for(var Rr=Ut[Tr],ei=1;ei<d;ei++)for(var Wr=1;Wr<x;Wr++)Yt.push(ce(er,p(ei-1,Rr,Wr-1),p(ei,Rr,Wr-1),p(ei-1,Rr,Wr),p(ei,Rr,Wr),Ft,bt,(ei+Rr+Wr)%2,yt&&yt[lr]?yt[lr]:[])),lr++;return Yt}function st(er,Ut,Ft,bt,yt){for(var Yt=[],lr=0,Tr=0;Tr<Ut.length;Tr++)for(var Rr=Ut[Tr],ei=1;ei<v;ei++)for(var Wr=1;Wr<d;Wr++)Yt.push(ce(er,p(Wr-1,ei-1,Rr),p(Wr-1,ei,Rr),p(Wr,ei-1,Rr),p(Wr,ei,Rr),Ft,bt,(Wr+ei+Rr)%2,yt&&yt[lr]?yt[lr]:[])),lr++;return Yt}function lt(er,Ut,Ft){for(var bt=1;bt<x;bt++)for(var yt=1;yt<v;yt++)for(var Yt=1;Yt<d;Yt++)ct(er,p(Yt-1,yt-1,bt-1),p(Yt-1,yt-1,bt),p(Yt-1,yt,bt-1),p(Yt-1,yt,bt),p(Yt,yt-1,bt-1),p(Yt,yt-1,bt),p(Yt,yt,bt-1),p(Yt,yt,bt),Ut,Ft,(Yt+yt+bt)%2)}function Gt(er,Ut,Ft){o=!0,lt(er,Ut,Ft),o=!1}function Nt(er,Ut,Ft){a=!0,lt(er,Ut,Ft),a=!1}function $t(er,Ut,Ft,bt,yt,Yt){for(var lr=[],Tr=0,Rr=0;Rr<Ut.length;Rr++)for(var ei=Ut[Rr],Wr=1;Wr<x;Wr++)for(var Ur=1;Ur<v;Ur++)lr.push(Ze(er,ei,Ur,Wr,Ft,bt,yt[Rr],Yt&&Yt[Tr]?Yt[Tr]:[])),Tr++;return lr}function sr(er,Ut,Ft,bt,yt,Yt){for(var lr=[],Tr=0,Rr=0;Rr<Ut.length;Rr++)for(var ei=Ut[Rr],Wr=1;Wr<d;Wr++)for(var Ur=1;Ur<x;Ur++)lr.push(Ze(er,Wr,ei,Ur,Ft,bt,yt[Rr],Yt&&Yt[Tr]?Yt[Tr]:[])),Tr++;return lr}function wr(er,Ut,Ft,bt,yt,Yt){for(var lr=[],Tr=0,Rr=0;Rr<Ut.length;Rr++)for(var ei=Ut[Rr],Wr=1;Wr<v;Wr++)for(var Ur=1;Ur<d;Ur++)lr.push(Ze(er,Ur,Wr,ei,Ft,bt,yt[Rr],Yt&&Yt[Tr]?Yt[Tr]:[])),Tr++;return lr}function ur(er,Ut){for(var Ft=[],bt=er;bt<Ut;bt++)Ft.push(bt);return Ft}function Qe(){for(var er=0;er<d;er++)for(var Ut=0;Ut<v;Ut++)for(var Ft=0;Ft<x;Ft++){var bt=p(er,Ut,Ft);O(e._x[bt],e._y[bt],e._z[bt],e._value[bt])}}function Et(){z(),Qe();var er=null;if(r&&i&&(N(i),Gt(er,A,L)),t&&n){N(n);for(var Ut=e.surface.pattern,Ft=e.surface.count,bt=0;bt<Ft;bt++){var yt=Ft===1?.5:bt/(Ft-1),Yt=(1-yt)*A+yt*L,lr=Math.abs(Yt-C),Tr=Math.abs(Yt-E),Rr=lr>Tr?[C,Yt]:[Yt,E];Nt(Ut,Rr[0],Rr[1])}}var ei=[[Math.min(A,E),Math.max(A,E)],[Math.min(C,L),Math.max(C,L)]];[\"x\",\"y\",\"z\"].forEach(function(Wr){for(var Ur=[],dt=0;dt<ei.length;dt++){var Ge=0,Je=ei[dt][0],je=ei[dt][1],$e=e.slices[Wr];if($e.show&&$e.fill){N($e.fill);var wt=[],Ie=[],xe=[];if($e.locations.length)for(var Ce=0;Ce<$e.locations.length;Ce++){var vt=QE($e.locations[Ce],Wr===\"x\"?c:Wr===\"y\"?f:h);vt.distRatio===0?wt.push(vt.id):vt.id>0&&(Ie.push(vt.id),Wr===\"x\"?xe.push([vt.distRatio,0,0]):Wr===\"y\"?xe.push([0,vt.distRatio,0]):xe.push([0,0,vt.distRatio]))}else Wr===\"x\"?wt=ur(1,d-1):Wr===\"y\"?wt=ur(1,v-1):wt=ur(1,x-1);Ie.length>0&&(Wr===\"x\"?Ur[Ge]=$t(er,Ie,Je,je,xe,Ur[Ge]):Wr===\"y\"?Ur[Ge]=sr(er,Ie,Je,je,xe,Ur[Ge]):Ur[Ge]=wr(er,Ie,Je,je,xe,Ur[Ge]),Ge++),wt.length>0&&(Wr===\"x\"?Ur[Ge]=pt(er,wt,Je,je,Ur[Ge]):Wr===\"y\"?Ur[Ge]=Wt(er,wt,Je,je,Ur[Ge]):Ur[Ge]=st(er,wt,Je,je,Ur[Ge]),Ge++)}var nr=e.caps[Wr];nr.show&&nr.fill&&(N(nr.fill),Wr===\"x\"?Ur[Ge]=pt(er,[0,d-1],Je,je,Ur[Ge]):Wr===\"y\"?Ur[Ge]=Wt(er,[0,v-1],Je,je,Ur[Ge]):Ur[Ge]=st(er,[0,x-1],Je,je,Ur[Ge]),Ge++)}}),s===0&&z(),e._meshX=_,e._meshY=k,e._meshZ=M,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return Et(),e}function hRt(e,t){var r=e.glplot.gl,n=oRt({gl:r}),i=new n8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}o8e.exports={findNearestOnAxis:QE,generateIsoMeshes:a8e,createIsosurfaceTrace:hRt}});var l8e=ye((R0r,s8e)=>{\"use strict\";s8e.exports={attributes:nF(),supplyDefaults:WX().supplyDefaults,calc:YX(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:sF().createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:$_(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var c8e=ye((D0r,u8e)=>{\"use strict\";u8e.exports=l8e()});var $X=ye((F0r,h8e)=>{\"use strict\";var dRt=Tu(),Dh=nF(),vRt=KE(),f8e=Gl(),JX=Ao().extendFlat,pRt=mc().overrideAll,lF=h8e.exports=pRt(JX({x:Dh.x,y:Dh.y,z:Dh.z,value:Dh.value,isomin:Dh.isomin,isomax:Dh.isomax,surface:Dh.surface,spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:1}},slices:Dh.slices,caps:Dh.caps,text:Dh.text,hovertext:Dh.hovertext,xhoverformat:Dh.xhoverformat,yhoverformat:Dh.yhoverformat,zhoverformat:Dh.zhoverformat,valuehoverformat:Dh.valuehoverformat,hovertemplate:Dh.hovertemplate},dRt(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{colorbar:Dh.colorbar,opacity:Dh.opacity,opacityscale:vRt.opacityscale,lightposition:Dh.lightposition,lighting:Dh.lighting,flatshading:Dh.flatshading,contour:Dh.contour,hoverinfo:JX({},f8e.hoverinfo),showlegend:JX({},f8e.showlegend,{dflt:!1})}),\"calc\",\"nested\");lF.x.editType=lF.y.editType=lF.z.editType=lF.value.editType=\"calc+clearAxisTypes\"});var v8e=ye((z0r,d8e)=>{\"use strict\";var gRt=Dr(),mRt=$X(),yRt=WX().supplyIsoDefaults,_Rt=NX().opacityscaleDefaults;d8e.exports=function(t,r,n,i){function a(o,s){return gRt.coerce(t,r,mRt,o,s)}yRt(t,r,n,i,a),_Rt(t,r,i,a)}});var y8e=ye((O0r,m8e)=>{\"use strict\";var xRt=Od().gl_mesh3d,bRt=$y().parseColorScale,wRt=Dr().isArrayOrTypedArray,TRt=Jy(),ARt=tc().extractOpts,p8e=HA(),QX=sF().findNearestOnAxis,SRt=sF().generateIsoMeshes;function g8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.data=null,this.showContour=!1}var eZ=g8e.prototype;eZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=QX(r,this.data._Xs).id,l=QX(n,this.data._Ys).id,u=QX(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return wRt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};eZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=SRt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=p8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=p8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:TRt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=ARt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=bRt(e),this.mesh.update(o)};eZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function MRt(e,t){var r=e.glplot.gl,n=xRt({gl:r}),i=new g8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}m8e.exports=MRt});var x8e=ye((q0r,_8e)=>{\"use strict\";_8e.exports={attributes:$X(),supplyDefaults:v8e(),calc:YX(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:y8e(),moduleType:\"trace\",name:\"volume\",basePlotModule:$_(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var w8e=ye((B0r,b8e)=>{\"use strict\";b8e.exports=x8e()});var S8e=ye((N0r,A8e)=>{\"use strict\";var ERt=qa(),T8e=Dr(),CRt=Jh(),kRt=VA();A8e.exports=function(t,r,n,i){function a(c,f){return T8e.coerce(t,r,kRt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&T8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o([\"x\",\"y\",\"z\"]);if(!s){r.visible=!1;return}if(o([\"i\",\"j\",\"k\"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=ERt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");l(t,r,[\"x\",\"y\",\"z\"],i),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"alphahull\",\"delaunayaxis\",\"opacity\"].forEach(function(c){a(c)});var u=a(\"contour.show\");u&&(a(\"contour.color\"),a(\"contour.width\")),\"intensity\"in t?(a(\"intensity\"),a(\"intensitymode\"),CRt(t,r,i,a,{prefix:\"\",cLetter:\"c\"})):(r.showscale=!1,\"facecolor\"in t?a(\"facecolor\"):\"vertexcolor\"in t?a(\"vertexcolor\"):a(\"color\",n)),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var E8e=ye((U0r,M8e)=>{\"use strict\";var LRt=gv();M8e.exports=function(t,r){r.intensity&&LRt(t,r,{vals:r.intensity,containerStr:\"\",cLetter:\"c\"})}});var I8e=ye((V0r,P8e)=>{\"use strict\";var PRt=Od().gl_mesh3d,IRt=Od().delaunay_triangulate,RRt=Od().alpha_shape,DRt=Od().convex_hull,FRt=$y().parseColorScale,zRt=Dr().isArrayOrTypedArray,nZ=Jy(),ORt=tc().extractOpts,C8e=HA();function L8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var aZ=L8e.prototype;aZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return zRt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function k8e(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=nZ(e[n]);return t}function tZ(e,t,r,n){for(var i=[],a=t.length,o=0;o<a;o++)i[o]=e.d2l(t[o],0,n)*r;return i}function rZ(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=Math.round(e[n]);return t}function qRt(e,t){for(var r=[\"x\",\"y\",\"z\"].indexOf(e),n=[],i=t.length,a=0;a<i;a++)n[a]=[t[a][(r+1)%3],t[a][(r+2)%3]];return IRt(n)}function iZ(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n]<=-.5||e[n]>=t-.5)return!1;return!0}aZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=C8e(tZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),tZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),tZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!iZ(e.i,n)||!iZ(e.j,n)||!iZ(e.k,n))return;a=C8e(rZ(e.i),rZ(e.j),rZ(e.k))}else e.alphahull===0?a=DRt(i):e.alphahull>0?a=RRt(e.alphahull,i):a=qRt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:nZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=ORt(e);this.color=\"#fff\";var l=e.intensitymode;o[l+\"Intensity\"]=e.intensity,o[l+\"IntensityBounds\"]=[s.min,s.max],o.colormap=FRt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=k8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=k8e(e.facecolor)):(this.color=e.color,o.meshColor=nZ(e.color));this.mesh.update(o)};aZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function BRt(e,t){var r=e.glplot.gl,n=PRt({gl:r}),i=new L8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}P8e.exports=BRt});var D8e=ye((G0r,R8e)=>{\"use strict\";R8e.exports={attributes:VA(),supplyDefaults:S8e(),calc:E8e(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:I8e(),moduleType:\"trace\",name:\"mesh3d\",basePlotModule:$_(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var z8e=ye((H0r,F8e)=>{\"use strict\";F8e.exports=D8e()});var sZ=ye((j0r,q8e)=>{\"use strict\";var NRt=Tu(),jA=df().axisHoverFormat,URt=Qo().hovertemplateAttrs,VRt=VA(),O8e=Gl(),oZ=Ao().extendFlat,uF={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"scaled\",\"absolute\",\"raw\"],editType:\"calc\",dflt:\"scaled\"},sizeref:{valType:\"number\",editType:\"calc\",min:0},anchor:{valType:\"enumerated\",editType:\"calc\",values:[\"tip\",\"tail\",\"cm\",\"center\"],dflt:\"cm\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:URt({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:jA(\"u\",1),vhoverformat:jA(\"v\",1),whoverformat:jA(\"w\",1),xhoverformat:jA(\"x\"),yhoverformat:jA(\"y\"),zhoverformat:jA(\"z\"),showlegend:oZ({},O8e.showlegend,{dflt:!1})};oZ(uF,NRt(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));var GRt=[\"opacity\",\"lightposition\",\"lighting\"];GRt.forEach(function(e){uF[e]=VRt[e]});uF.hoverinfo=oZ({},O8e.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"});q8e.exports=uF});var N8e=ye((W0r,B8e)=>{\"use strict\";var HRt=Dr(),jRt=Jh(),WRt=sZ();B8e.exports=function(t,r,n,i){function a(d,v){return HRt.coerce(t,r,WRt,d,v)}var o=a(\"u\"),s=a(\"v\"),l=a(\"w\"),u=a(\"x\"),c=a(\"y\"),f=a(\"z\");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a(\"sizemode\");a(\"sizeref\",h===\"raw\"?1:.5),a(\"anchor\"),a(\"lighting.ambient\"),a(\"lighting.diffuse\"),a(\"lighting.specular\"),a(\"lighting.roughness\"),a(\"lighting.fresnel\"),a(\"lightposition.x\"),a(\"lightposition.y\"),a(\"lightposition.z\"),jRt(t,r,i,a,{prefix:\"\",cLetter:\"c\"}),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"uhoverformat\"),a(\"vhoverformat\"),a(\"whoverformat\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var V8e=ye((X0r,U8e)=>{\"use strict\";var XRt=gv();U8e.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=n[u],f=i[u],h=a[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}r._len=o,r._normMax=s,XRt(t,r,{vals:[l,s],containerStr:\"\",cLetter:\"c\"})}});var X8e=ye((Z0r,W8e)=>{\"use strict\";var ZRt=Od().gl_cone3d,YRt=Od().gl_cone3d.createConeMesh,KRt=Dr().simpleMap,JRt=$y().parseColorScale,$Rt=tc().extractOpts,QRt=Dr().isArrayOrTypedArray,G8e=HA();function H8e(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var lZ=H8e.prototype;lZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return QRt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var eDt={xaxis:0,yaxis:1,zaxis:2},tDt={tip:1,tail:0,cm:.25,center:.5},rDt={tip:1,tail:1,cm:.75,center:.5};function j8e(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[eDt[f]];return KRt(c,function(v){return h.d2l(v)*d})}i.vectors=G8e(a(t.u,\"xaxis\"),a(t.v,\"yaxis\"),a(t.w,\"zaxis\"),t._len),i.positions=G8e(a(t.x,\"xaxis\"),a(t.y,\"yaxis\"),a(t.z,\"zaxis\"),t._len);var o=$Rt(t);i.colormap=JRt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=tDt[t.anchor];var s=t.sizemode;s===\"scaled\"?i.coneSize=t.sizeref||.5:s===\"absolute\"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s===\"raw\"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=ZRt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=rDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}lZ.update=function(e){this.data=e;var t=j8e(this.scene,e);this.mesh.update(t)};lZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function iDt(e,t){var r=e.glplot.gl,n=j8e(e,t),i=YRt(r,n),a=new H8e(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}W8e.exports=iDt});var Y8e=ye((Y0r,Z8e)=>{\"use strict\";Z8e.exports={moduleType:\"trace\",name:\"cone\",basePlotModule:$_(),categories:[\"gl3d\",\"showLegend\"],attributes:sZ(),supplyDefaults:N8e(),colorbar:{min:\"cmin\",max:\"cmax\"},calc:V8e(),plot:X8e(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var J8e=ye((K0r,K8e)=>{\"use strict\";K8e.exports=Y8e()});var cZ=ye((J0r,Q8e)=>{\"use strict\";var nDt=Tu(),WA=df().axisHoverFormat,aDt=Qo().hovertemplateAttrs,oDt=VA(),$8e=Gl(),uZ=Ao().extendFlat,cF={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},starts:{x:{valType:\"data_array\",editType:\"calc\"},y:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},maxdisplayed:{valType:\"integer\",min:0,dflt:1e3,editType:\"calc\"},sizeref:{valType:\"number\",editType:\"calc\",min:0,dflt:1},text:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:aDt({editType:\"calc\"},{keys:[\"tubex\",\"tubey\",\"tubez\",\"tubeu\",\"tubev\",\"tubew\",\"norm\",\"divergence\"]}),uhoverformat:WA(\"u\",1),vhoverformat:WA(\"v\",1),whoverformat:WA(\"w\",1),xhoverformat:WA(\"x\"),yhoverformat:WA(\"y\"),zhoverformat:WA(\"z\"),showlegend:uZ({},$8e.showlegend,{dflt:!1})};uZ(cF,nDt(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));var sDt=[\"opacity\",\"lightposition\",\"lighting\"];sDt.forEach(function(e){cF[e]=oDt[e]});cF.hoverinfo=uZ({},$8e.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"divergence\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"});Q8e.exports=cF});var tRe=ye(($0r,eRe)=>{\"use strict\";var lDt=Dr(),uDt=Jh(),cDt=cZ();eRe.exports=function(t,r,n,i){function a(h,d){return lDt.coerce(t,r,cDt,h,d)}var o=a(\"u\"),s=a(\"v\"),l=a(\"w\"),u=a(\"x\"),c=a(\"y\"),f=a(\"z\");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a(\"starts.x\"),a(\"starts.y\"),a(\"starts.z\"),a(\"maxdisplayed\"),a(\"sizeref\"),a(\"lighting.ambient\"),a(\"lighting.diffuse\"),a(\"lighting.specular\"),a(\"lighting.roughness\"),a(\"lighting.fresnel\"),a(\"lightposition.x\"),a(\"lightposition.y\"),a(\"lightposition.z\"),uDt(t,r,i,a,{prefix:\"\",cLetter:\"c\"}),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"uhoverformat\"),a(\"vhoverformat\"),a(\"whoverformat\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var uRe=ye((Q0r,lRe)=>{\"use strict\";var nRe=Od().gl_streamtube3d,fDt=nRe.createTubeMesh,hDt=Dr(),dDt=$y().parseColorScale,vDt=tc().extractOpts,rRe=HA(),aRe={xaxis:0,yaxis:1,zaxis:2};function oRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var hZ=oRe.prototype;hZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[aRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],\"xaxis\"),n(i[1],\"yaxis\"),n(i[2],\"zaxis\"),n(a[0],\"xaxis\"),n(a[1],\"yaxis\"),n(a[2],\"zaxis\"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function iRe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function fZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function sRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,O){var V=r[O],G=n[aRe[O]];return hDt.simpleMap(z,function(Z){return V.d2l(Z)*G})}if(a.vectors=rRe(o(t._u,\"xaxis\"),o(t._v,\"yaxis\"),o(t._w,\"zaxis\"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,\"xaxis\"),l=o(t._Ys,\"yaxis\"),u=o(t._Zs,\"zaxis\");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=rRe(o(t._startsX,\"xaxis\"),o(t._startsY,\"yaxis\"),o(t._startsZ,\"zaxis\"));else{for(var f=l[0],h=iRe(s),d=iRe(u),v=new Array(h.length*d.length),x=0,b=0;b<h.length;b++)for(var p=0;p<d.length;p++)v[x++]=[h[b],f,d[p]];a.startingPositions=v}a.colormap=dDt(t),a.tubeSize=t.sizeref,a.maxLength=t.maxdisplayed;var C=o(t._xbnds,\"xaxis\"),E=o(t._ybnds,\"yaxis\"),A=o(t._zbnds,\"zaxis\"),L=fZ(s),_=fZ(l),k=fZ(u),M=[[C[0]-L[0],E[0]-_[0],A[0]-k[0]],[C[1]+L[1],E[1]+_[1],A[1]+k[1]]],g=nRe(a,M),P=vDt(t);g.vertexIntensityBounds=[P.min/t._normMax,P.max/t._normMax];var T=t.lightposition;return g.lightPosition=[T.x,T.y,T.z],g.ambient=t.lighting.ambient,g.diffuse=t.lighting.diffuse,g.specular=t.lighting.specular,g.roughness=t.lighting.roughness,g.fresnel=t.lighting.fresnel,g.opacity=t.opacity,t._pad=g.tubeScale*t.sizeref*2,g}hZ.update=function(e){this.data=e;var t=sRe(this.scene,e);this.mesh.update(t)};hZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function pDt(e,t){var r=e.glplot.gl,n=sRe(e,t),i=fDt(r,n),a=new oRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}lRe.exports=pDt});var fRe=ye((egr,cRe)=>{\"use strict\";cRe.exports={moduleType:\"trace\",name:\"streamtube\",basePlotModule:$_(),categories:[\"gl3d\",\"showLegend\"],attributes:cZ(),supplyDefaults:tRe(),colorbar:{min:\"cmin\",max:\"cmax\"},calc:aF().calc,plot:uRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var dRe=ye((tgr,hRe)=>{\"use strict\";hRe.exports=fRe()});var G2=ye((igr,gRe)=>{\"use strict\";var gDt=Qo().hovertemplateAttrs,mDt=Qo().texttemplateAttrs,yDt=Eg(),jm=pf(),_Dt=Gl(),vRe=Tu(),xDt=Pd().dash,V2=Ao().extendFlat,bDt=mc().overrideAll,eg=jm.marker,pRe=jm.line,wDt=eg.line,rgr=[\"The library used by the *country names* `locationmode` option is changing in an upcoming version.\",\"Country names in existing plots may not work in the new version.\"].join(\" \");gRe.exports=bDt({lon:{valType:\"data_array\"},lat:{valType:\"data_array\"},locations:{valType:\"data_array\"},locationmode:{valType:\"enumerated\",values:[\"ISO-3\",\"USA-states\",\"country names\",\"geojson-id\"],dflt:\"ISO-3\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:{valType:\"string\",editType:\"calc\",dflt:\"id\"},mode:V2({},jm.mode,{dflt:\"markers\"}),text:V2({},jm.text,{}),texttemplate:mDt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"location\",\"text\"]}),hovertext:V2({},jm.hovertext,{}),textfont:jm.textfont,textposition:jm.textposition,line:{color:pRe.color,width:pRe.width,dash:xDt},connectgaps:jm.connectgaps,marker:V2({symbol:eg.symbol,opacity:eg.opacity,angle:eg.angle,angleref:V2({},eg.angleref,{values:[\"previous\",\"up\",\"north\"]}),standoff:eg.standoff,size:eg.size,sizeref:eg.sizeref,sizemin:eg.sizemin,sizemode:eg.sizemode,colorbar:eg.colorbar,line:V2({width:wDt.width},vRe(\"marker.line\")),gradient:eg.gradient},vRe(\"marker\")),fill:{valType:\"enumerated\",values:[\"none\",\"toself\"],dflt:\"none\"},fillcolor:yDt(),selected:jm.selected,unselected:jm.unselected,hoverinfo:V2({},_Dt.hoverinfo,{flags:[\"lon\",\"lat\",\"location\",\"text\",\"name\"]}),hovertemplate:gDt()},\"calc\",\"nested\")});var yRe=ye((ngr,mRe)=>{\"use strict\";var fF=Dr(),dZ=Ru(),TDt=$p(),ADt=R0(),SDt=D0(),MDt=Ig(),EDt=G2(),CDt=[\"The library used by the *country names* `locationmode` option is changing in the next major version.\",\"Some country names in existing plots may not work in the new version.\",\"To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.\"].join(\" \");mRe.exports=function(t,r,n,i){function a(d,v){return fF.coerce(t,r,EDt,d,v)}var o=a(\"locations\"),s;if(o&&o.length){var l=a(\"geojson\"),u;(typeof l==\"string\"&&l!==\"\"||fF.isPlainObject(l))&&(u=\"geojson-id\");var c=a(\"locationmode\",u);c===\"country names\"&&fF.warn(CDt),c===\"geojson-id\"&&a(\"featureidkey\"),s=o.length}else{var f=a(\"lon\")||[],h=a(\"lat\")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"mode\"),dZ.hasMarkers(r)&&TDt(t,r,n,i,a,{gradient:!0}),dZ.hasLines(r)&&(ADt(t,r,n,i,a),a(\"connectgaps\")),dZ.hasText(r)&&(a(\"texttemplate\"),SDt(t,r,i,a)),a(\"fill\"),r.fill!==\"none\"&&MDt(t,r,n,a),fF.coerceSelectionMarkerOpacity(r,a)}});var bRe=ye((agr,xRe)=>{\"use strict\";var _Re=ho();xRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=_Re.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=_Re.tickText(o,o.c2l(s[1]),!0).text,i}});var hF=ye((ogr,SRe)=>{\"use strict\";var vZ=Eo(),wRe=hs().BADNUM,kDt=F0(),LDt=Cm(),PDt=z0(),IDt=Dr().isArrayOrTypedArray,TRe=Dr()._;function ARe(e){return e&&typeof e==\"string\"}SRe.exports=function(t,r){var n=IDt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return ARe(h)||vZ(h)}:o=ARe;for(var s=0;s<i;s++){var l=a[s]={};if(n){var u=r.locations[s];l.loc=o(u)?u:null}else{var c=r.lon[s],f=r.lat[s];vZ(c)&&vZ(f)?l.lonlat=[+c,+f]:l.lonlat=[wRe,wRe]}}return LDt(a,r),kDt(t,r),PDt(a,r),i&&(a[0].t={labels:{lat:TRe(t,\"lat:\")+\" \",lon:TRe(t,\"lon:\")+\" \"}}),a}});var eC=ye(Sv=>{\"use strict\";Sv.projNames={airy:\"airy\",aitoff:\"aitoff\",\"albers usa\":\"albersUsa\",albers:\"albers\",august:\"august\",\"azimuthal equal area\":\"azimuthalEqualArea\",\"azimuthal equidistant\":\"azimuthalEquidistant\",baker:\"baker\",bertin1953:\"bertin1953\",boggs:\"boggs\",bonne:\"bonne\",bottomley:\"bottomley\",bromley:\"bromley\",collignon:\"collignon\",\"conic conformal\":\"conicConformal\",\"conic equal area\":\"conicEqualArea\",\"conic equidistant\":\"conicEquidistant\",craig:\"craig\",craster:\"craster\",\"cylindrical equal area\":\"cylindricalEqualArea\",\"cylindrical stereographic\":\"cylindricalStereographic\",eckert1:\"eckert1\",eckert2:\"eckert2\",eckert3:\"eckert3\",eckert4:\"eckert4\",eckert5:\"eckert5\",eckert6:\"eckert6\",eisenlohr:\"eisenlohr\",\"equal earth\":\"equalEarth\",equirectangular:\"equirectangular\",fahey:\"fahey\",\"foucaut sinusoidal\":\"foucautSinusoidal\",foucaut:\"foucaut\",ginzburg4:\"ginzburg4\",ginzburg5:\"ginzburg5\",ginzburg6:\"ginzburg6\",ginzburg8:\"ginzburg8\",ginzburg9:\"ginzburg9\",gnomonic:\"gnomonic\",\"gringorten quincuncial\":\"gringortenQuincuncial\",gringorten:\"gringorten\",guyou:\"guyou\",hammer:\"hammer\",hill:\"hill\",homolosine:\"homolosine\",hufnagel:\"hufnagel\",hyperelliptical:\"hyperelliptical\",kavrayskiy7:\"kavrayskiy7\",lagrange:\"lagrange\",larrivee:\"larrivee\",laskowski:\"laskowski\",loximuthal:\"loximuthal\",mercator:\"mercator\",miller:\"miller\",mollweide:\"mollweide\",\"mt flat polar parabolic\":\"mtFlatPolarParabolic\",\"mt flat polar quartic\":\"mtFlatPolarQuartic\",\"mt flat polar sinusoidal\":\"mtFlatPolarSinusoidal\",\"natural earth\":\"naturalEarth\",\"natural earth1\":\"naturalEarth1\",\"natural earth2\":\"naturalEarth2\",\"nell hammer\":\"nellHammer\",nicolosi:\"nicolosi\",orthographic:\"orthographic\",patterson:\"patterson\",\"peirce quincuncial\":\"peirceQuincuncial\",polyconic:\"polyconic\",\"rectangular polyconic\":\"rectangularPolyconic\",robinson:\"robinson\",satellite:\"satellite\",\"sinu mollweide\":\"sinuMollweide\",sinusoidal:\"sinusoidal\",stereographic:\"stereographic\",times:\"times\",\"transverse mercator\":\"transverseMercator\",\"van der grinten\":\"vanDerGrinten\",\"van der grinten2\":\"vanDerGrinten2\",\"van der grinten3\":\"vanDerGrinten3\",\"van der grinten4\":\"vanDerGrinten4\",wagner4:\"wagner4\",wagner6:\"wagner6\",wiechel:\"wiechel\",\"winkel tripel\":\"winkel3\",winkel3:\"winkel3\"};Sv.axesNames=[\"lonaxis\",\"lataxis\"];Sv.lonaxisSpan={orthographic:180,\"azimuthal equal area\":360,\"azimuthal equidistant\":360,\"conic conformal\":180,gnomonic:160,stereographic:180,\"transverse mercator\":180,\"*\":360};Sv.lataxisSpan={\"conic conformal\":150,stereographic:179.5,\"*\":180};Sv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\"equirectangular\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\"albers usa\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\"conic conformal\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\"mercator\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\"mercator\",projRotate:[0,0,0]},\"north america\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\"conic conformal\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\"south america\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\"mercator\",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:\"equirectangular\",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:\"equirectangular\",projRotate:[0,0,0]}};Sv.clipPad=.001;Sv.precision=.1;Sv.landColor=\"#F0DC82\";Sv.waterColor=\"#3399FF\";Sv.locationmodeToLayer={\"ISO-3\":\"countries\",\"USA-states\":\"subunits\",\"country names\":\"countries\"};Sv.sphereSVG={type:\"Sphere\"};Sv.fillLayers={ocean:1,land:1,lakes:1};Sv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Sv.layers=[\"bg\",\"ocean\",\"land\",\"lakes\",\"subunits\",\"countries\",\"coastlines\",\"rivers\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"frontplot\"];Sv.layersForChoropleth=[\"bg\",\"ocean\",\"land\",\"subunits\",\"countries\",\"coastlines\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"rivers\",\"lakes\",\"frontplot\"];Sv.layerNameToAdjective={ocean:\"ocean\",land:\"land\",lakes:\"lake\",subunits:\"subunit\",countries:\"country\",coastlines:\"coastline\",rivers:\"river\",frame:\"frame\"}});var pZ=ye((dF,MRe)=>{(function(e,t){typeof dF==\"object\"&&typeof MRe!=\"undefined\"?t(dF):(e=e||self,t(e.topojson=e.topojson||{}))})(dF,function(e){\"use strict\";function t(E){return E}function r(E){if(E==null)return t;var A,L,_=E.scale[0],k=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,T){T||(A=L=0);var z=2,O=P.length,V=new Array(O);for(V[0]=(A+=P[0])*_+M,V[1]=(L+=P[1])*k+g;z<O;)V[z]=P[z],++z;return V}}function n(E){var A=r(E.transform),L,_=1/0,k=_,M=-_,g=-_;function P(z){z=A(z),z[0]<_&&(_=z[0]),z[0]>M&&(M=z[0]),z[1]<k&&(k=z[1]),z[1]>g&&(g=z[1])}function T(z){switch(z.type){case\"GeometryCollection\":z.geometries.forEach(T);break;case\"Point\":P(z.coordinates);break;case\"MultiPoint\":z.coordinates.forEach(P);break}}E.arcs.forEach(function(z){for(var O=-1,V=z.length,G;++O<V;)G=A(z[O],O),G[0]<_&&(_=G[0]),G[0]>M&&(M=G[0]),G[1]<k&&(k=G[1]),G[1]>g&&(g=G[1])});for(L in E.objects)T(E.objects[L]);return[_,k,M,g]}function i(E,A){for(var L,_=E.length,k=_-A;k<--_;)L=E[k],E[k++]=E[_],E[_]=L}function a(E,A){return typeof A==\"string\"&&(A=E.objects[A]),A.type===\"GeometryCollection\"?{type:\"FeatureCollection\",features:A.geometries.map(function(L){return o(E,L)})}:o(E,A)}function o(E,A){var L=A.id,_=A.bbox,k=A.properties==null?{}:A.properties,M=s(E,A);return L==null&&_==null?{type:\"Feature\",properties:k,geometry:M}:_==null?{type:\"Feature\",id:L,properties:k,geometry:M}:{type:\"Feature\",id:L,bbox:_,properties:k,geometry:M}}function s(E,A){var L=r(E.transform),_=E.arcs;function k(O,V){V.length&&V.pop();for(var G=_[O<0?~O:O],Z=0,H=G.length;Z<H;++Z)V.push(L(G[Z],Z));O<0&&i(V,H)}function M(O){return L(O)}function g(O){for(var V=[],G=0,Z=O.length;G<Z;++G)k(O[G],V);return V.length<2&&V.push(V[0]),V}function P(O){for(var V=g(O);V.length<4;)V.push(V[0]);return V}function T(O){return O.map(P)}function z(O){var V=O.type,G;switch(V){case\"GeometryCollection\":return{type:V,geometries:O.geometries.map(z)};case\"Point\":G=M(O.coordinates);break;case\"MultiPoint\":G=O.coordinates.map(M);break;case\"LineString\":G=g(O.arcs);break;case\"MultiLineString\":G=O.arcs.map(g);break;case\"Polygon\":G=T(O.arcs);break;case\"MultiPolygon\":G=O.arcs.map(T);break;default:return null}return{type:V,coordinates:G}}return z(A)}function l(E,A){var L={},_={},k={},M=[],g=-1;A.forEach(function(z,O){var V=E.arcs[z<0?~z:z],G;V.length<3&&!V[1][0]&&!V[1][1]&&(G=A[++g],A[g]=z,A[O]=G)}),A.forEach(function(z){var O=P(z),V=O[0],G=O[1],Z,H;if(Z=k[V])if(delete k[Z.end],Z.push(z),Z.end=G,H=_[G]){delete _[H.start];var N=H===Z?Z:Z.concat(H);_[N.start=Z.start]=k[N.end=H.end]=N}else _[Z.start]=k[Z.end]=Z;else if(Z=_[G])if(delete _[Z.start],Z.unshift(z),Z.start=V,H=k[V]){delete k[H.end];var j=H===Z?Z:H.concat(Z);_[j.start=H.start]=k[j.end=Z.end]=j}else _[Z.start]=k[Z.end]=Z;else Z=[z],_[Z.start=V]=k[Z.end=G]=Z});function P(z){var O=E.arcs[z<0?~z:z],V=O[0],G;return E.transform?(G=[0,0],O.forEach(function(Z){G[0]+=Z[0],G[1]+=Z[1]})):G=O[O.length-1],z<0?[G,V]:[V,G]}function T(z,O){for(var V in z){var G=z[V];delete O[G.start],delete G.start,delete G.end,G.forEach(function(Z){L[Z<0?~Z:Z]=1}),M.push(G)}}return T(k,_),T(_,k),A.forEach(function(z){L[z<0?~z:z]||M.push([z])}),M}function u(E){return s(E,c.apply(this,arguments))}function c(E,A,L){var _,k,M;if(arguments.length>1)_=f(E,A,L);else for(k=0,_=new Array(M=E.arcs.length);k<M;++k)_[k]=k;return{type:\"MultiLineString\",arcs:l(E,_)}}function f(E,A,L){var _=[],k=[],M;function g(V){var G=V<0?~V:V;(k[G]||(k[G]=[])).push({i:V,g:M})}function P(V){V.forEach(g)}function T(V){V.forEach(P)}function z(V){V.forEach(T)}function O(V){switch(M=V,V.type){case\"GeometryCollection\":V.geometries.forEach(O);break;case\"LineString\":P(V.arcs);break;case\"MultiLineString\":case\"Polygon\":T(V.arcs);break;case\"MultiPolygon\":z(V.arcs);break}}return O(A),k.forEach(L==null?function(V){_.push(V[0].i)}:function(V){L(V[0].g,V[V.length-1].g)&&_.push(V[0].i)}),_}function h(E){for(var A=-1,L=E.length,_,k=E[L-1],M=0;++A<L;)_=k,k=E[A],M+=_[0]*k[1]-_[1]*k[0];return Math.abs(M)}function d(E){return s(E,v.apply(this,arguments))}function v(E,A){var L={},_=[],k=[];A.forEach(M);function M(T){switch(T.type){case\"GeometryCollection\":T.geometries.forEach(M);break;case\"Polygon\":g(T.arcs);break;case\"MultiPolygon\":T.arcs.forEach(g);break}}function g(T){T.forEach(function(z){z.forEach(function(O){(L[O=O<0?~O:O]||(L[O]=[])).push(T)})}),_.push(T)}function P(T){return h(s(E,{type:\"Polygon\",arcs:[T]}).coordinates[0])}return _.forEach(function(T){if(!T._){var z=[],O=[T];for(T._=1,k.push(z);T=O.pop();)z.push(T),T.forEach(function(V){V.forEach(function(G){L[G<0?~G:G].forEach(function(Z){Z._||(Z._=1,O.push(Z))})})})}}),_.forEach(function(T){delete T._}),{type:\"MultiPolygon\",arcs:k.map(function(T){var z=[],O;if(T.forEach(function(N){N.forEach(function(j){j.forEach(function(re){L[re<0?~re:re].length<2&&z.push(re)})})}),z=l(E,z),(O=z.length)>1)for(var V=1,G=P(z[0]),Z,H;V<O;++V)(Z=P(z[V]))>G&&(H=z[0],z[0]=z[V],z[V]=H,G=Z);return z}).filter(function(T){return T.length>0})}}function x(E,A){for(var L=0,_=E.length;L<_;){var k=L+_>>>1;E[k]<A?L=k+1:_=k}return L}function b(E){var A={},L=E.map(function(){return[]});function _(N,j){N.forEach(function(re){re<0&&(re=~re);var oe=A[re];oe?oe.push(j):A[re]=[j]})}function k(N,j){N.forEach(function(re){_(re,j)})}function M(N,j){N.type===\"GeometryCollection\"?N.geometries.forEach(function(re){M(re,j)}):N.type in g&&g[N.type](N.arcs,j)}var g={LineString:_,MultiLineString:k,Polygon:k,MultiPolygon:function(N,j){N.forEach(function(re){k(re,j)})}};E.forEach(M);for(var P in A)for(var T=A[P],z=T.length,O=0;O<z;++O)for(var V=O+1;V<z;++V){var G=T[O],Z=T[V],H;(H=L[G])[P=x(H,Z)]!==Z&&H.splice(P,0,Z),(H=L[Z])[P=x(H,G)]!==G&&H.splice(P,0,G)}return L}function p(E){if(E==null)return t;var A,L,_=E.scale[0],k=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,T){T||(A=L=0);var z=2,O=P.length,V=new Array(O),G=Math.round((P[0]-M)/_),Z=Math.round((P[1]-g)/k);for(V[0]=G-A,A=G,V[1]=Z-L,L=Z;z<O;)V[z]=P[z],++z;return V}}function C(E,A){if(E.transform)throw new Error(\"already quantized\");if(!A||!A.scale){if(!((g=Math.floor(A))>=2))throw new Error(\"n must be \\u22652\");T=E.bbox||n(E);var L=T[0],_=T[1],k=T[2],M=T[3],g;A={scale:[k-L?(k-L)/(g-1):1,M-_?(M-_)/(g-1):1],translate:[L,_]}}else T=E.bbox;var P=p(A),T,z,O=E.objects,V={};function G(N){return P(N)}function Z(N){var j;switch(N.type){case\"GeometryCollection\":j={type:\"GeometryCollection\",geometries:N.geometries.map(Z)};break;case\"Point\":j={type:\"Point\",coordinates:G(N.coordinates)};break;case\"MultiPoint\":j={type:\"MultiPoint\",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(j.id=N.id),N.bbox!=null&&(j.bbox=N.bbox),N.properties!=null&&(j.properties=N.properties),j}function H(N){var j=0,re=1,oe=N.length,_e,Me=new Array(oe);for(Me[0]=P(N[0],0);++j<oe;)((_e=P(N[j],j))[0]||_e[1])&&(Me[re++]=_e);return re===1&&(Me[re++]=[0,0]),Me.length=re,Me}for(z in O)V[z]=Z(O[z]);return{type:\"Topology\",bbox:T,transform:A,objects:V,arcs:E.arcs.map(H)}}e.bbox=n,e.feature=a,e.merge=d,e.mergeArcs=v,e.mesh=u,e.meshArcs=c,e.neighbors=b,e.quantize=C,e.transform=r,e.untransform=p,Object.defineProperty(e,\"__esModule\",{value:!0})})});var vF=ye((lgr,ERe)=>{\"use strict\";var gZ=ERe.exports={},RDt=eC().locationmodeToLayer,DDt=pZ().feature;gZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,\"-\"),\"_\",e.resolution.toString(),\"m\"].join(\"\")};gZ.getTopojsonPath=function(e,t){return e+=e.endsWith(\"/\")?\"\":\"/\",`${e}${t}.json`};gZ.getTopojsonFeatures=function(e,t){var r=RDt[e.locationmode],n=t.objects[r];return DDt(t,n).features}});var tx=ye(tC=>{\"use strict\";var FDt=hs().BADNUM;tC.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a<e.length;a++){var o=e[a],s=o.lonlat;s[0]!==FDt?i.push(s):!r&&i.length>0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};tC.makeLine=function(e){return e.length===1?{type:\"LineString\",coordinates:e[0]}:{type:\"MultiLineString\",coordinates:e}};tC.makePolygon=function(e){if(e.length===1)return{type:\"Polygon\",coordinates:e};for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=[e[r]];return{type:\"MultiPolygon\",coordinates:t}};tC.makeBlank=function(){return{type:\"Point\",coordinates:[]}}});var kRe=ye((cgr,CRe)=>{CRe.exports={AFG:\"afghan\",ALA:\"\\\\b\\\\wland\",ALB:\"albania\",DZA:\"algeria\",ASM:\"^(?=.*americ).*samoa\",AND:\"andorra\",AGO:\"angola\",AIA:\"anguill?a\",ATA:\"antarctica\",ATG:\"antigua\",ARG:\"argentin\",ARM:\"armenia\",ABW:\"^(?!.*bonaire).*\\\\baruba\",AUS:\"australia\",AUT:\"^(?!.*hungary).*austria|\\\\baustri.*\\\\bemp\",AZE:\"azerbaijan\",BHS:\"bahamas\",BHR:\"bahrain\",BGD:\"bangladesh|^(?=.*east).*paki?stan\",BRB:\"barbados\",BLR:\"belarus|byelo\",BEL:\"^(?!.*luxem).*belgium\",BLZ:\"belize|^(?=.*british).*honduras\",BEN:\"benin|dahome\",BMU:\"bermuda\",BTN:\"bhutan\",BOL:\"bolivia\",BES:\"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\bbes.?islands\",BIH:\"herzegovina|bosnia\",BWA:\"botswana|bechuana\",BVT:\"bouvet\",BRA:\"brazil\",IOT:\"british.?indian.?ocean\",BRN:\"brunei\",BGR:\"bulgaria\",BFA:\"burkina|\\\\bfaso|upper.?volta\",BDI:\"burundi\",CPV:\"verde\",KHM:\"cambodia|kampuchea|khmer\",CMR:\"cameroon\",CAN:\"canada\",CYM:\"cayman\",CAF:\"\\\\bcentral.african.republic\",TCD:\"\\\\bchad\",CHL:\"\\\\bchile\",CHN:\"^(?!.*\\\\bmac)(?!.*\\\\bhong)(?!.*\\\\btai)(?!.*\\\\brep).*china|^(?=.*peo)(?=.*rep).*china\",CXR:\"christmas\",CCK:\"\\\\bcocos|keeling\",COL:\"colombia\",COM:\"comoro\",COG:\"^(?!.*\\\\bdem)(?!.*\\\\bd[\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\bcongo\",COK:\"\\\\bcook\",CRI:\"costa.?rica\",CIV:\"ivoire|ivory\",HRV:\"croatia\",CUB:\"\\\\bcuba\",CUW:\"^(?!.*bonaire).*\\\\bcura(c|\\xE7)ao\",CYP:\"cyprus\",CSK:\"czechoslovakia\",CZE:\"^(?=.*rep).*czech|czechia|bohemia\",COD:\"\\\\bdem.*congo|congo.*\\\\bdem|congo.*\\\\bd[\\\\.]?r|\\\\bd[\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc\",DNK:\"denmark\",DJI:\"djibouti\",DMA:\"dominica(?!n)\",DOM:\"dominican.rep\",ECU:\"ecuador\",EGY:\"egypt\",SLV:\"el.?salvador\",GNQ:\"guine.*eq|eq.*guine|^(?=.*span).*guinea\",ERI:\"eritrea\",EST:\"estonia\",ETH:\"ethiopia|abyssinia\",FLK:\"falkland|malvinas\",FRO:\"faroe|faeroe\",FJI:\"fiji\",FIN:\"finland\",FRA:\"^(?!.*\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\bgaul\",GUF:\"^(?=.*french).*guiana\",PYF:\"french.?polynesia|tahiti\",ATF:\"french.?southern\",GAB:\"gabon\",GMB:\"gambia\",GEO:\"^(?!.*south).*georgia\",DDR:\"german.?democratic.?republic|democratic.?republic.*germany|east.germany\",DEU:\"^(?!.*east).*germany|^(?=.*\\\\bfed.*\\\\brep).*german\",GHA:\"ghana|gold.?coast\",GIB:\"gibraltar\",GRC:\"greece|hellenic|hellas\",GRL:\"greenland\",GRD:\"grenada\",GLP:\"guadeloupe\",GUM:\"\\\\bguam\",GTM:\"guatemala\",GGY:\"guernsey\",GIN:\"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea\",GNB:\"bissau|^(?=.*portu).*guinea\",GUY:\"guyana|british.?guiana\",HTI:\"haiti\",HMD:\"heard.*mcdonald\",VAT:\"holy.?see|vatican|papal.?st\",HND:\"^(?!.*brit).*honduras\",HKG:\"hong.?kong\",HUN:\"^(?!.*austr).*hungary\",ISL:\"iceland\",IND:\"india(?!.*ocea)\",IDN:\"indonesia\",IRN:\"\\\\biran|persia\",IRQ:\"\\\\biraq|mesopotamia\",IRL:\"(^ireland)|(^republic.*ireland)\",IMN:\"^(?=.*isle).*\\\\bman\",ISR:\"israel\",ITA:\"italy\",JAM:\"jamaica\",JPN:\"japan\",JEY:\"jersey\",JOR:\"jordan\",KAZ:\"kazak\",KEN:\"kenya|british.?east.?africa|east.?africa.?prot\",KIR:\"kiribati\",PRK:\"^(?=.*democrat|people|north|d.*p.*.r).*\\\\bkorea|dprk|korea.*(d.*p.*r)\",KWT:\"kuwait\",KGZ:\"kyrgyz|kirghiz\",LAO:\"\\\\blaos?\\\\b\",LVA:\"latvia\",LBN:\"lebanon\",LSO:\"lesotho|basuto\",LBR:\"liberia\",LBY:\"libya\",LIE:\"liechtenstein\",LTU:\"lithuania\",LUX:\"^(?!.*belg).*luxem\",MAC:\"maca(o|u)\",MDG:\"madagascar|malagasy\",MWI:\"malawi|nyasa\",MYS:\"malaysia\",MDV:\"maldive\",MLI:\"\\\\bmali\\\\b\",MLT:\"\\\\bmalta\",MHL:\"marshall\",MTQ:\"martinique\",MRT:\"mauritania\",MUS:\"mauritius\",MYT:\"\\\\bmayotte\",MEX:\"\\\\bmexic\",FSM:\"fed.*micronesia|micronesia.*fed\",MCO:\"monaco\",MNG:\"mongolia\",MNE:\"^(?!.*serbia).*montenegro\",MSR:\"montserrat\",MAR:\"morocco|\\\\bmaroc\",MOZ:\"mozambique\",MMR:\"myanmar|burma\",NAM:\"namibia\",NRU:\"nauru\",NPL:\"nepal\",NLD:\"^(?!.*\\\\bant)(?!.*\\\\bcarib).*netherlands\",ANT:\"^(?=.*\\\\bant).*(nether|dutch)\",NCL:\"new.?caledonia\",NZL:\"new.?zealand\",NIC:\"nicaragua\",NER:\"\\\\bniger(?!ia)\",NGA:\"nigeria\",NIU:\"niue\",NFK:\"norfolk\",MNP:\"mariana\",NOR:\"norway\",OMN:\"\\\\boman|trucial\",PAK:\"^(?!.*east).*paki?stan\",PLW:\"palau\",PSE:\"palestin|\\\\bgaza|west.?bank\",PAN:\"panama\",PNG:\"papua|new.?guinea\",PRY:\"paraguay\",PER:\"peru\",PHL:\"philippines\",PCN:\"pitcairn\",POL:\"poland\",PRT:\"portugal\",PRI:\"puerto.?rico\",QAT:\"qatar\",KOR:\"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\bkorea(?!.*d.*p.*r)\",MDA:\"moldov|b(a|e)ssarabia\",REU:\"r(e|\\xE9)union\",ROU:\"r(o|u|ou)mania\",RUS:\"\\\\brussia|soviet.?union|u\\\\.?s\\\\.?s\\\\.?r|socialist.?republics\",RWA:\"rwanda\",BLM:\"barth(e|\\xE9)lemy\",SHN:\"helena\",KNA:\"kitts|\\\\bnevis\",LCA:\"\\\\blucia\",MAF:\"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)\",SPM:\"miquelon\",VCT:\"vincent\",WSM:\"^(?!.*amer).*samoa\",SMR:\"san.?marino\",STP:\"\\\\bs(a|\\xE3)o.?tom(e|\\xE9)\",SAU:\"\\\\bsa\\\\w*.?arabia\",SEN:\"senegal\",SRB:\"^(?!.*monte).*serbia\",SYC:\"seychell\",SLE:\"sierra\",SGP:\"singapore\",SXM:\"^(?!.*martin)(?!.*saba).*maarten\",SVK:\"^(?!.*cze).*slovak\",SVN:\"slovenia\",SLB:\"solomon\",SOM:\"somali\",ZAF:\"south.africa|s\\\\\\\\..?africa\",SGS:\"south.?georgia|sandwich\",SSD:\"\\\\bs\\\\w*.?sudan\",ESP:\"spain\",LKA:\"sri.?lanka|ceylon\",SDN:\"^(?!.*\\\\bs(?!u)).*sudan\",SUR:\"surinam|dutch.?guiana\",SJM:\"svalbard\",SWZ:\"swaziland\",SWE:\"sweden\",CHE:\"switz|swiss\",SYR:\"syria\",TWN:\"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china\",TJK:\"tajik\",THA:\"thailand|\\\\bsiam\",MKD:\"macedonia|fyrom\",TLS:\"^(?=.*leste).*timor|^(?=.*east).*timor\",TGO:\"togo\",TKL:\"tokelau\",TON:\"tonga\",TTO:\"trinidad|tobago\",TUN:\"tunisia\",TUR:\"turkey\",TKM:\"turkmen\",TCA:\"turks\",TUV:\"tuvalu\",UGA:\"uganda\",UKR:\"ukrain\",ARE:\"emirates|^u\\\\.?a\\\\.?e\\\\.?$|united.?arab.?em\",GBR:\"united.?kingdom|britain|^u\\\\.?k\\\\.?$\",TZA:\"tanzania\",USA:\"united.?states\\\\b(?!.*islands)|\\\\bu\\\\.?s\\\\.?a\\\\.?\\\\b|^\\\\s*u\\\\.?s\\\\.?\\\\b(?!.*islands)\",UMI:\"minor.?outlying.?is\",URY:\"uruguay\",UZB:\"uzbek\",VUT:\"vanuatu|new.?hebrides\",VEN:\"venezuela\",VNM:\"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam\",VGB:\"^(?=.*\\\\bu\\\\.?\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin\",VIR:\"^(?=.*\\\\bu\\\\.?\\\\s?s).*virgin|^(?=.*states).*virgin\",WLF:\"futuna|wallis\",ESH:\"western.sahara\",YEM:\"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YMD:\"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YUG:\"yugoslavia\",ZMB:\"zambia|northern.?rhodesia\",EAZ:\"zanzibar\",ZWE:\"zimbabwe|^(?!.*northern).*rhodesia\"}});var mF=ye(ic=>{\"use strict\";Object.defineProperty(ic,\"__esModule\",{value:!0});var zp=63710088e-1,yZ={centimeters:zp*100,centimetres:zp*100,degrees:360/(2*Math.PI),feet:zp*3.28084,inches:zp*39.37,kilometers:zp/1e3,kilometres:zp/1e3,meters:zp,metres:zp,miles:zp/1609.344,millimeters:zp*1e3,millimetres:zp*1e3,nauticalmiles:zp/1852,radians:1,yards:zp*1.0936},mZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function rx(e,t,r={}){let n={type:\"Feature\"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function zDt(e,t,r={}){switch(e){case\"Point\":return _Z(t).geometry;case\"LineString\":return bZ(t).geometry;case\"Polygon\":return xZ(t).geometry;case\"MultiPoint\":return PRe(t).geometry;case\"MultiLineString\":return LRe(t).geometry;case\"MultiPolygon\":return IRe(t).geometry;default:throw new Error(e+\" is invalid\")}}function _Z(e,t,r={}){if(!e)throw new Error(\"coordinates is required\");if(!Array.isArray(e))throw new Error(\"coordinates must be an Array\");if(e.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!pF(e[0])||!pF(e[1]))throw new Error(\"coordinates must contain numbers\");return rx({type:\"Point\",coordinates:e},t,r)}function ODt(e,t,r={}){return gF(e.map(n=>_Z(n,t)),r)}function xZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");if(i[i.length-1].length!==i[0].length)throw new Error(\"First and last Position are not equivalent.\");for(let a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error(\"First and last Position are not equivalent.\")}return rx({type:\"Polygon\",coordinates:e},t,r)}function qDt(e,t,r={}){return gF(e.map(n=>xZ(n,t)),r)}function bZ(e,t,r={}){if(e.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return rx({type:\"LineString\",coordinates:e},t,r)}function BDt(e,t,r={}){return gF(e.map(n=>bZ(n,t)),r)}function gF(e,t={}){let r={type:\"FeatureCollection\"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function LRe(e,t,r={}){return rx({type:\"MultiLineString\",coordinates:e},t,r)}function PRe(e,t,r={}){return rx({type:\"MultiPoint\",coordinates:e},t,r)}function IRe(e,t,r={}){return rx({type:\"MultiPolygon\",coordinates:e},t,r)}function NDt(e,t,r={}){return rx({type:\"GeometryCollection\",geometries:e},t,r)}function UDt(e,t=0){if(t&&!(t>=0))throw new Error(\"precision must be a positive number\");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function RRe(e,t=\"kilometers\"){let r=yZ[t];if(!r)throw new Error(t+\" units is invalid\");return e*r}function wZ(e,t=\"kilometers\"){let r=yZ[t];if(!r)throw new Error(t+\" units is invalid\");return e/r}function VDt(e,t){return DRe(wZ(e,t))}function GDt(e){let t=e%360;return t<0&&(t+=360),t}function HDt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function DRe(e){return e%(2*Math.PI)*180/Math.PI}function jDt(e){return e%360*Math.PI/180}function WDt(e,t=\"kilometers\",r=\"kilometers\"){if(!(e>=0))throw new Error(\"length must be a positive number\");return RRe(wZ(e,t),r)}function XDt(e,t=\"meters\",r=\"kilometers\"){if(!(e>=0))throw new Error(\"area must be a positive number\");let n=mZ[t];if(!n)throw new Error(\"invalid original units\");let i=mZ[r];if(!i)throw new Error(\"invalid final units\");return e/n*i}function pF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function ZDt(e){return e!==null&&typeof e==\"object\"&&!Array.isArray(e)}function YDt(e){if(!e)throw new Error(\"bbox is required\");if(!Array.isArray(e))throw new Error(\"bbox must be an Array\");if(e.length!==4&&e.length!==6)throw new Error(\"bbox must be an Array of 4 or 6 numbers\");e.forEach(t=>{if(!pF(t))throw new Error(\"bbox must only contain numbers\")})}function KDt(e){if(!e)throw new Error(\"id is required\");if([\"string\",\"number\"].indexOf(typeof e)===-1)throw new Error(\"id must be a number or a string\")}ic.areaFactors=mZ;ic.azimuthToBearing=HDt;ic.bearingToAzimuth=GDt;ic.convertArea=XDt;ic.convertLength=WDt;ic.degreesToRadians=jDt;ic.earthRadius=zp;ic.factors=yZ;ic.feature=rx;ic.featureCollection=gF;ic.geometry=zDt;ic.geometryCollection=NDt;ic.isNumber=pF;ic.isObject=ZDt;ic.lengthToDegrees=VDt;ic.lengthToRadians=wZ;ic.lineString=bZ;ic.lineStrings=BDt;ic.multiLineString=LRe;ic.multiPoint=PRe;ic.multiPolygon=IRe;ic.point=_Z;ic.points=ODt;ic.polygon=xZ;ic.polygons=qDt;ic.radiansToDegrees=DRe;ic.radiansToLength=RRe;ic.round=UDt;ic.validateBBox=YDt;ic.validateId=KDt});var _F=ye(qd=>{\"use strict\";Object.defineProperty(qd,\"__esModule\",{value:!0});var jv=mF();function rC(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d===\"FeatureCollection\",x=d===\"Feature\",b=v?e.features.length:1,p=0;p<b;p++){u=v?e.features[p].geometry:x?e.geometry:e,h=u?u.type===\"GeometryCollection\":!1,s=h?u.geometries.length:1;for(var C=0;C<s;C++){var E=0,A=0;if(o=h?u.geometries[C]:u,o!==null){l=o.coordinates;var L=o.type;switch(c=r&&(L===\"Polygon\"||L===\"MultiPolygon\")?1:0,L){case null:break;case\"Point\":if(t(l,f,p,E,A)===!1)return!1;f++,E++;break;case\"LineString\":case\"MultiPoint\":for(n=0;n<l.length;n++){if(t(l[n],f,p,E,A)===!1)return!1;f++,L===\"MultiPoint\"&&E++}L===\"LineString\"&&E++;break;case\"Polygon\":case\"MultiLineString\":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],f,p,E,A)===!1)return!1;f++}L===\"MultiLineString\"&&E++,L===\"Polygon\"&&A++}L===\"Polygon\"&&E++;break;case\"MultiPolygon\":for(n=0;n<l.length;n++){for(A=0,i=0;i<l[n].length;i++){for(a=0;a<l[n][i].length-c;a++){if(t(l[n][i][a],f,p,E,A)===!1)return!1;f++}A++}E++}break;case\"GeometryCollection\":for(n=0;n<o.geometries.length;n++)if(rC(o.geometries[n],t,r)===!1)return!1;break;default:throw new Error(\"Unknown Geometry Type\")}}}}}function JDt(e,t,r,n){var i=r;return rC(e,function(a,o,s,l,u){o===0&&r===void 0?i=a:i=t(i,a,o,s,l,u)},n),i}function FRe(e,t){var r;switch(e.type){case\"FeatureCollection\":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case\"Feature\":t(e.properties,0);break}}function $Dt(e,t,r){var n=r;return FRe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function zRe(e,t){if(e.type===\"Feature\")t(e,0);else if(e.type===\"FeatureCollection\")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}function QDt(e,t,r){var n=r;return zRe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function eFt(e){var t=[];return rC(e,function(r){t.push(r)}),t}function TZ(e,t){var r,n,i,a,o,s,l,u,c,f,h=0,d=e.type===\"FeatureCollection\",v=e.type===\"Feature\",x=d?e.features.length:1;for(r=0;r<x;r++){for(s=d?e.features[r].geometry:v?e.geometry:e,u=d?e.features[r].properties:v?e.properties:{},c=d?e.features[r].bbox:v?e.bbox:void 0,f=d?e.features[r].id:v?e.id:void 0,l=s?s.type===\"GeometryCollection\":!1,o=l?s.geometries.length:1,i=0;i<o;i++){if(a=l?s.geometries[i]:s,a===null){if(t(null,h,u,c,f)===!1)return!1;continue}switch(a.type){case\"Point\":case\"LineString\":case\"MultiPoint\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":{if(t(a,h,u,c,f)===!1)return!1;break}case\"GeometryCollection\":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],h,u,c,f)===!1)return!1;break}default:throw new Error(\"Unknown Geometry Type\")}}h++}}function tFt(e,t,r){var n=r;return TZ(e,function(i,a,o,s,l){a===0&&r===void 0?n=i:n=t(n,i,a,o,s,l)}),n}function yF(e,t){TZ(e,function(r,n,i,a,o){var s=r===null?null:r.type;switch(s){case null:case\"Point\":case\"LineString\":case\"Polygon\":return t(jv.feature.call(void 0,r,i,{bbox:a,id:o}),n,0)===!1?!1:void 0}var l;switch(s){case\"MultiPoint\":l=\"Point\";break;case\"MultiLineString\":l=\"LineString\";break;case\"MultiPolygon\":l=\"Polygon\";break}for(var u=0;u<r.coordinates.length;u++){var c=r.coordinates[u],f={type:l,coordinates:c};if(t(jv.feature.call(void 0,f,i),n,u)===!1)return!1}})}function rFt(e,t,r){var n=r;return yF(e,function(i,a,o){a===0&&o===0&&r===void 0?n=i:n=t(n,i,a,o)}),n}function ORe(e,t){yF(e,function(r,n,i){var a=0;if(r.geometry){var o=r.geometry.type;if(!(o===\"Point\"||o===\"MultiPoint\")){var s,l=0,u=0,c=0;if(rC(r,function(f,h,d,v,x){if(s===void 0||n>l||v>u||x>c){s=f,l=n,u=v,c=x,a=0;return}var b=jv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function iFt(e,t,r){var n=r,i=!1;return ORe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function qRe(e,t){if(!e)throw new Error(\"geojson is required\");yF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case\"LineString\":if(t(r,n,i,0,0)===!1)return!1;break;case\"Polygon\":for(var s=0;s<o.length;s++)if(t(jv.lineString.call(void 0,o[s],r.properties),n,i,s)===!1)return!1;break}}})}function nFt(e,t,r){var n=r;return qRe(e,function(i,a,o,s){a===0&&r===void 0?n=i:n=t(n,i,a,o,s)}),n}function aFt(e,t){if(t=t||{},!jv.isObject.call(void 0,t))throw new Error(\"options is invalid\");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,o=t.properties,s;switch(e.type){case\"FeatureCollection\":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case\"Feature\":o=o||e.properties,s=e.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":s=e;break;default:throw new Error(\"geojson is invalid\")}if(s===null)return null;var l=s.coordinates;switch(s.type){case\"Point\":case\"MultiPoint\":return null;case\"LineString\":return a<0&&(a=l.length+a-1),jv.lineString.call(void 0,[l[a],l[a+1]],o,t);case\"Polygon\":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),jv.lineString.call(void 0,[l[i][a],l[i][a+1]],o,t);case\"MultiLineString\":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a-1),jv.lineString.call(void 0,[l[n][a],l[n][a+1]],o,t);case\"MultiPolygon\":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a-1),jv.lineString.call(void 0,[l[n][i][a],l[n][i][a+1]],o,t)}throw new Error(\"geojson is invalid\")}function oFt(e,t){if(t=t||{},!jv.isObject.call(void 0,t))throw new Error(\"options is invalid\");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,o=t.properties,s;switch(e.type){case\"FeatureCollection\":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case\"Feature\":o=o||e.properties,s=e.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":s=e;break;default:throw new Error(\"geojson is invalid\")}if(s===null)return null;var l=s.coordinates;switch(s.type){case\"Point\":return jv.point.call(void 0,l,o,t);case\"MultiPoint\":return n<0&&(n=l.length+n),jv.point.call(void 0,l[n],o,t);case\"LineString\":return a<0&&(a=l.length+a),jv.point.call(void 0,l[a],o,t);case\"Polygon\":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),jv.point.call(void 0,l[i][a],o,t);case\"MultiLineString\":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a),jv.point.call(void 0,l[n][a],o,t);case\"MultiPolygon\":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a),jv.point.call(void 0,l[n][i][a],o,t)}throw new Error(\"geojson is invalid\")}qd.coordAll=eFt;qd.coordEach=rC;qd.coordReduce=JDt;qd.featureEach=zRe;qd.featureReduce=QDt;qd.findPoint=oFt;qd.findSegment=aFt;qd.flattenEach=yF;qd.flattenReduce=rFt;qd.geomEach=TZ;qd.geomReduce=tFt;qd.lineEach=qRe;qd.lineReduce=nFt;qd.propEach=FRe;qd.propReduce=$Dt;qd.segmentEach=ORe;qd.segmentReduce=iFt});var GRe=ye(xF=>{\"use strict\";Object.defineProperty(xF,\"__esModule\",{value:!0});var BRe=mF(),sFt=_F();function VRe(e){return sFt.geomReduce.call(void 0,e,(t,r)=>t+lFt(r),0)}function lFt(e){let t=0,r;switch(e.type){case\"Polygon\":return NRe(e.coordinates);case\"MultiPolygon\":for(r=0;r<e.coordinates.length;r++)t+=NRe(e.coordinates[r]);return t;case\"Point\":case\"MultiPoint\":case\"LineString\":case\"MultiLineString\":return 0}return 0}function NRe(e){let t=0;if(e&&e.length>0){t+=Math.abs(URe(e[0]));for(let r=1;r<e.length;r++)t-=Math.abs(URe(e[r]))}return t}var uFt=BRe.earthRadius*BRe.earthRadius/2,AZ=Math.PI/180;function URe(e){let t=e.length-1;if(t<=2)return 0;let r=0,n=0;for(;n<t;){let i=e[n],a=e[n+1===t?0:n+1],o=e[n+2>=t?(n+2)%t:n+2],s=i[0]*AZ,l=a[1]*AZ,u=o[0]*AZ;r+=(u-s)*Math.sin(l),n++}return r*uFt}var cFt=VRe;xF.area=VRe;xF.default=cFt});var jRe=ye(bF=>{\"use strict\";Object.defineProperty(bF,\"__esModule\",{value:!0});var fFt=mF(),hFt=_F();function HRe(e,t={}){let r=0,n=0,i=0;return hFt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),fFt.point.call(void 0,[r/i,n/i],t.properties)}var dFt=HRe;bF.centroid=HRe;bF.default=dFt});var XRe=ye(wF=>{\"use strict\";Object.defineProperty(wF,\"__esModule\",{value:!0});var vFt=_F();function WRe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return vFt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}var pFt=WRe;wF.bbox=WRe;wF.default=pFt});var ix=ye((ggr,$Re)=>{\"use strict\";var gFt=Oa(),KRe=kRe(),{area:mFt}=GRe(),{centroid:yFt}=jRe(),{bbox:_Ft}=XRe(),ZRe=VS(),XA=G1(),xFt=gy(),bFt=CS(),TF=MM(),YRe=Object.keys(KRe),wFt={\"ISO-3\":ZRe,\"USA-states\":ZRe,\"country names\":TFt};function TFt(e){for(var t=0;t<YRe.length;t++){var r=YRe[t],n=new RegExp(KRe[r]);if(n.test(e.trim().toLowerCase()))return r}return XA.log(\"Unrecognized country name: \"+e+\".\"),!1}function AFt(e,t,r){if(!t||typeof t!=\"string\")return!1;var n=wFt[e](t),i,a,o;if(n){if(e===\"USA-states\")for(i=[],o=0;o<r.length;o++)a=r[o],a.properties&&a.properties.gu&&a.properties.gu===\"USA\"&&i.push(a);else i=r;for(o=0;o<i.length;o++)if(a=i[o],a.id===n)return a;XA.log([\"Location with id\",n,\"does not have a matching topojson feature at this resolution.\"].join(\" \"))}return!1}function SFt(e){var t=e.geometry,r=t.coordinates,n=e.id,i=[],a,o,s,l;function u(c){for(var f=0;f<c.length-1;f++)if(c[f][0]>0&&c[f+1][0]<0)return f;return null}switch(n===\"RUS\"||n===\"FJI\"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;l<c.length;l++)f[l]=[c[l][0]<0?c[l][0]+360:c[l][0],c[l][1]];i.push(TF.tester(f))}:n===\"ATA\"?a=function(c){var f=u(c);if(f===null)return i.push(TF.tester(c));var h=new Array(c.length+1),d=0;for(l=0;l<c.length;l++)l>f?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=TF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(TF.tester(c))},t.type){case\"MultiPolygon\":for(o=0;o<r.length;o++)for(s=0;s<r[o].length;s++)a(r[o][s]);break;case\"Polygon\":for(o=0;o<r.length;o++)a(r[o]);break}return i}function JRe(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},n=typeof t==\"string\"?r[t]:t;return xFt(n)?n:(XA.error(\"Oops ... something went wrong when fetching \"+t),!1)}function MFt(e){var t=e[0].trace,r=JRe(t);if(!r)return!1;var n={},i=[],a;for(a=0;a<t._length;a++){var o=e[a];(o.loc||o.loc===0)&&(n[o.loc]=o)}function s(c){var f=bFt(c,t.featureidkey||\"id\").get(),h=n[f];if(h){var d=c.geometry;if(d.type===\"Polygon\"||d.type===\"MultiPolygon\"){var v={type:\"Feature\",id:f,geometry:d,properties:{}};v.geometry.coordinates.length>0?v.properties.ct=EFt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else XA.log([\"Location\",h.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete n[f]}switch(r.type){case\"FeatureCollection\":var l=r.features;for(a=0;a<l.length;a++)s(l[a]);break;case\"Feature\":s(r);break;default:return XA.warn([\"Invalid GeoJSON type\",(r.type||\"none\")+\".\",\"Traces with locationmode *geojson-id* only support\",\"*FeatureCollection* and *Feature* types.\"].join(\" \")),!1}for(var u in n)XA.log([\"Location *\"+u+\"*\",\"does not have a matching feature with id-key\",\"*\"+t.featureidkey+\"*.\"].join(\" \"));return i}function EFt(e){var t=e.geometry,r;if(t.type===\"MultiPolygon\")for(var n=t.coordinates,i=0,a=0;a<n.length;a++){var o={type:\"Polygon\",coordinates:n[a]},s=mFt(o);s>i&&(i=s,r=o)}else r=t;return yFt(r).geometry.coordinates}function CFt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){gFt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL \"'+l+'\" does not exist.':\"Unexpected error while fetching from \"+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!==\"pending\")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c(\"Unexpected error while fetching from \"+l);f++},50)})}for(var a=0;a<e.length;a++){var o=e[a][0].trace,s=o.geojson;typeof s==\"string\"&&(t[s]?t[s]===\"pending\"&&r.push(i(s)):(t[s]=\"pending\",r.push(n(s))))}return r}function kFt(e){return _Ft(e)}$Re.exports={locationToFeature:AFt,feature2polygons:SFt,getTraceGeojson:JRe,extractTraceFeature:MFt,fetchTraceGeoData:CFt,computeBbox:kFt}});var SZ=ye((mgr,tDe)=>{\"use strict\";var LFt=Oa(),PFt=So(),QRe=Ca(),eDe=ap(),IFt=eDe.stylePoints,RFt=eDe.styleText;tDe.exports=function(t,r){r&&DFt(t,r)};function DFt(e,t){var r=t[0].trace,n=t[0].node3;n.style(\"opacity\",t[0].trace.opacity),IFt(n,r,e),RFt(n,r,e),n.selectAll(\"path.js-line\").style(\"fill\",\"none\").each(function(i){var a=LFt.select(this),o=i.trace,s=o.line||{};a.call(QRe.stroke,s.color).call(PFt.dashLine,s.dash||\"\",s.width||0),o.fill!==\"none\"&&a.call(QRe.fill,o.fillcolor)})}});var kZ=ye((ygr,nDe)=>{\"use strict\";var rDe=Oa(),SF=Dr(),FFt=vF().getTopojsonFeatures,MZ=tx(),AF=ix(),iDe=wg().findExtremes,CZ=hs().BADNUM,zFt=O0().calcMarkerSize,EZ=Ru(),OFt=SZ();function qFt(e,t,r){var n=t.layers.frontplot.select(\".scatterlayer\"),i=SF.makeTraceGroups(n,r,\"trace scattergeo\");function a(o,s){o.lonlat[0]===CZ&&rDe.select(s).remove()}i.selectAll(\"*\").remove(),i.each(function(o){var s=rDe.select(this),l=o[0].trace;if(EZ.hasLines(l)||l.fill!==\"none\"){var u=MZ.calcTraceToLineCoords(o),c=l.fill!==\"none\"?MZ.makePolygon(u):MZ.makeLine(u);s.selectAll(\"path.js-line\").data([{geojson:c,trace:l}]).enter().append(\"path\").classed(\"js-line\",!0).style(\"stroke-miterlimit\",2)}EZ.hasMarkers(l)&&s.selectAll(\"path.point\").data(SF.identity).enter().append(\"path\").classed(\"point\",!0).each(function(f){a(f,this)}),EZ.hasText(l)&&s.selectAll(\"g\").data(SF.identity).enter().append(\"g\").append(\"text\").each(function(f){a(f,this)}),OFt(e,o)})}function BFt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(SF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l===\"geojson-id\"?AF.extractTraceFeature(e):FFt(r,i.topojson);for(o=0;o<a;o++){s=e[o];var c=l===\"geojson-id\"?s.fOut:AF.locationToFeature(l,s.loc,u);s.lonlat=c?c.properties.ct:[CZ,CZ]}}var f={padded:!0},h,d;if(n.fitbounds===\"geojson\"&&r.locationmode===\"geojson-id\"){var v=AF.computeBbox(AF.getTraceGeojson(r));h=[v[0],v[2]],d=[v[1],v[3]]}else{for(h=new Array(a),d=new Array(a),o=0;o<a;o++)s=e[o],h[o]=s.lonlat[0],d[o]=s.lonlat[1];f.ppad=zFt(r,a)}r._extremes.lon=iDe(n.lonaxis._ax,h,f),r._extremes.lat=iDe(n.lataxis._ax,d,f)}nDe.exports={calcGeoJSON:BFt,plot:qFt}});var oDe=ye((_gr,aDe)=>{\"use strict\";var NFt=vf(),UFt=hs().BADNUM,VFt=oT(),GFt=Dr().fillText,HFt=G2();aDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(C){var E=C.lonlat;if(E[0]===UFt||u(E))return 1/0;var A=c(E),L=c([r,n]),_=Math.abs(A[0]-L[0]),k=Math.abs(A[1]-L[1]),M=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(_*_+k*k)-M,1-3/M)}if(NFt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=v[0]-x,t.x1=v[0]+x,t.y0=v[1]-x,t.y1=v[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=VFt(a,h),t.extraText=jFt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function jFt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i===\"all\"?HFt.hoverinfo.flags:i.split(\"+\"),o=a.indexOf(\"location\")!==-1&&Array.isArray(e.locations),s=a.indexOf(\"lon\")!==-1,l=a.indexOf(\"lat\")!==-1,u=a.indexOf(\"text\")!==-1,c=[];function f(h){return h+\"\\xB0\"}return o?c.push(t.loc):s&&l?c.push(\"(\"+f(r.latLabel)+\", \"+f(r.lonLabel)+\")\"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&GFt(t,e,c),c.join(\"<br>\")}});var lDe=ye((xgr,sDe)=>{\"use strict\";sDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var fDe=ye((bgr,cDe)=>{\"use strict\";var uDe=Ru(),WFt=hs().BADNUM;cDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!uDe.hasMarkers(s)&&!uDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h<n.length;h++)n[h].selected=0;else for(h=0;h<n.length;h++)l=n[h],u=l.lonlat,u[0]!==WFt&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,h,t)?(o.push({pointNumber:h,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var iC=ye((MF,hDe)=>{(function(e,t){t(typeof MF==\"object\"&&typeof hDe!=\"undefined\"?MF:e.d3=e.d3||{})})(MF,function(e){\"use strict\";function t(Le,Ae){return Le<Ae?-1:Le>Ae?1:Le>=Ae?0:NaN}function r(Le){return Le.length===1&&(Le=n(Le)),{left:function(Ae,De,Pe,ge){for(Pe==null&&(Pe=0),ge==null&&(ge=Ae.length);Pe<ge;){var Fe=Pe+ge>>>1;Le(Ae[Fe],De)<0?Pe=Fe+1:ge=Fe}return Pe},right:function(Ae,De,Pe,ge){for(Pe==null&&(Pe=0),ge==null&&(ge=Ae.length);Pe<ge;){var Fe=Pe+ge>>>1;Le(Ae[Fe],De)>0?ge=Fe:Pe=Fe+1}return Pe}}}function n(Le){return function(Ae,De){return t(Le(Ae),De)}}var i=r(t),a=i.right,o=i.left;function s(Le,Ae){Ae==null&&(Ae=l);for(var De=0,Pe=Le.length-1,ge=Le[0],Fe=new Array(Pe<0?0:Pe);De<Pe;)Fe[De]=Ae(ge,ge=Le[++De]);return Fe}function l(Le,Ae){return[Le,Ae]}function u(Le,Ae,De){var Pe=Le.length,ge=Ae.length,Fe=new Array(Pe*ge),ce,Ze,ct,pt;for(De==null&&(De=l),ce=ct=0;ce<Pe;++ce)for(pt=Le[ce],Ze=0;Ze<ge;++Ze,++ct)Fe[ct]=De(pt,Ae[Ze]);return Fe}function c(Le,Ae){return Ae<Le?-1:Ae>Le?1:Ae>=Le?0:NaN}function f(Le){return Le===null?NaN:+Le}function h(Le,Ae){var De=Le.length,Pe=0,ge=-1,Fe=0,ce,Ze,ct=0;if(Ae==null)for(;++ge<De;)isNaN(ce=f(Le[ge]))||(Ze=ce-Fe,Fe+=Ze/++Pe,ct+=Ze*(ce-Fe));else for(;++ge<De;)isNaN(ce=f(Ae(Le[ge],ge,Le)))||(Ze=ce-Fe,Fe+=Ze/++Pe,ct+=Ze*(ce-Fe));if(Pe>1)return ct/(Pe-1)}function d(Le,Ae){var De=h(Le,Ae);return De&&Math.sqrt(De)}function v(Le,Ae){var De=Le.length,Pe=-1,ge,Fe,ce;if(Ae==null){for(;++Pe<De;)if((ge=Le[Pe])!=null&&ge>=ge)for(Fe=ce=ge;++Pe<De;)(ge=Le[Pe])!=null&&(Fe>ge&&(Fe=ge),ce<ge&&(ce=ge))}else for(;++Pe<De;)if((ge=Ae(Le[Pe],Pe,Le))!=null&&ge>=ge)for(Fe=ce=ge;++Pe<De;)(ge=Ae(Le[Pe],Pe,Le))!=null&&(Fe>ge&&(Fe=ge),ce<ge&&(ce=ge));return[Fe,ce]}var x=Array.prototype,b=x.slice,p=x.map;function C(Le){return function(){return Le}}function E(Le){return Le}function A(Le,Ae,De){Le=+Le,Ae=+Ae,De=(ge=arguments.length)<2?(Ae=Le,Le=0,1):ge<3?1:+De;for(var Pe=-1,ge=Math.max(0,Math.ceil((Ae-Le)/De))|0,Fe=new Array(ge);++Pe<ge;)Fe[Pe]=Le+Pe*De;return Fe}var L=Math.sqrt(50),_=Math.sqrt(10),k=Math.sqrt(2);function M(Le,Ae,De){var Pe,ge=-1,Fe,ce,Ze;if(Ae=+Ae,Le=+Le,De=+De,Le===Ae&&De>0)return[Le];if((Pe=Ae<Le)&&(Fe=Le,Le=Ae,Ae=Fe),(Ze=g(Le,Ae,De))===0||!isFinite(Ze))return[];if(Ze>0)for(Le=Math.ceil(Le/Ze),Ae=Math.floor(Ae/Ze),ce=new Array(Fe=Math.ceil(Ae-Le+1));++ge<Fe;)ce[ge]=(Le+ge)*Ze;else for(Le=Math.floor(Le*Ze),Ae=Math.ceil(Ae*Ze),ce=new Array(Fe=Math.ceil(Le-Ae+1));++ge<Fe;)ce[ge]=(Le-ge)/Ze;return Pe&&ce.reverse(),ce}function g(Le,Ae,De){var Pe=(Ae-Le)/Math.max(0,De),ge=Math.floor(Math.log(Pe)/Math.LN10),Fe=Pe/Math.pow(10,ge);return ge>=0?(Fe>=L?10:Fe>=_?5:Fe>=k?2:1)*Math.pow(10,ge):-Math.pow(10,-ge)/(Fe>=L?10:Fe>=_?5:Fe>=k?2:1)}function P(Le,Ae,De){var Pe=Math.abs(Ae-Le)/Math.max(0,De),ge=Math.pow(10,Math.floor(Math.log(Pe)/Math.LN10)),Fe=Pe/ge;return Fe>=L?ge*=10:Fe>=_?ge*=5:Fe>=k&&(ge*=2),Ae<Le?-ge:ge}function T(Le){return Math.ceil(Math.log(Le.length)/Math.LN2)+1}function z(){var Le=E,Ae=v,De=T;function Pe(ge){var Fe,ce=ge.length,Ze,ct=new Array(ce);for(Fe=0;Fe<ce;++Fe)ct[Fe]=Le(ge[Fe],Fe,ge);var pt=Ae(ct),Wt=pt[0],st=pt[1],lt=De(ct,Wt,st);Array.isArray(lt)||(lt=P(Wt,st,lt),lt=A(Math.ceil(Wt/lt)*lt,st,lt));for(var Gt=lt.length;lt[0]<=Wt;)lt.shift(),--Gt;for(;lt[Gt-1]>st;)lt.pop(),--Gt;var Nt=new Array(Gt+1),$t;for(Fe=0;Fe<=Gt;++Fe)$t=Nt[Fe]=[],$t.x0=Fe>0?lt[Fe-1]:Wt,$t.x1=Fe<Gt?lt[Fe]:st;for(Fe=0;Fe<ce;++Fe)Ze=ct[Fe],Wt<=Ze&&Ze<=st&&Nt[a(lt,Ze,0,Gt)].push(ge[Fe]);return Nt}return Pe.value=function(ge){return arguments.length?(Le=typeof ge==\"function\"?ge:C(ge),Pe):Le},Pe.domain=function(ge){return arguments.length?(Ae=typeof ge==\"function\"?ge:C([ge[0],ge[1]]),Pe):Ae},Pe.thresholds=function(ge){return arguments.length?(De=typeof ge==\"function\"?ge:Array.isArray(ge)?C(b.call(ge)):C(ge),Pe):De},Pe}function O(Le,Ae,De){if(De==null&&(De=f),!!(Pe=Le.length)){if((Ae=+Ae)<=0||Pe<2)return+De(Le[0],0,Le);if(Ae>=1)return+De(Le[Pe-1],Pe-1,Le);var Pe,ge=(Pe-1)*Ae,Fe=Math.floor(ge),ce=+De(Le[Fe],Fe,Le),Ze=+De(Le[Fe+1],Fe+1,Le);return ce+(Ze-ce)*(ge-Fe)}}function V(Le,Ae,De){return Le=p.call(Le,f).sort(t),Math.ceil((De-Ae)/(2*(O(Le,.75)-O(Le,.25))*Math.pow(Le.length,-1/3)))}function G(Le,Ae,De){return Math.ceil((De-Ae)/(3.5*d(Le)*Math.pow(Le.length,-1/3)))}function Z(Le,Ae){var De=Le.length,Pe=-1,ge,Fe;if(Ae==null){for(;++Pe<De;)if((ge=Le[Pe])!=null&&ge>=ge)for(Fe=ge;++Pe<De;)(ge=Le[Pe])!=null&&ge>Fe&&(Fe=ge)}else for(;++Pe<De;)if((ge=Ae(Le[Pe],Pe,Le))!=null&&ge>=ge)for(Fe=ge;++Pe<De;)(ge=Ae(Le[Pe],Pe,Le))!=null&&ge>Fe&&(Fe=ge);return Fe}function H(Le,Ae){var De=Le.length,Pe=De,ge=-1,Fe,ce=0;if(Ae==null)for(;++ge<De;)isNaN(Fe=f(Le[ge]))?--Pe:ce+=Fe;else for(;++ge<De;)isNaN(Fe=f(Ae(Le[ge],ge,Le)))?--Pe:ce+=Fe;if(Pe)return ce/Pe}function N(Le,Ae){var De=Le.length,Pe=-1,ge,Fe=[];if(Ae==null)for(;++Pe<De;)isNaN(ge=f(Le[Pe]))||Fe.push(ge);else for(;++Pe<De;)isNaN(ge=f(Ae(Le[Pe],Pe,Le)))||Fe.push(ge);return O(Fe.sort(t),.5)}function j(Le){for(var Ae=Le.length,De,Pe=-1,ge=0,Fe,ce;++Pe<Ae;)ge+=Le[Pe].length;for(Fe=new Array(ge);--Ae>=0;)for(ce=Le[Ae],De=ce.length;--De>=0;)Fe[--ge]=ce[De];return Fe}function re(Le,Ae){var De=Le.length,Pe=-1,ge,Fe;if(Ae==null){for(;++Pe<De;)if((ge=Le[Pe])!=null&&ge>=ge)for(Fe=ge;++Pe<De;)(ge=Le[Pe])!=null&&Fe>ge&&(Fe=ge)}else for(;++Pe<De;)if((ge=Ae(Le[Pe],Pe,Le))!=null&&ge>=ge)for(Fe=ge;++Pe<De;)(ge=Ae(Le[Pe],Pe,Le))!=null&&Fe>ge&&(Fe=ge);return Fe}function oe(Le,Ae){for(var De=Ae.length,Pe=new Array(De);De--;)Pe[De]=Le[Ae[De]];return Pe}function _e(Le,Ae){if(De=Le.length){var De,Pe=0,ge=0,Fe,ce=Le[ge];for(Ae==null&&(Ae=t);++Pe<De;)(Ae(Fe=Le[Pe],ce)<0||Ae(ce,ce)!==0)&&(ce=Fe,ge=Pe);if(Ae(ce,ce)===0)return ge}}function Me(Le,Ae,De){for(var Pe=(De==null?Le.length:De)-(Ae=Ae==null?0:+Ae),ge,Fe;Pe;)Fe=Math.random()*Pe--|0,ge=Le[Pe+Ae],Le[Pe+Ae]=Le[Fe+Ae],Le[Fe+Ae]=ge;return Le}function ke(Le,Ae){var De=Le.length,Pe=-1,ge,Fe=0;if(Ae==null)for(;++Pe<De;)(ge=+Le[Pe])&&(Fe+=ge);else for(;++Pe<De;)(ge=+Ae(Le[Pe],Pe,Le))&&(Fe+=ge);return Fe}function me(Le){if(!(Fe=Le.length))return[];for(var Ae=-1,De=re(Le,ie),Pe=new Array(De);++Ae<De;)for(var ge=-1,Fe,ce=Pe[Ae]=new Array(Fe);++ge<Fe;)ce[ge]=Le[ge][Ae];return Pe}function ie(Le){return Le.length}function Se(){return me(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=v,e.histogram=z,e.thresholdFreedmanDiaconis=V,e.thresholdScott=G,e.thresholdSturges=T,e.max=Z,e.mean=H,e.median=N,e.merge=j,e.min=re,e.pairs=s,e.permute=oe,e.quantile=O,e.range=A,e.scan=_e,e.shuffle=Me,e.sum=ke,e.ticks=M,e.tickIncrement=g,e.tickStep=P,e.transpose=me,e.variance=h,e.zip=Se,Object.defineProperty(e,\"__esModule\",{value:!0})})});var LZ=ye((EF,dDe)=>{(function(e,t){typeof EF==\"object\"&&typeof dDe!=\"undefined\"?t(EF,iC()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(EF,function(e,t){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(At){a(i,At,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(At,Xt,kr){var Ar=At.s=Xt+kr,Kr=Ar-Xt,Ei=Ar-Kr;At.t=Xt-Ei+(kr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,x=Math.atan,b=Math.atan2,p=Math.cos,C=Math.ceil,E=Math.exp,A=Math.log,L=Math.pow,_=Math.sin,k=Math.sign||function(At){return At>0?1:At<0?-1:0},M=Math.sqrt,g=Math.tan;function P(At){return At>1?0:At<-1?l:Math.acos(At)}function T(At){return At>1?u:At<-1?-u:Math.asin(At)}function z(At){return(At=_(At/2))*At}function O(){}function V(At,Xt){At&&Z.hasOwnProperty(At.type)&&Z[At.type](At,Xt)}var G={Feature:function(At,Xt){V(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var kr=At.features,Ar=-1,Kr=kr.length;++Ar<Kr;)V(kr[Ar].geometry,Xt)}},Z={Sphere:function(At,Xt){Xt.sphere()},Point:function(At,Xt){At=At.coordinates,Xt.point(At[0],At[1],At[2])},MultiPoint:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)At=kr[Ar],Xt.point(At[0],At[1],At[2])},LineString:function(At,Xt){H(At.coordinates,Xt,0)},MultiLineString:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)H(kr[Ar],Xt,0)},Polygon:function(At,Xt){N(At.coordinates,Xt)},MultiPolygon:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)N(kr[Ar],Xt)},GeometryCollection:function(At,Xt){for(var kr=At.geometries,Ar=-1,Kr=kr.length;++Ar<Kr;)V(kr[Ar],Xt)}};function H(At,Xt,kr){var Ar=-1,Kr=At.length-kr,Ei;for(Xt.lineStart();++Ar<Kr;)Ei=At[Ar],Xt.point(Ei[0],Ei[1],Ei[2]);Xt.lineEnd()}function N(At,Xt){var kr=-1,Ar=At.length;for(Xt.polygonStart();++kr<Ar;)H(At[kr],Xt,1);Xt.polygonEnd()}function j(At,Xt){At&&G.hasOwnProperty(At.type)?G[At.type](At,Xt):V(At,Xt)}var re=r(),oe=r(),_e,Me,ke,me,ie,Se={point:O,lineStart:O,lineEnd:O,polygonStart:function(){re.reset(),Se.lineStart=Le,Se.lineEnd=Ae},polygonEnd:function(){var At=+re;oe.add(At<0?f+At:At),this.lineStart=this.lineEnd=this.point=O},sphere:function(){oe.add(f)}};function Le(){Se.point=De}function Ae(){Pe(_e,Me)}function De(At,Xt){Se.point=Pe,_e=At,Me=Xt,At*=d,Xt*=d,ke=At,me=p(Xt=Xt/2+c),ie=_(Xt)}function Pe(At,Xt){At*=d,Xt*=d,Xt=Xt/2+c;var kr=At-ke,Ar=kr>=0?1:-1,Kr=Ar*kr,Ei=p(Xt),Wi=_(Xt),hn=ie*Wi,Tn=me*Ei+hn*p(Kr),Bn=hn*Ar*_(Kr);re.add(b(Bn,Tn)),ke=At,me=Ei,ie=Wi}function ge(At){return oe.reset(),j(At,Se),oe*2}function Fe(At){return[b(At[1],At[0]),T(At[2])]}function ce(At){var Xt=At[0],kr=At[1],Ar=p(kr);return[Ar*p(Xt),Ar*_(Xt),_(kr)]}function Ze(At,Xt){return At[0]*Xt[0]+At[1]*Xt[1]+At[2]*Xt[2]}function ct(At,Xt){return[At[1]*Xt[2]-At[2]*Xt[1],At[2]*Xt[0]-At[0]*Xt[2],At[0]*Xt[1]-At[1]*Xt[0]]}function pt(At,Xt){At[0]+=Xt[0],At[1]+=Xt[1],At[2]+=Xt[2]}function Wt(At,Xt){return[At[0]*Xt,At[1]*Xt,At[2]*Xt]}function st(At){var Xt=M(At[0]*At[0]+At[1]*At[1]+At[2]*At[2]);At[0]/=Xt,At[1]/=Xt,At[2]/=Xt}var lt,Gt,Nt,$t,sr,wr,ur,Qe,Et=r(),er,Ut,Ft={point:bt,lineStart:Yt,lineEnd:lr,polygonStart:function(){Ft.point=Tr,Ft.lineStart=Rr,Ft.lineEnd=ei,Et.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),Ft.point=bt,Ft.lineStart=Yt,Ft.lineEnd=lr,re<0?(lt=-(Nt=180),Gt=-($t=90)):Et>o?$t=90:Et<-o&&(Gt=-90),Ut[0]=lt,Ut[1]=Nt},sphere:function(){lt=-(Nt=180),Gt=-($t=90)}};function bt(At,Xt){er.push(Ut=[lt=At,Nt=At]),Xt<Gt&&(Gt=Xt),Xt>$t&&($t=Xt)}function yt(At,Xt){var kr=ce([At*d,Xt*d]);if(Qe){var Ar=ct(Qe,kr),Kr=[Ar[1],-Ar[0],0],Ei=ct(Kr,Ar);st(Ei),Ei=Fe(Ei);var Wi=At-sr,hn=Wi>0?1:-1,Tn=Ei[0]*h*hn,Bn,Zi=v(Wi)>180;Zi^(hn*sr<Tn&&Tn<hn*At)?(Bn=Ei[1]*h,Bn>$t&&($t=Bn)):(Tn=(Tn+360)%360-180,Zi^(hn*sr<Tn&&Tn<hn*At)?(Bn=-Ei[1]*h,Bn<Gt&&(Gt=Bn)):(Xt<Gt&&(Gt=Xt),Xt>$t&&($t=Xt))),Zi?At<sr?Wr(lt,At)>Wr(lt,Nt)&&(Nt=At):Wr(At,Nt)>Wr(lt,Nt)&&(lt=At):Nt>=lt?(At<lt&&(lt=At),At>Nt&&(Nt=At)):At>sr?Wr(lt,At)>Wr(lt,Nt)&&(Nt=At):Wr(At,Nt)>Wr(lt,Nt)&&(lt=At)}else er.push(Ut=[lt=At,Nt=At]);Xt<Gt&&(Gt=Xt),Xt>$t&&($t=Xt),Qe=kr,sr=At}function Yt(){Ft.point=yt}function lr(){Ut[0]=lt,Ut[1]=Nt,Ft.point=bt,Qe=null}function Tr(At,Xt){if(Qe){var kr=At-sr;Et.add(v(kr)>180?kr+(kr>0?360:-360):kr)}else wr=At,ur=Xt;Se.point(At,Xt),yt(At,Xt)}function Rr(){Se.lineStart()}function ei(){Tr(wr,ur),Se.lineEnd(),v(Et)>o&&(lt=-(Nt=180)),Ut[0]=lt,Ut[1]=Nt,Qe=null}function Wr(At,Xt){return(Xt-=At)<0?Xt+360:Xt}function Ur(At,Xt){return At[0]-Xt[0]}function dt(At,Xt){return At[0]<=At[1]?At[0]<=Xt&&Xt<=At[1]:Xt<At[0]||At[1]<Xt}function Ge(At){var Xt,kr,Ar,Kr,Ei,Wi,hn;if($t=Nt=-(lt=Gt=1/0),er=[],j(At,Ft),kr=er.length){for(er.sort(Ur),Xt=1,Ar=er[0],Ei=[Ar];Xt<kr;++Xt)Kr=er[Xt],dt(Ar,Kr[0])||dt(Ar,Kr[1])?(Wr(Ar[0],Kr[1])>Wr(Ar[0],Ar[1])&&(Ar[1]=Kr[1]),Wr(Kr[0],Ar[1])>Wr(Ar[0],Ar[1])&&(Ar[0]=Kr[0])):Ei.push(Ar=Kr);for(Wi=-1/0,kr=Ei.length-1,Xt=0,Ar=Ei[kr];Xt<=kr;Ar=Kr,++Xt)Kr=Ei[Xt],(hn=Wr(Ar[1],Kr[0]))>Wi&&(Wi=hn,lt=Kr[0],Nt=Ar[1])}return er=Ut=null,lt===1/0||Gt===1/0?[[NaN,NaN],[NaN,NaN]]:[[lt,Gt],[Nt,$t]]}var Je,je,$e,wt,Ie,xe,Ce,vt,nr,ir,pr,oi,di,Jr,fi,Hi,Pn={sphere:O,point:wn,lineStart:Vn,lineEnd:ua,polygonStart:function(){Pn.lineStart=Vt,Pn.lineEnd=_t},polygonEnd:function(){Pn.lineStart=Vn,Pn.lineEnd=ua}};function wn(At,Xt){At*=d,Xt*=d;var kr=p(Xt);pn(kr*p(At),kr*_(At),_(Xt))}function pn(At,Xt,kr){++Je,$e+=(At-$e)/Je,wt+=(Xt-wt)/Je,Ie+=(kr-Ie)/Je}function Vn(){Pn.point=kn}function kn(At,Xt){At*=d,Xt*=d;var kr=p(Xt);Jr=kr*p(At),fi=kr*_(At),Hi=_(Xt),Pn.point=ea,pn(Jr,fi,Hi)}function ea(At,Xt){At*=d,Xt*=d;var kr=p(Xt),Ar=kr*p(At),Kr=kr*_(At),Ei=_(Xt),Wi=b(M((Wi=fi*Ei-Hi*Kr)*Wi+(Wi=Hi*Ar-Jr*Ei)*Wi+(Wi=Jr*Kr-fi*Ar)*Wi),Jr*Ar+fi*Kr+Hi*Ei);je+=Wi,xe+=Wi*(Jr+(Jr=Ar)),Ce+=Wi*(fi+(fi=Kr)),vt+=Wi*(Hi+(Hi=Ei)),pn(Jr,fi,Hi)}function ua(){Pn.point=wn}function Vt(){Pn.point=tr}function _t(){ar(oi,di),Pn.point=wn}function tr(At,Xt){oi=At,di=Xt,At*=d,Xt*=d,Pn.point=ar;var kr=p(Xt);Jr=kr*p(At),fi=kr*_(At),Hi=_(Xt),pn(Jr,fi,Hi)}function ar(At,Xt){At*=d,Xt*=d;var kr=p(Xt),Ar=kr*p(At),Kr=kr*_(At),Ei=_(Xt),Wi=fi*Ei-Hi*Kr,hn=Hi*Ar-Jr*Ei,Tn=Jr*Kr-fi*Ar,Bn=M(Wi*Wi+hn*hn+Tn*Tn),Zi=T(Bn),$i=Bn&&-Zi/Bn;nr+=$i*Wi,ir+=$i*hn,pr+=$i*Tn,je+=Zi,xe+=Zi*(Jr+(Jr=Ar)),Ce+=Zi*(fi+(fi=Kr)),vt+=Zi*(Hi+(Hi=Ei)),pn(Jr,fi,Hi)}function Er(At){Je=je=$e=wt=Ie=xe=Ce=vt=nr=ir=pr=0,j(At,Pn);var Xt=nr,kr=ir,Ar=pr,Kr=Xt*Xt+kr*kr+Ar*Ar;return Kr<s&&(Xt=xe,kr=Ce,Ar=vt,je<o&&(Xt=$e,kr=wt,Ar=Ie),Kr=Xt*Xt+kr*kr+Ar*Ar,Kr<s)?[NaN,NaN]:[b(kr,Xt)*h,T(Ar/M(Kr))*h]}function Zr(At){return function(){return At}}function ri(At,Xt){function kr(Ar,Kr){return Ar=At(Ar,Kr),Xt(Ar[0],Ar[1])}return At.invert&&Xt.invert&&(kr.invert=function(Ar,Kr){return Ar=Xt.invert(Ar,Kr),Ar&&At.invert(Ar[0],Ar[1])}),kr}function $r(At,Xt){return[v(At)>l?At+Math.round(-At/f)*f:At,Xt]}$r.invert=$r;function zi(At,Xt,kr){return(At%=f)?Xt||kr?ri(en(At),cn(Xt,kr)):en(At):Xt||kr?cn(Xt,kr):$r}function Ji(At){return function(Xt,kr){return Xt+=At,[Xt>l?Xt-f:Xt<-l?Xt+f:Xt,kr]}}function en(At){var Xt=Ji(At);return Xt.invert=Ji(-At),Xt}function cn(At,Xt){var kr=p(At),Ar=_(At),Kr=p(Xt),Ei=_(Xt);function Wi(hn,Tn){var Bn=p(Tn),Zi=p(hn)*Bn,$i=_(hn)*Bn,an=_(Tn),Di=an*kr+Zi*Ar;return[b($i*Kr-Di*Ei,Zi*kr-an*Ar),T(Di*Kr+$i*Ei)]}return Wi.invert=function(hn,Tn){var Bn=p(Tn),Zi=p(hn)*Bn,$i=_(hn)*Bn,an=_(Tn),Di=an*Kr-$i*Ei;return[b($i*Kr+an*Ei,Zi*kr+Di*Ar),T(Di*kr-Zi*Ar)]},Wi}function yn(At){At=zi(At[0]*d,At[1]*d,At.length>2?At[2]*d:0);function Xt(kr){return kr=At(kr[0]*d,kr[1]*d),kr[0]*=h,kr[1]*=h,kr}return Xt.invert=function(kr){return kr=At.invert(kr[0]*d,kr[1]*d),kr[0]*=h,kr[1]*=h,kr},Xt}function Mn(At,Xt,kr,Ar,Kr,Ei){if(kr){var Wi=p(Xt),hn=_(Xt),Tn=Ar*kr;Kr==null?(Kr=Xt+Ar*f,Ei=Xt-Tn/2):(Kr=Ba(Wi,Kr),Ei=Ba(Wi,Ei),(Ar>0?Kr<Ei:Kr>Ei)&&(Kr+=Ar*f));for(var Bn,Zi=Kr;Ar>0?Zi>Ei:Zi<Ei;Zi-=Tn)Bn=Fe([Wi,-hn*p(Zi),-hn*_(Zi)]),At.point(Bn[0],Bn[1])}}function Ba(At,Xt){Xt=ce(Xt),Xt[0]-=At,st(Xt);var kr=P(-Xt[1]);return((-Xt[2]<0?-kr:kr)+f-o)%f}function la(){var At=Zr([0,0]),Xt=Zr(90),kr=Zr(6),Ar,Kr,Ei={point:Wi};function Wi(Tn,Bn){Ar.push(Tn=Kr(Tn,Bn)),Tn[0]*=h,Tn[1]*=h}function hn(){var Tn=At.apply(this,arguments),Bn=Xt.apply(this,arguments)*d,Zi=kr.apply(this,arguments)*d;return Ar=[],Kr=zi(-Tn[0]*d,-Tn[1]*d,0).invert,Mn(Ei,Bn,Zi,1),Tn={type:\"Polygon\",coordinates:[Ar]},Ar=Kr=null,Tn}return hn.center=function(Tn){return arguments.length?(At=typeof Tn==\"function\"?Tn:Zr([+Tn[0],+Tn[1]]),hn):At},hn.radius=function(Tn){return arguments.length?(Xt=typeof Tn==\"function\"?Tn:Zr(+Tn),hn):Xt},hn.precision=function(Tn){return arguments.length?(kr=typeof Tn==\"function\"?Tn:Zr(+Tn),hn):kr},hn}function ma(){var At=[],Xt;return{point:function(kr,Ar,Kr){Xt.push([kr,Ar,Kr])},lineStart:function(){At.push(Xt=[])},lineEnd:O,rejoin:function(){At.length>1&&At.push(At.pop().concat(At.shift()))},result:function(){var kr=At;return At=[],Xt=null,kr}}}function Wa(At,Xt){return v(At[0]-Xt[0])<o&&v(At[1]-Xt[1])<o}function Fa(At,Xt,kr,Ar){this.x=At,this.z=Xt,this.o=kr,this.e=Ar,this.v=!1,this.n=this.p=null}function Wo(At,Xt,kr,Ar,Kr){var Ei=[],Wi=[],hn,Tn;if(At.forEach(function($n){if(!((ka=$n.length-1)<=0)){var ka,Ra=$n[0],La=$n[ka],Na;if(Wa(Ra,La)){if(!Ra[2]&&!La[2]){for(Kr.lineStart(),hn=0;hn<ka;++hn)Kr.point((Ra=$n[hn])[0],Ra[1]);Kr.lineEnd();return}La[0]+=2*o}Ei.push(Na=new Fa(Ra,$n,null,!0)),Wi.push(Na.o=new Fa(Ra,null,Na,!1)),Ei.push(Na=new Fa(La,$n,null,!1)),Wi.push(Na.o=new Fa(La,null,Na,!0))}}),!!Ei.length){for(Wi.sort(Xt),da(Ei),da(Wi),hn=0,Tn=Wi.length;hn<Tn;++hn)Wi[hn].e=kr=!kr;for(var Bn=Ei[0],Zi,$i;;){for(var an=Bn,Di=!0;an.v;)if((an=an.n)===Bn)return;Zi=an.z,Kr.lineStart();do{if(an.v=an.o.v=!0,an.e){if(Di)for(hn=0,Tn=Zi.length;hn<Tn;++hn)Kr.point(($i=Zi[hn])[0],$i[1]);else Ar(an.x,an.n.x,1,Kr);an=an.n}else{if(Di)for(Zi=an.p.z,hn=Zi.length-1;hn>=0;--hn)Kr.point(($i=Zi[hn])[0],$i[1]);else Ar(an.x,an.p.x,-1,Kr);an=an.p}an=an.o,Zi=an.z,Di=!Di}while(!an.v);Kr.lineEnd()}}}function da(At){if(Xt=At.length){for(var Xt,kr=0,Ar=At[0],Kr;++kr<Xt;)Ar.n=Kr=At[kr],Kr.p=Ar,Ar=Kr;Ar.n=Kr=At[0],Kr.p=Ar}}var Wn=r();function Ga(At){return v(At[0])<=l?At[0]:k(At[0])*((v(At[0])+l)%f-l)}function vo(At,Xt){var kr=Ga(Xt),Ar=Xt[1],Kr=_(Ar),Ei=[_(kr),-p(kr),0],Wi=0,hn=0;Wn.reset(),Kr===1?Ar=u+o:Kr===-1&&(Ar=-u-o);for(var Tn=0,Bn=At.length;Tn<Bn;++Tn)if($i=(Zi=At[Tn]).length)for(var Zi,$i,an=Zi[$i-1],Di=Ga(an),$n=an[1]/2+c,ka=_($n),Ra=p($n),La=0;La<$i;++La,Di=Yn,ka=Ka,Ra=bo,an=Na){var Na=Zi[La],Yn=Ga(Na),zn=Na[1]/2+c,Ka=_(zn),bo=p(zn),Xo=Yn-Di,Ms=Xo>=0?1:-1,os=Ms*Xo,Ts=os>l,Ho=ka*Ka;if(Wn.add(b(Ho*Ms*_(os),Ra*bo+Ho*p(os))),Wi+=Ts?Xo+Ms*f:Xo,Ts^Di>=kr^Yn>=kr){var yl=ct(ce(an),ce(Na));st(yl);var Xs=ct(Ei,yl);st(Xs);var Ps=(Ts^Xo>=0?-1:1)*T(Xs[2]);(Ar>Ps||Ar===Ps&&(yl[0]||yl[1]))&&(hn+=Ts^Xo>=0?1:-1)}}return(Wi<-o||Wi<o&&Wn<-o)^hn&1}function jn(At,Xt,kr,Ar){return function(Kr){var Ei=Xt(Kr),Wi=ma(),hn=Xt(Wi),Tn=!1,Bn,Zi,$i,an={point:Di,lineStart:ka,lineEnd:Ra,polygonStart:function(){an.point=La,an.lineStart=Na,an.lineEnd=Yn,Zi=[],Bn=[]},polygonEnd:function(){an.point=Di,an.lineStart=ka,an.lineEnd=Ra,Zi=t.merge(Zi);var zn=vo(Bn,Ar);Zi.length?(Tn||(Kr.polygonStart(),Tn=!0),Wo(Zi,Cr,zn,kr,Kr)):zn&&(Tn||(Kr.polygonStart(),Tn=!0),Kr.lineStart(),kr(null,null,1,Kr),Kr.lineEnd()),Tn&&(Kr.polygonEnd(),Tn=!1),Zi=Bn=null},sphere:function(){Kr.polygonStart(),Kr.lineStart(),kr(null,null,1,Kr),Kr.lineEnd(),Kr.polygonEnd()}};function Di(zn,Ka){At(zn,Ka)&&Kr.point(zn,Ka)}function $n(zn,Ka){Ei.point(zn,Ka)}function ka(){an.point=$n,Ei.lineStart()}function Ra(){an.point=Di,Ei.lineEnd()}function La(zn,Ka){$i.push([zn,Ka]),hn.point(zn,Ka)}function Na(){hn.lineStart(),$i=[]}function Yn(){La($i[0][0],$i[0][1]),hn.lineEnd();var zn=hn.clean(),Ka=Wi.result(),bo,Xo=Ka.length,Ms,os,Ts;if($i.pop(),Bn.push($i),$i=null,!!Xo){if(zn&1){if(os=Ka[0],(Ms=os.length-1)>0){for(Tn||(Kr.polygonStart(),Tn=!0),Kr.lineStart(),bo=0;bo<Ms;++bo)Kr.point((Ts=os[bo])[0],Ts[1]);Kr.lineEnd()}return}Xo>1&&zn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Zi.push(Ka.filter(St))}}return an}}function St(At){return At.length>1}function Cr(At,Xt){return((At=At.x)[0]<0?At[1]-u-o:u-At[1])-((Xt=Xt.x)[0]<0?Xt[1]-u-o:u-Xt[1])}var Qr=jn(function(){return!0},pi,Sn,[-l,-u]);function pi(At){var Xt=NaN,kr=NaN,Ar=NaN,Kr;return{lineStart:function(){At.lineStart(),Kr=1},point:function(Ei,Wi){var hn=Ei>0?l:-l,Tn=v(Ei-Xt);v(Tn-l)<o?(At.point(Xt,kr=(kr+Wi)/2>0?u:-u),At.point(Ar,kr),At.lineEnd(),At.lineStart(),At.point(hn,kr),At.point(Ei,kr),Kr=0):Ar!==hn&&Tn>=l&&(v(Xt-Ar)<o&&(Xt-=Ar*o),v(Ei-hn)<o&&(Ei-=hn*o),kr=fn(Xt,kr,Ei,Wi),At.point(Ar,kr),At.lineEnd(),At.lineStart(),At.point(hn,kr),Kr=0),At.point(Xt=Ei,kr=Wi),Ar=hn},lineEnd:function(){At.lineEnd(),Xt=kr=NaN},clean:function(){return 2-Kr}}}function fn(At,Xt,kr,Ar){var Kr,Ei,Wi=_(At-kr);return v(Wi)>o?x((_(Xt)*(Ei=p(Ar))*_(kr)-_(Ar)*(Kr=p(Xt))*_(At))/(Kr*Ei*Wi)):(Xt+Ar)/2}function Sn(At,Xt,kr,Ar){var Kr;if(At==null)Kr=kr*u,Ar.point(-l,Kr),Ar.point(0,Kr),Ar.point(l,Kr),Ar.point(l,0),Ar.point(l,-Kr),Ar.point(0,-Kr),Ar.point(-l,-Kr),Ar.point(-l,0),Ar.point(-l,Kr);else if(v(At[0]-Xt[0])>o){var Ei=At[0]<Xt[0]?l:-l;Kr=kr*Ei/2,Ar.point(-Ei,Kr),Ar.point(0,Kr),Ar.point(Ei,Kr)}else Ar.point(Xt[0],Xt[1])}function En(At){var Xt=p(At),kr=6*d,Ar=Xt>0,Kr=v(Xt)>o;function Ei(Zi,$i,an,Di){Mn(Di,At,kr,an,Zi,$i)}function Wi(Zi,$i){return p(Zi)*p($i)>Xt}function hn(Zi){var $i,an,Di,$n,ka;return{lineStart:function(){$n=Di=!1,ka=1},point:function(Ra,La){var Na=[Ra,La],Yn,zn=Wi(Ra,La),Ka=Ar?zn?0:Bn(Ra,La):zn?Bn(Ra+(Ra<0?l:-l),La):0;if(!$i&&($n=Di=zn)&&Zi.lineStart(),zn!==Di&&(Yn=Tn($i,Na),(!Yn||Wa($i,Yn)||Wa(Na,Yn))&&(Na[2]=1)),zn!==Di)ka=0,zn?(Zi.lineStart(),Yn=Tn(Na,$i),Zi.point(Yn[0],Yn[1])):(Yn=Tn($i,Na),Zi.point(Yn[0],Yn[1],2),Zi.lineEnd()),$i=Yn;else if(Kr&&$i&&Ar^zn){var bo;!(Ka&an)&&(bo=Tn(Na,$i,!0))&&(ka=0,Ar?(Zi.lineStart(),Zi.point(bo[0][0],bo[0][1]),Zi.point(bo[1][0],bo[1][1]),Zi.lineEnd()):(Zi.point(bo[1][0],bo[1][1]),Zi.lineEnd(),Zi.lineStart(),Zi.point(bo[0][0],bo[0][1],3)))}zn&&(!$i||!Wa($i,Na))&&Zi.point(Na[0],Na[1]),$i=Na,Di=zn,an=Ka},lineEnd:function(){Di&&Zi.lineEnd(),$i=null},clean:function(){return ka|($n&&Di)<<1}}}function Tn(Zi,$i,an){var Di=ce(Zi),$n=ce($i),ka=[1,0,0],Ra=ct(Di,$n),La=Ze(Ra,Ra),Na=Ra[0],Yn=La-Na*Na;if(!Yn)return!an&&Zi;var zn=Xt*La/Yn,Ka=-Xt*Na/Yn,bo=ct(ka,Ra),Xo=Wt(ka,zn),Ms=Wt(Ra,Ka);pt(Xo,Ms);var os=bo,Ts=Ze(Xo,os),Ho=Ze(os,os),yl=Ts*Ts-Ho*(Ze(Xo,Xo)-1);if(!(yl<0)){var Xs=M(yl),Ps=Wt(os,(-Ts-Xs)/Ho);if(pt(Ps,Xo),Ps=Fe(Ps),!an)return Ps;var va=Zi[0],no=$i[0],_s=Zi[1],is=$i[1],$l;no<va&&($l=va,va=no,no=$l);var ku=no-va,Yu=v(ku-l)<o,Nc=Yu||ku<o;if(!Yu&&is<_s&&($l=_s,_s=is,is=$l),Nc?Yu?_s+is>0^Ps[1]<(v(Ps[0]-va)<o?_s:is):_s<=Ps[1]&&Ps[1]<=is:ku>l^(va<=Ps[0]&&Ps[0]<=no)){var pu=Wt(os,(-Ts+Xs)/Ho);return pt(pu,Xo),[Ps,Fe(pu)]}}}function Bn(Zi,$i){var an=Ar?At:l-At,Di=0;return Zi<-an?Di|=1:Zi>an&&(Di|=2),$i<-an?Di|=4:$i>an&&(Di|=8),Di}return jn(Wi,hn,Ei,Ar?[0,-At]:[-l,At-l])}function ki(At,Xt,kr,Ar,Kr,Ei){var Wi=At[0],hn=At[1],Tn=Xt[0],Bn=Xt[1],Zi=0,$i=1,an=Tn-Wi,Di=Bn-hn,$n;if($n=kr-Wi,!(!an&&$n>0)){if($n/=an,an<0){if($n<Zi)return;$n<$i&&($i=$n)}else if(an>0){if($n>$i)return;$n>Zi&&(Zi=$n)}if($n=Kr-Wi,!(!an&&$n<0)){if($n/=an,an<0){if($n>$i)return;$n>Zi&&(Zi=$n)}else if(an>0){if($n<Zi)return;$n<$i&&($i=$n)}if($n=Ar-hn,!(!Di&&$n>0)){if($n/=Di,Di<0){if($n<Zi)return;$n<$i&&($i=$n)}else if(Di>0){if($n>$i)return;$n>Zi&&(Zi=$n)}if($n=Ei-hn,!(!Di&&$n<0)){if($n/=Di,Di<0){if($n>$i)return;$n>Zi&&(Zi=$n)}else if(Di>0){if($n<Zi)return;$n<$i&&($i=$n)}return Zi>0&&(At[0]=Wi+Zi*an,At[1]=hn+Zi*Di),$i<1&&(Xt[0]=Wi+$i*an,Xt[1]=hn+$i*Di),!0}}}}}var _n=1e9,ya=-_n;function Jn(At,Xt,kr,Ar){function Kr(Bn,Zi){return At<=Bn&&Bn<=kr&&Xt<=Zi&&Zi<=Ar}function Ei(Bn,Zi,$i,an){var Di=0,$n=0;if(Bn==null||(Di=Wi(Bn,$i))!==($n=Wi(Zi,$i))||Tn(Bn,Zi)<0^$i>0)do an.point(Di===0||Di===3?At:kr,Di>1?Ar:Xt);while((Di=(Di+$i+4)%4)!==$n);else an.point(Zi[0],Zi[1])}function Wi(Bn,Zi){return v(Bn[0]-At)<o?Zi>0?0:3:v(Bn[0]-kr)<o?Zi>0?2:1:v(Bn[1]-Xt)<o?Zi>0?1:0:Zi>0?3:2}function hn(Bn,Zi){return Tn(Bn.x,Zi.x)}function Tn(Bn,Zi){var $i=Wi(Bn,1),an=Wi(Zi,1);return $i!==an?$i-an:$i===0?Zi[1]-Bn[1]:$i===1?Bn[0]-Zi[0]:$i===2?Bn[1]-Zi[1]:Zi[0]-Bn[0]}return function(Bn){var Zi=Bn,$i=ma(),an,Di,$n,ka,Ra,La,Na,Yn,zn,Ka,bo,Xo={point:Ms,lineStart:yl,lineEnd:Xs,polygonStart:Ts,polygonEnd:Ho};function Ms(va,no){Kr(va,no)&&Zi.point(va,no)}function os(){for(var va=0,no=0,_s=Di.length;no<_s;++no)for(var is=Di[no],$l=1,ku=is.length,Yu=is[0],Nc,pu,Uc=Yu[0],xu=Yu[1];$l<ku;++$l)Nc=Uc,pu=xu,Yu=is[$l],Uc=Yu[0],xu=Yu[1],pu<=Ar?xu>Ar&&(Uc-Nc)*(Ar-pu)>(xu-pu)*(At-Nc)&&++va:xu<=Ar&&(Uc-Nc)*(Ar-pu)<(xu-pu)*(At-Nc)&&--va;return va}function Ts(){Zi=$i,an=[],Di=[],bo=!0}function Ho(){var va=os(),no=bo&&va,_s=(an=t.merge(an)).length;(no||_s)&&(Bn.polygonStart(),no&&(Bn.lineStart(),Ei(null,null,1,Bn),Bn.lineEnd()),_s&&Wo(an,hn,va,Ei,Bn),Bn.polygonEnd()),Zi=Bn,an=Di=$n=null}function yl(){Xo.point=Ps,Di&&Di.push($n=[]),Ka=!0,zn=!1,Na=Yn=NaN}function Xs(){an&&(Ps(ka,Ra),La&&zn&&$i.rejoin(),an.push($i.result())),Xo.point=Ms,zn&&Zi.lineEnd()}function Ps(va,no){var _s=Kr(va,no);if(Di&&$n.push([va,no]),Ka)ka=va,Ra=no,La=_s,Ka=!1,_s&&(Zi.lineStart(),Zi.point(va,no));else if(_s&&zn)Zi.point(va,no);else{var is=[Na=Math.max(ya,Math.min(_n,Na)),Yn=Math.max(ya,Math.min(_n,Yn))],$l=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];ki(is,$l,At,Xt,kr,Ar)?(zn||(Zi.lineStart(),Zi.point(is[0],is[1])),Zi.point($l[0],$l[1]),_s||Zi.lineEnd(),bo=!1):_s&&(Zi.lineStart(),Zi.point(va,no),bo=!1)}Na=va,Yn=no,zn=_s}return Xo}}function Ma(){var At=0,Xt=0,kr=960,Ar=500,Kr,Ei,Wi;return Wi={stream:function(hn){return Kr&&Ei===hn?Kr:Kr=Jn(At,Xt,kr,Ar)(Ei=hn)},extent:function(hn){return arguments.length?(At=+hn[0][0],Xt=+hn[0][1],kr=+hn[1][0],Ar=+hn[1][1],Kr=Ei=null,Wi):[[At,Xt],[kr,Ar]]}}}var _o=r(),No,po,Lo,Co={sphere:O,point:O,lineStart:Fs,lineEnd:O,polygonStart:O,polygonEnd:O};function Fs(){Co.point=ul,Co.lineEnd=zs}function zs(){Co.point=Co.lineEnd=O}function ul(At,Xt){At*=d,Xt*=d,No=At,po=_(Xt),Lo=p(Xt),Co.point=cl}function cl(At,Xt){At*=d,Xt*=d;var kr=_(Xt),Ar=p(Xt),Kr=v(At-No),Ei=p(Kr),Wi=_(Kr),hn=Ar*Wi,Tn=Lo*kr-po*Ar*Ei,Bn=po*kr+Lo*Ar*Ei;_o.add(b(M(hn*hn+Tn*Tn),Bn)),No=At,po=kr,Lo=Ar}function zl(At){return _o.reset(),j(At,Co),+_o}var cs=[null,null],nl={type:\"LineString\",coordinates:cs};function Ss(At,Xt){return cs[0]=At,cs[1]=Xt,zl(nl)}var fl={Feature:function(At,Xt){return Os(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var kr=At.features,Ar=-1,Kr=kr.length;++Ar<Kr;)if(Os(kr[Ar].geometry,Xt))return!0;return!1}},Js={Sphere:function(){return!0},Point:function(At,Xt){return Io(At.coordinates,Xt)},MultiPoint:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)if(Io(kr[Ar],Xt))return!0;return!1},LineString:function(At,Xt){return us(At.coordinates,Xt)},MultiLineString:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)if(us(kr[Ar],Xt))return!0;return!1},Polygon:function(At,Xt){return Zl(At.coordinates,Xt)},MultiPolygon:function(At,Xt){for(var kr=At.coordinates,Ar=-1,Kr=kr.length;++Ar<Kr;)if(Zl(kr[Ar],Xt))return!0;return!1},GeometryCollection:function(At,Xt){for(var kr=At.geometries,Ar=-1,Kr=kr.length;++Ar<Kr;)if(Os(kr[Ar],Xt))return!0;return!1}};function Os(At,Xt){return At&&Js.hasOwnProperty(At.type)?Js[At.type](At,Xt):!1}function Io(At,Xt){return Ss(At,Xt)===0}function us(At,Xt){for(var kr,Ar,Kr,Ei=0,Wi=At.length;Ei<Wi;Ei++){if(Ar=Ss(At[Ei],Xt),Ar===0||Ei>0&&(Kr=Ss(At[Ei],At[Ei-1]),Kr>0&&kr<=Kr&&Ar<=Kr&&(kr+Ar-Kr)*(1-Math.pow((kr-Ar)/Kr,2))<s*Kr))return!0;kr=Ar}return!1}function Zl(At,Xt){return!!vo(At.map(Su),nc(Xt))}function Su(At){return At=At.map(nc),At.pop(),At}function nc(At){return[At[0]*d,At[1]*d]}function ws(At,Xt){return(At&&fl.hasOwnProperty(At.type)?fl[At.type]:Os)(At,Xt)}function Fn(At,Xt,kr){var Ar=t.range(At,Xt-o,kr).concat(Xt);return function(Kr){return Ar.map(function(Ei){return[Kr,Ei]})}}function _a(At,Xt,kr){var Ar=t.range(At,Xt-o,kr).concat(Xt);return function(Kr){return Ar.map(function(Ei){return[Ei,Kr]})}}function Vu(){var At,Xt,kr,Ar,Kr,Ei,Wi,hn,Tn=10,Bn=Tn,Zi=90,$i=360,an,Di,$n,ka,Ra=2.5;function La(){return{type:\"MultiLineString\",coordinates:Na()}}function Na(){return t.range(C(Ar/Zi)*Zi,kr,Zi).map($n).concat(t.range(C(hn/$i)*$i,Wi,$i).map(ka)).concat(t.range(C(Xt/Tn)*Tn,At,Tn).filter(function(Yn){return v(Yn%Zi)>o}).map(an)).concat(t.range(C(Ei/Bn)*Bn,Kr,Bn).filter(function(Yn){return v(Yn%$i)>o}).map(Di))}return La.lines=function(){return Na().map(function(Yn){return{type:\"LineString\",coordinates:Yn}})},La.outline=function(){return{type:\"Polygon\",coordinates:[$n(Ar).concat(ka(Wi).slice(1),$n(kr).reverse().slice(1),ka(hn).reverse().slice(1))]}},La.extent=function(Yn){return arguments.length?La.extentMajor(Yn).extentMinor(Yn):La.extentMinor()},La.extentMajor=function(Yn){return arguments.length?(Ar=+Yn[0][0],kr=+Yn[1][0],hn=+Yn[0][1],Wi=+Yn[1][1],Ar>kr&&(Yn=Ar,Ar=kr,kr=Yn),hn>Wi&&(Yn=hn,hn=Wi,Wi=Yn),La.precision(Ra)):[[Ar,hn],[kr,Wi]]},La.extentMinor=function(Yn){return arguments.length?(Xt=+Yn[0][0],At=+Yn[1][0],Ei=+Yn[0][1],Kr=+Yn[1][1],Xt>At&&(Yn=Xt,Xt=At,At=Yn),Ei>Kr&&(Yn=Ei,Ei=Kr,Kr=Yn),La.precision(Ra)):[[Xt,Ei],[At,Kr]]},La.step=function(Yn){return arguments.length?La.stepMajor(Yn).stepMinor(Yn):La.stepMinor()},La.stepMajor=function(Yn){return arguments.length?(Zi=+Yn[0],$i=+Yn[1],La):[Zi,$i]},La.stepMinor=function(Yn){return arguments.length?(Tn=+Yn[0],Bn=+Yn[1],La):[Tn,Bn]},La.precision=function(Yn){return arguments.length?(Ra=+Yn,an=Fn(Ei,Kr,90),Di=_a(Xt,At,Ra),$n=Fn(hn,Wi,90),ka=_a(Ar,kr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ol(){return Vu()()}function xo(At,Xt){var kr=At[0]*d,Ar=At[1]*d,Kr=Xt[0]*d,Ei=Xt[1]*d,Wi=p(Ar),hn=_(Ar),Tn=p(Ei),Bn=_(Ei),Zi=Wi*p(kr),$i=Wi*_(kr),an=Tn*p(Kr),Di=Tn*_(Kr),$n=2*T(M(z(Ei-Ar)+Wi*Tn*z(Kr-kr))),ka=_($n),Ra=$n?function(La){var Na=_(La*=$n)/ka,Yn=_($n-La)/ka,zn=Yn*Zi+Na*an,Ka=Yn*$i+Na*Di,bo=Yn*hn+Na*Bn;return[b(Ka,zn)*h,b(bo,M(zn*zn+Ka*Ka))*h]}:function(){return[kr*h,Ar*h]};return Ra.distance=$n,Ra}function Yl(At){return At}var Us=r(),Hl=r(),ac,aa,Oo,qo,ql={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ql.lineStart=Pc,ql.lineEnd=Uf},polygonEnd:function(){ql.lineStart=ql.lineEnd=ql.point=O,Us.add(v(Hl)),Hl.reset()},result:function(){var At=Us/2;return Us.reset(),At}};function Pc(){ql.point=Do}function Do(At,Xt){ql.point=rf,ac=Oo=At,aa=qo=Xt}function rf(At,Xt){Hl.add(qo*At-Oo*Xt),Oo=At,qo=Xt}function Uf(){rf(ac,aa)}var ml=1/0,Zc=ml,Kl=-ml,qs=Kl,yu={point:oc,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var At=[[ml,Zc],[Kl,qs]];return Kl=qs=-(Zc=ml=1/0),At}};function oc(At,Xt){At<ml&&(ml=At),At>Kl&&(Kl=At),Xt<Zc&&(Zc=Xt),Xt>qs&&(qs=Xt)}var Cf=0,sc=0,Nh=0,kf=0,fs=0,nf=0,Vf=0,Jl=0,hl=0,lc,Fu,Cs,js,Go={point:gs,lineStart:uc,lineEnd:Bs,polygonStart:function(){Go.lineStart=ad,Go.lineEnd=Po},polygonEnd:function(){Go.point=gs,Go.lineStart=uc,Go.lineEnd=Bs},result:function(){var At=hl?[Vf/hl,Jl/hl]:nf?[kf/nf,fs/nf]:Nh?[Cf/Nh,sc/Nh]:[NaN,NaN];return Cf=sc=Nh=kf=fs=nf=Vf=Jl=hl=0,At}};function gs(At,Xt){Cf+=At,sc+=Xt,++Nh}function uc(){Go.point=bl}function bl(At,Xt){Go.point=Gu,gs(Cs=At,js=Xt)}function Gu(At,Xt){var kr=At-Cs,Ar=Xt-js,Kr=M(kr*kr+Ar*Ar);kf+=Kr*(Cs+At)/2,fs+=Kr*(js+Xt)/2,nf+=Kr,gs(Cs=At,js=Xt)}function Bs(){Go.point=gs}function ad(){Go.point=od}function Po(){Yo(lc,Fu)}function od(At,Xt){Go.point=Yo,gs(lc=Cs=At,Fu=js=Xt)}function Yo(At,Xt){var kr=At-Cs,Ar=Xt-js,Kr=M(kr*kr+Ar*Ar);kf+=Kr*(Cs+At)/2,fs+=Kr*(js+Xt)/2,nf+=Kr,Kr=js*At-Cs*Xt,Vf+=Kr*(Cs+At),Jl+=Kr*(js+Xt),hl+=Kr*3,gs(Cs=At,js=Xt)}function Pa(At){this._context=At}Pa.prototype={_radius:4.5,pointRadius:function(At){return this._radius=At,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._context.moveTo(At,Xt),this._point=1;break}case 1:{this._context.lineTo(At,Xt);break}default:{this._context.moveTo(At+this._radius,Xt),this._context.arc(At,Xt,this._radius,0,f);break}}},result:O};var af=r(),Hu,wl,Gf,Ic,mf,Bl={point:O,lineStart:function(){Bl.point=_h},lineEnd:function(){Hu&&Qf(wl,Gf),Bl.point=O},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var At=+af;return af.reset(),At}};function _h(At,Xt){Bl.point=Qf,wl=Ic=At,Gf=mf=Xt}function Qf(At,Xt){Ic-=At,mf-=Xt,af.add(M(Ic*Ic+mf*mf)),Ic=At,mf=Xt}function yf(){this._string=[]}yf.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(At){return(At=+At)!==this._radius&&(this._radius=At,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push(\"Z\"),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._string.push(\"M\",At,\",\",Xt),this._point=1;break}case 1:{this._string.push(\"L\",At,\",\",Xt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push(\"M\",At,\",\",Xt,this._circle);break}}},result:function(){if(this._string.length){var At=this._string.join(\"\");return this._string=[],At}else return null}};function Yc(At){return\"m0,\"+At+\"a\"+At+\",\"+At+\" 0 1,1 0,\"+-2*At+\"a\"+At+\",\"+At+\" 0 1,1 0,\"+2*At+\"z\"}function eh(At,Xt){var kr=4.5,Ar,Kr;function Ei(Wi){return Wi&&(typeof kr==\"function\"&&Kr.pointRadius(+kr.apply(this,arguments)),j(Wi,Ar(Kr))),Kr.result()}return Ei.area=function(Wi){return j(Wi,Ar(ql)),ql.result()},Ei.measure=function(Wi){return j(Wi,Ar(Bl)),Bl.result()},Ei.bounds=function(Wi){return j(Wi,Ar(yu)),yu.result()},Ei.centroid=function(Wi){return j(Wi,Ar(Go)),Go.result()},Ei.projection=function(Wi){return arguments.length?(Ar=Wi==null?(At=null,Yl):(At=Wi).stream,Ei):At},Ei.context=function(Wi){return arguments.length?(Kr=Wi==null?(Xt=null,new yf):new Pa(Xt=Wi),typeof kr!=\"function\"&&Kr.pointRadius(kr),Ei):Xt},Ei.pointRadius=function(Wi){return arguments.length?(kr=typeof Wi==\"function\"?Wi:(Kr.pointRadius(+Wi),+Wi),Ei):kr},Ei.projection(At).context(Xt)}function th(At){return{stream:ju(At)}}function ju(At){return function(Xt){var kr=new Hf;for(var Ar in At)kr[Ar]=At[Ar];return kr.stream=Xt,kr}}function Hf(){}Hf.prototype={constructor:Hf,point:function(At,Xt){this.stream.point(At,Xt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(At,Xt,kr){var Ar=At.clipExtent&&At.clipExtent();return At.scale(150).translate([0,0]),Ar!=null&&At.clipExtent(null),j(kr,At.stream(yu)),Xt(yu.result()),Ar!=null&&At.clipExtent(Ar),At}function of(At,Xt,kr){return cc(At,function(Ar){var Kr=Xt[1][0]-Xt[0][0],Ei=Xt[1][1]-Xt[0][1],Wi=Math.min(Kr/(Ar[1][0]-Ar[0][0]),Ei/(Ar[1][1]-Ar[0][1])),hn=+Xt[0][0]+(Kr-Wi*(Ar[1][0]+Ar[0][0]))/2,Tn=+Xt[0][1]+(Ei-Wi*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*Wi).translate([hn,Tn])},kr)}function Nl(At,Xt,kr){return of(At,[[0,0],Xt],kr)}function Kc(At,Xt,kr){return cc(At,function(Ar){var Kr=+Xt,Ei=Kr/(Ar[1][0]-Ar[0][0]),Wi=(Kr-Ei*(Ar[1][0]+Ar[0][0]))/2,hn=-Ei*Ar[0][1];At.scale(150*Ei).translate([Wi,hn])},kr)}function Rc(At,Xt,kr){return cc(At,function(Ar){var Kr=+Xt,Ei=Kr/(Ar[1][1]-Ar[0][1]),Wi=-Ei*Ar[0][0],hn=(Kr-Ei*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*Ei).translate([Wi,hn])},kr)}var ms=16,jf=p(30*d);function Uh(At,Xt){return+Xt?sf(At,Xt):rh(At)}function rh(At){return ju({point:function(Xt,kr){Xt=At(Xt,kr),this.stream.point(Xt[0],Xt[1])}})}function sf(At,Xt){function kr(Ar,Kr,Ei,Wi,hn,Tn,Bn,Zi,$i,an,Di,$n,ka,Ra){var La=Bn-Ar,Na=Zi-Kr,Yn=La*La+Na*Na;if(Yn>4*Xt&&ka--){var zn=Wi+an,Ka=hn+Di,bo=Tn+$n,Xo=M(zn*zn+Ka*Ka+bo*bo),Ms=T(bo/=Xo),os=v(v(bo)-1)<o||v(Ei-$i)<o?(Ei+$i)/2:b(Ka,zn),Ts=At(os,Ms),Ho=Ts[0],yl=Ts[1],Xs=Ho-Ar,Ps=yl-Kr,va=Na*Xs-La*Ps;(va*va/Yn>Xt||v((La*Xs+Na*Ps)/Yn-.5)>.3||Wi*an+hn*Di+Tn*$n<jf)&&(kr(Ar,Kr,Ei,Wi,hn,Tn,Ho,yl,os,zn/=Xo,Ka/=Xo,bo,ka,Ra),Ra.point(Ho,yl),kr(Ho,yl,os,zn,Ka,bo,Bn,Zi,$i,an,Di,$n,ka,Ra))}}return function(Ar){var Kr,Ei,Wi,hn,Tn,Bn,Zi,$i,an,Di,$n,ka,Ra={point:La,lineStart:Na,lineEnd:zn,polygonStart:function(){Ar.polygonStart(),Ra.lineStart=Ka},polygonEnd:function(){Ar.polygonEnd(),Ra.lineStart=Na}};function La(Ms,os){Ms=At(Ms,os),Ar.point(Ms[0],Ms[1])}function Na(){$i=NaN,Ra.point=Yn,Ar.lineStart()}function Yn(Ms,os){var Ts=ce([Ms,os]),Ho=At(Ms,os);kr($i,an,Zi,Di,$n,ka,$i=Ho[0],an=Ho[1],Zi=Ms,Di=Ts[0],$n=Ts[1],ka=Ts[2],ms,Ar),Ar.point($i,an)}function zn(){Ra.point=La,Ar.lineEnd()}function Ka(){Na(),Ra.point=bo,Ra.lineEnd=Xo}function bo(Ms,os){Yn(Kr=Ms,os),Ei=$i,Wi=an,hn=Di,Tn=$n,Bn=ka,Ra.point=Yn}function Xo(){kr($i,an,Zi,Di,$n,ka,Ei,Wi,Kr,hn,Tn,Bn,ms,Ar),Ra.lineEnd=zn,zn()}return Ra}}var xh=ju({point:function(At,Xt){this.stream.point(At*d,Xt*d)}});function Mu(At){return ju({point:function(Xt,kr){var Ar=At(Xt,kr);return this.stream.point(Ar[0],Ar[1])}})}function ih(At,Xt,kr,Ar,Kr){function Ei(Wi,hn){return Wi*=Ar,hn*=Kr,[Xt+At*Wi,kr-At*hn]}return Ei.invert=function(Wi,hn){return[(Wi-Xt)/At*Ar,(kr-hn)/At*Kr]},Ei}function Ws(At,Xt,kr,Ar,Kr,Ei){var Wi=p(Ei),hn=_(Ei),Tn=Wi*At,Bn=hn*At,Zi=Wi/At,$i=hn/At,an=(hn*kr-Wi*Xt)/At,Di=(hn*Xt+Wi*kr)/At;function $n(ka,Ra){return ka*=Ar,Ra*=Kr,[Tn*ka-Bn*Ra+Xt,kr-Bn*ka-Tn*Ra]}return $n.invert=function(ka,Ra){return[Ar*(Zi*ka-$i*Ra+an),Kr*(Di-$i*ka-Zi*Ra)]},$n}function Eu(At){return Dc(function(){return At})()}function Dc(At){var Xt,kr=150,Ar=480,Kr=250,Ei=0,Wi=0,hn=0,Tn=0,Bn=0,Zi,$i=0,an=1,Di=1,$n=null,ka=Qr,Ra=null,La,Na,Yn,zn=Yl,Ka=.5,bo,Xo,Ms,os,Ts;function Ho(va){return Ms(va[0]*d,va[1]*d)}function yl(va){return va=Ms.invert(va[0],va[1]),va&&[va[0]*h,va[1]*h]}Ho.stream=function(va){return os&&Ts===va?os:os=xh(Mu(Zi)(ka(bo(zn(Ts=va)))))},Ho.preclip=function(va){return arguments.length?(ka=va,$n=void 0,Ps()):ka},Ho.postclip=function(va){return arguments.length?(zn=va,Ra=La=Na=Yn=null,Ps()):zn},Ho.clipAngle=function(va){return arguments.length?(ka=+va?En($n=va*d):($n=null,Qr),Ps()):$n*h},Ho.clipExtent=function(va){return arguments.length?(zn=va==null?(Ra=La=Na=Yn=null,Yl):Jn(Ra=+va[0][0],La=+va[0][1],Na=+va[1][0],Yn=+va[1][1]),Ps()):Ra==null?null:[[Ra,La],[Na,Yn]]},Ho.scale=function(va){return arguments.length?(kr=+va,Xs()):kr},Ho.translate=function(va){return arguments.length?(Ar=+va[0],Kr=+va[1],Xs()):[Ar,Kr]},Ho.center=function(va){return arguments.length?(Ei=va[0]%360*d,Wi=va[1]%360*d,Xs()):[Ei*h,Wi*h]},Ho.rotate=function(va){return arguments.length?(hn=va[0]%360*d,Tn=va[1]%360*d,Bn=va.length>2?va[2]%360*d:0,Xs()):[hn*h,Tn*h,Bn*h]},Ho.angle=function(va){return arguments.length?($i=va%360*d,Xs()):$i*h},Ho.reflectX=function(va){return arguments.length?(an=va?-1:1,Xs()):an<0},Ho.reflectY=function(va){return arguments.length?(Di=va?-1:1,Xs()):Di<0},Ho.precision=function(va){return arguments.length?(bo=Uh(Xo,Ka=va*va),Ps()):M(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Xs(){var va=Ws(kr,0,0,an,Di,$i).apply(null,Xt(Ei,Wi)),no=($i?Ws:ih)(kr,Ar-va[0],Kr-va[1],an,Di,$i);return Zi=zi(hn,Tn,Bn),Xo=ri(Xt,no),Ms=ri(Zi,Xo),bo=Uh(Xo,Ka),Ps()}function Ps(){return os=Ts=null,Ho}return function(){return Xt=At.apply(this,arguments),Ho.invert=Xt.invert&&yl,Xs()}}function ks(At){var Xt=0,kr=l/3,Ar=Dc(At),Kr=Ar(Xt,kr);return Kr.parallels=function(Ei){return arguments.length?Ar(Xt=Ei[0]*d,kr=Ei[1]*d):[Xt*h,kr*h]},Kr}function bc(At){var Xt=p(At);function kr(Ar,Kr){return[Ar*Xt,_(Kr)/Xt]}return kr.invert=function(Ar,Kr){return[Ar/Xt,T(Kr*Xt)]},kr}function hu(At,Xt){var kr=_(At),Ar=(kr+_(Xt))/2;if(v(Ar)<o)return bc(At);var Kr=1+kr*(2*Ar-kr),Ei=M(Kr)/Ar;function Wi(hn,Tn){var Bn=M(Kr-2*Ar*_(Tn))/Ar;return[Bn*_(hn*=Ar),Ei-Bn*p(hn)]}return Wi.invert=function(hn,Tn){var Bn=Ei-Tn,Zi=b(hn,v(Bn))*k(Bn);return Bn*Ar<0&&(Zi-=l*k(hn)*k(Bn)),[Zi/Ar,T((Kr-(hn*hn+Bn*Bn)*Ar*Ar)/(2*Ar))]},Wi}function _u(){return ks(hu).scale(155.424).center([0,33.6442])}function al(){return _u().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function nh(At){var Xt=At.length;return{point:function(kr,Ar){for(var Kr=-1;++Kr<Xt;)At[Kr].point(kr,Ar)},sphere:function(){for(var kr=-1;++kr<Xt;)At[kr].sphere()},lineStart:function(){for(var kr=-1;++kr<Xt;)At[kr].lineStart()},lineEnd:function(){for(var kr=-1;++kr<Xt;)At[kr].lineEnd()},polygonStart:function(){for(var kr=-1;++kr<Xt;)At[kr].polygonStart()},polygonEnd:function(){for(var kr=-1;++kr<Xt;)At[kr].polygonEnd()}}}function bh(){var At,Xt,kr=al(),Ar,Kr=_u().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Ei,Wi=_u().rotate([157,0]).center([-3,19.9]).parallels([8,18]),hn,Tn,Bn={point:function(an,Di){Tn=[an,Di]}};function Zi(an){var Di=an[0],$n=an[1];return Tn=null,Ar.point(Di,$n),Tn||(Ei.point(Di,$n),Tn)||(hn.point(Di,$n),Tn)}Zi.invert=function(an){var Di=kr.scale(),$n=kr.translate(),ka=(an[0]-$n[0])/Di,Ra=(an[1]-$n[1])/Di;return(Ra>=.12&&Ra<.234&&ka>=-.425&&ka<-.214?Kr:Ra>=.166&&Ra<.234&&ka>=-.214&&ka<-.115?Wi:kr).invert(an)},Zi.stream=function(an){return At&&Xt===an?At:At=nh([kr.stream(Xt=an),Kr.stream(an),Wi.stream(an)])},Zi.precision=function(an){return arguments.length?(kr.precision(an),Kr.precision(an),Wi.precision(an),$i()):kr.precision()},Zi.scale=function(an){return arguments.length?(kr.scale(an),Kr.scale(an*.35),Wi.scale(an),Zi.translate(kr.translate())):kr.scale()},Zi.translate=function(an){if(!arguments.length)return kr.translate();var Di=kr.scale(),$n=+an[0],ka=+an[1];return Ar=kr.translate(an).clipExtent([[$n-.455*Di,ka-.238*Di],[$n+.455*Di,ka+.238*Di]]).stream(Bn),Ei=Kr.translate([$n-.307*Di,ka+.201*Di]).clipExtent([[$n-.425*Di+o,ka+.12*Di+o],[$n-.214*Di-o,ka+.234*Di-o]]).stream(Bn),hn=Wi.translate([$n-.205*Di,ka+.212*Di]).clipExtent([[$n-.214*Di+o,ka+.166*Di+o],[$n-.115*Di-o,ka+.234*Di-o]]).stream(Bn),$i()},Zi.fitExtent=function(an,Di){return of(Zi,an,Di)},Zi.fitSize=function(an,Di){return Nl(Zi,an,Di)},Zi.fitWidth=function(an,Di){return Kc(Zi,an,Di)},Zi.fitHeight=function(an,Di){return Rc(Zi,an,Di)};function $i(){return At=Xt=null,Zi}return Zi.scale(1070)}function zu(At){return function(Xt,kr){var Ar=p(Xt),Kr=p(kr),Ei=At(Ar*Kr);return[Ei*Kr*_(Xt),Ei*_(kr)]}}function Fc(At){return function(Xt,kr){var Ar=M(Xt*Xt+kr*kr),Kr=At(Ar),Ei=_(Kr),Wi=p(Kr);return[b(Xt*Ei,Ar*Wi),T(Ar&&kr*Ei/Ar)]}}var wc=zu(function(At){return M(2/(1+At))});wc.invert=Fc(function(At){return 2*T(At/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var _f=zu(function(At){return(At=P(At))&&At/_(At)});_f.invert=Fc(function(At){return At});function Lf(){return Eu(_f).scale(79.4188).clipAngle(180-.001)}function Ou(At,Xt){return[At,A(g((u+Xt)/2))]}Ou.invert=function(At,Xt){return[At,2*x(E(Xt))-u]};function xf(){return jl(Ou).scale(961/f)}function jl(At){var Xt=Eu(At),kr=Xt.center,Ar=Xt.scale,Kr=Xt.translate,Ei=Xt.clipExtent,Wi=null,hn,Tn,Bn;Xt.scale=function($i){return arguments.length?(Ar($i),Zi()):Ar()},Xt.translate=function($i){return arguments.length?(Kr($i),Zi()):Kr()},Xt.center=function($i){return arguments.length?(kr($i),Zi()):kr()},Xt.clipExtent=function($i){return arguments.length?($i==null?Wi=hn=Tn=Bn=null:(Wi=+$i[0][0],hn=+$i[0][1],Tn=+$i[1][0],Bn=+$i[1][1]),Zi()):Wi==null?null:[[Wi,hn],[Tn,Bn]]};function Zi(){var $i=l*Ar(),an=Xt(yn(Xt.rotate()).invert([0,0]));return Ei(Wi==null?[[an[0]-$i,an[1]-$i],[an[0]+$i,an[1]+$i]]:At===Ou?[[Math.max(an[0]-$i,Wi),hn],[Math.min(an[0]+$i,Tn),Bn]]:[[Wi,Math.max(an[1]-$i,hn)],[Tn,Math.min(an[1]+$i,Bn)]])}return Zi()}function lf(At){return g((u+At)/2)}function Vh(At,Xt){var kr=p(At),Ar=At===Xt?_(At):A(kr/p(Xt))/A(lf(Xt)/lf(At)),Kr=kr*L(lf(At),Ar)/Ar;if(!Ar)return Ou;function Ei(Wi,hn){Kr>0?hn<-u+o&&(hn=-u+o):hn>u-o&&(hn=u-o);var Tn=Kr/L(lf(hn),Ar);return[Tn*_(Ar*Wi),Kr-Tn*p(Ar*Wi)]}return Ei.invert=function(Wi,hn){var Tn=Kr-hn,Bn=k(Ar)*M(Wi*Wi+Tn*Tn),Zi=b(Wi,v(Tn))*k(Tn);return Tn*Ar<0&&(Zi-=l*k(Wi)*k(Tn)),[Zi/Ar,2*x(L(Kr/Bn,1/Ar))-u]},Ei}function Pf(){return ks(Vh).scale(109.5).parallels([30,30])}function Ls(At,Xt){return[At,Xt]}Ls.invert=Ls;function du(){return Eu(Ls).scale(152.63)}function Cu(At,Xt){var kr=p(At),Ar=At===Xt?_(At):(kr-p(Xt))/(Xt-At),Kr=kr/Ar+At;if(v(Ar)<o)return Ls;function Ei(Wi,hn){var Tn=Kr-hn,Bn=Ar*Wi;return[Tn*_(Bn),Kr-Tn*p(Bn)]}return Ei.invert=function(Wi,hn){var Tn=Kr-hn,Bn=b(Wi,v(Tn))*k(Tn);return Tn*Ar<0&&(Bn-=l*k(Wi)*k(Tn)),[Bn/Ar,Kr-k(Ar)*M(Wi*Wi+Tn*Tn)]},Ei}function Wf(){return ks(Cu).scale(131.154).center([0,13.9389])}var Vs=1.340264,bf=-.081106,zc=893e-6,Wu=.003796,If=M(3)/2,Xu=12;function uf(At,Xt){var kr=T(If*_(Xt)),Ar=kr*kr,Kr=Ar*Ar*Ar;return[At*p(kr)/(If*(Vs+3*bf*Ar+Kr*(7*zc+9*Wu*Ar))),kr*(Vs+bf*Ar+Kr*(zc+Wu*Ar))]}uf.invert=function(At,Xt){for(var kr=Xt,Ar=kr*kr,Kr=Ar*Ar*Ar,Ei=0,Wi,hn,Tn;Ei<Xu&&(hn=kr*(Vs+bf*Ar+Kr*(zc+Wu*Ar))-Xt,Tn=Vs+3*bf*Ar+Kr*(7*zc+9*Wu*Ar),kr-=Wi=hn/Tn,Ar=kr*kr,Kr=Ar*Ar*Ar,!(v(Wi)<s));++Ei);return[If*At*(Vs+3*bf*Ar+Kr*(7*zc+9*Wu*Ar))/p(kr),T(_(kr)/If)]};function Xf(){return Eu(uf).scale(177.158)}function Wl(At,Xt){var kr=p(Xt),Ar=p(At)*kr;return[kr*_(At)/Ar,_(Xt)/Ar]}Wl.invert=Fc(x);function ah(){return Eu(Wl).scale(144.049).clipAngle(60)}function Zu(){var At=1,Xt=0,kr=0,Ar=1,Kr=1,Ei=0,Wi,hn,Tn=null,Bn,Zi,$i,an=1,Di=1,$n=ju({point:function(zn,Ka){var bo=Yn([zn,Ka]);this.stream.point(bo[0],bo[1])}}),ka=Yl,Ra,La;function Na(){return an=At*Ar,Di=At*Kr,Ra=La=null,Yn}function Yn(zn){var Ka=zn[0]*an,bo=zn[1]*Di;if(Ei){var Xo=bo*Wi-Ka*hn;Ka=Ka*Wi+bo*hn,bo=Xo}return[Ka+Xt,bo+kr]}return Yn.invert=function(zn){var Ka=zn[0]-Xt,bo=zn[1]-kr;if(Ei){var Xo=bo*Wi+Ka*hn;Ka=Ka*Wi-bo*hn,bo=Xo}return[Ka/an,bo/Di]},Yn.stream=function(zn){return Ra&&La===zn?Ra:Ra=$n(ka(La=zn))},Yn.postclip=function(zn){return arguments.length?(ka=zn,Tn=Bn=Zi=$i=null,Na()):ka},Yn.clipExtent=function(zn){return arguments.length?(ka=zn==null?(Tn=Bn=Zi=$i=null,Yl):Jn(Tn=+zn[0][0],Bn=+zn[0][1],Zi=+zn[1][0],$i=+zn[1][1]),Na()):Tn==null?null:[[Tn,Bn],[Zi,$i]]},Yn.scale=function(zn){return arguments.length?(At=+zn,Na()):At},Yn.translate=function(zn){return arguments.length?(Xt=+zn[0],kr=+zn[1],Na()):[Xt,kr]},Yn.angle=function(zn){return arguments.length?(Ei=zn%360*d,hn=_(Ei),Wi=p(Ei),Na()):Ei*h},Yn.reflectX=function(zn){return arguments.length?(Ar=zn?-1:1,Na()):Ar<0},Yn.reflectY=function(zn){return arguments.length?(Kr=zn?-1:1,Na()):Kr<0},Yn.fitExtent=function(zn,Ka){return of(Yn,zn,Ka)},Yn.fitSize=function(zn,Ka){return Nl(Yn,zn,Ka)},Yn.fitWidth=function(zn,Ka){return Kc(Yn,zn,Ka)},Yn.fitHeight=function(zn,Ka){return Rc(Yn,zn,Ka)},Yn}function Oc(At,Xt){var kr=Xt*Xt,Ar=kr*kr;return[At*(.8707-.131979*kr+Ar*(-.013791+Ar*(.003971*kr-.001529*Ar))),Xt*(1.007226+kr*(.015085+Ar*(-.044475+.028874*kr-.005916*Ar)))]}Oc.invert=function(At,Xt){var kr=Xt,Ar=25,Kr;do{var Ei=kr*kr,Wi=Ei*Ei;kr-=Kr=(kr*(1.007226+Ei*(.015085+Wi*(-.044475+.028874*Ei-.005916*Wi)))-Xt)/(1.007226+Ei*(.015085*3+Wi*(-.044475*7+.028874*9*Ei-.005916*11*Wi)))}while(v(Kr)>o&&--Ar>0);return[At/(.8707+(Ei=kr*kr)*(-.131979+Ei*(-.013791+Ei*Ei*Ei*(.003971-.001529*Ei)))),kr]};function Tc(){return Eu(Oc).scale(175.295)}function Tl(At,Xt){return[p(Xt)*_(At),_(Xt)]}Tl.invert=Fc(T);function vu(){return Eu(Tl).scale(249.5).clipAngle(90+o)}function qc(At,Xt){var kr=p(Xt),Ar=1+p(At)*kr;return[kr*_(At)/Ar,_(Xt)/Ar]}qc.invert=Fc(function(At){return 2*x(At)});function cf(){return Eu(qc).scale(250).clipAngle(142)}function fc(At,Xt){return[A(g((u+Xt)/2)),-At]}fc.invert=function(At,Xt){return[-Xt,2*x(E(At))-u]};function Bc(){var At=jl(fc),Xt=At.center,kr=At.rotate;return At.center=function(Ar){return arguments.length?Xt([-Ar[1],Ar[0]]):(Ar=Xt(),[Ar[1],-Ar[0]])},At.rotate=function(Ar){return arguments.length?kr([Ar[0],Ar[1],Ar.length>2?Ar[2]+90:90]):(Ar=kr(),[Ar[0],Ar[1],Ar[2]-90])},kr([0,0,90]).scale(159.155)}e.geoAlbers=al,e.geoAlbersUsa=bh,e.geoArea=ge,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Lf,e.geoAzimuthalEquidistantRaw=_f,e.geoBounds=Ge,e.geoCentroid=Er,e.geoCircle=la,e.geoClipAntimeridian=Qr,e.geoClipCircle=En,e.geoClipExtent=Ma,e.geoClipRectangle=Jn,e.geoConicConformal=Pf,e.geoConicConformalRaw=Vh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Wf,e.geoConicEquidistantRaw=Cu,e.geoContains=ws,e.geoDistance=Ss,e.geoEqualEarth=Xf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Ls,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=Ol,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=xf,e.geoMercatorRaw=Ou,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=Oc,e.geoOrthographic=vu,e.geoOrthographicRaw=Tl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=qc,e.geoStream=j,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,\"__esModule\",{value:!0})})});var pDe=ye((CF,vDe)=>{(function(e,t){typeof CF==\"object\"&&typeof vDe!=\"undefined\"?t(CF,LZ(),iC()):t(e.d3=e.d3||{},e.d3,e.d3)})(CF,function(e,t,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},x=Math.sin,b=Math.tan,p=1e-6,C=1e-12,E=Math.PI,A=E/2,L=E/4,_=Math.SQRT1_2,k=G(2),M=G(E),g=E*2,P=180/E,T=E/180;function z(ve){return ve?ve/Math.sin(ve):1}function O(ve){return ve>1?A:ve<-1?-A:Math.asin(ve)}function V(ve){return ve>1?0:ve<-1?E:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function H(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function j(ve){return u(ve+G(ve*ve+1))}function re(ve){return u(ve+G(ve*ve-1))}function oe(ve){var be=b(ve/2),Re=2*u(o(ve/2))/(be*be);function Be(tt,We){var it=o(tt),Dt=o(We),Ht=x(We),rr=Dt*it,dr=-((1-rr?u((1+rr)/2)/(1-rr):-.5)+Re/(1+rr));return[dr*Dt*x(tt),dr*Ht]}return Be.invert=function(tt,We){var it=G(tt*tt+We*We),Dt=-ve/2,Ht=50,rr;if(!it)return[0,0];do{var dr=Dt/2,Sr=o(dr),Or=x(dr),jr=Or/Sr,ii=-u(n(Sr));Dt-=rr=(2/jr*ii-Re*jr-it)/(-ii/(Or*Or)+1-Re/(2*Sr*Sr))*(Sr<0?.7:1)}while(n(rr)>p&&--Ht>0);var Li=x(Dt);return[a(tt*Li,it*o(Dt)),O(We*Li/it)]},Be}function _e(){var ve=A,be=t.geoProjectionMutator(oe),Re=be(ve);return Re.radius=function(Be){return arguments.length?be(ve=Be*T):ve*P},Re.scale(179.976).clipAngle(147)}function Me(ve,be){var Re=o(be),Be=z(V(Re*o(ve/=2)));return[2*Re*x(ve)*Be,x(be)*Be]}Me.invert=function(ve,be){if(!(ve*ve+4*be*be>E*E+p)){var Re=ve,Be=be,tt=25;do{var We=x(Re),it=x(Re/2),Dt=o(Re/2),Ht=x(Be),rr=o(Be),dr=x(2*Be),Sr=Ht*Ht,Or=rr*rr,jr=it*it,ii=1-Or*Dt*Dt,Li=ii?V(rr*Dt)*G(un=1/ii):un=0,un,sn=2*Li*rr*it-ve,In=Li*Ht-be,Kn=un*(Or*jr+Li*rr*Dt*Sr),Aa=un*(.5*We*dr-Li*2*Ht*it),fa=un*.25*(dr*it-Li*Ht*Or*We),$a=un*(Sr*Dt+Li*jr*rr),ko=Aa*fa-$a*Kn;if(!ko)break;var Qa=(In*Aa-sn*$a)/ko,mo=(sn*fa-In*Kn)/ko;Re-=Qa,Be-=mo}while((n(Qa)>p||n(mo)>p)&&--tt>0);return[Re,Be]}};function ke(){return t.geoProjection(Me).scale(152.63)}function me(ve){var be=x(ve),Re=o(ve),Be=ve>=0?1:-1,tt=b(Be*ve),We=(1+be-Re)/2;function it(Dt,Ht){var rr=o(Ht),dr=o(Dt/=2);return[(1+rr)*x(Dt),(Be*Ht>-a(dr,tt)-.001?0:-Be*10)+We+x(Ht)*Re-(1+rr)*be*dr]}return it.invert=function(Dt,Ht){var rr=0,dr=0,Sr=50;do{var Or=o(rr),jr=x(rr),ii=o(dr),Li=x(dr),un=1+ii,sn=un*jr-Dt,In=We+Li*Re-un*be*Or-Ht,Kn=un*Or/2,Aa=-jr*Li,fa=be*un*jr/2,$a=Re*ii+be*Or*Li,ko=Aa*fa-$a*Kn,Qa=(In*Aa-sn*$a)/ko/2,mo=(sn*fa-In*Kn)/ko;n(mo)>2&&(mo/=2),rr-=Qa,dr-=mo}while((n(Qa)>p||n(mo)>p)&&--Sr>0);return Be*dr>-a(o(rr),tt)-.001?[rr*2,dr]:null},it}function ie(){var ve=20*T,be=ve>=0?1:-1,Re=b(be*ve),Be=t.geoProjectionMutator(me),tt=Be(ve),We=tt.stream;return tt.parallel=function(it){return arguments.length?(Re=b((be=(ve=it*T)>=0?1:-1)*ve),Be(ve)):ve*P},tt.stream=function(it){var Dt=tt.rotate(),Ht=We(it),rr=(tt.rotate([0,0]),We(it)),dr=tt.precision();return tt.rotate(Dt),Ht.sphere=function(){rr.polygonStart(),rr.lineStart();for(var Sr=be*-180;be*Sr<180;Sr+=be*90)rr.point(Sr,be*90);if(ve)for(;be*(Sr-=3*be*dr)>=-180;)rr.point(Sr,be*-a(o(Sr*T/2),Re)*P);rr.lineEnd(),rr.polygonEnd()},Ht},tt.scale(218.695).center([0,28.0974])}function Se(ve,be){var Re=b(be/2),Be=G(1-Re*Re),tt=1+Be*o(ve/=2),We=x(ve)*Be/tt,it=Re/tt,Dt=We*We,Ht=it*it;return[4/3*We*(3+Dt-3*Ht),4/3*it*(3+3*Dt-Ht)]}Se.invert=function(ve,be){if(ve*=3/8,be*=3/8,!ve&&n(be)>1)return null;var Re=ve*ve,Be=be*be,tt=1+Re+Be,We=G((tt-G(tt*tt-4*be*be))/2),it=O(We)/3,Dt=We?re(n(be/We))/3:j(n(ve))/3,Ht=o(it),rr=N(Dt),dr=rr*rr-Ht*Ht;return[v(ve)*2*a(H(Dt)*Ht,.25-dr),v(be)*2*a(rr*x(it),.25+dr)]};function Le(){return t.geoProjection(Se).scale(66.1603)}var Ae=G(8),De=u(1+k);function Pe(ve,be){var Re=n(be);return Re<L?[ve,u(b(L+be/2))]:[ve*o(Re)*(2*k-1/x(Re)),v(be)*(2*k*(Re-L)-u(b(Re/2)))]}Pe.invert=function(ve,be){if((We=n(be))<De)return[ve,2*i(s(be))-A];var Re=L,Be=25,tt,We;do{var it=o(Re/2),Dt=b(Re/2);Re-=tt=(Ae*(Re-L)-u(Dt)-We)/(Ae-it*it/(2*Dt))}while(n(tt)>C&&--Be>0);return[ve/(o(Re)*(Ae-1/x(Re))),v(be)*Re]};function ge(){return t.geoProjection(Pe).scale(112.314)}function Fe(ve){var be=2*E/ve;function Re(Be,tt){var We=t.geoAzimuthalEquidistantRaw(Be,tt);if(n(Be)>A){var it=a(We[1],We[0]),Dt=G(We[0]*We[0]+We[1]*We[1]),Ht=be*d((it-A)/be)+A,rr=a(x(it-=Ht),2-o(it));it=Ht+O(E/Dt*x(rr))-rr,We[0]=Dt*o(it),We[1]=Dt*x(it)}return We}return Re.invert=function(Be,tt){var We=G(Be*Be+tt*tt);if(We>A){var it=a(tt,Be),Dt=be*d((it-A)/be)+A,Ht=it>Dt?-1:1,rr=We*o(Dt-it),dr=1/b(Ht*V((rr-E)/G(E*(E-2*rr)+We*We)));it=Dt+2*i((dr+Ht*G(dr*dr-3))/3),Be=We*o(it),tt=We*x(it)}return t.geoAzimuthalEquidistantRaw.invert(Be,tt)},Re}function ce(){var ve=5,be=t.geoProjectionMutator(Fe),Re=be(ve),Be=Re.stream,tt=.01,We=-o(tt*T),it=x(tt*T);return Re.lobes=function(Dt){return arguments.length?be(ve=+Dt):ve},Re.stream=function(Dt){var Ht=Re.rotate(),rr=Be(Dt),dr=(Re.rotate([0,0]),Be(Dt));return Re.rotate(Ht),rr.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Sr=0,Or=360/ve,jr=2*E/ve,ii=90-180/ve,Li=A;Sr<ve;++Sr,ii-=Or,Li-=jr)dr.point(a(it*o(Li),We)*P,O(it*x(Li))*P),ii<-90?(dr.point(-90,-180-ii-tt),dr.point(-90,-180-ii+tt)):(dr.point(90,ii+tt),dr.point(90,ii-tt));dr.lineEnd(),dr.polygonEnd()},rr},Re.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function Ze(ve,be){if(arguments.length<2&&(be=ve),be===1)return t.geoAzimuthalEqualAreaRaw;if(be===1/0)return ct;function Re(Be,tt){var We=t.geoAzimuthalEqualAreaRaw(Be/be,tt);return We[0]*=ve,We}return Re.invert=function(Be,tt){var We=t.geoAzimuthalEqualAreaRaw.invert(Be/ve,tt);return We[0]*=be,We},Re}function ct(ve,be){return[ve*o(be)/o(be/=2),2*x(be)]}ct.invert=function(ve,be){var Re=2*O(be/2);return[ve*o(Re/2)/o(Re),Re]};function pt(){var ve=2,be=t.geoProjectionMutator(Ze),Re=be(ve);return Re.coefficient=function(Be){return arguments.length?be(ve=+Be):ve},Re.scale(169.529)}function Wt(ve,be,Re){var Be=100,tt,We,it;Re=Re===void 0?0:+Re,be=+be;do We=ve(Re),it=ve(Re+p),We===it&&(it=We+p),Re-=tt=-1*p*(We-be)/(We-it);while(Be-- >0&&n(tt)>p);return Be<0?NaN:Re}function st(ve,be,Re){return be===void 0&&(be=40),Re===void 0&&(Re=C),function(Be,tt,We,it){var Dt,Ht,rr;We=We===void 0?0:+We,it=it===void 0?0:+it;for(var dr=0;dr<be;dr++){var Sr=ve(We,it),Or=Sr[0]-Be,jr=Sr[1]-tt;if(n(Or)<Re&&n(jr)<Re)break;var ii=Or*Or+jr*jr;if(ii>Dt){We-=Ht/=2,it-=rr/=2;continue}Dt=ii;var Li=(We>0?-1:1)*Re,un=(it>0?-1:1)*Re,sn=ve(We+Li,it),In=ve(We,it+un),Kn=(sn[0]-Sr[0])/Li,Aa=(sn[1]-Sr[1])/Li,fa=(In[0]-Sr[0])/un,$a=(In[1]-Sr[1])/un,ko=$a*Kn-Aa*fa,Qa=(n(ko)<.5?.5:1)/ko;if(Ht=(jr*fa-Or*$a)*Qa,rr=(Or*Aa-jr*Kn)*Qa,We+=Ht,it+=rr,n(Ht)<Re&&n(rr)<Re)break}return[We,it]}}function lt(){var ve=Ze(1.68,2),be=1.4,Re=12;function Be(tt,We){if(tt+We<-be){var it=(tt-We+1.6)*(tt+We+be)/8;tt+=it,We-=.8*it*x(We+E/2)}var Dt=ve(tt,We),Ht=(1-o(tt*We))/Re;return Dt[1]<0&&(Dt[0]*=1+Ht),Dt[1]>0&&(Dt[1]*=1+Ht/1.5*Dt[0]*Dt[0]),Dt}return Be.invert=st(Be),Be}function Gt(){return t.geoProjection(lt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Nt(ve,be){var Re=ve*x(be),Be=30,tt;do be-=tt=(be+x(be)-Re)/(1+o(be));while(n(tt)>p&&--Be>0);return be/2}function $t(ve,be,Re){function Be(tt,We){return[ve*tt*o(We=Nt(Re,We)),be*x(We)]}return Be.invert=function(tt,We){return We=O(We/be),[tt/(ve*o(We)),O((2*We+x(2*We))/Re)]},Be}var sr=$t(k/A,k,E);function wr(){return t.geoProjection(sr).scale(169.529)}var ur=2.00276,Qe=1.11072;function Et(ve,be){var Re=Nt(E,be);return[ur*ve/(1/o(be)+Qe/o(Re)),(be+k*x(Re))/ur]}Et.invert=function(ve,be){var Re=ur*be,Be=be<0?-L:L,tt=25,We,it;do it=Re-k*x(Be),Be-=We=(x(2*Be)+2*Be-E*x(it))/(2*o(2*Be)+2+E*o(it)*k*o(Be));while(n(We)>p&&--tt>0);return it=Re-k*x(Be),[ve*(1/o(it)+Qe/o(Be))/ur,it]};function er(){return t.geoProjection(Et).scale(160.857)}function Ut(ve){var be=0,Re=t.geoProjectionMutator(ve),Be=Re(be);return Be.parallel=function(tt){return arguments.length?Re(be=tt*T):be*P},Be}function Ft(ve,be){return[ve*o(be),be]}Ft.invert=function(ve,be){return[ve/o(be),be]};function bt(){return t.geoProjection(Ft).scale(152.63)}function yt(ve){if(!ve)return Ft;var be=1/b(ve);function Re(Be,tt){var We=be+ve-tt,it=We&&Be*o(tt)/We;return[We*x(it),be-We*o(it)]}return Re.invert=function(Be,tt){var We=G(Be*Be+(tt=be-tt)*tt),it=be+ve-We;return[We/o(it)*a(Be,tt),it]},Re}function Yt(){return Ut(yt).scale(123.082).center([0,26.1441]).parallel(45)}function lr(ve){function be(Re,Be){var tt=A-Be,We=tt&&Re*ve*x(tt)/tt;return[tt*x(We)/ve,A-tt*o(We)]}return be.invert=function(Re,Be){var tt=Re*ve,We=A-Be,it=G(tt*tt+We*We),Dt=a(tt,We);return[(it?it/x(it):1)*Dt/ve,A-it]},be}function Tr(){var ve=.5,be=t.geoProjectionMutator(lr),Re=be(ve);return Re.fraction=function(Be){return arguments.length?be(ve=+Be):ve},Re.scale(158.837)}var Rr=$t(1,4/E,E);function ei(){return t.geoProjection(Rr).scale(152.63)}function Wr(ve,be,Re,Be,tt,We){var it=o(We),Dt;if(n(ve)>1||n(We)>1)Dt=V(Re*tt+be*Be*it);else{var Ht=x(ve/2),rr=x(We/2);Dt=2*O(G(Ht*Ht+be*Be*rr*rr))}return n(Dt)>p?[Dt,a(Be*x(We),be*tt-Re*Be*it)]:[0,0]}function Ur(ve,be,Re){return V((ve*ve+be*be-Re*Re)/(2*ve*be))}function dt(ve){return ve-2*E*l((ve+E)/(2*E))}function Ge(ve,be,Re){for(var Be=[[ve[0],ve[1],x(ve[1]),o(ve[1])],[be[0],be[1],x(be[1]),o(be[1])],[Re[0],Re[1],x(Re[1]),o(Re[1])]],tt=Be[2],We,it=0;it<3;++it,tt=We)We=Be[it],tt.v=Wr(We[1]-tt[1],tt[3],tt[2],We[3],We[2],We[0]-tt[0]),tt.point=[0,0];var Dt=Ur(Be[0].v[0],Be[2].v[0],Be[1].v[0]),Ht=Ur(Be[0].v[0],Be[1].v[0],Be[2].v[0]),rr=E-Dt;Be[2].point[1]=0,Be[0].point[0]=-(Be[1].point[0]=Be[0].v[0]/2);var dr=[Be[2].point[0]=Be[0].point[0]+Be[2].v[0]*o(Dt),2*(Be[0].point[1]=Be[1].point[1]=Be[2].v[0]*x(Dt))];function Sr(Or,jr){var ii=x(jr),Li=o(jr),un=new Array(3),sn;for(sn=0;sn<3;++sn){var In=Be[sn];if(un[sn]=Wr(jr-In[1],In[3],In[2],Li,ii,Or-In[0]),!un[sn][0])return In.point;un[sn][1]=dt(un[sn][1]-In.v[1])}var Kn=dr.slice();for(sn=0;sn<3;++sn){var Aa=sn==2?0:sn+1,fa=Ur(Be[sn].v[0],un[sn][0],un[Aa][0]);un[sn][1]<0&&(fa=-fa),sn?sn==1?(fa=Ht-fa,Kn[0]-=un[sn][0]*o(fa),Kn[1]-=un[sn][0]*x(fa)):(fa=rr-fa,Kn[0]+=un[sn][0]*o(fa),Kn[1]+=un[sn][0]*x(fa)):(Kn[0]+=un[sn][0]*o(fa),Kn[1]-=un[sn][0]*x(fa))}return Kn[0]/=3,Kn[1]/=3,Kn}return Sr}function Je(ve){return ve[0]*=T,ve[1]*=T,ve}function je(){return $e([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function $e(ve,be,Re){var Be=t.geoCentroid({type:\"MultiPoint\",coordinates:[ve,be,Re]}),tt=[-Be[0],-Be[1]],We=t.geoRotation(tt),it=Ge(Je(We(ve)),Je(We(be)),Je(We(Re)));it.invert=st(it);var Dt=t.geoProjection(it).rotate(tt),Ht=Dt.center;return delete Dt.rotate,Dt.center=function(rr){return arguments.length?Ht(We(rr)):We.invert(Ht())},Dt.clipAngle(90)}function wt(ve,be){var Re=G(1-x(be));return[2/M*ve*Re,M*(1-Re)]}wt.invert=function(ve,be){var Re=(Re=be/M-1)*Re;return[Re>0?ve*G(E/Re)/2:0,O(1-Re)]};function Ie(){return t.geoProjection(wt).scale(95.6464).center([0,30])}function xe(ve){var be=b(ve);function Re(Be,tt){return[Be,(Be?Be/x(Be):1)*(x(tt)*o(Be)-be*o(tt))]}return Re.invert=be?function(Be,tt){Be&&(tt*=x(Be)/Be);var We=o(Be);return[Be,2*a(G(We*We+be*be-tt*tt)-We,be-tt)]}:function(Be,tt){return[Be,O(Be?tt*b(Be)/Be:tt)]},Re}function Ce(){return Ut(xe).scale(249.828).clipAngle(90)}var vt=G(3);function nr(ve,be){return[vt*ve*(2*o(2*be/3)-1)/M,vt*M*x(be/3)]}nr.invert=function(ve,be){var Re=3*O(be/(vt*M));return[M*ve/(vt*(2*o(2*Re/3)-1)),Re]};function ir(){return t.geoProjection(nr).scale(156.19)}function pr(ve){var be=o(ve);function Re(Be,tt){return[Be*be,x(tt)/be]}return Re.invert=function(Be,tt){return[Be/be,O(tt*be)]},Re}function oi(){return Ut(pr).parallel(38.58).scale(195.044)}function di(ve){var be=o(ve);function Re(Be,tt){return[Be*be,(1+be)*b(tt/2)]}return Re.invert=function(Be,tt){return[Be/be,i(tt/(1+be))*2]},Re}function Jr(){return Ut(di).scale(124.75)}function fi(ve,be){var Re=G(8/(3*E));return[Re*ve*(1-n(be)/E),Re*be]}fi.invert=function(ve,be){var Re=G(8/(3*E)),Be=be/Re;return[ve/(Re*(1-n(Be)/E)),Be]};function Hi(){return t.geoProjection(fi).scale(165.664)}function Pn(ve,be){var Re=G(4-3*x(n(be)));return[2/G(6*E)*ve*Re,v(be)*G(2*E/3)*(2-Re)]}Pn.invert=function(ve,be){var Re=2-n(be)/G(2*E/3);return[ve*G(6*E)/(2*Re),v(be)*O((4-Re*Re)/3)]};function wn(){return t.geoProjection(Pn).scale(165.664)}function pn(ve,be){var Re=G(E*(4+E));return[2/Re*ve*(1+G(1-4*be*be/(E*E))),4/Re*be]}pn.invert=function(ve,be){var Re=G(E*(4+E))/2;return[ve*Re/(1+G(1-be*be*(4+E)/(4*E))),be*Re/2]};function Vn(){return t.geoProjection(pn).scale(180.739)}function kn(ve,be){var Re=(2+A)*x(be);be/=2;for(var Be=0,tt=1/0;Be<10&&n(tt)>p;Be++){var We=o(be);be-=tt=(be+x(be)*(We+2)-Re)/(2*We*(1+We))}return[2/G(E*(4+E))*ve*(1+o(be)),2*G(E/(4+E))*x(be)]}kn.invert=function(ve,be){var Re=be*G((4+E)/E)/2,Be=O(Re),tt=o(Be);return[ve/(2/G(E*(4+E))*(1+tt)),O((Be+Re*(tt+2))/(2+A))]};function ea(){return t.geoProjection(kn).scale(180.739)}function ua(ve,be){return[ve*(1+o(be))/G(2+E),2*be/G(2+E)]}ua.invert=function(ve,be){var Re=G(2+E),Be=be*Re/2;return[Re*ve/(1+o(Be)),Be]};function Vt(){return t.geoProjection(ua).scale(173.044)}function _t(ve,be){for(var Re=(1+A)*x(be),Be=0,tt=1/0;Be<10&&n(tt)>p;Be++)be-=tt=(be+x(be)-Re)/(1+o(be));return Re=G(2+E),[ve*(1+o(be))/Re,2*be/Re]}_t.invert=function(ve,be){var Re=1+A,Be=G(Re/2);return[ve*2*Be/(1+o(be*=Be)),O((be+x(be))/Re)]};function tr(){return t.geoProjection(_t).scale(173.044)}var ar=3+2*k;function Er(ve,be){var Re=x(ve/=2),Be=o(ve),tt=G(o(be)),We=o(be/=2),it=x(be)/(We+k*Be*tt),Dt=G(2/(1+it*it)),Ht=G((k*We+(Be+Re)*tt)/(k*We+(Be-Re)*tt));return[ar*(Dt*(Ht-1/Ht)-2*u(Ht)),ar*(Dt*it*(Ht+1/Ht)-2*i(it))]}Er.invert=function(ve,be){if(!(We=Se.invert(ve/1.2,be*1.065)))return null;var Re=We[0],Be=We[1],tt=20,We;ve/=ar,be/=ar;do{var it=Re/2,Dt=Be/2,Ht=x(it),rr=o(it),dr=x(Dt),Sr=o(Dt),Or=o(Be),jr=G(Or),ii=dr/(Sr+k*rr*jr),Li=ii*ii,un=G(2/(1+Li)),sn=k*Sr+(rr+Ht)*jr,In=k*Sr+(rr-Ht)*jr,Kn=sn/In,Aa=G(Kn),fa=Aa-1/Aa,$a=Aa+1/Aa,ko=un*fa-2*u(Aa)-ve,Qa=un*ii*$a-2*i(ii)-be,mo=dr&&_*jr*Ht*Li/dr,Bo=(k*rr*Sr+jr)/(2*(Sr+k*rr*jr)*(Sr+k*rr*jr)*jr),Is=-.5*ii*un*un*un,As=Is*mo,wo=Is*Bo,To=(To=2*Sr+k*jr*(rr-Ht))*To*Aa,dl=(k*rr*Sr*jr+Or)/To,Ul=-(k*Ht*dr)/(jr*To),Lu=fa*As-2*dl/Aa+un*(dl+dl/Kn),au=fa*wo-2*Ul/Aa+un*(Ul+Ul/Kn),$s=ii*$a*As-2*mo/(1+Li)+un*$a*mo+un*ii*(dl-dl/Kn),Ql=ii*$a*wo-2*Bo/(1+Li)+un*$a*Bo+un*ii*(Ul-Ul/Kn),dc=au*$s-Ql*Lu;if(!dc)break;var Al=(Qa*au-ko*Ql)/dc,Sl=(ko*$s-Qa*Lu)/dc;Re-=Al,Be=c(-A,f(A,Be-Sl))}while((n(Al)>p||n(Sl)>p)&&--tt>0);return n(n(Be)-A)<p?[0,Be]:tt&&[Re,Be]};function Zr(){return t.geoProjection(Er).scale(62.5271)}var ri=o(35*T);function $r(ve,be){var Re=b(be/2);return[ve*ri*G(1-Re*Re),(1+ri)*Re]}$r.invert=function(ve,be){var Re=be/(1+ri);return[ve&&ve/(ri*G(1-Re*Re)),2*i(Re)]};function zi(){return t.geoProjection($r).scale(137.152)}function Ji(ve,be){var Re=be/2,Be=o(Re);return[2*ve/M*o(be)*Be*Be,M*b(Re)]}Ji.invert=function(ve,be){var Re=i(be/M),Be=o(Re),tt=2*Re;return[ve*M/2/(o(tt)*Be*Be),tt]};function en(){return t.geoProjection(Ji).scale(135.264)}function cn(ve){var be=1-ve,Re=We(E,0)[0]-We(-E,0)[0],Be=We(0,A)[1]-We(0,-A)[1],tt=G(2*Be/Re);function We(Ht,rr){var dr=o(rr),Sr=x(rr);return[dr/(be+ve*dr)*Ht,be*rr+ve*Sr]}function it(Ht,rr){var dr=We(Ht,rr);return[dr[0]*tt,dr[1]/tt]}function Dt(Ht){return it(0,Ht)[1]}return it.invert=function(Ht,rr){var dr=Wt(Dt,rr),Sr=Ht/tt*(ve+be/o(dr));return[Sr,dr]},it}function yn(){var ve=.5,be=t.geoProjectionMutator(cn),Re=be(ve);return Re.alpha=function(Be){return arguments.length?be(ve=+Be):ve},Re.scale(168.725)}function Mn(ve){return[ve[0]/2,O(b(ve[1]/2*T))*P]}function Ba(ve){return[ve[0]*2,2*i(x(ve[1]*T))*P]}function la(ve){ve==null&&(ve=t.geoOrthographic);var be=ve(),Re=t.geoEquirectangular().scale(P).precision(0).clipAngle(null).translate([0,0]);function Be(We){return be(Mn(We))}be.invert&&(Be.invert=function(We){return Ba(be.invert(We))}),Be.stream=function(We){var it=be.stream(We),Dt=Re.stream({point:function(Ht,rr){it.point(Ht/2,O(b(-rr/2*T))*P)},lineStart:function(){it.lineStart()},lineEnd:function(){it.lineEnd()},polygonStart:function(){it.polygonStart()},polygonEnd:function(){it.polygonEnd()}});return Dt.sphere=it.sphere,Dt};function tt(We){Be[We]=function(){return arguments.length?(be[We].apply(be,arguments),Be):be[We]()}}return Be.rotate=function(We){return arguments.length?(Re.rotate(We),Be):Re.rotate()},Be.center=function(We){return arguments.length?(be.center(Mn(We)),Be):Ba(be.center())},tt(\"angle\"),tt(\"clipAngle\"),tt(\"clipExtent\"),tt(\"fitExtent\"),tt(\"fitHeight\"),tt(\"fitSize\"),tt(\"fitWidth\"),tt(\"scale\"),tt(\"translate\"),tt(\"precision\"),Be.scale(249.5)}function ma(ve,be){var Re=2*E/be,Be=ve*ve;function tt(We,it){var Dt=t.geoAzimuthalEquidistantRaw(We,it),Ht=Dt[0],rr=Dt[1],dr=Ht*Ht+rr*rr;if(dr>Be){var Sr=G(dr),Or=a(rr,Ht),jr=Re*d(Or/Re),ii=Or-jr,Li=ve*o(ii),un=(ve*x(ii)-ii*x(Li))/(A-Li),sn=Wa(ii,un),In=(E-ve)/Fa(sn,Li,E);Ht=Sr;var Kn=50,Aa;do Ht-=Aa=(ve+Fa(sn,Li,Ht)*In-Sr)/(sn(Ht)*In);while(n(Aa)>p&&--Kn>0);rr=ii*x(Ht),Ht<A&&(rr-=un*(Ht-A));var fa=x(jr),$a=o(jr);Dt[0]=Ht*$a-rr*fa,Dt[1]=Ht*fa+rr*$a}return Dt}return tt.invert=function(We,it){var Dt=We*We+it*it;if(Dt>Be){var Ht=G(Dt),rr=a(it,We),dr=Re*d(rr/Re),Sr=rr-dr;We=Ht*o(Sr),it=Ht*x(Sr);for(var Or=We-A,jr=x(We),ii=it/jr,Li=We<A?1/0:0,un=10;;){var sn=ve*x(ii),In=ve*o(ii),Kn=x(In),Aa=A-In,fa=(sn-ii*Kn)/Aa,$a=Wa(ii,fa);if(n(Li)<C||!--un)break;ii-=Li=(ii*jr-fa*Or-it)/(jr-Or*2*(Aa*(In+ii*sn*o(In)-Kn)-sn*(sn-ii*Kn))/(Aa*Aa))}Ht=ve+Fa($a,In,We)*(E-ve)/Fa($a,In,E),rr=dr+ii,We=Ht*o(rr),it=Ht*x(rr)}return t.geoAzimuthalEquidistantRaw.invert(We,it)},tt}function Wa(ve,be){return function(Re){var Be=ve*o(Re);return Re<A&&(Be-=be),G(1+Be*Be)}}function Fa(ve,be,Re){for(var Be=50,tt=(Re-be)/Be,We=ve(be)+ve(Re),it=1,Dt=be;it<Be;++it)We+=2*ve(Dt+=tt);return We*.5*tt}function Wo(){var ve=6,be=30*T,Re=o(be),Be=x(be),tt=t.geoProjectionMutator(ma),We=tt(be,ve),it=We.stream,Dt=.01,Ht=-o(Dt*T),rr=x(Dt*T);return We.radius=function(dr){return arguments.length?(Re=o(be=dr*T),Be=x(be),tt(be,ve)):be*P},We.lobes=function(dr){return arguments.length?tt(be,ve=+dr):ve},We.stream=function(dr){var Sr=We.rotate(),Or=it(dr),jr=(We.rotate([0,0]),it(dr));return We.rotate(Sr),Or.sphere=function(){jr.polygonStart(),jr.lineStart();for(var ii=0,Li=2*E/ve,un=0;ii<ve;++ii,un-=Li)jr.point(a(rr*o(un),Ht)*P,O(rr*x(un))*P),jr.point(a(Be*o(un-Li/2),Re)*P,O(Be*x(un-Li/2))*P);jr.lineEnd(),jr.polygonEnd()},Or},We.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function da(ve,be,Re,Be,tt,We,it,Dt){arguments.length<8&&(Dt=0);function Ht(rr,dr){if(!dr)return[ve*rr/E,0];var Sr=dr*dr,Or=ve+Sr*(be+Sr*(Re+Sr*Be)),jr=dr*(tt-1+Sr*(We-Dt+Sr*it)),ii=(Or*Or+jr*jr)/(2*jr),Li=rr*O(Or/ii)/E;return[ii*x(Li),dr*(1+Sr*Dt)+ii*(1-o(Li))]}return Ht.invert=function(rr,dr){var Sr=E*rr/ve,Or=dr,jr,ii,Li=50;do{var un=Or*Or,sn=ve+un*(be+un*(Re+un*Be)),In=Or*(tt-1+un*(We-Dt+un*it)),Kn=sn*sn+In*In,Aa=2*In,fa=Kn/Aa,$a=fa*fa,ko=O(sn/fa)/E,Qa=Sr*ko,mo=sn*sn,Bo=(2*be+un*(4*Re+un*6*Be))*Or,Is=tt+un*(3*We+un*5*it),As=2*(sn*Bo+In*(Is-1)),wo=2*(Is-1),To=(As*Aa-Kn*wo)/(Aa*Aa),dl=o(Qa),Ul=x(Qa),Lu=fa*dl,au=fa*Ul,$s=Sr/E*(1/G(1-mo/$a))*(Bo*fa-sn*To)/$a,Ql=au-rr,dc=Or*(1+un*Dt)+fa-Lu-dr,Al=To*Ul+Lu*$s,Sl=Lu*ko,X=1+To-(To*dl-au*$s),se=au*ko,Te=Al*se-X*Sl;if(!Te)break;Sr-=jr=(dc*Al-Ql*X)/Te,Or-=ii=(Ql*se-dc*Sl)/Te}while((n(jr)>p||n(ii)>p)&&--Li>0);return[Sr,Or]},Ht}var Wn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ga(){return t.geoProjection(Wn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function jn(){return t.geoProjection(vo).scale(153.93)}var St=da(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Cr(){return t.geoProjection(St).scale(130.945)}function Qr(ve,be){var Re=ve*ve,Be=be*be;return[ve*(1-.162388*Be)*(.87-952426e-9*Re*Re),be*(1+Be/12)]}Qr.invert=function(ve,be){var Re=ve,Be=be,tt=50,We;do{var it=Be*Be;Be-=We=(Be*(1+it/12)-be)/(1+it/4)}while(n(We)>p&&--tt>0);tt=50,ve/=1-.162388*it;do{var Dt=(Dt=Re*Re)*Dt;Re-=We=(Re*(.87-952426e-9*Dt)-ve)/(.87-.00476213*Dt)}while(n(We)>p&&--tt>0);return[Re,Be]};function pi(){return t.geoProjection(Qr).scale(131.747)}var fn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Sn(){return t.geoProjection(fn).scale(131.087)}function En(ve){var be=ve(A,0)[0]-ve(-A,0)[0];function Re(Be,tt){var We=Be>0?-.5:.5,it=ve(Be+We*E,tt);return it[0]-=We*be,it}return ve.invert&&(Re.invert=function(Be,tt){var We=Be>0?-.5:.5,it=ve.invert(Be+We*be,tt),Dt=it[0]-We*E;return Dt<-E?Dt+=2*E:Dt>E&&(Dt-=2*E),it[0]=Dt,it}),Re}function ki(ve,be){var Re=v(ve),Be=v(be),tt=o(be),We=o(ve)*tt,it=x(ve)*tt,Dt=x(Be*be);ve=n(a(it,Dt)),be=O(We),n(ve-A)>p&&(ve%=A);var Ht=_n(ve>E/4?A-ve:ve,be);return ve>E/4&&(Dt=Ht[0],Ht[0]=-Ht[1],Ht[1]=-Dt),Ht[0]*=Re,Ht[1]*=-Be,Ht}ki.invert=function(ve,be){n(ve)>1&&(ve=v(ve)*2-ve),n(be)>1&&(be=v(be)*2-be);var Re=v(ve),Be=v(be),tt=-Re*ve,We=-Be*be,it=We/tt<1,Dt=ya(it?We:tt,it?tt:We),Ht=Dt[0],rr=Dt[1],dr=o(rr);return it&&(Ht=-A-Ht),[Re*(a(x(Ht)*dr,-x(rr))+E),Be*O(o(Ht)*dr)]};function _n(ve,be){if(be===A)return[0,0];var Re=x(be),Be=Re*Re,tt=Be*Be,We=1+tt,it=1+3*tt,Dt=1-tt,Ht=O(1/G(We)),rr=Dt+Be*We*Ht,dr=(1-Re)/rr,Sr=G(dr),Or=dr*We,jr=G(Or),ii=Sr*Dt,Li,un;if(ve===0)return[0,-(ii+Be*jr)];var sn=o(be),In=1/sn,Kn=2*Re*sn,Aa=(-3*Be+Ht*it)*Kn,fa=(-rr*sn-(1-Re)*Aa)/(rr*rr),$a=.5*fa/Sr,ko=Dt*$a-2*Be*Sr*Kn,Qa=Be*We*fa+dr*it*Kn,mo=-In*Kn,Bo=-In*Qa,Is=-2*In*ko,As=4*ve/E,wo;if(ve>.222*E||be<E/4&&ve>.175*E){if(Li=(ii+Be*G(Or*(1+tt)-ii*ii))/(1+tt),ve>E/4)return[Li,Li];var To=Li,dl=.5*Li;Li=.5*(dl+To),un=50;do{var Ul=G(Or-Li*Li),Lu=Li*(Is+mo*Ul)+Bo*O(Li/jr)-As;if(!Lu)break;Lu<0?dl=Li:To=Li,Li=.5*(dl+To)}while(n(To-dl)>p&&--un>0)}else{Li=p,un=25;do{var au=Li*Li,$s=G(Or-au),Ql=Is+mo*$s,dc=Li*Ql+Bo*O(Li/jr)-As,Al=Ql+(Bo-mo*au)/$s;Li-=wo=$s?dc/Al:0}while(n(wo)>p&&--un>0)}return[Li,-ii-Be*G(Or-Li*Li)]}function ya(ve,be){for(var Re=0,Be=1,tt=.5,We=50;;){var it=tt*tt,Dt=G(tt),Ht=O(1/G(1+it)),rr=1-it+tt*(1+it)*Ht,dr=(1-Dt)/rr,Sr=G(dr),Or=dr*(1+it),jr=Sr*(1-it),ii=Or-ve*ve,Li=G(ii),un=be+jr+tt*Li;if(n(Be-Re)<C||--We===0||un===0)break;un>0?Re=tt:Be=tt,tt=.5*(Re+Be)}if(!We)return null;var sn=O(Dt),In=o(sn),Kn=1/In,Aa=2*Dt*In,fa=(-3*tt+Ht*(1+3*it))*Aa,$a=(-rr*In-(1-Dt)*fa)/(rr*rr),ko=.5*$a/Sr,Qa=(1-it)*ko-2*tt*Sr*Aa,mo=-2*Kn*Qa,Bo=-Kn*Aa,Is=-Kn*(tt*(1+it)*$a+dr*(1+3*it)*Aa);return[E/4*(ve*(mo+Bo*Li)+Is*O(ve/G(Or))),sn]}function Jn(){return t.geoProjection(En(ki)).scale(239.75)}function Ma(ve,be,Re){var Be,tt,We;return ve?(Be=_o(ve,Re),be?(tt=_o(be,1-Re),We=tt[1]*tt[1]+Re*Be[0]*Be[0]*tt[0]*tt[0],[[Be[0]*tt[2]/We,Be[1]*Be[2]*tt[0]*tt[1]/We],[Be[1]*tt[1]/We,-Be[0]*Be[2]*tt[0]*tt[2]/We],[Be[2]*tt[1]*tt[2]/We,-Re*Be[0]*Be[1]*tt[0]/We]]):[[Be[0],0],[Be[1],0],[Be[2],0]]):(tt=_o(be,1-Re),[[0,tt[0]/tt[1]],[1/tt[1],0],[tt[2]/tt[1],0]])}function _o(ve,be){var Re,Be,tt,We,it;if(be<p)return We=x(ve),Be=o(ve),Re=be*(ve-We*Be)/4,[We-Re*Be,Be+Re*We,1-be*We*We/2,ve-Re];if(be>=1-p)return Re=(1-be)/4,Be=N(ve),We=Z(ve),tt=1/Be,it=Be*H(ve),[We+Re*(it-ve)/(Be*Be),tt-Re*We*tt*(it-ve),tt+Re*We*tt*(it+ve),2*i(s(ve))-A+Re*(it-ve)/Be];var Dt=[1,0,0,0,0,0,0,0,0],Ht=[G(be),0,0,0,0,0,0,0,0],rr=0;for(Be=G(1-be),it=1;n(Ht[rr]/Dt[rr])>p&&rr<8;)Re=Dt[rr++],Ht[rr]=(Re-Be)/2,Dt[rr]=(Re+Be)/2,Be=G(Re*Be),it*=2;tt=it*Dt[rr]*ve;do We=Ht[rr]*x(Be=tt)/Dt[rr],tt=(O(We)+tt)/2;while(--rr);return[x(tt),We=o(tt),We/o(tt-Be),tt]}function No(ve,be,Re){var Be=n(ve),tt=n(be),We=H(tt);if(Be){var it=1/x(Be),Dt=1/(b(Be)*b(Be)),Ht=-(Dt+Re*(We*We*it*it)-1+Re),rr=(Re-1)*Dt,dr=(-Ht+G(Ht*Ht-4*rr))/2;return[po(i(1/G(dr)),Re)*v(ve),po(i(G((dr/Dt-1)/Re)),1-Re)*v(be)]}return[0,po(i(We),1-Re)*v(be)]}function po(ve,be){if(!be)return ve;if(be===1)return u(b(ve/2+L));for(var Re=1,Be=G(1-be),tt=G(be),We=0;n(tt)>p;We++){if(ve%E){var it=i(Be*b(ve)/Re);it<0&&(it+=E),ve+=it+~~(ve/E)*E}else ve+=ve;tt=(Re+Be)/2,Be=G(Re*Be),tt=((Re=tt)-Be)/2}return ve/(h(2,We)*Re)}function Lo(ve,be){var Re=(k-1)/(k+1),Be=G(1-Re*Re),tt=po(A,Be*Be),We=-1,it=u(b(E/4+n(be)/2)),Dt=s(We*it)/G(Re),Ht=Co(Dt*o(We*ve),Dt*x(We*ve)),rr=No(Ht[0],Ht[1],Be*Be);return[-rr[1],(be>=0?1:-1)*(.5*tt-rr[0])]}function Co(ve,be){var Re=ve*ve,Be=be+1,tt=1-Re-be*be;return[.5*((ve>=0?A:-A)-a(tt,2*ve)),-.25*u(tt*tt+4*Re)+.5*u(Be*Be+Re)]}function Fs(ve,be){var Re=be[0]*be[0]+be[1]*be[1];return[(ve[0]*be[0]+ve[1]*be[1])/Re,(ve[1]*be[0]-ve[0]*be[1])/Re]}Lo.invert=function(ve,be){var Re=(k-1)/(k+1),Be=G(1-Re*Re),tt=po(A,Be*Be),We=-1,it=Ma(.5*tt-be,-ve,Be*Be),Dt=Fs(it[0],it[1]),Ht=a(Dt[1],Dt[0])/We;return[Ht,2*i(s(.5/We*u(Re*Dt[0]*Dt[0]+Re*Dt[1]*Dt[1])))-A]};function zs(){return t.geoProjection(En(Lo)).scale(151.496)}function ul(ve){var be=x(ve),Re=o(ve),Be=cl(ve);Be.invert=cl(-ve);function tt(We,it){var Dt=Be(We,it);We=Dt[0],it=Dt[1];var Ht=x(it),rr=o(it),dr=o(We),Sr=V(be*Ht+Re*rr*dr),Or=x(Sr),jr=n(Or)>p?Sr/Or:1;return[jr*Re*x(We),(n(We)>A?jr:-jr)*(be*rr-Re*Ht*dr)]}return tt.invert=function(We,it){var Dt=G(We*We+it*it),Ht=-x(Dt),rr=o(Dt),dr=Dt*rr,Sr=-it*Ht,Or=Dt*be,jr=G(dr*dr+Sr*Sr-Or*Or),ii=a(dr*Or+Sr*jr,Sr*Or-dr*jr),Li=(Dt>A?-1:1)*a(We*Ht,Dt*o(ii)*rr+it*x(ii)*Ht);return Be.invert(Li,ii)},tt}function cl(ve){var be=x(ve),Re=o(ve);return function(Be,tt){var We=o(tt),it=o(Be)*We,Dt=x(Be)*We,Ht=x(tt);return[a(Dt,it*Re-Ht*be),O(Ht*Re+it*be)]}}function zl(){var ve=0,be=t.geoProjectionMutator(ul),Re=be(ve),Be=Re.rotate,tt=Re.stream,We=t.geoCircle();return Re.parallel=function(it){if(!arguments.length)return ve*P;var Dt=Re.rotate();return be(ve=it*T).rotate(Dt)},Re.rotate=function(it){return arguments.length?(Be.call(Re,[it[0],it[1]-ve*P]),We.center([-it[0],-it[1]]),Re):(it=Be.call(Re),it[1]+=ve*P,it)},Re.stream=function(it){return it=tt(it),it.sphere=function(){it.polygonStart();var Dt=.01,Ht=We.radius(90-Dt)().coordinates[0],rr=Ht.length-1,dr=-1,Sr;for(it.lineStart();++dr<rr;)it.point((Sr=Ht[dr])[0],Sr[1]);for(it.lineEnd(),Ht=We.radius(90+Dt)().coordinates[0],rr=Ht.length-1,it.lineStart();--dr>=0;)it.point((Sr=Ht[dr])[0],Sr[1]);it.lineEnd(),it.polygonEnd()},it},Re.scale(79.4187).parallel(45).clipAngle(180-.001)}var cs=3,nl=O(1-1/cs)*P,Ss=pr(0);function fl(ve){var be=nl*T,Re=wt(E,be)[0]-wt(-E,be)[0],Be=Ss(0,be)[1],tt=wt(0,be)[1],We=M-tt,it=g/ve,Dt=4/g,Ht=Be+We*We*4/g;function rr(dr,Sr){var Or,jr=n(Sr);if(jr>be){var ii=f(ve-1,c(0,l((dr+E)/it)));dr+=E*(ve-1)/ve-ii*it,Or=wt(dr,jr),Or[0]=Or[0]*g/Re-g*(ve-1)/(2*ve)+ii*g/ve,Or[1]=Be+(Or[1]-tt)*4*We/g,Sr<0&&(Or[1]=-Or[1])}else Or=Ss(dr,Sr);return Or[0]*=Dt,Or[1]/=Ht,Or}return rr.invert=function(dr,Sr){dr/=Dt,Sr*=Ht;var Or=n(Sr);if(Or>Be){var jr=f(ve-1,c(0,l((dr+E)/it)));dr=(dr+E*(ve-1)/ve-jr*it)*Re/g;var ii=wt.invert(dr,.25*(Or-Be)*g/We+tt);return ii[0]-=E*(ve-1)/ve-jr*it,Sr<0&&(ii[1]=-ii[1]),ii}return Ss.invert(dr,Sr)},rr}function Js(ve,be){return[ve,be&1?90-p:nl]}function Os(ve,be){return[ve,be&1?-90+p:-nl]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function us(ve){var be=[].concat(r.range(-180,180+ve/2,ve).map(Js),r.range(180,-180-ve/2,-ve).map(Os));return{type:\"Polygon\",coordinates:[ve===180?be.map(Io):be]}}function Zl(){var ve=4,be=t.geoProjectionMutator(fl),Re=be(ve),Be=Re.stream;return Re.lobes=function(tt){return arguments.length?be(ve=+tt):ve},Re.stream=function(tt){var We=Re.rotate(),it=Be(tt),Dt=(Re.rotate([0,0]),Be(tt));return Re.rotate(We),it.sphere=function(){t.geoStream(us(180/ve),Dt)},it},Re.scale(239.75)}function Su(ve){var be=1+ve,Re=x(1/be),Be=O(Re),tt=2*G(E/(We=E+4*Be*be)),We,it=.5*tt*(be+G(ve*(2+ve))),Dt=ve*ve,Ht=be*be;function rr(dr,Sr){var Or=1-x(Sr),jr,ii;if(Or&&Or<2){var Li=A-Sr,un=25,sn;do{var In=x(Li),Kn=o(Li),Aa=Be+a(In,be-Kn),fa=1+Ht-2*be*Kn;Li-=sn=(Li-Dt*Be-be*In+fa*Aa-.5*Or*We)/(2*be*In*Aa)}while(n(sn)>C&&--un>0);jr=tt*G(fa),ii=dr*Aa/E}else jr=tt*(ve+Or),ii=dr*Be/E;return[jr*x(ii),it-jr*o(ii)]}return rr.invert=function(dr,Sr){var Or=dr*dr+(Sr-=it)*Sr,jr=(1+Ht-Or/(tt*tt))/(2*be),ii=V(jr),Li=x(ii),un=Be+a(Li,be-jr);return[O(dr/G(Or))*E/un,O(1-2*(ii-Dt*Be-be*Li+(1+Ht-2*be*jr)*un)/We)]},rr}function nc(){var ve=1,be=t.geoProjectionMutator(Su),Re=be(ve);return Re.ratio=function(Be){return arguments.length?be(ve=+Be):ve},Re.scale(167.774).center([0,18.67])}var ws=.7109889596207567,Fn=.0528035274542;function _a(ve,be){return be>-ws?(ve=sr(ve,be),ve[1]+=Fn,ve):Ft(ve,be)}_a.invert=function(ve,be){return be>-ws?sr.invert(ve,be-Fn):Ft.invert(ve,be)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ol(ve,be){return n(be)>ws?(ve=sr(ve,be),ve[1]-=be>0?Fn:-Fn,ve):Ft(ve,be)}Ol.invert=function(ve,be){return n(be)>ws?sr.invert(ve,be+(be>0?Fn:-Fn)):Ft.invert(ve,be)};function xo(){return t.geoProjection(Ol).scale(152.63)}function Yl(ve,be,Re,Be){var tt=G(4*E/(2*Re+(1+ve-be/2)*x(2*Re)+(ve+be)/2*x(4*Re)+be/2*x(6*Re))),We=G(Be*x(Re)*G((1+ve*o(2*Re)+be*o(4*Re))/(1+ve+be))),it=Re*Ht(1);function Dt(Sr){return G(1+ve*o(2*Sr)+be*o(4*Sr))}function Ht(Sr){var Or=Sr*Re;return(2*Or+(1+ve-be/2)*x(2*Or)+(ve+be)/2*x(4*Or)+be/2*x(6*Or))/Re}function rr(Sr){return Dt(Sr)*x(Sr)}var dr=function(Sr,Or){var jr=Re*Wt(Ht,it*x(Or)/Re,Or/E);isNaN(jr)&&(jr=Re*v(Or));var ii=tt*Dt(jr);return[ii*We*Sr/E*o(jr),ii/We*x(jr)]};return dr.invert=function(Sr,Or){var jr=Wt(rr,Or*We/tt);return[Sr*E/(o(jr)*tt*We*Dt(jr)),O(Re*Ht(jr/Re)/it)]},Re===0&&(tt=G(Be/E),dr=function(Sr,Or){return[Sr*tt,x(Or)/tt]},dr.invert=function(Sr,Or){return[Sr/tt,O(Or*tt)]}),dr}function Us(){var ve=1,be=0,Re=45*T,Be=2,tt=t.geoProjectionMutator(Yl),We=tt(ve,be,Re,Be);return We.a=function(it){return arguments.length?tt(ve=+it,be,Re,Be):ve},We.b=function(it){return arguments.length?tt(ve,be=+it,Re,Be):be},We.psiMax=function(it){return arguments.length?tt(ve,be,Re=+it*T,Be):Re*P},We.ratio=function(it){return arguments.length?tt(ve,be,Re,Be=+it):Be},We.scale(180.739)}function Hl(ve,be,Re,Be,tt,We,it,Dt,Ht,rr,dr){if(dr.nanEncountered)return NaN;var Sr,Or,jr,ii,Li,un,sn,In,Kn,Aa;if(Sr=Re-be,Or=ve(be+Sr*.25),jr=ve(Re-Sr*.25),isNaN(Or)){dr.nanEncountered=!0;return}if(isNaN(jr)){dr.nanEncountered=!0;return}return ii=Sr*(Be+4*Or+tt)/12,Li=Sr*(tt+4*jr+We)/12,un=ii+Li,Aa=(un-it)/15,rr>Ht?(dr.maxDepthCount++,un+Aa):Math.abs(Aa)<Dt?un+Aa:(sn=be+Sr*.5,In=Hl(ve,be,sn,Be,Or,tt,ii,Dt*.5,Ht,rr+1,dr),isNaN(In)?(dr.nanEncountered=!0,NaN):(Kn=Hl(ve,sn,Re,tt,jr,We,Li,Dt*.5,Ht,rr+1,dr),isNaN(Kn)?(dr.nanEncountered=!0,NaN):In+Kn))}function ac(ve,be,Re,Be,tt){var We={maxDepthCount:0,nanEncountered:!1};Be===void 0&&(Be=1e-8),tt===void 0&&(tt=20);var it=ve(be),Dt=ve(.5*(be+Re)),Ht=ve(Re),rr=(it+4*Dt+Ht)*(Re-be)/6,dr=Hl(ve,be,Re,it,Dt,Ht,rr,Be,tt,1,We);return dr}function aa(ve,be,Re){function Be(jr){return ve+(1-ve)*h(1-h(jr,be),1/be)}function tt(jr){return ac(Be,0,jr,1e-4)}for(var We=1/tt(1),it=1e3,Dt=(1+1e-8)*We,Ht=[],rr=0;rr<=it;rr++)Ht.push(tt(rr/it)*Dt);function dr(jr){var ii=0,Li=it,un=it>>1;do Ht[un]>jr?Li=un:ii=un,un=ii+Li>>1;while(un>ii);var sn=Ht[un+1]-Ht[un];return sn&&(sn=(jr-Ht[un+1])/sn),(un+1+sn)/it}var Sr=2*dr(1)/E*We/Re,Or=function(jr,ii){var Li=dr(n(x(ii))),un=Be(Li)*jr;return Li/=Sr,[un,ii>=0?Li:-Li]};return Or.invert=function(jr,ii){var Li;return ii*=Sr,n(ii)<1&&(Li=v(ii)*O(tt(n(ii))*We)),[jr/Be(n(ii)),Li]},Or}function Oo(){var ve=0,be=2.5,Re=1.183136,Be=t.geoProjectionMutator(aa),tt=Be(ve,be,Re);return tt.alpha=function(We){return arguments.length?Be(ve=+We,be,Re):ve},tt.k=function(We){return arguments.length?Be(ve,be=+We,Re):be},tt.gamma=function(We){return arguments.length?Be(ve,be,Re=+We):Re},tt.scale(152.63)}function qo(ve,be){return n(ve[0]-be[0])<p&&n(ve[1]-be[1])<p}function ql(ve,be){for(var Re=-1,Be=ve.length,tt=ve[0],We,it,Dt,Ht=[];++Re<Be;){We=ve[Re],it=(We[0]-tt[0])/be,Dt=(We[1]-tt[1])/be;for(var rr=0;rr<be;++rr)Ht.push([tt[0]+rr*it,tt[1]+rr*Dt]);tt=We}return Ht.push(We),Ht}function Pc(ve){var be=[],Re,Be,tt,We,it,Dt,Ht,rr=ve[0].length;for(Ht=0;Ht<rr;++Ht)Re=ve[0][Ht],Be=Re[0][0],tt=Re[0][1],We=Re[1][1],it=Re[2][0],Dt=Re[2][1],be.push(ql([[Be+p,tt+p],[Be+p,We-p],[it-p,We-p],[it-p,Dt+p]],30));for(Ht=ve[1].length-1;Ht>=0;--Ht)Re=ve[1][Ht],Be=Re[0][0],tt=Re[0][1],We=Re[1][1],it=Re[2][0],Dt=Re[2][1],be.push(ql([[it-p,Dt-p],[it-p,We+p],[Be+p,We+p],[Be+p,tt-p]],30));return{type:\"Polygon\",coordinates:[r.merge(be)]}}function Do(ve,be,Re){var Be,tt;function We(Ht,rr){for(var dr=rr<0?-1:1,Sr=be[+(rr<0)],Or=0,jr=Sr.length-1;Or<jr&&Ht>Sr[Or][2][0];++Or);var ii=ve(Ht-Sr[Or][1][0],rr);return ii[0]+=ve(Sr[Or][1][0],dr*rr>dr*Sr[Or][0][1]?Sr[Or][0][1]:rr)[0],ii}Re?We.invert=Re(We):ve.invert&&(We.invert=function(Ht,rr){for(var dr=tt[+(rr<0)],Sr=be[+(rr<0)],Or=0,jr=dr.length;Or<jr;++Or){var ii=dr[Or];if(ii[0][0]<=Ht&&Ht<ii[1][0]&&ii[0][1]<=rr&&rr<ii[1][1]){var Li=ve.invert(Ht-ve(Sr[Or][1][0],0)[0],rr);return Li[0]+=Sr[Or][1][0],qo(We(Li[0],Li[1]),[Ht,rr])?Li:null}}});var it=t.geoProjection(We),Dt=it.stream;return it.stream=function(Ht){var rr=it.rotate(),dr=Dt(Ht),Sr=(it.rotate([0,0]),Dt(Ht));return it.rotate(rr),dr.sphere=function(){t.geoStream(Be,Sr)},dr},it.lobes=function(Ht){return arguments.length?(Be=Pc(Ht),be=Ht.map(function(rr){return rr.map(function(dr){return[[dr[0][0]*T,dr[0][1]*T],[dr[1][0]*T,dr[1][1]*T],[dr[2][0]*T,dr[2][1]*T]]})}),tt=be.map(function(rr){return rr.map(function(dr){var Sr=ve(dr[0][0],dr[0][1])[0],Or=ve(dr[2][0],dr[2][1])[0],jr=ve(dr[1][0],dr[0][1])[1],ii=ve(dr[1][0],dr[1][1])[1],Li;return jr>ii&&(Li=jr,jr=ii,ii=Li),[[Sr,jr],[Or,ii]]})}),it):be.map(function(rr){return rr.map(function(dr){return[[dr[0][0]*P,dr[0][1]*P],[dr[1][0]*P,dr[1][1]*P],[dr[2][0]*P,dr[2][1]*P]]})})},be!=null&&it.lobes(be),it}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uf(){return Do(Et,rf).scale(160.857)}var ml=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(Ol,ml).scale(152.63)}var Kl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function qs(){return Do(sr,Kl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(sr,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,st).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Nh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function kf(){return Do(Ft,Nh).scale(152.63).rotate([-20,0])}function fs(ve,be){return[3/g*ve*G(E*E/3-be*be),be]}fs.invert=function(ve,be){return[g/3*ve/G(E*E/3-be*be),be]};function nf(){return t.geoProjection(fs).scale(158.837)}function Vf(ve){function be(Re,Be){if(n(n(Be)-A)<p)return[0,Be<0?-2:2];var tt=x(Be),We=h((1+tt)/(1-tt),ve/2),it=.5*(We+1/We)+o(Re*=ve);return[2*x(Re)/it,(We-1/We)/it]}return be.invert=function(Re,Be){var tt=n(Be);if(n(tt-2)<p)return Re?null:[0,v(Be)*A];if(tt>2)return null;Re/=2,Be/=2;var We=Re*Re,it=Be*Be,Dt=2*Be/(1+We+it);return Dt=h((1+Dt)/(1-Dt),1/ve),[a(2*Re,1-We-it)/ve,O((Dt-1)/(Dt+1))]},be}function Jl(){var ve=.5,be=t.geoProjectionMutator(Vf),Re=be(ve);return Re.spacing=function(Be){return arguments.length?be(ve=+Be):ve},Re.scale(124.75)}var hl=E/k;function lc(ve,be){return[ve*(1+G(o(be)))/2,be/(o(be/2)*o(ve/6))]}lc.invert=function(ve,be){var Re=n(ve),Be=n(be),tt=p,We=A;Be<hl?We*=Be/hl:tt+=6*V(hl/Be);for(var it=0;it<25;it++){var Dt=x(We),Ht=G(o(We)),rr=x(We/2),dr=o(We/2),Sr=x(tt/6),Or=o(tt/6),jr=.5*tt*(1+Ht)-Re,ii=We/(dr*Or)-Be,Li=Ht?-.25*tt*Dt/Ht:0,un=.5*(1+Ht),sn=(1+.5*We*rr/dr)/(dr*Or),In=We/dr*(Sr/6)/(Or*Or),Kn=Li*In-sn*un,Aa=(jr*In-ii*un)/Kn,fa=(ii*Li-jr*sn)/Kn;if(We-=Aa,tt-=fa,n(Aa)<p&&n(fa)<p)break}return[ve<0?-tt:tt,be<0?-We:We]};function Fu(){return t.geoProjection(lc).scale(97.2672)}function Cs(ve,be){var Re=ve*ve,Be=be*be;return[ve*(.975534+Be*(-.119161+Re*-.0143059+Be*-.0547009)),be*(1.00384+Re*(.0802894+Be*-.02855+Re*199025e-9)+Be*(.0998909+Be*-.0491032))]}Cs.invert=function(ve,be){var Re=v(ve)*E,Be=be/2,tt=50;do{var We=Re*Re,it=Be*Be,Dt=Re*Be,Ht=Re*(.975534+it*(-.119161+We*-.0143059+it*-.0547009))-ve,rr=Be*(1.00384+We*(.0802894+it*-.02855+We*199025e-9)+it*(.0998909+it*-.0491032))-be,dr=.975534-it*(.119161+3*We*.0143059+it*.0547009),Sr=-Dt*(2*.119161+4*.0547009*it+2*.0143059*We),Or=Dt*(2*.0802894+4*199025e-9*We+2*-.02855*it),jr=1.00384+We*(.0802894+199025e-9*We)+it*(3*(.0998909-.02855*We)-5*.0491032*it),ii=Sr*Or-jr*dr,Li=(rr*Sr-Ht*jr)/ii,un=(Ht*Or-rr*dr)/ii;Re-=Li,Be-=un}while((n(Li)>p||n(un)>p)&&--tt>0);return tt&&[Re,Be]};function js(){return t.geoProjection(Cs).scale(139.98)}function Go(ve,be){return[x(ve)/o(be),b(be)*o(ve)]}Go.invert=function(ve,be){var Re=ve*ve,Be=be*be,tt=Be+1,We=Re+tt,it=ve?_*G((We-G(We*We-4*Re))/Re):1/G(tt);return[O(ve*it),v(be)*V(it)]};function gs(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var be=o(ve),Re=b(L+ve/2);function Be(tt,We){var it=We-ve,Dt=n(it)<p?tt*be:n(Dt=L+We/2)<p||n(n(Dt)-A)<p?0:tt*it/u(b(Dt)/Re);return[Dt,it]}return Be.invert=function(tt,We){var it,Dt=We+ve;return[n(We)<p?tt/be:n(it=L+Dt/2)<p||n(n(it)-A)<p?0:tt*u(b(it)/Re)/We,Dt]},Be}function bl(){return Ut(uc).parallel(40).scale(158.837)}function Gu(ve,be){return[ve,1.25*u(b(L+.4*be))]}Gu.invert=function(ve,be){return[ve,2.5*i(s(.8*be))-.625*E]};function Bs(){return t.geoProjection(Gu).scale(108.318)}function ad(ve){var be=ve.length-1;function Re(Be,tt){for(var We=o(tt),it=2/(1+We*o(Be)),Dt=it*We*x(Be),Ht=it*x(tt),rr=be,dr=ve[rr],Sr=dr[0],Or=dr[1],jr;--rr>=0;)dr=ve[rr],Sr=dr[0]+Dt*(jr=Sr)-Ht*Or,Or=dr[1]+Dt*Or+Ht*jr;return Sr=Dt*(jr=Sr)-Ht*Or,Or=Dt*Or+Ht*jr,[Sr,Or]}return Re.invert=function(Be,tt){var We=20,it=Be,Dt=tt;do{for(var Ht=be,rr=ve[Ht],dr=rr[0],Sr=rr[1],Or=0,jr=0,ii;--Ht>=0;)rr=ve[Ht],Or=dr+it*(ii=Or)-Dt*jr,jr=Sr+it*jr+Dt*ii,dr=rr[0]+it*(ii=dr)-Dt*Sr,Sr=rr[1]+it*Sr+Dt*ii;Or=dr+it*(ii=Or)-Dt*jr,jr=Sr+it*jr+Dt*ii,dr=it*(ii=dr)-Dt*Sr-Be,Sr=it*Sr+Dt*ii-tt;var Li=Or*Or+jr*jr,un,sn;it-=un=(dr*Or+Sr*jr)/Li,Dt-=sn=(Sr*Or-dr*jr)/Li}while(n(un)+n(sn)>p*p&&--We>0);if(We){var In=G(it*it+Dt*Dt),Kn=2*i(In*.5),Aa=x(Kn);return[a(it*Aa,In*o(Kn)),In?O(Dt*Aa/In):0]}},Re}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],od=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Yo=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function wl(){return Bl(od,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Gf(){return Bl(Yo,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function mf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,be){var Re=t.geoProjection(ad(ve)).rotate(be).clipAngle(90),Be=t.geoRotation(be),tt=Re.center;return delete Re.rotate,Re.center=function(We){return arguments.length?tt(Be(We)):Be.invert(tt())},Re}var _h=G(6),Qf=G(7);function yf(ve,be){var Re=O(7*x(be)/(3*_h));return[_h*ve*(2*o(2*Re/3)-1)/Qf,9*x(Re/3)/Qf]}yf.invert=function(ve,be){var Re=3*O(be*Qf/9);return[ve*Qf/(_h*(2*o(2*Re/3)-1)),O(x(Re)*3*_h/7)]};function Yc(){return t.geoProjection(yf).scale(164.859)}function eh(ve,be){for(var Re=(1+_)*x(be),Be=be,tt=0,We;tt<25&&(Be-=We=(x(Be/2)+x(Be)-Re)/(.5*o(Be/2)+o(Be)),!(n(We)<p));tt++);return[ve*(1+2*o(Be)/o(Be/2))/(3*k),2*G(3)*x(Be/2)/G(2+k)]}eh.invert=function(ve,be){var Re=be*G(2+k)/(2*G(3)),Be=2*O(Re);return[3*k*ve/(1+2*o(Be)/o(Be/2)),O((Re+x(Be))/(1+_))]};function th(){return t.geoProjection(eh).scale(188.209)}function ju(ve,be){for(var Re=G(6/(4+E)),Be=(1+E/4)*x(be),tt=be/2,We=0,it;We<25&&(tt-=it=(tt/2+x(tt)-Be)/(.5+o(tt)),!(n(it)<p));We++);return[Re*(.5+o(tt))*ve/1.5,Re*tt]}ju.invert=function(ve,be){var Re=G(6/(4+E)),Be=be/Re;return n(n(Be)-A)<p&&(Be=Be<0?-A:A),[1.5*ve/(Re*(.5+o(Be))),O((Be/2+x(Be))/(1+E/4))]};function Hf(){return t.geoProjection(ju).scale(166.518)}function cc(ve,be){var Re=be*be,Be=Re*Re,tt=Re*Be;return[ve*(.84719-.13063*Re+tt*tt*(-.04515+.05494*Re-.02326*Be+.00331*tt)),be*(1.01183+Be*Be*(-.02625+.01926*Re-.00396*Be))]}cc.invert=function(ve,be){var Re=be,Be=25,tt,We,it,Dt;do We=Re*Re,it=We*We,Re-=tt=(Re*(1.01183+it*it*(-.02625+.01926*We-.00396*it))-be)/(1.01183+it*it*(9*-.02625+11*.01926*We+13*-.00396*it));while(n(tt)>C&&--Be>0);return We=Re*Re,it=We*We,Dt=We*it,[ve/(.84719-.13063*We+Dt*Dt*(-.04515+.05494*We-.02326*it+.00331*Dt)),Re]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,be){return[ve*(1+o(be))/2,2*(be-b(be/2))]}Nl.invert=function(ve,be){for(var Re=be/2,Be=0,tt=1/0;Be<10&&n(tt)>p;++Be){var We=o(be/2);be-=tt=(be-b(be/2)-Re)/(1-.5/(We*We))}return[2*ve/(1+o(be)),be]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ms(){return Do(Ze(1/0),Rc).rotate([20,0]).scale(152.63)}function jf(ve,be){var Re=x(be),Be=o(be),tt=v(ve);if(ve===0||n(be)===A)return[0,be];if(be===0)return[ve,0];if(n(ve)===A)return[ve*Be,A*Re];var We=E/(2*ve)-2*ve/E,it=2*be/E,Dt=(1-it*it)/(Re-it),Ht=We*We,rr=Dt*Dt,dr=1+Ht/rr,Sr=1+rr/Ht,Or=(We*Re/Dt-We/2)/dr,jr=(rr*Re/Ht+Dt/2)/Sr,ii=Or*Or+Be*Be/dr,Li=jr*jr-(rr*Re*Re/Ht+Dt*Re-1)/Sr;return[A*(Or+G(ii)*tt),A*(jr+G(Li<0?0:Li)*v(-be*We)*tt)]}jf.invert=function(ve,be){ve/=A,be/=A;var Re=ve*ve,Be=be*be,tt=Re+Be,We=E*E;return[ve?(tt-1+G((1-tt)*(1-tt)+4*Re))/(2*ve)*A:0,Wt(function(it){return tt*(E*x(it)-2*it)*E+4*it*it*(be-x(it))+2*E*it-We*be},0)]};function Uh(){return t.geoProjection(jf).scale(127.267)}var rh=1.0148,sf=.23185,xh=-.14499,Mu=.02406,ih=rh,Ws=5*sf,Eu=7*xh,Dc=9*Mu,ks=1.790857183;function bc(ve,be){var Re=be*be;return[ve,be*(rh+Re*Re*(sf+Re*(xh+Mu*Re)))]}bc.invert=function(ve,be){be>ks?be=ks:be<-ks&&(be=-ks);var Re=be,Be;do{var tt=Re*Re;Re-=Be=(Re*(rh+tt*tt*(sf+tt*(xh+Mu*tt)))-be)/(ih+tt*tt*(Ws+tt*(Eu+Dc*tt)))}while(n(Be)>p);return[ve,Re]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,be){if(n(be)<p)return[ve,0];var Re=b(be),Be=ve*x(be);return[x(Be)/Re,be+(1-o(Be))/Re]}_u.invert=function(ve,be){if(n(be)<p)return[ve,0];var Re=ve*ve+be*be,Be=be*.5,tt=10,We;do{var it=b(Be),Dt=1/o(Be),Ht=Re-2*be*Be+Be*Be;Be-=We=(it*Ht+2*(Be-be))/(2+Ht*Dt*Dt+2*(Be-be)*it)}while(n(We)>p&&--tt>0);return it=b(Be),[(n(be)<n(Be+1/it)?O(ve*it):v(be)*v(ve)*(V(n(ve*it))+A))/x(Be),Be]};function al(){return t.geoProjection(_u).scale(103.74)}function nh(ve,be){var Re=Fc(ve[1],ve[0]),Be=Fc(be[1],be[0]),tt=bd(Re,Be),We=wc(Re)/wc(Be);return zu([1,0,ve[0][0],0,1,ve[0][1]],zu([We,0,0,0,We,0],zu([o(tt),x(tt),0,-x(tt),o(tt),0],[1,0,-be[0][0],0,1,-be[0][1]])))}function bh(ve){var be=1/(ve[0]*ve[4]-ve[1]*ve[3]);return[be*ve[4],-be*ve[1],be*(ve[1]*ve[5]-ve[2]*ve[4]),-be*ve[3],be*ve[0],be*(ve[2]*ve[3]-ve[0]*ve[5])]}function zu(ve,be){return[ve[0]*be[0]+ve[1]*be[3],ve[0]*be[1]+ve[1]*be[4],ve[0]*be[2]+ve[1]*be[5]+ve[2],ve[3]*be[0]+ve[4]*be[3],ve[3]*be[1]+ve[4]*be[4],ve[3]*be[2]+ve[4]*be[5]+ve[5]]}function Fc(ve,be){return[ve[0]-be[0],ve[1]-be[1]]}function wc(ve){return G(ve[0]*ve[0]+ve[1]*ve[1])}function bd(ve,be){return a(ve[0]*be[1]-ve[1]*be[0],ve[0]*be[0]+ve[1]*be[1])}function _f(ve,be,Re){Be(ve,{transform:null});function Be(rr,dr){if(rr.edges=jl(rr.face),dr.face){var Sr=rr.shared=xf(rr.face,dr.face),Or=nh(Sr.map(dr.project),Sr.map(rr.project));rr.transform=dr.transform?zu(dr.transform,Or):Or;for(var jr=dr.edges,ii=0,Li=jr.length;ii<Li;++ii)Ou(Sr[0],jr[ii][1])&&Ou(Sr[1],jr[ii][0])&&(jr[ii]=rr),Ou(Sr[0],jr[ii][0])&&Ou(Sr[1],jr[ii][1])&&(jr[ii]=rr);for(jr=rr.edges,ii=0,Li=jr.length;ii<Li;++ii)Ou(Sr[0],jr[ii][0])&&Ou(Sr[1],jr[ii][1])&&(jr[ii]=dr),Ou(Sr[0],jr[ii][1])&&Ou(Sr[1],jr[ii][0])&&(jr[ii]=dr)}else rr.transform=dr.transform;return rr.children&&rr.children.forEach(function(un){Be(un,rr)}),rr}function tt(rr,dr){var Sr=be(rr,dr),Or=Sr.project([rr*P,dr*P]),jr;return(jr=Sr.transform)?[jr[0]*Or[0]+jr[1]*Or[1]+jr[2],-(jr[3]*Or[0]+jr[4]*Or[1]+jr[5])]:(Or[1]=-Or[1],Or)}lf(ve)&&(tt.invert=function(rr,dr){var Sr=We(ve,[rr,-dr]);return Sr&&(Sr[0]*=T,Sr[1]*=T,Sr)});function We(rr,dr){var Sr=rr.project.invert,Or=rr.transform,jr=dr;if(Or&&(Or=bh(Or),jr=[Or[0]*jr[0]+Or[1]*jr[1]+Or[2],Or[3]*jr[0]+Or[4]*jr[1]+Or[5]]),Sr&&rr===it(ii=Sr(jr)))return ii;for(var ii,Li=rr.children,un=0,sn=Li&&Li.length;un<sn;++un)if(ii=We(Li[un],dr))return ii}function it(rr){return be(rr[0]*T,rr[1]*T)}var Dt=t.geoProjection(tt),Ht=Dt.stream;return Dt.stream=function(rr){var dr=Dt.rotate(),Sr=Ht(rr),Or=(Dt.rotate([0,0]),Ht(rr));return Dt.rotate(dr),Sr.sphere=function(){Or.polygonStart(),Or.lineStart(),Lf(Or,ve),Or.lineEnd(),Or.polygonEnd()},Sr},Dt.angle(Re==null?-30:Re*P)}function Lf(ve,be,Re){var Be,tt=be.edges,We=tt.length,it,Dt={type:\"MultiPoint\",coordinates:be.face},Ht=be.face.filter(function(Li){return n(Li[1])!==90}),rr=t.geoBounds({type:\"MultiPoint\",coordinates:Ht}),dr=!1,Sr=-1,Or=rr[1][0]-rr[0][0],jr=Or===180||Or===360?[(rr[0][0]+rr[1][0])/2,(rr[0][1]+rr[1][1])/2]:t.geoCentroid(Dt);if(Re)for(;++Sr<We&&tt[Sr]!==Re;);++Sr;for(var ii=0;ii<We;++ii)it=tt[(ii+Sr)%We],Array.isArray(it)?(dr||(ve.point((Be=t.geoInterpolate(it[0],jr)(p))[0],Be[1]),dr=!0),ve.point((Be=t.geoInterpolate(it[1],jr)(p))[0],Be[1])):(dr=!1,it!==Re&&Lf(ve,it,be))}function Ou(ve,be){return ve&&be&&ve[0]===be[0]&&ve[1]===be[1]}function xf(ve,be){for(var Re,Be,tt=ve.length,We=null,it=0;it<tt;++it){Re=ve[it];for(var Dt=be.length;--Dt>=0;)if(Be=be[Dt],Re[0]===Be[0]&&Re[1]===Be[1]){if(We)return[We,Re];We=Re}}}function jl(ve){for(var be=ve.length,Re=[],Be=ve[be-1],tt=0;tt<be;++tt)Re.push([Be,Be=ve[tt]]);return Re}function lf(ve){return ve.project.invert||ve.children&&ve.children.some(lf)}var Vh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Pf=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(ve){return ve.map(function(be){return Vh[be]})});function Ls(ve){ve=ve||function(Re){var Be=t.geoCentroid({type:\"MultiPoint\",coordinates:Re});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Be[0],-Be[1]])};var be=Pf.map(function(Re){return{face:Re,project:ve(Re)}});return[-1,0,0,1,0,1,4,5].forEach(function(Re,Be){var tt=be[Re];tt&&(tt.children||(tt.children=[])).push(be[Be])}),_f(be[0],function(Re,Be){return be[Re<-E/2?Be<0?6:4:Re<0?Be<0?2:0:Re<E/2?Be<0?3:1:Be<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var du=2/G(3);function Cu(ve,be){var Re=wt(ve,be);return[Re[0]*du,Re[1]]}Cu.invert=function(ve,be){return wt.invert(ve/du,be)};function Wf(ve){ve=ve||function(Re){var Be=t.geoCentroid({type:\"MultiPoint\",coordinates:Re});return t.geoProjection(Cu).translate([0,0]).scale(1).rotate(Be[1]>0?[-Be[0],0]:[180-Be[0],180])};var be=Pf.map(function(Re){return{face:Re,project:ve(Re)}});return[-1,0,0,1,0,1,4,5].forEach(function(Re,Be){var tt=be[Re];tt&&(tt.children||(tt.children=[])).push(be[Be])}),_f(be[0],function(Re,Be){return be[Re<-E/2?Be<0?6:4:Re<0?Be<0?2:0:Re<E/2?Be<0?3:1:Be<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Vs(ve){ve=ve||function(it){var Dt=it.length===6?t.geoCentroid({type:\"MultiPoint\",coordinates:it}):it[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Dt[0],-Dt[1]])};var be=Pf.map(function(it){for(var Dt=it.map(If),Ht=Dt.length,rr=Dt[Ht-1],dr,Sr=[],Or=0;Or<Ht;++Or)dr=Dt[Or],Sr.push(Wu([rr[0]*.9486832980505138+dr[0]*.31622776601683794,rr[1]*.9486832980505138+dr[1]*.31622776601683794,rr[2]*.9486832980505138+dr[2]*.31622776601683794]),Wu([dr[0]*.9486832980505138+rr[0]*.31622776601683794,dr[1]*.9486832980505138+rr[1]*.31622776601683794,dr[2]*.9486832980505138+rr[2]*.31622776601683794])),rr=dr;return Sr}),Re=[],Be=[-1,0,0,1,0,1,4,5];be.forEach(function(it,Dt){for(var Ht=Pf[Dt],rr=Ht.length,dr=Re[Dt]=[],Sr=0;Sr<rr;++Sr)be.push([Ht[Sr],it[(Sr*2+2)%(2*rr)],it[(Sr*2+1)%(2*rr)]]),Be.push(Dt),dr.push(zc(If(it[(Sr*2+2)%(2*rr)]),If(it[(Sr*2+1)%(2*rr)])))});var tt=be.map(function(it){return{project:ve(it),face:it}});Be.forEach(function(it,Dt){var Ht=tt[it];Ht&&(Ht.children||(Ht.children=[])).push(tt[Dt])});function We(it,Dt){var Ht=o(Dt),rr=[Ht*o(it),Ht*x(it),x(Dt)],dr=it<-E/2?Dt<0?6:4:it<0?Dt<0?2:0:it<E/2?Dt<0?3:1:Dt<0?7:5,Sr=Re[dr];return tt[bf(Sr[0],rr)<0?8+3*dr:bf(Sr[1],rr)<0?8+3*dr+1:bf(Sr[2],rr)<0?8+3*dr+2:dr]}return _f(tt[0],We).angle(-30).scale(110.625).center([0,45])}function bf(ve,be){for(var Re=0,Be=ve.length,tt=0;Re<Be;++Re)tt+=ve[Re]*be[Re];return tt}function zc(ve,be){return[ve[1]*be[2]-ve[2]*be[1],ve[2]*be[0]-ve[0]*be[2],ve[0]*be[1]-ve[1]*be[0]]}function Wu(ve){return[a(ve[1],ve[0])*P,O(c(-1,f(1,ve[2])))*P]}function If(ve){var be=ve[0]*T,Re=ve[1]*T,Be=o(Re);return[Be*o(be),Be*x(be),x(Re)]}function Xu(){}function uf(ve){if((Re=ve.length)<4)return!1;for(var be=0,Re,Be=ve[Re-1][1]*ve[0][0]-ve[Re-1][0]*ve[0][1];++be<Re;)Be+=ve[be-1][1]*ve[be][0]-ve[be-1][0]*ve[be][1];return Be<=0}function Xf(ve,be){for(var Re=be[0],Be=be[1],tt=!1,We=0,it=ve.length,Dt=it-1;We<it;Dt=We++){var Ht=ve[We],rr=Ht[0],dr=Ht[1],Sr=ve[Dt],Or=Sr[0],jr=Sr[1];dr>Be^jr>Be&&Re<(Or-rr)*(Be-dr)/(jr-dr)+rr&&(tt=!tt)}return tt}function Wl(ve,be){var Re=be.stream,Be;if(!Re)throw new Error(\"invalid projection\");switch(ve&&ve.type){case\"Feature\":Be=Zu;break;case\"FeatureCollection\":Be=ah;break;default:Be=Tc;break}return Be(ve,Re)}function ah(ve,be){return{type:\"FeatureCollection\",features:ve.features.map(function(Re){return Zu(Re,be)})}}function Zu(ve,be){return{type:\"Feature\",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,be)}}function Oc(ve,be){return{type:\"GeometryCollection\",geometries:ve.geometries.map(function(Re){return Tc(Re,be)})}}function Tc(ve,be){if(!ve)return null;if(ve.type===\"GeometryCollection\")return Oc(ve,be);var Re;switch(ve.type){case\"Point\":Re=qc;break;case\"MultiPoint\":Re=qc;break;case\"LineString\":Re=cf;break;case\"MultiLineString\":Re=cf;break;case\"Polygon\":Re=fc;break;case\"MultiPolygon\":Re=fc;break;case\"Sphere\":Re=fc;break;default:return null}return t.geoStream(ve,be(Re)),Re.result()}var Tl=[],vu=[],qc={point:function(ve,be){Tl.push([ve,be])},result:function(){var ve=Tl.length?Tl.length<2?{type:\"Point\",coordinates:Tl[0]}:{type:\"MultiPoint\",coordinates:Tl}:null;return Tl=[],ve}},cf={lineStart:Xu,point:function(ve,be){Tl.push([ve,be])},lineEnd:function(){Tl.length&&(vu.push(Tl),Tl=[])},result:function(){var ve=vu.length?vu.length<2?{type:\"LineString\",coordinates:vu[0]}:{type:\"MultiLineString\",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,be){Tl.push([ve,be])},lineEnd:function(){var ve=Tl.length;if(ve){do Tl.push(Tl[0].slice());while(++ve<4);vu.push(Tl),Tl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],be=[];return vu.forEach(function(Re){uf(Re)?ve.push([Re]):be.push(Re)}),be.forEach(function(Re){var Be=Re[0];ve.some(function(tt){if(Xf(tt[0],Be))return tt.push(Re),!0})||ve.push([Re])}),vu=[],ve.length?ve.length>1?{type:\"MultiPolygon\",coordinates:ve}:{type:\"Polygon\",coordinates:ve[0]}:null}};function Bc(ve){var be=ve(A,0)[0]-ve(-A,0)[0];function Re(Be,tt){var We=n(Be)<A,it=ve(We?Be:Be>0?Be-E:Be+E,tt),Dt=(it[0]-it[1])*_,Ht=(it[0]+it[1])*_;if(We)return[Dt,Ht];var rr=be*_,dr=Dt>0^Ht>0?-1:1;return[dr*Dt-v(Ht)*rr,dr*Ht-v(Dt)*rr]}return ve.invert&&(Re.invert=function(Be,tt){var We=(Be+tt)*_,it=(tt-Be)*_,Dt=n(We)<.5*be&&n(it)<.5*be;if(!Dt){var Ht=be*_,rr=We>0^it>0?-1:1,dr=-rr*Be+(it>0?1:-1)*Ht,Sr=-rr*tt+(We>0?1:-1)*Ht;We=(-dr-Sr)*_,it=(dr-Sr)*_}var Or=ve.invert(We,it);return Dt||(Or[0]+=We>0?E:-E),Or}),t.geoProjection(Re).rotate([-90,-90,45]).clipAngle(180-.001)}function At(){return Bc(ki).scale(176.423)}function Xt(){return Bc(Lo).scale(111.48)}function kr(ve,be){if(!(0<=(be=+be)&&be<=20))throw new Error(\"invalid digits\");function Re(rr){var dr=rr.length,Sr=2,Or=new Array(dr);for(Or[0]=+rr[0].toFixed(be),Or[1]=+rr[1].toFixed(be);Sr<dr;)Or[Sr]=rr[Sr],++Sr;return Or}function Be(rr){return rr.map(Re)}function tt(rr){for(var dr=Re(rr[0]),Sr=[dr],Or=1;Or<rr.length;Or++){var jr=Re(rr[Or]);(jr.length>2||jr[0]!=dr[0]||jr[1]!=dr[1])&&(Sr.push(jr),dr=jr)}return Sr.length===1&&rr.length>1&&Sr.push(Re(rr[rr.length-1])),Sr}function We(rr){return rr.map(tt)}function it(rr){if(rr==null)return rr;var dr;switch(rr.type){case\"GeometryCollection\":dr={type:\"GeometryCollection\",geometries:rr.geometries.map(it)};break;case\"Point\":dr={type:\"Point\",coordinates:Re(rr.coordinates)};break;case\"MultiPoint\":dr={type:rr.type,coordinates:Be(rr.coordinates)};break;case\"LineString\":dr={type:rr.type,coordinates:tt(rr.coordinates)};break;case\"MultiLineString\":case\"Polygon\":dr={type:rr.type,coordinates:We(rr.coordinates)};break;case\"MultiPolygon\":dr={type:\"MultiPolygon\",coordinates:rr.coordinates.map(We)};break;default:return rr}return rr.bbox!=null&&(dr.bbox=rr.bbox),dr}function Dt(rr){var dr={type:\"Feature\",properties:rr.properties,geometry:it(rr.geometry)};return rr.id!=null&&(dr.id=rr.id),rr.bbox!=null&&(dr.bbox=rr.bbox),dr}if(ve!=null)switch(ve.type){case\"Feature\":return Dt(ve);case\"FeatureCollection\":{var Ht={type:\"FeatureCollection\",features:ve.features.map(Dt)};return ve.bbox!=null&&(Ht.bbox=ve.bbox),Ht}default:return it(ve)}return ve}function Ar(ve){var be=x(ve);function Re(Be,tt){var We=be?b(Be*be/2)/be:Be/2;if(!tt)return[2*We,-ve];var it=2*i(We*x(tt)),Dt=1/b(tt);return[x(it)*Dt,tt+(1-o(it))*Dt-ve]}return Re.invert=function(Be,tt){if(n(tt+=ve)<p)return[be?2*i(be*Be/2)/be:Be,0];var We=Be*Be+tt*tt,it=0,Dt=10,Ht;do{var rr=b(it),dr=1/o(it),Sr=We-2*tt*it+it*it;it-=Ht=(rr*Sr+2*(it-tt))/(2+Sr*dr*dr+2*(it-tt)*rr)}while(n(Ht)>p&&--Dt>0);var Or=Be*(rr=b(it)),jr=b(n(tt)<n(it+1/rr)?O(Or)*.5:V(Or)*.5+E/4)/x(it);return[be?2*i(be*jr)/be:2*jr,it]},Re}function Kr(){return Ut(Ar).scale(131.215)}var Ei=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];Ei.forEach(function(ve){ve[1]*=1.0144});function Wi(ve,be){var Re=f(18,n(be)*36/E),Be=l(Re),tt=Re-Be,We=(Sr=Ei[Be])[0],it=Sr[1],Dt=(Sr=Ei[++Be])[0],Ht=Sr[1],rr=(Sr=Ei[f(19,++Be)])[0],dr=Sr[1],Sr;return[ve*(Dt+tt*(rr-We)/2+tt*tt*(rr-2*Dt+We)/2),(be>0?A:-A)*(Ht+tt*(dr-it)/2+tt*tt*(dr-2*Ht+it)/2)]}Wi.invert=function(ve,be){var Re=be/A,Be=Re*90,tt=f(18,n(Be/5)),We=c(0,l(tt));do{var it=Ei[We][1],Dt=Ei[We+1][1],Ht=Ei[f(19,We+2)][1],rr=Ht-it,dr=Ht-2*Dt+it,Sr=2*(n(Re)-Dt)/rr,Or=dr/rr,jr=Sr*(1-Or*Sr*(1-2*Or*Sr));if(jr>=0||We===1){Be=(be>=0?5:-5)*(jr+tt);var ii=50,Li;do tt=f(18,n(Be)/5),We=l(tt),jr=tt-We,it=Ei[We][1],Dt=Ei[We+1][1],Ht=Ei[f(19,We+2)][1],Be-=(Li=(be>=0?A:-A)*(Dt+jr*(Ht-it)/2+jr*jr*(Ht-2*Dt+it)/2)-be)*P;while(n(Li)>C&&--ii>0);break}}while(--We>=0);var un=Ei[We][0],sn=Ei[We+1][0],In=Ei[f(19,We+2)][0];return[ve/(sn+jr*(In-un)/2+jr*jr*(In-2*sn+un)/2),Be*T]};function hn(){return t.geoProjection(Wi).scale(152.63)}function Tn(ve){function be(Re,Be){var tt=o(Be),We=(ve-1)/(ve-tt*o(Re));return[We*tt*x(Re),We*x(Be)]}return be.invert=function(Re,Be){var tt=Re*Re+Be*Be,We=G(tt),it=(ve-G(1-tt*(ve+1)/(ve-1)))/((ve-1)/We+We/(ve-1));return[a(Re*it,We*G(1-it*it)),We?O(Be*it/We):0]},be}function Bn(ve,be){var Re=Tn(ve);if(!be)return Re;var Be=o(be),tt=x(be);function We(it,Dt){var Ht=Re(it,Dt),rr=Ht[1],dr=rr*tt/(ve-1)+Be;return[Ht[0]*Be/dr,rr/dr]}return We.invert=function(it,Dt){var Ht=(ve-1)/(ve-1-Dt*tt);return Re.invert(Ht*it,Ht*Dt*Be)},We}function Zi(){var ve=2,be=0,Re=t.geoProjectionMutator(Bn),Be=Re(ve,be);return Be.distance=function(tt){return arguments.length?Re(ve=+tt,be):ve},Be.tilt=function(tt){return arguments.length?Re(ve,be=tt*T):be*P},Be.scale(432.147).clipAngle(V(1/ve)*P-1e-6)}var $i=1e-4,an=1e4,Di=-180,$n=Di+$i,ka=180,Ra=ka-$i,La=-90,Na=La+$i,Yn=90,zn=Yn-$i;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*an)/an}function Xo(ve){return ve===La||ve===Yn?[0,ve]:[Di,bo(ve)]}function Ms(ve){var be=ve[0],Re=ve[1],Be=!1;return be<=$n?(be=Di,Be=!0):be>=Ra&&(be=ka,Be=!0),Re<=Na?(Re=La,Be=!0):Re>=zn&&(Re=Yn,Be=!0),Be?[be,Re]:ve}function os(ve){return ve.map(Ms)}function Ts(ve,be,Re){for(var Be=0,tt=ve.length;Be<tt;++Be){var We=ve[Be].slice();Re.push({index:-1,polygon:be,ring:We});for(var it=0,Dt=We.length;it<Dt;++it){var Ht=We[it],rr=Ht[0],dr=Ht[1];if(rr<=$n||rr>=Ra||dr<=Na||dr>=zn){We[it]=Ms(Ht);for(var Sr=it+1;Sr<Dt;++Sr){var Or=We[Sr],jr=Or[0],ii=Or[1];if(jr>$n&&jr<Ra&&ii>Na&&ii<zn)break}if(Sr===it+1)continue;if(it){var Li={index:-1,polygon:be,ring:We.slice(0,it+1)};Li.ring[Li.ring.length-1]=Xo(dr),Re[Re.length-1]=Li}else Re.pop();if(Sr>=Dt)break;Re.push({index:-1,polygon:be,ring:We=We.slice(Sr-1)}),We[0]=Xo(We[0][1]),it=-1,Dt=We.length}}}}function Ho(ve){var be,Re=ve.length,Be={},tt={},We,it,Dt,Ht,rr;for(be=0;be<Re;++be){if(We=ve[be],it=We.ring[0],Ht=We.ring[We.ring.length-1],it[0]===Ht[0]&&it[1]===Ht[1]){We.polygon.push(We.ring),ve[be]=null;continue}We.index=be,Be[it]=tt[Ht]=We}for(be=0;be<Re;++be)if(We=ve[be],We){if(it=We.ring[0],Ht=We.ring[We.ring.length-1],Dt=tt[it],rr=Be[Ht],delete Be[it],delete tt[Ht],it[0]===Ht[0]&&it[1]===Ht[1]){We.polygon.push(We.ring);continue}Dt?(delete tt[it],delete Be[Dt.ring[0]],Dt.ring.pop(),ve[Dt.index]=null,We={index:-1,polygon:Dt.polygon,ring:Dt.ring.concat(We.ring)},Dt===rr?We.polygon.push(We.ring):(We.index=Re++,ve.push(Be[We.ring[0]]=tt[We.ring[We.ring.length-1]]=We))):rr?(delete Be[Ht],delete tt[rr.ring[rr.ring.length-1]],We.ring.pop(),We={index:Re++,polygon:rr.polygon,ring:We.ring.concat(rr.ring)},ve[rr.index]=null,ve.push(Be[We.ring[0]]=tt[We.ring[We.ring.length-1]]=We)):(We.ring.push(We.ring[0]),We.polygon.push(We.ring))}}function yl(ve){var be={type:\"Feature\",geometry:Xs(ve.geometry)};return ve.id!=null&&(be.id=ve.id),ve.bbox!=null&&(be.bbox=ve.bbox),ve.properties!=null&&(be.properties=ve.properties),be}function Xs(ve){if(ve==null)return ve;var be,Re,Be,tt;switch(ve.type){case\"GeometryCollection\":be={type:\"GeometryCollection\",geometries:ve.geometries.map(Xs)};break;case\"Point\":be={type:\"Point\",coordinates:Ms(ve.coordinates)};break;case\"MultiPoint\":case\"LineString\":be={type:ve.type,coordinates:os(ve.coordinates)};break;case\"MultiLineString\":be={type:\"MultiLineString\",coordinates:ve.coordinates.map(os)};break;case\"Polygon\":{var We=[];Ts(ve.coordinates,We,Re=[]),Ho(Re),be={type:\"Polygon\",coordinates:We};break}case\"MultiPolygon\":{Re=[],Be=-1,tt=ve.coordinates.length;for(var it=new Array(tt);++Be<tt;)Ts(ve.coordinates[Be],it[Be]=[],Re);Ho(Re),be={type:\"MultiPolygon\",coordinates:it.filter(Ka)};break}default:return ve}return ve.bbox!=null&&(be.bbox=ve.bbox),be}function Ps(ve){if(ve==null)return ve;switch(ve.type){case\"Feature\":return yl(ve);case\"FeatureCollection\":{var be={type:\"FeatureCollection\",features:ve.features.map(yl)};return ve.bbox!=null&&(be.bbox=ve.bbox),be}default:return Xs(ve)}}function va(ve,be){var Re=b(be/2),Be=x(L*Re);return[ve*(.74482-.34588*Be*Be),1.70711*Re]}va.invert=function(ve,be){var Re=be/1.70711,Be=x(L*Re);return[ve/(.74482-.34588*Be*Be),2*i(Re)]};function no(){return t.geoProjection(va).scale(146.153)}function _s(ve,be,Re){var Be=t.geoInterpolate(be,Re),tt=Be(.5),We=t.geoRotation([-tt[0],-tt[1]])(be),it=Be.distance/2,Dt=-O(x(We[1]*T)/x(it)),Ht=[-tt[0],-tt[1],-(We[0]>0?E-Dt:Dt)*P],rr=t.geoProjection(ve(it)).rotate(Ht),dr=t.geoRotation(Ht),Sr=rr.center;return delete rr.rotate,rr.center=function(Or){return arguments.length?Sr(dr(Or)):dr.invert(Sr())},rr.clipAngle(90)}function is(ve){var be=o(ve);function Re(Be,tt){var We=t.geoGnomonicRaw(Be,tt);return We[0]*=be,We}return Re.invert=function(Be,tt){return t.geoGnomonicRaw.invert(Be/be,tt)},Re}function $l(){return ku([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ku(ve,be){return _s(is,ve,be)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var be=-ve/2,Re=-be,Be=ve*ve,tt=b(Re),We=.5/x(Re);function it(Dt,Ht){var rr=V(o(Ht)*o(Dt-be)),dr=V(o(Ht)*o(Dt-Re)),Sr=Ht<0?-1:1;return rr*=rr,dr*=dr,[(rr-dr)/(2*ve),Sr*G(4*Be*dr-(Be-rr+dr)*(Be-rr+dr))/(2*ve)]}return it.invert=function(Dt,Ht){var rr=Ht*Ht,dr=o(G(rr+(Or=Dt+be)*Or)),Sr=o(G(rr+(Or=Dt+Re)*Or)),Or,jr;return[a(jr=dr-Sr,Or=(dr+Sr)*tt),(Ht<0?-1:1)*V(G(Or*Or+jr*jr)*We)]},it}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,be){return _s(Yu,ve,be)}function Uc(ve,be){if(n(be)<p)return[ve,0];var Re=n(be/A),Be=O(Re);if(n(ve)<p||n(n(be)-A)<p)return[0,v(be)*E*b(Be/2)];var tt=o(Be),We=n(E/ve-ve/E)/2,it=We*We,Dt=tt/(Re+tt-1),Ht=Dt*(2/Re-1),rr=Ht*Ht,dr=rr+it,Sr=Dt-rr,Or=it+Dt;return[v(ve)*E*(We*Sr+G(it*Sr*Sr-dr*(Dt*Dt-rr)))/dr,v(be)*E*(Ht*Or-We*G((it+1)*dr-Or*Or))/dr]}Uc.invert=function(ve,be){if(n(be)<p)return[ve,0];if(n(ve)<p)return[0,A*x(2*i(be/E))];var Re=(ve/=E)*ve,Be=(be/=E)*be,tt=Re+Be,We=tt*tt,it=-n(be)*(1+tt),Dt=it-2*Be+Re,Ht=-2*it+1+2*Be+We,rr=Be/Ht+(2*Dt*Dt*Dt/(Ht*Ht*Ht)-9*it*Dt/(Ht*Ht))/27,dr=(it-Dt*Dt/(3*Ht))/Ht,Sr=2*G(-dr/3),Or=V(3*rr/(dr*Sr))/3;return[E*(tt-1+G(1+2*(Re-Be)+We))/(2*ve),v(be)*E*(-Sr*o(Or+E/3)-Dt/(3*Ht))]};function xu(){return t.geoProjection(Uc).scale(79.4183)}function Ac(ve,be){if(n(be)<p)return[ve,0];var Re=n(be/A),Be=O(Re);if(n(ve)<p||n(n(be)-A)<p)return[0,v(be)*E*b(Be/2)];var tt=o(Be),We=n(E/ve-ve/E)/2,it=We*We,Dt=tt*(G(1+it)-We*tt)/(1+it*Re*Re);return[v(ve)*E*Dt,v(be)*E*G(1-Dt*(2*We+Dt))]}Ac.invert=function(ve,be){if(!ve)return[0,A*x(2*i(be/E))];var Re=n(ve/E),Be=(1-Re*Re-(be/=E)*be)/(2*Re),tt=Be*Be,We=G(tt+1);return[v(ve)*E*(We-Be),v(be)*A*x(2*a(G((1-2*Be*Re)*(Be+We)-Re),G(We+Be+Re)))]};function Ua(){return t.geoProjection(Ac).scale(79.4183)}function oo(ve,be){if(n(be)<p)return[ve,0];var Re=be/A,Be=O(Re);if(n(ve)<p||n(n(be)-A)<p)return[0,E*b(Be/2)];var tt=(E/ve-ve/E)/2,We=Re/(1+o(Be));return[E*(v(ve)*G(tt*tt+1-We*We)-tt),E*We]}oo.invert=function(ve,be){if(!be)return[ve,0];var Re=be/E,Be=(E*E*(1-Re*Re)-ve*ve)/(2*E*ve);return[ve?E*(v(ve)*G(Be*Be+1)-Be):0,A*x(2*i(Re))]};function Vc(){return t.geoProjection(oo).scale(79.4183)}function hc(ve,be){if(!be)return[ve,0];var Re=n(be);if(!ve||Re===A)return[0,be];var Be=Re/A,tt=Be*Be,We=(8*Be-tt*(tt+2)-5)/(2*tt*(Be-1)),it=We*We,Dt=Be*We,Ht=tt+it+2*Dt,rr=Be+3*We,dr=ve/A,Sr=dr+1/dr,Or=v(n(ve)-A)*G(Sr*Sr-4),jr=Or*Or,ii=Ht*(tt+it*jr-1)+(1-tt)*(tt*(rr*rr+4*it)+12*Dt*it+4*it*it),Li=(Or*(Ht+it-1)+2*G(ii))/(4*Ht+jr);return[v(ve)*A*Li,v(be)*A*G(1+Or*n(Li)-Li*Li)]}hc.invert=function(ve,be){var Re;if(!ve||!be)return[ve,be];be/=E;var Be=v(ve)*ve/A,tt=(Be*Be-1+4*be*be)/n(Be),We=tt*tt,it=2*be,Dt=50;do{var Ht=it*it,rr=(8*it-Ht*(Ht+2)-5)/(2*Ht*(it-1)),dr=(3*it-Ht*it-10)/(2*Ht*it),Sr=rr*rr,Or=it*rr,jr=it+rr,ii=jr*jr,Li=it+3*rr,un=ii*(Ht+Sr*We-1)+(1-Ht)*(Ht*(Li*Li+4*Sr)+Sr*(12*Or+4*Sr)),sn=-2*jr*(4*Or*Sr+(1-4*Ht+3*Ht*Ht)*(1+dr)+Sr*(-6+14*Ht-We+(-8+8*Ht-2*We)*dr)+Or*(-8+12*Ht+(-10+10*Ht-We)*dr)),In=G(un),Kn=tt*(ii+Sr-1)+2*In-Be*(4*ii+We),Aa=tt*(2*rr*dr+2*jr*(1+dr))+sn/In-8*jr*(tt*(-1+Sr+ii)+2*In)*(1+dr)/(We+4*ii);it-=Re=Kn/Aa}while(Re>p&&--Dt>0);return[v(ve)*(G(tt*tt+4)+tt)*E/4,A*it]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,be,Re,Be,tt){function We(it,Dt){var Ht=Re*x(Be*Dt),rr=G(1-Ht*Ht),dr=G(2/(1+rr*o(it*=tt)));return[ve*rr*dr*x(it),be*Ht*dr]}return We.invert=function(it,Dt){var Ht=it/ve,rr=Dt/be,dr=G(Ht*Ht+rr*rr),Sr=2*O(dr/2);return[a(it*b(Sr),ve*dr)/tt,dr&&O(Dt*x(Sr)/(be*Re*dr))/Be]},We}function w(ve,be,Re,Be){var tt=E/3;ve=c(ve,p),be=c(be,p),ve=f(ve,A),be=f(be,E-p),Re=c(Re,0),Re=f(Re,100-p),Be=c(Be,p);var We=Re/100+1,it=Be/100,Dt=V(We*o(tt))/tt,Ht=x(ve)/x(Dt*A),rr=be/E,dr=G(it*x(ve/2)/x(be/2)),Sr=dr/G(rr*Ht*Dt),Or=1/(dr*G(rr*Ht*Dt));return ue(Sr,Or,Ht,Dt,rr)}function B(){var ve=65*T,be=60*T,Re=20,Be=200,tt=t.geoProjectionMutator(w),We=tt(ve,be,Re,Be);return We.poleline=function(it){return arguments.length?tt(ve=+it*T,be,Re,Be):ve*P},We.parallels=function(it){return arguments.length?tt(ve,be=+it*T,Re,Be):be*P},We.inflation=function(it){return arguments.length?tt(ve,be,Re=+it,Be):Re},We.ratio=function(it){return arguments.length?tt(ve,be,Re,Be=+it):Be},We.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*G(3),le=2*G(2*E*G(3)/ee),qe=$t(le*G(3)/E,le,ee/6);function Xe(){return t.geoProjection(qe).scale(176.84)}function ot(ve,be){return[ve*G(1-3*be*be/(E*E)),be]}ot.invert=function(ve,be){return[ve/G(1-3*be*be/(E*E)),be]};function Tt(){return t.geoProjection(ot).scale(152.63)}function Kt(ve,be){var Re=o(be),Be=o(ve)*Re,tt=1-Be,We=o(ve=a(x(ve)*Re,-x(be))),it=x(ve);return Re=G(1-Be*Be),[it*Re-We*tt,-We*Re-it*tt]}Kt.invert=function(ve,be){var Re=(ve*ve+be*be)/-2,Be=G(-Re*(2+Re)),tt=be*Re+ve*Be,We=ve*Re-be*Be,it=G(We*We+tt*tt);return[a(Be*tt,it*(1+Re)),it?-O(Be*We/it):0]};function Jt(){return t.geoProjection(Kt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function xr(ve,be){var Re=Me(ve,be);return[(Re[0]+ve/A)/2,(Re[1]+be)/2]}xr.invert=function(ve,be){var Re=ve,Be=be,tt=25;do{var We=o(Be),it=x(Be),Dt=x(2*Be),Ht=it*it,rr=We*We,dr=x(Re),Sr=o(Re/2),Or=x(Re/2),jr=Or*Or,ii=1-rr*Sr*Sr,Li=ii?V(We*Sr)*G(un=1/ii):un=0,un,sn=.5*(2*Li*We*Or+Re/A)-ve,In=.5*(Li*it+Be)-be,Kn=.5*un*(rr*jr+Li*We*Sr*Ht)+.5/A,Aa=un*(dr*Dt/4-Li*it*Or),fa=.125*un*(Dt*Or-Li*it*rr*dr),$a=.5*un*(Ht*Sr+Li*jr*We)+.5,ko=Aa*fa-$a*Kn,Qa=(In*Aa-sn*$a)/ko,mo=(sn*fa-In*Kn)/ko;Re-=Qa,Be-=mo}while((n(Qa)>p||n(mo)>p)&&--tt>0);return[Re,Be]};function Pr(){return t.geoProjection(xr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=ke,e.geoAitoffRaw=Me,e.geoArmadillo=ie,e.geoArmadilloRaw=me,e.geoAugust=Le,e.geoAugustRaw=Se,e.geoBaker=ge,e.geoBakerRaw=Pe,e.geoBerghaus=ce,e.geoBerghausRaw=Fe,e.geoBertin1953=Gt,e.geoBertin1953Raw=lt,e.geoBoggs=er,e.geoBoggsRaw=Et,e.geoBonne=Yt,e.geoBonneRaw=yt,e.geoBottomley=Tr,e.geoBottomleyRaw=lr,e.geoBromley=ei,e.geoBromleyRaw=Rr,e.geoChamberlin=$e,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=je,e.geoCollignon=Ie,e.geoCollignonRaw=wt,e.geoCraig=Ce,e.geoCraigRaw=xe,e.geoCraster=ir,e.geoCrasterRaw=nr,e.geoCylindricalEqualArea=oi,e.geoCylindricalEqualAreaRaw=pr,e.geoCylindricalStereographic=Jr,e.geoCylindricalStereographicRaw=di,e.geoEckert1=Hi,e.geoEckert1Raw=fi,e.geoEckert2=wn,e.geoEckert2Raw=Pn,e.geoEckert3=Vn,e.geoEckert3Raw=pn,e.geoEckert4=ea,e.geoEckert4Raw=kn,e.geoEckert5=Vt,e.geoEckert5Raw=ua,e.geoEckert6=tr,e.geoEckert6Raw=_t,e.geoEisenlohr=Zr,e.geoEisenlohrRaw=Er,e.geoFahey=zi,e.geoFaheyRaw=$r,e.geoFoucaut=en,e.geoFoucautRaw=Ji,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=cn,e.geoGilbert=la,e.geoGingery=Wo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ga,e.geoGinzburg4Raw=Wn,e.geoGinzburg5=jn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=Cr,e.geoGinzburg6Raw=St,e.geoGinzburg8=pi,e.geoGinzburg8Raw=Qr,e.geoGinzburg9=Sn,e.geoGinzburg9Raw=fn,e.geoGringorten=Jn,e.geoGringortenRaw=ki,e.geoGuyou=zs,e.geoGuyouRaw=Lo,e.geoHammer=pt,e.geoHammerRaw=Ze,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ul,e.geoHealpix=Zl,e.geoHealpixRaw=fl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=Ol,e.geoHufnagel=Us,e.geoHufnagelRaw=Yl,e.geoHyperelliptical=Oo,e.geoHyperellipticalRaw=aa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Uf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=qs,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=kf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=fs,e.geoLagrange=Jl,e.geoLagrangeRaw=Vf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=js,e.geoLaskowskiRaw=Cs,e.geoLittrow=gs,e.geoLittrowRaw=Go,e.geoLoximuthal=bl,e.geoLoximuthalRaw=uc,e.geoMiller=Bs,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=ad,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=wl,e.geoModifiedStereographicGs50=Gf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=mf,e.geoMollweide=wr,e.geoMollweideRaw=sr,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=yf,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=Hf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=ms,e.geoNicolosi=Uh,e.geoNicolosiRaw=jf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=al,e.geoPolyconicRaw=_u,e.geoPolyhedral=_f,e.geoPolyhedralButterfly=Ls,e.geoPolyhedralCollignon=Wf,e.geoPolyhedralWaterman=Vs,e.geoProject=Wl,e.geoGringortenQuincuncial=At,e.geoPeirceQuincuncial=Xt,e.geoPierceQuincuncial=Xt,e.geoQuantize=kr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=Ar,e.geoRobinson=hn,e.geoRobinsonRaw=Wi,e.geoSatellite=Zi,e.geoSatelliteRaw=Bn,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=bt,e.geoSinusoidalRaw=Ft,e.geoStitch=Ps,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=ku,e.geoTwoPointAzimuthalRaw=is,e.geoTwoPointAzimuthalUsa=$l,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Xe,e.geoWagner4Raw=qe,e.geoWagner6=Tt,e.geoWagner6Raw=ot,e.geoWiechel=Jt,e.geoWiechelRaw=Kt,e.geoWinkel3=Pr,e.geoWinkel3Raw=xr,Object.defineProperty(e,\"__esModule\",{value:!0})})});var xDe=ye((wgr,_De)=>{\"use strict\";var id=Oa(),PZ=Dr(),XFt=qa(),ZA=Math.PI/180,H2=180/Math.PI,RZ={cursor:\"pointer\"},DZ={cursor:\"auto\"};function ZFt(e,t){var r=e.projection,n;return t._isScoped?n=YFt:t._isClipped?n=JFt:n=KFt,n(e,r)}_De.exports=ZFt;function FZ(e,t){return id.behavior.zoom().translate(t.translate()).scale(t.scale())}function zZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+\".\"+h]=PZ.nestedProperty(o,h).get(),XFt.call(\"_storeDirectGUIEdit\",a,s._preGUI,u);var v=PZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),PZ.nestedProperty(o,h).set(d),c[n+\".\"+h]=d)}r(f),f(\"projection.scale\",t.scale()/e.fitScale),f(\"fitbounds\",!1),i.emit(\"plotly_relayout\",c)}function YFt(e,t){var r=FZ(e,t);function n(){id.select(this).style(RZ)}function i(){t.scale(id.event.scale).translate(id.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.center.lon\":s[0],\"geo.center.lat\":s[1]})}function a(s){var l=t.invert(e.midPt);s(\"center.lon\",l[0]),s(\"center.lat\",l[1])}function o(){id.select(this).style(DZ),zZ(e,t,a)}return r.on(\"zoomstart\",n).on(\"zoom\",i).on(\"zoomend\",o),r}function KFt(e,t){var r=FZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(E){return t.invert(E)}function v(E){var A=d(E);if(!A)return!0;var L=t(A);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function x(){id.select(this).style(RZ),i=id.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=id.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(id.event.scale),t.translate([o[0],id.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var E=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.center.lon\":A[0],\"geo.center.lat\":A[1],\"geo.projection.rotation.lon\":-E[0]})}function p(){id.select(this).style(DZ),h&&zZ(e,t,C)}function C(E){var A=t.rotate(),L=t.invert(e.midPt);E(\"projection.rotation.lon\",-A[0]),E(\"center.lon\",L[0]),E(\"center.lat\",L[1])}return r.on(\"zoomstart\",x).on(\"zoom\",b).on(\"zoomend\",p),r}function JFt(e,t){var r={r:t.rotate(),k:t.scale()},n=FZ(e,t),i=azt(n,\"zoomstart\",\"zoom\",\"zoomend\"),a=0,o=n.on,s;n.on(\"zoomstart\",function(){id.select(this).style(RZ);var h=id.mouse(this),d=t.rotate(),v=d,x=t.translate(),b=$Ft(d);s=kF(t,h),o.call(n,\"zoom\",function(){var p=id.mouse(this);if(t.scale(r.k=id.event.scale),!s)h=p,s=kF(t,h);else if(kF(t,p)){t.rotate(d).translate(x);var C=kF(t,p),E=ezt(s,C),A=rzt(QFt(b,E)),L=r.r=tzt(A,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on(\"zoomend\",function(){id.select(this).style(DZ),o.call(n,\"zoom\",null),c(i.of(this,arguments)),zZ(e,t,f)}).on(\"zoom.redraw\",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.projection.rotation.lon\":-h[0],\"geo.projection.rotation.lat\":-h[1]})});function l(h){a++||h({type:\"zoomstart\"})}function u(h){h({type:\"zoom\"})}function c(h){--a||h({type:\"zoomend\"})}function f(h){var d=t.rotate();h(\"projection.rotation.lon\",-d[0]),h(\"projection.rotation.lat\",-d[1])}return id.rebind(n,i,\"on\")}function kF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&izt(r)}function $Ft(e){var t=.5*e[0]*ZA,r=.5*e[1]*ZA,n=.5*e[2]*ZA,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function QFt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function ezt(e,t){if(!(!e||!t)){var r=nzt(e,t),n=Math.sqrt(yDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,yDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function tzt(e,t,r){var n=IZ(t,2,e[0]);n=IZ(n,1,e[1]),n=IZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*H2,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*H2-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,x=(Math.atan2(u,s)-Math.atan2(o,h))*H2,b=(Math.atan2(u,s)-Math.atan2(o,-h))*H2,p=gDe(r[0],r[1],d,x),C=gDe(r[0],r[1],v,b);return p<=C?[d,x,r[2]]:[v,b,r[2]]}function gDe(e,t,r,n){var i=mDe(r-e),a=mDe(n-t);return Math.sqrt(i*i+a*a)}function mDe(e){return(e%360+540)%360-180}function IZ(e,t,r){var n=r*ZA,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function rzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*H2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*H2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*H2]}function izt(e){var t=e[0]*ZA,r=e[1]*ZA,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function yDe(e,t){for(var r=0,n=0,i=e.length;n<i;++n)r+=e[n]*t[n];return r}function nzt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function azt(e){for(var t=0,r=arguments.length,n=[];++t<r;)n.push(arguments[t]);var i=id.dispatch.apply(null,n);return i.of=function(a,o){return function(s){var l;try{l=s.sourceEvent=id.event,s.target=e,id.event=s,i[s.type].apply(a,o)}finally{id.event=l}}},i}});var EDe=ye((Tgr,MDe)=>{\"use strict\";var t1=Oa(),BZ=LZ(),ozt=BZ.geoPath,szt=BZ.geoDistance,lzt=pDe(),uzt=qa(),aC=Dr(),czt=aC.strTranslate,LF=Ca(),nC=So(),bDe=vf(),fzt=Mc(),qZ=ho(),wDe=wg().getAutoRange,OZ=yv(),hzt=zf().prepSelect,dzt=zf().clearOutline,vzt=zf().selectOnClick,pzt=xDe(),cp=eC(),gzt=ix(),ADe=vF(),mzt=pZ().feature;function SDe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var $g=SDe.prototype;MDe.exports=function(t){return new SDe(t)};$g.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in cp.layerNameToAdjective)if(l!==\"frame\"&&a[\"show\"+l]){s=!0;break}for(var u=!1,c=0;c<e.length;c++){var f=e[0][0].trace;f._geo=i,f.locationmode&&(s=!0);var h=f.marker;if(h){var d=h.angle,v=h.angleref;(d||v===\"north\"||v===\"previous\")&&(u=!0)}}if(this._hasMarkerAngles=u,s){var x=ADe.getTopojsonName(a);(i.topojson===null||x!==i.topojsonName)&&(i.topojsonName=x,PlotlyGeoAssets.topojson[i.topojsonName]===void 0&&o.push(i.fetchTopojson()))}o=o.concat(gzt.fetchTraceGeoData(e)),r.push(new Promise(function(b,p){Promise.all(o).then(function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(e,t),b()}).catch(p)}))};$g.fetchTopojson=function(){var e=this,t=ADe.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise(function(r,n){t1.json(t,function(i,a){if(i)return i.status===404?n(new Error([\"plotly.js could not find topojson file at\",t+\".\",\"Make sure the *topojsonURL* plot config option\",\"is set properly.\"].join(\" \"))):n(new Error([\"unexpected error while fetching topojson file at\",t].join(\" \")));PlotlyGeoAssets.topojson[e.topojsonName]=a,r()})})};$g.update=function(e,t,r){var n=t[this.id];this.hasChoropleth=!1;for(var i=0;i<e.length;i++){var a=e[i],o=a[0].trace;o.type===\"choropleth\"&&(this.hasChoropleth=!0),o.visible===!0&&o._length>0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),fzt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=l.selectAll(\".point\"),this.dataPoints.text=l.selectAll(\"text\"),this.dataPaths.line=l.selectAll(\".js-line\");var u=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=u.selectAll(\"path\"),this._render()};$g.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=yzt(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},x=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=wDe(r,u),c.range=wDe(r,c);var p=(u.range[0]+u.range[1])/2,C=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:C};else if(n._isClipped){d={lon:p,lat:C},v={lon:p,lat:C,roll:v.roll};var E=o.type,A=cp.lonaxisSpan[E]/2||180,L=cp.lataxisSpan[E]/2||90;x=[p-A,p+A],b=[C-L,C+L]}else d={lon:p,lat:C},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var _=TDe(x,b);f.fitExtent(h,_);var k=this.bounds=f.getBounds(_),M=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(TDe(u.range,c.range)),T=Math.min((k[1][0]-k[0][0])/(P[1][0]-P[0][0]),(k[1][1]-k[0][1])/(P[1][1]-P[0][1]));isFinite(T)?f.scale(T*M):aC.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else f.scale(o.scale*M);var z=this.midPt=[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(k),n._isAlbersUsa){var O=f([d.lon,d.lat]),V=f.translate();f.translate([V[0]-(O[0]-V[0]),V[1]-(O[1]-V[1])])}};$g.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h===\"lonaxis\"||h===\"lataxis\"}function s(h){return!!cp.lineLayers[h]}function l(h){return!!cp.fillLayers[h]}var u=this.hasChoropleth?cp.layersForChoropleth:cp.layers,c=u.filter(function(h){return s(h)||l(h)?t[\"show\"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(\".layer\").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],t1.select(this).remove()}),f.enter().append(\"g\").attr(\"class\",function(h){return\"layer \"+h}).each(function(h){var d=i[h]=t1.select(this);h===\"bg\"?r.bgRect=d.append(\"rect\").style(\"pointer-events\",\"all\"):o(h)?a[h]=d.append(\"path\").style(\"fill\",\"none\"):h===\"backplot\"?d.append(\"g\").classed(\"choroplethlayer\",!0):h===\"frontplot\"?d.append(\"g\").classed(\"scatterlayer\",!0):s(h)?a[h]=d.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):l(h)&&(a[h]=d.append(\"path\").style(\"stroke\",\"none\"))}),f.order(),f.each(function(h){var d=a[h],v=cp.layerNameToAdjective[h];h===\"frame\"?d.datum(cp.sphereSVG):s(h)||l(h)?d.datum(mzt(n,n.objects[h])):o(h)&&d.datum(_zt(h,t,e)).call(LF.stroke,t[h].gridcolor).call(nC.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(LF.stroke,t[v+\"color\"]).call(nC.dashLine,\"\",t[v+\"width\"]):l(h)&&d.call(LF.fill,t[v+\"color\"])})};$g.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;nC.setRect(this.clipRect,i,a,o,s),this.bgRect.call(nC.setRect,i,a,o,s).call(LF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$g.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+\".\"+d]=f[d];uzt.call(\"_guiRelayout\",n,h),n.emit(\"plotly_doubleclick\",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&dzt(n)}};a===\"pan\"?(i.node().onmousedown=null,i.call(pzt(r,t)),i.on(\"dblclick.zoom\",s),n._context._scrollZoom.geo||i.on(\"wheel.zoom\",null)):(a===\"select\"||a===\"lasso\")&&(i.on(\".zoom\",null),c.prepFn=function(f,h,d){hzt(f,h,d,c,a)},OZ.init(c)),i.on(\"mousemove\",function(){var f=r.projection.invert(aC.getPositionFromD3Event());if(!f)return OZ.unhover(n,t1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},bDe.hover(n,t1.event,r.id)}),i.on(\"mouseout\",function(){n._dragging||OZ.unhover(n,t1.event)}),i.on(\"click\",function(){a!==\"select\"&&a!==\"lasso\"&&(o.indexOf(\"select\")>-1&&vzt(t1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf(\"event\")>-1&&bDe.click(n,t1.event))})};$g.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n=\"clip\"+r._uid+e.id;e.clipDef=r._clips.append(\"clipPath\").attr(\"id\",n),e.clipRect=e.clipDef.append(\"rect\"),e.framework=t1.select(e.container).append(\"g\").attr(\"class\",\"geo \"+e.id).call(nC.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:\"x\",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:\"y\",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},qZ.setConvert(e.mockAxis,r)};$g.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,\"projection.scale\":r.scale};var i;e._isScoped?i={\"center.lon\":t.lon,\"center.lat\":t.lat}:e._isClipped?i={\"projection.rotation.lon\":n.lon,\"projection.rotation.lat\":n.lat}:i={\"center.lon\":t.lon,\"center.lat\":t.lat,\"projection.rotation.lon\":n.lon},aC.extendFlat(this.viewInitial,i)};$g.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$g._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?czt(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?\"none\":null}for(r in this.basePaths)this.basePaths[r].attr(\"d\",t);for(r in this.dataPaths)this.dataPaths[r].attr(\"d\",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr(\"display\",i).attr(\"transform\",n)};function yzt(e){var t=e.projection,r=t.type,n=cp.projNames[r];n=\"geo\"+aC.titleCase(n);for(var i=BZ[n]||lzt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?cp.lonaxisSpan[r]/2:null,s=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],l=function(f){return f?a:[]},u=0;u<s.length;u++){var c=s[u];typeof a[c]!=\"function\"&&(a[c]=l)}return a.isLonLatOverEdges=function(f){if(a(f)===null)return!0;if(o){var h=a.rotate(),d=szt(f,[-h[0],-h[1]]),v=o*Math.PI/180;return d>v}else return!1},a.getPath=function(){return ozt().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(cp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-cp.clipPad),a}function _zt(e,t,r){var n=1e-6,i=2.5,a=t[e],o=cp.scopeDefaults[t.scope],s,l,u;e===\"lonaxis\"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(C,E){return[C,E]}):e===\"lataxis\"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(C,E){return[E,C]});var c={type:\"linear\",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};qZ.setConvert(c,r);var f=qZ.calcTicks(c);!t.isScoped&&e===\"lonaxis\"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v<h;v++)for(var x=f[v].x,b=d[v]=[],p=l[0];p<l[1]+i;p+=i)b.push(u(x,p));return{type:\"MultiLineString\",coordinates:d}}function TDe(e,t){var r=cp.clipPad,n=e[0]+r,i=e[1]-r,a=t[0]+r,o=t[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var NZ=ye((Agr,LDe)=>{\"use strict\";var KA=Eh(),xzt=kc().attributes,bzt=Pd().dash,YA=eC(),wzt=mc().overrideAll,CDe=Z1(),kDe={range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},showgrid:{valType:\"boolean\",dflt:!1},tick0:{valType:\"number\",dflt:0},dtick:{valType:\"number\"},gridcolor:{valType:\"color\",dflt:KA.lightLine},gridwidth:{valType:\"number\",min:0,dflt:1},griddash:bzt},Tzt=LDe.exports=wzt({domain:xzt({name:\"geo\"},{}),fitbounds:{valType:\"enumerated\",values:[!1,\"locations\",\"geojson\"],dflt:!1,editType:\"plot\"},resolution:{valType:\"enumerated\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\"enumerated\",values:CDe(YA.scopeDefaults),dflt:\"world\"},projection:{type:{valType:\"enumerated\",values:CDe(YA.projNames)},rotation:{lon:{valType:\"number\"},lat:{valType:\"number\"},roll:{valType:\"number\"}},tilt:{valType:\"number\",dflt:0},distance:{valType:\"number\",min:1.001,dflt:2},parallels:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},scale:{valType:\"number\",min:0,dflt:1}},center:{lon:{valType:\"number\"},lat:{valType:\"number\"}},visible:{valType:\"boolean\",dflt:!0},showcoastlines:{valType:\"boolean\"},coastlinecolor:{valType:\"color\",dflt:KA.defaultLine},coastlinewidth:{valType:\"number\",min:0,dflt:1},showland:{valType:\"boolean\",dflt:!1},landcolor:{valType:\"color\",dflt:YA.landColor},showocean:{valType:\"boolean\",dflt:!1},oceancolor:{valType:\"color\",dflt:YA.waterColor},showlakes:{valType:\"boolean\",dflt:!1},lakecolor:{valType:\"color\",dflt:YA.waterColor},showrivers:{valType:\"boolean\",dflt:!1},rivercolor:{valType:\"color\",dflt:YA.waterColor},riverwidth:{valType:\"number\",min:0,dflt:1},showcountries:{valType:\"boolean\"},countrycolor:{valType:\"color\",dflt:KA.defaultLine},countrywidth:{valType:\"number\",min:0,dflt:1},showsubunits:{valType:\"boolean\"},subunitcolor:{valType:\"color\",dflt:KA.defaultLine},subunitwidth:{valType:\"number\",min:0,dflt:1},showframe:{valType:\"boolean\"},framecolor:{valType:\"color\",dflt:KA.defaultLine},framewidth:{valType:\"number\",min:0,dflt:1},bgcolor:{valType:\"color\",dflt:KA.background},lonaxis:kDe,lataxis:kDe},\"plot\",\"from-root\");Tzt.uirevision={valType:\"any\",editType:\"none\"}});var RDe=ye((Sgr,IDe)=>{\"use strict\";var PF=Dr(),Azt=C_(),Szt=Id().getSubplotData,IF=eC(),Mzt=NZ(),PDe=IF.axesNames;IDe.exports=function(t,r,n){Azt(t,r,n,{type:\"geo\",attributes:Mzt,handleDefaults:Ezt,fullData:n,partition:\"y\"})};function Ezt(e,t,r,n){var i=Szt(n.fullData,\"geo\",n.id),a=i.map(function(oe){return oe.index}),o=r(\"resolution\"),s=r(\"scope\"),l=IF.scopeDefaults[s],u=r(\"projection.type\",l.projType),c=t._isAlbersUsa=u===\"albers usa\";c&&(s=t.scope=\"usa\");var f=t._isScoped=s!==\"world\",h=t._isSatellite=u===\"satellite\",d=t._isConic=u.indexOf(\"conic\")!==-1||u===\"albers\",v=t._isClipped=!!IF.lonaxisSpan[u];if(e.visible===!1){var x=PF.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r(\"visible\"),p,C=0;C<PDe.length;C++){var E=PDe[C],A=[30,10][C],L;if(f)L=l[E+\"Range\"];else{var _=IF[E+\"Span\"],k=(_[u]||_[\"*\"])/2,M=r(\"projection.rotation.\"+E.substr(0,3),l.projRotate[C]);L=[M-k,M+k]}var g=r(E+\".range\",L);r(E+\".tick0\"),r(E+\".dtick\",A),p=r(E+\".showgrid\",b?void 0:!1),p&&(r(E+\".gridcolor\"),r(E+\".gridwidth\"),r(E+\".griddash\")),t[E]._ax={type:\"linear\",_id:E.slice(0,3),_traceIndices:a,setScale:PF.identity,c2l:PF.identity,r2l:PF.identity,autorange:!0,range:g.slice(),_m:1,_input:{}}}var P=t.lonaxis.range,T=t.lataxis.range,z=P[0],O=P[1];z>0&&O<0&&(O+=360);var V=(z+O)/2,G;if(!c){var Z=f?l.projRotate:[V,0,0];G=r(\"projection.rotation.lon\",Z[0]),r(\"projection.rotation.lat\",Z[1]),r(\"projection.rotation.roll\",Z[2]),p=r(\"showcoastlines\",!f&&b),p&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),p=r(\"showocean\",b?void 0:!1),p&&r(\"oceancolor\")}var H,N;if(c?(H=-96.6,N=38.7):(H=f?V:G,N=(T[0]+T[1])/2),r(\"center.lon\",H),r(\"center.lat\",N),h&&(r(\"projection.tilt\"),r(\"projection.distance\")),d){var j=l.projParallels||[0,60];r(\"projection.parallels\",j)}r(\"projection.scale\"),p=r(\"showland\",b?void 0:!1),p&&r(\"landcolor\"),p=r(\"showlakes\",b?void 0:!1),p&&r(\"lakecolor\"),p=r(\"showrivers\",b?void 0:!1),p&&(r(\"rivercolor\"),r(\"riverwidth\")),p=r(\"showcountries\",f&&s!==\"usa\"&&b),p&&(r(\"countrycolor\"),r(\"countrywidth\")),(s===\"usa\"||s===\"north america\"&&o===50)&&(r(\"showsubunits\",b),r(\"subunitcolor\"),r(\"subunitwidth\")),f||(p=r(\"showframe\",b),p&&(r(\"framecolor\"),r(\"framewidth\"))),r(\"bgcolor\");var re=r(\"fitbounds\");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var UZ=ye((Mgr,zDe)=>{\"use strict\";var Czt=Id().getSubplotCalcData,kzt=Dr().counterRegex,Lzt=EDe(),Wm=\"geo\",DDe=kzt(Wm),FDe={};FDe[Wm]={valType:\"subplotid\",dflt:Wm,editType:\"calc\"};function Pzt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Wm],i=0;i<n.length;i++){var a=n[i],o=Czt(r,Wm,a),s=t[a],l=s._subplot;l||(l=Lzt({id:a,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[a]._subplot=l),l.plot(o,t,e._promises)}}function Izt(e,t,r,n){for(var i=n._subplots[Wm]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}function Rzt(e){for(var t=e._fullLayout,r=t._subplots[Wm],n=0;n<r.length;n++){var i=t[r[n]],a=i._subplot;a.updateFx(t,i)}}zDe.exports={attr:Wm,name:Wm,idRoot:Wm,idRegex:DDe,attrRegex:DDe,attributes:FDe,layoutAttributes:NZ(),supplyLayoutDefaults:RDe(),plot:Pzt,updateFx:Rzt,clean:Izt}});var qDe=ye((Egr,ODe)=>{\"use strict\";ODe.exports={attributes:G2(),supplyDefaults:yRe(),colorbar:$d(),formatLabels:bRe(),calc:hF(),calcGeoJSON:kZ().calcGeoJSON,plot:kZ().plot,style:SZ(),styleOnSelect:ap().styleOnSelect,hoverPoints:oDe(),eventData:lDe(),selectPoints:fDe(),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:UZ(),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var NDe=ye((Cgr,BDe)=>{\"use strict\";BDe.exports=qDe()});var JA=ye((kgr,GDe)=>{\"use strict\";var Dzt=Qo().hovertemplateAttrs,ax=G2(),Fzt=Tu(),UDe=Gl(),zzt=Eh().defaultLine,nx=Ao().extendFlat,VDe=ax.marker.line;GDe.exports=nx({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:ax.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:nx({},ax.geojson,{}),featureidkey:ax.featureidkey,text:nx({},ax.text,{}),hovertext:nx({},ax.hovertext,{}),marker:{line:{color:nx({},VDe.color,{dflt:zzt}),width:nx({},VDe.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:ax.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:ax.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:nx({},UDe.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:Dzt(),showlegend:nx({},UDe.showlegend,{dflt:!1})},Fzt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var jDe=ye((Lgr,HDe)=>{\"use strict\";var oC=Dr(),Ozt=Jh(),qzt=JA(),Bzt=[\"The library used by the *country names* `locationmode` option is changing in the next major version.\",\"Some country names in existing plots may not work in the new version.\",\"To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.\"].join(\" \");HDe.exports=function(t,r,n,i){function a(h,d){return oC.coerce(t,r,qzt,h,d)}var o=a(\"locations\"),s=a(\"z\");if(!(o&&o.length&&oC.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a(\"geojson\"),u;(typeof l==\"string\"&&l!==\"\"||oC.isPlainObject(l))&&(u=\"geojson-id\");var c=a(\"locationmode\",u);c===\"country names\"&&oC.warn(Bzt),c===\"geojson-id\"&&a(\"featureidkey\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\");var f=a(\"marker.line.width\");f&&a(\"marker.line.color\"),a(\"marker.opacity\"),Ozt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),oC.coerceSelectionMarkerOpacity(r,a)}});var RF=ye((Pgr,ZDe)=>{\"use strict\";var WDe=Eo(),Nzt=hs().BADNUM,Uzt=gv(),Vzt=Cm(),Gzt=z0();function XDe(e){return e&&typeof e==\"string\"}ZDe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return XDe(c)||WDe(c)}:a=XDe;for(var o=0;o<n;o++){var s=i[o]={},l=r.locations[o],u=r.z[o];a(l)&&WDe(u)?(s.loc=l,s.z=u):(s.loc=null,s.z=Nzt),s.index=o}return Vzt(i,r),Uzt(t,r,{vals:r.z,containerStr:\"\",cLetter:\"z\"}),Gzt(i,r),i}});var DF=ye((Igr,KDe)=>{\"use strict\";var Hzt=Oa(),jzt=Ca(),VZ=So(),Wzt=tc();function Xzt(e,t){t&&YDe(e,t)}function YDe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(\".choroplethlocation\"),a=r.marker||{},o=a.line||{},s=Wzt.makeColorScaleFuncFromTrace(r);i.each(function(l){Hzt.select(this).attr(\"fill\",s(l.z)).call(jzt.stroke,l.mlc||o.color).call(VZ.dashLine,\"\",l.mlw||o.width||0).style(\"opacity\",a.opacity)}),VZ.selectedPointStyle(i,r)}function Zzt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?VZ.selectedPointStyle(r.selectAll(\".choroplethlocation\"),n):YDe(e,t)}KDe.exports={style:Xzt,styleOnSelect:Zzt}});var GZ=ye((Rgr,QDe)=>{\"use strict\";var Yzt=Oa(),JDe=Dr(),$A=ix(),Kzt=vF().getTopojsonFeatures,$De=wg().findExtremes,Jzt=DF().style;function $zt(e,t,r){var n=t.layers.backplot.select(\".choroplethlayer\");JDe.makeTraceGroups(n,r,\"trace choropleth\").each(function(i){var a=Yzt.select(this),o=a.selectAll(\"path.choroplethlocation\").data(JDe.identity);o.enter().append(\"path\").classed(\"choroplethlocation\",!0),o.exit().remove(),Jzt(e,i)})}function Qzt(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a===\"geojson-id\"?$A.extractTraceFeature(e):Kzt(r,i.topojson),l=[],u=[],c=0;c<o;c++){var f=e[c],h=a===\"geojson-id\"?f.fOut:$A.locationToFeature(a,f.loc,s);if(h){f.geojson=h,f.ct=h.properties.ct,f._polygons=$A.feature2polygons(h);var d=$A.computeBbox(h);l.push(d[0],d[2]),u.push(d[1],d[3])}else f.geojson=null}if(n.fitbounds===\"geojson\"&&a===\"geojson-id\"){var v=$A.computeBbox($A.getTraceGeojson(r));l=[v[0],v[2]],u=[v[1],v[3]]}var x={padded:!0};r._extremes.lon=$De(n.lonaxis._ax,l,x),r._extremes.lat=$De(n.lataxis._ax,u,x)}QDe.exports={calcGeoJSON:Qzt,plot:$zt}});var FF=ye((Dgr,eFe)=>{\"use strict\";var e7t=ho(),t7t=JA(),r7t=Dr().fillText;eFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l<i.length;l++)if(s=i[l],c=!1,s._polygons){for(u=0;u<s._polygons.length;u++)s._polygons[u].contains(f)&&(c=!c),s._polygons[u].contains(h)&&(c=!c);if(c)break}if(!(!c||!s))return t.x0=t.x1=t.xa.c2p(s.ct),t.y0=t.y1=t.ya.c2p(s.ct),t.index=s.index,t.location=s.loc,t.z=s.z,t.zLabel=e7t.tickText(o.mockAxis,o.mockAxis.c2l(s.z),\"hover\").text,t.hovertemplate=s.hovertemplate,i7t(t,a,s),[t]};function i7t(e,t,r){if(!t.hovertemplate){var n=r.hi||t.hoverinfo,i=String(r.loc),a=n===\"all\"?t7t.hoverinfo.flags:n.split(\"+\"),o=a.indexOf(\"name\")!==-1,s=a.indexOf(\"location\")!==-1,l=a.indexOf(\"z\")!==-1,u=a.indexOf(\"text\")!==-1,c=!o&&s,f=[];c?e.nameOverride=i:(o&&(e.nameOverride=t.name),s&&f.push(i)),l&&f.push(e.zLabel),u&&r7t(r,t,f),e.extraText=f.join(\"<br>\")}}});var zF=ye((Fgr,tFe)=>{\"use strict\";tFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var OF=ye((zgr,rFe)=>{\"use strict\";rFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++)l=n[s],u=l.ct,u&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,s,t)?(o.push({pointNumber:s,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var nFe=ye((Ogr,iFe)=>{\"use strict\";iFe.exports={attributes:JA(),supplyDefaults:jDe(),colorbar:S_(),calc:RF(),calcGeoJSON:GZ().calcGeoJSON,plot:GZ().plot,style:DF().style,styleOnSelect:DF().styleOnSelect,hoverPoints:FF(),eventData:zF(),selectPoints:OF(),moduleType:\"trace\",name:\"choropleth\",basePlotModule:UZ(),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}});var oFe=ye((qgr,aFe)=>{\"use strict\";aFe.exports=nFe()});var qF=ye((Bgr,lFe)=>{\"use strict\";var n7t=qa(),s0=Dr(),a7t=oT();function o7t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var x=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),C=l.p2c(h+d);n===\"x\"?v=a.tree.range(Math.min(x,b),Math.min(l._rl[0],l._rl[1]),Math.max(x,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(x,b),Math.min(p,C),Math.max(x,b),Math.max(p,C))}else v=a.ids;var E,A,L,_,k,M,g,P,T,z=d;if(n===\"x\"){var O=!!o.xperiodalignment,V=!!o.yperiodalignment;for(k=0;k<v.length;k++){if(E=v[k],L=u[E],M=Math.abs(s.c2p(L)-f),O){var G=s.c2p(o._xStarts[E]),Z=s.c2p(o._xEnds[E]);M=f>=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(M<z){if(z=M,_=c[E],g=l.c2p(_)-h,V){var H=l.c2p(o._yStarts[E]),N=l.c2p(o._yEnds[E]);g=h>=Math.min(H,N)&&h<=Math.max(H,N)?0:1/0}T=Math.sqrt(M*M+g*g),A=v[k]}}}else for(k=v.length-1;k>-1;k--)E=v[k],L=u[E],_=c[E],M=s.c2p(L)-f,g=l.c2p(_)-h,P=Math.sqrt(M*M+g*g),P<z&&(z=T=P,A=E);return e.index=A,e.distance=z,e.dxy=T,A===void 0?[e]:[sFe(e,u,c,o)]}function sFe(e,t,r,n){var i=e.xa,a=e.ya,o=e.distance,s=e.dxy,l=e.index,u={pointNumber:l,x:t[l],y:r[l]};u.tx=s0.isArrayOrTypedArray(n.text)?n.text[l]:n.text,u.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,u.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,u.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var c=n.textfont;c&&(u.ts=s0.isArrayOrTypedArray(c.size)?c.size[l]:c.size,u.tc=s0.isArrayOrTypedArray(c.color)?c.color[l]:c.color,u.tf=Array.isArray(c.family)?c.family[l]:c.family,u.tw=Array.isArray(c.weight)?c.weight[l]:c.weight,u.ty=Array.isArray(c.style)?c.style[l]:c.style,u.tv=Array.isArray(c.variant)?c.variant[l]:c.variant);var f=n.marker;f&&(u.ms=s0.isArrayOrTypedArray(f.size)?f.size[l]:f.size,u.mo=s0.isArrayOrTypedArray(f.opacity)?f.opacity[l]:f.opacity,u.mx=s0.isArrayOrTypedArray(f.symbol)?f.symbol[l]:f.symbol,u.ma=s0.isArrayOrTypedArray(f.angle)?f.angle[l]:f.angle,u.mc=s0.isArrayOrTypedArray(f.color)?f.color[l]:f.color);var h=f&&f.line;h&&(u.mlc=Array.isArray(h.color)?h.color[l]:h.color,u.mlw=s0.isArrayOrTypedArray(h.width)?h.width[l]:h.width);var d=f&&f.gradient;d&&d.type!==\"none\"&&(u.mgt=Array.isArray(d.type)?d.type[l]:d.type,u.mgc=Array.isArray(d.color)?d.color[l]:d.color);var v=i.c2p(u.x,!0),x=a.c2p(u.y,!0),b=u.mrc||1,p=n.hoverlabel;p&&(u.hbg=Array.isArray(p.bgcolor)?p.bgcolor[l]:p.bgcolor,u.hbc=Array.isArray(p.bordercolor)?p.bordercolor[l]:p.bordercolor,u.hts=s0.isArrayOrTypedArray(p.font.size)?p.font.size[l]:p.font.size,u.htc=Array.isArray(p.font.color)?p.font.color[l]:p.font.color,u.htf=Array.isArray(p.font.family)?p.font.family[l]:p.font.family,u.hnl=s0.isArrayOrTypedArray(p.namelength)?p.namelength[l]:p.namelength);var C=n.hoverinfo;C&&(u.hi=Array.isArray(C)?C[l]:C);var E=n.hovertemplate;E&&(u.ht=Array.isArray(E)?E[l]:E);var A={};A[e.index]=u;var L=n._origX,_=n._origY,k=s0.extendFlat({},e,{color:a7t(n,u),x0:v-b,x1:v+b,xLabelVal:L?L[l]:u.x,y0:x-b,y1:x+b,yLabelVal:_?_[l]:u.y,cd:A,distance:o,spikeDistance:s,hovertemplate:u.ht});return u.htx?k.text=u.htx:u.tx?k.text=u.tx:n.text&&(k.text=n.text),s0.fillText(u,n,k),n7t.getComponentMethod(\"errorbars\",\"hoverInfo\")(u,n,k),k}lFe.exports={hoverPoints:o7t,calcHover:sFe}});var ox=ye((Ngr,cFe)=>{\"use strict\";var uFe=20;cFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:uFe,SYMBOL_STROKE:uFe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var sC=ye((Ugr,vFe)=>{\"use strict\";var s7t=Gl(),l7t=ec(),u7t=Eg(),qf=pf(),fFe=df().axisHoverFormat,hFe=Tu(),c7t=Z1(),HZ=Ao().extendFlat,f7t=mc().overrideAll,h7t=ox().DASHES,dFe=qf.line,r1=qf.marker,d7t=r1.line,QA=vFe.exports=f7t({x:qf.x,x0:qf.x0,dx:qf.dx,y:qf.y,y0:qf.y0,dy:qf.dy,xperiod:qf.xperiod,yperiod:qf.yperiod,xperiod0:qf.xperiod0,yperiod0:qf.yperiod0,xperiodalignment:qf.xperiodalignment,yperiodalignment:qf.yperiodalignment,xhoverformat:fFe(\"x\"),yhoverformat:fFe(\"y\"),text:qf.text,hovertext:qf.hovertext,textposition:qf.textposition,textfont:l7t({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:\"calc\",colorEditType:\"style\",arrayOk:!0,noNumericWeightValues:!0,variantValues:[\"normal\",\"small-caps\"]}),mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"]},line:{color:dFe.color,width:dFe.width,shape:{valType:\"enumerated\",values:[\"linear\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},dash:{valType:\"enumerated\",values:c7t(h7t),dflt:\"solid\"}},marker:HZ({},hFe(\"marker\"),{symbol:r1.symbol,angle:r1.angle,size:r1.size,sizeref:r1.sizeref,sizemin:r1.sizemin,sizemode:r1.sizemode,opacity:r1.opacity,colorbar:r1.colorbar,line:HZ({},hFe(\"marker.line\"),{width:d7t.width})}),connectgaps:qf.connectgaps,fill:HZ({},qf.fill,{dflt:\"none\"}),fillcolor:u7t(),selected:{marker:qf.selected.marker,textfont:qf.selected.textfont},unselected:{marker:qf.unselected.marker,textfont:qf.unselected.textfont},opacity:s7t.opacity},\"calc\",\"nested\");QA.x.editType=QA.y.editType=QA.x0.editType=QA.y0.editType=\"calc+clearAxisTypes\";QA.hovertemplate=qf.hovertemplate;QA.texttemplate=qf.texttemplate});var BF=ye(jZ=>{\"use strict\";var pFe=ox();jZ.isOpenSymbol=function(e){return typeof e==\"string\"?pFe.OPEN_RE.test(e):e%200>100};jZ.isDotSymbol=function(e){return typeof e==\"string\"?pFe.DOT_RE.test(e):e>200}});var yFe=ye((Ggr,mFe)=>{\"use strict\";var gFe=Dr(),v7t=qa(),p7t=BF(),g7t=sC(),m7t=Sm(),NF=Ru(),y7t=K3(),_7t=Pg(),x7t=$p(),b7t=R0(),w7t=Ig(),T7t=D0();mFe.exports=function(t,r,n,i){function a(d,v){return gFe.coerce(t,r,g7t,d,v)}var o=t.marker?p7t.isOpenSymbol(t.marker.symbol):!1,s=NF.isBubble(t),l=y7t(t,r,i,a);if(!l){r.visible=!1;return}_7t(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\");var u=l<m7t.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"mode\",u),NF.hasMarkers(r)&&(x7t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0}),a(\"marker.line.width\",o||s?1:0)),NF.hasLines(r)&&(a(\"connectgaps\"),b7t(t,r,n,i,a),a(\"line.shape\")),NF.hasText(r)&&(a(\"texttemplate\"),T7t(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,f=(r.marker||{}).color;a(\"fill\"),r.fill!==\"none\"&&w7t(t,r,n,a);var h=v7t.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,c||f||n,{axis:\"y\"}),h(t,r,c||f||n,{axis:\"x\",inherit:\"y\"}),gFe.coerceSelectionMarkerOpacity(r,a)}});var xFe=ye((Hgr,_Fe)=>{\"use strict\";var A7t=tI();_Fe.exports=function(t,r,n){var i=t.i;return\"x\"in t||(t.x=r._x[i]),\"y\"in t||(t.y=r._y[i]),A7t(t,r,n)}});var wFe=ye((jgr,bFe)=>{\"use strict\";function S7t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function M7t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function E7t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function C7t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function k7t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function lC(e,t,r,n,i,a){return typeof r==\"function\"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}bFe.exports={ge:function(e,t,r,n,i){return lC(e,t,r,n,i,S7t)},gt:function(e,t,r,n,i){return lC(e,t,r,n,i,M7t)},lt:function(e,t,r,n,i){return lC(e,t,r,n,i,E7t)},le:function(e,t,r,n,i){return lC(e,t,r,n,i,C7t)},eq:function(e,t,r,n,i){return lC(e,t,r,n,i,k7t)}}});var Xm=ye((Wgr,AFe)=>{\"use strict\";AFe.exports=function(t,r,n){var i={},a,o;if(typeof r==\"string\"&&(r=TFe(r)),Array.isArray(r)){var s={};for(o=0;o<r.length;o++)s[r[o]]=!0;r=s}for(a in r)r[a]=TFe(r[a]);var l={};for(a in r){var u=r[a];if(Array.isArray(u))for(o=0;o<u.length;o++){var c=u[o];if(n&&(l[c]=!0),c in t){if(i[a]=t[c],n)for(var f=o;f<u.length;f++)l[u[f]]=!0;break}}else a in t&&(r[a]&&(i[a]=t[a]),n&&(l[a]=!0))}if(n)for(a in t)l[a]||(i[a]=t[a]);return i};var WZ={};function TFe(e){return WZ[e]?WZ[e]:(typeof e==\"string\"&&(e=WZ[e]=e.split(/\\s*,\\s*|\\s+/)),e)}});var e5=ye((Xgr,SFe)=>{\"use strict\";var L7t=Xm();SFe.exports=P7t;function P7t(e){var t;return arguments.length>1&&(e=arguments),typeof e==\"string\"?e=e.split(/\\s/).map(parseFloat):typeof e==\"number\"&&(e=[e]),e.length&&typeof e[0]==\"number\"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=L7t(e,{left:\"x l left Left\",top:\"y t top Top\",width:\"w width W Width\",height:\"h height W Width\",bottom:\"b bottom Bottom\",right:\"r right Right\"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var j2=ye((Zgr,MFe)=>{\"use strict\";MFe.exports=I7t;function I7t(e,t){if(!e||e.length==null)throw Error(\"Argument should be an array\");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;n<t;n++){for(var i=-1/0,a=1/0,o=n,s=e.length;o<s;o+=t)e[o]>i&&(i=e[o]),e[o]<a&&(a=e[o]);r[n]=a,r[t+n]=i}return r}});var CFe=ye((Ygr,EFe)=>{EFe.exports=function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==void 0)return arguments[e]}});var W2=ye((Kgr,LFe)=>{var kFe=WD();LFe.exports=R7t;function R7t(e,t,r){if(!e)throw new TypeError(\"must specify data as first parameter\");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]==\"number\"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t==\"string\")&&(t=new(kFe(t||\"float32\"))(i+r));var u=t.length-r;if(i!==u)throw new Error(\"source length \"+i+\" (\"+n+\"x\"+e.length+\") does not match destination length \"+u);for(a=0,s=r;a<e.length;a++)for(o=0;o<n;o++)t[s++]=e[a][o]===null?NaN:e[a][o]}else if(!t||typeof t==\"string\"){var c=kFe(t||\"float32\");if(Array.isArray(e)||t===\"array\")for(t=new c(e.length+r),a=0,s=r,l=t.length;s<l;s++,a++)t[s]=e[a]===null?NaN:e[a];else r===0?t=new c(e):(t=new c(e.length+r),t.set(e,r))}else t.set(e,r);return t}});var IFe=ye((Jgr,PFe)=>{\"use strict\";PFe.exports=function(e){var t=typeof e;return e!==null&&(t===\"object\"||t===\"function\")}});var DFe=ye(($gr,RFe)=>{\"use strict\";RFe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var UFe=ye((Qgr,NFe)=>{\"use strict\";var FFe=wFe(),zFe=XE(),D7t=e5(),F7t=j2(),OFe=Xm(),XZ=CFe(),z7t=W2(),O7t=IFe(),q7t=WD(),qFe=DFe(),B7t=1073741824;NFe.exports=function(t,r){r||(r={}),t=z7t(t,\"float64\"),r=OFe(r,{bounds:\"range bounds dataBox databox\",maxDepth:\"depth maxDepth maxdepth level maxLevel maxlevel levels\",dtype:\"type dtype format out dst output destination\"});let n=XZ(r.maxDepth,255),i=XZ(r.bounds,F7t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=BFe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype=\"array\"),typeof r.dtype==\"string\"?s=new(q7t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;p<o;++p)s[p]=p;let l=[],u=[],c=[],f=[];d(0,0,1,s,0,1);let h=0;for(let p=0;p<l.length;p++){let C=l[p];if(s.set)s.set(C,h);else for(let A=0,L=C.length;A<L;A++)s[A+h]=C[A];let E=h+l[p].length;f[p]=[h,E],h=E}return s.range=v,s;function d(p,C,E,A,L,_){if(!A.length)return null;let k=l[L]||(l[L]=[]),M=c[L]||(c[L]=[]),g=u[L]||(u[L]=[]),P=k.length;if(L++,L>n||_>B7t){for(let N=0;N<A.length;N++)k.push(A[N]),M.push(_),g.push(null,null,null,null);return P}if(k.push(A[0]),M.push(_),A.length<=1)return g.push(null,null,null,null),P;let T=E*.5,z=p+T,O=C+T,V=[],G=[],Z=[],H=[];for(let N=1,j=A.length;N<j;N++){let re=A[N],oe=a[re*2],_e=a[re*2+1];oe<z?_e<O?V.push(re):G.push(re):_e<O?Z.push(re):H.push(re)}return _<<=2,g.push(d(p,C,T,V,L,_),d(p,O,T,G,L,_+1),d(z,C,T,Z,L,_+2),d(z,O,T,H,L,_+3)),P}function v(...p){let C;if(O7t(p[p.length-1])){let Z=p.pop();!p.length&&(Z.x!=null||Z.l!=null||Z.left!=null)&&(p=[Z],C={}),C=OFe(Z,{level:\"level maxLevel\",d:\"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize\",lod:\"lod details ranges offsets\"})}else C={};p.length||(p=i);let E=D7t(...p),[A,L,_,k]=[Math.min(E.x,E.x+E.width),Math.min(E.y,E.y+E.height),Math.max(E.x,E.x+E.width),Math.max(E.y,E.y+E.height)],[M,g,P,T]=BFe([A,L,_,k],i),z=XZ(C.level,l.length);if(C.d!=null){let Z;typeof C.d==\"number\"?Z=[C.d,C.d]:C.d.length&&(Z=C.d),z=Math.min(Math.max(Math.ceil(-qFe(Math.abs(Z[0])/(i[2]-i[0]))),Math.ceil(-qFe(Math.abs(Z[1])/(i[3]-i[1])))),z)}if(z=Math.min(z,l.length),C.lod)return x(M,g,P,T,z);let O=[];V(0,0,1,0,0,1);function V(Z,H,N,j,re,oe){if(re===null||oe===null)return;let _e=Z+N,Me=H+N;if(M>_e||g>Me||P<Z||T<H||j>=z||re===oe)return;let ke=l[j];oe===void 0&&(oe=ke.length);for(let Fe=re;Fe<oe;Fe++){let ce=ke[Fe],Ze=t[ce*2],ct=t[ce*2+1];Ze>=A&&Ze<=_&&ct>=L&&ct<=k&&O.push(ce)}let me=u[j],ie=me[re*4+0],Se=me[re*4+1],Le=me[re*4+2],Ae=me[re*4+3],De=G(me,re+1),Pe=N*.5,ge=j+1;V(Z,H,Pe,ge,ie,Se||Le||Ae||De),V(Z,H+Pe,Pe,ge,Se,Le||Ae||De),V(Z+Pe,H,Pe,ge,Le,Ae||De),V(Z+Pe,H+Pe,Pe,ge,Ae,De)}function G(Z,H){let N=null,j=0;for(;N===null;)if(N=Z[H*4+j],j++,j>Z.length)return null;return N}return O}function x(p,C,E,A,L){let _=[];for(let k=0;k<L;k++){let M=c[k],g=f[k][0],P=b(p,C,k),T=b(E,A,k),z=FFe.ge(M,P),O=FFe.gt(M,T,z,M.length-1);_[k]=[z+g,O+g]}return _}function b(p,C,E){let A=1,L=.5,_=.5,k=.5;for(let M=0;M<E;M++)A<<=2,A+=p<L?C<_?0:1:C<_?2:3,k*=.5,L+=p<L?-k:k,_+=C<_?-k:k;return A}};function BFe(e,t){let[r,n,i,a]=t,o=1/(i-r),s=1/(a-n),l=new Array(e.length);for(let u=0,c=e.length/2;u<c;u++)l[2*u]=zFe((e[2*u]-r)*o,0,1),l[2*u+1]=zFe((e[2*u+1]-n)*s,0,1);return l}});var UF=ye((emr,VFe)=>{\"use strict\";VFe.exports=UFe()});var ZZ=ye((tmr,GFe)=>{GFe.exports=N7t;function N7t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case\"a\":a[6]+=n,a[7]+=i;break;case\"v\":a[1]+=i;break;case\"h\":a[1]+=n;break;default:for(var l=1;l<a.length;)a[l++]+=n,a[l++]+=i}switch(s){case\"Z\":n=t,i=r;break;case\"H\":n=a[1];break;case\"V\":i=a[1];break;case\"M\":n=t=a[1],i=r=a[2];break;default:n=a[a.length-2],i=a[a.length-1]}return a})}});var WFe=ye((VF,jFe)=>{\"use strict\";Object.defineProperty(VF,\"__esModule\",{value:!0});var U7t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),uC=Math.PI*2,YZ=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},V7t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},HFe=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},G7t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),x=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*x;p<0&&(p=0),p/=d*b+v*x,p=Math.sqrt(p)*(s===l?-1:1);var C=p*a/o*h,E=p*-o/a*f,A=c*C-u*E+(t+n)/2,L=u*C+c*E+(r+i)/2,_=(f-C)/a,k=(h-E)/o,M=(-f-C)/a,g=(-h-E)/o,P=HFe(1,0,_,k),T=HFe(_,k,M,g);return l===0&&T>0&&(T-=uC),l===1&&T<0&&(T+=uC),[A,L,P,T]},H7t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var x=Math.sin(u*uC/360),b=Math.cos(u*uC/360),p=b*(r-i)/2+x*(n-a)/2,C=-x*(r-i)/2+b*(n-a)/2;if(p===0&&C===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(p,2)/Math.pow(o,2)+Math.pow(C,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var A=G7t(r,n,i,a,o,s,f,d,x,b,p,C),L=U7t(A,4),_=L[0],k=L[1],M=L[2],g=L[3],P=Math.abs(g)/(uC/4);Math.abs(1-P)<1e-7&&(P=1);var T=Math.max(Math.ceil(P),1);g/=T;for(var z=0;z<T;z++)v.push(V7t(M,g)),M+=g;return v.map(function(O){var V=YZ(O[0],o,s,b,x,_,k),G=V.x,Z=V.y,H=YZ(O[1],o,s,b,x,_,k),N=H.x,j=H.y,re=YZ(O[2],o,s,b,x,_,k),oe=re.x,_e=re.y;return{x1:G,y1:Z,x2:N,y2:j,x:oe,y:_e}})};VF.default=H7t;jFe.exports=VF.default});var YFe=ye((rmr,ZFe)=>{\"use strict\";ZFe.exports=W7t;var j7t=WFe();function W7t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case\"M\":a=d[1],o=d[2];break;case\"A\":var x=j7t({px:u,py:c,cx:d[6],cy:d[7],rx:d[1],ry:d[2],xAxisRotation:d[3],largeArcFlag:d[4],sweepFlag:d[5]});if(!x.length)continue;for(var b=0,p;b<x.length;b++)p=x[b],d=[\"C\",p.x1,p.y1,p.x2,p.y2,p.x,p.y],b<x.length-1&&r.push(d);break;case\"S\":var C=u,E=c;(t==\"C\"||t==\"S\")&&(C+=C-n,E+=E-i),d=[\"C\",C,E,d[1],d[2],d[3],d[4]];break;case\"T\":t==\"Q\"||t==\"T\"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=XFe(u,c,s,l,d[1],d[2]);break;case\"Q\":s=d[1],l=d[2],d=XFe(u,c,d[1],d[2],d[3],d[4]);break;case\"L\":d=GF(u,c,d[1],d[2]);break;case\"H\":d=GF(u,c,d[1],c);break;case\"V\":d=GF(u,c,u,d[1]);break;case\"Z\":d=GF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function GF(e,t,r,n){return[\"C\",e,t,r,n,r,n]}function XFe(e,t,r,n,i,a){return[\"C\",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var KZ=ye((imr,KFe)=>{\"use strict\";KFe.exports=function(t){return typeof t!=\"string\"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\dz]$/i.test(t)&&t.length>4))}});var QFe=ye((nmr,$Fe)=>{\"use strict\";var X7t=$S(),Z7t=ZZ(),Y7t=YFe(),K7t=KZ(),JFe=oE();$Fe.exports=J7t;function J7t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]==\"string\"&&(e=e[0]),typeof e==\"string\"&&(JFe(K7t(e),\"String is not an SVG path.\"),e=X7t(e)),JFe(Array.isArray(e),\"Argument should be a string or an array of path segments.\"),e=Z7t(e),e=Y7t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;r<n;r++)for(var i=e[r].slice(1),a=0;a<i.length;a+=2)i[a+0]<t[0]&&(t[0]=i[a+0]),i[a+1]<t[1]&&(t[1]=i[a+1]),i[a+0]>t[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var aze=ye((amr,nze)=>{var X2=Math.PI,eze=ize(120);nze.exports=$7t;function $7t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case\"M\":a=d[1],o=d[2];break;case\"A\":d=rze(u,c,d[1],d[2],ize(d[3]),d[4],d[5],d[6],d[7]),d.unshift(\"C\"),d.length>7&&(r.push(d.splice(0,7)),d.unshift(\"C\"));break;case\"S\":var x=u,b=c;(t==\"C\"||t==\"S\")&&(x+=x-n,b+=b-i),d=[\"C\",x,b,d[1],d[2],d[3],d[4]];break;case\"T\":t==\"Q\"||t==\"T\"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=tze(u,c,s,l,d[1],d[2]);break;case\"Q\":s=d[1],l=d[2],d=tze(u,c,d[1],d[2],d[3],d[4]);break;case\"L\":d=HF(u,c,d[1],d[2]);break;case\"H\":d=HF(u,c,d[1],c);break;case\"V\":d=HF(u,c,u,d[1]);break;case\"Z\":d=HF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function HF(e,t,r,n){return[\"C\",e,t,r,n,r,n]}function tze(e,t,r,n,i,a){return[\"C\",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function rze(e,t,r,n,i,a,o,s,l,u){if(u)E=u[0],A=u[1],p=u[2],C=u[3];else{var c=JZ(e,t,-i);e=c.x,t=c.y,c=JZ(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*x-v*h*h-x*f*f)/(v*h*h+x*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,C=b*-n*f/r+(t+l)/2,E=Math.asin(((t-C)/n).toFixed(9)),A=Math.asin(((l-C)/n).toFixed(9));E=e<p?X2-E:E,A=s<p?X2-A:A,E<0&&(E=X2*2+E),A<0&&(A=X2*2+A),o&&E>A&&(E=E-X2*2),!o&&A>E&&(A=A-X2*2)}if(Math.abs(A-E)>eze){var L=A,_=s,k=l;A=E+eze*(o&&A>E?1:-1),s=p+r*Math.cos(A),l=C+n*Math.sin(A);var M=rze(s,l,r,n,i,0,o,_,k,[A,L,p,C])}var g=Math.tan((A-E)/4),P=4/3*r*g,T=4/3*n*g,z=[2*e-(e+P*Math.sin(E)),2*t-(t-T*Math.cos(E)),s+P*Math.sin(A),l-T*Math.cos(A),s,l];if(u)return z;M&&(z=z.concat(M));for(var O=0;O<z.length;){var V=JZ(z[O],z[O+1],i);z[O++]=V.x,z[O++]=V.y}return z}function JZ(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}function ize(e){return e*(X2/180)}});var sze=ye((omr,oze)=>{var Q7t=ZZ(),e9t=aze(),t9t={M:\"moveTo\",C:\"bezierCurveTo\"};oze.exports=function(e,t){e.beginPath(),e9t(Q7t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[t9t[n]].apply(e,i)}),e.closePath()}});var fze=ye((smr,cze)=>{\"use strict\";var r9t=XE();cze.exports=i9t;var cC=1e20;function i9t(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error(\"For raw data width and height should be provided by options\");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext(\"2d\"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,x=u.length;v<x;v++)l[v]=u[v*c+i]/255;else if(c!==1)throw Error(\"Raw data can have only 1 value per pixel\");var b=Array(a*o),p=Array(a*o),C=Array(s),E=Array(s),A=Array(s+1),L=Array(s);for(v=0,x=a*o;v<x;v++){var _=l[v];b[v]=_===1?0:_===0?cC:Math.pow(Math.max(0,.5-_),2),p[v]=_===1?cC:_===0?0:Math.pow(Math.max(0,_-.5),2)}lze(b,a,o,C,E,L,A),lze(p,a,o,C,E,L,A);var k=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(v=0,x=a*o;v<x;v++)k[v]=r9t(1-((b[v]-p[v])/n+r),0,1);return k}function lze(e,t,r,n,i,a,o){for(var s=0;s<t;s++){for(var l=0;l<r;l++)n[l]=e[l*t+s];for(uze(n,i,a,o,r),l=0;l<r;l++)e[l*t+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(uze(n,i,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(i[s])}}function uze(e,t,r,n,i){r[0]=0,n[0]=-cC,n[1]=+cC;for(var a=1,o=0;a<i;a++){for(var s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);o++,r[o]=a,n[o]=s,n[o+1]=+cC}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;t[a]=(a-r[o])*(a-r[o])+e[r[o]]}}});var dze=ye((lmr,hze)=>{\"use strict\";var n9t=QFe(),a9t=$S(),o9t=sze(),s9t=KZ(),l9t=fze(),$Z=document.createElement(\"canvas\"),fp=$Z.getContext(\"2d\");hze.exports=u9t;function u9t(e,t){if(!s9t(e))throw Error(\"Argument should be valid svg path string\");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=$Z.width=t.w||t.width||200,n=$Z.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||n9t(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(fp.fillStyle=\"black\",fp.fillRect(0,0,r,n),fp.fillStyle=\"white\",a&&(typeof a!=\"number\"&&(a=1),a>0?fp.strokeStyle=\"white\":fp.strokeStyle=\"black\",fp.lineWidth=Math.abs(a)),fp.translate(r*.5,n*.5),fp.scale(l,l),c9t()){var u=new Path2D(e);fp.fill(u),a&&fp.stroke(u)}else{var c=a9t(e);o9t(fp,c),fp.fill(),a&&fp.stroke()}fp.setTransform(1,0,0,1,0,0);var f=l9t(fp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var jF;function c9t(){if(jF!=null)return jF;var e=document.createElement(\"canvas\").getContext(\"2d\");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return jF=!1;var t=new Path2D(\"M0,0h1v1h-1v-1Z\");e.fillStyle=\"black\",e.fill(t);var r=e.getImageData(0,0,1,1);return jF=r&&r.data&&r.data[3]===255}});var Y2=ye((umr,Aze)=>{\"use strict\";var XF=Eo(),f9t=dze(),WF=J_(),h9t=qa(),i5=Dr(),gh=i5.isArrayOrTypedArray,t5=So(),vze=hf(),pze=$y().formatColor,r5=Ru(),d9t=S3(),eY=BF(),fC=ox(),v9t=N1().DESELECTDIM,gze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p9t=rp().appendArrayPointValue;function g9t(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(r5.hasText(t)&&(n.text=Tze(e,t),n.textSel=yze(e,t,t.selected),n.textUnsel=yze(e,t,t.unselected)),r5.hasMarkers(t)&&(n.marker=rY(e,t),n.markerSel=tY(e,t,t.selected),n.markerUnsel=tY(e,t,t.unselected),!t.unselected&&gh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=v9t*a[r]}if(r5.hasLines(t)){n.line={overlay:!0,thickness:t.line.width*i,color:t.line.color,opacity:t.opacity};var o=(fC.DASHES[t.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=t.line.width*i;n.line.dashes=o}return t.error_x&&t.error_x.visible&&(n.errorX=_ze(t,t.error_x,i)),t.error_y&&t.error_y.visible&&(n.errorY=_ze(t,t.error_y,i)),t.fill&&t.fill!==\"none\"&&(n.fill={closed:!0,fill:t.fillcolor,thickness:0}),n}function Tze(e,t){var r=e._fullLayout,n=t._length,i=t.textfont,a=t.textposition,o=gh(a)?a:[a],s=i.color,l=i.size,u=i.family,c=i.weight,f=i.style,h=i.variant,d={},v,x=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){d.text=[];var p=r._d3locale,C=Array.isArray(b),E=C?Math.min(b.length,n):n,A=C?function(T){return b[T]}:function(){return b};for(v=0;v<E;v++){var L={i:v},_=t._module.formatLabels(L,t,r),k={};p9t(k,t,v);var M=t._meta||{};d.text.push(i5.texttemplateString(A(v),_,p,k,L,M))}}else gh(t.text)&&t.text.length<n?d.text=t.text.slice():d.text=t.text;if(gh(d.text))for(v=d.text.length;v<n;v++)d.text[v]=\"\";for(d.opacity=t.opacity,d.font={},d.align=[],d.baseline=[],v=0;v<o.length;v++){var g=o[v].split(/\\s+/);switch(g[1]){case\"left\":d.align.push(\"right\");break;case\"right\":d.align.push(\"left\");break;default:d.align.push(g[1])}switch(g[0]){case\"top\":d.baseline.push(\"bottom\");break;case\"bottom\":d.baseline.push(\"top\");break;default:d.baseline.push(g[0])}}if(gh(s))for(d.color=new Array(n),v=0;v<n;v++)d.color[v]=s[v];else d.color=s;if(gh(l)||Array.isArray(u)||gh(c)||Array.isArray(f)||Array.isArray(h))for(d.font=new Array(n),v=0;v<n;v++){var P=d.font[v]={};P.size=(i5.isTypedArray(l)?l[v]:gh(l)?XF(l[v])?l[v]:0:l)*x,P.family=Array.isArray(u)?u[v]:u,P.weight=mze(gh(c)?c[v]:c),P.style=Array.isArray(f)?f[v]:f,P.variant=Array.isArray(h)?h[v]:h}else d.font={size:l*x,family:u,weight:mze(c),style:f,variant:h};return d}function mze(e){return e<=1e3?e>500?\"bold\":\"normal\":e}function rY(e,t){var r=t._length,n=t.marker,i={},a,o=gh(n.symbol),s=gh(n.angle),l=gh(n.color),u=gh(n.line.color),c=gh(n.opacity),f=gh(n.size),h=gh(n.line.width),d;if(o||(d=eY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,x=n.angle,b=pze(n,n.opacity,r),p=pze(n.line,n.opacity,r);if(!gh(p[0])){var C=p;for(p=Array(r),a=0;a<r;a++)p[a]=C}if(!gh(b[0])){var E=b;for(b=Array(r),a=0;a<r;a++)b[a]=E}if(!gh(v)){var A=v;for(v=Array(r),a=0;a<r;a++)v[a]=A}if(!gh(x)){var L=x;for(x=Array(r),a=0;a<r;a++)x[a]=L}for(i.symbols=v,i.angles=x,i.colors=b,i.borderColors=p,a=0;a<r;a++)o&&(d=eY.isOpenSymbol(n.symbol[a])),d&&(p[a]=b[a].slice(),b[a]=b[a].slice(),b[a][3]=0);for(i.opacity=t.opacity,i.markers=new Array(r),a=0;a<r;a++)i.markers[a]=wze({mx:i.symbols[a],ma:i.angles[a]},t)}else d?(i.color=WF(n.color,\"uint8\"),i.color[3]=0,i.borderColor=WF(n.color,\"uint8\")):(i.color=WF(n.color,\"uint8\"),i.borderColor=WF(n.line.color,\"uint8\")),i.opacity=t.opacity*n.opacity,i.marker=wze({mx:n.symbol,ma:n.angle},t);var _=1,k=d9t(t,_),M;if(f||h){var g=i.sizes=new Array(r),P=i.borderSizes=new Array(r),T=0,z;if(f){for(a=0;a<r;a++)g[a]=k(n.size[a]),T+=g[a];z=T/r}else for(M=k(n.size),a=0;a<r;a++)g[a]=M;if(h)for(a=0;a<r;a++)P[a]=n.line.width[a];else for(M=n.line.width,a=0;a<r;a++)P[a]=M;i.sizeAvg=z}else i.size=k(n&&n.size||10),i.borderSizes=k(n.line.width);return i}function tY(e,t,r){var n=t.marker,i={};return r&&(r.marker&&r.marker.symbol?i=rY(e,i5.extendFlat({},n,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function yze(e,t,r){var n={};if(!r)return n;if(r.textfont){var i={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:i5.extendFlat({},t.textfont)};r.textfont&&i5.extendFlat(i.textfont,r.textfont),n=Tze(e,i)}return n}function _ze(e,t,r){var n={capSize:t.width*2*r,lineWidth:t.thickness*r,color:t.color};return t.copy_ystyle&&(n=e.error_y),n}var xze=fC.SYMBOL_SDF_SIZE,Z2=fC.SYMBOL_SIZE,bze=fC.SYMBOL_STROKE,QZ={},m9t=t5.symbolFuncs[0](Z2*.05);function wze(e,t){var r=e.mx;if(r===\"circle\")return null;var n,i,a=t5.symbolNumber(r),o=t5.symbolFuncs[a%100],s=!!t5.symbolNoDot[a%100],l=!!t5.symbolNoFill[a%100],u=eY.isDotSymbol(r);if(e.ma&&(r+=\"_\"+e.ma),QZ[r])return QZ[r];var c=t5.getMarkerAngle(e,t);return u&&!s?n=o(Z2*1.1,c)+m9t:n=o(Z2,c),i=f9t(n,{w:xze,h:xze,viewBox:[-Z2,-Z2,Z2,Z2],stroke:l?bze:-bze}),QZ[r]=i,i||null}function y9t(e,t,r){var n=r.length,i=n/2,a,o;if(r5.hasLines(t)&&i)if(t.line.shape===\"hv\"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2+2],r[o*2+1]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else if(t.line.shape===\"hvh\"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var s=(r[o*2]+r[o*2+2])/2;a.push(r[o*2],r[o*2+1],s,r[o*2+1],s,r[o*2+3])}a.push(r[n-2],r[n-1])}else if(t.line.shape===\"vhv\"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var l=(r[o*2+1]+r[o*2+3])/2;a.push(r[o*2],r[o*2+1],r[o*2],l,r[o*2+2],l)}a.push(r[n-2],r[n-1])}else if(t.line.shape===\"vh\"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2],r[o*2+3]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else a=r;var u=!1;for(o=0;o<a.length;o++)if(isNaN(a[o])){u=!0;break}var c=u||a.length>fC.TOO_MANY_POINTS||r5.hasMarkers(t)?\"rect\":\"round\";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o<a.length;o+=2)isNaN(a[o])||isNaN(a[o+1])?(a[o]=f,a[o+1]=h):(f=a[o],h=a[o+1])}return{join:c,positions:a}}function _9t(e,t,r,n,i){var a=h9t.getComponentMethod(\"errorbars\",\"makeComputeError\"),o=vze.getFromId(e,t.xaxis,\"x\"),s=vze.getFromId(e,t.yaxis,\"y\"),l=r.length/2,u={};function c(f,h){var d=h._id.charAt(0),v=t[\"error_\"+d];if(v&&v.visible&&(h.type===\"linear\"||h.type===\"log\")){for(var x=a(v),b={x:0,y:1}[d],p={x:[0,1,2,3],y:[2,3,0,1]}[d],C=new Float64Array(4*l),E=1/0,A=-1/0,L=0,_=0;L<l;L++,_+=4){var k=f[L];if(XF(k)){var M=r[L*2+b],g=x(k,L),P=g[0],T=g[1];if(XF(P)&&XF(T)){var z=k-P,O=k+T;C[_+p[0]]=M-h.c2l(z),C[_+p[1]]=h.c2l(O)-M,C[_+p[2]]=0,C[_+p[3]]=0,E=Math.min(E,k-P),A=Math.max(A,k+T)}}}u[d]={positions:r,errors:C,_bnds:[E,A]}}}return c(n,o),c(i,s),u}function x9t(e,t,r,n){var i=t._length,a={},o;if(r5.hasMarkers(t)){var s=r.font,l=r.align,u=r.baseline;for(a.offset=new Array(i),o=0;o<i;o++){var c=n.sizes?n.sizes[o]:n.size,f=gh(s)?s[o].size:s.size,h=gh(l)?l.length>1?l[o]:l[0]:l,d=gh(u)?u.length>1?u[o]:u[0]:u,v=gze[h],x=gze[d],b=c?c/.8+1:0,p=-x*b-x*.5;a.offset[o]=[v*b/f,p/f]}}return a}Aze.exports={style:g9t,markerStyle:rY,markerSelection:tY,linePositions:y9t,errorBarPositions:_9t,textPosition:x9t}});var iY=ye((cmr,Sze)=>{\"use strict\";var ZF=Dr();Sze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){ZF.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=ZF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u<n.count;u++)n.glText[u].update(s)},n.draw=function(){for(var s=n.count,l=n.fill2d,u=n.error2d,c=n.line2d,f=n.scatter2d,h=n.glText,d=n.select2d,v=n.selectBatch,x=n.unselectBatch,b=0;b<s;b++){if(l&&n.fillOrder[b]&&l.draw(n.fillOrder[b]),c&&n.lineOptions[b]&&c.draw(b),u&&(n.errorXOptions[b]&&u.draw(b),n.errorYOptions[b]&&u.draw(b+s)),f&&n.markerOptions[b])if(x[b].length){var p=ZF.repeat([],n.count);p[b]=x[b],f.draw(p)}else v[b].length||f.draw(b);h[b]&&n.textOptions[b]&&h[b].render()}d&&d.draw(v),n.dirty=!1},n.destroy=function(){n.fill2d&&n.fill2d.destroy&&n.fill2d.destroy(),n.scatter2d&&n.scatter2d.destroy&&n.scatter2d.destroy(),n.error2d&&n.error2d.destroy&&n.error2d.destroy(),n.line2d&&n.line2d.destroy&&n.line2d.destroy(),n.select2d&&n.select2d.destroy&&n.select2d.destroy(),n.glText&&n.glText.forEach(function(s){s.destroy&&s.destroy()}),n.lineOptions=null,n.fillOptions=null,n.markerOptions=null,n.markerSelectedOptions=null,n.markerUnselectedOptions=null,n.errorXOptions=null,n.errorYOptions=null,n.textOptions=null,n.textSelectedOptions=null,n.textUnselectedOptions=null,n.selectBatch=null,n.unselectBatch=null,r._scene=null}),n.dirty||ZF.extendFlat(n,i),n}});var Pze=ye((fmr,Lze)=>{\"use strict\";var b9t=UF(),n5=Dr(),Mze=hf(),w9t=wg().findExtremes,Eze=Rg(),nY=O0(),T9t=nY.calcMarkerSize,A9t=nY.calcAxisExpansion,S9t=nY.setFirstScatter,M9t=F0(),a5=Y2(),E9t=iY(),Cze=hs().BADNUM,C9t=ox().TOO_MANY_POINTS;Lze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Mze.getFromId(t,r.xaxis,\"x\"),a=r._yA=Mze.getFromId(t,r.yaxis,\"y\"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=C9t,u=s*2,c={},f,h=i.makeCalcdata(r,\"x\"),d=a.makeCalcdata(r,\"y\"),v=Eze(r,i,\"x\",h),x=Eze(r,a,\"y\",d),b=v.vals,p=x.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var C=new Array(u),E=new Array(s);for(f=0;f<s;f++)C[f*2]=b[f]===Cze?NaN:b[f],C[f*2+1]=p[f]===Cze?NaN:p[f],E[f]=f;if(i.type===\"log\")for(f=0;f<u;f+=2)C[f]=i.c2l(C[f]);if(a.type===\"log\")for(f=1;f<u;f+=2)C[f]=a.c2l(C[f]);l&&i.type!==\"log\"&&a.type!==\"log\"?c.tree=b9t(C):c.ids=E,M9t(t,r);var A=k9t(t,o,r,C,b,p),L=E9t(t,o);S9t(n,r);var _;return l?A.marker&&(_=A.marker.sizeAvg||Math.max(A.marker.size,3)):_=T9t(r,s),A9t(t,r,i,a,b,p,_),A.errorX&&kze(r,i,A.errorX),A.errorY&&kze(r,a,A.errorY),A.fill&&!L.fill2d&&(L.fill2d=!0),A.marker&&!L.scatter2d&&(L.scatter2d=!0),A.line&&!L.line2d&&(L.line2d=!0),(A.errorX||A.errorY)&&!L.error2d&&(L.error2d=!0),A.text&&!L.glText&&(L.glText=!0),A.marker&&(A.marker.snap=s),L.lineOptions.push(A.line),L.errorXOptions.push(A.errorX),L.errorYOptions.push(A.errorY),L.fillOptions.push(A.fill),L.markerOptions.push(A.marker),L.markerSelectedOptions.push(A.markerSel),L.markerUnselectedOptions.push(A.markerUnsel),L.textOptions.push(A.text),L.textSelectedOptions.push(A.textSel),L.textUnselectedOptions.push(A.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),c._scene=L,c.index=L.count,c.x=b,c.y=p,c.positions=C,L.count++,[{x:!1,y:!1,t:c,trace:r}]};function kze(e,t,r){var n=e._extremes[t._id],i=w9t(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function k9t(e,t,r,n,i,a){var o=a5.style(e,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&n5.extendFlat(o.line,a5.linePositions(e,r,n)),o.errorX||o.errorY){var s=a5.errorBarPositions(e,r,n,i,a);o.errorX&&n5.extendFlat(o.errorX,s.x),o.errorY&&n5.extendFlat(o.errorY,s.y)}return o.text&&(n5.extendFlat(o.text,{positions:n},a5.textPosition(e,r,o.text,o.marker)),n5.extendFlat(o.textSel,{positions:n},a5.textPosition(e,r,o.text,o.markerSel)),n5.extendFlat(o.textUnsel,{positions:n},a5.textPosition(e,r,o.text,o.markerUnsel))),o}});var aY=ye((hmr,Rze)=>{\"use strict\";var Ize=Dr(),L9t=Ca(),P9t=N1().DESELECTDIM;function I9t(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=Ize.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,x=c.color,b=l.color,p=Ize.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h<o.length;h++)d=o[h],f.color[d]=v||(p?b[d]:b);for(h=0;h<s.length;h++){d=s[h];var C=p?b[d]:b;f.color[d]=x||(v?C:L9t.addOpacity(C,P9t))}}i.glText[a].update(f)}Rze.exports={styleTextSelection:I9t}});var oY=ye((dmr,Fze)=>{\"use strict\";var Dze=Ru(),R9t=aY().styleTextSelection;Fze.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=Dze.hasText(s),x=Dze.hasMarkers(s),b=!x&&!v;if(s.visible!==!0||b)return o;var p=[],C=[];if(r!==!1&&!r.degenerate)for(var E=0;E<u;E++)r.contains([l.xpx[E],l.ypx[E]],!1,E,t)?(p.push(E),o.push({pointNumber:E,x:i.c2d(c[E]),y:a.c2d(f[E])})):C.push(E);if(x){var A=h.scatter2d;if(!p.length&&!C.length){var L=new Array(h.count);L[d]=h.markerOptions[d],A.update.apply(A,L)}else if(!h.selectBatch[d].length&&!h.unselectBatch[d].length){var _=new Array(h.count);_[d]=h.markerUnselectedOptions[d],A.update.apply(A,_)}}return h.selectBatch[d]=p,h.unselectBatch[d]=C,v&&R9t(n),o}});var Oze=ye((vmr,zze)=>{\"use strict\";var D9t=qF();zze.exports={moduleType:\"trace\",name:\"scattergl\",basePlotModule:vh(),categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\"],attributes:sC(),supplyDefaults:yFe(),crossTraceDefaults:iU(),colorbar:$d(),formatLabels:xFe(),calc:Pze(),hoverPoints:D9t.hoverPoints,selectPoints:oY(),meta:{}}});var Bze=ye((pmr,KF)=>{\"use strict\";var YF=XE();KF.exports=qze;KF.exports.to=qze;KF.exports.from=F9t;function qze(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=YF(r,0,255)&255,n=YF(n,0,255)&255,i=YF(i,0,255)&255,a=YF(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function F9t(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Fh=ye((gmr,Uze)=>{\"use strict\";var Nze=Object.getOwnPropertySymbols,z9t=Object.prototype.hasOwnProperty,O9t=Object.prototype.propertyIsEnumerable;function q9t(e){if(e==null)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}function B9t(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",Object.getOwnPropertyNames(e)[0]===\"5\")return!1;for(var t={},r=0;r<10;r++)t[\"_\"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join(\"\")!==\"0123456789\")return!1;var i={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join(\"\")===\"abcdefghijklmnopqrst\"}catch(a){return!1}}Uze.exports=B9t()?Object.assign:function(e,t){for(var r,n=q9t(e),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)z9t.call(r,o)&&(n[o]=r[o]);if(Nze){i=Nze(r);for(var s=0;s<i.length;s++)O9t.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n}});var Gze=ye((mmr,Vze)=>{Vze.exports=function(e){typeof e==\"string\"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n<e.length-1;n++)r.push(e[n],t[n]||\"\");return r.push(e[n]),r.join(\"\")}});var sY=ye((ymr,Hze)=>{\"use strict\";Hze.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i<a;i++){var o=n[i];for(var s in o)if(!(r[s]!==void 0&&!Array.isArray(r[s])&&t[s]===r[s])&&s in r){var l;if(o[s]===!0)l=r[s];else{if(o[s]===!1)continue;if(typeof o[s]==\"function\"&&(l=o[s](r[s],t,r),l===void 0))continue}t[s]=l}}return t}});var Wze=ye((_mr,jze)=>{\"use strict\";jze.exports=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))});var JF=ye((xmr,o5)=>{\"use strict\";o5.exports=hC;o5.exports.float32=o5.exports.float=hC;o5.exports.fract32=o5.exports.fract=N9t;var Xze=new Float32Array(1);function N9t(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=hC(e));for(var r=0,n=t.length;r<n;r++)t[r]=e[r]-t[r];return t}return hC(e-hC(e))}function hC(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(Xze[0]=e,Xze[0])}});var uY=ye((bmr,Kze)=>{\"use strict\";function U9t(e,t){var r=e==null?null:typeof Symbol!=\"undefined\"&&e[Symbol.iterator]||e[\"@@iterator\"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function V9t(e,t){return j9t(e)||U9t(e,t)||Yze(e,t)||Z9t()}function G9t(e){return H9t(e)||W9t(e)||Yze(e)||X9t()}function H9t(e){if(Array.isArray(e))return lY(e)}function j9t(e){if(Array.isArray(e))return e}function W9t(e){if(typeof Symbol!=\"undefined\"&&e[Symbol.iterator]!=null||e[\"@@iterator\"]!=null)return Array.from(e)}function Yze(e,t){if(e){if(typeof e==\"string\")return lY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===\"Object\"&&e.constructor&&(r=e.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(e);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lY(e,t)}}function lY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function X9t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z9t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Y9t=J_(),K9t=j2(),J9t=Bze(),$9t=UF(),K2=Fh(),$F=Gze(),Q9t=Xm(),eOt=sY(),tOt=W2(),Zze=Wze(),QF=JF(),rOt=e5(),iOt=nv;function nv(e,t){var r=this;if(!(this instanceof nv))return new nv(e,t);typeof e==\"function\"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;var n=e._gl,i,a=[],o={},s=[],l=[null],u=[null],c=255,f=100;this.tooManyColors=Zze,i=e.texture({data:new Uint8Array(c*4),width:c,height:1,type:\"uint8\",format:\"rgba\",wrapS:\"clamp\",wrapT:\"clamp\",mag:\"nearest\",min:\"nearest\"}),K2(this,{regl:e,gl:n,groups:s,markerCache:u,markerTextures:l,palette:a,paletteIds:o,paletteTexture:i,maxColors:c,maxSize:f,canvas:n.canvas}),this.update(t);var h={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop(\"opacity\"),paletteSize:function(b,p){return[r.tooManyColors?0:c,i.height]},pixelRatio:e.context(\"pixelRatio\"),scale:e.prop(\"scale\"),scaleFract:e.prop(\"scaleFract\"),translate:e.prop(\"translate\"),translateFract:e.prop(\"translateFract\"),markerTexture:e.prop(\"markerTexture\"),paletteTexture:i},attributes:{x:function(b,p){return p.xAttr||{buffer:p.positionBuffer,stride:8,offset:0}},y:function(b,p){return p.yAttr||{buffer:p.positionBuffer,stride:8,offset:4}},xFract:function(b,p){return p.xAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:0}},yFract:function(b,p){return p.yAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:4}},size:function(b,p){return p.size.length?{buffer:p.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(p.size*255/r.maxSize)]}},borderSize:function(b,p){return p.borderSize.length?{buffer:p.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(p.borderSize*255/r.maxSize)]}},colorId:function(b,p){return p.color.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(p.color*4,p.color*4+4):[p.color]}},borderColorId:function(b,p){return p.borderColor.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(p.borderColor*4,p.borderColor*4+4):[p.borderColor]}},isActive:function(b,p){return p.activation===!0?{constant:[1]}:p.activation?p.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop(\"elements\"),count:e.prop(\"count\"),offset:e.prop(\"offset\"),primitive:\"points\"},d=K2({},h);d.frag=$F([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform float opacity;\n",
       "uniform sampler2D markerTexture;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragWidth, fragBorderColorLevel, fragColorLevel;\n",
       "\n",
       "float smoothStep(float x, float y) {\n",
       "  return 1.0 / (1.0 + exp(50.0*(x - y)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;\n",
       "\n",
       "  // max-distance alpha\n",
       "  if (dist < 0.003) discard;\n",
       "\n",
       "  // null-border case\n",
       "  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n",
       "    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n",
       "    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n",
       "  }\n",
       "  else {\n",
       "    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n",
       "    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n",
       "\n",
       "    vec4 color = fragBorderColor;\n",
       "    color.a *= borderColorAmt;\n",
       "    color = mix(color, fragColor, colorAmt);\n",
       "    color.a *= opacity;\n",
       "\n",
       "    gl_FragColor = color;\n",
       "  }\n",
       "\n",
       "}\n",
       "`]),d.vert=$F([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute float x, y, xFract, yFract;\n",
       "attribute float size, borderSize;\n",
       "attribute vec4 colorId, borderColorId;\n",
       "attribute float isActive;\n",
       "\n",
       "// \\`invariant\\` effectively turns off optimizations for the position.\n",
       "// We need this because -fast-math on M1 Macs is re-ordering\n",
       "// floating point operations in a way that causes floating point\n",
       "// precision limits to put points in the wrong locations.\n",
       "invariant gl_Position;\n",
       "\n",
       "uniform bool constPointSize;\n",
       "uniform float pixelRatio;\n",
       "uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\n",
       "uniform sampler2D paletteTexture;\n",
       "\n",
       "const float maxSize = 100.;\n",
       "const float borderLevel = .5;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\n",
       "\n",
       "float pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n",
       "\n",
       "bool isDirect = (paletteSize.x < 1.);\n",
       "\n",
       "vec4 getColor(vec4 id) {\n",
       "  return isDirect ? id / 255. : texture2D(paletteTexture,\n",
       "    vec2(\n",
       "      (id.x + .5) / paletteSize.x,\n",
       "      (id.y + .5) / paletteSize.y\n",
       "    )\n",
       "  );\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  // ignore inactive points\n",
       "  if (isActive == 0.) return;\n",
       "\n",
       "  vec2 position = vec2(x, y);\n",
       "  vec2 positionFract = vec2(xFract, yFract);\n",
       "\n",
       "  vec4 color = getColor(colorId);\n",
       "  vec4 borderColor = getColor(borderColorId);\n",
       "\n",
       "  float size = size * maxSize / 255.;\n",
       "  float borderSize = borderSize * maxSize / 255.;\n",
       "\n",
       "  gl_PointSize = 2. * size * pointSizeScale;\n",
       "  fragPointSize = size * pixelRatio;\n",
       "\n",
       "  vec2 pos = (position + translate) * scale\n",
       "      + (positionFract + translateFract) * scale\n",
       "      + (position + translate) * scaleFract\n",
       "      + (positionFract + translateFract) * scaleFract;\n",
       "\n",
       "  gl_Position = vec4(pos * 2. - 1., 0., 1.);\n",
       "\n",
       "  fragColor = color;\n",
       "  fragBorderColor = borderColor;\n",
       "  fragWidth = 1. / gl_PointSize;\n",
       "\n",
       "  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n",
       "  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n",
       "}\n",
       "`]),this.drawMarker=e(d);var v=K2({},h);v.frag=$F([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragBorderRadius, fragWidth;\n",
       "\n",
       "uniform float opacity;\n",
       "\n",
       "float smoothStep(float edge0, float edge1, float x) {\n",
       "\tfloat t;\n",
       "\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n",
       "\treturn t * t * (3.0 - 2.0 * t);\n",
       "}\n",
       "\n",
       "void main() {\n",
       "\tfloat radius, alpha = 1.0, delta = fragWidth;\n",
       "\n",
       "\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n",
       "\n",
       "\tif (radius > 1.0 + delta) {\n",
       "\t\tdiscard;\n",
       "\t}\n",
       "\n",
       "\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n",
       "\n",
       "\tfloat borderRadius = fragBorderRadius;\n",
       "\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n",
       "\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n",
       "\tcolor.a *= alpha * opacity;\n",
       "\tgl_FragColor = color;\n",
       "}\n",
       "`]),v.vert=$F([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute float x, y, xFract, yFract;\n",
       "attribute float size, borderSize;\n",
       "attribute vec4 colorId, borderColorId;\n",
       "attribute float isActive;\n",
       "\n",
       "// \\`invariant\\` effectively turns off optimizations for the position.\n",
       "// We need this because -fast-math on M1 Macs is re-ordering\n",
       "// floating point operations in a way that causes floating point\n",
       "// precision limits to put points in the wrong locations.\n",
       "invariant gl_Position;\n",
       "\n",
       "uniform bool constPointSize;\n",
       "uniform float pixelRatio;\n",
       "uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\n",
       "uniform sampler2D paletteTexture;\n",
       "\n",
       "const float maxSize = 100.;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragBorderRadius, fragWidth;\n",
       "\n",
       "float pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n",
       "\n",
       "bool isDirect = (paletteSize.x < 1.);\n",
       "\n",
       "vec4 getColor(vec4 id) {\n",
       "  return isDirect ? id / 255. : texture2D(paletteTexture,\n",
       "    vec2(\n",
       "      (id.x + .5) / paletteSize.x,\n",
       "      (id.y + .5) / paletteSize.y\n",
       "    )\n",
       "  );\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  // ignore inactive points\n",
       "  if (isActive == 0.) return;\n",
       "\n",
       "  vec2 position = vec2(x, y);\n",
       "  vec2 positionFract = vec2(xFract, yFract);\n",
       "\n",
       "  vec4 color = getColor(colorId);\n",
       "  vec4 borderColor = getColor(borderColorId);\n",
       "\n",
       "  float size = size * maxSize / 255.;\n",
       "  float borderSize = borderSize * maxSize / 255.;\n",
       "\n",
       "  gl_PointSize = (size + borderSize) * pointSizeScale;\n",
       "\n",
       "  vec2 pos = (position + translate) * scale\n",
       "      + (positionFract + translateFract) * scale\n",
       "      + (position + translate) * scaleFract\n",
       "      + (positionFract + translateFract) * scaleFract;\n",
       "\n",
       "  gl_Position = vec4(pos * 2. - 1., 0., 1.);\n",
       "\n",
       "  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n",
       "  fragColor = color;\n",
       "  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n",
       "  fragWidth = 1. / gl_PointSize;\n",
       "}\n",
       "`]),Zze&&(v.frag=v.frag.replace(\"smoothstep\",\"smoothStep\"),d.frag=d.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=e(v)}nv.defaults={color:\"black\",borderColor:\"transparent\",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};nv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};nv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=this.groups;if(r.length===1&&Array.isArray(r[0])&&(r[0][0]===null||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var a=0;a<r.length;a++)this.drawItem(a,r[a]);else i.forEach(function(o,s){e.drawItem(s)});return this};nv.prototype.drawItem=function(e,t){var r=this.groups,n=r[e];if(typeof t==\"number\"&&(e=t,n=r[t],t=null),!!(n&&n.count&&n.opacity)){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));for(var i=[],a=1;a<n.activation.length;a++)!n.activation[a]||n.activation[a]!==!0&&!n.activation[a].data.length||i.push.apply(i,G9t(this.getMarkerDrawOptions(a,n,t)));i.length&&this.drawMarker(i)}};nv.prototype.getMarkerDrawOptions=function(e,t,r){var n=t.range,i=t.tree,a=t.viewport,o=t.activation,s=t.selectionBuffer,l=t.count,u=this.regl;if(!i)return r?[K2({},t,{markerTexture:this.markerTextures[e],activation:o[e],count:r.length,elements:r,offset:0})]:[K2({},t,{markerTexture:this.markerTextures[e],activation:o[e],offset:0})];var c=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[e],d=h.data,v=new Uint8Array(l),x=0;x<r.length;x++){var b=r[x];v[b]=d?d[b]:1}s.subdata(v)}for(var p=f.length;p--;){var C=V9t(f[p],2),E=C[0],A=C[1];c.push(K2({},t,{markerTexture:this.markerTextures[e],activation:r?s:o[e],offset:E,count:A-E}))}return c};nv.prototype.update=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length){r.length===1&&Array.isArray(r[0])&&(r=r[0]);var i=this.groups,a=this.gl,o=this.regl,s=this.maxSize,l=this.maxColors,u=this.palette;this.groups=i=r.map(function(c,f){var h=i[f];if(c===void 0)return h;c===null?c={positions:null}:typeof c==\"function\"?c={ondraw:c}:typeof c[0]==\"number\"&&(c={positions:c}),c=Q9t(c,{positions:\"positions data points\",snap:\"snap cluster lod tree\",size:\"sizes size radius\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",color:\"colors color fill fill-color fillColor\",borderColor:\"borderColors borderColor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range dataBox databox\",viewport:\"viewport viewPort viewBox viewbox\",opacity:\"opacity alpha transparency\",bounds:\"bound bounds boundaries limits\",tooManyColors:\"tooManyColors palette paletteMode optimizePalette enablePalette\"}),c.positions===null&&(c.positions=[]),c.tooManyColors!=null&&(e.tooManyColors=c.tooManyColors),h||(i[f]=h={id:f,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:o.buffer({data:new Uint8Array(0),usage:\"stream\",type:\"uint8\"}),sizeBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),colorBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),positionBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"}),positionFractBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"})},c=K2({},nv.defaults,c)),c.positions&&!(\"marker\"in c)&&(c.marker=h.marker,delete h.marker),c.marker&&!(\"positions\"in c)&&(c.positions=h.positions,delete h.positions);var d=0,v=0;if(eOt(h,c,[{snap:!0,size:function(H,N){return H==null&&(H=nv.defaults.size),d+=H&&H.length?1:0,H},borderSize:function(H,N){return H==null&&(H=nv.defaults.borderSize),d+=H&&H.length?1:0,H},opacity:parseFloat,color:function(H,N){return H==null&&(H=nv.defaults.color),H=e.updateColor(H),v++,H},borderColor:function(H,N){return H==null&&(H=nv.defaults.borderColor),H=e.updateColor(H),v++,H},bounds:function(H,N,j){return\"range\"in j||(j.range=null),H},positions:function(H,N,j){var re=N.snap,oe=N.positionBuffer,_e=N.positionFractBuffer,Me=N.selectionBuffer;if(H.x||H.y)return H.x.length?N.xAttr={buffer:o.buffer(H.x),offset:0,stride:4,count:H.x.length}:N.xAttr={buffer:H.x.buffer,offset:H.x.offset*4||0,stride:(H.x.stride||1)*4,count:H.x.count},H.y.length?N.yAttr={buffer:o.buffer(H.y),offset:0,stride:4,count:H.y.length}:N.yAttr={buffer:H.y.buffer,offset:H.y.offset*4||0,stride:(H.y.stride||1)*4,count:H.y.count},N.count=Math.max(N.xAttr.count,N.yAttr.count),H;H=tOt(H,\"float64\");var ke=N.count=Math.floor(H.length/2),me=N.bounds=ke?K9t(H,2):null;if(!j.range&&!N.range&&(delete N.range,j.range=me),!j.marker&&!N.marker&&(delete N.marker,j.marker=null),re&&(re===!0||ke>re)?N.tree=$9t(H,{bounds:me}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:\"points\",usage:\"static\",data:N.tree,type:\"uint32\"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=QF.float32(H);oe({data:Se,usage:\"dynamic\"});var Le=QF.fract32(H,Se);return _e({data:Le,usage:\"dynamic\"}),Me({data:new Uint8Array(ke),type:\"uint8\",usage:\"stream\"}),H}},{marker:function(H,N,j){var re=N.activation;if(re.forEach(function(Le){return Le&&Le.destroy&&Le.destroy()}),re.length=0,!H||typeof H[0]==\"number\"){var oe=e.addMarker(H);re[oe]=!0}else{for(var _e=[],Me=0,ke=Math.min(H.length,N.count);Me<ke;Me++){var me=e.addMarker(H[Me]);_e[me]||(_e[me]=new Uint8Array(N.count)),_e[me][Me]=1}for(var ie=0;ie<_e.length;ie++)if(_e[ie]){var Se={data:_e[ie],type:\"uint8\",usage:\"static\"};re[ie]?re[ie](Se):re[ie]=o.buffer(Se),re[ie].data=_e[ie]}}return H},range:function(H,N,j){var re=N.bounds;if(re)return H||(H=re),N.scale=[1/(H[2]-H[0]),1/(H[3]-H[1])],N.translate=[-H[0],-H[1]],N.scaleFract=QF.fract(N.scale),N.translateFract=QF.fract(N.translate),H},viewport:function(H){var N=rOt(H||[a.drawingBufferWidth,a.drawingBufferHeight]);return N}}]),d){var x=h,b=x.count,p=x.size,C=x.borderSize,E=x.sizeBuffer,A=new Uint8Array(b*2);if(p.length||C.length)for(var L=0;L<b;L++)A[L*2]=Math.round((p[L]==null?p:p[L])*255/s),A[L*2+1]=Math.round((C[L]==null?C:C[L])*255/s);E({data:A,usage:\"dynamic\"})}if(v){var _=h,k=_.count,M=_.color,g=_.borderColor,P=_.colorBuffer,T;if(e.tooManyColors){if(M.length||g.length){T=new Uint8Array(k*8);for(var z=0;z<k;z++){var O=M[z];T[z*8]=u[O*4],T[z*8+1]=u[O*4+1],T[z*8+2]=u[O*4+2],T[z*8+3]=u[O*4+3];var V=g[z];T[z*8+4]=u[V*4],T[z*8+5]=u[V*4+1],T[z*8+6]=u[V*4+2],T[z*8+7]=u[V*4+3]}}}else if(M.length||g.length){T=new Uint8Array(k*4+2);for(var G=0;G<k;G++)M[G]!=null&&(T[G*4]=M[G]%l,T[G*4+1]=Math.floor(M[G]/l)),g[G]!=null&&(T[G*4+2]=g[G]%l,T[G*4+3]=Math.floor(g[G]/l))}P({data:T||new Uint8Array(0),type:\"uint8\",usage:\"dynamic\"})}return h})}};nv.prototype.addMarker=function(e){var t=this.markerTextures,r=this.regl,n=this.markerCache,i=e==null?0:n.indexOf(e);if(i>=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;o<s;o++)a[o]=e[o]*255}var l=Math.floor(Math.sqrt(a.length));return i=t.length,n.push(e),t.push(r.texture({channels:1,data:a,radius:l,mag:\"linear\",min:\"linear\"})),i};nv.prototype.updateColor=function(e){var t=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(e)||(e=[e]);var i=[];if(typeof e[0]==\"number\"){var a=[];if(Array.isArray(e))for(var o=0;o<e.length;o+=4)a.push(e.slice(o,o+4));else for(var s=0;s<e.length;s+=4)a.push(e.subarray(s,s+4));e=a}for(var l=0;l<e.length;l++){var u=e[l];u=Y9t(u,\"uint8\");var c=J9t(u,!1);if(t[c]==null){var f=r.length;t[c]=Math.floor(f/4),r[f]=u[0],r[f+1]=u[1],r[f+2]=u[2],r[f+3]=u[3]}i[l]=t[c]}return!this.tooManyColors&&r.length>n*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i<n*t;i++)e.push(0,0,0,0)}r.height<n&&r.resize(t,n),r.subimage({width:Math.min(e.length*.25,t),height:n,data:e},0,0)}};nv.prototype.destroy=function(){return this.groups.forEach(function(e){e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(function(t){return t&&t.destroy&&t.destroy()}),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(e){return e&&e.destroy&&e.destroy()}),this};var nOt=Fh(),aOt=function(t,r){var n=new iOt(t,r),i=n.render.bind(n);return nOt(i,{render:i,update:n.update.bind(n),draw:n.draw.bind(n),destroy:n.destroy.bind(n),regl:n.regl,gl:n.gl,canvas:n.gl.canvas,groups:n.groups,markers:n.markerCache,palette:n.palette}),i};Kze.exports=aOt});var t7e=ye((wmr,dY)=>{\"use strict\";dY.exports=rz;dY.exports.default=rz;function rz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=$ze(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=cOt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;v<i;v+=r)f=e[v],h=e[v+1],f<s&&(s=f),h<l&&(l=h),f>u&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return dC(a,o,r,s,l,d,0),o}function $ze(e,t,r,n,i){var a,o;if(i===hY(e,t,r,n)>0)for(a=t;a<r;a+=n)o=Jze(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=Jze(a,e[a],e[a+1],o);return o&&iz(o,o.next)&&(pC(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(iz(r,r.next)||mh(r.prev,r,r.next)===0)){if(pC(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function dC(e,t,r,n,i,a,o){if(e){!o&&a&&pOt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?sOt(e,n,i,a):oOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),pC(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=lOt(J2(e),t,r),dC(e,t,r,n,i,a,2)):o===2&&uOt(e,t,r,n,i,a):dC(J2(e),t,r,n,i,a,1);break}}}}function oOt(e){var t=e.prev,r=e,n=e.next;if(mh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=i<a?i<o?i:o:a<o?a:o,f=s<l?s<u?s:u:l<u?l:u,h=i>a?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&s5(i,s,a,l,o,u,v.x,v.y)&&mh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function sOt(e,t,r,n){var i=e.prev,a=e,o=e.next;if(mh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=s<l?s<u?s:u:l<u?l:u,v=c<f?c<h?c:h:f<h?f:h,x=s>l?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=cY(d,v,t,r,n),C=cY(x,b,t,r,n),E=e.prevZ,A=e.nextZ;E&&E.z>=p&&A&&A.z<=C;){if(E.x>=d&&E.x<=x&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&s5(s,c,l,f,u,h,E.x,E.y)&&mh(E.prev,E,E.next)>=0||(E=E.prevZ,A.x>=d&&A.x<=x&&A.y>=v&&A.y<=b&&A!==i&&A!==o&&s5(s,c,l,f,u,h,A.x,A.y)&&mh(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;E&&E.z>=p;){if(E.x>=d&&E.x<=x&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&s5(s,c,l,f,u,h,E.x,E.y)&&mh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;A&&A.z<=C;){if(A.x>=d&&A.x<=x&&A.y>=v&&A.y<=b&&A!==i&&A!==o&&s5(s,c,l,f,u,h,A.x,A.y)&&mh(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function lOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!iz(i,a)&&Qze(i,n,n.next,a)&&vC(i,a)&&vC(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),pC(n),pC(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function uOt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&yOt(o,s)){var l=e7e(o,s);o=J2(o,o.next),l=J2(l,l.next),dC(o,t,r,n,i,a,0),dC(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function cOt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a<o;a++)s=t[a]*n,l=a<o-1?t[a+1]*n:e.length,u=$ze(e,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(mOt(u));for(i.sort(fOt),a=0;a<i.length;a++)r=hOt(i[a],r);return r}function fOt(e,t){return e.x-t.x}function hOt(e,t){var r=dOt(e,t);if(!r)return t;var n=e7e(r,e);return J2(n,n.next),J2(r,r.next)}function dOt(e,t){var r=t,n=e.x,i=e.y,a=-1/0,o;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x<r.next.x?r:r.next,s===n))return o}r=r.next}while(r!==t);if(!o)return null;var l=o,u=o.x,c=o.y,f=1/0,h;r=o;do n>=r.x&&r.x>=u&&n!==r.x&&s5(i<c?n:a,i,u,c,i<c?a:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),vC(r,e)&&(h<f||h===f&&(r.x>o.x||r.x===o.x&&vOt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function vOt(e,t){return mh(e.prev,e,t.prev)<0&&mh(t.next,e,e.next)<0}function pOt(e,t,r,n){var i=e;do i.z===0&&(i.z=cY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,gOt(i)}function gOt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<u&&(s++,n=n.nextZ,!!n);t++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function cY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function mOt(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function s5(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function yOt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!_Ot(e,t)&&(vC(e,t)&&vC(t,e)&&xOt(e,t)&&(mh(e.prev,e,t.prev)||mh(e,t.prev,t))||iz(e,t)&&mh(e.prev,e,e.next)>0&&mh(t.prev,t,t.next)>0)}function mh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function iz(e,t){return e.x===t.x&&e.y===t.y}function Qze(e,t,r,n){var i=tz(mh(e,t,r)),a=tz(mh(e,t,n)),o=tz(mh(r,n,e)),s=tz(mh(r,n,t));return!!(i!==a&&o!==s||i===0&&ez(e,r,t)||a===0&&ez(e,n,t)||o===0&&ez(r,e,n)||s===0&&ez(r,t,n))}function ez(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function tz(e){return e>0?1:e<0?-1:0}function _Ot(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Qze(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function vC(e,t){return mh(e.prev,e,e.next)<0?mh(e,t,e.next)>=0&&mh(e,e.prev,t)>=0:mh(e,t,e.prev)<0||mh(e,e.next,t)<0}function xOt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function e7e(e,t){var r=new fY(e.i,e.x,e.y),n=new fY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Jze(e,t,r,n){var i=new fY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function pC(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function fY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}rz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(hY(e,0,a,r));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*r,c=s<l-1?t[s+1]*r:e.length;o-=Math.abs(hY(e,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,v=n[s+2]*r;f+=Math.abs((e[h]-e[v])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[v+1]-e[h+1]))}return o===0&&f===0?0:Math.abs((f-o)/o)};function hY(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}rz.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)r.vertices.push(e[i][a][o]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var i7e=ye((Tmr,r7e)=>{\"use strict\";var bOt=j2();r7e.exports=wOt;function wOt(e,t,r){if(!e||e.length==null)throw Error(\"Argument should be an array\");t==null&&(t=1),r==null&&(r=bOt(e,t));for(var n=0;n<t;n++){var i=r[t+n],a=r[n],o=n,s=e.length;if(i===1/0&&a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:e[o]===a?0:.5;else if(i===1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:0;else if(a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===a?0:1;else{var l=i-a;for(o=n;o<s;o+=t)isNaN(e[o])||(e[o]=l===0?.5:(e[o]-a)/l)}}return e}});var a7e=ye((Amr,n7e)=>{\"use strict\";n7e.exports=function(){var e,t;if(typeof WeakMap!=\"function\")return!1;try{e=new WeakMap([[t={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(r){return!1}return!(String(e)!==\"[object WeakMap]\"||typeof e.set!=\"function\"||e.set({},1)!==e||typeof e.delete!=\"function\"||typeof e.has!=\"function\"||e.get(t)!==\"one\")}});var s7e=ye((Smr,o7e)=>{\"use strict\";o7e.exports=function(){}});var sx=ye((Mmr,l7e)=>{\"use strict\";var TOt=s7e()();l7e.exports=function(e){return e!==TOt&&e!==null}});var vY=ye((Emr,c7e)=>{\"use strict\";var AOt=Object.create,SOt=Object.getPrototypeOf,u7e={};c7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||AOt;return typeof e!=\"function\"?!1:SOt(e(t(null),u7e))===u7e}});var pY=ye((Cmr,f7e)=>{\"use strict\";var MOt=sx(),EOt={function:!0,object:!0};f7e.exports=function(e){return MOt(e)&&EOt[typeof e]||!1}});var i1=ye((kmr,h7e)=>{\"use strict\";var COt=sx();h7e.exports=function(e){if(!COt(e))throw new TypeError(\"Cannot use null or undefined\");return e}});var v7e=ye((Lmr,d7e)=>{\"use strict\";var gY=Object.create,nz;vY()()||(nz=mY());d7e.exports=function(){var e,t,r;return!nz||nz.level!==1?gY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n===\"__proto__\"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(nz,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return gY(n===null?e:n,i)})}()});var mY=ye((Pmr,p7e)=>{\"use strict\";var kOt=pY(),LOt=i1(),POt=Object.prototype.isPrototypeOf,IOt=Object.defineProperty,ROt={configurable:!0,enumerable:!1,writable:!0,value:void 0},az;az=function(e,t){if(LOt(e),t===null||kOt(t))return e;throw new TypeError(\"Prototype must be null or an object\")};p7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(az(n,i),i),n}):t=function(n,i){return az(n,i).__proto__=i,n}:t=function n(i,a){var o;return az(i,a),o=POt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&IOt(n.nullPolyfill,\"__proto__\",ROt),i},Object.defineProperty(t,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());v7e()});var oz=ye((Imr,g7e)=>{\"use strict\";g7e.exports=vY()()?Object.setPrototypeOf:mY()});var y7e=ye((Rmr,m7e)=>{\"use strict\";var DOt=pY();m7e.exports=function(e){if(!DOt(e))throw new TypeError(e+\" is not an Object\");return e}});var x7e=ye((Dmr,_7e)=>{\"use strict\";var FOt=Object.create(null),zOt=Math.random;_7e.exports=function(){var e;do e=zOt().toString(36).slice(2);while(FOt[e]);return e}});var $2=ye((Fmr,b7e)=>{\"use strict\";var OOt=void 0;b7e.exports=function(e){return e!==OOt&&e!==null}});var sz=ye((zmr,w7e)=>{\"use strict\";var qOt=$2(),BOt={object:!0,function:!0,undefined:!0};w7e.exports=function(e){return qOt(e)?hasOwnProperty.call(BOt,typeof e):!1}});var A7e=ye((Omr,T7e)=>{\"use strict\";var NOt=sz();T7e.exports=function(e){if(!NOt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var M7e=ye((qmr,S7e)=>{\"use strict\";var UOt=A7e();S7e.exports=function(e){if(typeof e!=\"function\"||!hasOwnProperty.call(e,\"length\"))return!1;try{if(typeof e.length!=\"number\"||typeof e.call!=\"function\"||typeof e.apply!=\"function\")return!1}catch(t){return!1}return!UOt(e)}});var yY=ye((Bmr,E7e)=>{\"use strict\";var VOt=M7e(),GOt=/^\\s*class[\\s{/}]/,HOt=Function.prototype.toString;E7e.exports=function(e){return!(!VOt(e)||GOt.test(HOt.call(e)))}});var k7e=ye((Nmr,C7e)=>{\"use strict\";C7e.exports=function(){var e=Object.assign,t;return typeof e!=\"function\"?!1:(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}});var P7e=ye((Umr,L7e)=>{\"use strict\";L7e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(e){return!1}}});var R7e=ye((Vmr,I7e)=>{\"use strict\";var jOt=sx(),WOt=Object.keys;I7e.exports=function(e){return WOt(jOt(e)?Object(e):e)}});var F7e=ye((Gmr,D7e)=>{\"use strict\";D7e.exports=P7e()()?Object.keys:R7e()});var O7e=ye((Hmr,z7e)=>{\"use strict\";var XOt=F7e(),ZOt=i1(),YOt=Math.max;z7e.exports=function(e,t){var r,n,i=YOt(arguments.length,2),a;for(e=Object(ZOt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n<i;++n)t=arguments[n],XOt(t).forEach(a);if(r!==void 0)throw r;return e}});var lz=ye((jmr,q7e)=>{\"use strict\";q7e.exports=k7e()()?Object.assign:O7e()});var _Y=ye((Wmr,B7e)=>{\"use strict\";var KOt=sx(),JOt=Array.prototype.forEach,$Ot=Object.create,QOt=function(e,t){var r;for(r in e)t[r]=e[r]};B7e.exports=function(e){var t=$Ot(null);return JOt.call(arguments,function(r){KOt(r)&&QOt(Object(r),t)}),t}});var U7e=ye((Xmr,N7e)=>{\"use strict\";var xY=\"razdwatrzy\";N7e.exports=function(){return typeof xY.contains!=\"function\"?!1:xY.contains(\"dwa\")===!0&&xY.contains(\"foo\")===!1}});var G7e=ye((Zmr,V7e)=>{\"use strict\";var eqt=String.prototype.indexOf;V7e.exports=function(e){return eqt.call(this,e,arguments[1])>-1}});var bY=ye((Ymr,H7e)=>{\"use strict\";H7e.exports=U7e()()?String.prototype.contains:G7e()});var n1=ye((Kmr,Z7e)=>{\"use strict\";var uz=$2(),j7e=yY(),W7e=lz(),X7e=_Y(),gC=bY(),tqt=Z7e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!=\"string\"?(a=t,t=e,e=null):a=arguments[2],uz(e)?(r=gC.call(e,\"c\"),n=gC.call(e,\"e\"),i=gC.call(e,\"w\")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?W7e(X7e(a),o):o};tqt.gs=function(e,t,r){var n,i,a,o;return typeof e!=\"string\"?(a=r,r=t,t=e,e=null):a=arguments[3],uz(t)?j7e(t)?uz(r)?j7e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,uz(e)?(n=gC.call(e,\"c\"),i=gC.call(e,\"e\")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?W7e(X7e(a),o):o}});var mC=ye((Jmr,K7e)=>{\"use strict\";var Y7e=Object.prototype.toString,rqt=Y7e.call(function(){return arguments}());K7e.exports=function(e){return Y7e.call(e)===rqt}});var yC=ye(($mr,$7e)=>{\"use strict\";var J7e=Object.prototype.toString,iqt=J7e.call(\"\");$7e.exports=function(e){return typeof e==\"string\"||e&&typeof e==\"object\"&&(e instanceof String||J7e.call(e)===iqt)||!1}});var e9e=ye((Qmr,Q7e)=>{\"use strict\";Q7e.exports=function(){return typeof globalThis!=\"object\"||!globalThis?!1:globalThis.Array===Array}});var i9e=ye((eyr,r9e)=>{var t9e=function(){if(typeof self==\"object\"&&self)return self;if(typeof window==\"object\"&&window)return window;throw new Error(\"Unable to resolve global `this`\")};r9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(e){return t9e()}try{return __global__||t9e()}finally{delete Object.prototype.__global__}}()});var _C=ye((tyr,n9e)=>{\"use strict\";n9e.exports=e9e()()?globalThis:i9e()});var o9e=ye((ryr,a9e)=>{\"use strict\";var nqt=_C(),wY={object:!0,symbol:!0};a9e.exports=function(){var e=nqt.Symbol,t;if(typeof e!=\"function\")return!1;t=e(\"test symbol\");try{String(t)}catch(r){return!1}return!(!wY[typeof e.iterator]||!wY[typeof e.toPrimitive]||!wY[typeof e.toStringTag])}});var l9e=ye((iyr,s9e)=>{\"use strict\";s9e.exports=function(e){return e?typeof e==\"symbol\"?!0:!e.constructor||e.constructor.name!==\"Symbol\"?!1:e[e.constructor.toStringTag]===\"Symbol\":!1}});var TY=ye((nyr,u9e)=>{\"use strict\";var aqt=l9e();u9e.exports=function(e){if(!aqt(e))throw new TypeError(e+\" is not a symbol\");return e}});var v9e=ye((ayr,d9e)=>{\"use strict\";var c9e=n1(),oqt=Object.create,f9e=Object.defineProperty,sqt=Object.prototype,h9e=oqt(null);d9e.exports=function(e){for(var t=0,r,n;h9e[e+(t||\"\")];)++t;return e+=t||\"\",h9e[e]=!0,r=\"@@\"+e,f9e(sqt,r,c9e.gs(null,function(i){n||(n=!0,f9e(this,r,c9e(i)),n=!1)})),r}});var g9e=ye((oyr,p9e)=>{\"use strict\";var Qg=n1(),zh=_C().Symbol;p9e.exports=function(e){return Object.defineProperties(e,{hasInstance:Qg(\"\",zh&&zh.hasInstance||e(\"hasInstance\")),isConcatSpreadable:Qg(\"\",zh&&zh.isConcatSpreadable||e(\"isConcatSpreadable\")),iterator:Qg(\"\",zh&&zh.iterator||e(\"iterator\")),match:Qg(\"\",zh&&zh.match||e(\"match\")),replace:Qg(\"\",zh&&zh.replace||e(\"replace\")),search:Qg(\"\",zh&&zh.search||e(\"search\")),species:Qg(\"\",zh&&zh.species||e(\"species\")),split:Qg(\"\",zh&&zh.split||e(\"split\")),toPrimitive:Qg(\"\",zh&&zh.toPrimitive||e(\"toPrimitive\")),toStringTag:Qg(\"\",zh&&zh.toStringTag||e(\"toStringTag\")),unscopables:Qg(\"\",zh&&zh.unscopables||e(\"unscopables\"))})}});var _9e=ye((syr,y9e)=>{\"use strict\";var m9e=n1(),lqt=TY(),xC=Object.create(null);y9e.exports=function(e){return Object.defineProperties(e,{for:m9e(function(t){return xC[t]?xC[t]:xC[t]=e(String(t))}),keyFor:m9e(function(t){var r;lqt(t);for(r in xC)if(xC[r]===t)return r})})}});var w9e=ye((lyr,b9e)=>{\"use strict\";var Zm=n1(),AY=TY(),cz=_C().Symbol,uqt=v9e(),cqt=g9e(),fqt=_9e(),hqt=Object.create,SY=Object.defineProperties,fz=Object.defineProperty,Wv,l5,x9e;if(typeof cz==\"function\")try{String(cz()),x9e=!0}catch(e){}else cz=null;l5=function(t){if(this instanceof l5)throw new TypeError(\"Symbol is not a constructor\");return Wv(t)};b9e.exports=Wv=function e(t){var r;if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return x9e?cz(t):(r=hqt(l5.prototype),t=t===void 0?\"\":String(t),SY(r,{__description__:Zm(\"\",t),__name__:Zm(\"\",uqt(t))}))};cqt(Wv);fqt(Wv);SY(l5.prototype,{constructor:Zm(Wv),toString:Zm(\"\",function(){return this.__name__})});SY(Wv.prototype,{toString:Zm(function(){return\"Symbol (\"+AY(this).__description__+\")\"}),valueOf:Zm(function(){return AY(this)})});fz(Wv.prototype,Wv.toPrimitive,Zm(\"\",function(){var e=AY(this);return typeof e==\"symbol\"?e:e.toString()}));fz(Wv.prototype,Wv.toStringTag,Zm(\"c\",\"Symbol\"));fz(l5.prototype,Wv.toStringTag,Zm(\"c\",Wv.prototype[Wv.toStringTag]));fz(l5.prototype,Wv.toPrimitive,Zm(\"c\",Wv.prototype[Wv.toPrimitive]))});var lx=ye((uyr,T9e)=>{\"use strict\";T9e.exports=o9e()()?_C().Symbol:w9e()});var S9e=ye((cyr,A9e)=>{\"use strict\";var dqt=i1();A9e.exports=function(){return dqt(this).length=0,this}});var u5=ye((fyr,M9e)=>{\"use strict\";M9e.exports=function(e){if(typeof e!=\"function\")throw new TypeError(e+\" is not a function\");return e}});var C9e=ye((hyr,E9e)=>{\"use strict\";var vqt=$2(),pqt=sz(),gqt=Object.prototype.toString;E9e.exports=function(e){if(!vqt(e))return null;if(pqt(e)){var t=e.toString;if(typeof t!=\"function\"||t===gqt)return null}try{return\"\"+e}catch(r){return null}}});var L9e=ye((dyr,k9e)=>{\"use strict\";k9e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var I9e=ye((vyr,P9e)=>{\"use strict\";var mqt=L9e(),yqt=/[\\n\\r\\u2028\\u2029]/g;P9e.exports=function(e){var t=mqt(e);return t===null?\"<Non-coercible to string value>\":(t.length>100&&(t=t.slice(0,99)+\"\\u2026\"),t=t.replace(yqt,function(r){switch(r){case`\n",
       "`:return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}}),t)}});var MY=ye((pyr,F9e)=>{\"use strict\";var R9e=$2(),_qt=sz(),xqt=C9e(),bqt=I9e(),D9e=function(e,t){return e.replace(\"%v\",bqt(t))};F9e.exports=function(e,t,r){if(!_qt(r))throw new TypeError(D9e(t,e));if(!R9e(e)){if(\"default\"in r)return r.default;if(r.isOptional)return null}var n=xqt(r.errorMessage);throw R9e(n)||(n=t),new TypeError(D9e(n,e))}});var O9e=ye((gyr,z9e)=>{\"use strict\";var wqt=MY(),Tqt=$2();z9e.exports=function(e){return Tqt(e)?e:wqt(e,\"Cannot use %v\",arguments[1])}});var B9e=ye((myr,q9e)=>{\"use strict\";var Aqt=MY(),Sqt=yY();q9e.exports=function(e){return Sqt(e)?e:Aqt(e,\"%v is not a plain function\",arguments[1])}});var U9e=ye((yyr,N9e)=>{\"use strict\";N9e.exports=function(){var e=Array.from,t,r;return typeof e!=\"function\"?!1:(t=[\"raz\",\"dwa\"],r=e(t),!!(r&&r!==t&&r[1]===\"dwa\"))}});var G9e=ye((_yr,V9e)=>{\"use strict\";var Mqt=Object.prototype.toString,Eqt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V9e.exports=function(e){return typeof e==\"function\"&&Eqt(Mqt.call(e))}});var j9e=ye((xyr,H9e)=>{\"use strict\";H9e.exports=function(){var e=Math.sign;return typeof e!=\"function\"?!1:e(10)===1&&e(-20)===-1}});var X9e=ye((byr,W9e)=>{\"use strict\";W9e.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var Y9e=ye((wyr,Z9e)=>{\"use strict\";Z9e.exports=j9e()()?Math.sign:X9e()});var J9e=ye((Tyr,K9e)=>{\"use strict\";var Cqt=Y9e(),kqt=Math.abs,Lqt=Math.floor;K9e.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Cqt(e)*Lqt(kqt(e)))}});var Q9e=ye((Ayr,$9e)=>{\"use strict\";var Pqt=J9e(),Iqt=Math.max;$9e.exports=function(e){return Iqt(0,Pqt(e))}});var iOe=ye((Syr,rOe)=>{\"use strict\";var Rqt=lx().iterator,Dqt=mC(),Fqt=G9e(),zqt=Q9e(),eOe=u5(),Oqt=i1(),qqt=sx(),Bqt=yC(),tOe=Array.isArray,EY=Function.prototype.call,Q2={configurable:!0,enumerable:!0,writable:!0,value:null},CY=Object.defineProperty;rOe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(Oqt(e)),qqt(t)&&eOe(t),!this||this===Array||!Fqt(this)){if(!t){if(Dqt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(tOe(e)){for(o=new Array(s=e.length),i=0;i<s;++i)o[i]=e[i];return o}}o=[]}else n=this;if(!tOe(e)){if((f=e[Rqt])!==void 0){for(u=eOe(f).call(e),n&&(o=new n),c=u.next(),i=0;!c.done;)h=t?EY.call(t,r,c.value,i):c.value,n?(Q2.value=h,CY(o,i,Q2)):o[i]=h,c=u.next(),++i;s=i}else if(Bqt(e)){for(s=e.length,n&&(o=new n),i=0,a=0;i<s;++i)h=e[i],i+1<s&&(l=h.charCodeAt(0),l>=55296&&l<=56319&&(h+=e[++i])),h=t?EY.call(t,r,h,a):h,n?(Q2.value=h,CY(o,a,Q2)):o[a]=h,++a;s=a}}if(s===void 0)for(s=zqt(e.length),n&&(o=new n(s)),i=0;i<s;++i)h=t?EY.call(t,r,e[i],i):e[i],n?(Q2.value=h,CY(o,i,Q2)):o[i]=h;return n&&(Q2.value=null,o.length=s),o}});var aOe=ye((Myr,nOe)=>{\"use strict\";nOe.exports=U9e()()?Array.from:iOe()});var sOe=ye((Eyr,oOe)=>{\"use strict\";var Nqt=aOe(),Uqt=lz(),Vqt=i1();oOe.exports=function(e){var t=Object(Vqt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?Nqt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):Uqt(i,e),i}});var cOe=ye((Cyr,uOe)=>{\"use strict\";var Gqt=u5(),Hqt=i1(),jqt=Function.prototype.bind,lOe=Function.prototype.call,Wqt=Object.keys,Xqt=Object.prototype.propertyIsEnumerable;uOe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(Hqt(r)),Gqt(n),i=Wqt(r),o&&i.sort(typeof o==\"function\"?jqt.call(o,r):void 0),typeof e!=\"function\"&&(e=i[e]),lOe.call(e,i,function(s,l){return Xqt.call(r,s)?lOe.call(n,a,r[s],s,r,l):t})}}});var hOe=ye((kyr,fOe)=>{\"use strict\";fOe.exports=cOe()(\"forEach\")});var vOe=ye((Lyr,dOe)=>{\"use strict\";var Zqt=u5(),Yqt=hOe(),Kqt=Function.prototype.call;dOe.exports=function(e,t){var r={},n=arguments[2];return Zqt(t),Yqt(e,function(i,a,o,s){r[a]=Kqt.call(t,n,i,a,o,s)}),r}});var yOe=ye((Pyr,mOe)=>{\"use strict\";var Jqt=$2(),$qt=O9e(),pOe=B9e(),Qqt=sOe(),eBt=_Y(),tBt=vOe(),rBt=Function.prototype.bind,iBt=Object.defineProperty,nBt=Object.prototype.hasOwnProperty,gOe;gOe=function(e,t,r){var n=$qt(t)&&pOe(t.value),i;return i=Qqt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&nBt.call(this,e)?n:(t.value=rBt.call(n,r.resolveContext?r.resolveContext(this):this),iBt(this,e,t),this[e])},i};mOe.exports=function(e){var t=eBt(arguments[1]);return Jqt(t.resolveContext)&&pOe(t.resolveContext),tBt(e,function(r,n){return gOe(n,r,t)})}});var kY=ye((Iyr,wOe)=>{\"use strict\";var aBt=S9e(),oBt=lz(),sBt=u5(),lBt=i1(),Op=n1(),uBt=yOe(),_Oe=lx(),xOe=Object.defineProperty,bOe=Object.defineProperties,bC;wOe.exports=bC=function(e,t){if(!(this instanceof bC))throw new TypeError(\"Constructor requires 'new'\");bOe(this,{__list__:Op(\"w\",lBt(e)),__context__:Op(\"w\",t),__nextIndex__:Op(\"w\",0)}),t&&(sBt(t.on),t.on(\"_add\",this._onAdd),t.on(\"_delete\",this._onDelete),t.on(\"_clear\",this._onClear))};delete bC.prototype.constructor;bOe(bC.prototype,oBt({_next:Op(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:Op(function(){return this._createResult(this._next())}),_createResult:Op(function(e){return e===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:Op(function(e){return this.__list__[e]}),_unBind:Op(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)}),toString:Op(function(){return\"[object \"+(this[_Oe.toStringTag]||\"Object\")+\"]\"})},uBt({_onAdd:Op(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){xOe(this,\"__redo__\",Op(\"c\",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Op(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:Op(function(){this.__redo__&&aBt.call(this.__redo__),this.__nextIndex__=0})})));xOe(bC.prototype,_Oe.iterator,Op(function(){return this}))});var EOe=ye((Ryr,MOe)=>{\"use strict\";var TOe=oz(),AOe=bY(),LY=n1(),cBt=lx(),PY=kY(),SOe=Object.defineProperty,c5;c5=MOe.exports=function(e,t){if(!(this instanceof c5))throw new TypeError(\"Constructor requires 'new'\");PY.call(this,e),t?AOe.call(t,\"key+value\")?t=\"key+value\":AOe.call(t,\"key\")?t=\"key\":t=\"value\":t=\"value\",SOe(this,\"__kind__\",LY(\"\",t))};TOe&&TOe(c5,PY);delete c5.prototype.constructor;c5.prototype=Object.create(PY.prototype,{_resolve:LY(function(e){return this.__kind__===\"value\"?this.__list__[e]:this.__kind__===\"key+value\"?[e,this.__list__[e]]:e})});SOe(c5.prototype,cBt.toStringTag,LY(\"c\",\"Array Iterator\"))});var POe=ye((Dyr,LOe)=>{\"use strict\";var COe=oz(),hz=n1(),fBt=lx(),IY=kY(),kOe=Object.defineProperty,f5;f5=LOe.exports=function(e){if(!(this instanceof f5))throw new TypeError(\"Constructor requires 'new'\");e=String(e),IY.call(this,e),kOe(this,\"__length__\",hz(\"\",e.length))};COe&&COe(f5,IY);delete f5.prototype.constructor;f5.prototype=Object.create(IY.prototype,{_next:hz(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:hz(function(e){var t=this.__list__[e],r;return this.__nextIndex__===this.__length__?t:(r=t.charCodeAt(0),r>=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});kOe(f5.prototype,fBt.toStringTag,hz(\"c\",\"String Iterator\"))});var ROe=ye((Fyr,IOe)=>{\"use strict\";var hBt=mC(),dBt=sx(),vBt=yC(),pBt=lx().iterator,gBt=Array.isArray;IOe.exports=function(e){return dBt(e)?gBt(e)||vBt(e)||hBt(e)?!0:typeof e[pBt]==\"function\":!1}});var FOe=ye((zyr,DOe)=>{\"use strict\";var mBt=ROe();DOe.exports=function(e){if(!mBt(e))throw new TypeError(e+\" is not iterable\");return e}});var RY=ye((Oyr,qOe)=>{\"use strict\";var yBt=mC(),_Bt=yC(),zOe=EOe(),xBt=POe(),bBt=FOe(),OOe=lx().iterator;qOe.exports=function(e){return typeof bBt(e)[OOe]==\"function\"?e[OOe]():yBt(e)?new zOe(e):_Bt(e)?new xBt(e):new zOe(e)}});var NOe=ye((qyr,BOe)=>{\"use strict\";var wBt=mC(),TBt=u5(),ABt=yC(),SBt=RY(),MBt=Array.isArray,DY=Function.prototype.call,EBt=Array.prototype.some;BOe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(MBt(e)||wBt(e)?r=\"array\":ABt(e)?r=\"string\":e=SBt(e),TBt(t),a=function(){o=!0},r===\"array\"){EBt.call(e,function(f){return DY.call(t,n,f,a),o});return}if(r===\"string\"){for(l=e.length,s=0;s<l&&(u=e[s],s+1<l&&(c=u.charCodeAt(0),c>=55296&&c<=56319&&(u+=e[++s])),DY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(DY.call(t,n,i.value,a),o)return;i=e.next()}}});var VOe=ye((Byr,UOe)=>{\"use strict\";UOe.exports=function(){return typeof WeakMap!=\"function\"?!1:Object.prototype.toString.call(new WeakMap)===\"[object WeakMap]\"}()});var jOe=ye((Nyr,HOe)=>{\"use strict\";var CBt=sx(),vz=oz(),dz=y7e(),kBt=i1(),LBt=x7e(),a1=n1(),PBt=RY(),IBt=NOe(),RBt=lx().toStringTag,GOe=VOe(),DBt=Array.isArray,zY=Object.defineProperty,FY=Object.prototype.hasOwnProperty,FBt=Object.getPrototypeOf,ux;HOe.exports=ux=function(){var e=arguments[0],t;if(!(this instanceof ux))throw new TypeError(\"Constructor requires 'new'\");return t=GOe&&vz&&WeakMap!==ux?vz(new WeakMap,FBt(this)):this,CBt(e)&&(DBt(e)||(e=PBt(e))),zY(t,\"__weakMapData__\",a1(\"c\",\"$weakMap$\"+LBt())),e&&IBt(e,function(r){kBt(r),t.set(r[0],r[1])}),t};GOe&&(vz&&vz(ux,WeakMap),ux.prototype=Object.create(WeakMap.prototype,{constructor:a1(ux)}));Object.defineProperties(ux.prototype,{delete:a1(function(e){return FY.call(dz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:a1(function(e){if(FY.call(dz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:a1(function(e){return FY.call(dz(e),this.__weakMapData__)}),set:a1(function(e,t){return zY(dz(e),this.__weakMapData__,a1(\"c\",t)),this}),toString:a1(function(){return\"[object WeakMap]\"})});zY(ux.prototype,RBt,a1(\"c\",\"WeakMap\"))});var OY=ye((Uyr,WOe)=>{\"use strict\";WOe.exports=a7e()()?WeakMap:jOe()});var ZOe=ye((Vyr,XOe)=>{\"use strict\";XOe.exports=function(e,t,r){if(typeof Array.prototype.findIndex==\"function\")return e.findIndex(t,r);if(typeof t!=\"function\")throw new TypeError(\"predicate must be a function\");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a<i;a++)if(t.call(r,n[a],a,n))return a;return-1}});var NY=ye((Gyr,JOe)=>{\"use strict\";var pz=J_(),zBt=j2(),BY=Fh(),OBt=Xm(),qBt=W2(),YOe=t7e(),BBt=i7e(),{float32:NBt,fract32:qY}=JF(),UBt=OY(),KOe=e5(),VBt=ZOe(),GBt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\n",
       "attribute vec4 color;\n",
       "attribute float lineEnd, lineTop;\n",
       "\n",
       "uniform vec2 scale, scaleFract, translate, translateFract;\n",
       "uniform float thickness, pixelRatio, id, depth;\n",
       "uniform vec4 viewport;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "\n",
       "vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n",
       "\t// the order is important\n",
       "\treturn position * scale + translate\n",
       "       + positionFract * scale + translateFract\n",
       "       + position * scaleFract\n",
       "       + positionFract * scaleFract;\n",
       "}\n",
       "\n",
       "void main() {\n",
       "\tfloat lineStart = 1. - lineEnd;\n",
       "\tfloat lineOffset = lineTop * 2. - 1.;\n",
       "\n",
       "\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n",
       "\ttangent = normalize(diff * scale * viewport.zw);\n",
       "\tvec2 normal = vec2(-tangent.y, tangent.x);\n",
       "\n",
       "\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n",
       "\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n",
       "\n",
       "\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n",
       "\n",
       "\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n",
       "\n",
       "\tfragColor = color / 255.;\n",
       "}\n",
       "`,HBt=`\n",
       "precision highp float;\n",
       "\n",
       "uniform float dashLength, pixelRatio, thickness, opacity, id;\n",
       "uniform sampler2D dashTexture;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "\n",
       "void main() {\n",
       "\tfloat alpha = 1.;\n",
       "\n",
       "\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n",
       "\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n",
       "\n",
       "\tgl_FragColor = fragColor;\n",
       "\tgl_FragColor.a *= alpha * opacity * dash;\n",
       "}\n",
       "`,jBt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 position, positionFract;\n",
       "\n",
       "uniform vec4 color;\n",
       "uniform vec2 scale, scaleFract, translate, translateFract;\n",
       "uniform float pixelRatio, id;\n",
       "uniform vec4 viewport;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "const float MAX_LINES = 256.;\n",
       "\n",
       "void main() {\n",
       "\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n",
       "\n",
       "\tvec2 position = position * scale + translate\n",
       "       + positionFract * scale + translateFract\n",
       "       + position * scaleFract\n",
       "       + positionFract * scaleFract;\n",
       "\n",
       "\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n",
       "\n",
       "\tfragColor = color / 255.;\n",
       "\tfragColor.a *= opacity;\n",
       "}\n",
       "`,WBt=`\n",
       "precision highp float;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "\tgl_FragColor = fragColor;\n",
       "}\n",
       "`,XBt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 aCoord, bCoord, nextCoord, prevCoord;\n",
       "attribute vec4 aColor, bColor;\n",
       "attribute float lineEnd, lineTop;\n",
       "\n",
       "uniform vec2 scale, translate;\n",
       "uniform float thickness, pixelRatio, id, depth;\n",
       "uniform vec4 viewport;\n",
       "uniform float miterLimit, miterMode;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec4 startCutoff, endCutoff;\n",
       "varying vec2 tangent;\n",
       "varying vec2 startCoord, endCoord;\n",
       "varying float enableStartMiter, enableEndMiter;\n",
       "\n",
       "const float REVERSE_THRESHOLD = -.875;\n",
       "const float MIN_DIFF = 1e-6;\n",
       "\n",
       "// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n",
       "// TODO: precalculate dot products, normalize things beforehead etc.\n",
       "// TODO: refactor to rectangular algorithm\n",
       "\n",
       "float distToLine(vec2 p, vec2 a, vec2 b) {\n",
       "\tvec2 diff = b - a;\n",
       "\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n",
       "\treturn dot(p - a, perp);\n",
       "}\n",
       "\n",
       "bool isNaN( float val ){\n",
       "  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n",
       "}\n",
       "\n",
       "void main() {\n",
       "\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n",
       "\n",
       "  vec2 adjustedScale;\n",
       "  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n",
       "  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n",
       "\n",
       "  vec2 scaleRatio = adjustedScale * viewport.zw;\n",
       "\tvec2 normalWidth = thickness / scaleRatio;\n",
       "\n",
       "\tfloat lineStart = 1. - lineEnd;\n",
       "\tfloat lineBot = 1. - lineTop;\n",
       "\n",
       "\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n",
       "\n",
       "\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n",
       "\n",
       "\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n",
       "\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n",
       "\n",
       "\n",
       "\tvec2 prevDiff = aCoord - prevCoord;\n",
       "\tvec2 currDiff = bCoord - aCoord;\n",
       "\tvec2 nextDiff = nextCoord - bCoord;\n",
       "\n",
       "\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n",
       "\tvec2 currTangent = normalize(currDiff * scaleRatio);\n",
       "\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n",
       "\n",
       "\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n",
       "\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n",
       "\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n",
       "\n",
       "\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n",
       "\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n",
       "\n",
       "\t// collapsed/unidirectional segment cases\n",
       "\t// FIXME: there should be more elegant solution\n",
       "\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n",
       "\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n",
       "\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n",
       "\t\tstartJoinDirection = currNormal;\n",
       "\t}\n",
       "\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n",
       "\t\tendJoinDirection = currNormal;\n",
       "\t}\n",
       "\tif (aCoord == bCoord) {\n",
       "\t\tendJoinDirection = startJoinDirection;\n",
       "\t\tcurrNormal = prevNormal;\n",
       "\t\tcurrTangent = prevTangent;\n",
       "\t}\n",
       "\n",
       "\ttangent = currTangent;\n",
       "\n",
       "\t//calculate join shifts relative to normals\n",
       "\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n",
       "\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n",
       "\n",
       "\tfloat startMiterRatio = abs(1. / startJoinShift);\n",
       "\tfloat endMiterRatio = abs(1. / endJoinShift);\n",
       "\n",
       "\tvec2 startJoin = startJoinDirection * startMiterRatio;\n",
       "\tvec2 endJoin = endJoinDirection * endMiterRatio;\n",
       "\n",
       "\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n",
       "\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n",
       "\tstartBotJoin = -startTopJoin;\n",
       "\n",
       "\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n",
       "\tendBotJoin = -endTopJoin;\n",
       "\n",
       "\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n",
       "\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n",
       "\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n",
       "\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n",
       "\n",
       "\t//miter anti-clipping\n",
       "\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n",
       "\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n",
       "\n",
       "\t//prevent close to reverse direction switch\n",
       "\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\n",
       "\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);\n",
       "\n",
       "\tif (prevReverse) {\n",
       "\t\t//make join rectangular\n",
       "\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n",
       "\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n",
       "\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n",
       "\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n",
       "\t}\n",
       "\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n",
       "\t\t//handle miter clipping\n",
       "\t\tbTopCoord -= normalWidth * endTopJoin;\n",
       "\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n",
       "\t}\n",
       "\n",
       "\tif (nextReverse) {\n",
       "\t\t//make join rectangular\n",
       "\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n",
       "\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n",
       "\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n",
       "\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n",
       "\t}\n",
       "\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n",
       "\t\t//handle miter clipping\n",
       "\t\taBotCoord -= normalWidth * startBotJoin;\n",
       "\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n",
       "\t}\n",
       "\n",
       "\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n",
       "\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n",
       "\n",
       "\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n",
       "\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n",
       "\n",
       "\t//position is normalized 0..1 coord on the screen\n",
       "\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n",
       "\n",
       "\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n",
       "\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n",
       "\n",
       "\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\n",
       "\n",
       "\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n",
       "\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n",
       "\n",
       "\t//bevel miter cutoffs\n",
       "\tif (miterMode == 1.) {\n",
       "\t\tif (enableStartMiter == 1.) {\n",
       "\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n",
       "\t\t\tstartCutoff = vec4(aCoord, aCoord);\n",
       "\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n",
       "\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n",
       "\t\t\tstartCutoff += viewport.xyxy;\n",
       "\t\t\tstartCutoff += startMiterWidth.xyxy;\n",
       "\t\t}\n",
       "\n",
       "\t\tif (enableEndMiter == 1.) {\n",
       "\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n",
       "\t\t\tendCutoff = vec4(bCoord, bCoord);\n",
       "\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n",
       "\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n",
       "\t\t\tendCutoff += viewport.xyxy;\n",
       "\t\t\tendCutoff += endMiterWidth.xyxy;\n",
       "\t\t}\n",
       "\t}\n",
       "\n",
       "\t//round miter cutoffs\n",
       "\telse if (miterMode == 2.) {\n",
       "\t\tif (enableStartMiter == 1.) {\n",
       "\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n",
       "\t\t\tstartCutoff = vec4(aCoord, aCoord);\n",
       "\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n",
       "\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n",
       "\t\t\tstartCutoff += viewport.xyxy;\n",
       "\t\t\tstartCutoff += startMiterWidth.xyxy;\n",
       "\t\t}\n",
       "\n",
       "\t\tif (enableEndMiter == 1.) {\n",
       "\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n",
       "\t\t\tendCutoff = vec4(bCoord, bCoord);\n",
       "\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n",
       "\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n",
       "\t\t\tendCutoff += viewport.xyxy;\n",
       "\t\t\tendCutoff += endMiterWidth.xyxy;\n",
       "\t\t}\n",
       "\t}\n",
       "}\n",
       "`,ZBt=`\n",
       "precision highp float;\n",
       "\n",
       "uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\n",
       "uniform sampler2D dashTexture;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "varying vec4 startCutoff, endCutoff;\n",
       "varying vec2 startCoord, endCoord;\n",
       "varying float enableStartMiter, enableEndMiter;\n",
       "\n",
       "float distToLine(vec2 p, vec2 a, vec2 b) {\n",
       "\tvec2 diff = b - a;\n",
       "\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n",
       "\treturn dot(p - a, perp);\n",
       "}\n",
       "\n",
       "void main() {\n",
       "\tfloat alpha = 1., distToStart, distToEnd;\n",
       "\tfloat cutoff = thickness * .5;\n",
       "\n",
       "\t//bevel miter\n",
       "\tif (miterMode == 1.) {\n",
       "\t\tif (enableStartMiter == 1.) {\n",
       "\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n",
       "\t\t\tif (distToStart < -1.) {\n",
       "\t\t\t\tdiscard;\n",
       "\t\t\t\treturn;\n",
       "\t\t\t}\n",
       "\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n",
       "\t\t}\n",
       "\n",
       "\t\tif (enableEndMiter == 1.) {\n",
       "\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n",
       "\t\t\tif (distToEnd < -1.) {\n",
       "\t\t\t\tdiscard;\n",
       "\t\t\t\treturn;\n",
       "\t\t\t}\n",
       "\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n",
       "\t\t}\n",
       "\t}\n",
       "\n",
       "\t// round miter\n",
       "\telse if (miterMode == 2.) {\n",
       "\t\tif (enableStartMiter == 1.) {\n",
       "\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n",
       "\t\t\tif (distToStart < 0.) {\n",
       "\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n",
       "\n",
       "\t\t\t\tif(radius > cutoff + .5) {\n",
       "\t\t\t\t\tdiscard;\n",
       "\t\t\t\t\treturn;\n",
       "\t\t\t\t}\n",
       "\n",
       "\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n",
       "\t\t\t}\n",
       "\t\t}\n",
       "\n",
       "\t\tif (enableEndMiter == 1.) {\n",
       "\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n",
       "\t\t\tif (distToEnd < 0.) {\n",
       "\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n",
       "\n",
       "\t\t\t\tif(radius > cutoff + .5) {\n",
       "\t\t\t\t\tdiscard;\n",
       "\t\t\t\t\treturn;\n",
       "\t\t\t\t}\n",
       "\n",
       "\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n",
       "\t\t\t}\n",
       "\t\t}\n",
       "\t}\n",
       "\n",
       "\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n",
       "\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n",
       "\n",
       "\tgl_FragColor = fragColor;\n",
       "\tgl_FragColor.a *= alpha * opacity * dash;\n",
       "}\n",
       "`;JOe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e==\"function\"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new UBt;Wc.createShaders=function(e){let t=e.buffer({usage:\"static\",type:\"float\",data:[0,1,0,0,1,1,1,0]}),r={primitive:\"triangle strip\",instances:e.prop(\"count\"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join===\"round\"?2:1,miterLimit:e.prop(\"miterLimit\"),scale:e.prop(\"scale\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),translate:e.prop(\"translate\"),thickness:e.prop(\"thickness\"),dashTexture:e.prop(\"dashTexture\"),opacity:e.prop(\"opacity\"),pixelRatio:e.context(\"pixelRatio\"),id:e.prop(\"id\"),dashLength:e.prop(\"dashLength\"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop(\"depth\")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\")},n=e(BY({vert:GBt,frag:HBt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:16,divisor:1},color:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(BY({cull:{enable:!0,face:\"back\"},vert:XBt,frag:ZBt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:\"triangle\",elements:(o,s)=>s.triangles,offset:0,vert:jBt,frag:WBt,uniforms:{scale:e.prop(\"scale\"),color:e.prop(\"fill\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),translate:e.prop(\"translate\"),opacity:e.prop(\"opacity\"),pixelRatio:e.context(\"pixelRatio\"),id:e.prop(\"id\"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8},positionFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:\"miter\",miterLimit:1,thickness:10,cap:\"square\",color:\"black\",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t==\"number\"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join===\"rect\"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]==\"number\"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]==\"number\"&&(i={positions:i}),i=OBt(i,{positions:\"positions points data coords\",thickness:\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\",join:\"lineJoin linejoin join type mode\",miterLimit:\"miterlimit miterLimit\",dashes:\"dash dashes dasharray dash-array dashArray\",color:\"color colour stroke colors colours stroke-color strokeColor\",fill:\"fill fill-color fillColor\",opacity:\"alpha opacity\",overlay:\"overlay crease overlap intersect\",close:\"closed close closed-path closePath\",range:\"range dataBox\",viewport:\"viewport viewBox\",hole:\"holes hole hollow\",splitNull:\"splitNull\"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:\"linear\",min:\"linear\"}),colorBuffer:t.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array}),positionBuffer:t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array})},i=BY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,a<Wc.maxLines&&(o.depth=2*(Wc.maxLines-1-a%Wc.maxLines)/Wc.maxLines-1)),i.join!=null&&(o.join=i.join),i.hole!=null&&(o.hole=i.hole),i.fill!=null&&(o.fill=i.fill?pz(i.fill,\"uint8\"):null),i.viewport!=null&&(o.viewport=KOe(i.viewport)),o.viewport||(o.viewport=KOe([r.drawingBufferWidth,r.drawingBufferHeight])),i.close!=null&&(o.close=i.close),i.positions===null&&(i.positions=[]),i.positions){let u,c;if(i.positions.x&&i.positions.y){let v=i.positions.x,x=i.positions.y;c=o.count=Math.max(v.length,x.length),u=new Float64Array(c*2);for(let b=0;b<c;b++)u[b*2]=v[b],u[b*2+1]=x[b]}else u=qBt(i.positions,\"float64\"),c=o.count=Math.floor(u.length/2);let f=o.bounds=zBt(u,2);if(o.fill){let v=[],x={},b=0;for(let p=0,C=0,E=o.count;p<E;p++){let A=u[p*2],L=u[p*2+1];isNaN(A)||isNaN(L)||A==null||L==null?(A=u[b*2],L=u[b*2+1],x[p]=b):b=p,v[C++]=A,v[C++]=L}if(i.splitNull){o.count-1 in x||(x[o.count]=o.count-1);let p=Object.keys(x).map(Number).sort((L,_)=>L-_),C=[],E=0,A=o.hole!=null?o.hole[0]:null;if(A!=null){let L=VBt(p,_=>_>=A);p=p.slice(0,L),p.push(A)}for(let L=0;L<p.length;L++){let _=v.slice(E*2,p[L]*2).concat(A?v.slice(A*2):[]),k=(o.hole||[]).map(g=>g-A+(p[L]-E)),M=YOe(_,k);M=M.map(g=>g+E+(g+E<p[L]?0:A-p[L])),C.push(...M),E=p[L]+1}for(let L=0,_=C.length;L<_;L++)x[C[L]]!=null&&(C[L]=x[C[L]]);o.triangles=C}else{let p=YOe(v,o.hole||[]);for(let C=0,E=p.length;C<E;C++)x[p[C]]!=null&&(p[C]=x[p[C]]);o.triangles=p}}let h=new Float64Array(u);BBt(h,2,f);let d=new Float64Array(c*2+6);o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[0]=h[c*2-4],d[1]=h[c*2-3]):(d[0]=h[c*2-2],d[1]=h[c*2-1]):(d[0]=h[0],d[1]=h[1]),d.set(h,2),o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[c*2+2]=h[2],d[c*2+3]=h[3],o.count-=1):(d[c*2+2]=h[0],d[c*2+3]=h[1],d[c*2+4]=h[2],d[c*2+5]=h[3]):(d[c*2+2]=h[c*2-2],d[c*2+3]=h[c*2-1],d[c*2+4]=h[c*2-2],d[c*2+5]=h[c*2-1]);var s=NBt(d);o.positionBuffer(s);var l=qY(d,s);o.positionFractBuffer(l)}if(i.range?o.range=i.range:o.range||(o.range=o.bounds),(i.range||i.positions)&&o.count){let u=o.bounds,c=u[2]-u[0],f=u[3]-u[1],h=o.range[2]-o.range[0],d=o.range[3]-o.range[1];o.scale=[c/h,f/d],o.translate=[-o.range[0]/h+u[0]/h||0,-o.range[1]/d+u[1]/d||0],o.scaleFract=qY(o.scale),o.translateFract=qY(o.translate)}if(i.dashes){let u=0,c;if(!i.dashes||i.dashes.length<2)u=1,c=new Uint8Array([255,255,255,255,255,255,255,255]);else{u=0;for(let d=0;d<i.dashes.length;++d)u+=i.dashes[d];c=new Uint8Array(u*Wc.dashMult);let f=0,h=255;for(let d=0;d<2;d++)for(let v=0;v<i.dashes.length;++v){for(let x=0,b=i.dashes[v]*Wc.dashMult*.5;x<b;++x)c[f++]=h;h^=255}}o.dashLength=u,o.dashTexture({channels:1,data:c,width:c.length,height:1,mag:\"linear\",min:\"linear\"},0,0)}if(i.color){let u=o.count,c=i.color;c||(c=\"transparent\");let f=new Uint8Array(u*4+4);if(!Array.isArray(c)||typeof c[0]==\"number\"){let h=pz(c,\"uint8\");for(let d=0;d<u+1;d++)f.set(h,d*4)}else{for(let h=0;h<u;h++){let d=pz(c[h],\"uint8\");f.set(d,h*4)}f.set(pz(c[0],\"uint8\"),u*4)}o.colorBuffer({usage:\"dynamic\",type:\"uint8\",data:f})}}}),e.length<this.passes.length){for(let i=e.length;i<this.passes.length;i++){let a=this.passes[i];a&&(a.colorBuffer.destroy(),a.positionBuffer.destroy(),a.dashTexture.destroy())}this.passes.length=e.length}let n=[];for(let i=0;i<this.passes.length;i++)this.passes[i]!==null&&n.push(this.passes[i]);return this.passes=n,this};Wc.prototype.destroy=function(){return this.passes.forEach(e=>{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var rqe=ye((Hyr,tqe)=>{\"use strict\";var YBt=j2(),KBt=J_(),JBt=sY(),$Bt=Xm(),$Oe=Fh(),QOe=W2(),{float32:QBt,fract32:UY}=JF();tqe.exports=eNt;var eqe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function eNt(e,t){if(typeof e==\"function\"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");let r=e._gl,n,i,a,o,s,l,u={color:\"black\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array(0)}),i=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),a=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),s=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),l=e.buffer({usage:\"static\",type:\"float\",data:eqe}),v(t),n=e({vert:`\n",
       "\t\tprecision highp float;\n",
       "\n",
       "\t\tattribute vec2 position, positionFract;\n",
       "\t\tattribute vec4 error;\n",
       "\t\tattribute vec4 color;\n",
       "\n",
       "\t\tattribute vec2 direction, lineOffset, capOffset;\n",
       "\n",
       "\t\tuniform vec4 viewport;\n",
       "\t\tuniform float lineWidth, capSize;\n",
       "\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n",
       "\n",
       "\t\tvarying vec4 fragColor;\n",
       "\n",
       "\t\tvoid main() {\n",
       "\t\t\tfragColor = color / 255.;\n",
       "\n",
       "\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n",
       "\n",
       "\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n",
       "\n",
       "\t\t\tvec2 position = position + dxy;\n",
       "\n",
       "\t\t\tvec2 pos = (position + translate) * scale\n",
       "\t\t\t\t+ (positionFract + translateFract) * scale\n",
       "\t\t\t\t+ (position + translate) * scaleFract\n",
       "\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n",
       "\n",
       "\t\t\tpos += pixelOffset / viewport.zw;\n",
       "\n",
       "\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n",
       "\t\t}\n",
       "\t\t`,frag:`\n",
       "\t\tprecision highp float;\n",
       "\n",
       "\t\tvarying vec4 fragColor;\n",
       "\n",
       "\t\tuniform float opacity;\n",
       "\n",
       "\t\tvoid main() {\n",
       "\t\t\tgl_FragColor = fragColor;\n",
       "\t\t\tgl_FragColor.a *= opacity;\n",
       "\t\t}\n",
       "\t\t`,uniforms:{range:e.prop(\"range\"),lineWidth:e.prop(\"lineWidth\"),capSize:e.prop(\"capSize\"),opacity:e.prop(\"opacity\"),scale:e.prop(\"scale\"),translate:e.prop(\"translate\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),viewport:(b,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:\"triangles\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\"),stencil:!1,instances:e.prop(\"count\"),count:eqe.length}),$Oe(f,{update:v,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&x(),h()}function h(b){if(typeof b==\"number\")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,C)=>{if(p){if(b&&(b[C]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(C)}})}function d(b){typeof b==\"number\"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]==\"number\"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,C=0;if(f.groups=c=b.map((L,_)=>{let k=c[_];if(L)typeof L==\"function\"?L={after:L}:typeof L[0]==\"number\"&&(L={positions:L});else return k;return L=$Bt(L,{color:\"color colors fill\",capSize:\"capSize cap capsize cap-size\",lineWidth:\"lineWidth line-width width line thickness\",opacity:\"opacity alpha\",range:\"range dataBox\",viewport:\"viewport viewBox\",errors:\"errors error\",positions:\"positions position data points\"}),k||(c[_]=k={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=$Oe({},u,L)),JBt(k,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=QOe(M),C+=M.length,M),positions:(M,g)=>(M=QOe(M,\"float64\"),g.count=Math.floor(M.length/2),g.bounds=YBt(M,2),g.offset=p,p+=g.count,M)},{color:(M,g)=>{let P=g.count;if(M||(M=\"transparent\"),!Array.isArray(M)||typeof M[0]==\"number\"){let z=M;M=Array(P);for(let O=0;O<P;O++)M[O]=z}if(M.length<P)throw Error(\"Not enough colors\");let T=new Uint8Array(P*4);for(let z=0;z<P;z++){let O=KBt(M[z],\"uint8\");T.set(O,z*4)}return T},range:(M,g,P)=>{let T=g.bounds;return M||(M=T),g.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],g.translate=[-M[0],-M[1]],g.scaleFract=UY(g.scale),g.translateFract=UY(g.translate),M},viewport:M=>{let g;return Array.isArray(M)?g={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(g={x:M.x||M.left||0,y:M.y||M.top||0},M.right?g.width=M.right-g.x:g.width=M.w||M.width||0,M.bottom?g.height=M.bottom-g.y:g.height=M.h||M.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),k}),p||C){let L=c.reduce((g,P,T)=>g+(P?P.count:0),0),_=new Float64Array(L*2),k=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:T,count:z,offset:O,color:V,errors:G}=g;z&&(k.set(V,O*4),M.set(G,O*4),_.set(T,O*2))});var E=QBt(_);i(E);var A=UY(_,E);a(A),o(k),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var aqe=ye((jyr,nqe)=>{var iqe=/[\\'\\\"]/;nqe.exports=function(t){return t?(iqe.test(t.charAt(0))&&(t=t.substr(1)),iqe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):\"\"}});var VY=ye((Wyr,tNt)=>{tNt.exports=[\"inherit\",\"initial\",\"unset\"]});var GY=ye((Xyr,rNt)=>{rNt.exports=[\"caption\",\"icon\",\"menu\",\"message-box\",\"small-caption\",\"status-bar\"]});var HY=ye((Zyr,iNt)=>{iNt.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]});var jY=ye((Yyr,nNt)=>{nNt.exports=[\"normal\",\"italic\",\"oblique\"]});var WY=ye((Kyr,aNt)=>{aNt.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]});var uqe=ye((Jyr,lqe)=>{\"use strict\";function oqe(e,t){if(typeof e!=\"string\")return[e];var r=[e];typeof t==\"string\"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:[\"{}\",\"[]\",\"()\"],i=t.escape||\"___\",a=!!t.flat;n.forEach(function(l){var u=new RegExp([\"\\\\\",l[0],\"[^\\\\\",l[0],\"\\\\\",l[1],\"]*\\\\\",l[1]].join(\"\")),c=[];function f(h,d,v){var x=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(x),i+x+i}r.forEach(function(h,d){for(var v,x=0;h!=v;)if(v=h,h=h.replace(u,f),x++>1e4)throw Error(\"References have circular dependency. Please, check them.\");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp(\"(\\\\\"+i+d+\"\\\\\"+i+\")\",\"g\"),l[0]+\"$1\"+l[1])}),h})});var o=new RegExp(\"\\\\\"+i+\"([0-9]+)\\\\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error(\"Circular references in parenthesis\");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function sqe(e,t){if(t&&t.flat){var r=t&&t.escape||\"___\",n=e[0],i;if(!n)return\"\";for(var a=new RegExp(\"\\\\\"+r+\"([0-9]+)\\\\\"+r),o=0;n!=i;){if(o++>1e4)throw Error(\"Circular references in \"+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,\"\")),u+c},\"\");function s(l,u){if(e[u]==null)throw Error(\"Reference \"+u+\"is undefined\");return e[u]}}function XY(e,t){return Array.isArray(e)?sqe(e,t):oqe(e,t)}XY.parse=oqe;XY.stringify=sqe;lqe.exports=XY});var hqe=ye(($yr,fqe)=>{\"use strict\";var cqe=uqe();fqe.exports=function(t,r,n){if(t==null)throw Error(\"First argument should be a string\");if(r==null)throw Error(\"Separator should be a string or a RegExp\");n?(typeof n==\"string\"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=[\"[]\",\"()\",\"{}\",\"<>\",'\"\"',\"''\",\"``\",\"\\u201C\\u201D\",\"\\xAB\\xBB\"]:(typeof n.ignore==\"string\"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=cqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l<o.length;l++){var u=o[l],c=o[l+1];u[u.length-1]===\"\\\\\"&&u[u.length-2]!==\"\\\\\"?(s.push(u+r+c),l++):s.push(u)}o=s}for(var l=0;l<o.length;l++)i[0]=o[l],o[l]=cqe.stringify(i,{flat:!0});return o}});var dqe=ye((Qyr,oNt)=>{oNt.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]});var ZY=ye((e1r,vqe)=>{\"use strict\";var sNt=dqe();vqe.exports={isSize:function(t){return/^[\\d\\.]/.test(t)||t.indexOf(\"/\")!==-1||sNt.indexOf(t)!==-1}}});var yqe=ye((t1r,mqe)=>{\"use strict\";var lNt=aqe(),uNt=VY(),cNt=GY(),fNt=HY(),hNt=jY(),dNt=WY(),YY=hqe(),vNt=ZY().isSize;mqe.exports=gqe;var wC=gqe.cache={};function gqe(e){if(typeof e!=\"string\")throw new Error(\"Font argument must be a string.\");if(wC[e])return wC[e];if(e===\"\")throw new Error(\"Cannot parse an empty string.\");if(cNt.indexOf(e)!==-1)return wC[e]={system:e};for(var t={style:\"normal\",variant:\"normal\",weight:\"normal\",stretch:\"normal\",lineHeight:\"normal\",size:\"1rem\",family:[\"serif\"]},r=YY(e,/\\s+/),n;n=r.shift();){if(uNt.indexOf(n)!==-1)return[\"style\",\"variant\",\"weight\",\"stretch\"].forEach(function(a){t[a]=n}),wC[e]=t;if(hNt.indexOf(n)!==-1){t.style=n;continue}if(n===\"normal\"||n===\"small-caps\"){t.variant=n;continue}if(dNt.indexOf(n)!==-1){t.stretch=n;continue}if(fNt.indexOf(n)!==-1){t.weight=n;continue}if(vNt(n)){var i=YY(n,\"/\");if(t.size=i[0],i[1]!=null?t.lineHeight=pqe(i[1]):r[0]===\"/\"&&(r.shift(),t.lineHeight=pqe(r.shift())),!r.length)throw new Error(\"Missing required font-family.\");return t.family=YY(r.join(\" \"),/\\s*,\\s*/).map(lNt),wC[e]=t}throw new Error(\"Unknown or unsupported font token: \"+n)}throw new Error(\"Missing required font-size.\")}function pqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var JY=ye((r1r,_qe)=>{\"use strict\";var pNt=Xm(),gNt=ZY().isSize,mNt=AC(VY()),yNt=AC(GY()),_Nt=AC(HY()),xNt=AC(jY()),bNt=AC(WY()),wNt={normal:1,\"small-caps\":1},TNt={serif:1,\"sans-serif\":1,monospace:1,cursive:1,fantasy:1,\"system-ui\":1},KY={style:\"normal\",variant:\"normal\",weight:\"normal\",stretch:\"normal\",size:\"1rem\",lineHeight:\"normal\",family:\"serif\"};_qe.exports=function(t){if(t=pNt(t,{style:\"style fontstyle fontStyle font-style slope distinction\",variant:\"variant font-variant fontVariant fontvariant var capitalization\",weight:\"weight w font-weight fontWeight fontweight\",stretch:\"stretch font-stretch fontStretch fontstretch width\",size:\"size s font-size fontSize fontsize height em emSize\",lineHeight:\"lh line-height lineHeight lineheight leading\",family:\"font family fontFamily font-family fontfamily type typeface face\",system:\"system reserved default global\"}),t.system)return t.system&&TC(t.system,yNt),t.system;if(TC(t.style,xNt),TC(t.variant,wNt),TC(t.weight,_Nt),TC(t.stretch,bNt),t.size==null&&(t.size=KY.size),typeof t.size==\"number\"&&(t.size+=\"px\"),!gNt)throw Error(\"Bad size value `\"+t.size+\"`\");t.family||(t.family=KY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[KY.family]),t.family=t.family.map(function(n){return TNt[n]?n:'\"'+n+'\"'}).join(\", \"));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight===\"normal\"||t.lineHeight+\"\"==\"1\"?\"\":\"/\"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(\" \")};function TC(e,t){if(e&&!t[e]&&!mNt[e])throw Error(\"Unknown keyword `\"+e+\"`\");return e}function AC(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}});var bqe=ye((i1r,xqe)=>{\"use strict\";xqe.exports={parse:yqe(),stringify:JY()}});var wqe=ye(($Y,QY)=>{(function(e,t){typeof $Y==\"object\"&&typeof QY!=\"undefined\"?QY.exports=t():e.createREGL=t()})($Y,function(){\"use strict\";var e=function(Ee,xt){for(var zt=Object.keys(xt),Ir=0;Ir<zt.length;++Ir)Ee[zt[Ir]]=xt[zt[Ir]];return Ee},t=0,r=0,n=5,i=6;function a(Ee,xt){this.id=t++,this.type=Ee,this.data=xt}function o(Ee){return Ee.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')}function s(Ee){if(Ee.length===0)return[];var xt=Ee.charAt(0),zt=Ee.charAt(Ee.length-1);if(Ee.length>1&&xt===zt&&(xt==='\"'||xt===\"'\"))return['\"'+o(Ee.substr(1,Ee.length-2))+'\"'];var Ir=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(Ee);if(Ir)return s(Ee.substr(0,Ir.index)).concat(s(Ir[1])).concat(s(Ee.substr(Ir.index+Ir[0].length)));var Hr=Ee.split(\".\");if(Hr.length===1)return['\"'+o(Ee)+'\"'];for(var Br=[],Vr=0;Vr<Hr.length;++Vr)Br=Br.concat(s(Hr[Vr]));return Br}function l(Ee){return\"[\"+s(Ee).join(\"][\")+\"]\"}function u(Ee,xt){return new a(Ee,l(xt+\"\"))}function c(Ee){return typeof Ee==\"function\"&&!Ee._reglType||Ee instanceof a}function f(Ee,xt){if(typeof Ee==\"function\")return new a(r,Ee);if(typeof Ee==\"number\"||typeof Ee==\"boolean\")return new a(n,Ee);if(Array.isArray(Ee))return new a(i,Ee.map(function(zt,Ir){return f(zt,xt+\"[\"+Ir+\"]\")}));if(Ee instanceof a)return Ee}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame==\"function\"?function(Ee){return requestAnimationFrame(Ee)}:function(Ee){return setTimeout(Ee,16)},cancel:typeof cancelAnimationFrame==\"function\"?function(Ee){return cancelAnimationFrame(Ee)}:clearTimeout},v=typeof performance!=\"undefined\"&&performance.now?function(){return performance.now()}:function(){return+new Date};function x(){var Ee={\"\":0},xt=[\"\"];return{id:function(zt){var Ir=Ee[zt];return Ir||(Ir=Ee[zt]=xt.length,xt.push(zt),Ir)},str:function(zt){return xt[zt]}}}function b(Ee,xt,zt){var Ir=document.createElement(\"canvas\");e(Ir.style,{border:0,margin:0,padding:0,top:0,left:0,width:\"100%\",height:\"100%\"}),Ee.appendChild(Ir),Ee===document.body&&(Ir.style.position=\"absolute\",e(Ee.style,{margin:0,padding:0}));function Hr(){var mi=window.innerWidth,Ni=window.innerHeight;if(Ee!==document.body){var Oi=Ir.getBoundingClientRect();mi=Oi.right-Oi.left,Ni=Oi.bottom-Oi.top}Ir.width=zt*mi,Ir.height=zt*Ni}var Br;Ee!==document.body&&typeof ResizeObserver==\"function\"?(Br=new ResizeObserver(function(){setTimeout(Hr)}),Br.observe(Ee)):window.addEventListener(\"resize\",Hr,!1);function Vr(){Br?Br.disconnect():window.removeEventListener(\"resize\",Hr),Ee.removeChild(Ir)}return Hr(),{canvas:Ir,onDestroy:Vr}}function p(Ee,xt){function zt(Ir){try{return Ee.getContext(Ir,xt)}catch(Hr){return null}}return zt(\"webgl\")||zt(\"experimental-webgl\")||zt(\"webgl-experimental\")}function C(Ee){return typeof Ee.nodeName==\"string\"&&typeof Ee.appendChild==\"function\"&&typeof Ee.getBoundingClientRect==\"function\"}function E(Ee){return typeof Ee.drawArrays==\"function\"||typeof Ee.drawElements==\"function\"}function A(Ee){return typeof Ee==\"string\"?Ee.split():Ee}function L(Ee){return typeof Ee==\"string\"?document.querySelector(Ee):Ee}function _(Ee){var xt=Ee||{},zt,Ir,Hr,Br,Vr={},mi=[],Ni=[],Oi=typeof window==\"undefined\"?1:window.devicePixelRatio,Mi=!1,Hn={},Qi=function(Mr){},ji=function(){};if(typeof xt==\"string\"?zt=document.querySelector(xt):typeof xt==\"object\"&&(C(xt)?zt=xt:E(xt)?(Br=xt,Hr=Br.canvas):(\"gl\"in xt?Br=xt.gl:\"canvas\"in xt?Hr=L(xt.canvas):\"container\"in xt&&(Ir=L(xt.container)),\"attributes\"in xt&&(Vr=xt.attributes),\"extensions\"in xt&&(mi=A(xt.extensions)),\"optionalExtensions\"in xt&&(Ni=A(xt.optionalExtensions)),\"onDone\"in xt&&(Qi=xt.onDone),\"profile\"in xt&&(Mi=!!xt.profile),\"pixelRatio\"in xt&&(Oi=+xt.pixelRatio),\"cachedCode\"in xt&&(Hn=xt.cachedCode))),zt&&(zt.nodeName.toLowerCase()===\"canvas\"?Hr=zt:Ir=zt),!Br){if(!Hr){var si=b(Ir||document.body,Qi,Oi);if(!si)return null;Hr=si.canvas,ji=si.onDestroy}Vr.premultipliedAlpha===void 0&&(Vr.premultipliedAlpha=!0),Br=p(Hr,Vr)}return Br?{gl:Br,canvas:Hr,container:Ir,extensions:mi,optionalExtensions:Ni,pixelRatio:Oi,profile:Mi,cachedCode:Hn,onDone:Qi,onDestroy:ji}:(ji(),Qi(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function k(Ee,xt){var zt={};function Ir(Vr){var mi=Vr.toLowerCase(),Ni;try{Ni=zt[mi]=Ee.getExtension(mi)}catch(Oi){}return!!Ni}for(var Hr=0;Hr<xt.extensions.length;++Hr){var Br=xt.extensions[Hr];if(!Ir(Br))return xt.onDestroy(),xt.onDone('\"'+Br+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return xt.optionalExtensions.forEach(Ir),{extensions:zt,restore:function(){Object.keys(zt).forEach(function(Vr){if(zt[Vr]&&!Ir(Vr))throw new Error(\"(regl): error restoring extension \"+Vr)})}}}function M(Ee,xt){for(var zt=Array(Ee),Ir=0;Ir<Ee;++Ir)zt[Ir]=xt(Ir);return zt}var g=5120,P=5121,T=5122,z=5123,O=5124,V=5125,G=5126;function Z(Ee){for(var xt=16;xt<=1<<28;xt*=16)if(Ee<=xt)return xt;return 0}function H(Ee){var xt,zt;return xt=(Ee>65535)<<4,Ee>>>=xt,zt=(Ee>255)<<3,Ee>>>=zt,xt|=zt,zt=(Ee>15)<<2,Ee>>>=zt,xt|=zt,zt=(Ee>3)<<1,Ee>>>=zt,xt|=zt,xt|Ee>>1}function N(){var Ee=M(8,function(){return[]});function xt(Br){var Vr=Z(Br),mi=Ee[H(Vr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Vr)}function zt(Br){Ee[H(Br.byteLength)>>2].push(Br)}function Ir(Br,Vr){var mi=null;switch(Br){case g:mi=new Int8Array(xt(Vr),0,Vr);break;case P:mi=new Uint8Array(xt(Vr),0,Vr);break;case T:mi=new Int16Array(xt(2*Vr),0,Vr);break;case z:mi=new Uint16Array(xt(2*Vr),0,Vr);break;case O:mi=new Int32Array(xt(4*Vr),0,Vr);break;case V:mi=new Uint32Array(xt(4*Vr),0,Vr);break;case G:mi=new Float32Array(xt(4*Vr),0,Vr);break;default:return null}return mi.length!==Vr?mi.subarray(0,Vr):mi}function Hr(Br){zt(Br.buffer)}return{alloc:xt,free:zt,allocType:Ir,freeType:Hr}}var j=N();j.zero=N();var re=3408,oe=3410,_e=3411,Me=3412,ke=3413,me=3414,ie=3415,Se=33901,Le=33902,Ae=3379,De=3386,Pe=34921,ge=36347,Fe=36348,ce=35661,Ze=35660,ct=34930,pt=36349,Wt=34076,st=34024,lt=7936,Gt=7937,Nt=7938,$t=35724,sr=34047,wr=36063,ur=34852,Qe=3553,Et=34067,er=34069,Ut=33984,Ft=6408,bt=5126,yt=5121,Yt=36160,lr=36053,Tr=36064,Rr=16384,ei=function(Ee,xt){var zt=1;xt.ext_texture_filter_anisotropic&&(zt=Ee.getParameter(sr));var Ir=1,Hr=1;xt.webgl_draw_buffers&&(Ir=Ee.getParameter(ur),Hr=Ee.getParameter(wr));var Br=!!xt.oes_texture_float;if(Br){var Vr=Ee.createTexture();Ee.bindTexture(Qe,Vr),Ee.texImage2D(Qe,0,Ft,1,1,0,Ft,bt,null);var mi=Ee.createFramebuffer();if(Ee.bindFramebuffer(Yt,mi),Ee.framebufferTexture2D(Yt,Tr,Qe,Vr,0),Ee.bindTexture(Qe,null),Ee.checkFramebufferStatus(Yt)!==lr)Br=!1;else{Ee.viewport(0,0,1,1),Ee.clearColor(1,0,0,1),Ee.clear(Rr);var Ni=j.allocType(bt,4);Ee.readPixels(0,0,1,1,Ft,bt,Ni),Ee.getError()?Br=!1:(Ee.deleteFramebuffer(mi),Ee.deleteTexture(Vr),Br=Ni[0]===1),j.freeType(Ni)}}var Oi=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Mi=!0;if(!Oi){var Hn=Ee.createTexture(),Qi=j.allocType(yt,36);Ee.activeTexture(Ut),Ee.bindTexture(Et,Hn),Ee.texImage2D(er,0,Ft,3,3,0,Ft,yt,Qi),j.freeType(Qi),Ee.bindTexture(Et,null),Ee.deleteTexture(Hn),Mi=!Ee.getError()}return{colorBits:[Ee.getParameter(oe),Ee.getParameter(_e),Ee.getParameter(Me),Ee.getParameter(ke)],depthBits:Ee.getParameter(me),stencilBits:Ee.getParameter(ie),subpixelBits:Ee.getParameter(re),extensions:Object.keys(xt).filter(function(ji){return!!xt[ji]}),maxAnisotropic:zt,maxDrawbuffers:Ir,maxColorAttachments:Hr,pointSizeDims:Ee.getParameter(Se),lineWidthDims:Ee.getParameter(Le),maxViewportDims:Ee.getParameter(De),maxCombinedTextureUnits:Ee.getParameter(ce),maxCubeMapSize:Ee.getParameter(Wt),maxRenderbufferSize:Ee.getParameter(st),maxTextureUnits:Ee.getParameter(ct),maxTextureSize:Ee.getParameter(Ae),maxAttributes:Ee.getParameter(Pe),maxVertexUniforms:Ee.getParameter(ge),maxVertexTextureUnits:Ee.getParameter(Ze),maxVaryingVectors:Ee.getParameter(Fe),maxFragmentUniforms:Ee.getParameter(pt),glsl:Ee.getParameter($t),renderer:Ee.getParameter(Gt),vendor:Ee.getParameter(lt),version:Ee.getParameter(Nt),readFloat:Br,npotTextureCube:Mi}},Wr=function(Ee){return Ee instanceof Uint8Array||Ee instanceof Uint16Array||Ee instanceof Uint32Array||Ee instanceof Int8Array||Ee instanceof Int16Array||Ee instanceof Int32Array||Ee instanceof Float32Array||Ee instanceof Float64Array||Ee instanceof Uint8ClampedArray};function Ur(Ee){return!!Ee&&typeof Ee==\"object\"&&Array.isArray(Ee.shape)&&Array.isArray(Ee.stride)&&typeof Ee.offset==\"number\"&&Ee.shape.length===Ee.stride.length&&(Array.isArray(Ee.data)||Wr(Ee.data))}var dt=function(Ee){return Object.keys(Ee).map(function(xt){return Ee[xt]})},Ge={shape:xe,flatten:Ie};function Je(Ee,xt,zt){for(var Ir=0;Ir<xt;++Ir)zt[Ir]=Ee[Ir]}function je(Ee,xt,zt,Ir){for(var Hr=0,Br=0;Br<xt;++Br)for(var Vr=Ee[Br],mi=0;mi<zt;++mi)Ir[Hr++]=Vr[mi]}function $e(Ee,xt,zt,Ir,Hr,Br){for(var Vr=Br,mi=0;mi<xt;++mi)for(var Ni=Ee[mi],Oi=0;Oi<zt;++Oi)for(var Mi=Ni[Oi],Hn=0;Hn<Ir;++Hn)Hr[Vr++]=Mi[Hn]}function wt(Ee,xt,zt,Ir,Hr){for(var Br=1,Vr=zt+1;Vr<xt.length;++Vr)Br*=xt[Vr];var mi=xt[zt];if(xt.length-zt===4){var Ni=xt[zt+1],Oi=xt[zt+2],Mi=xt[zt+3];for(Vr=0;Vr<mi;++Vr)$e(Ee[Vr],Ni,Oi,Mi,Ir,Hr),Hr+=Br}else for(Vr=0;Vr<mi;++Vr)wt(Ee[Vr],xt,zt+1,Ir,Hr),Hr+=Br}function Ie(Ee,xt,zt,Ir){var Hr=1;if(xt.length)for(var Br=0;Br<xt.length;++Br)Hr*=xt[Br];else Hr=0;var Vr=Ir||j.allocType(zt,Hr);switch(xt.length){case 0:break;case 1:Je(Ee,xt[0],Vr);break;case 2:je(Ee,xt[0],xt[1],Vr);break;case 3:$e(Ee,xt[0],xt[1],xt[2],Vr,0);break;default:wt(Ee,xt,0,Vr,0)}return Vr}function xe(Ee){for(var xt=[],zt=Ee;zt.length;zt=zt[0])xt.push(zt.length);return xt}var Ce={\"[object Int8Array]\":5120,\"[object Int16Array]\":5122,\"[object Int32Array]\":5124,\"[object Uint8Array]\":5121,\"[object Uint8ClampedArray]\":5121,\"[object Uint16Array]\":5123,\"[object Uint32Array]\":5125,\"[object Float32Array]\":5126,\"[object Float64Array]\":5121,\"[object ArrayBuffer]\":5121},vt=5120,nr=5122,ir=5124,pr=5121,oi=5123,di=5125,Jr=5126,fi=5126,Hi={int8:vt,int16:nr,int32:ir,uint8:pr,uint16:oi,uint32:di,float:Jr,float32:fi},Pn=35048,wn=35040,pn={dynamic:Pn,stream:wn,static:35044},Vn=Ge.flatten,kn=Ge.shape,ea=35044,ua=35040,Vt=5121,_t=5126,tr=[];tr[5120]=1,tr[5122]=2,tr[5124]=4,tr[5121]=1,tr[5123]=2,tr[5125]=4,tr[5126]=4;function ar(Ee){return Ce[Object.prototype.toString.call(Ee)]|0}function Er(Ee,xt){for(var zt=0;zt<xt.length;++zt)Ee[zt]=xt[zt]}function Zr(Ee,xt,zt,Ir,Hr,Br,Vr){for(var mi=0,Ni=0;Ni<zt;++Ni)for(var Oi=0;Oi<Ir;++Oi)Ee[mi++]=xt[Hr*Ni+Br*Oi+Vr]}function ri(Ee,xt,zt,Ir){var Hr=0,Br={};function Vr(Mr){this.id=Hr++,this.buffer=Ee.createBuffer(),this.type=Mr,this.usage=ea,this.byteLength=0,this.dimension=1,this.dtype=Vt,this.persistentData=null,zt.profile&&(this.stats={size:0})}Vr.prototype.bind=function(){Ee.bindBuffer(this.type,this.buffer)},Vr.prototype.destroy=function(){Qi(this)};var mi=[];function Ni(Mr,Yr){var xi=mi.pop();return xi||(xi=new Vr(Mr)),xi.bind(),Hn(xi,Yr,ua,0,1,!1),xi}function Oi(Mr){mi.push(Mr)}function Mi(Mr,Yr,xi){Mr.byteLength=Yr.byteLength,Ee.bufferData(Mr.type,Yr,xi)}function Hn(Mr,Yr,xi,Ii,ci,nn){var Xi;if(Mr.usage=xi,Array.isArray(Yr)){if(Mr.dtype=Ii||_t,Yr.length>0){var qn;if(Array.isArray(Yr[0])){Xi=kn(Yr);for(var vi=1,li=1;li<Xi.length;++li)vi*=Xi[li];Mr.dimension=vi,qn=Vn(Yr,Xi,Mr.dtype),Mi(Mr,qn,xi),nn?Mr.persistentData=qn:j.freeType(qn)}else if(typeof Yr[0]==\"number\"){Mr.dimension=ci;var mn=j.allocType(Mr.dtype,Yr.length);Er(mn,Yr),Mi(Mr,mn,xi),nn?Mr.persistentData=mn:j.freeType(mn)}else Wr(Yr[0])&&(Mr.dimension=Yr[0].length,Mr.dtype=Ii||ar(Yr[0])||_t,qn=Vn(Yr,[Yr.length,Yr[0].length],Mr.dtype),Mi(Mr,qn,xi),nn?Mr.persistentData=qn:j.freeType(qn))}}else if(Wr(Yr))Mr.dtype=Ii||ar(Yr),Mr.dimension=ci,Mi(Mr,Yr,xi),nn&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr.buffer)));else if(Ur(Yr)){Xi=Yr.shape;var Ki=Yr.stride,Ui=Yr.offset,Bi=0,vn=0,Un=0,na=0;Xi.length===1?(Bi=Xi[0],vn=1,Un=Ki[0],na=0):Xi.length===2&&(Bi=Xi[0],vn=Xi[1],Un=Ki[0],na=Ki[1]),Mr.dtype=Ii||ar(Yr.data)||_t,Mr.dimension=vn;var Yi=j.allocType(Mr.dtype,Bi*vn);Zr(Yi,Yr.data,Bi,vn,Un,na,Ui),Mi(Mr,Yi,xi),nn?Mr.persistentData=Yi:j.freeType(Yi)}else Yr instanceof ArrayBuffer&&(Mr.dtype=Vt,Mr.dimension=ci,Mi(Mr,Yr,xi),nn&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr))))}function Qi(Mr){xt.bufferCount--,Ir(Mr);var Yr=Mr.buffer;Ee.deleteBuffer(Yr),Mr.buffer=null,delete Br[Mr.id]}function ji(Mr,Yr,xi,Ii){xt.bufferCount++;var ci=new Vr(Yr);Br[ci.id]=ci;function nn(vi){var li=ea,mn=null,Ki=0,Ui=0,Bi=1;return Array.isArray(vi)||Wr(vi)||Ur(vi)||vi instanceof ArrayBuffer?mn=vi:typeof vi==\"number\"?Ki=vi|0:vi&&(\"data\"in vi&&(mn=vi.data),\"usage\"in vi&&(li=pn[vi.usage]),\"type\"in vi&&(Ui=Hi[vi.type]),\"dimension\"in vi&&(Bi=vi.dimension|0),\"length\"in vi&&(Ki=vi.length|0)),ci.bind(),mn?Hn(ci,mn,li,Ui,Bi,Ii):(Ki&&Ee.bufferData(ci.type,Ki,li),ci.dtype=Ui||Vt,ci.usage=li,ci.dimension=Bi,ci.byteLength=Ki),zt.profile&&(ci.stats.size=ci.byteLength*tr[ci.dtype]),nn}function Xi(vi,li){Ee.bufferSubData(ci.type,li,vi)}function qn(vi,li){var mn=(li||0)|0,Ki;if(ci.bind(),Wr(vi)||vi instanceof ArrayBuffer)Xi(vi,mn);else if(Array.isArray(vi)){if(vi.length>0){if(typeof vi[0]==\"number\"){var Ui=j.allocType(ci.dtype,vi.length);Er(Ui,vi),Xi(Ui,mn),j.freeType(Ui)}else if(Array.isArray(vi[0])||Wr(vi[0])){Ki=kn(vi);var Bi=Vn(vi,Ki,ci.dtype);Xi(Bi,mn),j.freeType(Bi)}}}else if(Ur(vi)){Ki=vi.shape;var vn=vi.stride,Un=0,na=0,Yi=0,Ln=0;Ki.length===1?(Un=Ki[0],na=1,Yi=vn[0],Ln=0):Ki.length===2&&(Un=Ki[0],na=Ki[1],Yi=vn[0],Ln=vn[1]);var ra=Array.isArray(vi.data)?ci.dtype:ar(vi.data),oa=j.allocType(ra,Un*na);Zr(oa,vi.data,Un,na,Yi,Ln,vi.offset),Xi(oa,mn),j.freeType(oa)}return nn}return xi||nn(Mr),nn._reglType=\"buffer\",nn._buffer=ci,nn.subdata=qn,zt.profile&&(nn.stats=ci.stats),nn.destroy=function(){Qi(ci)},nn}function si(){dt(Br).forEach(function(Mr){Mr.buffer=Ee.createBuffer(),Ee.bindBuffer(Mr.type,Mr.buffer),Ee.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(xt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Br).forEach(function(Yr){Mr+=Br[Yr].stats.size}),Mr}),{create:ji,createStream:Ni,destroyStream:Oi,clear:function(){dt(Br).forEach(Qi),mi.forEach(Qi)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Vr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var $r=0,zi=0,Ji=1,en=1,cn=4,yn=4,Mn={points:$r,point:zi,lines:Ji,line:en,triangles:cn,triangle:yn,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},Ba=0,la=1,ma=4,Wa=5120,Fa=5121,Wo=5122,da=5123,Wn=5124,Ga=5125,vo=34963,jn=35040,St=35044;function Cr(Ee,xt,zt,Ir){var Hr={},Br=0,Vr={uint8:Fa,uint16:da};xt.oes_element_index_uint&&(Vr.uint32=Ga);function mi(si){this.id=Br++,Hr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function Oi(si){var Mr=Ni.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Mi(si){Ni.push(si)}function Hn(si,Mr,Yr,xi,Ii,ci,nn){si.buffer.bind();var Xi;if(Mr){var qn=nn;!nn&&(!Wr(Mr)||Ur(Mr)&&!Wr(Mr.data))&&(qn=xt.oes_element_index_uint?Ga:da),zt._initBuffer(si.buffer,Mr,Yr,qn,3)}else Ee.bufferData(vo,ci,Yr),si.buffer.dtype=Xi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Xi=nn,!nn){switch(si.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Wo:Xi=da;break;case Ga:case Wn:Xi=Ga;break;default:}si.buffer.dtype=Xi}si.type=Xi;var vi=Ii;vi<0&&(vi=si.buffer.byteLength,Xi===da?vi>>=1:Xi===Ga&&(vi>>=2)),si.vertCount=vi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=la),mn===3&&(li=ma)}si.primType=li}function Qi(si){Ir.elementsCount--,delete Hr[si.id],si.buffer.destroy(),si.buffer=null}function ji(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Ir.elementsCount++;function Ii(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci==\"number\")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var nn=null,Xi=St,qn=-1,vi=-1,li=0,mn=0;Array.isArray(ci)||Wr(ci)||Ur(ci)?nn=ci:(\"data\"in ci&&(nn=ci.data),\"usage\"in ci&&(Xi=pn[ci.usage]),\"primitive\"in ci&&(qn=Mn[ci.primitive]),\"count\"in ci&&(vi=ci.count|0),\"type\"in ci&&(mn=Vr[ci.type]),\"length\"in ci?li=ci.length|0:(li=vi,mn===da||mn===Wo?li*=2:(mn===Ga||mn===Wn)&&(li*=4))),Hn(xi,nn,Xi,qn,vi,li,mn)}return Ii}return Ii(si),Ii._reglType=\"elements\",Ii._elements=xi,Ii.subdata=function(ci,nn){return Yr.subdata(ci,nn),Ii},Ii.destroy=function(){Qi(xi)},Ii}return{create:ji,createStream:Oi,destroyStream:Mi,getElements:function(si){return typeof si==\"function\"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(Hr).forEach(Qi)}}}var Qr=new Float32Array(1),pi=new Uint32Array(Qr.buffer),fn=5123;function Sn(Ee){for(var xt=j.allocType(fn,Ee.length),zt=0;zt<Ee.length;++zt)if(isNaN(Ee[zt]))xt[zt]=65535;else if(Ee[zt]===1/0)xt[zt]=31744;else if(Ee[zt]===-1/0)xt[zt]=64512;else{Qr[0]=Ee[zt];var Ir=pi[0],Hr=Ir>>>31<<15,Br=(Ir<<1>>>24)-127,Vr=Ir>>13&1023;if(Br<-24)xt[zt]=Hr;else if(Br<-14){var mi=-14-Br;xt[zt]=Hr+(Vr+1024>>mi)}else Br>15?xt[zt]=Hr+31744:xt[zt]=Hr+(Br+15<<10)+Vr}return xt}function En(Ee){return Array.isArray(Ee)||Wr(Ee)}var ki=34467,_n=3553,ya=34067,Jn=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,Co=32854,Fs=32855,zs=36194,ul=32819,cl=32820,zl=33635,cs=34042,nl=6402,Ss=34041,fl=35904,Js=35906,Os=36193,Io=33776,us=33777,Zl=33778,Su=33779,nc=35986,ws=35987,Fn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Yl=36196,Us=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Uf=10241,ml=9728,Zc=9729,Kl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,Nh=4353,kf=4354,fs=34046,nf=3317,Vf=37440,Jl=37441,hl=37443,lc=37444,Fu=33984,Cs=[Kl,yu,qs,oc],js=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[nl]=1,Go[Ss]=Go[Lo]=2,Go[No]=Go[fl]=3,Go[Ma]=Go[Js]=4;function gs(Ee){return\"[object \"+Ee+\"]\"}var uc=gs(\"HTMLCanvasElement\"),bl=gs(\"OffscreenCanvas\"),Gu=gs(\"CanvasRenderingContext2D\"),Bs=gs(\"ImageBitmap\"),ad=gs(\"HTMLImageElement\"),Po=gs(\"HTMLVideoElement\"),od=Object.keys(Ce).concat([uc,bl,Gu,Bs,ad,Po]),Yo=[];Yo[Us]=1,Yo[aa]=4,Yo[Os]=2,Yo[Hl]=2,Yo[ac]=4;var Pa=[];Pa[Co]=2,Pa[Fs]=2,Pa[zs]=2,Pa[Ss]=4,Pa[Io]=.5,Pa[us]=.5,Pa[Zl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[ws]=1,Pa[Fn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Yl]=.5;function af(Ee){return Array.isArray(Ee)&&(Ee.length===0||typeof Ee[0]==\"number\")}function Hu(Ee){if(!Array.isArray(Ee))return!1;var xt=Ee.length;return!(xt===0||!En(Ee[0]))}function wl(Ee){return Object.prototype.toString.call(Ee)}function Gf(Ee){return wl(Ee)===uc}function Ic(Ee){return wl(Ee)===bl}function mf(Ee){return wl(Ee)===Gu}function Bl(Ee){return wl(Ee)===Bs}function _h(Ee){return wl(Ee)===ad}function Qf(Ee){return wl(Ee)===Po}function yf(Ee){if(!Ee)return!1;var xt=wl(Ee);return od.indexOf(xt)>=0?!0:af(Ee)||Hu(Ee)||Ur(Ee)}function Yc(Ee){return Ce[Object.prototype.toString.call(Ee)]|0}function eh(Ee,xt){var zt=xt.length;switch(Ee.type){case Us:case Hl:case ac:case aa:var Ir=j.allocType(Ee.type,zt);Ir.set(xt),Ee.data=Ir;break;case Os:Ee.data=Sn(xt);break;default:}}function th(Ee,xt){return j.allocType(Ee.type===Os?aa:Ee.type,xt)}function ju(Ee,xt){Ee.type===Os?(Ee.data=Sn(xt),j.freeType(xt)):Ee.data=xt}function Hf(Ee,xt,zt,Ir,Hr,Br){for(var Vr=Ee.width,mi=Ee.height,Ni=Ee.channels,Oi=Vr*mi*Ni,Mi=th(Ee,Oi),Hn=0,Qi=0;Qi<mi;++Qi)for(var ji=0;ji<Vr;++ji)for(var si=0;si<Ni;++si)Mi[Hn++]=xt[zt*ji+Ir*Qi+Hr*si+Br];ju(Ee,Mi)}function cc(Ee,xt,zt,Ir,Hr,Br){var Vr;if(typeof Pa[Ee]!=\"undefined\"?Vr=Pa[Ee]:Vr=Go[Ee]*Yo[xt],Br&&(Vr*=6),Hr){for(var mi=0,Ni=zt;Ni>=1;)mi+=Vr*Ni*Ni,Ni/=2;return mi}else return Vr*zt*Ir}function of(Ee,xt,zt,Ir,Hr,Br,Vr){var mi={\"don't care\":sc,\"dont care\":sc,nice:kf,fast:Nh},Ni={repeat:ql,clamp:Pc,mirror:Do},Oi={nearest:ml,linear:Zc},Mi=e({mipmap:oc,\"nearest mipmap nearest\":Kl,\"linear mipmap nearest\":qs,\"nearest mipmap linear\":yu,\"linear mipmap linear\":oc},Oi),Hn={none:0,browser:lc},Qi={uint8:Us,rgba4:ul,rgb565:zl,\"rgb5 a1\":cl},ji={alpha:_o,luminance:po,\"luminance alpha\":Lo,rgb:No,rgba:Ma,rgba4:Co,\"rgb5 a1\":Fs,rgb565:zs},si={};xt.ext_srgb&&(ji.srgb=fl,ji.srgba=Js),xt.oes_texture_float&&(Qi.float32=Qi.float=aa),xt.oes_texture_half_float&&(Qi.float16=Qi[\"half float\"]=Os),xt.webgl_depth_texture&&(e(ji,{depth:nl,\"depth stencil\":Ss}),e(Qi,{uint16:Hl,uint32:ac,\"depth stencil\":cs})),xt.webgl_compressed_texture_s3tc&&e(si,{\"rgb s3tc dxt1\":Io,\"rgba s3tc dxt1\":us,\"rgba s3tc dxt3\":Zl,\"rgba s3tc dxt5\":Su}),xt.webgl_compressed_texture_atc&&e(si,{\"rgb atc\":nc,\"rgba atc explicit alpha\":ws,\"rgba atc interpolated alpha\":Fn}),xt.webgl_compressed_texture_pvrtc&&e(si,{\"rgb pvrtc 4bppv1\":_a,\"rgb pvrtc 2bppv1\":Vu,\"rgba pvrtc 4bppv1\":Ol,\"rgba pvrtc 2bppv1\":xo}),xt.webgl_compressed_texture_etc1&&(si[\"rgb etc1\"]=Yl);var Mr=Array.prototype.slice.call(Ee.getParameter(ki));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(ji[ne]=we)});var Yr=Object.keys(ji);zt.textureFormats=Yr;var xi=[];Object.keys(ji).forEach(function(ne){var we=ji[ne];xi[we]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var we=Qi[ne];Ii[we]=ne});var ci=[];Object.keys(Oi).forEach(function(ne){var we=Oi[ne];ci[we]=ne});var nn=[];Object.keys(Mi).forEach(function(ne){var we=Mi[ne];nn[we]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var we=Ni[ne];Xi[we]=ne});var qn=Yr.reduce(function(ne,we){var Ue=ji[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===nl||Ue===Ss||xt.ext_srgb&&(Ue===fl||Ue===Js)?ne[Ue]=Ue:Ue===Fs||we.indexOf(\"rgba\")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function vi(){this.internalformat=Ma,this.format=Ma,this.type=Us,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!=\"object\"||!we)){if(\"premultiplyAlpha\"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),\"flipY\"in we&&(ne.flipY=we.flipY),\"alignment\"in we&&(ne.unpackAlignment=we.alignment),\"colorSpace\"in we&&(ne.colorSpace=Hn[we.colorSpace]),\"type\"in we){var Ue=we.type;ne.type=Qi[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;\"shape\"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):(\"radius\"in we&&(ft=Zt=we.radius),\"width\"in we&&(ft=we.width),\"height\"in we&&(Zt=we.height),\"channels\"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if(\"format\"in we){var et=we.format,at=ne.internalformat=ji[et];ne.format=qn[at],et in Qi&&(\"type\"in we||(ne.type=Qi[et])),et in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==js[ne.format]&&(ne.format=ne.internalformat=js[ne.channels])}}function Ki(ne){Ee.pixelStorei(Vf,ne.flipY),Ee.pixelStorei(Jl,ne.premultiplyAlpha),Ee.pixelStorei(hl,ne.colorSpace),Ee.pixelStorei(nf,ne.unpackAlignment)}function Ui(){vi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,we){var Ue=null;if(yf(we)?Ue=we:we&&(mn(ne,we),\"x\"in we&&(ne.xOffset=we.x|0),\"y\"in we&&(ne.yOffset=we.y|0),yf(we.data)&&(Ue=we.data)),we.copy){var ft=Hr.viewportWidth,Zt=Hr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Wr(Ue))ne.channels=ne.channels||4,ne.data=Ue,!(\"type\"in we)&&ne.type===Us&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Ur(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Us&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,et,at,kt,Ot,It,Bt;qt.length===3?(kt=qt[2],Bt=Ve[2]):(kt=1,Bt=1),et=qt[0],at=qt[1],Ot=Ve[0],It=Ve[1],ne.alignment=1,ne.width=et,ne.height=at,ne.channels=kt,ne.format=ne.internalformat=js[kt],ne.needsFree=!0,Hf(ne,hr,Ot,It,Bt,Ue.offset)}else if(Gf(Ue)||Ic(Ue)||mf(Ue))Gf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(_h(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Rt=ne.width||Ue[0].length,mt=ne.height||Ue.length,Pt=ne.channels;En(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),cr=1,br=0;br<ht.length;++br)cr*=ht[br];var Nr=th(ne,cr);Ge.flatten(Ue,ht,\"\",Nr),ju(ne,Nr),ne.alignment=1,ne.width=Rt,ne.height=mt,ne.channels=Pt,ne.format=ne.internalformat=js[Pt],ne.needsFree=!0}ne.type===aa||ne.type}function vn(ne,we,Ue){var ft=ne.element,Zt=ne.data,hr=ne.internalformat,qt=ne.format,Ve=ne.type,et=ne.width,at=ne.height;Ki(ne),ft?Ee.texImage2D(we,Ue,qt,qt,Ve,ft):ne.compressed?Ee.compressedTexImage2D(we,Ue,hr,et,at,0,Zt):ne.needsCopy?(Ir(),Ee.copyTexImage2D(we,Ue,qt,ne.xOffset,ne.yOffset,et,at,0)):Ee.texImage2D(we,Ue,qt,et,at,0,qt,Ve,Zt||null)}function Un(ne,we,Ue,ft,Zt){var hr=ne.element,qt=ne.data,Ve=ne.internalformat,et=ne.format,at=ne.type,kt=ne.width,Ot=ne.height;Ki(ne),hr?Ee.texSubImage2D(we,Zt,Ue,ft,et,at,hr):ne.compressed?Ee.compressedTexSubImage2D(we,Zt,Ue,ft,Ve,kt,Ot,qt):ne.needsCopy?(Ir(),Ee.copyTexSubImage2D(we,Zt,Ue,ft,ne.xOffset,ne.yOffset,kt,Ot)):Ee.texSubImage2D(we,Zt,Ue,ft,kt,Ot,et,at,qt)}var na=[];function Yi(){return na.pop()||new Ui}function Ln(ne){ne.needsFree&&j.freeType(ne.data),Ui.call(ne),na.push(ne)}function ra(){vi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function oa(ne,we,Ue){var ft=ne.images[0]=Yi();ne.mipmask=1,ft.width=ne.width=we,ft.height=ne.height=Ue,ft.channels=ne.channels=4}function wa(ne,we){var Ue=null;if(yf(we))Ue=ne.images[0]=Yi(),li(Ue,ne),Bi(Ue,we),ne.mipmask=1;else if(mn(ne,we),Array.isArray(we.mipmap))for(var ft=we.mipmap,Zt=0;Zt<ft.length;++Zt)Ue=ne.images[Zt]=Yi(),li(Ue,ne),Ue.width>>=Zt,Ue.height>>=Zt,Bi(Ue,ft[Zt]),ne.mipmask|=1<<Zt;else Ue=ne.images[0]=Yi(),li(Ue,ne),Bi(Ue,we),ne.mipmask=1;li(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===us||ne.internalformat===Zl||ne.internalformat)}function ns(ne,we){for(var Ue=ne.images,ft=0;ft<Ue.length;++ft){if(!Ue[ft])return;vn(Ue[ft],we,ft)}}var Ys=[];function Va(){var ne=Ys.pop()||new ra;vi.call(ne),ne.mipmask=0;for(var we=0;we<16;++we)ne.images[we]=null;return ne}function El(ne){for(var we=ne.images,Ue=0;Ue<we.length;++Ue)we[Ue]&&Ln(we[Ue]),we[Ue]=null;Ys.push(ne)}function zo(){this.minFilter=ml,this.magFilter=ml,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function el(ne,we){if(\"min\"in we){var Ue=we.min;ne.minFilter=Mi[Ue],Cs.indexOf(ne.minFilter)>=0&&!(\"faces\"in we)&&(ne.genMipmaps=!0)}if(\"mag\"in we){var ft=we.mag;ne.magFilter=Oi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if(\"wrap\"in we){var qt=we.wrap;typeof qt==\"string\"?Zt=hr=Ni[qt]:Array.isArray(qt)&&(Zt=Ni[qt[0]],hr=Ni[qt[1]])}else{if(\"wrapS\"in we){var Ve=we.wrapS;Zt=Ni[Ve]}if(\"wrapT\"in we){var et=we.wrapT;hr=Ni[et]}}if(ne.wrapS=Zt,ne.wrapT=hr,\"anisotropic\"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if(\"mipmap\"in we){var kt=!1;switch(typeof we.mipmap){case\"string\":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,kt=!0;break;case\"boolean\":kt=ne.genMipmaps=we.mipmap;break;case\"object\":ne.genMipmaps=!1,kt=!0;break;default:}kt&&!(\"min\"in we)&&(ne.minFilter=Kl)}}function ol(ne,we){Ee.texParameteri(we,Uf,ne.minFilter),Ee.texParameteri(we,rf,ne.magFilter),Ee.texParameteri(we,Oo,ne.wrapS),Ee.texParameteri(we,qo,ne.wrapT),xt.ext_texture_filter_anisotropic&&Ee.texParameteri(we,fs,ne.anisotropic),ne.genMipmaps&&(Ee.hint(Cf,ne.mipmapHint),Ee.generateMipmap(we))}var Vl=0,ls={},Gs=zt.maxTextureUnits,Ks=Array(Gs).map(function(){return null});function Ta(ne){vi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Ee.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Vr.profile&&(this.stats={size:0})}function sl(ne){Ee.activeTexture(Fu),Ee.bindTexture(ne.target,ne.texture)}function io(){var ne=Ks[0];ne?Ee.bindTexture(ne.target,ne.texture):Ee.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Ee.activeTexture(Fu+Ue),Ee.bindTexture(ft,null),Ks[Ue]=null),Ee.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ls[ne.id],Br.textureCount--}e(Ta.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue<Gs;++Ue){var ft=Ks[Ue];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Ks[Ue]=ne,we=Ue;break}we>=Gs,Vr.profile&&Br.maxTextureUnits<we+1&&(Br.maxTextureUnits=we+1),ne.unit=we,Ee.activeTexture(Fu+we),Ee.bindTexture(ne.target,ne.texture)}return we},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,we){var Ue=new Ta(_n);ls[Ue.id]=Ue,Br.textureCount++;function ft(qt,Ve){var et=Ue.texInfo;zo.call(et);var at=Va();return typeof qt==\"number\"?typeof Ve==\"number\"?oa(at,qt|0,Ve|0):oa(at,qt|0,qt|0):qt?(el(et,qt),wa(at,qt)):oa(at,1,1),et.genMipmaps&&(at.mipmask=(at.width<<1)-1),Ue.mipmask=at.mipmask,li(Ue,at),Ue.internalformat=at.internalformat,ft.width=at.width,ft.height=at.height,sl(Ue),ns(at,_n),ol(et,_n),io(),El(at),Vr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,at.width,at.height,et.genMipmaps,!1)),ft.format=xi[Ue.internalformat],ft.type=Ii[Ue.type],ft.mag=ci[et.magFilter],ft.min=nn[et.minFilter],ft.wrapS=Xi[et.wrapS],ft.wrapT=Xi[et.wrapT],ft}function Zt(qt,Ve,et,at){var kt=Ve|0,Ot=et|0,It=at|0,Bt=Yi();return li(Bt,Ue),Bt.width=0,Bt.height=0,Bi(Bt,qt),Bt.width=Bt.width||(Ue.width>>It)-kt,Bt.height=Bt.height||(Ue.height>>It)-Ot,sl(Ue),Un(Bt,_n,kt,Ot,It),io(),Ln(Bt),ft}function hr(qt,Ve){var et=qt|0,at=Ve|0||et;if(et===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=et,ft.height=Ue.height=at,sl(Ue);for(var kt=0;Ue.mipmask>>kt;++kt){var Ot=et>>kt,It=at>>kt;if(!Ot||!It)break;Ee.texImage2D(_n,kt,Ue.format,Ot,It,0,Ue.format,Ue.type,null)}return io(),Vr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,et,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType=\"texture2d\",ft._texture=Ue,Vr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new Ta(ya);ls[qt.id]=qt,Br.cubeCount++;var Ve=new Array(6);function et(Ot,It,Bt,Rt,mt,Pt){var ht,cr=qt.texInfo;for(zo.call(cr),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot==\"number\"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot==\"object\")if(It)wa(Ve[0],Ot),wa(Ve[1],It),wa(Ve[2],Bt),wa(Ve[3],Rt),wa(Ve[4],mt),wa(Ve[5],Pt);else if(el(cr,Ot),mn(qt,Ot),\"faces\"in Ot){var Nr=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),wa(Ve[ht],Nr[ht])}else for(ht=0;ht<6;++ht)wa(Ve[ht],Ot);for(li(qt,Ve[0]),cr.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,et.width=Ve[0].width,et.height=Ve[0].height,sl(qt),ht=0;ht<6;++ht)ns(Ve[ht],Jn+ht);for(ol(cr,ya),io(),Vr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,et.width,et.height,cr.genMipmaps,!0)),et.format=xi[qt.internalformat],et.type=Ii[qt.type],et.mag=ci[cr.magFilter],et.min=nn[cr.minFilter],et.wrapS=Xi[cr.wrapS],et.wrapT=Xi[cr.wrapT],ht=0;ht<6;++ht)El(Ve[ht]);return et}function at(Ot,It,Bt,Rt,mt){var Pt=Bt|0,ht=Rt|0,cr=mt|0,br=Yi();return li(br,qt),br.width=0,br.height=0,Bi(br,It),br.width=br.width||(qt.width>>cr)-Pt,br.height=br.height||(qt.height>>cr)-ht,sl(qt),Un(br,Jn+Ot,Pt,ht,cr),io(),Ln(br),et}function kt(Ot){var It=Ot|0;if(It!==qt.width){et.width=qt.width=It,et.height=qt.height=It,sl(qt);for(var Bt=0;Bt<6;++Bt)for(var Rt=0;qt.mipmask>>Rt;++Rt)Ee.texImage2D(Jn+Bt,Rt,qt.format,It>>Rt,It>>Rt,0,qt.format,qt.type,null);return io(),Vr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,et.width,et.height,!1,!0)),et}}return et(ne,we,Ue,ft,Zt,hr),et.subimage=at,et.resize=kt,et._reglType=\"textureCube\",et._texture=qt,Vr.profile&&(et.stats=qt.stats),et.destroy=function(){qt.decRef()},et}function q(){for(var ne=0;ne<Gs;++ne)Ee.activeTexture(Fu+ne),Ee.bindTexture(_n,null),Ks[ne]=null;dt(ls).forEach(Y),Br.cubeCount=0,Br.textureCount=0}Vr.profile&&(Br.getTotalTextureSize=function(){var ne=0;return Object.keys(ls).forEach(function(we){ne+=ls[we].stats.size}),ne});function K(){for(var ne=0;ne<Gs;++ne){var we=Ks[ne];we&&(we.bindCount=0,we.unit=-1,Ks[ne]=null)}dt(ls).forEach(function(Ue){Ue.texture=Ee.createTexture(),Ee.bindTexture(Ue.target,Ue.texture);for(var ft=0;ft<32;++ft)if((Ue.mipmask&1<<ft)!==0)if(Ue.target===_n)Ee.texImage2D(_n,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Ee.texImage2D(Jn+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);ol(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne<Gs;++ne){var we=Ks[ne];we&&(we.bindCount=0,we.unit=-1,Ks[ne]=null),Ee.activeTexture(Fu+ne),Ee.bindTexture(_n,null),Ee.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:q,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,ms=36194,jf=33189,Uh=36168,rh=34041,sf=35907,xh=34836,Mu=34842,ih=34843,Ws=[];Ws[Kc]=2,Ws[Rc]=2,Ws[ms]=2,Ws[jf]=2,Ws[Uh]=1,Ws[rh]=4,Ws[sf]=4,Ws[xh]=16,Ws[Mu]=8,Ws[ih]=6;function Eu(Ee,xt,zt){return Ws[Ee]*xt*zt}var Dc=function(Ee,xt,zt,Ir,Hr){var Br={rgba4:Kc,rgb565:ms,\"rgb5 a1\":Rc,depth:jf,stencil:Uh,\"depth stencil\":rh};xt.ext_srgb&&(Br.srgba=sf),xt.ext_color_buffer_half_float&&(Br.rgba16f=Mu,Br.rgb16f=ih),xt.webgl_color_buffer_float&&(Br.rgba32f=xh);var Vr=[];Object.keys(Br).forEach(function(ji){var si=Br[ji];Vr[si]=ji});var mi=0,Ni={};function Oi(ji){this.id=mi++,this.refCount=1,this.renderbuffer=ji,this.format=Kc,this.width=0,this.height=0,Hr.profile&&(this.stats={size:0})}Oi.prototype.decRef=function(){--this.refCount<=0&&Mi(this)};function Mi(ji){var si=ji.renderbuffer;Ee.bindRenderbuffer(Nl,null),Ee.deleteRenderbuffer(si),ji.renderbuffer=null,ji.refCount=0,delete Ni[ji.id],Ir.renderbufferCount--}function Hn(ji,si){var Mr=new Oi(Ee.createRenderbuffer());Ni[Mr.id]=Mr,Ir.renderbufferCount++;function Yr(Ii,ci){var nn=0,Xi=0,qn=Kc;if(typeof Ii==\"object\"&&Ii){var vi=Ii;if(\"shape\"in vi){var li=vi.shape;nn=li[0]|0,Xi=li[1]|0}else\"radius\"in vi&&(nn=Xi=vi.radius|0),\"width\"in vi&&(nn=vi.width|0),\"height\"in vi&&(Xi=vi.height|0);\"format\"in vi&&(qn=Br[vi.format])}else typeof Ii==\"number\"?(nn=Ii|0,typeof ci==\"number\"?Xi=ci|0:Xi=nn):Ii||(nn=Xi=1);if(!(nn===Mr.width&&Xi===Mr.height&&qn===Mr.format))return Yr.width=Mr.width=nn,Yr.height=Mr.height=Xi,Mr.format=qn,Ee.bindRenderbuffer(Nl,Mr.renderbuffer),Ee.renderbufferStorage(Nl,qn,nn,Xi),Hr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height)),Yr.format=Vr[Mr.format],Yr}function xi(Ii,ci){var nn=Ii|0,Xi=ci|0||nn;return nn===Mr.width&&Xi===Mr.height||(Yr.width=Mr.width=nn,Yr.height=Mr.height=Xi,Ee.bindRenderbuffer(Nl,Mr.renderbuffer),Ee.renderbufferStorage(Nl,Mr.format,nn,Xi),Hr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height))),Yr}return Yr(ji,si),Yr.resize=xi,Yr._reglType=\"renderbuffer\",Yr._renderbuffer=Mr,Hr.profile&&(Yr.stats=Mr.stats),Yr.destroy=function(){Mr.decRef()},Yr}Hr.profile&&(Ir.getTotalRenderbufferSize=function(){var ji=0;return Object.keys(Ni).forEach(function(si){ji+=Ni[si].stats.size}),ji});function Qi(){dt(Ni).forEach(function(ji){ji.renderbuffer=Ee.createRenderbuffer(),Ee.bindRenderbuffer(Nl,ji.renderbuffer),Ee.renderbufferStorage(Nl,ji.format,ji.width,ji.height)}),Ee.bindRenderbuffer(Nl,null)}return{create:Hn,clear:function(){dt(Ni).forEach(Mi)},restore:Qi}},ks=36160,bc=36161,hu=3553,_u=34069,al=36064,nh=36096,bh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,_f=5126,Lf=6407,Ou=6408,xf=[];xf[Ou]=4,xf[Lf]=3;var jl=[];jl[bd]=1,jl[_f]=4,jl[wc]=2;function lf(Ee,xt,zt,Ir,Hr,Br){var Vr={cur:null,next:null,dirty:!1,setFBO:null},mi=[\"rgba\"],Ni=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];xt.ext_srgb&&Ni.push(\"srgba\"),xt.ext_color_buffer_half_float&&Ni.push(\"rgba16f\",\"rgb16f\"),xt.webgl_color_buffer_float&&Ni.push(\"rgba32f\");var Oi=[\"uint8\"];xt.oes_texture_half_float&&Oi.push(\"half float\",\"float16\"),xt.oes_texture_float&&Oi.push(\"float\",\"float32\");function Mi(Ui,Bi,vn){this.target=Ui,this.texture=Bi,this.renderbuffer=vn;var Un=0,na=0;Bi?(Un=Bi.width,na=Bi.height):vn&&(Un=vn.width,na=vn.height),this.width=Un,this.height=na}function Hn(Ui){Ui&&(Ui.texture&&Ui.texture._texture.decRef(),Ui.renderbuffer&&Ui.renderbuffer._renderbuffer.decRef())}function Qi(Ui,Bi,vn){if(Ui)if(Ui.texture){var Un=Ui.texture._texture,na=Math.max(1,Un.width),Yi=Math.max(1,Un.height);Un.refCount+=1}else{var Ln=Ui.renderbuffer._renderbuffer;Ln.refCount+=1}}function ji(Ui,Bi){Bi&&(Bi.texture?Ee.framebufferTexture2D(ks,Ui,Bi.target,Bi.texture._texture.texture,0):Ee.framebufferRenderbuffer(ks,Ui,bc,Bi.renderbuffer._renderbuffer.renderbuffer))}function si(Ui){var Bi=hu,vn=null,Un=null,na=Ui;typeof Ui==\"object\"&&(na=Ui.data,\"target\"in Ui&&(Bi=Ui.target|0));var Yi=na._reglType;return Yi===\"texture2d\"||Yi===\"textureCube\"?vn=na:Yi===\"renderbuffer\"&&(Un=na,Bi=bc),new Mi(Bi,vn,Un)}function Mr(Ui,Bi,vn,Un,na){if(vn){var Yi=Ir.create2D({width:Ui,height:Bi,format:Un,type:na});return Yi._texture.refCount=0,new Mi(hu,Yi,null)}else{var Ln=Hr.create({width:Ui,height:Bi,format:Un});return Ln._renderbuffer.refCount=0,new Mi(bc,null,Ln)}}function Yr(Ui){return Ui&&(Ui.texture||Ui.renderbuffer)}function xi(Ui,Bi,vn){Ui&&(Ui.texture?Ui.texture.resize(Bi,vn):Ui.renderbuffer&&Ui.renderbuffer.resize(Bi,vn),Ui.width=Bi,Ui.height=vn)}var Ii=0,ci={};function nn(){this.id=Ii++,ci[this.id]=this,this.framebuffer=Ee.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Xi(Ui){Ui.colorAttachments.forEach(Hn),Hn(Ui.depthAttachment),Hn(Ui.stencilAttachment),Hn(Ui.depthStencilAttachment)}function qn(Ui){var Bi=Ui.framebuffer;Ee.deleteFramebuffer(Bi),Ui.framebuffer=null,Br.framebufferCount--,delete ci[Ui.id]}function vi(Ui){var Bi;Ee.bindFramebuffer(ks,Ui.framebuffer);var vn=Ui.colorAttachments;for(Bi=0;Bi<vn.length;++Bi)ji(al+Bi,vn[Bi]);for(Bi=vn.length;Bi<zt.maxColorAttachments;++Bi)Ee.framebufferTexture2D(ks,al+Bi,hu,null,0);Ee.framebufferTexture2D(ks,zu,hu,null,0),Ee.framebufferTexture2D(ks,nh,hu,null,0),Ee.framebufferTexture2D(ks,bh,hu,null,0),ji(nh,Ui.depthAttachment),ji(bh,Ui.stencilAttachment),ji(zu,Ui.depthStencilAttachment);var Un=Ee.checkFramebufferStatus(ks);Ee.isContextLost(),Ee.bindFramebuffer(ks,Vr.next?Vr.next.framebuffer:null),Vr.cur=Vr.next,Ee.getError()}function li(Ui,Bi){var vn=new nn;Br.framebufferCount++;function Un(Yi,Ln){var ra,oa=0,wa=0,ns=!0,Ys=!0,Va=null,El=!0,zo=\"rgba\",el=\"uint8\",ol=1,Vl=null,ls=null,Gs=null,Ks=!1;if(typeof Yi==\"number\")oa=Yi|0,wa=Ln|0||oa;else if(!Yi)oa=wa=1;else{var Ta=Yi;if(\"shape\"in Ta){var sl=Ta.shape;oa=sl[0],wa=sl[1]}else\"radius\"in Ta&&(oa=wa=Ta.radius),\"width\"in Ta&&(oa=Ta.width),\"height\"in Ta&&(wa=Ta.height);(\"color\"in Ta||\"colors\"in Ta)&&(Va=Ta.color||Ta.colors,Array.isArray(Va)),Va||(\"colorCount\"in Ta&&(ol=Ta.colorCount|0),\"colorTexture\"in Ta&&(El=!!Ta.colorTexture,zo=\"rgba4\"),\"colorType\"in Ta&&(el=Ta.colorType,El||(el===\"half float\"||el===\"float16\"?zo=\"rgba16f\":(el===\"float\"||el===\"float32\")&&(zo=\"rgba32f\"))),\"colorFormat\"in Ta&&(zo=Ta.colorFormat,mi.indexOf(zo)>=0?El=!0:Ni.indexOf(zo)>=0&&(El=!1))),(\"depthTexture\"in Ta||\"depthStencilTexture\"in Ta)&&(Ks=!!(Ta.depthTexture||Ta.depthStencilTexture)),\"depth\"in Ta&&(typeof Ta.depth==\"boolean\"?ns=Ta.depth:(Vl=Ta.depth,Ys=!1)),\"stencil\"in Ta&&(typeof Ta.stencil==\"boolean\"?Ys=Ta.stencil:(ls=Ta.stencil,ns=!1)),\"depthStencil\"in Ta&&(typeof Ta.depthStencil==\"boolean\"?ns=Ys=Ta.depthStencil:(Gs=Ta.depthStencil,ns=!1,Ys=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(ol),ra=0;ra<ol;++ra)io[ra]=Mr(oa,wa,El,zo,el);oa=oa||io[0].width,wa=wa||io[0].height,Vl?Y=si(Vl):ns&&!Ys&&(Y=Mr(oa,wa,Ks,\"depth\",\"uint32\")),ls?D=si(ls):Ys&&!ns&&(D=Mr(oa,wa,!1,\"stencil\",\"uint8\")),Gs?J=si(Gs):!Vl&&!ls&&Ys&&ns&&(J=Mr(oa,wa,Ks,\"depth stencil\",\"depth stencil\"));var q=null;for(ra=0;ra<io.length;++ra)if(Qi(io[ra],oa,wa),io[ra]&&io[ra].texture){var K=xf[io[ra].texture._texture.format]*jl[io[ra].texture._texture.type];q===null&&(q=K)}return Qi(Y,oa,wa),Qi(D,oa,wa),Qi(J,oa,wa),Xi(vn),vn.width=oa,vn.height=wa,vn.colorAttachments=io,vn.depthAttachment=Y,vn.stencilAttachment=D,vn.depthStencilAttachment=J,Un.color=io.map(Yr),Un.depth=Yr(Y),Un.stencil=Yr(D),Un.depthStencil=Yr(J),Un.width=vn.width,Un.height=vn.height,vi(vn),Un}function na(Yi,Ln){var ra=Math.max(Yi|0,1),oa=Math.max(Ln|0||ra,1);if(ra===vn.width&&oa===vn.height)return Un;for(var wa=vn.colorAttachments,ns=0;ns<wa.length;++ns)xi(wa[ns],ra,oa);return xi(vn.depthAttachment,ra,oa),xi(vn.stencilAttachment,ra,oa),xi(vn.depthStencilAttachment,ra,oa),vn.width=Un.width=ra,vn.height=Un.height=oa,vi(vn),Un}return Un(Ui,Bi),e(Un,{resize:na,_reglType:\"framebuffer\",_framebuffer:vn,destroy:function(){qn(vn),Xi(vn)},use:function(Yi){Vr.setFBO({framebuffer:Un},Yi)}})}function mn(Ui){var Bi=Array(6);function vn(na){var Yi,Ln={color:null},ra=0,oa=null,wa=\"rgba\",ns=\"uint8\",Ys=1;if(typeof na==\"number\")ra=na|0;else if(!na)ra=1;else{var Va=na;if(\"shape\"in Va){var El=Va.shape;ra=El[0]}else\"radius\"in Va&&(ra=Va.radius|0),\"width\"in Va?(ra=Va.width|0,\"height\"in Va):\"height\"in Va&&(ra=Va.height|0);(\"color\"in Va||\"colors\"in Va)&&(oa=Va.color||Va.colors,Array.isArray(oa)),oa||(\"colorCount\"in Va&&(Ys=Va.colorCount|0),\"colorType\"in Va&&(ns=Va.colorType),\"colorFormat\"in Va&&(wa=Va.colorFormat)),\"depth\"in Va&&(Ln.depth=Va.depth),\"stencil\"in Va&&(Ln.stencil=Va.stencil),\"depthStencil\"in Va&&(Ln.depthStencil=Va.depthStencil)}var zo;if(oa)if(Array.isArray(oa))for(zo=[],Yi=0;Yi<oa.length;++Yi)zo[Yi]=oa[Yi];else zo=[oa];else{zo=Array(Ys);var el={radius:ra,format:wa,type:ns};for(Yi=0;Yi<Ys;++Yi)zo[Yi]=Ir.createCube(el)}for(Ln.color=Array(zo.length),Yi=0;Yi<zo.length;++Yi){var ol=zo[Yi];ra=ra||ol.width,Ln.color[Yi]={target:_u,data:zo[Yi]}}for(Yi=0;Yi<6;++Yi){for(var Vl=0;Vl<zo.length;++Vl)Ln.color[Vl].target=_u+Yi;Yi>0&&(Ln.depth=Bi[0].depth,Ln.stencil=Bi[0].stencil,Ln.depthStencil=Bi[0].depthStencil),Bi[Yi]?Bi[Yi](Ln):Bi[Yi]=li(Ln)}return e(vn,{width:ra,height:ra,color:zo})}function Un(na){var Yi,Ln=na|0;if(Ln===vn.width)return vn;var ra=vn.color;for(Yi=0;Yi<ra.length;++Yi)ra[Yi].resize(Ln);for(Yi=0;Yi<6;++Yi)Bi[Yi].resize(Ln);return vn.width=vn.height=Ln,vn}return vn(Ui),e(vn,{faces:Bi,resize:Un,_reglType:\"framebufferCube\",destroy:function(){Bi.forEach(function(na){na.destroy()})}})}function Ki(){Vr.cur=null,Vr.next=null,Vr.dirty=!0,dt(ci).forEach(function(Ui){Ui.framebuffer=Ee.createFramebuffer(),vi(Ui)})}return e(Vr,{getFramebuffer:function(Ui){if(typeof Ui==\"function\"&&Ui._reglType===\"framebuffer\"){var Bi=Ui._framebuffer;if(Bi instanceof nn)return Bi}return null},create:li,createCube:mn,clear:function(){dt(ci).forEach(qn)},restore:Ki})}var Vh=5126,Pf=34962,Ls=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Vh,this.offset=0,this.stride=0,this.divisor=0}function Cu(Ee,xt,zt,Ir,Hr,Br,Vr){for(var mi=zt.maxAttributes,Ni=new Array(mi),Oi=0;Oi<mi;++Oi)Ni[Oi]=new du;var Mi=0,Hn={},Qi={Record:du,scope:{},state:Ni,currentVAO:null,targetVAO:null,restore:si()?Xi:function(){},createVAO:qn,getVAO:Yr,destroyBuffer:ji,setVAO:si()?xi:Ii,clear:si()?ci:function(){}};function ji(vi){for(var li=0;li<Ni.length;++li){var mn=Ni[li];mn.buffer===vi&&(Ee.disableVertexAttribArray(li),mn.buffer=null)}}function si(){return xt.oes_vertex_array_object}function Mr(){return xt.angle_instanced_arrays}function Yr(vi){return typeof vi==\"function\"&&vi._vao?vi._vao:null}function xi(vi){if(vi!==Qi.currentVAO){var li=si();vi?li.bindVertexArrayOES(vi.vao):li.bindVertexArrayOES(null),Qi.currentVAO=vi}}function Ii(vi){if(vi!==Qi.currentVAO){if(vi)vi.bindAttrs();else{for(var li=Mr(),mn=0;mn<Ni.length;++mn){var Ki=Ni[mn];Ki.buffer?(Ee.enableVertexAttribArray(mn),Ki.buffer.bind(),Ee.vertexAttribPointer(mn,Ki.size,Ki.type,Ki.normalized,Ki.stride,Ki.offfset),li&&Ki.divisor&&li.vertexAttribDivisorANGLE(mn,Ki.divisor)):(Ee.disableVertexAttribArray(mn),Ee.vertexAttrib4f(mn,Ki.x,Ki.y,Ki.z,Ki.w))}Vr.elements?Ee.bindBuffer(Ls,Vr.elements.buffer.buffer):Ee.bindBuffer(Ls,null)}Qi.currentVAO=vi}}function ci(){dt(Hn).forEach(function(vi){vi.destroy()})}function nn(){this.id=++Mi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var vi=si();vi?this.vao=vi.createVertexArrayOES():this.vao=null,Hn[this.id]=this,this.buffers=[]}nn.prototype.bindAttrs=function(){for(var vi=Mr(),li=this.attributes,mn=0;mn<li.length;++mn){var Ki=li[mn];Ki.buffer?(Ee.enableVertexAttribArray(mn),Ee.bindBuffer(Pf,Ki.buffer.buffer),Ee.vertexAttribPointer(mn,Ki.size,Ki.type,Ki.normalized,Ki.stride,Ki.offset),vi&&Ki.divisor&&vi.vertexAttribDivisorANGLE(mn,Ki.divisor)):(Ee.disableVertexAttribArray(mn),Ee.vertexAttrib4f(mn,Ki.x,Ki.y,Ki.z,Ki.w))}for(var Ui=li.length;Ui<mi;++Ui)Ee.disableVertexAttribArray(Ui);var Bi=Br.getElements(this.elements);Bi?Ee.bindBuffer(Ls,Bi.buffer.buffer):Ee.bindBuffer(Ls,null)},nn.prototype.refresh=function(){var vi=si();vi&&(vi.bindVertexArrayOES(this.vao),this.bindAttrs(),Qi.currentVAO=null,vi.bindVertexArrayOES(null))},nn.prototype.destroy=function(){if(this.vao){var vi=si();this===Qi.currentVAO&&(Qi.currentVAO=null,vi.bindVertexArrayOES(null)),vi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Hn[this.id]&&(delete Hn[this.id],Ir.vaoCount-=1)};function Xi(){var vi=si();vi&&dt(Hn).forEach(function(li){li.refresh()})}function qn(vi){var li=new nn;Ir.vaoCount+=1;function mn(Ki){var Ui;if(Array.isArray(Ki))Ui=Ki,li.elements&&li.ownsElements&&li.elements.destroy(),li.elements=null,li.ownsElements=!1,li.offset=0,li.count=0,li.instances=-1,li.primitive=4;else{if(Ki.elements){var Bi=Ki.elements;li.ownsElements?typeof Bi==\"function\"&&Bi._reglType===\"elements\"?(li.elements.destroy(),li.ownsElements=!1):(li.elements(Bi),li.ownsElements=!1):Br.getElements(Ki.elements)?(li.elements=Ki.elements,li.ownsElements=!1):(li.elements=Br.create(Ki.elements),li.ownsElements=!0)}else li.elements=null,li.ownsElements=!1;Ui=Ki.attributes,li.offset=0,li.count=-1,li.instances=-1,li.primitive=4,li.elements&&(li.count=li.elements._elements.vertCount,li.primitive=li.elements._elements.primType),\"offset\"in Ki&&(li.offset=Ki.offset|0),\"count\"in Ki&&(li.count=Ki.count|0),\"instances\"in Ki&&(li.instances=Ki.instances|0),\"primitive\"in Ki&&(li.primitive=Mn[Ki.primitive])}var vn={},Un=li.attributes;Un.length=Ui.length;for(var na=0;na<Ui.length;++na){var Yi=Ui[na],Ln=Un[na]=new du,ra=Yi.data||Yi;if(Array.isArray(ra)||Wr(ra)||Ur(ra)){var oa;li.buffers[na]&&(oa=li.buffers[na],Wr(ra)&&oa._buffer.byteLength>=ra.byteLength?oa.subdata(ra):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=Hr.create(Yi,Pf,!1,!0)),Ln.buffer=Hr.getBuffer(oa),Ln.size=Ln.buffer.dimension|0,Ln.normalized=!1,Ln.type=Ln.buffer.dtype,Ln.offset=0,Ln.stride=0,Ln.divisor=0,Ln.state=1,vn[na]=1}else Hr.getBuffer(Yi)?(Ln.buffer=Hr.getBuffer(Yi),Ln.size=Ln.buffer.dimension|0,Ln.normalized=!1,Ln.type=Ln.buffer.dtype,Ln.offset=0,Ln.stride=0,Ln.divisor=0,Ln.state=1):Hr.getBuffer(Yi.buffer)?(Ln.buffer=Hr.getBuffer(Yi.buffer),Ln.size=(+Yi.size||Ln.buffer.dimension)|0,Ln.normalized=!!Yi.normalized||!1,\"type\"in Yi?Ln.type=Hi[Yi.type]:Ln.type=Ln.buffer.dtype,Ln.offset=(Yi.offset||0)|0,Ln.stride=(Yi.stride||0)|0,Ln.divisor=(Yi.divisor||0)|0,Ln.state=1):\"x\"in Yi&&(Ln.x=+Yi.x||0,Ln.y=+Yi.y||0,Ln.z=+Yi.z||0,Ln.w=+Yi.w||0,Ln.state=2)}for(var wa=0;wa<li.buffers.length;++wa)!vn[wa]&&li.buffers[wa]&&(li.buffers[wa].destroy(),li.buffers[wa]=null);return li.refresh(),mn}return mn.destroy=function(){for(var Ki=0;Ki<li.buffers.length;++Ki)li.buffers[Ki]&&li.buffers[Ki].destroy();li.buffers.length=0,li.ownsElements&&(li.elements.destroy(),li.elements=null,li.ownsElements=!1),li.destroy()},mn._vao=li,mn._reglType=\"vao\",mn(vi)}return Qi}var Wf=35632,Vs=35633,bf=35718,zc=35721;function Wu(Ee,xt,zt,Ir){var Hr={},Br={};function Vr(Mr,Yr,xi,Ii){this.name=Mr,this.id=Yr,this.location=xi,this.info=Ii}function mi(Mr,Yr){for(var xi=0;xi<Mr.length;++xi)if(Mr[xi].id===Yr.id){Mr[xi].location=Yr.location;return}Mr.push(Yr)}function Ni(Mr,Yr,xi){var Ii=Mr===Wf?Hr:Br,ci=Ii[Yr];if(!ci){var nn=xt.str(Yr);ci=Ee.createShader(Mr),Ee.shaderSource(ci,nn),Ee.compileShader(ci),Ii[Yr]=ci}return ci}var Oi={},Mi=[],Hn=0;function Qi(Mr,Yr){this.id=Hn++,this.fragId=Mr,this.vertId=Yr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Ir.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ji(Mr,Yr,xi){var Ii,ci,nn=Ni(Wf,Mr.fragId),Xi=Ni(Vs,Mr.vertId),qn=Mr.program=Ee.createProgram();if(Ee.attachShader(qn,nn),Ee.attachShader(qn,Xi),xi)for(Ii=0;Ii<xi.length;++Ii){var vi=xi[Ii];Ee.bindAttribLocation(qn,vi[0],vi[1])}Ee.linkProgram(qn);var li=Ee.getProgramParameter(qn,bf);Ir.profile&&(Mr.stats.uniformsCount=li);var mn=Mr.uniforms;for(Ii=0;Ii<li;++Ii)if(ci=Ee.getActiveUniform(qn,Ii),ci)if(ci.size>1)for(var Ki=0;Ki<ci.size;++Ki){var Ui=ci.name.replace(\"[0]\",\"[\"+Ki+\"]\");mi(mn,new Vr(Ui,xt.id(Ui),Ee.getUniformLocation(qn,Ui),ci))}else mi(mn,new Vr(ci.name,xt.id(ci.name),Ee.getUniformLocation(qn,ci.name),ci));var Bi=Ee.getProgramParameter(qn,zc);Ir.profile&&(Mr.stats.attributesCount=Bi);var vn=Mr.attributes;for(Ii=0;Ii<Bi;++Ii)ci=Ee.getActiveAttrib(qn,Ii),ci&&mi(vn,new Vr(ci.name,xt.id(ci.name),Ee.getAttribLocation(qn,ci.name),ci))}Ir.profile&&(zt.getMaxUniformsCount=function(){var Mr=0;return Mi.forEach(function(Yr){Yr.stats.uniformsCount>Mr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Mi.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){Hr={},Br={};for(var Mr=0;Mr<Mi.length;++Mr)ji(Mi[Mr],null,Mi[Mr].attributes.map(function(Yr){return[Yr.location,Yr.name]}))}return{clear:function(){var Mr=Ee.deleteShader.bind(Ee);dt(Hr).forEach(Mr),Hr={},dt(Br).forEach(Mr),Br={},Mi.forEach(function(Yr){Ee.deleteProgram(Yr.program)}),Mi.length=0,Oi={},zt.shaderCount=0},program:function(Mr,Yr,xi,Ii){var ci=Oi[Yr];ci||(ci=Oi[Yr]={});var nn=ci[Mr];if(nn&&(nn.refCount++,!Ii))return nn;var Xi=new Qi(Yr,Mr);return zt.shaderCount++,ji(Xi,xi,Ii),nn||(ci[Mr]=Xi),Mi.push(Xi),e(Xi,{destroy:function(){if(Xi.refCount--,Xi.refCount<=0){Ee.deleteProgram(Xi.program);var qn=Mi.indexOf(Xi);Mi.splice(qn,1),zt.shaderCount--}ci[Xi.vertId].refCount<=0&&(Ee.deleteShader(Br[Xi.vertId]),delete Br[Xi.vertId],delete Oi[Xi.fragId][Xi.vertId]),Object.keys(Oi[Xi.fragId]).length||(Ee.deleteShader(Hr[Xi.fragId]),delete Hr[Xi.fragId],delete Oi[Xi.fragId])}})},restore:si,shader:Ni,frag:-1,vert:-1}}var If=6408,Xu=5121,uf=3333,Xf=5126;function Wl(Ee,xt,zt,Ir,Hr,Br,Vr){function mi(Mi){var Hn;xt.next===null?Hn=Xu:Hn=xt.next.colorAttachments[0].texture._texture.type;var Qi=0,ji=0,si=Ir.framebufferWidth,Mr=Ir.framebufferHeight,Yr=null;Wr(Mi)?Yr=Mi:Mi&&(Qi=Mi.x|0,ji=Mi.y|0,si=(Mi.width||Ir.framebufferWidth-Qi)|0,Mr=(Mi.height||Ir.framebufferHeight-ji)|0,Yr=Mi.data||null),zt();var xi=si*Mr*4;return Yr||(Hn===Xu?Yr=new Uint8Array(xi):Hn===Xf&&(Yr=Yr||new Float32Array(xi))),Ee.pixelStorei(uf,4),Ee.readPixels(Qi,ji,si,Mr,If,Hn,Yr),Yr}function Ni(Mi){var Hn;return xt.setFBO({framebuffer:Mi.framebuffer},function(){Hn=mi(Mi)}),Hn}function Oi(Mi){return!Mi||!(\"framebuffer\"in Mi)?mi(Mi):Ni(Mi)}return Oi}var ah=0,Zu=\"\";function Oc(Ee){return vu(Tc(fc(Ee)))}function Tc(Ee){return At(Zi(Bc(Ee),Ee.length*8))}function Tl(Ee,xt){var zt=Bc(Ee);zt.length>16&&(zt=Zi(zt,Ee.length*8));for(var Ir=Array(16),Hr=Array(16),Br=0;Br<16;Br++)Ir[Br]=zt[Br]^909522486,Hr[Br]=zt[Br]^1549556828;var Vr=Zi(Ir.concat(Bc(xt)),512+xt.length*8);return At(Zi(Hr.concat(Vr),768))}function vu(Ee){for(var xt=ah?\"0123456789ABCDEF\":\"0123456789abcdef\",zt=\"\",Ir,Hr=0;Hr<Ee.length;Hr++)Ir=Ee.charCodeAt(Hr),zt+=xt.charAt(Ir>>>4&15)+xt.charAt(Ir&15);return zt}function qc(Ee){for(var xt=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",zt=\"\",Ir=Ee.length,Hr=0;Hr<Ir;Hr+=3)for(var Br=Ee.charCodeAt(Hr)<<16|(Hr+1<Ir?Ee.charCodeAt(Hr+1)<<8:0)|(Hr+2<Ir?Ee.charCodeAt(Hr+2):0),Vr=0;Vr<4;Vr++)Hr*8+Vr*6>Ee.length*8?zt+=Zu:zt+=xt.charAt(Br>>>6*(3-Vr)&63);return zt}function cf(Ee,xt){var zt=xt.length,Ir=Array(),Hr,Br,Vr,mi,Ni=Array(Math.ceil(Ee.length/2));for(Hr=0;Hr<Ni.length;Hr++)Ni[Hr]=Ee.charCodeAt(Hr*2)<<8|Ee.charCodeAt(Hr*2+1);for(;Ni.length>0;){for(mi=Array(),Vr=0,Hr=0;Hr<Ni.length;Hr++)Vr=(Vr<<16)+Ni[Hr],Br=Math.floor(Vr/zt),Vr-=Br*zt,(mi.length>0||Br>0)&&(mi[mi.length]=Br);Ir[Ir.length]=Vr,Ni=mi}var Oi=\"\";for(Hr=Ir.length-1;Hr>=0;Hr--)Oi+=xt.charAt(Ir[Hr]);var Mi=Math.ceil(Ee.length*8/(Math.log(xt.length)/Math.log(2)));for(Hr=Oi.length;Hr<Mi;Hr++)Oi=xt[0]+Oi;return Oi}function fc(Ee){for(var xt=\"\",zt=-1,Ir,Hr;++zt<Ee.length;)Ir=Ee.charCodeAt(zt),Hr=zt+1<Ee.length?Ee.charCodeAt(zt+1):0,55296<=Ir&&Ir<=56319&&56320<=Hr&&Hr<=57343&&(Ir=65536+((Ir&1023)<<10)+(Hr&1023),zt++),Ir<=127?xt+=String.fromCharCode(Ir):Ir<=2047?xt+=String.fromCharCode(192|Ir>>>6&31,128|Ir&63):Ir<=65535?xt+=String.fromCharCode(224|Ir>>>12&15,128|Ir>>>6&63,128|Ir&63):Ir<=2097151&&(xt+=String.fromCharCode(240|Ir>>>18&7,128|Ir>>>12&63,128|Ir>>>6&63,128|Ir&63));return xt}function Bc(Ee){for(var xt=Array(Ee.length>>2),zt=0;zt<xt.length;zt++)xt[zt]=0;for(var zt=0;zt<Ee.length*8;zt+=8)xt[zt>>5]|=(Ee.charCodeAt(zt/8)&255)<<24-zt%32;return xt}function At(Ee){for(var xt=\"\",zt=0;zt<Ee.length*32;zt+=8)xt+=String.fromCharCode(Ee[zt>>5]>>>24-zt%32&255);return xt}function Xt(Ee,xt){return Ee>>>xt|Ee<<32-xt}function kr(Ee,xt){return Ee>>>xt}function Ar(Ee,xt,zt){return Ee&xt^~Ee&zt}function Kr(Ee,xt,zt){return Ee&xt^Ee&zt^xt&zt}function Ei(Ee){return Xt(Ee,2)^Xt(Ee,13)^Xt(Ee,22)}function Wi(Ee){return Xt(Ee,6)^Xt(Ee,11)^Xt(Ee,25)}function hn(Ee){return Xt(Ee,7)^Xt(Ee,18)^kr(Ee,3)}function Tn(Ee){return Xt(Ee,17)^Xt(Ee,19)^kr(Ee,10)}var Bn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Zi(Ee,xt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Ir=new Array(64),Hr,Br,Vr,mi,Ni,Oi,Mi,Hn,Qi,ji,si,Mr;for(Ee[xt>>5]|=128<<24-xt%32,Ee[(xt+64>>9<<4)+15]=xt,Qi=0;Qi<Ee.length;Qi+=16){for(Hr=zt[0],Br=zt[1],Vr=zt[2],mi=zt[3],Ni=zt[4],Oi=zt[5],Mi=zt[6],Hn=zt[7],ji=0;ji<64;ji++)ji<16?Ir[ji]=Ee[ji+Qi]:Ir[ji]=$i($i($i(Tn(Ir[ji-2]),Ir[ji-7]),hn(Ir[ji-15])),Ir[ji-16]),si=$i($i($i($i(Hn,Wi(Ni)),Ar(Ni,Oi,Mi)),Bn[ji]),Ir[ji]),Mr=$i(Ei(Hr),Kr(Hr,Br,Vr)),Hn=Mi,Mi=Oi,Oi=Ni,Ni=$i(mi,si),mi=Vr,Vr=Br,Br=Hr,Hr=$i(si,Mr);zt[0]=$i(Hr,zt[0]),zt[1]=$i(Br,zt[1]),zt[2]=$i(Vr,zt[2]),zt[3]=$i(mi,zt[3]),zt[4]=$i(Ni,zt[4]),zt[5]=$i(Oi,zt[5]),zt[6]=$i(Mi,zt[6]),zt[7]=$i(Hn,zt[7])}return zt}function $i(Ee,xt){var zt=(Ee&65535)+(xt&65535),Ir=(Ee>>16)+(xt>>16)+(zt>>16);return Ir<<16|zt&65535}function an(Ee){return Array.prototype.slice.call(Ee)}function Di(Ee){return an(Ee).join(\"\")}function $n(Ee){var xt=Ee&&Ee.cache,zt=0,Ir=[],Hr=[],Br=[];function Vr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi<Hr.length;++xi)if(Hr[xi]===si&&!Br[xi])return Ir[xi]}var Ii=\"g\"+zt++;return Ir.push(Ii),Hr.push(si),Br.push(Yr),Ii}function mi(){var si=[];function Mr(){si.push.apply(si,an(arguments))}var Yr=[];function xi(){var Ii=\"v\"+zt++;return Yr.push(Ii),arguments.length>0&&(si.push(Ii,\"=\"),si.push.apply(si,an(arguments)),si.push(\";\")),Ii}return e(Mr,{def:xi,toString:function(){return Di([Yr.length>0?\"var \"+Yr.join(\",\")+\";\":\"\",Di(si)])}})}function Ni(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ii(ci,nn){Mr(ci,nn,\"=\",si.def(ci,nn),\";\")}return e(function(){si.apply(si,an(arguments))},{def:si.def,entry:si,exit:Mr,save:Ii,set:function(ci,nn,Xi){Ii(ci,nn),si(ci,nn,\"=\",Xi,\";\")},toString:function(){return Yr()+xi()}})}function Oi(){var si=Di(arguments),Mr=Ni(),Yr=Ni(),xi=Mr.toString,Ii=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,an(arguments)),this},else:function(){return Yr.apply(Yr,an(arguments)),this},toString:function(){var ci=Ii();return ci&&(ci=\"else{\"+ci+\"}\"),Di([\"if(\",si,\"){\",xi(),\"}\",ci])}})}var Mi=mi(),Hn={};function Qi(si,Mr){var Yr=[];function xi(){var qn=\"a\"+Yr.length;return Yr.push(qn),qn}Mr=Mr||0;for(var Ii=0;Ii<Mr;++Ii)xi();var ci=Ni(),nn=ci.toString,Xi=Hn[si]=e(ci,{arg:xi,toString:function(){return Di([\"function(\",Yr.join(),\"){\",nn(),\"}\"])}});return Xi}function ji(){var si=['\"use strict\";',Mi,\"return {\"];Object.keys(Hn).forEach(function(Ii){si.push('\"',Ii,'\":',Hn[Ii].toString(),\",\")}),si.push(\"}\");var Mr=Di(si).replace(/;/g,`;\n",
       "`).replace(/}/g,`}\n",
       "`).replace(/{/g,`{\n",
       "`),Yr;if(xt&&(Yr=Oc(Mr),xt[Yr]))return xt[Yr].apply(null,Hr);var xi=Function.apply(null,Ir.concat(Mr));return xt&&(xt[Yr]=xi),xi.apply(null,Hr)}return{global:Mi,link:Vr,block:mi,proc:Qi,scope:Ni,cond:Oi,compile:ji}}var ka=\"xyzw\".split(\"\"),Ra=5121,La=1,Na=2,Yn=0,zn=1,Ka=2,bo=3,Xo=4,Ms=5,os=6,Ts=\"dither\",Ho=\"blend.enable\",yl=\"blend.color\",Xs=\"blend.equation\",Ps=\"blend.func\",va=\"depth.enable\",no=\"depth.func\",_s=\"depth.range\",is=\"depth.mask\",$l=\"colorMask\",ku=\"cull.enable\",Yu=\"cull.face\",Nc=\"frontFace\",pu=\"lineWidth\",Uc=\"polygonOffset.enable\",xu=\"polygonOffset.offset\",Ac=\"sample.alpha\",Ua=\"sample.enable\",oo=\"sample.coverage\",Vc=\"stencil.enable\",hc=\"stencil.mask\",Ku=\"stencil.func\",ue=\"stencil.opFront\",w=\"stencil.opBack\",B=\"scissor.enable\",Q=\"scissor.box\",ee=\"viewport\",le=\"profile\",qe=\"framebuffer\",Xe=\"vert\",ot=\"frag\",Tt=\"elements\",Kt=\"primitive\",Jt=\"count\",xr=\"offset\",Pr=\"instances\",ve=\"vao\",be=\"Width\",Re=\"Height\",Be=qe+be,tt=qe+Re,We=ee+be,it=ee+Re,Dt=\"drawingBuffer\",Ht=Dt+be,rr=Dt+Re,dr=[Ps,Xs,Ku,ue,w,oo,ee,Q,xu],Sr=34962,Or=34963,jr=2884,ii=3042,Li=3024,un=2960,sn=2929,In=3089,Kn=32823,Aa=32926,fa=32928,$a=5126,ko=35664,Qa=35665,mo=35666,Bo=5124,Is=35667,As=35668,wo=35669,To=35670,dl=35671,Ul=35672,Lu=35673,au=35674,$s=35675,Ql=35676,dc=35678,Al=35680,Sl=4,X=1028,se=1029,Te=2304,Ne=2305,He=32775,Ye=32776,Ct=519,nt=7680,jt=0,gr=1,yr=32774,Gr=513,qr=36160,_i=36064,bi={0:0,1:1,zero:0,one:1,\"src color\":768,\"one minus src color\":769,\"src alpha\":770,\"one minus src alpha\":771,\"dst color\":774,\"one minus dst color\":775,\"dst alpha\":772,\"one minus dst alpha\":773,\"constant color\":32769,\"one minus constant color\":32770,\"constant alpha\":32771,\"one minus constant alpha\":32772,\"src alpha saturate\":776},Xr={never:512,less:513,\"<\":513,equal:514,\"=\":514,\"==\":514,\"===\":514,lequal:515,\"<=\":515,greater:516,\">\":516,notequal:517,\"!=\":517,\"!==\":517,gequal:518,\">=\":518,always:519},ni={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},gi={cw:Te,ccw:Ne};function Pi(Ee){return Array.isArray(Ee)||Wr(Ee)||Ur(Ee)}function Ai(Ee){return Ee.sort(function(xt,zt){return xt===ee?-1:zt===ee?1:xt<zt?-1:1})}function ti(Ee,xt,zt,Ir){this.thisDep=Ee,this.contextDep=xt,this.propDep=zt,this.append=Ir}function Rn(Ee){return Ee&&!(Ee.thisDep||Ee.contextDep||Ee.propDep)}function Cn(Ee){return new ti(!1,!1,!1,Ee)}function Nn(Ee,xt){var zt=Ee.type;if(zt===Yn){var Ir=Ee.data.length;return new ti(!0,Ir>=1,Ir>=2,xt)}else if(zt===Xo){var Hr=Ee.data;return new ti(Hr.thisDep,Hr.contextDep,Hr.propDep,xt)}else{if(zt===Ms)return new ti(!1,!1,!1,xt);if(zt===os){for(var Br=!1,Vr=!1,mi=!1,Ni=0;Ni<Ee.data.length;++Ni){var Oi=Ee.data[Ni];if(Oi.type===zn)mi=!0;else if(Oi.type===Ka)Vr=!0;else if(Oi.type===bo)Br=!0;else if(Oi.type===Yn){Br=!0;var Mi=Oi.data;Mi>=1&&(Vr=!0),Mi>=2&&(mi=!0)}else Oi.type===Xo&&(Br=Br||Oi.data.thisDep,Vr=Vr||Oi.data.contextDep,mi=mi||Oi.data.propDep)}return new ti(Br,Vr,mi,xt)}else return new ti(zt===bo,zt===Ka,zt===zn,xt)}}var ia=new ti(!1,!1,!1,function(){});function Ea(Ee,xt,zt,Ir,Hr,Br,Vr,mi,Ni,Oi,Mi,Hn,Qi,ji,si,Mr){var Yr=Oi.Record,xi={add:32774,subtract:32778,\"reverse subtract\":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ii=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,nn=zt.oes_vertex_array_object,Xi={dirty:!0,profile:Mr.profile},qn={},vi=[],li={},mn={};function Ki(Ve){return Ve.replace(\".\",\"_\")}function Ui(Ve,et,at){var kt=Ki(Ve);vi.push(Ve),qn[kt]=Xi[kt]=!!at,li[kt]=et}function Bi(Ve,et,at){var kt=Ki(Ve);vi.push(Ve),Array.isArray(at)?(Xi[kt]=at.slice(),qn[kt]=at.slice()):Xi[kt]=qn[kt]=at,mn[kt]=et}function vn(Ve){return!!isNaN(Ve)}Ui(Ts,Li),Ui(Ho,ii),Bi(yl,\"blendColor\",[0,0,0,0]),Bi(Xs,\"blendEquationSeparate\",[yr,yr]),Bi(Ps,\"blendFuncSeparate\",[gr,jt,gr,jt]),Ui(va,sn,!0),Bi(no,\"depthFunc\",Gr),Bi(_s,\"depthRange\",[0,1]),Bi(is,\"depthMask\",!0),Bi($l,$l,[!0,!0,!0,!0]),Ui(ku,jr),Bi(Yu,\"cullFace\",se),Bi(Nc,Nc,Ne),Bi(pu,pu,1),Ui(Uc,Kn),Bi(xu,\"polygonOffset\",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,\"sampleCoverage\",[1,!1]),Ui(Vc,un),Bi(hc,\"stencilMask\",-1),Bi(Ku,\"stencilFunc\",[Ct,0,-1]),Bi(ue,\"stencilOpSeparate\",[X,nt,nt,nt]),Bi(w,\"stencilOpSeparate\",[se,nt,nt,nt]),Ui(B,In),Bi(Q,\"scissor\",[0,0,Ee.drawingBufferWidth,Ee.drawingBufferHeight]),Bi(ee,ee,[0,0,Ee.drawingBufferWidth,Ee.drawingBufferHeight]);var Un={gl:Ee,context:Qi,strings:xt,next:qn,current:Xi,draw:Hn,elements:Br,buffer:Hr,shader:Mi,attributes:Oi.state,vao:Oi,uniforms:Ni,framebuffer:mi,extensions:zt,timer:ji,isBufferArgs:Pi},na={primTypes:Mn,compareFuncs:Xr,blendFuncs:bi,blendEquations:xi,stencilOps:ni,glTypes:Hi,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Ir.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(et){return _i+et})}));var Yi=0;function Ln(){var Ve=$n({cache:si}),et=Ve.link,at=Ve.global;Ve.id=Yi++,Ve.batchId=\"0\";var kt=et(Un),Ot=Ve.shared={props:\"a0\"};Object.keys(Un).forEach(function(Pt){Ot[Pt]=at.def(kt,\".\",Pt)});var It=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Xi[Pt])&&(It[Pt]=at.def(Ot.next,\".\",Pt),Bt[Pt]=at.def(Ot.current,\".\",Pt))});var Rt=Ve.constants={};Object.keys(na).forEach(function(Pt){Rt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var cr=[\"this\",Ot.context,Ot.props,Ve.batchId];return Pt.def(et(ht.data),\".call(\",cr.slice(0,Math.max(ht.data.length+1,4)),\")\");case zn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def(\"this\",ht.data);case Xo:return ht.data.append(Ve,Pt),ht.data.ref;case Ms:return ht.data.toString();case os:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var mt={};return Ve.scopeAttrib=function(Pt){var ht=xt.id(Pt);if(ht in mt)return mt[ht];var cr=Oi.scope[ht];cr||(cr=Oi.scope[ht]=new Yr);var br=mt[ht]=et(cr);return br},Ve}function ra(Ve){var et=Ve.static,at=Ve.dynamic,kt;if(le in et){var Ot=!!et[le];kt=Cn(function(Bt,Rt){return Ot}),kt.enable=Ot}else if(le in at){var It=at[le];kt=Nn(It,function(Bt,Rt){return Bt.invoke(Rt,It)})}return kt}function oa(Ve,et){var at=Ve.static,kt=Ve.dynamic;if(qe in at){var Ot=at[qe];return Ot?(Ot=mi.getFramebuffer(Ot),Cn(function(Bt,Rt){var mt=Bt.link(Ot),Pt=Bt.shared;Rt.set(Pt.framebuffer,\".next\",mt);var ht=Pt.context;return Rt.set(ht,\".\"+Be,mt+\".width\"),Rt.set(ht,\".\"+tt,mt+\".height\"),mt})):Cn(function(Bt,Rt){var mt=Bt.shared;Rt.set(mt.framebuffer,\".next\",\"null\");var Pt=mt.context;return Rt.set(Pt,\".\"+Be,Pt+\".\"+Ht),Rt.set(Pt,\".\"+tt,Pt+\".\"+rr),\"null\"})}else if(qe in kt){var It=kt[qe];return Nn(It,function(Bt,Rt){var mt=Bt.invoke(Rt,It),Pt=Bt.shared,ht=Pt.framebuffer,cr=Rt.def(ht,\".getFramebuffer(\",mt,\")\");Rt.set(ht,\".next\",cr);var br=Pt.context;return Rt.set(br,\".\"+Be,cr+\"?\"+cr+\".width:\"+br+\".\"+Ht),Rt.set(br,\".\"+tt,cr+\"?\"+cr+\".height:\"+br+\".\"+rr),cr})}else return null}function wa(Ve,et,at){var kt=Ve.static,Ot=Ve.dynamic;function It(mt){if(mt in kt){var Pt=kt[mt],ht=!0,cr=Pt.x|0,br=Pt.y|0,Nr,Ri;return\"width\"in Pt?Nr=Pt.width|0:ht=!1,\"height\"in Pt?Ri=Pt.height|0:ht=!1,new ti(!ht&&et&&et.thisDep,!ht&&et&&et.contextDep,!ht&&et&&et.propDep,function(gn,tn){var Ci=gn.shared.context,qi=Nr;\"width\"in Pt||(qi=tn.def(Ci,\".\",Be,\"-\",cr));var Vi=Ri;return\"height\"in Pt||(Vi=tn.def(Ci,\".\",tt,\"-\",br)),[cr,br,qi,Vi]})}else if(mt in Ot){var hi=Ot[mt],wi=Nn(hi,function(gn,tn){var Ci=gn.invoke(tn,hi),qi=gn.shared.context,Vi=tn.def(Ci,\".x|0\"),on=tn.def(Ci,\".y|0\"),On=tn.def('\"width\" in ',Ci,\"?\",Ci,\".width|0:\",\"(\",qi,\".\",Be,\"-\",Vi,\")\"),Ja=tn.def('\"height\" in ',Ci,\"?\",Ci,\".height|0:\",\"(\",qi,\".\",tt,\"-\",on,\")\");return[Vi,on,On,Ja]});return et&&(wi.thisDep=wi.thisDep||et.thisDep,wi.contextDep=wi.contextDep||et.contextDep,wi.propDep=wi.propDep||et.propDep),wi}else return et?new ti(et.thisDep,et.contextDep,et.propDep,function(gn,tn){var Ci=gn.shared.context;return[0,0,tn.def(Ci,\".\",Be),tn.def(Ci,\".\",tt)]}):null}var Bt=It(ee);if(Bt){var Rt=Bt;Bt=new ti(Bt.thisDep,Bt.contextDep,Bt.propDep,function(mt,Pt){var ht=Rt.append(mt,Pt),cr=mt.shared.context;return Pt.set(cr,\".\"+We,ht[2]),Pt.set(cr,\".\"+it,ht[3]),ht})}return{viewport:Bt,scissor_box:It(Q)}}function ns(Ve,et){var at=Ve.static,kt=typeof at[ot]==\"string\"&&typeof at[Xe]==\"string\";if(kt){if(Object.keys(et.dynamic).length>0)return null;var Ot=et.static,It=Object.keys(Ot);if(It.length>0&&typeof Ot[It[0]]==\"number\"){for(var Bt=[],Rt=0;Rt<It.length;++Rt)Bt.push([Ot[It[Rt]]|0,It[Rt]]);return Bt}}return null}function Ys(Ve,et,at){var kt=Ve.static,Ot=Ve.dynamic;function It(ht){if(ht in kt){var cr=xt.id(kt[ht]),br=Cn(function(){return cr});return br.id=cr,br}else if(ht in Ot){var Nr=Ot[ht];return Nn(Nr,function(Ri,hi){var wi=Ri.invoke(hi,Nr),gn=hi.def(Ri.shared.strings,\".id(\",wi,\")\");return gn})}return null}var Bt=It(ot),Rt=It(Xe),mt=null,Pt;return Rn(Bt)&&Rn(Rt)?(mt=Mi.program(Rt.id,Bt.id,null,at),Pt=Cn(function(ht,cr){return ht.link(mt)})):Pt=new ti(Bt&&Bt.thisDep||Rt&&Rt.thisDep,Bt&&Bt.contextDep||Rt&&Rt.contextDep,Bt&&Bt.propDep||Rt&&Rt.propDep,function(ht,cr){var br=ht.shared.shader,Nr;Bt?Nr=Bt.append(ht,cr):Nr=cr.def(br,\".\",ot);var Ri;Rt?Ri=Rt.append(ht,cr):Ri=cr.def(br,\".\",Xe);var hi=br+\".program(\"+Ri+\",\"+Nr;return cr.def(hi+\")\")}),{frag:Bt,vert:Rt,progVar:Pt,program:mt}}function Va(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={},It=!1;function Bt(){if(ve in at){var tn=at[ve];return tn!==null&&Oi.getVAO(tn)===null&&(tn=Oi.createVAO(tn)),It=!0,Ot.vao=tn,Cn(function(qi){var Vi=Oi.getVAO(tn);return Vi?qi.link(Vi):\"null\"})}else if(ve in kt){It=!0;var Ci=kt[ve];return Nn(Ci,function(qi,Vi){var on=qi.invoke(Vi,Ci);return Vi.def(qi.shared.vao+\".getVAO(\"+on+\")\")})}return null}var Rt=Bt(),mt=!1;function Pt(){if(Tt in at){var tn=at[Tt];if(Ot.elements=tn,Pi(tn)){var Ci=Ot.elements=Br.create(tn,!0);tn=Br.getElements(Ci),mt=!0}else tn&&(tn=Br.getElements(tn),mt=!0);var qi=Cn(function(on,On){if(tn){var Ja=on.link(tn);return on.ELEMENTS=Ja,Ja}return on.ELEMENTS=null,null});return qi.value=tn,qi}else if(Tt in kt){mt=!0;var Vi=kt[Tt];return Nn(Vi,function(on,On){var Ja=on.shared,co=Ja.isBufferArgs,rs=Ja.elements,so=on.invoke(On,Vi),Zo=On.def(\"null\"),ys=On.def(co,\"(\",so,\")\"),ou=on.cond(ys).then(Zo,\"=\",rs,\".createStream(\",so,\");\").else(Zo,\"=\",rs,\".getElements(\",so,\");\");return On.entry(ou),On.exit(on.cond(ys).then(rs,\".destroyStream(\",Zo,\");\")),on.ELEMENTS=Zo,Zo})}else if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.elements+\".getElements(\"+on.shared.vao+\".currentVAO.elements):null\")});return null}var ht=Pt();function cr(){if(Kt in at){var tn=at[Kt];return Ot.primitive=tn,Cn(function(qi,Vi){return Mn[tn]})}else if(Kt in kt){var Ci=kt[Kt];return Nn(Ci,function(qi,Vi){var on=qi.constants.primTypes,On=qi.invoke(Vi,Ci);return Vi.def(on,\"[\",On,\"]\")})}else{if(mt)return Rn(ht)?ht.value?Cn(function(qi,Vi){return Vi.def(qi.ELEMENTS,\".primType\")}):Cn(function(){return Sl}):new ti(ht.thisDep,ht.contextDep,ht.propDep,function(qi,Vi){var on=qi.ELEMENTS;return Vi.def(on,\"?\",on,\".primType:\",Sl)});if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(qi,Vi){return Vi.def(qi.shared.vao+\".currentVAO?\"+qi.shared.vao+\".currentVAO.primitive:\"+Sl)})}return null}function br(tn,Ci){if(tn in at){var qi=at[tn]|0;return Ci?Ot.offset=qi:Ot.instances=qi,Cn(function(on,On){return Ci&&(on.OFFSET=qi),qi})}else if(tn in kt){var Vi=kt[tn];return Nn(Vi,function(on,On){var Ja=on.invoke(On,Vi);return Ci&&(on.OFFSET=Ja),Ja})}else if(Ci){if(mt)return Cn(function(on,On){return on.OFFSET=0,0});if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.vao+\".currentVAO.offset:0\")})}else if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.vao+\".currentVAO.instances:-1\")});return null}var Nr=br(xr,!0);function Ri(){if(Jt in at){var tn=at[Jt]|0;return Ot.count=tn,Cn(function(){return tn})}else if(Jt in kt){var Ci=kt[Jt];return Nn(Ci,function(On,Ja){var co=On.invoke(Ja,Ci);return co})}else if(mt)if(Rn(ht)){if(ht)return Nr?new ti(Nr.thisDep,Nr.contextDep,Nr.propDep,function(On,Ja){var co=Ja.def(On.ELEMENTS,\".vertCount-\",On.OFFSET);return co}):Cn(function(On,Ja){return Ja.def(On.ELEMENTS,\".vertCount\")});var qi=Cn(function(){return-1});return qi}else{var Vi=new ti(ht.thisDep||Nr.thisDep,ht.contextDep||Nr.contextDep,ht.propDep||Nr.propDep,function(On,Ja){var co=On.ELEMENTS;return On.OFFSET?Ja.def(co,\"?\",co,\".vertCount-\",On.OFFSET,\":-1\"):Ja.def(co,\"?\",co,\".vertCount:-1\")});return Vi}else if(It){var on=new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(On,Ja){return Ja.def(On.shared.vao,\".currentVAO?\",On.shared.vao,\".currentVAO.count:-1\")});return on}return null}var hi=cr(),wi=Ri(),gn=br(Pr,!1);return{elements:ht,primitive:hi,count:wi,instances:gn,offset:Nr,vao:Rt,vaoActive:It,elementsActive:mt,static:Ot}}function El(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return vi.forEach(function(It){var Bt=Ki(It);function Rt(mt,Pt){if(It in at){var ht=mt(at[It]);Ot[Bt]=Cn(function(){return ht})}else if(It in kt){var cr=kt[It];Ot[Bt]=Nn(cr,function(br,Nr){return Pt(br,Nr,br.invoke(Nr,cr))})}}switch(It){case ku:case Ho:case Ts:case Vc:case va:case B:case Uc:case Ac:case Ua:case is:return Rt(function(mt){return mt},function(mt,Pt,ht){return ht});case no:return Rt(function(mt){return Xr[mt]},function(mt,Pt,ht){var cr=mt.constants.compareFuncs;return Pt.def(cr,\"[\",ht,\"]\")});case _s:return Rt(function(mt){return mt},function(mt,Pt,ht){var cr=Pt.def(\"+\",ht,\"[0]\"),br=Pt.def(\"+\",ht,\"[1]\");return[cr,br]});case Ps:return Rt(function(mt){var Pt=\"srcRGB\"in mt?mt.srcRGB:mt.src,ht=\"srcAlpha\"in mt?mt.srcAlpha:mt.src,cr=\"dstRGB\"in mt?mt.dstRGB:mt.dst,br=\"dstAlpha\"in mt?mt.dstAlpha:mt.dst;return[bi[Pt],bi[cr],bi[ht],bi[br]]},function(mt,Pt,ht){var cr=mt.constants.blendFuncs;function br(Ci,qi){var Vi=Pt.def('\"',Ci,qi,'\" in ',ht,\"?\",ht,\".\",Ci,qi,\":\",ht,\".\",Ci);return Vi}var Nr=br(\"src\",\"RGB\"),Ri=br(\"dst\",\"RGB\"),hi=Pt.def(cr,\"[\",Nr,\"]\"),wi=Pt.def(cr,\"[\",br(\"src\",\"Alpha\"),\"]\"),gn=Pt.def(cr,\"[\",Ri,\"]\"),tn=Pt.def(cr,\"[\",br(\"dst\",\"Alpha\"),\"]\");return[hi,gn,wi,tn]});case Xs:return Rt(function(mt){if(typeof mt==\"string\")return[xi[mt],xi[mt]];if(typeof mt==\"object\")return[xi[mt.rgb],xi[mt.alpha]]},function(mt,Pt,ht){var cr=mt.constants.blendEquations,br=Pt.def(),Nr=Pt.def(),Ri=mt.cond(\"typeof \",ht,'===\"string\"');return Ri.then(br,\"=\",Nr,\"=\",cr,\"[\",ht,\"];\"),Ri.else(br,\"=\",cr,\"[\",ht,\".rgb];\",Nr,\"=\",cr,\"[\",ht,\".alpha];\"),Pt(Ri),[br,Nr]});case yl:return Rt(function(mt){return M(4,function(Pt){return+mt[Pt]})},function(mt,Pt,ht){return M(4,function(cr){return Pt.def(\"+\",ht,\"[\",cr,\"]\")})});case hc:return Rt(function(mt){return mt|0},function(mt,Pt,ht){return Pt.def(ht,\"|0\")});case Ku:return Rt(function(mt){var Pt=mt.cmp||\"keep\",ht=mt.ref||0,cr=\"mask\"in mt?mt.mask:-1;return[Xr[Pt],ht,cr]},function(mt,Pt,ht){var cr=mt.constants.compareFuncs,br=Pt.def('\"cmp\" in ',ht,\"?\",cr,\"[\",ht,\".cmp]\",\":\",nt),Nr=Pt.def(ht,\".ref|0\"),Ri=Pt.def('\"mask\" in ',ht,\"?\",ht,\".mask|0:-1\");return[br,Nr,Ri]});case ue:case w:return Rt(function(mt){var Pt=mt.fail||\"keep\",ht=mt.zfail||\"keep\",cr=mt.zpass||\"keep\";return[It===w?se:X,ni[Pt],ni[ht],ni[cr]]},function(mt,Pt,ht){var cr=mt.constants.stencilOps;function br(Nr){return Pt.def('\"',Nr,'\" in ',ht,\"?\",cr,\"[\",ht,\".\",Nr,\"]:\",nt)}return[It===w?se:X,br(\"fail\"),br(\"zfail\"),br(\"zpass\")]});case xu:return Rt(function(mt){var Pt=mt.factor|0,ht=mt.units|0;return[Pt,ht]},function(mt,Pt,ht){var cr=Pt.def(ht,\".factor|0\"),br=Pt.def(ht,\".units|0\");return[cr,br]});case Yu:return Rt(function(mt){var Pt=0;return mt===\"front\"?Pt=X:mt===\"back\"&&(Pt=se),Pt},function(mt,Pt,ht){return Pt.def(ht,'===\"front\"?',X,\":\",se)});case pu:return Rt(function(mt){return mt},function(mt,Pt,ht){return ht});case Nc:return Rt(function(mt){return gi[mt]},function(mt,Pt,ht){return Pt.def(ht+'===\"cw\"?'+Te+\":\"+Ne)});case $l:return Rt(function(mt){return mt.map(function(Pt){return!!Pt})},function(mt,Pt,ht){return M(4,function(cr){return\"!!\"+ht+\"[\"+cr+\"]\"})});case oo:return Rt(function(mt){var Pt=\"value\"in mt?mt.value:1,ht=!!mt.invert;return[Pt,ht]},function(mt,Pt,ht){var cr=Pt.def('\"value\" in ',ht,\"?+\",ht,\".value:1\"),br=Pt.def(\"!!\",ht,\".invert\");return[cr,br]})}}),Ot}function zo(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(It){var Bt=at[It],Rt;if(typeof Bt==\"number\"||typeof Bt==\"boolean\")Rt=Cn(function(){return Bt});else if(typeof Bt==\"function\"){var mt=Bt._reglType;mt===\"texture2d\"||mt===\"textureCube\"?Rt=Cn(function(Pt){return Pt.link(Bt)}):(mt===\"framebuffer\"||mt===\"framebufferCube\")&&(Rt=Cn(function(Pt){return Pt.link(Bt.color[0])}))}else En(Bt)&&(Rt=Cn(function(Pt){var ht=Pt.global.def(\"[\",M(Bt.length,function(cr){return Bt[cr]}),\"]\");return ht}));Rt.value=Bt,Ot[It]=Rt}),Object.keys(kt).forEach(function(It){var Bt=kt[It];Ot[It]=Nn(Bt,function(Rt,mt){return Rt.invoke(mt,Bt)})}),Ot}function el(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(It){var Bt=at[It],Rt=xt.id(It),mt=new Yr;if(Pi(Bt))mt.state=La,mt.buffer=Hr.getBuffer(Hr.create(Bt,Sr,!1,!0)),mt.type=0;else{var Pt=Hr.getBuffer(Bt);if(Pt)mt.state=La,mt.buffer=Pt,mt.type=0;else if(\"constant\"in Bt){var ht=Bt.constant;mt.buffer=\"null\",mt.state=Na,typeof ht==\"number\"?mt.x=ht:ka.forEach(function(gn,tn){tn<ht.length&&(mt[gn]=ht[tn])})}else{Pi(Bt.buffer)?Pt=Hr.getBuffer(Hr.create(Bt.buffer,Sr,!1,!0)):Pt=Hr.getBuffer(Bt.buffer);var cr=Bt.offset|0,br=Bt.stride|0,Nr=Bt.size|0,Ri=!!Bt.normalized,hi=0;\"type\"in Bt&&(hi=Hi[Bt.type]);var wi=Bt.divisor|0;mt.buffer=Pt,mt.state=La,mt.size=Nr,mt.normalized=Ri,mt.type=hi||Pt.dtype,mt.offset=cr,mt.stride=br,mt.divisor=wi}}Ot[It]=Cn(function(gn,tn){var Ci=gn.attribCache;if(Rt in Ci)return Ci[Rt];var qi={isStream:!1};return Object.keys(mt).forEach(function(Vi){qi[Vi]=mt[Vi]}),mt.buffer&&(qi.buffer=gn.link(mt.buffer),qi.type=qi.type||qi.buffer+\".dtype\"),Ci[Rt]=qi,qi})}),Object.keys(kt).forEach(function(It){var Bt=kt[It];function Rt(mt,Pt){var ht=mt.invoke(Pt,Bt),cr=mt.shared,br=mt.constants,Nr=cr.isBufferArgs,Ri=cr.buffer,hi={isStream:Pt.def(!1)},wi=new Yr;wi.state=La,Object.keys(wi).forEach(function(qi){hi[qi]=Pt.def(\"\"+wi[qi])});var gn=hi.buffer,tn=hi.type;Pt(\"if(\",Nr,\"(\",ht,\")){\",hi.isStream,\"=true;\",gn,\"=\",Ri,\".createStream(\",Sr,\",\",ht,\");\",tn,\"=\",gn,\".dtype;\",\"}else{\",gn,\"=\",Ri,\".getBuffer(\",ht,\");\",\"if(\",gn,\"){\",tn,\"=\",gn,\".dtype;\",'}else if(\"constant\" in ',ht,\"){\",hi.state,\"=\",Na,\";\",\"if(typeof \"+ht+'.constant === \"number\"){',hi[ka[0]],\"=\",ht,\".constant;\",ka.slice(1).map(function(qi){return hi[qi]}).join(\"=\"),\"=0;\",\"}else{\",ka.map(function(qi,Vi){return hi[qi]+\"=\"+ht+\".constant.length>\"+Vi+\"?\"+ht+\".constant[\"+Vi+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",Nr,\"(\",ht,\".buffer)){\",gn,\"=\",Ri,\".createStream(\",Sr,\",\",ht,\".buffer);\",\"}else{\",gn,\"=\",Ri,\".getBuffer(\",ht,\".buffer);\",\"}\",tn,'=\"type\" in ',ht,\"?\",br.glTypes,\"[\",ht,\".type]:\",gn,\".dtype;\",hi.normalized,\"=!!\",ht,\".normalized;\");function Ci(qi){Pt(hi[qi],\"=\",ht,\".\",qi,\"|0;\")}return Ci(\"size\"),Ci(\"offset\"),Ci(\"stride\"),Ci(\"divisor\"),Pt(\"}}\"),Pt.exit(\"if(\",hi.isStream,\"){\",Ri,\".destroyStream(\",gn,\");\",\"}\"),hi}Ot[It]=Nn(Bt,Rt)}),Ot}function ol(Ve){var et=Ve.static,at=Ve.dynamic,kt={};return Object.keys(et).forEach(function(Ot){var It=et[Ot];kt[Ot]=Cn(function(Bt,Rt){return typeof It==\"number\"||typeof It==\"boolean\"?\"\"+It:Bt.link(It)})}),Object.keys(at).forEach(function(Ot){var It=at[Ot];kt[Ot]=Nn(It,function(Bt,Rt){return Bt.invoke(Rt,It)})}),kt}function Vl(Ve,et,at,kt,Ot){var It=Ve.static,Bt=Ve.dynamic,Rt=ns(Ve,et),mt=oa(Ve,Ot),Pt=wa(Ve,mt,Ot),ht=Va(Ve,Ot),cr=El(Ve,Ot),br=Ys(Ve,Ot,Rt);function Nr(Ci){var qi=Pt[Ci];qi&&(cr[Ci]=qi)}Nr(ee),Nr(Ki(Q));var Ri=Object.keys(cr).length>0,hi={framebuffer:mt,draw:ht,shader:br,state:cr,dirty:Ri,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(hi.profile=ra(Ve,Ot),hi.uniforms=zo(at,Ot),hi.drawVAO=hi.scopeVAO=ht.vao,!hi.drawVAO&&br.program&&!Rt&&zt.angle_instanced_arrays&&ht.static.elements){var wi=!0,gn=br.program.attributes.map(function(Ci){var qi=et.static[Ci];return wi=wi&&!!qi,qi});if(wi&&gn.length>0){var tn=Oi.getVAO(Oi.createVAO({attributes:gn,elements:ht.static.elements}));hi.drawVAO=new ti(null,null,null,function(Ci,qi){return Ci.link(tn)}),hi.useVAO=!0}}return Rt?hi.useVAO=!0:hi.attributes=el(et,Ot),hi.context=ol(kt,Ot),hi}function ls(Ve,et,at){var kt=Ve.shared,Ot=kt.context,It=Ve.scope();Object.keys(at).forEach(function(Bt){et.save(Ot,\".\"+Bt);var Rt=at[Bt],mt=Rt.append(Ve,et);Array.isArray(mt)?It(Ot,\".\",Bt,\"=[\",mt.join(),\"];\"):It(Ot,\".\",Bt,\"=\",mt,\";\")}),et(It)}function Gs(Ve,et,at,kt){var Ot=Ve.shared,It=Ot.gl,Bt=Ot.framebuffer,Rt;ci&&(Rt=et.def(Ot.extensions,\".webgl_draw_buffers\"));var mt=Ve.constants,Pt=mt.drawBuffer,ht=mt.backBuffer,cr;at?cr=at.append(Ve,et):cr=et.def(Bt,\".next\"),kt||et(\"if(\",cr,\"!==\",Bt,\".cur){\"),et(\"if(\",cr,\"){\",It,\".bindFramebuffer(\",qr,\",\",cr,\".framebuffer);\"),ci&&et(Rt,\".drawBuffersWEBGL(\",Pt,\"[\",cr,\".colorAttachments.length]);\"),et(\"}else{\",It,\".bindFramebuffer(\",qr,\",null);\"),ci&&et(Rt,\".drawBuffersWEBGL(\",ht,\");\"),et(\"}\",Bt,\".cur=\",cr,\";\"),kt||et(\"}\")}function Ks(Ve,et,at){var kt=Ve.shared,Ot=kt.gl,It=Ve.current,Bt=Ve.next,Rt=kt.current,mt=kt.next,Pt=Ve.cond(Rt,\".dirty\");vi.forEach(function(ht){var cr=Ki(ht);if(!(cr in at.state)){var br,Nr;if(cr in Bt){br=Bt[cr],Nr=It[cr];var Ri=M(Xi[cr].length,function(wi){return Pt.def(br,\"[\",wi,\"]\")});Pt(Ve.cond(Ri.map(function(wi,gn){return wi+\"!==\"+Nr+\"[\"+gn+\"]\"}).join(\"||\")).then(Ot,\".\",mn[cr],\"(\",Ri,\");\",Ri.map(function(wi,gn){return Nr+\"[\"+gn+\"]=\"+wi}).join(\";\"),\";\"))}else{br=Pt.def(mt,\".\",cr);var hi=Ve.cond(br,\"!==\",Rt,\".\",cr);Pt(hi),cr in li?hi(Ve.cond(br).then(Ot,\".enable(\",li[cr],\");\").else(Ot,\".disable(\",li[cr],\");\"),Rt,\".\",cr,\"=\",br,\";\"):hi(Ot,\".\",mn[cr],\"(\",br,\");\",Rt,\".\",cr,\"=\",br,\";\")}}}),Object.keys(at.state).length===0&&Pt(Rt,\".dirty=false;\"),et(Pt)}function Ta(Ve,et,at,kt){var Ot=Ve.shared,It=Ve.current,Bt=Ot.current,Rt=Ot.gl,mt;Ai(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(kt&&!kt(ht))){var cr=ht.append(Ve,et);if(li[Pt]){var br=li[Pt];Rn(ht)?(mt=Ve.link(cr,{stable:!0}),et(Ve.cond(mt).then(Rt,\".enable(\",br,\");\").else(Rt,\".disable(\",br,\");\")),et(Bt,\".\",Pt,\"=\",mt,\";\")):(et(Ve.cond(cr).then(Rt,\".enable(\",br,\");\").else(Rt,\".disable(\",br,\");\")),et(Bt,\".\",Pt,\"=\",cr,\";\"))}else if(En(cr)){var Nr=It[Pt];et(Rt,\".\",mn[Pt],\"(\",cr,\");\",cr.map(function(Ri,hi){return Nr+\"[\"+hi+\"]=\"+Ri}).join(\";\"),\";\")}else Rn(ht)?(mt=Ve.link(cr,{stable:!0}),et(Rt,\".\",mn[Pt],\"(\",mt,\");\",Bt,\".\",Pt,\"=\",mt,\";\")):et(Rt,\".\",mn[Pt],\"(\",cr,\");\",Bt,\".\",Pt,\"=\",cr,\";\")}})}function sl(Ve,et){Ii&&(Ve.instancing=et.def(Ve.shared.extensions,\".angle_instanced_arrays\"))}function io(Ve,et,at,kt,Ot){var It=Ve.shared,Bt=Ve.stats,Rt=It.current,mt=It.timer,Pt=at.profile;function ht(){return typeof performance==\"undefined\"?\"Date.now()\":\"performance.now()\"}var cr,br;function Nr(Ci){cr=et.def(),Ci(cr,\"=\",ht(),\";\"),typeof Ot==\"string\"?Ci(Bt,\".count+=\",Ot,\";\"):Ci(Bt,\".count++;\"),ji&&(kt?(br=et.def(),Ci(br,\"=\",mt,\".getNumPendingQueries();\")):Ci(mt,\".beginQuery(\",Bt,\");\"))}function Ri(Ci){Ci(Bt,\".cpuTime+=\",ht(),\"-\",cr,\";\"),ji&&(kt?Ci(mt,\".pushScopeStats(\",br,\",\",mt,\".getNumPendingQueries(),\",Bt,\");\"):Ci(mt,\".endQuery();\"))}function hi(Ci){var qi=et.def(Rt,\".profile\");et(Rt,\".profile=\",Ci,\";\"),et.exit(Rt,\".profile=\",qi,\";\")}var wi;if(Pt){if(Rn(Pt)){Pt.enable?(Nr(et),Ri(et.exit),hi(\"true\")):hi(\"false\");return}wi=Pt.append(Ve,et),hi(wi)}else wi=et.def(Rt,\".profile\");var gn=Ve.block();Nr(gn),et(\"if(\",wi,\"){\",gn,\"}\");var tn=Ve.block();Ri(tn),et.exit(\"if(\",wi,\"){\",tn,\"}\")}function Y(Ve,et,at,kt,Ot){var It=Ve.shared;function Bt(mt){switch(mt){case ko:case Is:case dl:return 2;case Qa:case As:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Rt(mt,Pt,ht){var cr=It.gl,br=et.def(mt,\".location\"),Nr=et.def(It.attributes,\"[\",br,\"]\"),Ri=ht.state,hi=ht.buffer,wi=[ht.x,ht.y,ht.z,ht.w],gn=[\"buffer\",\"normalized\",\"offset\",\"stride\"];function tn(){et(\"if(!\",Nr,\".buffer){\",cr,\".enableVertexAttribArray(\",br,\");}\");var qi=ht.type,Vi;if(ht.size?Vi=et.def(ht.size,\"||\",Pt):Vi=Pt,et(\"if(\",Nr,\".type!==\",qi,\"||\",Nr,\".size!==\",Vi,\"||\",gn.map(function(On){return Nr+\".\"+On+\"!==\"+ht[On]}).join(\"||\"),\"){\",cr,\".bindBuffer(\",Sr,\",\",hi,\".buffer);\",cr,\".vertexAttribPointer(\",[br,Vi,qi,ht.normalized,ht.stride,ht.offset],\");\",Nr,\".type=\",qi,\";\",Nr,\".size=\",Vi,\";\",gn.map(function(On){return Nr+\".\"+On+\"=\"+ht[On]+\";\"}).join(\"\"),\"}\"),Ii){var on=ht.divisor;et(\"if(\",Nr,\".divisor!==\",on,\"){\",Ve.instancing,\".vertexAttribDivisorANGLE(\",[br,on],\");\",Nr,\".divisor=\",on,\";}\")}}function Ci(){et(\"if(\",Nr,\".buffer){\",cr,\".disableVertexAttribArray(\",br,\");\",Nr,\".buffer=null;\",\"}if(\",ka.map(function(qi,Vi){return Nr+\".\"+qi+\"!==\"+wi[Vi]}).join(\"||\"),\"){\",cr,\".vertexAttrib4f(\",br,\",\",wi,\");\",ka.map(function(qi,Vi){return Nr+\".\"+qi+\"=\"+wi[Vi]+\";\"}).join(\"\"),\"}\")}Ri===La?tn():Ri===Na?Ci():(et(\"if(\",Ri,\"===\",La,\"){\"),tn(),et(\"}else{\"),Ci(),et(\"}\"))}kt.forEach(function(mt){var Pt=mt.name,ht=at.attributes[Pt],cr;if(ht){if(!Ot(ht))return;cr=ht.append(Ve,et)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);cr={},Object.keys(new Yr).forEach(function(Nr){cr[Nr]=et.def(br,\".\",Nr)})}Rt(Ve.link(mt),Bt(mt.info.type),cr)})}function D(Ve,et,at,kt,Ot,It){for(var Bt=Ve.shared,Rt=Bt.gl,mt,Pt=0;Pt<kt.length;++Pt){var ht=kt[Pt],cr=ht.name,br=ht.info.type,Nr=at.uniforms[cr],Ri=Ve.link(ht),hi=Ri+\".location\",wi;if(Nr){if(!Ot(Nr))continue;if(Rn(Nr)){var gn=Nr.value;if(br===dc||br===Al){var tn=Ve.link(gn._texture||gn.color[0]._texture);et(Rt,\".uniform1i(\",hi,\",\",tn+\".bind());\"),et.exit(tn,\".unbind();\")}else if(br===au||br===$s||br===Ql){var Ci=Ve.global.def(\"new Float32Array([\"+Array.prototype.slice.call(gn)+\"])\"),qi=2;br===$s?qi=3:br===Ql&&(qi=4),et(Rt,\".uniformMatrix\",qi,\"fv(\",hi,\",false,\",Ci,\");\")}else{switch(br){case $a:mt=\"1f\";break;case ko:mt=\"2f\";break;case Qa:mt=\"3f\";break;case mo:mt=\"4f\";break;case To:mt=\"1i\";break;case Bo:mt=\"1i\";break;case dl:mt=\"2i\";break;case Is:mt=\"2i\";break;case Ul:mt=\"3i\";break;case As:mt=\"3i\";break;case Lu:mt=\"4i\";break;case wo:mt=\"4i\";break}et(Rt,\".uniform\",mt,\"(\",hi,\",\",En(gn)?Array.prototype.slice.call(gn):gn,\");\")}continue}else wi=Nr.append(Ve,et)}else{if(!Ot(ia))continue;wi=et.def(Bt.uniforms,\"[\",xt.id(cr),\"]\")}br===dc?et(\"if(\",wi,\"&&\",wi,'._reglType===\"framebuffer\"){',wi,\"=\",wi,\".color[0];\",\"}\"):br===Al&&et(\"if(\",wi,\"&&\",wi,'._reglType===\"framebufferCube\"){',wi,\"=\",wi,\".color[0];\",\"}\");var Vi=1;switch(br){case dc:case Al:var on=et.def(wi,\"._texture\");et(Rt,\".uniform1i(\",hi,\",\",on,\".bind());\"),et.exit(on,\".unbind();\");continue;case Bo:case To:mt=\"1i\";break;case Is:case dl:mt=\"2i\",Vi=2;break;case As:case Ul:mt=\"3i\",Vi=3;break;case wo:case Lu:mt=\"4i\",Vi=4;break;case $a:mt=\"1f\";break;case ko:mt=\"2f\",Vi=2;break;case Qa:mt=\"3f\",Vi=3;break;case mo:mt=\"4f\",Vi=4;break;case au:mt=\"Matrix2fv\";break;case $s:mt=\"Matrix3fv\";break;case Ql:mt=\"Matrix4fv\";break}if(mt.charAt(0)===\"M\"){et(Rt,\".uniform\",mt,\"(\",hi,\",\");var On=Math.pow(br-au+2,2),Ja=Ve.global.def(\"new Float32Array(\",On,\")\");Array.isArray(wi)?et(\"false,(\",M(On,function(ys){return Ja+\"[\"+ys+\"]=\"+wi[ys]}),\",\",Ja,\")\"):et(\"false,(Array.isArray(\",wi,\")||\",wi,\" instanceof Float32Array)?\",wi,\":(\",M(On,function(ys){return Ja+\"[\"+ys+\"]=\"+wi+\"[\"+ys+\"]\"}),\",\",Ja,\")\"),et(\");\")}else if(Vi>1){for(var co=[],rs=[],so=0;so<Vi;++so)Array.isArray(wi)?rs.push(wi[so]):rs.push(et.def(wi+\"[\"+so+\"]\")),It&&co.push(et.def());It&&et(\"if(!\",Ve.batchId,\"||\",co.map(function(ys,ou){return ys+\"!==\"+rs[ou]}).join(\"||\"),\"){\",co.map(function(ys,ou){return ys+\"=\"+rs[ou]+\";\"}).join(\"\")),et(Rt,\".uniform\",mt,\"(\",hi,\",\",rs.join(\",\"),\");\"),It&&et(\"}\")}else{if(It){var Zo=et.def();et(\"if(!\",Ve.batchId,\"||\",Zo,\"!==\",wi,\"){\",Zo,\"=\",wi,\";\")}et(Rt,\".uniform\",mt,\"(\",hi,\",\",wi,\");\"),It&&et(\"}\")}}}function J(Ve,et,at,kt){var Ot=Ve.shared,It=Ot.gl,Bt=Ot.draw,Rt=kt.draw;function mt(){var Vi=Rt.elements,on,On=et;return Vi?((Vi.contextDep&&kt.contextDynamic||Vi.propDep)&&(On=at),on=Vi.append(Ve,On),Rt.elementsActive&&On(\"if(\"+on+\")\"+It+\".bindBuffer(\"+Or+\",\"+on+\".buffer.buffer);\")):(on=On.def(),On(on,\"=\",Bt,\".\",Tt,\";\",\"if(\",on,\"){\",It,\".bindBuffer(\",Or,\",\",on,\".buffer.buffer);}\",\"else if(\",Ot.vao,\".currentVAO){\",on,\"=\",Ve.shared.elements+\".getElements(\"+Ot.vao,\".currentVAO.elements);\",nn?\"\":\"if(\"+on+\")\"+It+\".bindBuffer(\"+Or+\",\"+on+\".buffer.buffer);\",\"}\")),on}function Pt(){var Vi=Rt.count,on,On=et;return Vi?((Vi.contextDep&&kt.contextDynamic||Vi.propDep)&&(On=at),on=Vi.append(Ve,On)):on=On.def(Bt,\".\",Jt),on}var ht=mt();function cr(Vi){var on=Rt[Vi];return on?on.contextDep&&kt.contextDynamic||on.propDep?on.append(Ve,at):on.append(Ve,et):et.def(Bt,\".\",Vi)}var br=cr(Kt),Nr=cr(xr),Ri=Pt();if(typeof Ri==\"number\"){if(Ri===0)return}else at(\"if(\",Ri,\"){\"),at.exit(\"}\");var hi,wi;Ii&&(hi=cr(Pr),wi=Ve.instancing);var gn=ht+\".type\",tn=Rt.elements&&Rn(Rt.elements)&&!Rt.vaoActive;function Ci(){function Vi(){at(wi,\".drawElementsInstancedANGLE(\",[br,Ri,gn,Nr+\"<<((\"+gn+\"-\"+Ra+\")>>1)\",hi],\");\")}function on(){at(wi,\".drawArraysInstancedANGLE(\",[br,Nr,Ri,hi],\");\")}ht&&ht!==\"null\"?tn?Vi():(at(\"if(\",ht,\"){\"),Vi(),at(\"}else{\"),on(),at(\"}\")):on()}function qi(){function Vi(){at(It+\".drawElements(\"+[br,Ri,gn,Nr+\"<<((\"+gn+\"-\"+Ra+\")>>1)\"]+\");\")}function on(){at(It+\".drawArrays(\"+[br,Nr,Ri]+\");\")}ht&&ht!==\"null\"?tn?Vi():(at(\"if(\",ht,\"){\"),Vi(),at(\"}else{\"),on(),at(\"}\")):on()}Ii&&(typeof hi!=\"number\"||hi>=0)?typeof hi==\"string\"?(at(\"if(\",hi,\">0){\"),Ci(),at(\"}else if(\",hi,\"<0){\"),qi(),at(\"}\")):Ci():qi()}function q(Ve,et,at,kt,Ot){var It=Ln(),Bt=It.proc(\"body\",Ot);return Ii&&(It.instancing=Bt.def(It.shared.extensions,\".angle_instanced_arrays\")),Ve(It,Bt,at,kt),It.compile().body}function K(Ve,et,at,kt){sl(Ve,et),at.useVAO?at.drawVAO?et(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,et),\");\"):et(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(et(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,et,at,kt.attributes,function(){return!0})),D(Ve,et,at,kt.uniforms,function(){return!0},!1),J(Ve,et,et,at)}function de(Ve,et){var at=Ve.proc(\"draw\",1);sl(Ve,at),ls(Ve,at,et.context),Gs(Ve,at,et.framebuffer),Ks(Ve,at,et),Ta(Ve,at,et.state),io(Ve,at,et,!1,!0);var kt=et.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",kt,\".program);\"),et.shader.program)K(Ve,at,et,et.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var Ot=Ve.global.def(\"{}\"),It=at.def(kt,\".id\"),Bt=at.def(Ot,\"[\",It,\"]\");at(Ve.cond(Bt).then(Bt,\".call(this,a0);\").else(Bt,\"=\",Ot,\"[\",It,\"]=\",Ve.link(function(Rt){return q(K,Ve,et,Rt,1)}),\"(\",kt,\");\",Bt,\".call(this,a0);\"))}Object.keys(et.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ne(Ve,et,at,kt){Ve.batchId=\"a1\",sl(Ve,et);function Ot(){return!0}Y(Ve,et,at,kt.attributes,Ot),D(Ve,et,at,kt.uniforms,Ot,!1),J(Ve,et,et,at)}function we(Ve,et,at,kt){sl(Ve,et);var Ot=at.contextDep,It=et.def(),Bt=\"a0\",Rt=\"a1\",mt=et.def();Ve.shared.props=mt,Ve.batchId=It;var Pt=Ve.scope(),ht=Ve.scope();et(Pt.entry,\"for(\",It,\"=0;\",It,\"<\",Rt,\";++\",It,\"){\",mt,\"=\",Bt,\"[\",It,\"];\",ht,\"}\",Pt.exit);function cr(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!cr(gn)}if(at.needsContext&&ls(Ve,ht,at.context),at.needsFramebuffer&&Gs(Ve,ht,at.framebuffer),Ta(Ve,ht,at.state,cr),at.profile&&cr(at.profile)&&io(Ve,ht,at,!1,!0),kt)at.useVAO?at.drawVAO?cr(at.drawVAO)?ht(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,ht),\");\"):Pt(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Pt),\");\"):Pt(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Pt(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Pt,at,kt.attributes,br),Y(Ve,ht,at,kt.attributes,cr)),D(Ve,Pt,at,kt.uniforms,br,!1),D(Ve,ht,at,kt.uniforms,cr,!0),J(Ve,Pt,ht,at);else{var Nr=Ve.global.def(\"{}\"),Ri=at.shader.progVar.append(Ve,ht),hi=ht.def(Ri,\".id\"),wi=ht.def(Nr,\"[\",hi,\"]\");ht(Ve.shared.gl,\".useProgram(\",Ri,\".program);\",\"if(!\",wi,\"){\",wi,\"=\",Nr,\"[\",hi,\"]=\",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),\"(\",Ri,\");}\",wi,\".call(this,a0[\",It,\"],\",It,\");\")}}function Ue(Ve,et){var at=Ve.proc(\"batch\",2);Ve.batchId=\"0\",sl(Ve,at);var kt=!1,Ot=!0;Object.keys(et.context).forEach(function(Nr){kt=kt||et.context[Nr].propDep}),kt||(ls(Ve,at,et.context),Ot=!1);var It=et.framebuffer,Bt=!1;It?(It.propDep?kt=Bt=!0:It.contextDep&&kt&&(Bt=!0),Bt||Gs(Ve,at,It)):Gs(Ve,at,null),et.state.viewport&&et.state.viewport.propDep&&(kt=!0);function Rt(Nr){return Nr.contextDep&&kt||Nr.propDep}Ks(Ve,at,et),Ta(Ve,at,et.state,function(Nr){return!Rt(Nr)}),(!et.profile||!Rt(et.profile))&&io(Ve,at,et,!1,\"a1\"),et.contextDep=kt,et.needsContext=Ot,et.needsFramebuffer=Bt;var mt=et.shader.progVar;if(mt.contextDep&&kt||mt.propDep)we(Ve,at,et,null);else{var Pt=mt.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Pt,\".program);\"),et.shader.program)we(Ve,at,et,et.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var ht=Ve.global.def(\"{}\"),cr=at.def(Pt,\".id\"),br=at.def(ht,\"[\",cr,\"]\");at(Ve.cond(br).then(br,\".call(this,a0,a1);\").else(br,\"=\",ht,\"[\",cr,\"]=\",Ve.link(function(Nr){return q(we,Ve,et,Nr,2)}),\"(\",Pt,\");\",br,\".call(this,a0,a1);\"))}}Object.keys(et.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ft(Ve,et){var at=Ve.proc(\"scope\",3);Ve.batchId=\"a2\";var kt=Ve.shared,Ot=kt.current;if(ls(Ve,at,et.context),et.framebuffer&&et.framebuffer.append(Ve,at),Ai(Object.keys(et.state)).forEach(function(Rt){var mt=et.state[Rt],Pt=mt.append(Ve,at);En(Pt)?Pt.forEach(function(ht,cr){vn(ht)?at.set(Ve.next[Rt],\"[\"+cr+\"]\",ht):at.set(Ve.next[Rt],\"[\"+cr+\"]\",Ve.link(ht,{stable:!0}))}):Rn(mt)?at.set(kt.next,\".\"+Rt,Ve.link(Pt,{stable:!0})):at.set(kt.next,\".\"+Rt,Pt)}),io(Ve,at,et,!0,!0),[Tt,xr,Jt,Pr,Kt].forEach(function(Rt){var mt=et.draw[Rt];if(mt){var Pt=mt.append(Ve,at);vn(Pt)?at.set(kt.draw,\".\"+Rt,Pt):at.set(kt.draw,\".\"+Rt,Ve.link(Pt),{stable:!0})}}),Object.keys(et.uniforms).forEach(function(Rt){var mt=et.uniforms[Rt].append(Ve,at);Array.isArray(mt)&&(mt=\"[\"+mt.map(function(Pt){return vn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+\"]\"),at.set(kt.uniforms,\"[\"+Ve.link(xt.id(Rt),{stable:!0})+\"]\",mt)}),Object.keys(et.attributes).forEach(function(Rt){var mt=et.attributes[Rt].append(Ve,at),Pt=Ve.scopeAttrib(Rt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,\".\"+ht,mt[ht])})}),et.scopeVAO){var It=et.scopeVAO.append(Ve,at);vn(It)?at.set(kt.vao,\".targetVAO\",It):at.set(kt.vao,\".targetVAO\",Ve.link(It,{stable:!0}))}function Bt(Rt){var mt=et.shader[Rt];if(mt){var Pt=mt.append(Ve,at);vn(Pt)?at.set(kt.shader,\".\"+Rt,Pt):at.set(kt.shader,\".\"+Rt,Ve.link(Pt,{stable:!0}))}}Bt(Xe),Bt(ot),Object.keys(et.state).length>0&&(at(Ot,\".dirty=true;\"),at.exit(Ot,\".dirty=true;\")),at(\"a1(\",Ve.shared.context,\",a0,\",Ve.batchId,\");\")}function Zt(Ve){if(!(typeof Ve!=\"object\"||En(Ve))){for(var et=Object.keys(Ve),at=0;at<et.length;++at)if(h.isDynamic(Ve[et[at]]))return!0;return!1}}function hr(Ve,et,at){var kt=et.static[at];if(!kt||!Zt(kt))return;var Ot=Ve.global,It=Object.keys(kt),Bt=!1,Rt=!1,mt=!1,Pt=Ve.global.def(\"{}\");It.forEach(function(cr){var br=kt[cr];if(h.isDynamic(br)){typeof br==\"function\"&&(br=kt[cr]=h.unbox(br));var Nr=Nn(br,null);Bt=Bt||Nr.thisDep,mt=mt||Nr.propDep,Rt=Rt||Nr.contextDep}else{switch(Ot(Pt,\".\",cr,\"=\"),typeof br){case\"number\":Ot(br);break;case\"string\":Ot('\"',br,'\"');break;case\"object\":Array.isArray(br)&&Ot(\"[\",br.join(),\"]\");break;default:Ot(Ve.link(br));break}Ot(\";\")}});function ht(cr,br){It.forEach(function(Nr){var Ri=kt[Nr];if(h.isDynamic(Ri)){var hi=cr.invoke(br,Ri);br(Pt,\".\",Nr,\"=\",hi,\";\")}})}et.dynamic[at]=new h.DynamicVariable(Xo,{thisDep:Bt,contextDep:Rt,propDep:mt,ref:Pt,append:ht}),delete et.static[at]}function qt(Ve,et,at,kt,Ot){var It=Ln();It.stats=It.link(Ot),Object.keys(et.static).forEach(function(Rt){hr(It,et,Rt)}),dr.forEach(function(Rt){hr(It,Ve,Rt)});var Bt=Vl(Ve,et,at,kt,It);return Bt.shader.program&&(Bt.shader.program.attributes.sort(function(Rt,mt){return Rt.name<mt.name?-1:1}),Bt.shader.program.uniforms.sort(function(Rt,mt){return Rt.name<mt.name?-1:1})),de(It,Bt),ft(It,Bt),Ue(It,Bt),e(It.compile(),{destroy:function(){Bt.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ve=Ln(),et=Ve.proc(\"poll\"),at=Ve.proc(\"refresh\"),kt=Ve.block();et(kt),at(kt);var Ot=Ve.shared,It=Ot.gl,Bt=Ot.next,Rt=Ot.current;kt(Rt,\".dirty=false;\"),Gs(Ve,et),Gs(Ve,at,null,!0);var mt;Ii&&(mt=Ve.link(Ii)),zt.oes_vertex_array_object&&at(Ve.link(zt.oes_vertex_array_object),\".bindVertexArrayOES(null);\");var Pt=at.def(Ot.attributes),ht=at.def(0),cr=Ve.cond(ht,\".buffer\");cr.then(It,\".enableVertexAttribArray(i);\",It,\".bindBuffer(\",Sr,\",\",ht,\".buffer.buffer);\",It,\".vertexAttribPointer(i,\",ht,\".size,\",ht,\".type,\",ht,\".normalized,\",ht,\".stride,\",ht,\".offset);\").else(It,\".disableVertexAttribArray(i);\",It,\".vertexAttrib4f(i,\",ht,\".x,\",ht,\".y,\",ht,\".z,\",ht,\".w);\",ht,\".buffer=null;\");var br=Ve.link(Ir.maxAttributes,{stable:!0});return at(\"for(var i=0;i<\",br,\";++i){\",ht,\"=\",Pt,\"[i];\",cr,\"}\"),Ii&&at(\"for(var i=0;i<\",br,\";++i){\",mt,\".vertexAttribDivisorANGLE(i,\",Pt,\"[i].divisor);\",\"}\"),at(Ve.shared.vao,\".currentVAO=null;\",Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"),Object.keys(li).forEach(function(Nr){var Ri=li[Nr],hi=kt.def(Bt,\".\",Nr),wi=Ve.block();wi(\"if(\",hi,\"){\",It,\".enable(\",Ri,\")}else{\",It,\".disable(\",Ri,\")}\",Rt,\".\",Nr,\"=\",hi,\";\"),at(wi),et(\"if(\",hi,\"!==\",Rt,\".\",Nr,\"){\",wi,\"}\")}),Object.keys(mn).forEach(function(Nr){var Ri=mn[Nr],hi=Xi[Nr],wi,gn,tn=Ve.block();if(tn(It,\".\",Ri,\"(\"),En(hi)){var Ci=hi.length;wi=Ve.global.def(Bt,\".\",Nr),gn=Ve.global.def(Rt,\".\",Nr),tn(M(Ci,function(qi){return wi+\"[\"+qi+\"]\"}),\");\",M(Ci,function(qi){return gn+\"[\"+qi+\"]=\"+wi+\"[\"+qi+\"];\"}).join(\"\")),et(\"if(\",M(Ci,function(qi){return wi+\"[\"+qi+\"]!==\"+gn+\"[\"+qi+\"]\"}).join(\"||\"),\"){\",tn,\"}\")}else wi=kt.def(Bt,\".\",Nr),gn=kt.def(Rt,\".\",Nr),tn(wi,\");\",Rt,\".\",Nr,\"=\",wi,\";\"),et(\"if(\",wi,\"!==\",gn,\"){\",tn,\"}\");at(tn)}),Ve.compile()}(),compile:qt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Rs=function(Ee,xt){if(!xt.ext_disjoint_timer_query)return null;var zt=[];function Ir(){return zt.pop()||xt.ext_disjoint_timer_query.createQueryEXT()}function Hr(xi){zt.push(xi)}var Br=[];function Vr(xi){var Ii=Ir();xt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Br.push(Ii),ji(Br.length-1,Br.length,xi)}function mi(){xt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Oi=[];function Mi(){return Oi.pop()||new Ni}function Hn(xi){Oi.push(xi)}var Qi=[];function ji(xi,Ii,ci){var nn=Mi();nn.startQueryIndex=xi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ci,Qi.push(nn)}var si=[],Mr=[];function Yr(){var xi,Ii,ci=Br.length;if(ci!==0){Mr.length=Math.max(Mr.length,ci+1),si.length=Math.max(si.length,ci+1),si[0]=0,Mr[0]=0;var nn=0;for(xi=0,Ii=0;Ii<Br.length;++Ii){var Xi=Br[Ii];xt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,Da)?(nn+=xt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,yo),Hr(Xi)):Br[xi++]=Xi,si[Ii+1]=nn,Mr[Ii+1]=xi}for(Br.length=xi,xi=0,Ii=0;Ii<Qi.length;++Ii){var qn=Qi[Ii],vi=qn.startQueryIndex,li=qn.endQueryIndex;qn.sum+=si[li]-si[vi];var mn=Mr[vi],Ki=Mr[li];Ki===mn?(qn.stats.gpuTime+=qn.sum/1e6,Hn(qn)):(qn.startQueryIndex=mn,qn.endQueryIndex=Ki,Qi[xi++]=qn)}Qi.length=xi}}return{beginQuery:Vr,endQuery:mi,pushScopeStats:ji,update:Yr,getNumPendingQueries:function(){return Br.length},clear:function(){zt.push.apply(zt,Br);for(var xi=0;xi<zt.length;xi++)xt.ext_disjoint_timer_query.deleteQueryEXT(zt[xi]);Br.length=0,zt.length=0},restore:function(){Br.length=0,zt.length=0}}},Es=16384,Zs=256,Gn=1024,Ha=34962,Fo=\"webglcontextlost\",Uo=\"webglcontextrestored\",Qs=1,Ml=2,bu=3;function vl(Ee,xt){for(var zt=0;zt<Ee.length;++zt)if(Ee[zt]===xt)return zt;return-1}function Sc(Ee){var xt=_(Ee);if(!xt)return null;var zt=xt.gl,Ir=zt.getContextAttributes(),Hr=zt.isContextLost(),Br=k(zt,xt);if(!Br)return null;var Vr=x(),mi=Ia(),Ni=xt.cachedCode||{},Oi=Br.extensions,Mi=Rs(zt,Oi),Hn=v(),Qi=zt.drawingBufferWidth,ji=zt.drawingBufferHeight,si={tick:0,time:0,viewportWidth:Qi,viewportHeight:ji,framebufferWidth:Qi,framebufferHeight:ji,drawingBufferWidth:Qi,drawingBufferHeight:ji,pixelRatio:xt.pixelRatio},Mr={},Yr={elements:null,primitive:4,count:-1,offset:0,instances:-1},xi=ei(zt,Oi),Ii=ri(zt,mi,xt,Xi),ci=Cr(zt,Oi,Ii,mi),nn=Cu(zt,Oi,xi,mi,Ii,ci,Yr);function Xi(q){return nn.destroyBuffer(q)}var qn=Wu(zt,Vr,mi,xt),vi=of(zt,Oi,xi,function(){Ki.procs.poll()},si,mi,xt),li=Dc(zt,Oi,xi,mi,xt),mn=lf(zt,Oi,xi,vi,li,mi),Ki=Ea(zt,Vr,Oi,xi,Ii,ci,vi,mn,Mr,nn,qn,Yr,si,Mi,Ni,xt),Ui=Wl(zt,mn,Ki.procs.poll,si,Ir,Oi,xi),Bi=Ki.next,vn=zt.canvas,Un=[],na=[],Yi=[],Ln=[xt.onDestroy],ra=null;function oa(){if(Un.length===0){Mi&&Mi.update(),ra=null;return}ra=d.next(oa),Ks();for(var q=Un.length-1;q>=0;--q){var K=Un[q];K&&K(si,null,0)}zt.flush(),Mi&&Mi.update()}function wa(){!ra&&Un.length>0&&(ra=d.next(oa))}function ns(){ra&&(d.cancel(oa),ra=null)}function Ys(q){q.preventDefault(),Hr=!0,ns(),na.forEach(function(K){K()})}function Va(q){zt.getError(),Hr=!1,Br.restore(),qn.restore(),Ii.restore(),vi.restore(),li.restore(),mn.restore(),nn.restore(),Mi&&Mi.restore(),Ki.procs.refresh(),wa(),Yi.forEach(function(K){K()})}vn&&(vn.addEventListener(Fo,Ys,!1),vn.addEventListener(Uo,Va,!1));function El(){Un.length=0,ns(),vn&&(vn.removeEventListener(Fo,Ys),vn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),li.clear(),nn.clear(),vi.clear(),ci.clear(),Ii.clear(),Mi&&Mi.clear(),Ln.forEach(function(q){q()})}function zo(q){function K(It){var Bt=e({},It);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,\"stencil\"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Rt(mt){if(mt in Bt){var Pt=Bt[mt];delete Bt[mt],Object.keys(Pt).forEach(function(ht){Bt[mt+\".\"+ht]=Pt[ht]})}}return Rt(\"blend\"),Rt(\"depth\"),Rt(\"cull\"),Rt(\"stencil\"),Rt(\"polygonOffset\"),Rt(\"scissor\"),Rt(\"sample\"),\"vao\"in It&&(Bt.vao=It.vao),Bt}function de(It,Bt){var Rt={},mt={};return Object.keys(It).forEach(function(Pt){var ht=It[Pt];if(h.isDynamic(ht)){mt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var cr=0;cr<ht.length;++cr)if(h.isDynamic(ht[cr])){mt[Pt]=h.unbox(ht,Pt);return}}Rt[Pt]=ht}),{dynamic:mt,static:Rt}}var ne=de(q.context||{},!0),we=de(q.uniforms||{},!0),Ue=de(q.attributes||{},!1),ft=de(K(q),!1),Zt={gpuTime:0,cpuTime:0,count:0},hr=Ki.compile(ft,Ue,we,ne,Zt),qt=hr.draw,Ve=hr.batch,et=hr.scope,at=[];function kt(It){for(;at.length<It;)at.push(null);return at}function Ot(It,Bt){var Rt;if(typeof It==\"function\")return et.call(this,null,It,0);if(typeof Bt==\"function\")if(typeof It==\"number\")for(Rt=0;Rt<It;++Rt)et.call(this,null,Bt,Rt);else if(Array.isArray(It))for(Rt=0;Rt<It.length;++Rt)et.call(this,It[Rt],Bt,Rt);else return et.call(this,It,Bt,0);else if(typeof It==\"number\"){if(It>0)return Ve.call(this,kt(It|0),It|0)}else if(Array.isArray(It)){if(It.length)return Ve.call(this,It,It.length)}else return qt.call(this,It)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var el=mn.setFBO=zo({framebuffer:h.define.call(null,Qs,\"framebuffer\")});function ol(q,K){var de=0;Ki.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Es),\"depth\"in K&&(zt.clearDepth(+K.depth),de|=Zs),\"stencil\"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if(\"framebuffer\"in q)if(q.framebuffer&&q.framebuffer_reglType===\"framebufferCube\")for(var K=0;K<6;++K)el(e({framebuffer:q.framebuffer.faces[K]},q),ol);else el(q,ol);else ol(null,q)}function ls(q){Un.push(q);function K(){var de=vl(Un,q);function ne(){var we=vl(Un,ne);Un[we]=Un[Un.length-1],Un.length-=1,Un.length<=0&&ns()}Un[de]=ne}return wa(),{cancel:K}}function Gs(){var q=Bi.viewport,K=Bi.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ks(){si.tick+=1,si.time=sl(),Gs(),Ki.procs.poll()}function Ta(){vi.refresh(),Gs(),Ki.procs.refresh(),Mi&&Mi.update()}function sl(){return(v()-Hn)/1e3}Ta();function io(q,K){var de;switch(q){case\"frame\":return ls(K);case\"lost\":de=na;break;case\"restore\":de=Yi;break;case\"destroy\":de=Ln;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ni}function D(q){Object.entries(q).forEach(function(K){Ni[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,Qs),context:h.define.bind(null,Ml),this:h.define.bind(null,bu),draw:zo({}),buffer:function(q){return Ii.create(q,Ha,!1,!1)},elements:function(q){return ci.create(q,!1)},texture:vi.create2D,cube:vi.createCube,renderbuffer:li.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:nn.createVAO,attributes:Ir,frame:ls,on:io,limits:xi,hasExtension:function(q){return xi.extensions.indexOf(q.toLowerCase())>=0},read:Ui,destroy:El,_gl:zt,_refresh:Ta,poll:function(){Ks(),Mi&&Mi.update()},now:sl,stats:mi,getCachedCode:Y,preloadCachedCode:D});return xt.onDone(null,J),J}return Sc})});var Eqe=ye((n1r,Mqe)=>{\"use strict\";var ANt=Xm();Mqe.exports=function(t){if(t?typeof t==\"string\"&&(t={container:t}):t={},Aqe(t)?t={container:t}:SNt(t)?t={container:t}:MNt(t)?t={gl:t}:t=ANt(t,{container:\"container target element el canvas holder parent parentNode wrapper use ref root node\",gl:\"gl context webgl glContext\",attrs:\"attributes attrs contextAttributes\",pixelRatio:\"pixelRatio pxRatio px ratio pxratio pixelratio\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container==\"string\"){var r=document.querySelector(t.container);if(!r)throw Error(\"Element \"+t.container+\" is not found\");t.container=r}Aqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Sqe(),t.container.appendChild(t.canvas),Tqe(t))}else if(!t.canvas)if(typeof document!=\"undefined\")t.container=document.body||document.documentElement,t.canvas=Sqe(),t.container.appendChild(t.canvas),Tqe(t);else throw Error(\"Not DOM environment. Use headless-gl.\");return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function Tqe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function Aqe(e){return typeof e.getContext==\"function\"&&\"width\"in e&&\"height\"in e}function SNt(e){return typeof e.nodeName==\"string\"&&typeof e.appendChild==\"function\"&&typeof e.getBoundingClientRect==\"function\"}function MNt(e){return typeof e.drawArrays==\"function\"||typeof e.drawElements==\"function\"}function Sqe(){var e=document.createElement(\"canvas\");return e.style.position=\"absolute\",e.style.top=0,e.style.left=0,e}});var kqe=ye((a1r,Cqe)=>{\"use strict\";var ENt=JY(),CNt=[32,126];Cqe.exports=kNt;function kNt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement(\"canvas\"),n=e.font,i=typeof e.step==\"number\"?[e.step,e.step]:e.step||[32,32],a=e.chars||CNt;if(n&&typeof n!=\"string\"&&(n=ENt(n)),!Array.isArray(a))a=String(a).split(\"\");else if(a.length===2&&typeof a[0]==\"number\"&&typeof a[1]==\"number\"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext(\"2d\");u.fillStyle=\"#000\",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign=\"center\",u.textBaseline=\"middle\",u.fillStyle=\"#fff\";for(var c=i[0]/2,f=i[1]/2,s=0;s<a.length;s++)u.fillText(a[s],c,f),(c+=i[0])>t[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var tK=ye(Oh=>{\"use strict\";\"use restrict\";var eK=32;Oh.INT_BITS=eK;Oh.INT_MAX=2147483647;Oh.INT_MIN=-1<<eK-1;Oh.sign=function(e){return(e>0)-(e<0)};Oh.abs=function(e){var t=e>>eK-1;return(e^t)-t};Oh.min=function(e,t){return t^(e^t)&-(e<t)};Oh.max=function(e,t){return e^(e^t)&-(e<t)};Oh.isPow2=function(e){return!(e&e-1)&&!!e};Oh.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Oh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Oh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function Lqe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Oh.countTrailingZeros=Lqe;Oh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Oh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Oh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var SC=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<<i&255}})(SC);Oh.reverse=function(e){return SC[e&255]<<24|SC[e>>>8&255]<<16|SC[e>>>16&255]<<8|SC[e>>>24&255]};Oh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Oh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Oh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Oh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Oh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>Lqe(e)+1}});var Rqe=ye((s1r,Iqe)=>{\"use strict\";function Pqe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a<n;++a)i[a]=t;else for(a=0;a<n;++a)i[a]=Pqe(e,t,r+1);return i}function LNt(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function PNt(e,t){switch(typeof t==\"undefined\"&&(t=0),typeof e){case\"number\":if(e>0)return LNt(e|0,t);break;case\"object\":if(typeof e.length==\"number\")return Pqe(e,t,0);break}return[]}Iqe.exports=PNt});var Zqe=ye(mu=>{\"use strict\";var cx=tK(),Mv=Rqe(),Dqe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Mv([32,0]),UINT16:Mv([32,0]),UINT32:Mv([32,0]),BIGUINT64:Mv([32,0]),INT8:Mv([32,0]),INT16:Mv([32,0]),INT32:Mv([32,0]),BIGINT64:Mv([32,0]),FLOAT:Mv([32,0]),DOUBLE:Mv([32,0]),DATA:Mv([32,0]),UINT8C:Mv([32,0]),BUFFER:Mv([32,0])});var INt=typeof Uint8ClampedArray!=\"undefined\",RNt=typeof BigUint64Array!=\"undefined\",DNt=typeof BigInt64Array!=\"undefined\",nd=window.__TYPEDARRAY_POOL;nd.UINT8C||(nd.UINT8C=Mv([32,0]));nd.BIGUINT64||(nd.BIGUINT64=Mv([32,0]));nd.BIGINT64||(nd.BIGINT64=Mv([32,0]));nd.BUFFER||(nd.BUFFER=Mv([32,0]));var gz=nd.DATA,mz=nd.BUFFER;mu.free=function(t){if(Dqe.isBuffer(t))mz[cx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!==\"[object ArrayBuffer]\"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=cx.log2(r)|0;gz[n].push(t)}};function Fqe(e){if(e){var t=e.length||e.byteLength,r=cx.log2(t);gz[r].push(e)}}function FNt(e){Fqe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=FNt;mu.freeArrayBuffer=Fqe;mu.freeBuffer=function(t){mz[cx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r===\"arraybuffer\")return qp(t);switch(r){case\"uint8\":return rK(t);case\"uint16\":return zqe(t);case\"uint32\":return Oqe(t);case\"int8\":return qqe(t);case\"int16\":return Bqe(t);case\"int32\":return Nqe(t);case\"float\":case\"float32\":return Uqe(t);case\"double\":case\"float64\":return Vqe(t);case\"uint8_clamped\":return Gqe(t);case\"bigint64\":return jqe(t);case\"biguint64\":return Hqe(t);case\"buffer\":return Xqe(t);case\"data\":case\"dataview\":return Wqe(t);default:return null}return null};function qp(t){var t=cx.nextPow2(t),r=cx.log2(t),n=gz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=qp;function rK(e){return new Uint8Array(qp(e),0,e)}mu.mallocUint8=rK;function zqe(e){return new Uint16Array(qp(2*e),0,e)}mu.mallocUint16=zqe;function Oqe(e){return new Uint32Array(qp(4*e),0,e)}mu.mallocUint32=Oqe;function qqe(e){return new Int8Array(qp(e),0,e)}mu.mallocInt8=qqe;function Bqe(e){return new Int16Array(qp(2*e),0,e)}mu.mallocInt16=Bqe;function Nqe(e){return new Int32Array(qp(4*e),0,e)}mu.mallocInt32=Nqe;function Uqe(e){return new Float32Array(qp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=Uqe;function Vqe(e){return new Float64Array(qp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=Vqe;function Gqe(e){return INt?new Uint8ClampedArray(qp(e),0,e):rK(e)}mu.mallocUint8Clamped=Gqe;function Hqe(e){return RNt?new BigUint64Array(qp(8*e),0,e):null}mu.mallocBigUint64=Hqe;function jqe(e){return DNt?new BigInt64Array(qp(8*e),0,e):null}mu.mallocBigInt64=jqe;function Wqe(e){return new DataView(qp(e),0,e)}mu.mallocDataView=Wqe;function Xqe(e){e=cx.nextPow2(e);var t=cx.log2(e),r=mz[t];return r.length>0?r.pop():new Dqe(e)}mu.mallocBuffer=Xqe;mu.clearCache=function(){for(var t=0;t<32;++t)nd.UINT8[t].length=0,nd.UINT16[t].length=0,nd.UINT32[t].length=0,nd.INT8[t].length=0,nd.INT16[t].length=0,nd.INT32[t].length=0,nd.FLOAT[t].length=0,nd.DOUBLE[t].length=0,nd.BIGUINT64[t].length=0,nd.BIGINT64[t].length=0,nd.UINT8C[t].length=0,gz[t].length=0,mz[t].length=0}});var Kqe=ye((u1r,Yqe)=>{\"use strict\";var zNt=Object.prototype.toString;Yqe.exports=function(e){var t;return zNt.call(e)===\"[object Object]\"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var iK=ye((c1r,Jqe)=>{Jqe.exports=function(t,r){r||(r=[0,\"\"]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",r}});var eBe=ye((f1r,Qqe)=>{\"use strict\";var ONt=iK();Qqe.exports=$qe;var MC=96;function nK(e,t){var r=ONt(getComputedStyle(e).getPropertyValue(t));return r[0]*$qe(r[1],e)}function qNt(e,t){var r=document.createElement(\"div\");r.style[\"font-size\"]=\"128\"+e,t.appendChild(r);var n=nK(r,\"font-size\")/128;return t.removeChild(r),n}function $qe(e,t){switch(t=t||document.body,e=(e||\"px\").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case\"%\":return t.clientHeight/100;case\"ch\":case\"ex\":return qNt(e,t);case\"em\":return nK(t,\"font-size\");case\"rem\":return nK(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return MC;case\"cm\":return MC/2.54;case\"mm\":return MC/25.4;case\"pt\":return MC/72;case\"pc\":return MC/6}return 1}});var iBe=ye((h1r,rBe)=>{\"use strict\";rBe.exports=xz;var BNt=xz.canvas=document.createElement(\"canvas\"),yz=BNt.getContext(\"2d\"),tBe=_z([32,126]);xz.createPairs=_z;xz.ascii=tBe;function xz(e,t){Array.isArray(e)&&(e=e.join(\", \"));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]==\"number\"?n=_z(t):Array.isArray(t)?n=t:(t.o?n=_z(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=tBe),yz.font=i+\"px \"+e;for(var o=0;o<n.length;o++){var s=n[o],l=yz.measureText(s[0]).width+yz.measureText(s[1]).width,u=yz.measureText(s).width;if(Math.abs(l-u)>i*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function _z(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i<e[1];i++){var a=String.fromCharCode(i),o=n+a;t.push(o)}return t}});var sBe=ye((d1r,oBe)=>{\"use strict\";oBe.exports=fx;fx.canvas=document.createElement(\"canvas\");fx.cache={};function fx(o,t){t||(t={}),(typeof o==\"string\"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(\", \"):t.family;if(!r)throw Error(\"`family` must be defined\");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||\"\",a=t.style||t.fontStyle||\"\",o=[a,i,n].join(\" \")+\"px \"+r,s=t.origin||\"top\";if(fx.cache[r]&&n<=fx.cache[r].em)return nBe(fx.cache[r],s);var l=t.canvas||fx.canvas,u=l.getContext(\"2d\"),c={upper:t.upper!==void 0?t.upper:\"H\",lower:t.lower!==void 0?t.lower:\"x\",descent:t.descent!==void 0?t.descent:\"p\",ascent:t.ascent!==void 0?t.ascent:\"h\",tittle:t.tittle!==void 0?t.tittle:\"i\",overshoot:t.overshoot!==void 0?t.overshoot:\"O\"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h=\"H\",d={top:0};u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillStyle=\"black\",u.fillText(h,0,0);var v=Ym(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline=\"bottom\",u.fillText(h,0,f);var x=Ym(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-x+v,u.clearRect(0,0,f,f),u.textBaseline=\"alphabetic\",u.fillText(h,0,f);var b=Ym(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline=\"middle\",u.fillText(h,0,f*.5);var C=Ym(u.getImageData(0,0,f,f));d.median=d.middle=f-C-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline=\"hanging\",u.fillText(h,0,f*.5);var E=Ym(u.getImageData(0,0,f,f));d.hanging=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline=\"ideographic\",u.fillText(h,0,f);var A=Ym(u.getImageData(0,0,f,f));if(d.ideographic=f-A-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.upper,0,0),d.upper=Ym(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.lower,0,0),d.lower=Ym(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.tittle,0,0),d.tittle=Ym(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.ascent,0,0),d.ascent=Ym(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.descent,0,0),d.descent=aBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.overshoot,0,0);var L=aBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var _ in d)d[_]/=n;return d.em=n,fx.cache[r]=d,nBe(d,s)}function nBe(e,t){var r={};typeof t==\"string\"&&(t=e[t]);for(var n in e)n!==\"em\"&&(r[n]=e[n]-t);return r}function Ym(e){for(var t=e.height,r=e.data,n=3;n<r.length;n+=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}function aBe(e){for(var t=e.height,r=e.data,n=r.length-1;n>0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var fBe=ye((v1r,cBe)=>{\"use strict\";var h5=bqe(),NNt=Xm(),UNt=wqe(),VNt=Eqe(),GNt=OY(),aK=J_(),HNt=kqe(),hx=Zqe(),jNt=e5(),WNt=Kqe(),XNt=iK(),ZNt=eBe(),YNt=iBe(),KNt=Fh(),JNt=sBe(),$Nt=W2(),QNt=tK(),lBe=QNt.nextPow2,uBe=new GNt,wz=!1;document.body&&(bz=document.body.appendChild(document.createElement(\"div\")),bz.style.font=\"italic small-caps bold condensed 16px/2 cursive\",getComputedStyle(bz).fontStretch&&(wz=!0),document.body.removeChild(bz));var bz,xc=function(t){eUt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=VNt(t),this.shader=uBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||UNt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:\"uint8\",usage:\"stream\"}),this.sizeBuffer=this.regl.buffer({type:\"float\",usage:\"stream\"}),this.shader||(this.shader=this.createShader(),uBe.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(WNt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(\"count\"),offset:t.prop(\"offset\"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(\"sizeBuffer\")},width:{offset:0,stride:8,buffer:t.this(\"sizeBuffer\")},char:t.this(\"charBuffer\"),position:t.this(\"position\")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop(\"color\"),opacity:t.prop(\"opacity\"),viewport:t.this(\"viewportArray\"),scale:t.this(\"scale\"),align:t.prop(\"align\"),baseline:t.prop(\"baseline\"),translate:t.this(\"translate\"),positionOffset:t.prop(\"positionOffset\")},primitive:\"points\",viewport:t.this(\"viewport\"),vert:`\n",
       "\t\t\tprecision highp float;\n",
       "\t\t\tattribute float width, charOffset, char;\n",
       "\t\t\tattribute vec2 position;\n",
       "\t\t\tuniform float fontSize, charStep, em, align, baseline;\n",
       "\t\t\tuniform vec4 viewport;\n",
       "\t\t\tuniform vec4 color;\n",
       "\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n",
       "\t\t\tvarying vec2 charCoord, charId;\n",
       "\t\t\tvarying float charWidth;\n",
       "\t\t\tvarying vec4 fontColor;\n",
       "\t\t\tvoid main () {\n",
       "\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n",
       "\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n",
       "\t\t\t\t\t/ (viewport.zw * scale.xy);\n",
       "\n",
       "\t\t\t\tvec2 position = (position + translate) * scale;\n",
       "\t\t\t\tposition += offset * scale;\n",
       "\n",
       "\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n",
       "\n",
       "\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n",
       "\n",
       "\t\t\t\tgl_PointSize = charStep;\n",
       "\n",
       "\t\t\t\tcharId.x = mod(char, atlasDim.x);\n",
       "\t\t\t\tcharId.y = floor(char / atlasDim.x);\n",
       "\n",
       "\t\t\t\tcharWidth = width * em;\n",
       "\n",
       "\t\t\t\tfontColor = color / 255.;\n",
       "\t\t\t}`,frag:`\n",
       "\t\t\tprecision highp float;\n",
       "\t\t\tuniform float fontSize, charStep, opacity;\n",
       "\t\t\tuniform vec2 atlasSize;\n",
       "\t\t\tuniform vec4 viewport;\n",
       "\t\t\tuniform sampler2D atlas;\n",
       "\t\t\tvarying vec4 fontColor;\n",
       "\t\t\tvarying vec2 charCoord, charId;\n",
       "\t\t\tvarying float charWidth;\n",
       "\n",
       "\t\t\tfloat lightness(vec4 color) {\n",
       "\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n",
       "\t\t\t}\n",
       "\n",
       "\t\t\tvoid main () {\n",
       "\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n",
       "\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n",
       "\n",
       "\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n",
       "\t\t\t\tuv.y = charStep - uv.y;\n",
       "\n",
       "\t\t\t\t// ignore points outside of character bounding box\n",
       "\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n",
       "\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n",
       "\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n",
       "\n",
       "\t\t\t\tuv += charId * charStep;\n",
       "\t\t\t\tuv = uv / atlasSize;\n",
       "\n",
       "\t\t\t\tvec4 color = fontColor;\n",
       "\t\t\t\tvec4 mask = texture2D(atlas, uv);\n",
       "\n",
       "\t\t\t\tfloat maskY = lightness(mask);\n",
       "\t\t\t\t// float colorY = lightness(color);\n",
       "\t\t\t\tcolor.a *= maskY;\n",
       "\t\t\t\tcolor.a *= opacity;\n",
       "\n",
       "\t\t\t\t// color.a += .1;\n",
       "\n",
       "\t\t\t\t// antialiasing, see yiq color space y-channel formula\n",
       "\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n",
       "\n",
       "\t\t\t\tgl_FragColor = color;\n",
       "\t\t\t}`}),n={};return{regl:t,draw:r,atlas:n}};xc.prototype.update=function(t){var r=this;if(typeof t==\"string\")t={text:t};else if(!t)return;t=NNt(t,{position:\"position positions coord coords coordinates\",font:\"font fontFace fontface typeface cssFont css-font family fontFamily\",fontSize:\"fontSize fontsize size font-size\",text:\"text texts chars characters value values symbols\",align:\"align alignment textAlign textbaseline\",baseline:\"baseline textBaseline textbaseline\",direction:\"dir direction textDirection\",color:\"color colour fill fill-color fillColor textColor textcolor\",kerning:\"kerning kern\",range:\"range dataBox\",viewport:\"vp viewport viewBox viewbox viewPort\",opacity:\"opacity alpha transparency visible visibility opaque\",offset:\"offset positionOffset padding shift indent indentation\"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(ke){return parseFloat(ke)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=jNt(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset==\"number\"&&(t.offset=[t.offset,0]),this.positionOffset=$Nt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=xc.baseFontSize+\"px sans-serif\");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(ke,me){if(typeof ke==\"string\")try{ke=h5.parse(ke)}catch(Ze){ke=h5.parse(xc.baseFontSize+\"px \"+ke)}else{var ie=ke.style,Se=ke.weight,Le=ke.stretch,Ae=ke.variant;ke=h5.parse(h5.stringify(ke)),ie&&(ke.style=ie),Se&&(ke.weight=Se),Le&&(ke.stretch=Le),Ae&&(ke.variant=Ae)}var De=h5.stringify({size:xc.baseFontSize,family:ke.family,stretch:wz?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style}),Pe=XNt(ke.size),ge=Math.round(Pe[0]*ZNt(Pe[1]));if(ge!==r.fontSize[me]&&(i=!0,r.fontSize[me]=ge),(!r.font[me]||De!=r.font[me].baseString)&&(n=!0,r.font[me]=xc.fonts[De],!r.font[me])){var Fe=ke.family.join(\", \"),ce=[ke.style];ke.style!=ke.variant&&ce.push(ke.variant),ke.variant!=ke.weight&&ce.push(ke.weight),wz&&ke.weight!=ke.stretch&&ce.push(ke.stretch),r.font[me]={baseString:De,family:Fe,weight:ke.weight,stretch:ke.stretch,style:ke.style,variant:ke.variant,width:{},kerning:{},metrics:JNt(Fe,{origin:\"top\",fontSize:xc.baseFontSize,fontStyle:ce.join(\" \")})},xc.fonts[De]=r.font[me]}}),(n||i)&&this.font.forEach(function(ke,me){var ie=h5.stringify({size:r.fontSize[me],family:ke.family,stretch:wz?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style});if(r.fontAtlas[me]=r.shader.atlas[ie],!r.fontAtlas[me]){var Se=ke.metrics;r.shader.atlas[ie]=r.fontAtlas[me]={fontString:ie,step:Math.ceil(r.fontSize[me]*Se.bottom*.5)*2,em:r.fontSize[me],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text==\"string\"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o<a.length;o++)a[o]=t.text;t.text=a}var s;if(t.text!=null||n){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var l=1;l<t.text.length;l++)this.textOffsets[l]=this.textOffsets[l-1]+t.text[l-1].length,this.count+=t.text[l].length,this.counts.push(t.text[l].length);this.text=t.text.join(\"\")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];s=[],this.font.forEach(function(ke,me){xc.atlasContext.font=ke.baseString;for(var ie=r.fontAtlas[me],Se=0;Se<r.text.length;Se++){var Le=r.text.charAt(Se);if(ie.ids[Le]==null&&(ie.ids[Le]=ie.chars.length,ie.chars.push(Le),s.push(Le)),ke.width[Le]==null&&(ke.width[Le]=xc.atlasContext.measureText(Le).width/xc.baseFontSize,r.kerning)){var Ae=[];for(var De in ke.width)Ae.push(De+Le,Le+De);KNt(ke.kerning,YNt(ke.family,{pairs:Ae}))}}})}if(t.position)if(t.position.length>2){for(var u=!t.position[0].length,c=hx.mallocFloat(this.count*2),f=0,h=0;f<this.counts.length;f++){var d=this.counts[f];if(u)for(var v=0;v<d;v++)c[h++]=t.position[f*2],c[h++]=t.position[f*2+1];else for(var x=0;x<d;x++)c[h++]=t.position[f][0],c[h++]=t.position[f][1]}this.position.call?this.position({type:\"float\",data:c}):this.position=this.regl.buffer({type:\"float\",data:c}),hx.freeFloat(c)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||n){var b=hx.mallocUint8(this.count),p=hx.mallocFloat(this.count*2);this.textWidth=[];for(var C=0,E=0;C<this.counts.length;C++){for(var A=this.counts[C],L=this.font[C]||this.font[0],_=this.fontAtlas[C]||this.fontAtlas[0],k=0;k<A;k++){var M=this.text.charAt(E),g=this.text.charAt(E-1);if(b[E]=_.ids[M],p[E*2]=L.width[M],k){var P=p[E*2-2],T=p[E*2],z=p[E*2-1],O=z+P*.5+T*.5;if(this.kerning){var V=L.kerning[g+M];V&&(O+=V*.001)}p[E*2+1]=O}else p[E*2+1]=p[E*2]*.5;E++}this.textWidth.push(p.length?p[E*2-2]*.5+p[E*2-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:b,type:\"uint8\",usage:\"stream\"}),this.sizeBuffer({data:p,type:\"float\",usage:\"stream\"}),hx.freeUint8(b),hx.freeFloat(p),s.length&&this.font.forEach(function(ke,me){var ie=r.fontAtlas[me],Se=ie.step,Le=Math.floor(xc.maxAtlasSize/Se),Ae=Math.min(Le,ie.chars.length),De=Math.ceil(ie.chars.length/Ae),Pe=lBe(Ae*Se),ge=lBe(De*Se);ie.width=Pe,ie.height=ge,ie.rows=De,ie.cols=Ae,ie.em&&ie.texture({data:HNt({canvas:xc.atlasCanvas,font:ie.fontString,chars:ie.chars,shape:[Pe,ge],step:[Se,Se]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(ke,me){var ie=Array.isArray(r.align)?r.align.length>1?r.align[me]:r.align[0]:r.align;if(typeof ie==\"number\")return ie;switch(ie){case\"right\":case\"end\":return-ke;case\"center\":case\"centre\":case\"middle\":return-ke*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ke,me){var ie=(r.font[me]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof ke==\"number\"?Se+=ke-ie.baseline:Se+=-ie[ke],Se*=-1,Se})),t.color!=null)if(t.color||(t.color=\"transparent\"),typeof t.color==\"string\"||!isNaN(t.color))this.color=aK(t.color,\"uint8\");else{var G;if(typeof t.color[0]==\"number\"&&t.color.length>this.counts.length){var Z=t.color.length;G=hx.mallocUint8(Z);for(var H=(t.color.subarray||t.color.slice).bind(t.color),N=0;N<Z;N+=4)G.set(aK(H(N,N+4),\"uint8\"),N)}else{var j=t.color.length;G=hx.mallocUint8(j*4);for(var re=0;re<j;re++)G.set(aK(t.color[re]||0,\"uint8\"),re*4)}this.color=G}if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity){var oe=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var Me=0;Me<this.batch.length;Me++)this.batch[Me]={count:this.counts.length>1?this.counts[Me]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Me]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Me*4,Me*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Me]:this.opacity,baseline:this.baselineOffset[Me]!=null?this.baselineOffset[Me]:this.baselineOffset[0],align:this.align?this.alignOffset[Me]!=null?this.alignOffset[Me]:this.alignOffset[0]:0,atlas:this.fontAtlas[Me]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Me*2,Me*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text=\"\";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement(\"canvas\");xc.atlasContext=xc.atlasCanvas.getContext(\"2d\",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function eUt(e){return typeof e==\"function\"&&e._gl&&e.prop&&e.texture&&e.buffer}cBe.exports=xc});var hBe=ye((oK,sK)=>{(function(e,t){typeof oK==\"object\"&&typeof sK!=\"undefined\"?sK.exports=t():e.createREGL=t()})(oK,function(){\"use strict\";var e=function(Ee,xt){for(var zt=Object.keys(xt),Ir=0;Ir<zt.length;++Ir)Ee[zt[Ir]]=xt[zt[Ir]];return Ee},t=0,r=0,n=5,i=6;function a(Ee,xt){this.id=t++,this.type=Ee,this.data=xt}function o(Ee){return Ee.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')}function s(Ee){if(Ee.length===0)return[];var xt=Ee.charAt(0),zt=Ee.charAt(Ee.length-1);if(Ee.length>1&&xt===zt&&(xt==='\"'||xt===\"'\"))return['\"'+o(Ee.substr(1,Ee.length-2))+'\"'];var Ir=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(Ee);if(Ir)return s(Ee.substr(0,Ir.index)).concat(s(Ir[1])).concat(s(Ee.substr(Ir.index+Ir[0].length)));var Hr=Ee.split(\".\");if(Hr.length===1)return['\"'+o(Ee)+'\"'];for(var Br=[],Vr=0;Vr<Hr.length;++Vr)Br=Br.concat(s(Hr[Vr]));return Br}function l(Ee){return\"[\"+s(Ee).join(\"][\")+\"]\"}function u(Ee,xt){return new a(Ee,l(xt+\"\"))}function c(Ee){return typeof Ee==\"function\"&&!Ee._reglType||Ee instanceof a}function f(Ee,xt){if(typeof Ee==\"function\")return new a(r,Ee);if(typeof Ee==\"number\"||typeof Ee==\"boolean\")return new a(n,Ee);if(Array.isArray(Ee))return new a(i,Ee.map(function(zt,Ir){return f(zt,xt+\"[\"+Ir+\"]\")}));if(Ee instanceof a)return Ee}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame==\"function\"?function(Ee){return requestAnimationFrame(Ee)}:function(Ee){return setTimeout(Ee,16)},cancel:typeof cancelAnimationFrame==\"function\"?function(Ee){return cancelAnimationFrame(Ee)}:clearTimeout},v=typeof performance!=\"undefined\"&&performance.now?function(){return performance.now()}:function(){return+new Date};function x(){var Ee={\"\":0},xt=[\"\"];return{id:function(zt){var Ir=Ee[zt];return Ir||(Ir=Ee[zt]=xt.length,xt.push(zt),Ir)},str:function(zt){return xt[zt]}}}function b(Ee,xt,zt){var Ir=document.createElement(\"canvas\");e(Ir.style,{border:0,margin:0,padding:0,top:0,left:0,width:\"100%\",height:\"100%\"}),Ee.appendChild(Ir),Ee===document.body&&(Ir.style.position=\"absolute\",e(Ee.style,{margin:0,padding:0}));function Hr(){var mi=window.innerWidth,Ni=window.innerHeight;if(Ee!==document.body){var Oi=Ir.getBoundingClientRect();mi=Oi.right-Oi.left,Ni=Oi.bottom-Oi.top}Ir.width=zt*mi,Ir.height=zt*Ni}var Br;Ee!==document.body&&typeof ResizeObserver==\"function\"?(Br=new ResizeObserver(function(){setTimeout(Hr)}),Br.observe(Ee)):window.addEventListener(\"resize\",Hr,!1);function Vr(){Br?Br.disconnect():window.removeEventListener(\"resize\",Hr),Ee.removeChild(Ir)}return Hr(),{canvas:Ir,onDestroy:Vr}}function p(Ee,xt){function zt(Ir){try{return Ee.getContext(Ir,xt)}catch(Hr){return null}}return zt(\"webgl\")||zt(\"experimental-webgl\")||zt(\"webgl-experimental\")}function C(Ee){return typeof Ee.nodeName==\"string\"&&typeof Ee.appendChild==\"function\"&&typeof Ee.getBoundingClientRect==\"function\"}function E(Ee){return typeof Ee.drawArrays==\"function\"||typeof Ee.drawElements==\"function\"}function A(Ee){return typeof Ee==\"string\"?Ee.split():Ee}function L(Ee){return typeof Ee==\"string\"?document.querySelector(Ee):Ee}function _(Ee){var xt=Ee||{},zt,Ir,Hr,Br,Vr={},mi=[],Ni=[],Oi=typeof window==\"undefined\"?1:window.devicePixelRatio,Mi=!1,Hn={},Qi=function(Mr){},ji=function(){};if(typeof xt==\"string\"?zt=document.querySelector(xt):typeof xt==\"object\"&&(C(xt)?zt=xt:E(xt)?(Br=xt,Hr=Br.canvas):(\"gl\"in xt?Br=xt.gl:\"canvas\"in xt?Hr=L(xt.canvas):\"container\"in xt&&(Ir=L(xt.container)),\"attributes\"in xt&&(Vr=xt.attributes),\"extensions\"in xt&&(mi=A(xt.extensions)),\"optionalExtensions\"in xt&&(Ni=A(xt.optionalExtensions)),\"onDone\"in xt&&(Qi=xt.onDone),\"profile\"in xt&&(Mi=!!xt.profile),\"pixelRatio\"in xt&&(Oi=+xt.pixelRatio),\"cachedCode\"in xt&&(Hn=xt.cachedCode))),zt&&(zt.nodeName.toLowerCase()===\"canvas\"?Hr=zt:Ir=zt),!Br){if(!Hr){var si=b(Ir||document.body,Qi,Oi);if(!si)return null;Hr=si.canvas,ji=si.onDestroy}Vr.premultipliedAlpha===void 0&&(Vr.premultipliedAlpha=!0),Br=p(Hr,Vr)}return Br?{gl:Br,canvas:Hr,container:Ir,extensions:mi,optionalExtensions:Ni,pixelRatio:Oi,profile:Mi,cachedCode:Hn,onDone:Qi,onDestroy:ji}:(ji(),Qi(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function k(Ee,xt){var zt={};function Ir(Vr){var mi=Vr.toLowerCase(),Ni;try{Ni=zt[mi]=Ee.getExtension(mi)}catch(Oi){}return!!Ni}for(var Hr=0;Hr<xt.extensions.length;++Hr){var Br=xt.extensions[Hr];if(!Ir(Br))return xt.onDestroy(),xt.onDone('\"'+Br+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return xt.optionalExtensions.forEach(Ir),{extensions:zt,restore:function(){Object.keys(zt).forEach(function(Vr){if(zt[Vr]&&!Ir(Vr))throw new Error(\"(regl): error restoring extension \"+Vr)})}}}function M(Ee,xt){for(var zt=Array(Ee),Ir=0;Ir<Ee;++Ir)zt[Ir]=xt(Ir);return zt}var g=5120,P=5121,T=5122,z=5123,O=5124,V=5125,G=5126;function Z(Ee){for(var xt=16;xt<=1<<28;xt*=16)if(Ee<=xt)return xt;return 0}function H(Ee){var xt,zt;return xt=(Ee>65535)<<4,Ee>>>=xt,zt=(Ee>255)<<3,Ee>>>=zt,xt|=zt,zt=(Ee>15)<<2,Ee>>>=zt,xt|=zt,zt=(Ee>3)<<1,Ee>>>=zt,xt|=zt,xt|Ee>>1}function N(){var Ee=M(8,function(){return[]});function xt(Br){var Vr=Z(Br),mi=Ee[H(Vr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Vr)}function zt(Br){Ee[H(Br.byteLength)>>2].push(Br)}function Ir(Br,Vr){var mi=null;switch(Br){case g:mi=new Int8Array(xt(Vr),0,Vr);break;case P:mi=new Uint8Array(xt(Vr),0,Vr);break;case T:mi=new Int16Array(xt(2*Vr),0,Vr);break;case z:mi=new Uint16Array(xt(2*Vr),0,Vr);break;case O:mi=new Int32Array(xt(4*Vr),0,Vr);break;case V:mi=new Uint32Array(xt(4*Vr),0,Vr);break;case G:mi=new Float32Array(xt(4*Vr),0,Vr);break;default:return null}return mi.length!==Vr?mi.subarray(0,Vr):mi}function Hr(Br){zt(Br.buffer)}return{alloc:xt,free:zt,allocType:Ir,freeType:Hr}}var j=N();j.zero=N();var re=3408,oe=3410,_e=3411,Me=3412,ke=3413,me=3414,ie=3415,Se=33901,Le=33902,Ae=3379,De=3386,Pe=34921,ge=36347,Fe=36348,ce=35661,Ze=35660,ct=34930,pt=36349,Wt=34076,st=34024,lt=7936,Gt=7937,Nt=7938,$t=35724,sr=34047,wr=36063,ur=34852,Qe=3553,Et=34067,er=34069,Ut=33984,Ft=6408,bt=5126,yt=5121,Yt=36160,lr=36053,Tr=36064,Rr=16384,ei=function(Ee,xt){var zt=1;xt.ext_texture_filter_anisotropic&&(zt=Ee.getParameter(sr));var Ir=1,Hr=1;xt.webgl_draw_buffers&&(Ir=Ee.getParameter(ur),Hr=Ee.getParameter(wr));var Br=!!xt.oes_texture_float;if(Br){var Vr=Ee.createTexture();Ee.bindTexture(Qe,Vr),Ee.texImage2D(Qe,0,Ft,1,1,0,Ft,bt,null);var mi=Ee.createFramebuffer();if(Ee.bindFramebuffer(Yt,mi),Ee.framebufferTexture2D(Yt,Tr,Qe,Vr,0),Ee.bindTexture(Qe,null),Ee.checkFramebufferStatus(Yt)!==lr)Br=!1;else{Ee.viewport(0,0,1,1),Ee.clearColor(1,0,0,1),Ee.clear(Rr);var Ni=j.allocType(bt,4);Ee.readPixels(0,0,1,1,Ft,bt,Ni),Ee.getError()?Br=!1:(Ee.deleteFramebuffer(mi),Ee.deleteTexture(Vr),Br=Ni[0]===1),j.freeType(Ni)}}var Oi=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Mi=!0;if(!Oi){var Hn=Ee.createTexture(),Qi=j.allocType(yt,36);Ee.activeTexture(Ut),Ee.bindTexture(Et,Hn),Ee.texImage2D(er,0,Ft,3,3,0,Ft,yt,Qi),j.freeType(Qi),Ee.bindTexture(Et,null),Ee.deleteTexture(Hn),Mi=!Ee.getError()}return{colorBits:[Ee.getParameter(oe),Ee.getParameter(_e),Ee.getParameter(Me),Ee.getParameter(ke)],depthBits:Ee.getParameter(me),stencilBits:Ee.getParameter(ie),subpixelBits:Ee.getParameter(re),extensions:Object.keys(xt).filter(function(ji){return!!xt[ji]}),maxAnisotropic:zt,maxDrawbuffers:Ir,maxColorAttachments:Hr,pointSizeDims:Ee.getParameter(Se),lineWidthDims:Ee.getParameter(Le),maxViewportDims:Ee.getParameter(De),maxCombinedTextureUnits:Ee.getParameter(ce),maxCubeMapSize:Ee.getParameter(Wt),maxRenderbufferSize:Ee.getParameter(st),maxTextureUnits:Ee.getParameter(ct),maxTextureSize:Ee.getParameter(Ae),maxAttributes:Ee.getParameter(Pe),maxVertexUniforms:Ee.getParameter(ge),maxVertexTextureUnits:Ee.getParameter(Ze),maxVaryingVectors:Ee.getParameter(Fe),maxFragmentUniforms:Ee.getParameter(pt),glsl:Ee.getParameter($t),renderer:Ee.getParameter(Gt),vendor:Ee.getParameter(lt),version:Ee.getParameter(Nt),readFloat:Br,npotTextureCube:Mi}},Wr=function(Ee){return Ee instanceof Uint8Array||Ee instanceof Uint16Array||Ee instanceof Uint32Array||Ee instanceof Int8Array||Ee instanceof Int16Array||Ee instanceof Int32Array||Ee instanceof Float32Array||Ee instanceof Float64Array||Ee instanceof Uint8ClampedArray};function Ur(Ee){return!!Ee&&typeof Ee==\"object\"&&Array.isArray(Ee.shape)&&Array.isArray(Ee.stride)&&typeof Ee.offset==\"number\"&&Ee.shape.length===Ee.stride.length&&(Array.isArray(Ee.data)||Wr(Ee.data))}var dt=function(Ee){return Object.keys(Ee).map(function(xt){return Ee[xt]})},Ge={shape:xe,flatten:Ie};function Je(Ee,xt,zt){for(var Ir=0;Ir<xt;++Ir)zt[Ir]=Ee[Ir]}function je(Ee,xt,zt,Ir){for(var Hr=0,Br=0;Br<xt;++Br)for(var Vr=Ee[Br],mi=0;mi<zt;++mi)Ir[Hr++]=Vr[mi]}function $e(Ee,xt,zt,Ir,Hr,Br){for(var Vr=Br,mi=0;mi<xt;++mi)for(var Ni=Ee[mi],Oi=0;Oi<zt;++Oi)for(var Mi=Ni[Oi],Hn=0;Hn<Ir;++Hn)Hr[Vr++]=Mi[Hn]}function wt(Ee,xt,zt,Ir,Hr){for(var Br=1,Vr=zt+1;Vr<xt.length;++Vr)Br*=xt[Vr];var mi=xt[zt];if(xt.length-zt===4){var Ni=xt[zt+1],Oi=xt[zt+2],Mi=xt[zt+3];for(Vr=0;Vr<mi;++Vr)$e(Ee[Vr],Ni,Oi,Mi,Ir,Hr),Hr+=Br}else for(Vr=0;Vr<mi;++Vr)wt(Ee[Vr],xt,zt+1,Ir,Hr),Hr+=Br}function Ie(Ee,xt,zt,Ir){var Hr=1;if(xt.length)for(var Br=0;Br<xt.length;++Br)Hr*=xt[Br];else Hr=0;var Vr=Ir||j.allocType(zt,Hr);switch(xt.length){case 0:break;case 1:Je(Ee,xt[0],Vr);break;case 2:je(Ee,xt[0],xt[1],Vr);break;case 3:$e(Ee,xt[0],xt[1],xt[2],Vr,0);break;default:wt(Ee,xt,0,Vr,0)}return Vr}function xe(Ee){for(var xt=[],zt=Ee;zt.length;zt=zt[0])xt.push(zt.length);return xt}var Ce={\"[object Int8Array]\":5120,\"[object Int16Array]\":5122,\"[object Int32Array]\":5124,\"[object Uint8Array]\":5121,\"[object Uint8ClampedArray]\":5121,\"[object Uint16Array]\":5123,\"[object Uint32Array]\":5125,\"[object Float32Array]\":5126,\"[object Float64Array]\":5121,\"[object ArrayBuffer]\":5121},vt=5120,nr=5122,ir=5124,pr=5121,oi=5123,di=5125,Jr=5126,fi=5126,Hi={int8:vt,int16:nr,int32:ir,uint8:pr,uint16:oi,uint32:di,float:Jr,float32:fi},Pn=35048,wn=35040,pn={dynamic:Pn,stream:wn,static:35044},Vn=Ge.flatten,kn=Ge.shape,ea=35044,ua=35040,Vt=5121,_t=5126,tr=[];tr[5120]=1,tr[5122]=2,tr[5124]=4,tr[5121]=1,tr[5123]=2,tr[5125]=4,tr[5126]=4;function ar(Ee){return Ce[Object.prototype.toString.call(Ee)]|0}function Er(Ee,xt){for(var zt=0;zt<xt.length;++zt)Ee[zt]=xt[zt]}function Zr(Ee,xt,zt,Ir,Hr,Br,Vr){for(var mi=0,Ni=0;Ni<zt;++Ni)for(var Oi=0;Oi<Ir;++Oi)Ee[mi++]=xt[Hr*Ni+Br*Oi+Vr]}function ri(Ee,xt,zt,Ir){var Hr=0,Br={};function Vr(Mr){this.id=Hr++,this.buffer=Ee.createBuffer(),this.type=Mr,this.usage=ea,this.byteLength=0,this.dimension=1,this.dtype=Vt,this.persistentData=null,zt.profile&&(this.stats={size:0})}Vr.prototype.bind=function(){Ee.bindBuffer(this.type,this.buffer)},Vr.prototype.destroy=function(){Qi(this)};var mi=[];function Ni(Mr,Yr){var xi=mi.pop();return xi||(xi=new Vr(Mr)),xi.bind(),Hn(xi,Yr,ua,0,1,!1),xi}function Oi(Mr){mi.push(Mr)}function Mi(Mr,Yr,xi){Mr.byteLength=Yr.byteLength,Ee.bufferData(Mr.type,Yr,xi)}function Hn(Mr,Yr,xi,Ii,ci,nn){var Xi;if(Mr.usage=xi,Array.isArray(Yr)){if(Mr.dtype=Ii||_t,Yr.length>0){var qn;if(Array.isArray(Yr[0])){Xi=kn(Yr);for(var vi=1,li=1;li<Xi.length;++li)vi*=Xi[li];Mr.dimension=vi,qn=Vn(Yr,Xi,Mr.dtype),Mi(Mr,qn,xi),nn?Mr.persistentData=qn:j.freeType(qn)}else if(typeof Yr[0]==\"number\"){Mr.dimension=ci;var mn=j.allocType(Mr.dtype,Yr.length);Er(mn,Yr),Mi(Mr,mn,xi),nn?Mr.persistentData=mn:j.freeType(mn)}else Wr(Yr[0])&&(Mr.dimension=Yr[0].length,Mr.dtype=Ii||ar(Yr[0])||_t,qn=Vn(Yr,[Yr.length,Yr[0].length],Mr.dtype),Mi(Mr,qn,xi),nn?Mr.persistentData=qn:j.freeType(qn))}}else if(Wr(Yr))Mr.dtype=Ii||ar(Yr),Mr.dimension=ci,Mi(Mr,Yr,xi),nn&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr.buffer)));else if(Ur(Yr)){Xi=Yr.shape;var Ki=Yr.stride,Ui=Yr.offset,Bi=0,vn=0,Un=0,na=0;Xi.length===1?(Bi=Xi[0],vn=1,Un=Ki[0],na=0):Xi.length===2&&(Bi=Xi[0],vn=Xi[1],Un=Ki[0],na=Ki[1]),Mr.dtype=Ii||ar(Yr.data)||_t,Mr.dimension=vn;var Yi=j.allocType(Mr.dtype,Bi*vn);Zr(Yi,Yr.data,Bi,vn,Un,na,Ui),Mi(Mr,Yi,xi),nn?Mr.persistentData=Yi:j.freeType(Yi)}else Yr instanceof ArrayBuffer&&(Mr.dtype=Vt,Mr.dimension=ci,Mi(Mr,Yr,xi),nn&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr))))}function Qi(Mr){xt.bufferCount--,Ir(Mr);var Yr=Mr.buffer;Ee.deleteBuffer(Yr),Mr.buffer=null,delete Br[Mr.id]}function ji(Mr,Yr,xi,Ii){xt.bufferCount++;var ci=new Vr(Yr);Br[ci.id]=ci;function nn(vi){var li=ea,mn=null,Ki=0,Ui=0,Bi=1;return Array.isArray(vi)||Wr(vi)||Ur(vi)||vi instanceof ArrayBuffer?mn=vi:typeof vi==\"number\"?Ki=vi|0:vi&&(\"data\"in vi&&(mn=vi.data),\"usage\"in vi&&(li=pn[vi.usage]),\"type\"in vi&&(Ui=Hi[vi.type]),\"dimension\"in vi&&(Bi=vi.dimension|0),\"length\"in vi&&(Ki=vi.length|0)),ci.bind(),mn?Hn(ci,mn,li,Ui,Bi,Ii):(Ki&&Ee.bufferData(ci.type,Ki,li),ci.dtype=Ui||Vt,ci.usage=li,ci.dimension=Bi,ci.byteLength=Ki),zt.profile&&(ci.stats.size=ci.byteLength*tr[ci.dtype]),nn}function Xi(vi,li){Ee.bufferSubData(ci.type,li,vi)}function qn(vi,li){var mn=(li||0)|0,Ki;if(ci.bind(),Wr(vi)||vi instanceof ArrayBuffer)Xi(vi,mn);else if(Array.isArray(vi)){if(vi.length>0){if(typeof vi[0]==\"number\"){var Ui=j.allocType(ci.dtype,vi.length);Er(Ui,vi),Xi(Ui,mn),j.freeType(Ui)}else if(Array.isArray(vi[0])||Wr(vi[0])){Ki=kn(vi);var Bi=Vn(vi,Ki,ci.dtype);Xi(Bi,mn),j.freeType(Bi)}}}else if(Ur(vi)){Ki=vi.shape;var vn=vi.stride,Un=0,na=0,Yi=0,Ln=0;Ki.length===1?(Un=Ki[0],na=1,Yi=vn[0],Ln=0):Ki.length===2&&(Un=Ki[0],na=Ki[1],Yi=vn[0],Ln=vn[1]);var ra=Array.isArray(vi.data)?ci.dtype:ar(vi.data),oa=j.allocType(ra,Un*na);Zr(oa,vi.data,Un,na,Yi,Ln,vi.offset),Xi(oa,mn),j.freeType(oa)}return nn}return xi||nn(Mr),nn._reglType=\"buffer\",nn._buffer=ci,nn.subdata=qn,zt.profile&&(nn.stats=ci.stats),nn.destroy=function(){Qi(ci)},nn}function si(){dt(Br).forEach(function(Mr){Mr.buffer=Ee.createBuffer(),Ee.bindBuffer(Mr.type,Mr.buffer),Ee.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(xt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Br).forEach(function(Yr){Mr+=Br[Yr].stats.size}),Mr}),{create:ji,createStream:Ni,destroyStream:Oi,clear:function(){dt(Br).forEach(Qi),mi.forEach(Qi)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Vr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var $r=0,zi=0,Ji=1,en=1,cn=4,yn=4,Mn={points:$r,point:zi,lines:Ji,line:en,triangles:cn,triangle:yn,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},Ba=0,la=1,ma=4,Wa=5120,Fa=5121,Wo=5122,da=5123,Wn=5124,Ga=5125,vo=34963,jn=35040,St=35044;function Cr(Ee,xt,zt,Ir){var Hr={},Br=0,Vr={uint8:Fa,uint16:da};xt.oes_element_index_uint&&(Vr.uint32=Ga);function mi(si){this.id=Br++,Hr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function Oi(si){var Mr=Ni.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Mi(si){Ni.push(si)}function Hn(si,Mr,Yr,xi,Ii,ci,nn){si.buffer.bind();var Xi;if(Mr){var qn=nn;!nn&&(!Wr(Mr)||Ur(Mr)&&!Wr(Mr.data))&&(qn=xt.oes_element_index_uint?Ga:da),zt._initBuffer(si.buffer,Mr,Yr,qn,3)}else Ee.bufferData(vo,ci,Yr),si.buffer.dtype=Xi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Xi=nn,!nn){switch(si.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Wo:Xi=da;break;case Ga:case Wn:Xi=Ga;break;default:}si.buffer.dtype=Xi}si.type=Xi;var vi=Ii;vi<0&&(vi=si.buffer.byteLength,Xi===da?vi>>=1:Xi===Ga&&(vi>>=2)),si.vertCount=vi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=la),mn===3&&(li=ma)}si.primType=li}function Qi(si){Ir.elementsCount--,delete Hr[si.id],si.buffer.destroy(),si.buffer=null}function ji(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Ir.elementsCount++;function Ii(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci==\"number\")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var nn=null,Xi=St,qn=-1,vi=-1,li=0,mn=0;Array.isArray(ci)||Wr(ci)||Ur(ci)?nn=ci:(\"data\"in ci&&(nn=ci.data),\"usage\"in ci&&(Xi=pn[ci.usage]),\"primitive\"in ci&&(qn=Mn[ci.primitive]),\"count\"in ci&&(vi=ci.count|0),\"type\"in ci&&(mn=Vr[ci.type]),\"length\"in ci?li=ci.length|0:(li=vi,mn===da||mn===Wo?li*=2:(mn===Ga||mn===Wn)&&(li*=4))),Hn(xi,nn,Xi,qn,vi,li,mn)}return Ii}return Ii(si),Ii._reglType=\"elements\",Ii._elements=xi,Ii.subdata=function(ci,nn){return Yr.subdata(ci,nn),Ii},Ii.destroy=function(){Qi(xi)},Ii}return{create:ji,createStream:Oi,destroyStream:Mi,getElements:function(si){return typeof si==\"function\"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(Hr).forEach(Qi)}}}var Qr=new Float32Array(1),pi=new Uint32Array(Qr.buffer),fn=5123;function Sn(Ee){for(var xt=j.allocType(fn,Ee.length),zt=0;zt<Ee.length;++zt)if(isNaN(Ee[zt]))xt[zt]=65535;else if(Ee[zt]===1/0)xt[zt]=31744;else if(Ee[zt]===-1/0)xt[zt]=64512;else{Qr[0]=Ee[zt];var Ir=pi[0],Hr=Ir>>>31<<15,Br=(Ir<<1>>>24)-127,Vr=Ir>>13&1023;if(Br<-24)xt[zt]=Hr;else if(Br<-14){var mi=-14-Br;xt[zt]=Hr+(Vr+1024>>mi)}else Br>15?xt[zt]=Hr+31744:xt[zt]=Hr+(Br+15<<10)+Vr}return xt}function En(Ee){return Array.isArray(Ee)||Wr(Ee)}var ki=34467,_n=3553,ya=34067,Jn=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,Co=32854,Fs=32855,zs=36194,ul=32819,cl=32820,zl=33635,cs=34042,nl=6402,Ss=34041,fl=35904,Js=35906,Os=36193,Io=33776,us=33777,Zl=33778,Su=33779,nc=35986,ws=35987,Fn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Yl=36196,Us=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Uf=10241,ml=9728,Zc=9729,Kl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,Nh=4353,kf=4354,fs=34046,nf=3317,Vf=37440,Jl=37441,hl=37443,lc=37444,Fu=33984,Cs=[Kl,yu,qs,oc],js=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[nl]=1,Go[Ss]=Go[Lo]=2,Go[No]=Go[fl]=3,Go[Ma]=Go[Js]=4;function gs(Ee){return\"[object \"+Ee+\"]\"}var uc=gs(\"HTMLCanvasElement\"),bl=gs(\"OffscreenCanvas\"),Gu=gs(\"CanvasRenderingContext2D\"),Bs=gs(\"ImageBitmap\"),ad=gs(\"HTMLImageElement\"),Po=gs(\"HTMLVideoElement\"),od=Object.keys(Ce).concat([uc,bl,Gu,Bs,ad,Po]),Yo=[];Yo[Us]=1,Yo[aa]=4,Yo[Os]=2,Yo[Hl]=2,Yo[ac]=4;var Pa=[];Pa[Co]=2,Pa[Fs]=2,Pa[zs]=2,Pa[Ss]=4,Pa[Io]=.5,Pa[us]=.5,Pa[Zl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[ws]=1,Pa[Fn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Yl]=.5;function af(Ee){return Array.isArray(Ee)&&(Ee.length===0||typeof Ee[0]==\"number\")}function Hu(Ee){if(!Array.isArray(Ee))return!1;var xt=Ee.length;return!(xt===0||!En(Ee[0]))}function wl(Ee){return Object.prototype.toString.call(Ee)}function Gf(Ee){return wl(Ee)===uc}function Ic(Ee){return wl(Ee)===bl}function mf(Ee){return wl(Ee)===Gu}function Bl(Ee){return wl(Ee)===Bs}function _h(Ee){return wl(Ee)===ad}function Qf(Ee){return wl(Ee)===Po}function yf(Ee){if(!Ee)return!1;var xt=wl(Ee);return od.indexOf(xt)>=0?!0:af(Ee)||Hu(Ee)||Ur(Ee)}function Yc(Ee){return Ce[Object.prototype.toString.call(Ee)]|0}function eh(Ee,xt){var zt=xt.length;switch(Ee.type){case Us:case Hl:case ac:case aa:var Ir=j.allocType(Ee.type,zt);Ir.set(xt),Ee.data=Ir;break;case Os:Ee.data=Sn(xt);break;default:}}function th(Ee,xt){return j.allocType(Ee.type===Os?aa:Ee.type,xt)}function ju(Ee,xt){Ee.type===Os?(Ee.data=Sn(xt),j.freeType(xt)):Ee.data=xt}function Hf(Ee,xt,zt,Ir,Hr,Br){for(var Vr=Ee.width,mi=Ee.height,Ni=Ee.channels,Oi=Vr*mi*Ni,Mi=th(Ee,Oi),Hn=0,Qi=0;Qi<mi;++Qi)for(var ji=0;ji<Vr;++ji)for(var si=0;si<Ni;++si)Mi[Hn++]=xt[zt*ji+Ir*Qi+Hr*si+Br];ju(Ee,Mi)}function cc(Ee,xt,zt,Ir,Hr,Br){var Vr;if(typeof Pa[Ee]!=\"undefined\"?Vr=Pa[Ee]:Vr=Go[Ee]*Yo[xt],Br&&(Vr*=6),Hr){for(var mi=0,Ni=zt;Ni>=1;)mi+=Vr*Ni*Ni,Ni/=2;return mi}else return Vr*zt*Ir}function of(Ee,xt,zt,Ir,Hr,Br,Vr){var mi={\"don't care\":sc,\"dont care\":sc,nice:kf,fast:Nh},Ni={repeat:ql,clamp:Pc,mirror:Do},Oi={nearest:ml,linear:Zc},Mi=e({mipmap:oc,\"nearest mipmap nearest\":Kl,\"linear mipmap nearest\":qs,\"nearest mipmap linear\":yu,\"linear mipmap linear\":oc},Oi),Hn={none:0,browser:lc},Qi={uint8:Us,rgba4:ul,rgb565:zl,\"rgb5 a1\":cl},ji={alpha:_o,luminance:po,\"luminance alpha\":Lo,rgb:No,rgba:Ma,rgba4:Co,\"rgb5 a1\":Fs,rgb565:zs},si={};xt.ext_srgb&&(ji.srgb=fl,ji.srgba=Js),xt.oes_texture_float&&(Qi.float32=Qi.float=aa),xt.oes_texture_half_float&&(Qi.float16=Qi[\"half float\"]=Os),xt.webgl_depth_texture&&(e(ji,{depth:nl,\"depth stencil\":Ss}),e(Qi,{uint16:Hl,uint32:ac,\"depth stencil\":cs})),xt.webgl_compressed_texture_s3tc&&e(si,{\"rgb s3tc dxt1\":Io,\"rgba s3tc dxt1\":us,\"rgba s3tc dxt3\":Zl,\"rgba s3tc dxt5\":Su}),xt.webgl_compressed_texture_atc&&e(si,{\"rgb atc\":nc,\"rgba atc explicit alpha\":ws,\"rgba atc interpolated alpha\":Fn}),xt.webgl_compressed_texture_pvrtc&&e(si,{\"rgb pvrtc 4bppv1\":_a,\"rgb pvrtc 2bppv1\":Vu,\"rgba pvrtc 4bppv1\":Ol,\"rgba pvrtc 2bppv1\":xo}),xt.webgl_compressed_texture_etc1&&(si[\"rgb etc1\"]=Yl);var Mr=Array.prototype.slice.call(Ee.getParameter(ki));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(ji[ne]=we)});var Yr=Object.keys(ji);zt.textureFormats=Yr;var xi=[];Object.keys(ji).forEach(function(ne){var we=ji[ne];xi[we]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var we=Qi[ne];Ii[we]=ne});var ci=[];Object.keys(Oi).forEach(function(ne){var we=Oi[ne];ci[we]=ne});var nn=[];Object.keys(Mi).forEach(function(ne){var we=Mi[ne];nn[we]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var we=Ni[ne];Xi[we]=ne});var qn=Yr.reduce(function(ne,we){var Ue=ji[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===nl||Ue===Ss||xt.ext_srgb&&(Ue===fl||Ue===Js)?ne[Ue]=Ue:Ue===Fs||we.indexOf(\"rgba\")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function vi(){this.internalformat=Ma,this.format=Ma,this.type=Us,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!=\"object\"||!we)){if(\"premultiplyAlpha\"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),\"flipY\"in we&&(ne.flipY=we.flipY),\"alignment\"in we&&(ne.unpackAlignment=we.alignment),\"colorSpace\"in we&&(ne.colorSpace=Hn[we.colorSpace]),\"type\"in we){var Ue=we.type;ne.type=Qi[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;\"shape\"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):(\"radius\"in we&&(ft=Zt=we.radius),\"width\"in we&&(ft=we.width),\"height\"in we&&(Zt=we.height),\"channels\"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if(\"format\"in we){var et=we.format,at=ne.internalformat=ji[et];ne.format=qn[at],et in Qi&&(\"type\"in we||(ne.type=Qi[et])),et in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==js[ne.format]&&(ne.format=ne.internalformat=js[ne.channels])}}function Ki(ne){Ee.pixelStorei(Vf,ne.flipY),Ee.pixelStorei(Jl,ne.premultiplyAlpha),Ee.pixelStorei(hl,ne.colorSpace),Ee.pixelStorei(nf,ne.unpackAlignment)}function Ui(){vi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,we){var Ue=null;if(yf(we)?Ue=we:we&&(mn(ne,we),\"x\"in we&&(ne.xOffset=we.x|0),\"y\"in we&&(ne.yOffset=we.y|0),yf(we.data)&&(Ue=we.data)),we.copy){var ft=Hr.viewportWidth,Zt=Hr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Wr(Ue))ne.channels=ne.channels||4,ne.data=Ue,!(\"type\"in we)&&ne.type===Us&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Ur(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Us&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,et,at,kt,Ot,It,Bt;qt.length===3?(kt=qt[2],Bt=Ve[2]):(kt=1,Bt=1),et=qt[0],at=qt[1],Ot=Ve[0],It=Ve[1],ne.alignment=1,ne.width=et,ne.height=at,ne.channels=kt,ne.format=ne.internalformat=js[kt],ne.needsFree=!0,Hf(ne,hr,Ot,It,Bt,Ue.offset)}else if(Gf(Ue)||Ic(Ue)||mf(Ue))Gf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(_h(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Rt=ne.width||Ue[0].length,mt=ne.height||Ue.length,Pt=ne.channels;En(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),cr=1,br=0;br<ht.length;++br)cr*=ht[br];var Nr=th(ne,cr);Ge.flatten(Ue,ht,\"\",Nr),ju(ne,Nr),ne.alignment=1,ne.width=Rt,ne.height=mt,ne.channels=Pt,ne.format=ne.internalformat=js[Pt],ne.needsFree=!0}ne.type===aa||ne.type}function vn(ne,we,Ue){var ft=ne.element,Zt=ne.data,hr=ne.internalformat,qt=ne.format,Ve=ne.type,et=ne.width,at=ne.height;Ki(ne),ft?Ee.texImage2D(we,Ue,qt,qt,Ve,ft):ne.compressed?Ee.compressedTexImage2D(we,Ue,hr,et,at,0,Zt):ne.needsCopy?(Ir(),Ee.copyTexImage2D(we,Ue,qt,ne.xOffset,ne.yOffset,et,at,0)):Ee.texImage2D(we,Ue,qt,et,at,0,qt,Ve,Zt||null)}function Un(ne,we,Ue,ft,Zt){var hr=ne.element,qt=ne.data,Ve=ne.internalformat,et=ne.format,at=ne.type,kt=ne.width,Ot=ne.height;Ki(ne),hr?Ee.texSubImage2D(we,Zt,Ue,ft,et,at,hr):ne.compressed?Ee.compressedTexSubImage2D(we,Zt,Ue,ft,Ve,kt,Ot,qt):ne.needsCopy?(Ir(),Ee.copyTexSubImage2D(we,Zt,Ue,ft,ne.xOffset,ne.yOffset,kt,Ot)):Ee.texSubImage2D(we,Zt,Ue,ft,kt,Ot,et,at,qt)}var na=[];function Yi(){return na.pop()||new Ui}function Ln(ne){ne.needsFree&&j.freeType(ne.data),Ui.call(ne),na.push(ne)}function ra(){vi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function oa(ne,we,Ue){var ft=ne.images[0]=Yi();ne.mipmask=1,ft.width=ne.width=we,ft.height=ne.height=Ue,ft.channels=ne.channels=4}function wa(ne,we){var Ue=null;if(yf(we))Ue=ne.images[0]=Yi(),li(Ue,ne),Bi(Ue,we),ne.mipmask=1;else if(mn(ne,we),Array.isArray(we.mipmap))for(var ft=we.mipmap,Zt=0;Zt<ft.length;++Zt)Ue=ne.images[Zt]=Yi(),li(Ue,ne),Ue.width>>=Zt,Ue.height>>=Zt,Bi(Ue,ft[Zt]),ne.mipmask|=1<<Zt;else Ue=ne.images[0]=Yi(),li(Ue,ne),Bi(Ue,we),ne.mipmask=1;li(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===us||ne.internalformat===Zl||ne.internalformat)}function ns(ne,we){for(var Ue=ne.images,ft=0;ft<Ue.length;++ft){if(!Ue[ft])return;vn(Ue[ft],we,ft)}}var Ys=[];function Va(){var ne=Ys.pop()||new ra;vi.call(ne),ne.mipmask=0;for(var we=0;we<16;++we)ne.images[we]=null;return ne}function El(ne){for(var we=ne.images,Ue=0;Ue<we.length;++Ue)we[Ue]&&Ln(we[Ue]),we[Ue]=null;Ys.push(ne)}function zo(){this.minFilter=ml,this.magFilter=ml,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function el(ne,we){if(\"min\"in we){var Ue=we.min;ne.minFilter=Mi[Ue],Cs.indexOf(ne.minFilter)>=0&&!(\"faces\"in we)&&(ne.genMipmaps=!0)}if(\"mag\"in we){var ft=we.mag;ne.magFilter=Oi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if(\"wrap\"in we){var qt=we.wrap;typeof qt==\"string\"?Zt=hr=Ni[qt]:Array.isArray(qt)&&(Zt=Ni[qt[0]],hr=Ni[qt[1]])}else{if(\"wrapS\"in we){var Ve=we.wrapS;Zt=Ni[Ve]}if(\"wrapT\"in we){var et=we.wrapT;hr=Ni[et]}}if(ne.wrapS=Zt,ne.wrapT=hr,\"anisotropic\"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if(\"mipmap\"in we){var kt=!1;switch(typeof we.mipmap){case\"string\":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,kt=!0;break;case\"boolean\":kt=ne.genMipmaps=we.mipmap;break;case\"object\":ne.genMipmaps=!1,kt=!0;break;default:}kt&&!(\"min\"in we)&&(ne.minFilter=Kl)}}function ol(ne,we){Ee.texParameteri(we,Uf,ne.minFilter),Ee.texParameteri(we,rf,ne.magFilter),Ee.texParameteri(we,Oo,ne.wrapS),Ee.texParameteri(we,qo,ne.wrapT),xt.ext_texture_filter_anisotropic&&Ee.texParameteri(we,fs,ne.anisotropic),ne.genMipmaps&&(Ee.hint(Cf,ne.mipmapHint),Ee.generateMipmap(we))}var Vl=0,ls={},Gs=zt.maxTextureUnits,Ks=Array(Gs).map(function(){return null});function Ta(ne){vi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Ee.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Vr.profile&&(this.stats={size:0})}function sl(ne){Ee.activeTexture(Fu),Ee.bindTexture(ne.target,ne.texture)}function io(){var ne=Ks[0];ne?Ee.bindTexture(ne.target,ne.texture):Ee.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Ee.activeTexture(Fu+Ue),Ee.bindTexture(ft,null),Ks[Ue]=null),Ee.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ls[ne.id],Br.textureCount--}e(Ta.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue<Gs;++Ue){var ft=Ks[Ue];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Ks[Ue]=ne,we=Ue;break}we>=Gs,Vr.profile&&Br.maxTextureUnits<we+1&&(Br.maxTextureUnits=we+1),ne.unit=we,Ee.activeTexture(Fu+we),Ee.bindTexture(ne.target,ne.texture)}return we},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,we){var Ue=new Ta(_n);ls[Ue.id]=Ue,Br.textureCount++;function ft(qt,Ve){var et=Ue.texInfo;zo.call(et);var at=Va();return typeof qt==\"number\"?typeof Ve==\"number\"?oa(at,qt|0,Ve|0):oa(at,qt|0,qt|0):qt?(el(et,qt),wa(at,qt)):oa(at,1,1),et.genMipmaps&&(at.mipmask=(at.width<<1)-1),Ue.mipmask=at.mipmask,li(Ue,at),Ue.internalformat=at.internalformat,ft.width=at.width,ft.height=at.height,sl(Ue),ns(at,_n),ol(et,_n),io(),El(at),Vr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,at.width,at.height,et.genMipmaps,!1)),ft.format=xi[Ue.internalformat],ft.type=Ii[Ue.type],ft.mag=ci[et.magFilter],ft.min=nn[et.minFilter],ft.wrapS=Xi[et.wrapS],ft.wrapT=Xi[et.wrapT],ft}function Zt(qt,Ve,et,at){var kt=Ve|0,Ot=et|0,It=at|0,Bt=Yi();return li(Bt,Ue),Bt.width=0,Bt.height=0,Bi(Bt,qt),Bt.width=Bt.width||(Ue.width>>It)-kt,Bt.height=Bt.height||(Ue.height>>It)-Ot,sl(Ue),Un(Bt,_n,kt,Ot,It),io(),Ln(Bt),ft}function hr(qt,Ve){var et=qt|0,at=Ve|0||et;if(et===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=et,ft.height=Ue.height=at,sl(Ue);for(var kt=0;Ue.mipmask>>kt;++kt){var Ot=et>>kt,It=at>>kt;if(!Ot||!It)break;Ee.texImage2D(_n,kt,Ue.format,Ot,It,0,Ue.format,Ue.type,null)}return io(),Vr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,et,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType=\"texture2d\",ft._texture=Ue,Vr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new Ta(ya);ls[qt.id]=qt,Br.cubeCount++;var Ve=new Array(6);function et(Ot,It,Bt,Rt,mt,Pt){var ht,cr=qt.texInfo;for(zo.call(cr),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot==\"number\"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot==\"object\")if(It)wa(Ve[0],Ot),wa(Ve[1],It),wa(Ve[2],Bt),wa(Ve[3],Rt),wa(Ve[4],mt),wa(Ve[5],Pt);else if(el(cr,Ot),mn(qt,Ot),\"faces\"in Ot){var Nr=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),wa(Ve[ht],Nr[ht])}else for(ht=0;ht<6;++ht)wa(Ve[ht],Ot);for(li(qt,Ve[0]),cr.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,et.width=Ve[0].width,et.height=Ve[0].height,sl(qt),ht=0;ht<6;++ht)ns(Ve[ht],Jn+ht);for(ol(cr,ya),io(),Vr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,et.width,et.height,cr.genMipmaps,!0)),et.format=xi[qt.internalformat],et.type=Ii[qt.type],et.mag=ci[cr.magFilter],et.min=nn[cr.minFilter],et.wrapS=Xi[cr.wrapS],et.wrapT=Xi[cr.wrapT],ht=0;ht<6;++ht)El(Ve[ht]);return et}function at(Ot,It,Bt,Rt,mt){var Pt=Bt|0,ht=Rt|0,cr=mt|0,br=Yi();return li(br,qt),br.width=0,br.height=0,Bi(br,It),br.width=br.width||(qt.width>>cr)-Pt,br.height=br.height||(qt.height>>cr)-ht,sl(qt),Un(br,Jn+Ot,Pt,ht,cr),io(),Ln(br),et}function kt(Ot){var It=Ot|0;if(It!==qt.width){et.width=qt.width=It,et.height=qt.height=It,sl(qt);for(var Bt=0;Bt<6;++Bt)for(var Rt=0;qt.mipmask>>Rt;++Rt)Ee.texImage2D(Jn+Bt,Rt,qt.format,It>>Rt,It>>Rt,0,qt.format,qt.type,null);return io(),Vr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,et.width,et.height,!1,!0)),et}}return et(ne,we,Ue,ft,Zt,hr),et.subimage=at,et.resize=kt,et._reglType=\"textureCube\",et._texture=qt,Vr.profile&&(et.stats=qt.stats),et.destroy=function(){qt.decRef()},et}function q(){for(var ne=0;ne<Gs;++ne)Ee.activeTexture(Fu+ne),Ee.bindTexture(_n,null),Ks[ne]=null;dt(ls).forEach(Y),Br.cubeCount=0,Br.textureCount=0}Vr.profile&&(Br.getTotalTextureSize=function(){var ne=0;return Object.keys(ls).forEach(function(we){ne+=ls[we].stats.size}),ne});function K(){for(var ne=0;ne<Gs;++ne){var we=Ks[ne];we&&(we.bindCount=0,we.unit=-1,Ks[ne]=null)}dt(ls).forEach(function(Ue){Ue.texture=Ee.createTexture(),Ee.bindTexture(Ue.target,Ue.texture);for(var ft=0;ft<32;++ft)if((Ue.mipmask&1<<ft)!==0)if(Ue.target===_n)Ee.texImage2D(_n,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Ee.texImage2D(Jn+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);ol(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne<Gs;++ne){var we=Ks[ne];we&&(we.bindCount=0,we.unit=-1,Ks[ne]=null),Ee.activeTexture(Fu+ne),Ee.bindTexture(_n,null),Ee.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:q,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,ms=36194,jf=33189,Uh=36168,rh=34041,sf=35907,xh=34836,Mu=34842,ih=34843,Ws=[];Ws[Kc]=2,Ws[Rc]=2,Ws[ms]=2,Ws[jf]=2,Ws[Uh]=1,Ws[rh]=4,Ws[sf]=4,Ws[xh]=16,Ws[Mu]=8,Ws[ih]=6;function Eu(Ee,xt,zt){return Ws[Ee]*xt*zt}var Dc=function(Ee,xt,zt,Ir,Hr){var Br={rgba4:Kc,rgb565:ms,\"rgb5 a1\":Rc,depth:jf,stencil:Uh,\"depth stencil\":rh};xt.ext_srgb&&(Br.srgba=sf),xt.ext_color_buffer_half_float&&(Br.rgba16f=Mu,Br.rgb16f=ih),xt.webgl_color_buffer_float&&(Br.rgba32f=xh);var Vr=[];Object.keys(Br).forEach(function(ji){var si=Br[ji];Vr[si]=ji});var mi=0,Ni={};function Oi(ji){this.id=mi++,this.refCount=1,this.renderbuffer=ji,this.format=Kc,this.width=0,this.height=0,Hr.profile&&(this.stats={size:0})}Oi.prototype.decRef=function(){--this.refCount<=0&&Mi(this)};function Mi(ji){var si=ji.renderbuffer;Ee.bindRenderbuffer(Nl,null),Ee.deleteRenderbuffer(si),ji.renderbuffer=null,ji.refCount=0,delete Ni[ji.id],Ir.renderbufferCount--}function Hn(ji,si){var Mr=new Oi(Ee.createRenderbuffer());Ni[Mr.id]=Mr,Ir.renderbufferCount++;function Yr(Ii,ci){var nn=0,Xi=0,qn=Kc;if(typeof Ii==\"object\"&&Ii){var vi=Ii;if(\"shape\"in vi){var li=vi.shape;nn=li[0]|0,Xi=li[1]|0}else\"radius\"in vi&&(nn=Xi=vi.radius|0),\"width\"in vi&&(nn=vi.width|0),\"height\"in vi&&(Xi=vi.height|0);\"format\"in vi&&(qn=Br[vi.format])}else typeof Ii==\"number\"?(nn=Ii|0,typeof ci==\"number\"?Xi=ci|0:Xi=nn):Ii||(nn=Xi=1);if(!(nn===Mr.width&&Xi===Mr.height&&qn===Mr.format))return Yr.width=Mr.width=nn,Yr.height=Mr.height=Xi,Mr.format=qn,Ee.bindRenderbuffer(Nl,Mr.renderbuffer),Ee.renderbufferStorage(Nl,qn,nn,Xi),Hr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height)),Yr.format=Vr[Mr.format],Yr}function xi(Ii,ci){var nn=Ii|0,Xi=ci|0||nn;return nn===Mr.width&&Xi===Mr.height||(Yr.width=Mr.width=nn,Yr.height=Mr.height=Xi,Ee.bindRenderbuffer(Nl,Mr.renderbuffer),Ee.renderbufferStorage(Nl,Mr.format,nn,Xi),Hr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height))),Yr}return Yr(ji,si),Yr.resize=xi,Yr._reglType=\"renderbuffer\",Yr._renderbuffer=Mr,Hr.profile&&(Yr.stats=Mr.stats),Yr.destroy=function(){Mr.decRef()},Yr}Hr.profile&&(Ir.getTotalRenderbufferSize=function(){var ji=0;return Object.keys(Ni).forEach(function(si){ji+=Ni[si].stats.size}),ji});function Qi(){dt(Ni).forEach(function(ji){ji.renderbuffer=Ee.createRenderbuffer(),Ee.bindRenderbuffer(Nl,ji.renderbuffer),Ee.renderbufferStorage(Nl,ji.format,ji.width,ji.height)}),Ee.bindRenderbuffer(Nl,null)}return{create:Hn,clear:function(){dt(Ni).forEach(Mi)},restore:Qi}},ks=36160,bc=36161,hu=3553,_u=34069,al=36064,nh=36096,bh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,_f=5126,Lf=6407,Ou=6408,xf=[];xf[Ou]=4,xf[Lf]=3;var jl=[];jl[bd]=1,jl[_f]=4,jl[wc]=2;function lf(Ee,xt,zt,Ir,Hr,Br){var Vr={cur:null,next:null,dirty:!1,setFBO:null},mi=[\"rgba\"],Ni=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];xt.ext_srgb&&Ni.push(\"srgba\"),xt.ext_color_buffer_half_float&&Ni.push(\"rgba16f\",\"rgb16f\"),xt.webgl_color_buffer_float&&Ni.push(\"rgba32f\");var Oi=[\"uint8\"];xt.oes_texture_half_float&&Oi.push(\"half float\",\"float16\"),xt.oes_texture_float&&Oi.push(\"float\",\"float32\");function Mi(Ui,Bi,vn){this.target=Ui,this.texture=Bi,this.renderbuffer=vn;var Un=0,na=0;Bi?(Un=Bi.width,na=Bi.height):vn&&(Un=vn.width,na=vn.height),this.width=Un,this.height=na}function Hn(Ui){Ui&&(Ui.texture&&Ui.texture._texture.decRef(),Ui.renderbuffer&&Ui.renderbuffer._renderbuffer.decRef())}function Qi(Ui,Bi,vn){if(Ui)if(Ui.texture){var Un=Ui.texture._texture,na=Math.max(1,Un.width),Yi=Math.max(1,Un.height);Un.refCount+=1}else{var Ln=Ui.renderbuffer._renderbuffer;Ln.refCount+=1}}function ji(Ui,Bi){Bi&&(Bi.texture?Ee.framebufferTexture2D(ks,Ui,Bi.target,Bi.texture._texture.texture,0):Ee.framebufferRenderbuffer(ks,Ui,bc,Bi.renderbuffer._renderbuffer.renderbuffer))}function si(Ui){var Bi=hu,vn=null,Un=null,na=Ui;typeof Ui==\"object\"&&(na=Ui.data,\"target\"in Ui&&(Bi=Ui.target|0));var Yi=na._reglType;return Yi===\"texture2d\"||Yi===\"textureCube\"?vn=na:Yi===\"renderbuffer\"&&(Un=na,Bi=bc),new Mi(Bi,vn,Un)}function Mr(Ui,Bi,vn,Un,na){if(vn){var Yi=Ir.create2D({width:Ui,height:Bi,format:Un,type:na});return Yi._texture.refCount=0,new Mi(hu,Yi,null)}else{var Ln=Hr.create({width:Ui,height:Bi,format:Un});return Ln._renderbuffer.refCount=0,new Mi(bc,null,Ln)}}function Yr(Ui){return Ui&&(Ui.texture||Ui.renderbuffer)}function xi(Ui,Bi,vn){Ui&&(Ui.texture?Ui.texture.resize(Bi,vn):Ui.renderbuffer&&Ui.renderbuffer.resize(Bi,vn),Ui.width=Bi,Ui.height=vn)}var Ii=0,ci={};function nn(){this.id=Ii++,ci[this.id]=this,this.framebuffer=Ee.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Xi(Ui){Ui.colorAttachments.forEach(Hn),Hn(Ui.depthAttachment),Hn(Ui.stencilAttachment),Hn(Ui.depthStencilAttachment)}function qn(Ui){var Bi=Ui.framebuffer;Ee.deleteFramebuffer(Bi),Ui.framebuffer=null,Br.framebufferCount--,delete ci[Ui.id]}function vi(Ui){var Bi;Ee.bindFramebuffer(ks,Ui.framebuffer);var vn=Ui.colorAttachments;for(Bi=0;Bi<vn.length;++Bi)ji(al+Bi,vn[Bi]);for(Bi=vn.length;Bi<zt.maxColorAttachments;++Bi)Ee.framebufferTexture2D(ks,al+Bi,hu,null,0);Ee.framebufferTexture2D(ks,zu,hu,null,0),Ee.framebufferTexture2D(ks,nh,hu,null,0),Ee.framebufferTexture2D(ks,bh,hu,null,0),ji(nh,Ui.depthAttachment),ji(bh,Ui.stencilAttachment),ji(zu,Ui.depthStencilAttachment);var Un=Ee.checkFramebufferStatus(ks);Ee.isContextLost(),Ee.bindFramebuffer(ks,Vr.next?Vr.next.framebuffer:null),Vr.cur=Vr.next,Ee.getError()}function li(Ui,Bi){var vn=new nn;Br.framebufferCount++;function Un(Yi,Ln){var ra,oa=0,wa=0,ns=!0,Ys=!0,Va=null,El=!0,zo=\"rgba\",el=\"uint8\",ol=1,Vl=null,ls=null,Gs=null,Ks=!1;if(typeof Yi==\"number\")oa=Yi|0,wa=Ln|0||oa;else if(!Yi)oa=wa=1;else{var Ta=Yi;if(\"shape\"in Ta){var sl=Ta.shape;oa=sl[0],wa=sl[1]}else\"radius\"in Ta&&(oa=wa=Ta.radius),\"width\"in Ta&&(oa=Ta.width),\"height\"in Ta&&(wa=Ta.height);(\"color\"in Ta||\"colors\"in Ta)&&(Va=Ta.color||Ta.colors,Array.isArray(Va)),Va||(\"colorCount\"in Ta&&(ol=Ta.colorCount|0),\"colorTexture\"in Ta&&(El=!!Ta.colorTexture,zo=\"rgba4\"),\"colorType\"in Ta&&(el=Ta.colorType,El||(el===\"half float\"||el===\"float16\"?zo=\"rgba16f\":(el===\"float\"||el===\"float32\")&&(zo=\"rgba32f\"))),\"colorFormat\"in Ta&&(zo=Ta.colorFormat,mi.indexOf(zo)>=0?El=!0:Ni.indexOf(zo)>=0&&(El=!1))),(\"depthTexture\"in Ta||\"depthStencilTexture\"in Ta)&&(Ks=!!(Ta.depthTexture||Ta.depthStencilTexture)),\"depth\"in Ta&&(typeof Ta.depth==\"boolean\"?ns=Ta.depth:(Vl=Ta.depth,Ys=!1)),\"stencil\"in Ta&&(typeof Ta.stencil==\"boolean\"?Ys=Ta.stencil:(ls=Ta.stencil,ns=!1)),\"depthStencil\"in Ta&&(typeof Ta.depthStencil==\"boolean\"?ns=Ys=Ta.depthStencil:(Gs=Ta.depthStencil,ns=!1,Ys=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(ol),ra=0;ra<ol;++ra)io[ra]=Mr(oa,wa,El,zo,el);oa=oa||io[0].width,wa=wa||io[0].height,Vl?Y=si(Vl):ns&&!Ys&&(Y=Mr(oa,wa,Ks,\"depth\",\"uint32\")),ls?D=si(ls):Ys&&!ns&&(D=Mr(oa,wa,!1,\"stencil\",\"uint8\")),Gs?J=si(Gs):!Vl&&!ls&&Ys&&ns&&(J=Mr(oa,wa,Ks,\"depth stencil\",\"depth stencil\"));var q=null;for(ra=0;ra<io.length;++ra)if(Qi(io[ra],oa,wa),io[ra]&&io[ra].texture){var K=xf[io[ra].texture._texture.format]*jl[io[ra].texture._texture.type];q===null&&(q=K)}return Qi(Y,oa,wa),Qi(D,oa,wa),Qi(J,oa,wa),Xi(vn),vn.width=oa,vn.height=wa,vn.colorAttachments=io,vn.depthAttachment=Y,vn.stencilAttachment=D,vn.depthStencilAttachment=J,Un.color=io.map(Yr),Un.depth=Yr(Y),Un.stencil=Yr(D),Un.depthStencil=Yr(J),Un.width=vn.width,Un.height=vn.height,vi(vn),Un}function na(Yi,Ln){var ra=Math.max(Yi|0,1),oa=Math.max(Ln|0||ra,1);if(ra===vn.width&&oa===vn.height)return Un;for(var wa=vn.colorAttachments,ns=0;ns<wa.length;++ns)xi(wa[ns],ra,oa);return xi(vn.depthAttachment,ra,oa),xi(vn.stencilAttachment,ra,oa),xi(vn.depthStencilAttachment,ra,oa),vn.width=Un.width=ra,vn.height=Un.height=oa,vi(vn),Un}return Un(Ui,Bi),e(Un,{resize:na,_reglType:\"framebuffer\",_framebuffer:vn,destroy:function(){qn(vn),Xi(vn)},use:function(Yi){Vr.setFBO({framebuffer:Un},Yi)}})}function mn(Ui){var Bi=Array(6);function vn(na){var Yi,Ln={color:null},ra=0,oa=null,wa=\"rgba\",ns=\"uint8\",Ys=1;if(typeof na==\"number\")ra=na|0;else if(!na)ra=1;else{var Va=na;if(\"shape\"in Va){var El=Va.shape;ra=El[0]}else\"radius\"in Va&&(ra=Va.radius|0),\"width\"in Va?(ra=Va.width|0,\"height\"in Va):\"height\"in Va&&(ra=Va.height|0);(\"color\"in Va||\"colors\"in Va)&&(oa=Va.color||Va.colors,Array.isArray(oa)),oa||(\"colorCount\"in Va&&(Ys=Va.colorCount|0),\"colorType\"in Va&&(ns=Va.colorType),\"colorFormat\"in Va&&(wa=Va.colorFormat)),\"depth\"in Va&&(Ln.depth=Va.depth),\"stencil\"in Va&&(Ln.stencil=Va.stencil),\"depthStencil\"in Va&&(Ln.depthStencil=Va.depthStencil)}var zo;if(oa)if(Array.isArray(oa))for(zo=[],Yi=0;Yi<oa.length;++Yi)zo[Yi]=oa[Yi];else zo=[oa];else{zo=Array(Ys);var el={radius:ra,format:wa,type:ns};for(Yi=0;Yi<Ys;++Yi)zo[Yi]=Ir.createCube(el)}for(Ln.color=Array(zo.length),Yi=0;Yi<zo.length;++Yi){var ol=zo[Yi];ra=ra||ol.width,Ln.color[Yi]={target:_u,data:zo[Yi]}}for(Yi=0;Yi<6;++Yi){for(var Vl=0;Vl<zo.length;++Vl)Ln.color[Vl].target=_u+Yi;Yi>0&&(Ln.depth=Bi[0].depth,Ln.stencil=Bi[0].stencil,Ln.depthStencil=Bi[0].depthStencil),Bi[Yi]?Bi[Yi](Ln):Bi[Yi]=li(Ln)}return e(vn,{width:ra,height:ra,color:zo})}function Un(na){var Yi,Ln=na|0;if(Ln===vn.width)return vn;var ra=vn.color;for(Yi=0;Yi<ra.length;++Yi)ra[Yi].resize(Ln);for(Yi=0;Yi<6;++Yi)Bi[Yi].resize(Ln);return vn.width=vn.height=Ln,vn}return vn(Ui),e(vn,{faces:Bi,resize:Un,_reglType:\"framebufferCube\",destroy:function(){Bi.forEach(function(na){na.destroy()})}})}function Ki(){Vr.cur=null,Vr.next=null,Vr.dirty=!0,dt(ci).forEach(function(Ui){Ui.framebuffer=Ee.createFramebuffer(),vi(Ui)})}return e(Vr,{getFramebuffer:function(Ui){if(typeof Ui==\"function\"&&Ui._reglType===\"framebuffer\"){var Bi=Ui._framebuffer;if(Bi instanceof nn)return Bi}return null},create:li,createCube:mn,clear:function(){dt(ci).forEach(qn)},restore:Ki})}var Vh=5126,Pf=34962,Ls=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Vh,this.offset=0,this.stride=0,this.divisor=0}function Cu(Ee,xt,zt,Ir,Hr,Br,Vr){for(var mi=zt.maxAttributes,Ni=new Array(mi),Oi=0;Oi<mi;++Oi)Ni[Oi]=new du;var Mi=0,Hn={},Qi={Record:du,scope:{},state:Ni,currentVAO:null,targetVAO:null,restore:si()?Xi:function(){},createVAO:qn,getVAO:Yr,destroyBuffer:ji,setVAO:si()?xi:Ii,clear:si()?ci:function(){}};function ji(vi){for(var li=0;li<Ni.length;++li){var mn=Ni[li];mn.buffer===vi&&(Ee.disableVertexAttribArray(li),mn.buffer=null)}}function si(){return xt.oes_vertex_array_object}function Mr(){return xt.angle_instanced_arrays}function Yr(vi){return typeof vi==\"function\"&&vi._vao?vi._vao:null}function xi(vi){if(vi!==Qi.currentVAO){var li=si();vi?li.bindVertexArrayOES(vi.vao):li.bindVertexArrayOES(null),Qi.currentVAO=vi}}function Ii(vi){if(vi!==Qi.currentVAO){if(vi)vi.bindAttrs();else{for(var li=Mr(),mn=0;mn<Ni.length;++mn){var Ki=Ni[mn];Ki.buffer?(Ee.enableVertexAttribArray(mn),Ki.buffer.bind(),Ee.vertexAttribPointer(mn,Ki.size,Ki.type,Ki.normalized,Ki.stride,Ki.offfset),li&&Ki.divisor&&li.vertexAttribDivisorANGLE(mn,Ki.divisor)):(Ee.disableVertexAttribArray(mn),Ee.vertexAttrib4f(mn,Ki.x,Ki.y,Ki.z,Ki.w))}Vr.elements?Ee.bindBuffer(Ls,Vr.elements.buffer.buffer):Ee.bindBuffer(Ls,null)}Qi.currentVAO=vi}}function ci(){dt(Hn).forEach(function(vi){vi.destroy()})}function nn(){this.id=++Mi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var vi=si();vi?this.vao=vi.createVertexArrayOES():this.vao=null,Hn[this.id]=this,this.buffers=[]}nn.prototype.bindAttrs=function(){for(var vi=Mr(),li=this.attributes,mn=0;mn<li.length;++mn){var Ki=li[mn];Ki.buffer?(Ee.enableVertexAttribArray(mn),Ee.bindBuffer(Pf,Ki.buffer.buffer),Ee.vertexAttribPointer(mn,Ki.size,Ki.type,Ki.normalized,Ki.stride,Ki.offset),vi&&Ki.divisor&&vi.vertexAttribDivisorANGLE(mn,Ki.divisor)):(Ee.disableVertexAttribArray(mn),Ee.vertexAttrib4f(mn,Ki.x,Ki.y,Ki.z,Ki.w))}for(var Ui=li.length;Ui<mi;++Ui)Ee.disableVertexAttribArray(Ui);var Bi=Br.getElements(this.elements);Bi?Ee.bindBuffer(Ls,Bi.buffer.buffer):Ee.bindBuffer(Ls,null)},nn.prototype.refresh=function(){var vi=si();vi&&(vi.bindVertexArrayOES(this.vao),this.bindAttrs(),Qi.currentVAO=null,vi.bindVertexArrayOES(null))},nn.prototype.destroy=function(){if(this.vao){var vi=si();this===Qi.currentVAO&&(Qi.currentVAO=null,vi.bindVertexArrayOES(null)),vi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Hn[this.id]&&(delete Hn[this.id],Ir.vaoCount-=1)};function Xi(){var vi=si();vi&&dt(Hn).forEach(function(li){li.refresh()})}function qn(vi){var li=new nn;Ir.vaoCount+=1;function mn(Ki){var Ui;if(Array.isArray(Ki))Ui=Ki,li.elements&&li.ownsElements&&li.elements.destroy(),li.elements=null,li.ownsElements=!1,li.offset=0,li.count=0,li.instances=-1,li.primitive=4;else{if(Ki.elements){var Bi=Ki.elements;li.ownsElements?typeof Bi==\"function\"&&Bi._reglType===\"elements\"?(li.elements.destroy(),li.ownsElements=!1):(li.elements(Bi),li.ownsElements=!1):Br.getElements(Ki.elements)?(li.elements=Ki.elements,li.ownsElements=!1):(li.elements=Br.create(Ki.elements),li.ownsElements=!0)}else li.elements=null,li.ownsElements=!1;Ui=Ki.attributes,li.offset=0,li.count=-1,li.instances=-1,li.primitive=4,li.elements&&(li.count=li.elements._elements.vertCount,li.primitive=li.elements._elements.primType),\"offset\"in Ki&&(li.offset=Ki.offset|0),\"count\"in Ki&&(li.count=Ki.count|0),\"instances\"in Ki&&(li.instances=Ki.instances|0),\"primitive\"in Ki&&(li.primitive=Mn[Ki.primitive])}var vn={},Un=li.attributes;Un.length=Ui.length;for(var na=0;na<Ui.length;++na){var Yi=Ui[na],Ln=Un[na]=new du,ra=Yi.data||Yi;if(Array.isArray(ra)||Wr(ra)||Ur(ra)){var oa;li.buffers[na]&&(oa=li.buffers[na],Wr(ra)&&oa._buffer.byteLength>=ra.byteLength?oa.subdata(ra):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=Hr.create(Yi,Pf,!1,!0)),Ln.buffer=Hr.getBuffer(oa),Ln.size=Ln.buffer.dimension|0,Ln.normalized=!1,Ln.type=Ln.buffer.dtype,Ln.offset=0,Ln.stride=0,Ln.divisor=0,Ln.state=1,vn[na]=1}else Hr.getBuffer(Yi)?(Ln.buffer=Hr.getBuffer(Yi),Ln.size=Ln.buffer.dimension|0,Ln.normalized=!1,Ln.type=Ln.buffer.dtype,Ln.offset=0,Ln.stride=0,Ln.divisor=0,Ln.state=1):Hr.getBuffer(Yi.buffer)?(Ln.buffer=Hr.getBuffer(Yi.buffer),Ln.size=(+Yi.size||Ln.buffer.dimension)|0,Ln.normalized=!!Yi.normalized||!1,\"type\"in Yi?Ln.type=Hi[Yi.type]:Ln.type=Ln.buffer.dtype,Ln.offset=(Yi.offset||0)|0,Ln.stride=(Yi.stride||0)|0,Ln.divisor=(Yi.divisor||0)|0,Ln.state=1):\"x\"in Yi&&(Ln.x=+Yi.x||0,Ln.y=+Yi.y||0,Ln.z=+Yi.z||0,Ln.w=+Yi.w||0,Ln.state=2)}for(var wa=0;wa<li.buffers.length;++wa)!vn[wa]&&li.buffers[wa]&&(li.buffers[wa].destroy(),li.buffers[wa]=null);return li.refresh(),mn}return mn.destroy=function(){for(var Ki=0;Ki<li.buffers.length;++Ki)li.buffers[Ki]&&li.buffers[Ki].destroy();li.buffers.length=0,li.ownsElements&&(li.elements.destroy(),li.elements=null,li.ownsElements=!1),li.destroy()},mn._vao=li,mn._reglType=\"vao\",mn(vi)}return Qi}var Wf=35632,Vs=35633,bf=35718,zc=35721;function Wu(Ee,xt,zt,Ir){var Hr={},Br={};function Vr(Mr,Yr,xi,Ii){this.name=Mr,this.id=Yr,this.location=xi,this.info=Ii}function mi(Mr,Yr){for(var xi=0;xi<Mr.length;++xi)if(Mr[xi].id===Yr.id){Mr[xi].location=Yr.location;return}Mr.push(Yr)}function Ni(Mr,Yr,xi){var Ii=Mr===Wf?Hr:Br,ci=Ii[Yr];if(!ci){var nn=xt.str(Yr);ci=Ee.createShader(Mr),Ee.shaderSource(ci,nn),Ee.compileShader(ci),Ii[Yr]=ci}return ci}var Oi={},Mi=[],Hn=0;function Qi(Mr,Yr){this.id=Hn++,this.fragId=Mr,this.vertId=Yr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Ir.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ji(Mr,Yr,xi){var Ii,ci,nn=Ni(Wf,Mr.fragId),Xi=Ni(Vs,Mr.vertId),qn=Mr.program=Ee.createProgram();if(Ee.attachShader(qn,nn),Ee.attachShader(qn,Xi),xi)for(Ii=0;Ii<xi.length;++Ii){var vi=xi[Ii];Ee.bindAttribLocation(qn,vi[0],vi[1])}Ee.linkProgram(qn);var li=Ee.getProgramParameter(qn,bf);Ir.profile&&(Mr.stats.uniformsCount=li);var mn=Mr.uniforms;for(Ii=0;Ii<li;++Ii)if(ci=Ee.getActiveUniform(qn,Ii),ci)if(ci.size>1)for(var Ki=0;Ki<ci.size;++Ki){var Ui=ci.name.replace(\"[0]\",\"[\"+Ki+\"]\");mi(mn,new Vr(Ui,xt.id(Ui),Ee.getUniformLocation(qn,Ui),ci))}else mi(mn,new Vr(ci.name,xt.id(ci.name),Ee.getUniformLocation(qn,ci.name),ci));var Bi=Ee.getProgramParameter(qn,zc);Ir.profile&&(Mr.stats.attributesCount=Bi);var vn=Mr.attributes;for(Ii=0;Ii<Bi;++Ii)ci=Ee.getActiveAttrib(qn,Ii),ci&&mi(vn,new Vr(ci.name,xt.id(ci.name),Ee.getAttribLocation(qn,ci.name),ci))}Ir.profile&&(zt.getMaxUniformsCount=function(){var Mr=0;return Mi.forEach(function(Yr){Yr.stats.uniformsCount>Mr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Mi.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){Hr={},Br={};for(var Mr=0;Mr<Mi.length;++Mr)ji(Mi[Mr],null,Mi[Mr].attributes.map(function(Yr){return[Yr.location,Yr.name]}))}return{clear:function(){var Mr=Ee.deleteShader.bind(Ee);dt(Hr).forEach(Mr),Hr={},dt(Br).forEach(Mr),Br={},Mi.forEach(function(Yr){Ee.deleteProgram(Yr.program)}),Mi.length=0,Oi={},zt.shaderCount=0},program:function(Mr,Yr,xi,Ii){var ci=Oi[Yr];ci||(ci=Oi[Yr]={});var nn=ci[Mr];if(nn&&(nn.refCount++,!Ii))return nn;var Xi=new Qi(Yr,Mr);return zt.shaderCount++,ji(Xi,xi,Ii),nn||(ci[Mr]=Xi),Mi.push(Xi),e(Xi,{destroy:function(){if(Xi.refCount--,Xi.refCount<=0){Ee.deleteProgram(Xi.program);var qn=Mi.indexOf(Xi);Mi.splice(qn,1),zt.shaderCount--}ci[Xi.vertId].refCount<=0&&(Ee.deleteShader(Br[Xi.vertId]),delete Br[Xi.vertId],delete Oi[Xi.fragId][Xi.vertId]),Object.keys(Oi[Xi.fragId]).length||(Ee.deleteShader(Hr[Xi.fragId]),delete Hr[Xi.fragId],delete Oi[Xi.fragId])}})},restore:si,shader:Ni,frag:-1,vert:-1}}var If=6408,Xu=5121,uf=3333,Xf=5126;function Wl(Ee,xt,zt,Ir,Hr,Br,Vr){function mi(Mi){var Hn;xt.next===null?Hn=Xu:Hn=xt.next.colorAttachments[0].texture._texture.type;var Qi=0,ji=0,si=Ir.framebufferWidth,Mr=Ir.framebufferHeight,Yr=null;Wr(Mi)?Yr=Mi:Mi&&(Qi=Mi.x|0,ji=Mi.y|0,si=(Mi.width||Ir.framebufferWidth-Qi)|0,Mr=(Mi.height||Ir.framebufferHeight-ji)|0,Yr=Mi.data||null),zt();var xi=si*Mr*4;return Yr||(Hn===Xu?Yr=new Uint8Array(xi):Hn===Xf&&(Yr=Yr||new Float32Array(xi))),Ee.pixelStorei(uf,4),Ee.readPixels(Qi,ji,si,Mr,If,Hn,Yr),Yr}function Ni(Mi){var Hn;return xt.setFBO({framebuffer:Mi.framebuffer},function(){Hn=mi(Mi)}),Hn}function Oi(Mi){return!Mi||!(\"framebuffer\"in Mi)?mi(Mi):Ni(Mi)}return Oi}var ah=0,Zu=\"\";function Oc(Ee){return vu(Tc(fc(Ee)))}function Tc(Ee){return At(Zi(Bc(Ee),Ee.length*8))}function Tl(Ee,xt){var zt=Bc(Ee);zt.length>16&&(zt=Zi(zt,Ee.length*8));for(var Ir=Array(16),Hr=Array(16),Br=0;Br<16;Br++)Ir[Br]=zt[Br]^909522486,Hr[Br]=zt[Br]^1549556828;var Vr=Zi(Ir.concat(Bc(xt)),512+xt.length*8);return At(Zi(Hr.concat(Vr),768))}function vu(Ee){for(var xt=ah?\"0123456789ABCDEF\":\"0123456789abcdef\",zt=\"\",Ir,Hr=0;Hr<Ee.length;Hr++)Ir=Ee.charCodeAt(Hr),zt+=xt.charAt(Ir>>>4&15)+xt.charAt(Ir&15);return zt}function qc(Ee){for(var xt=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",zt=\"\",Ir=Ee.length,Hr=0;Hr<Ir;Hr+=3)for(var Br=Ee.charCodeAt(Hr)<<16|(Hr+1<Ir?Ee.charCodeAt(Hr+1)<<8:0)|(Hr+2<Ir?Ee.charCodeAt(Hr+2):0),Vr=0;Vr<4;Vr++)Hr*8+Vr*6>Ee.length*8?zt+=Zu:zt+=xt.charAt(Br>>>6*(3-Vr)&63);return zt}function cf(Ee,xt){var zt=xt.length,Ir=Array(),Hr,Br,Vr,mi,Ni=Array(Math.ceil(Ee.length/2));for(Hr=0;Hr<Ni.length;Hr++)Ni[Hr]=Ee.charCodeAt(Hr*2)<<8|Ee.charCodeAt(Hr*2+1);for(;Ni.length>0;){for(mi=Array(),Vr=0,Hr=0;Hr<Ni.length;Hr++)Vr=(Vr<<16)+Ni[Hr],Br=Math.floor(Vr/zt),Vr-=Br*zt,(mi.length>0||Br>0)&&(mi[mi.length]=Br);Ir[Ir.length]=Vr,Ni=mi}var Oi=\"\";for(Hr=Ir.length-1;Hr>=0;Hr--)Oi+=xt.charAt(Ir[Hr]);var Mi=Math.ceil(Ee.length*8/(Math.log(xt.length)/Math.log(2)));for(Hr=Oi.length;Hr<Mi;Hr++)Oi=xt[0]+Oi;return Oi}function fc(Ee){for(var xt=\"\",zt=-1,Ir,Hr;++zt<Ee.length;)Ir=Ee.charCodeAt(zt),Hr=zt+1<Ee.length?Ee.charCodeAt(zt+1):0,55296<=Ir&&Ir<=56319&&56320<=Hr&&Hr<=57343&&(Ir=65536+((Ir&1023)<<10)+(Hr&1023),zt++),Ir<=127?xt+=String.fromCharCode(Ir):Ir<=2047?xt+=String.fromCharCode(192|Ir>>>6&31,128|Ir&63):Ir<=65535?xt+=String.fromCharCode(224|Ir>>>12&15,128|Ir>>>6&63,128|Ir&63):Ir<=2097151&&(xt+=String.fromCharCode(240|Ir>>>18&7,128|Ir>>>12&63,128|Ir>>>6&63,128|Ir&63));return xt}function Bc(Ee){for(var xt=Array(Ee.length>>2),zt=0;zt<xt.length;zt++)xt[zt]=0;for(var zt=0;zt<Ee.length*8;zt+=8)xt[zt>>5]|=(Ee.charCodeAt(zt/8)&255)<<24-zt%32;return xt}function At(Ee){for(var xt=\"\",zt=0;zt<Ee.length*32;zt+=8)xt+=String.fromCharCode(Ee[zt>>5]>>>24-zt%32&255);return xt}function Xt(Ee,xt){return Ee>>>xt|Ee<<32-xt}function kr(Ee,xt){return Ee>>>xt}function Ar(Ee,xt,zt){return Ee&xt^~Ee&zt}function Kr(Ee,xt,zt){return Ee&xt^Ee&zt^xt&zt}function Ei(Ee){return Xt(Ee,2)^Xt(Ee,13)^Xt(Ee,22)}function Wi(Ee){return Xt(Ee,6)^Xt(Ee,11)^Xt(Ee,25)}function hn(Ee){return Xt(Ee,7)^Xt(Ee,18)^kr(Ee,3)}function Tn(Ee){return Xt(Ee,17)^Xt(Ee,19)^kr(Ee,10)}var Bn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Zi(Ee,xt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Ir=new Array(64),Hr,Br,Vr,mi,Ni,Oi,Mi,Hn,Qi,ji,si,Mr;for(Ee[xt>>5]|=128<<24-xt%32,Ee[(xt+64>>9<<4)+15]=xt,Qi=0;Qi<Ee.length;Qi+=16){for(Hr=zt[0],Br=zt[1],Vr=zt[2],mi=zt[3],Ni=zt[4],Oi=zt[5],Mi=zt[6],Hn=zt[7],ji=0;ji<64;ji++)ji<16?Ir[ji]=Ee[ji+Qi]:Ir[ji]=$i($i($i(Tn(Ir[ji-2]),Ir[ji-7]),hn(Ir[ji-15])),Ir[ji-16]),si=$i($i($i($i(Hn,Wi(Ni)),Ar(Ni,Oi,Mi)),Bn[ji]),Ir[ji]),Mr=$i(Ei(Hr),Kr(Hr,Br,Vr)),Hn=Mi,Mi=Oi,Oi=Ni,Ni=$i(mi,si),mi=Vr,Vr=Br,Br=Hr,Hr=$i(si,Mr);zt[0]=$i(Hr,zt[0]),zt[1]=$i(Br,zt[1]),zt[2]=$i(Vr,zt[2]),zt[3]=$i(mi,zt[3]),zt[4]=$i(Ni,zt[4]),zt[5]=$i(Oi,zt[5]),zt[6]=$i(Mi,zt[6]),zt[7]=$i(Hn,zt[7])}return zt}function $i(Ee,xt){var zt=(Ee&65535)+(xt&65535),Ir=(Ee>>16)+(xt>>16)+(zt>>16);return Ir<<16|zt&65535}function an(Ee){return Array.prototype.slice.call(Ee)}function Di(Ee){return an(Ee).join(\"\")}function $n(Ee){var xt=Ee&&Ee.cache,zt=0,Ir=[],Hr=[],Br=[];function Vr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi<Hr.length;++xi)if(Hr[xi]===si&&!Br[xi])return Ir[xi]}var Ii=\"g\"+zt++;return Ir.push(Ii),Hr.push(si),Br.push(Yr),Ii}function mi(){var si=[];function Mr(){si.push.apply(si,an(arguments))}var Yr=[];function xi(){var Ii=\"v\"+zt++;return Yr.push(Ii),arguments.length>0&&(si.push(Ii,\"=\"),si.push.apply(si,an(arguments)),si.push(\";\")),Ii}return e(Mr,{def:xi,toString:function(){return Di([Yr.length>0?\"var \"+Yr.join(\",\")+\";\":\"\",Di(si)])}})}function Ni(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ii(ci,nn){Mr(ci,nn,\"=\",si.def(ci,nn),\";\")}return e(function(){si.apply(si,an(arguments))},{def:si.def,entry:si,exit:Mr,save:Ii,set:function(ci,nn,Xi){Ii(ci,nn),si(ci,nn,\"=\",Xi,\";\")},toString:function(){return Yr()+xi()}})}function Oi(){var si=Di(arguments),Mr=Ni(),Yr=Ni(),xi=Mr.toString,Ii=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,an(arguments)),this},else:function(){return Yr.apply(Yr,an(arguments)),this},toString:function(){var ci=Ii();return ci&&(ci=\"else{\"+ci+\"}\"),Di([\"if(\",si,\"){\",xi(),\"}\",ci])}})}var Mi=mi(),Hn={};function Qi(si,Mr){var Yr=[];function xi(){var qn=\"a\"+Yr.length;return Yr.push(qn),qn}Mr=Mr||0;for(var Ii=0;Ii<Mr;++Ii)xi();var ci=Ni(),nn=ci.toString,Xi=Hn[si]=e(ci,{arg:xi,toString:function(){return Di([\"function(\",Yr.join(),\"){\",nn(),\"}\"])}});return Xi}function ji(){var si=['\"use strict\";',Mi,\"return {\"];Object.keys(Hn).forEach(function(Ii){si.push('\"',Ii,'\":',Hn[Ii].toString(),\",\")}),si.push(\"}\");var Mr=Di(si).replace(/;/g,`;\n",
       "`).replace(/}/g,`}\n",
       "`).replace(/{/g,`{\n",
       "`),Yr;if(xt&&(Yr=Oc(Mr),xt[Yr]))return xt[Yr].apply(null,Hr);var xi=Function.apply(null,Ir.concat(Mr));return xt&&(xt[Yr]=xi),xi.apply(null,Hr)}return{global:Mi,link:Vr,block:mi,proc:Qi,scope:Ni,cond:Oi,compile:ji}}var ka=\"xyzw\".split(\"\"),Ra=5121,La=1,Na=2,Yn=0,zn=1,Ka=2,bo=3,Xo=4,Ms=5,os=6,Ts=\"dither\",Ho=\"blend.enable\",yl=\"blend.color\",Xs=\"blend.equation\",Ps=\"blend.func\",va=\"depth.enable\",no=\"depth.func\",_s=\"depth.range\",is=\"depth.mask\",$l=\"colorMask\",ku=\"cull.enable\",Yu=\"cull.face\",Nc=\"frontFace\",pu=\"lineWidth\",Uc=\"polygonOffset.enable\",xu=\"polygonOffset.offset\",Ac=\"sample.alpha\",Ua=\"sample.enable\",oo=\"sample.coverage\",Vc=\"stencil.enable\",hc=\"stencil.mask\",Ku=\"stencil.func\",ue=\"stencil.opFront\",w=\"stencil.opBack\",B=\"scissor.enable\",Q=\"scissor.box\",ee=\"viewport\",le=\"profile\",qe=\"framebuffer\",Xe=\"vert\",ot=\"frag\",Tt=\"elements\",Kt=\"primitive\",Jt=\"count\",xr=\"offset\",Pr=\"instances\",ve=\"vao\",be=\"Width\",Re=\"Height\",Be=qe+be,tt=qe+Re,We=ee+be,it=ee+Re,Dt=\"drawingBuffer\",Ht=Dt+be,rr=Dt+Re,dr=[Ps,Xs,Ku,ue,w,oo,ee,Q,xu],Sr=34962,Or=34963,jr=2884,ii=3042,Li=3024,un=2960,sn=2929,In=3089,Kn=32823,Aa=32926,fa=32928,$a=5126,ko=35664,Qa=35665,mo=35666,Bo=5124,Is=35667,As=35668,wo=35669,To=35670,dl=35671,Ul=35672,Lu=35673,au=35674,$s=35675,Ql=35676,dc=35678,Al=35680,Sl=4,X=1028,se=1029,Te=2304,Ne=2305,He=32775,Ye=32776,Ct=519,nt=7680,jt=0,gr=1,yr=32774,Gr=513,qr=36160,_i=36064,bi={0:0,1:1,zero:0,one:1,\"src color\":768,\"one minus src color\":769,\"src alpha\":770,\"one minus src alpha\":771,\"dst color\":774,\"one minus dst color\":775,\"dst alpha\":772,\"one minus dst alpha\":773,\"constant color\":32769,\"one minus constant color\":32770,\"constant alpha\":32771,\"one minus constant alpha\":32772,\"src alpha saturate\":776},Xr={never:512,less:513,\"<\":513,equal:514,\"=\":514,\"==\":514,\"===\":514,lequal:515,\"<=\":515,greater:516,\">\":516,notequal:517,\"!=\":517,\"!==\":517,gequal:518,\">=\":518,always:519},ni={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},gi={cw:Te,ccw:Ne};function Pi(Ee){return Array.isArray(Ee)||Wr(Ee)||Ur(Ee)}function Ai(Ee){return Ee.sort(function(xt,zt){return xt===ee?-1:zt===ee?1:xt<zt?-1:1})}function ti(Ee,xt,zt,Ir){this.thisDep=Ee,this.contextDep=xt,this.propDep=zt,this.append=Ir}function Rn(Ee){return Ee&&!(Ee.thisDep||Ee.contextDep||Ee.propDep)}function Cn(Ee){return new ti(!1,!1,!1,Ee)}function Nn(Ee,xt){var zt=Ee.type;if(zt===Yn){var Ir=Ee.data.length;return new ti(!0,Ir>=1,Ir>=2,xt)}else if(zt===Xo){var Hr=Ee.data;return new ti(Hr.thisDep,Hr.contextDep,Hr.propDep,xt)}else{if(zt===Ms)return new ti(!1,!1,!1,xt);if(zt===os){for(var Br=!1,Vr=!1,mi=!1,Ni=0;Ni<Ee.data.length;++Ni){var Oi=Ee.data[Ni];if(Oi.type===zn)mi=!0;else if(Oi.type===Ka)Vr=!0;else if(Oi.type===bo)Br=!0;else if(Oi.type===Yn){Br=!0;var Mi=Oi.data;Mi>=1&&(Vr=!0),Mi>=2&&(mi=!0)}else Oi.type===Xo&&(Br=Br||Oi.data.thisDep,Vr=Vr||Oi.data.contextDep,mi=mi||Oi.data.propDep)}return new ti(Br,Vr,mi,xt)}else return new ti(zt===bo,zt===Ka,zt===zn,xt)}}var ia=new ti(!1,!1,!1,function(){});function Ea(Ee,xt,zt,Ir,Hr,Br,Vr,mi,Ni,Oi,Mi,Hn,Qi,ji,si,Mr){var Yr=Oi.Record,xi={add:32774,subtract:32778,\"reverse subtract\":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ii=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,nn=zt.oes_vertex_array_object,Xi={dirty:!0,profile:Mr.profile},qn={},vi=[],li={},mn={};function Ki(Ve){return Ve.replace(\".\",\"_\")}function Ui(Ve,et,at){var kt=Ki(Ve);vi.push(Ve),qn[kt]=Xi[kt]=!!at,li[kt]=et}function Bi(Ve,et,at){var kt=Ki(Ve);vi.push(Ve),Array.isArray(at)?(Xi[kt]=at.slice(),qn[kt]=at.slice()):Xi[kt]=qn[kt]=at,mn[kt]=et}function vn(Ve){return!!isNaN(Ve)}Ui(Ts,Li),Ui(Ho,ii),Bi(yl,\"blendColor\",[0,0,0,0]),Bi(Xs,\"blendEquationSeparate\",[yr,yr]),Bi(Ps,\"blendFuncSeparate\",[gr,jt,gr,jt]),Ui(va,sn,!0),Bi(no,\"depthFunc\",Gr),Bi(_s,\"depthRange\",[0,1]),Bi(is,\"depthMask\",!0),Bi($l,$l,[!0,!0,!0,!0]),Ui(ku,jr),Bi(Yu,\"cullFace\",se),Bi(Nc,Nc,Ne),Bi(pu,pu,1),Ui(Uc,Kn),Bi(xu,\"polygonOffset\",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,\"sampleCoverage\",[1,!1]),Ui(Vc,un),Bi(hc,\"stencilMask\",-1),Bi(Ku,\"stencilFunc\",[Ct,0,-1]),Bi(ue,\"stencilOpSeparate\",[X,nt,nt,nt]),Bi(w,\"stencilOpSeparate\",[se,nt,nt,nt]),Ui(B,In),Bi(Q,\"scissor\",[0,0,Ee.drawingBufferWidth,Ee.drawingBufferHeight]),Bi(ee,ee,[0,0,Ee.drawingBufferWidth,Ee.drawingBufferHeight]);var Un={gl:Ee,context:Qi,strings:xt,next:qn,current:Xi,draw:Hn,elements:Br,buffer:Hr,shader:Mi,attributes:Oi.state,vao:Oi,uniforms:Ni,framebuffer:mi,extensions:zt,timer:ji,isBufferArgs:Pi},na={primTypes:Mn,compareFuncs:Xr,blendFuncs:bi,blendEquations:xi,stencilOps:ni,glTypes:Hi,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Ir.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(et){return _i+et})}));var Yi=0;function Ln(){var Ve=$n({cache:si}),et=Ve.link,at=Ve.global;Ve.id=Yi++,Ve.batchId=\"0\";var kt=et(Un),Ot=Ve.shared={props:\"a0\"};Object.keys(Un).forEach(function(Pt){Ot[Pt]=at.def(kt,\".\",Pt)});var It=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Xi[Pt])&&(It[Pt]=at.def(Ot.next,\".\",Pt),Bt[Pt]=at.def(Ot.current,\".\",Pt))});var Rt=Ve.constants={};Object.keys(na).forEach(function(Pt){Rt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var cr=[\"this\",Ot.context,Ot.props,Ve.batchId];return Pt.def(et(ht.data),\".call(\",cr.slice(0,Math.max(ht.data.length+1,4)),\")\");case zn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def(\"this\",ht.data);case Xo:return ht.data.append(Ve,Pt),ht.data.ref;case Ms:return ht.data.toString();case os:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var mt={};return Ve.scopeAttrib=function(Pt){var ht=xt.id(Pt);if(ht in mt)return mt[ht];var cr=Oi.scope[ht];cr||(cr=Oi.scope[ht]=new Yr);var br=mt[ht]=et(cr);return br},Ve}function ra(Ve){var et=Ve.static,at=Ve.dynamic,kt;if(le in et){var Ot=!!et[le];kt=Cn(function(Bt,Rt){return Ot}),kt.enable=Ot}else if(le in at){var It=at[le];kt=Nn(It,function(Bt,Rt){return Bt.invoke(Rt,It)})}return kt}function oa(Ve,et){var at=Ve.static,kt=Ve.dynamic;if(qe in at){var Ot=at[qe];return Ot?(Ot=mi.getFramebuffer(Ot),Cn(function(Bt,Rt){var mt=Bt.link(Ot),Pt=Bt.shared;Rt.set(Pt.framebuffer,\".next\",mt);var ht=Pt.context;return Rt.set(ht,\".\"+Be,mt+\".width\"),Rt.set(ht,\".\"+tt,mt+\".height\"),mt})):Cn(function(Bt,Rt){var mt=Bt.shared;Rt.set(mt.framebuffer,\".next\",\"null\");var Pt=mt.context;return Rt.set(Pt,\".\"+Be,Pt+\".\"+Ht),Rt.set(Pt,\".\"+tt,Pt+\".\"+rr),\"null\"})}else if(qe in kt){var It=kt[qe];return Nn(It,function(Bt,Rt){var mt=Bt.invoke(Rt,It),Pt=Bt.shared,ht=Pt.framebuffer,cr=Rt.def(ht,\".getFramebuffer(\",mt,\")\");Rt.set(ht,\".next\",cr);var br=Pt.context;return Rt.set(br,\".\"+Be,cr+\"?\"+cr+\".width:\"+br+\".\"+Ht),Rt.set(br,\".\"+tt,cr+\"?\"+cr+\".height:\"+br+\".\"+rr),cr})}else return null}function wa(Ve,et,at){var kt=Ve.static,Ot=Ve.dynamic;function It(mt){if(mt in kt){var Pt=kt[mt],ht=!0,cr=Pt.x|0,br=Pt.y|0,Nr,Ri;return\"width\"in Pt?Nr=Pt.width|0:ht=!1,\"height\"in Pt?Ri=Pt.height|0:ht=!1,new ti(!ht&&et&&et.thisDep,!ht&&et&&et.contextDep,!ht&&et&&et.propDep,function(gn,tn){var Ci=gn.shared.context,qi=Nr;\"width\"in Pt||(qi=tn.def(Ci,\".\",Be,\"-\",cr));var Vi=Ri;return\"height\"in Pt||(Vi=tn.def(Ci,\".\",tt,\"-\",br)),[cr,br,qi,Vi]})}else if(mt in Ot){var hi=Ot[mt],wi=Nn(hi,function(gn,tn){var Ci=gn.invoke(tn,hi),qi=gn.shared.context,Vi=tn.def(Ci,\".x|0\"),on=tn.def(Ci,\".y|0\"),On=tn.def('\"width\" in ',Ci,\"?\",Ci,\".width|0:\",\"(\",qi,\".\",Be,\"-\",Vi,\")\"),Ja=tn.def('\"height\" in ',Ci,\"?\",Ci,\".height|0:\",\"(\",qi,\".\",tt,\"-\",on,\")\");return[Vi,on,On,Ja]});return et&&(wi.thisDep=wi.thisDep||et.thisDep,wi.contextDep=wi.contextDep||et.contextDep,wi.propDep=wi.propDep||et.propDep),wi}else return et?new ti(et.thisDep,et.contextDep,et.propDep,function(gn,tn){var Ci=gn.shared.context;return[0,0,tn.def(Ci,\".\",Be),tn.def(Ci,\".\",tt)]}):null}var Bt=It(ee);if(Bt){var Rt=Bt;Bt=new ti(Bt.thisDep,Bt.contextDep,Bt.propDep,function(mt,Pt){var ht=Rt.append(mt,Pt),cr=mt.shared.context;return Pt.set(cr,\".\"+We,ht[2]),Pt.set(cr,\".\"+it,ht[3]),ht})}return{viewport:Bt,scissor_box:It(Q)}}function ns(Ve,et){var at=Ve.static,kt=typeof at[ot]==\"string\"&&typeof at[Xe]==\"string\";if(kt){if(Object.keys(et.dynamic).length>0)return null;var Ot=et.static,It=Object.keys(Ot);if(It.length>0&&typeof Ot[It[0]]==\"number\"){for(var Bt=[],Rt=0;Rt<It.length;++Rt)Bt.push([Ot[It[Rt]]|0,It[Rt]]);return Bt}}return null}function Ys(Ve,et,at){var kt=Ve.static,Ot=Ve.dynamic;function It(ht){if(ht in kt){var cr=xt.id(kt[ht]),br=Cn(function(){return cr});return br.id=cr,br}else if(ht in Ot){var Nr=Ot[ht];return Nn(Nr,function(Ri,hi){var wi=Ri.invoke(hi,Nr),gn=hi.def(Ri.shared.strings,\".id(\",wi,\")\");return gn})}return null}var Bt=It(ot),Rt=It(Xe),mt=null,Pt;return Rn(Bt)&&Rn(Rt)?(mt=Mi.program(Rt.id,Bt.id,null,at),Pt=Cn(function(ht,cr){return ht.link(mt)})):Pt=new ti(Bt&&Bt.thisDep||Rt&&Rt.thisDep,Bt&&Bt.contextDep||Rt&&Rt.contextDep,Bt&&Bt.propDep||Rt&&Rt.propDep,function(ht,cr){var br=ht.shared.shader,Nr;Bt?Nr=Bt.append(ht,cr):Nr=cr.def(br,\".\",ot);var Ri;Rt?Ri=Rt.append(ht,cr):Ri=cr.def(br,\".\",Xe);var hi=br+\".program(\"+Ri+\",\"+Nr;return cr.def(hi+\")\")}),{frag:Bt,vert:Rt,progVar:Pt,program:mt}}function Va(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={},It=!1;function Bt(){if(ve in at){var tn=at[ve];return tn!==null&&Oi.getVAO(tn)===null&&(tn=Oi.createVAO(tn)),It=!0,Ot.vao=tn,Cn(function(qi){var Vi=Oi.getVAO(tn);return Vi?qi.link(Vi):\"null\"})}else if(ve in kt){It=!0;var Ci=kt[ve];return Nn(Ci,function(qi,Vi){var on=qi.invoke(Vi,Ci);return Vi.def(qi.shared.vao+\".getVAO(\"+on+\")\")})}return null}var Rt=Bt(),mt=!1;function Pt(){if(Tt in at){var tn=at[Tt];if(Ot.elements=tn,Pi(tn)){var Ci=Ot.elements=Br.create(tn,!0);tn=Br.getElements(Ci),mt=!0}else tn&&(tn=Br.getElements(tn),mt=!0);var qi=Cn(function(on,On){if(tn){var Ja=on.link(tn);return on.ELEMENTS=Ja,Ja}return on.ELEMENTS=null,null});return qi.value=tn,qi}else if(Tt in kt){mt=!0;var Vi=kt[Tt];return Nn(Vi,function(on,On){var Ja=on.shared,co=Ja.isBufferArgs,rs=Ja.elements,so=on.invoke(On,Vi),Zo=On.def(\"null\"),ys=On.def(co,\"(\",so,\")\"),ou=on.cond(ys).then(Zo,\"=\",rs,\".createStream(\",so,\");\").else(Zo,\"=\",rs,\".getElements(\",so,\");\");return On.entry(ou),On.exit(on.cond(ys).then(rs,\".destroyStream(\",Zo,\");\")),on.ELEMENTS=Zo,Zo})}else if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.elements+\".getElements(\"+on.shared.vao+\".currentVAO.elements):null\")});return null}var ht=Pt();function cr(){if(Kt in at){var tn=at[Kt];return Ot.primitive=tn,Cn(function(qi,Vi){return Mn[tn]})}else if(Kt in kt){var Ci=kt[Kt];return Nn(Ci,function(qi,Vi){var on=qi.constants.primTypes,On=qi.invoke(Vi,Ci);return Vi.def(on,\"[\",On,\"]\")})}else{if(mt)return Rn(ht)?ht.value?Cn(function(qi,Vi){return Vi.def(qi.ELEMENTS,\".primType\")}):Cn(function(){return Sl}):new ti(ht.thisDep,ht.contextDep,ht.propDep,function(qi,Vi){var on=qi.ELEMENTS;return Vi.def(on,\"?\",on,\".primType:\",Sl)});if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(qi,Vi){return Vi.def(qi.shared.vao+\".currentVAO?\"+qi.shared.vao+\".currentVAO.primitive:\"+Sl)})}return null}function br(tn,Ci){if(tn in at){var qi=at[tn]|0;return Ci?Ot.offset=qi:Ot.instances=qi,Cn(function(on,On){return Ci&&(on.OFFSET=qi),qi})}else if(tn in kt){var Vi=kt[tn];return Nn(Vi,function(on,On){var Ja=on.invoke(On,Vi);return Ci&&(on.OFFSET=Ja),Ja})}else if(Ci){if(mt)return Cn(function(on,On){return on.OFFSET=0,0});if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.vao+\".currentVAO.offset:0\")})}else if(It)return new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(on,On){return On.def(on.shared.vao+\".currentVAO?\"+on.shared.vao+\".currentVAO.instances:-1\")});return null}var Nr=br(xr,!0);function Ri(){if(Jt in at){var tn=at[Jt]|0;return Ot.count=tn,Cn(function(){return tn})}else if(Jt in kt){var Ci=kt[Jt];return Nn(Ci,function(On,Ja){var co=On.invoke(Ja,Ci);return co})}else if(mt)if(Rn(ht)){if(ht)return Nr?new ti(Nr.thisDep,Nr.contextDep,Nr.propDep,function(On,Ja){var co=Ja.def(On.ELEMENTS,\".vertCount-\",On.OFFSET);return co}):Cn(function(On,Ja){return Ja.def(On.ELEMENTS,\".vertCount\")});var qi=Cn(function(){return-1});return qi}else{var Vi=new ti(ht.thisDep||Nr.thisDep,ht.contextDep||Nr.contextDep,ht.propDep||Nr.propDep,function(On,Ja){var co=On.ELEMENTS;return On.OFFSET?Ja.def(co,\"?\",co,\".vertCount-\",On.OFFSET,\":-1\"):Ja.def(co,\"?\",co,\".vertCount:-1\")});return Vi}else if(It){var on=new ti(Rt.thisDep,Rt.contextDep,Rt.propDep,function(On,Ja){return Ja.def(On.shared.vao,\".currentVAO?\",On.shared.vao,\".currentVAO.count:-1\")});return on}return null}var hi=cr(),wi=Ri(),gn=br(Pr,!1);return{elements:ht,primitive:hi,count:wi,instances:gn,offset:Nr,vao:Rt,vaoActive:It,elementsActive:mt,static:Ot}}function El(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return vi.forEach(function(It){var Bt=Ki(It);function Rt(mt,Pt){if(It in at){var ht=mt(at[It]);Ot[Bt]=Cn(function(){return ht})}else if(It in kt){var cr=kt[It];Ot[Bt]=Nn(cr,function(br,Nr){return Pt(br,Nr,br.invoke(Nr,cr))})}}switch(It){case ku:case Ho:case Ts:case Vc:case va:case B:case Uc:case Ac:case Ua:case is:return Rt(function(mt){return mt},function(mt,Pt,ht){return ht});case no:return Rt(function(mt){return Xr[mt]},function(mt,Pt,ht){var cr=mt.constants.compareFuncs;return Pt.def(cr,\"[\",ht,\"]\")});case _s:return Rt(function(mt){return mt},function(mt,Pt,ht){var cr=Pt.def(\"+\",ht,\"[0]\"),br=Pt.def(\"+\",ht,\"[1]\");return[cr,br]});case Ps:return Rt(function(mt){var Pt=\"srcRGB\"in mt?mt.srcRGB:mt.src,ht=\"srcAlpha\"in mt?mt.srcAlpha:mt.src,cr=\"dstRGB\"in mt?mt.dstRGB:mt.dst,br=\"dstAlpha\"in mt?mt.dstAlpha:mt.dst;return[bi[Pt],bi[cr],bi[ht],bi[br]]},function(mt,Pt,ht){var cr=mt.constants.blendFuncs;function br(Ci,qi){var Vi=Pt.def('\"',Ci,qi,'\" in ',ht,\"?\",ht,\".\",Ci,qi,\":\",ht,\".\",Ci);return Vi}var Nr=br(\"src\",\"RGB\"),Ri=br(\"dst\",\"RGB\"),hi=Pt.def(cr,\"[\",Nr,\"]\"),wi=Pt.def(cr,\"[\",br(\"src\",\"Alpha\"),\"]\"),gn=Pt.def(cr,\"[\",Ri,\"]\"),tn=Pt.def(cr,\"[\",br(\"dst\",\"Alpha\"),\"]\");return[hi,gn,wi,tn]});case Xs:return Rt(function(mt){if(typeof mt==\"string\")return[xi[mt],xi[mt]];if(typeof mt==\"object\")return[xi[mt.rgb],xi[mt.alpha]]},function(mt,Pt,ht){var cr=mt.constants.blendEquations,br=Pt.def(),Nr=Pt.def(),Ri=mt.cond(\"typeof \",ht,'===\"string\"');return Ri.then(br,\"=\",Nr,\"=\",cr,\"[\",ht,\"];\"),Ri.else(br,\"=\",cr,\"[\",ht,\".rgb];\",Nr,\"=\",cr,\"[\",ht,\".alpha];\"),Pt(Ri),[br,Nr]});case yl:return Rt(function(mt){return M(4,function(Pt){return+mt[Pt]})},function(mt,Pt,ht){return M(4,function(cr){return Pt.def(\"+\",ht,\"[\",cr,\"]\")})});case hc:return Rt(function(mt){return mt|0},function(mt,Pt,ht){return Pt.def(ht,\"|0\")});case Ku:return Rt(function(mt){var Pt=mt.cmp||\"keep\",ht=mt.ref||0,cr=\"mask\"in mt?mt.mask:-1;return[Xr[Pt],ht,cr]},function(mt,Pt,ht){var cr=mt.constants.compareFuncs,br=Pt.def('\"cmp\" in ',ht,\"?\",cr,\"[\",ht,\".cmp]\",\":\",nt),Nr=Pt.def(ht,\".ref|0\"),Ri=Pt.def('\"mask\" in ',ht,\"?\",ht,\".mask|0:-1\");return[br,Nr,Ri]});case ue:case w:return Rt(function(mt){var Pt=mt.fail||\"keep\",ht=mt.zfail||\"keep\",cr=mt.zpass||\"keep\";return[It===w?se:X,ni[Pt],ni[ht],ni[cr]]},function(mt,Pt,ht){var cr=mt.constants.stencilOps;function br(Nr){return Pt.def('\"',Nr,'\" in ',ht,\"?\",cr,\"[\",ht,\".\",Nr,\"]:\",nt)}return[It===w?se:X,br(\"fail\"),br(\"zfail\"),br(\"zpass\")]});case xu:return Rt(function(mt){var Pt=mt.factor|0,ht=mt.units|0;return[Pt,ht]},function(mt,Pt,ht){var cr=Pt.def(ht,\".factor|0\"),br=Pt.def(ht,\".units|0\");return[cr,br]});case Yu:return Rt(function(mt){var Pt=0;return mt===\"front\"?Pt=X:mt===\"back\"&&(Pt=se),Pt},function(mt,Pt,ht){return Pt.def(ht,'===\"front\"?',X,\":\",se)});case pu:return Rt(function(mt){return mt},function(mt,Pt,ht){return ht});case Nc:return Rt(function(mt){return gi[mt]},function(mt,Pt,ht){return Pt.def(ht+'===\"cw\"?'+Te+\":\"+Ne)});case $l:return Rt(function(mt){return mt.map(function(Pt){return!!Pt})},function(mt,Pt,ht){return M(4,function(cr){return\"!!\"+ht+\"[\"+cr+\"]\"})});case oo:return Rt(function(mt){var Pt=\"value\"in mt?mt.value:1,ht=!!mt.invert;return[Pt,ht]},function(mt,Pt,ht){var cr=Pt.def('\"value\" in ',ht,\"?+\",ht,\".value:1\"),br=Pt.def(\"!!\",ht,\".invert\");return[cr,br]})}}),Ot}function zo(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(It){var Bt=at[It],Rt;if(typeof Bt==\"number\"||typeof Bt==\"boolean\")Rt=Cn(function(){return Bt});else if(typeof Bt==\"function\"){var mt=Bt._reglType;mt===\"texture2d\"||mt===\"textureCube\"?Rt=Cn(function(Pt){return Pt.link(Bt)}):(mt===\"framebuffer\"||mt===\"framebufferCube\")&&(Rt=Cn(function(Pt){return Pt.link(Bt.color[0])}))}else En(Bt)&&(Rt=Cn(function(Pt){var ht=Pt.global.def(\"[\",M(Bt.length,function(cr){return Bt[cr]}),\"]\");return ht}));Rt.value=Bt,Ot[It]=Rt}),Object.keys(kt).forEach(function(It){var Bt=kt[It];Ot[It]=Nn(Bt,function(Rt,mt){return Rt.invoke(mt,Bt)})}),Ot}function el(Ve,et){var at=Ve.static,kt=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(It){var Bt=at[It],Rt=xt.id(It),mt=new Yr;if(Pi(Bt))mt.state=La,mt.buffer=Hr.getBuffer(Hr.create(Bt,Sr,!1,!0)),mt.type=0;else{var Pt=Hr.getBuffer(Bt);if(Pt)mt.state=La,mt.buffer=Pt,mt.type=0;else if(\"constant\"in Bt){var ht=Bt.constant;mt.buffer=\"null\",mt.state=Na,typeof ht==\"number\"?mt.x=ht:ka.forEach(function(gn,tn){tn<ht.length&&(mt[gn]=ht[tn])})}else{Pi(Bt.buffer)?Pt=Hr.getBuffer(Hr.create(Bt.buffer,Sr,!1,!0)):Pt=Hr.getBuffer(Bt.buffer);var cr=Bt.offset|0,br=Bt.stride|0,Nr=Bt.size|0,Ri=!!Bt.normalized,hi=0;\"type\"in Bt&&(hi=Hi[Bt.type]);var wi=Bt.divisor|0;mt.buffer=Pt,mt.state=La,mt.size=Nr,mt.normalized=Ri,mt.type=hi||Pt.dtype,mt.offset=cr,mt.stride=br,mt.divisor=wi}}Ot[It]=Cn(function(gn,tn){var Ci=gn.attribCache;if(Rt in Ci)return Ci[Rt];var qi={isStream:!1};return Object.keys(mt).forEach(function(Vi){qi[Vi]=mt[Vi]}),mt.buffer&&(qi.buffer=gn.link(mt.buffer),qi.type=qi.type||qi.buffer+\".dtype\"),Ci[Rt]=qi,qi})}),Object.keys(kt).forEach(function(It){var Bt=kt[It];function Rt(mt,Pt){var ht=mt.invoke(Pt,Bt),cr=mt.shared,br=mt.constants,Nr=cr.isBufferArgs,Ri=cr.buffer,hi={isStream:Pt.def(!1)},wi=new Yr;wi.state=La,Object.keys(wi).forEach(function(qi){hi[qi]=Pt.def(\"\"+wi[qi])});var gn=hi.buffer,tn=hi.type;Pt(\"if(\",Nr,\"(\",ht,\")){\",hi.isStream,\"=true;\",gn,\"=\",Ri,\".createStream(\",Sr,\",\",ht,\");\",tn,\"=\",gn,\".dtype;\",\"}else{\",gn,\"=\",Ri,\".getBuffer(\",ht,\");\",\"if(\",gn,\"){\",tn,\"=\",gn,\".dtype;\",'}else if(\"constant\" in ',ht,\"){\",hi.state,\"=\",Na,\";\",\"if(typeof \"+ht+'.constant === \"number\"){',hi[ka[0]],\"=\",ht,\".constant;\",ka.slice(1).map(function(qi){return hi[qi]}).join(\"=\"),\"=0;\",\"}else{\",ka.map(function(qi,Vi){return hi[qi]+\"=\"+ht+\".constant.length>\"+Vi+\"?\"+ht+\".constant[\"+Vi+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",Nr,\"(\",ht,\".buffer)){\",gn,\"=\",Ri,\".createStream(\",Sr,\",\",ht,\".buffer);\",\"}else{\",gn,\"=\",Ri,\".getBuffer(\",ht,\".buffer);\",\"}\",tn,'=\"type\" in ',ht,\"?\",br.glTypes,\"[\",ht,\".type]:\",gn,\".dtype;\",hi.normalized,\"=!!\",ht,\".normalized;\");function Ci(qi){Pt(hi[qi],\"=\",ht,\".\",qi,\"|0;\")}return Ci(\"size\"),Ci(\"offset\"),Ci(\"stride\"),Ci(\"divisor\"),Pt(\"}}\"),Pt.exit(\"if(\",hi.isStream,\"){\",Ri,\".destroyStream(\",gn,\");\",\"}\"),hi}Ot[It]=Nn(Bt,Rt)}),Ot}function ol(Ve){var et=Ve.static,at=Ve.dynamic,kt={};return Object.keys(et).forEach(function(Ot){var It=et[Ot];kt[Ot]=Cn(function(Bt,Rt){return typeof It==\"number\"||typeof It==\"boolean\"?\"\"+It:Bt.link(It)})}),Object.keys(at).forEach(function(Ot){var It=at[Ot];kt[Ot]=Nn(It,function(Bt,Rt){return Bt.invoke(Rt,It)})}),kt}function Vl(Ve,et,at,kt,Ot){var It=Ve.static,Bt=Ve.dynamic,Rt=ns(Ve,et),mt=oa(Ve,Ot),Pt=wa(Ve,mt,Ot),ht=Va(Ve,Ot),cr=El(Ve,Ot),br=Ys(Ve,Ot,Rt);function Nr(Ci){var qi=Pt[Ci];qi&&(cr[Ci]=qi)}Nr(ee),Nr(Ki(Q));var Ri=Object.keys(cr).length>0,hi={framebuffer:mt,draw:ht,shader:br,state:cr,dirty:Ri,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(hi.profile=ra(Ve,Ot),hi.uniforms=zo(at,Ot),hi.drawVAO=hi.scopeVAO=ht.vao,!hi.drawVAO&&br.program&&!Rt&&zt.angle_instanced_arrays&&ht.static.elements){var wi=!0,gn=br.program.attributes.map(function(Ci){var qi=et.static[Ci];return wi=wi&&!!qi,qi});if(wi&&gn.length>0){var tn=Oi.getVAO(Oi.createVAO({attributes:gn,elements:ht.static.elements}));hi.drawVAO=new ti(null,null,null,function(Ci,qi){return Ci.link(tn)}),hi.useVAO=!0}}return Rt?hi.useVAO=!0:hi.attributes=el(et,Ot),hi.context=ol(kt,Ot),hi}function ls(Ve,et,at){var kt=Ve.shared,Ot=kt.context,It=Ve.scope();Object.keys(at).forEach(function(Bt){et.save(Ot,\".\"+Bt);var Rt=at[Bt],mt=Rt.append(Ve,et);Array.isArray(mt)?It(Ot,\".\",Bt,\"=[\",mt.join(),\"];\"):It(Ot,\".\",Bt,\"=\",mt,\";\")}),et(It)}function Gs(Ve,et,at,kt){var Ot=Ve.shared,It=Ot.gl,Bt=Ot.framebuffer,Rt;ci&&(Rt=et.def(Ot.extensions,\".webgl_draw_buffers\"));var mt=Ve.constants,Pt=mt.drawBuffer,ht=mt.backBuffer,cr;at?cr=at.append(Ve,et):cr=et.def(Bt,\".next\"),kt||et(\"if(\",cr,\"!==\",Bt,\".cur){\"),et(\"if(\",cr,\"){\",It,\".bindFramebuffer(\",qr,\",\",cr,\".framebuffer);\"),ci&&et(Rt,\".drawBuffersWEBGL(\",Pt,\"[\",cr,\".colorAttachments.length]);\"),et(\"}else{\",It,\".bindFramebuffer(\",qr,\",null);\"),ci&&et(Rt,\".drawBuffersWEBGL(\",ht,\");\"),et(\"}\",Bt,\".cur=\",cr,\";\"),kt||et(\"}\")}function Ks(Ve,et,at){var kt=Ve.shared,Ot=kt.gl,It=Ve.current,Bt=Ve.next,Rt=kt.current,mt=kt.next,Pt=Ve.cond(Rt,\".dirty\");vi.forEach(function(ht){var cr=Ki(ht);if(!(cr in at.state)){var br,Nr;if(cr in Bt){br=Bt[cr],Nr=It[cr];var Ri=M(Xi[cr].length,function(wi){return Pt.def(br,\"[\",wi,\"]\")});Pt(Ve.cond(Ri.map(function(wi,gn){return wi+\"!==\"+Nr+\"[\"+gn+\"]\"}).join(\"||\")).then(Ot,\".\",mn[cr],\"(\",Ri,\");\",Ri.map(function(wi,gn){return Nr+\"[\"+gn+\"]=\"+wi}).join(\";\"),\";\"))}else{br=Pt.def(mt,\".\",cr);var hi=Ve.cond(br,\"!==\",Rt,\".\",cr);Pt(hi),cr in li?hi(Ve.cond(br).then(Ot,\".enable(\",li[cr],\");\").else(Ot,\".disable(\",li[cr],\");\"),Rt,\".\",cr,\"=\",br,\";\"):hi(Ot,\".\",mn[cr],\"(\",br,\");\",Rt,\".\",cr,\"=\",br,\";\")}}}),Object.keys(at.state).length===0&&Pt(Rt,\".dirty=false;\"),et(Pt)}function Ta(Ve,et,at,kt){var Ot=Ve.shared,It=Ve.current,Bt=Ot.current,Rt=Ot.gl,mt;Ai(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(kt&&!kt(ht))){var cr=ht.append(Ve,et);if(li[Pt]){var br=li[Pt];Rn(ht)?(mt=Ve.link(cr,{stable:!0}),et(Ve.cond(mt).then(Rt,\".enable(\",br,\");\").else(Rt,\".disable(\",br,\");\")),et(Bt,\".\",Pt,\"=\",mt,\";\")):(et(Ve.cond(cr).then(Rt,\".enable(\",br,\");\").else(Rt,\".disable(\",br,\");\")),et(Bt,\".\",Pt,\"=\",cr,\";\"))}else if(En(cr)){var Nr=It[Pt];et(Rt,\".\",mn[Pt],\"(\",cr,\");\",cr.map(function(Ri,hi){return Nr+\"[\"+hi+\"]=\"+Ri}).join(\";\"),\";\")}else Rn(ht)?(mt=Ve.link(cr,{stable:!0}),et(Rt,\".\",mn[Pt],\"(\",mt,\");\",Bt,\".\",Pt,\"=\",mt,\";\")):et(Rt,\".\",mn[Pt],\"(\",cr,\");\",Bt,\".\",Pt,\"=\",cr,\";\")}})}function sl(Ve,et){Ii&&(Ve.instancing=et.def(Ve.shared.extensions,\".angle_instanced_arrays\"))}function io(Ve,et,at,kt,Ot){var It=Ve.shared,Bt=Ve.stats,Rt=It.current,mt=It.timer,Pt=at.profile;function ht(){return typeof performance==\"undefined\"?\"Date.now()\":\"performance.now()\"}var cr,br;function Nr(Ci){cr=et.def(),Ci(cr,\"=\",ht(),\";\"),typeof Ot==\"string\"?Ci(Bt,\".count+=\",Ot,\";\"):Ci(Bt,\".count++;\"),ji&&(kt?(br=et.def(),Ci(br,\"=\",mt,\".getNumPendingQueries();\")):Ci(mt,\".beginQuery(\",Bt,\");\"))}function Ri(Ci){Ci(Bt,\".cpuTime+=\",ht(),\"-\",cr,\";\"),ji&&(kt?Ci(mt,\".pushScopeStats(\",br,\",\",mt,\".getNumPendingQueries(),\",Bt,\");\"):Ci(mt,\".endQuery();\"))}function hi(Ci){var qi=et.def(Rt,\".profile\");et(Rt,\".profile=\",Ci,\";\"),et.exit(Rt,\".profile=\",qi,\";\")}var wi;if(Pt){if(Rn(Pt)){Pt.enable?(Nr(et),Ri(et.exit),hi(\"true\")):hi(\"false\");return}wi=Pt.append(Ve,et),hi(wi)}else wi=et.def(Rt,\".profile\");var gn=Ve.block();Nr(gn),et(\"if(\",wi,\"){\",gn,\"}\");var tn=Ve.block();Ri(tn),et.exit(\"if(\",wi,\"){\",tn,\"}\")}function Y(Ve,et,at,kt,Ot){var It=Ve.shared;function Bt(mt){switch(mt){case ko:case Is:case dl:return 2;case Qa:case As:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Rt(mt,Pt,ht){var cr=It.gl,br=et.def(mt,\".location\"),Nr=et.def(It.attributes,\"[\",br,\"]\"),Ri=ht.state,hi=ht.buffer,wi=[ht.x,ht.y,ht.z,ht.w],gn=[\"buffer\",\"normalized\",\"offset\",\"stride\"];function tn(){et(\"if(!\",Nr,\".buffer){\",cr,\".enableVertexAttribArray(\",br,\");}\");var qi=ht.type,Vi;if(ht.size?Vi=et.def(ht.size,\"||\",Pt):Vi=Pt,et(\"if(\",Nr,\".type!==\",qi,\"||\",Nr,\".size!==\",Vi,\"||\",gn.map(function(On){return Nr+\".\"+On+\"!==\"+ht[On]}).join(\"||\"),\"){\",cr,\".bindBuffer(\",Sr,\",\",hi,\".buffer);\",cr,\".vertexAttribPointer(\",[br,Vi,qi,ht.normalized,ht.stride,ht.offset],\");\",Nr,\".type=\",qi,\";\",Nr,\".size=\",Vi,\";\",gn.map(function(On){return Nr+\".\"+On+\"=\"+ht[On]+\";\"}).join(\"\"),\"}\"),Ii){var on=ht.divisor;et(\"if(\",Nr,\".divisor!==\",on,\"){\",Ve.instancing,\".vertexAttribDivisorANGLE(\",[br,on],\");\",Nr,\".divisor=\",on,\";}\")}}function Ci(){et(\"if(\",Nr,\".buffer){\",cr,\".disableVertexAttribArray(\",br,\");\",Nr,\".buffer=null;\",\"}if(\",ka.map(function(qi,Vi){return Nr+\".\"+qi+\"!==\"+wi[Vi]}).join(\"||\"),\"){\",cr,\".vertexAttrib4f(\",br,\",\",wi,\");\",ka.map(function(qi,Vi){return Nr+\".\"+qi+\"=\"+wi[Vi]+\";\"}).join(\"\"),\"}\")}Ri===La?tn():Ri===Na?Ci():(et(\"if(\",Ri,\"===\",La,\"){\"),tn(),et(\"}else{\"),Ci(),et(\"}\"))}kt.forEach(function(mt){var Pt=mt.name,ht=at.attributes[Pt],cr;if(ht){if(!Ot(ht))return;cr=ht.append(Ve,et)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);cr={},Object.keys(new Yr).forEach(function(Nr){cr[Nr]=et.def(br,\".\",Nr)})}Rt(Ve.link(mt),Bt(mt.info.type),cr)})}function D(Ve,et,at,kt,Ot,It){for(var Bt=Ve.shared,Rt=Bt.gl,mt,Pt=0;Pt<kt.length;++Pt){var ht=kt[Pt],cr=ht.name,br=ht.info.type,Nr=at.uniforms[cr],Ri=Ve.link(ht),hi=Ri+\".location\",wi;if(Nr){if(!Ot(Nr))continue;if(Rn(Nr)){var gn=Nr.value;if(br===dc||br===Al){var tn=Ve.link(gn._texture||gn.color[0]._texture);et(Rt,\".uniform1i(\",hi,\",\",tn+\".bind());\"),et.exit(tn,\".unbind();\")}else if(br===au||br===$s||br===Ql){var Ci=Ve.global.def(\"new Float32Array([\"+Array.prototype.slice.call(gn)+\"])\"),qi=2;br===$s?qi=3:br===Ql&&(qi=4),et(Rt,\".uniformMatrix\",qi,\"fv(\",hi,\",false,\",Ci,\");\")}else{switch(br){case $a:mt=\"1f\";break;case ko:mt=\"2f\";break;case Qa:mt=\"3f\";break;case mo:mt=\"4f\";break;case To:mt=\"1i\";break;case Bo:mt=\"1i\";break;case dl:mt=\"2i\";break;case Is:mt=\"2i\";break;case Ul:mt=\"3i\";break;case As:mt=\"3i\";break;case Lu:mt=\"4i\";break;case wo:mt=\"4i\";break}et(Rt,\".uniform\",mt,\"(\",hi,\",\",En(gn)?Array.prototype.slice.call(gn):gn,\");\")}continue}else wi=Nr.append(Ve,et)}else{if(!Ot(ia))continue;wi=et.def(Bt.uniforms,\"[\",xt.id(cr),\"]\")}br===dc?et(\"if(\",wi,\"&&\",wi,'._reglType===\"framebuffer\"){',wi,\"=\",wi,\".color[0];\",\"}\"):br===Al&&et(\"if(\",wi,\"&&\",wi,'._reglType===\"framebufferCube\"){',wi,\"=\",wi,\".color[0];\",\"}\");var Vi=1;switch(br){case dc:case Al:var on=et.def(wi,\"._texture\");et(Rt,\".uniform1i(\",hi,\",\",on,\".bind());\"),et.exit(on,\".unbind();\");continue;case Bo:case To:mt=\"1i\";break;case Is:case dl:mt=\"2i\",Vi=2;break;case As:case Ul:mt=\"3i\",Vi=3;break;case wo:case Lu:mt=\"4i\",Vi=4;break;case $a:mt=\"1f\";break;case ko:mt=\"2f\",Vi=2;break;case Qa:mt=\"3f\",Vi=3;break;case mo:mt=\"4f\",Vi=4;break;case au:mt=\"Matrix2fv\";break;case $s:mt=\"Matrix3fv\";break;case Ql:mt=\"Matrix4fv\";break}if(mt.charAt(0)===\"M\"){et(Rt,\".uniform\",mt,\"(\",hi,\",\");var On=Math.pow(br-au+2,2),Ja=Ve.global.def(\"new Float32Array(\",On,\")\");Array.isArray(wi)?et(\"false,(\",M(On,function(ys){return Ja+\"[\"+ys+\"]=\"+wi[ys]}),\",\",Ja,\")\"):et(\"false,(Array.isArray(\",wi,\")||\",wi,\" instanceof Float32Array)?\",wi,\":(\",M(On,function(ys){return Ja+\"[\"+ys+\"]=\"+wi+\"[\"+ys+\"]\"}),\",\",Ja,\")\"),et(\");\")}else if(Vi>1){for(var co=[],rs=[],so=0;so<Vi;++so)Array.isArray(wi)?rs.push(wi[so]):rs.push(et.def(wi+\"[\"+so+\"]\")),It&&co.push(et.def());It&&et(\"if(!\",Ve.batchId,\"||\",co.map(function(ys,ou){return ys+\"!==\"+rs[ou]}).join(\"||\"),\"){\",co.map(function(ys,ou){return ys+\"=\"+rs[ou]+\";\"}).join(\"\")),et(Rt,\".uniform\",mt,\"(\",hi,\",\",rs.join(\",\"),\");\"),It&&et(\"}\")}else{if(It){var Zo=et.def();et(\"if(!\",Ve.batchId,\"||\",Zo,\"!==\",wi,\"){\",Zo,\"=\",wi,\";\")}et(Rt,\".uniform\",mt,\"(\",hi,\",\",wi,\");\"),It&&et(\"}\")}}}function J(Ve,et,at,kt){var Ot=Ve.shared,It=Ot.gl,Bt=Ot.draw,Rt=kt.draw;function mt(){var Vi=Rt.elements,on,On=et;return Vi?((Vi.contextDep&&kt.contextDynamic||Vi.propDep)&&(On=at),on=Vi.append(Ve,On),Rt.elementsActive&&On(\"if(\"+on+\")\"+It+\".bindBuffer(\"+Or+\",\"+on+\".buffer.buffer);\")):(on=On.def(),On(on,\"=\",Bt,\".\",Tt,\";\",\"if(\",on,\"){\",It,\".bindBuffer(\",Or,\",\",on,\".buffer.buffer);}\",\"else if(\",Ot.vao,\".currentVAO){\",on,\"=\",Ve.shared.elements+\".getElements(\"+Ot.vao,\".currentVAO.elements);\",nn?\"\":\"if(\"+on+\")\"+It+\".bindBuffer(\"+Or+\",\"+on+\".buffer.buffer);\",\"}\")),on}function Pt(){var Vi=Rt.count,on,On=et;return Vi?((Vi.contextDep&&kt.contextDynamic||Vi.propDep)&&(On=at),on=Vi.append(Ve,On)):on=On.def(Bt,\".\",Jt),on}var ht=mt();function cr(Vi){var on=Rt[Vi];return on?on.contextDep&&kt.contextDynamic||on.propDep?on.append(Ve,at):on.append(Ve,et):et.def(Bt,\".\",Vi)}var br=cr(Kt),Nr=cr(xr),Ri=Pt();if(typeof Ri==\"number\"){if(Ri===0)return}else at(\"if(\",Ri,\"){\"),at.exit(\"}\");var hi,wi;Ii&&(hi=cr(Pr),wi=Ve.instancing);var gn=ht+\".type\",tn=Rt.elements&&Rn(Rt.elements)&&!Rt.vaoActive;function Ci(){function Vi(){at(wi,\".drawElementsInstancedANGLE(\",[br,Ri,gn,Nr+\"<<((\"+gn+\"-\"+Ra+\")>>1)\",hi],\");\")}function on(){at(wi,\".drawArraysInstancedANGLE(\",[br,Nr,Ri,hi],\");\")}ht&&ht!==\"null\"?tn?Vi():(at(\"if(\",ht,\"){\"),Vi(),at(\"}else{\"),on(),at(\"}\")):on()}function qi(){function Vi(){at(It+\".drawElements(\"+[br,Ri,gn,Nr+\"<<((\"+gn+\"-\"+Ra+\")>>1)\"]+\");\")}function on(){at(It+\".drawArrays(\"+[br,Nr,Ri]+\");\")}ht&&ht!==\"null\"?tn?Vi():(at(\"if(\",ht,\"){\"),Vi(),at(\"}else{\"),on(),at(\"}\")):on()}Ii&&(typeof hi!=\"number\"||hi>=0)?typeof hi==\"string\"?(at(\"if(\",hi,\">0){\"),Ci(),at(\"}else if(\",hi,\"<0){\"),qi(),at(\"}\")):Ci():qi()}function q(Ve,et,at,kt,Ot){var It=Ln(),Bt=It.proc(\"body\",Ot);return Ii&&(It.instancing=Bt.def(It.shared.extensions,\".angle_instanced_arrays\")),Ve(It,Bt,at,kt),It.compile().body}function K(Ve,et,at,kt){sl(Ve,et),at.useVAO?at.drawVAO?et(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,et),\");\"):et(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(et(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,et,at,kt.attributes,function(){return!0})),D(Ve,et,at,kt.uniforms,function(){return!0},!1),J(Ve,et,et,at)}function de(Ve,et){var at=Ve.proc(\"draw\",1);sl(Ve,at),ls(Ve,at,et.context),Gs(Ve,at,et.framebuffer),Ks(Ve,at,et),Ta(Ve,at,et.state),io(Ve,at,et,!1,!0);var kt=et.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",kt,\".program);\"),et.shader.program)K(Ve,at,et,et.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var Ot=Ve.global.def(\"{}\"),It=at.def(kt,\".id\"),Bt=at.def(Ot,\"[\",It,\"]\");at(Ve.cond(Bt).then(Bt,\".call(this,a0);\").else(Bt,\"=\",Ot,\"[\",It,\"]=\",Ve.link(function(Rt){return q(K,Ve,et,Rt,1)}),\"(\",kt,\");\",Bt,\".call(this,a0);\"))}Object.keys(et.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ne(Ve,et,at,kt){Ve.batchId=\"a1\",sl(Ve,et);function Ot(){return!0}Y(Ve,et,at,kt.attributes,Ot),D(Ve,et,at,kt.uniforms,Ot,!1),J(Ve,et,et,at)}function we(Ve,et,at,kt){sl(Ve,et);var Ot=at.contextDep,It=et.def(),Bt=\"a0\",Rt=\"a1\",mt=et.def();Ve.shared.props=mt,Ve.batchId=It;var Pt=Ve.scope(),ht=Ve.scope();et(Pt.entry,\"for(\",It,\"=0;\",It,\"<\",Rt,\";++\",It,\"){\",mt,\"=\",Bt,\"[\",It,\"];\",ht,\"}\",Pt.exit);function cr(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!cr(gn)}if(at.needsContext&&ls(Ve,ht,at.context),at.needsFramebuffer&&Gs(Ve,ht,at.framebuffer),Ta(Ve,ht,at.state,cr),at.profile&&cr(at.profile)&&io(Ve,ht,at,!1,!0),kt)at.useVAO?at.drawVAO?cr(at.drawVAO)?ht(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,ht),\");\"):Pt(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Pt),\");\"):Pt(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Pt(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Pt,at,kt.attributes,br),Y(Ve,ht,at,kt.attributes,cr)),D(Ve,Pt,at,kt.uniforms,br,!1),D(Ve,ht,at,kt.uniforms,cr,!0),J(Ve,Pt,ht,at);else{var Nr=Ve.global.def(\"{}\"),Ri=at.shader.progVar.append(Ve,ht),hi=ht.def(Ri,\".id\"),wi=ht.def(Nr,\"[\",hi,\"]\");ht(Ve.shared.gl,\".useProgram(\",Ri,\".program);\",\"if(!\",wi,\"){\",wi,\"=\",Nr,\"[\",hi,\"]=\",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),\"(\",Ri,\");}\",wi,\".call(this,a0[\",It,\"],\",It,\");\")}}function Ue(Ve,et){var at=Ve.proc(\"batch\",2);Ve.batchId=\"0\",sl(Ve,at);var kt=!1,Ot=!0;Object.keys(et.context).forEach(function(Nr){kt=kt||et.context[Nr].propDep}),kt||(ls(Ve,at,et.context),Ot=!1);var It=et.framebuffer,Bt=!1;It?(It.propDep?kt=Bt=!0:It.contextDep&&kt&&(Bt=!0),Bt||Gs(Ve,at,It)):Gs(Ve,at,null),et.state.viewport&&et.state.viewport.propDep&&(kt=!0);function Rt(Nr){return Nr.contextDep&&kt||Nr.propDep}Ks(Ve,at,et),Ta(Ve,at,et.state,function(Nr){return!Rt(Nr)}),(!et.profile||!Rt(et.profile))&&io(Ve,at,et,!1,\"a1\"),et.contextDep=kt,et.needsContext=Ot,et.needsFramebuffer=Bt;var mt=et.shader.progVar;if(mt.contextDep&&kt||mt.propDep)we(Ve,at,et,null);else{var Pt=mt.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Pt,\".program);\"),et.shader.program)we(Ve,at,et,et.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var ht=Ve.global.def(\"{}\"),cr=at.def(Pt,\".id\"),br=at.def(ht,\"[\",cr,\"]\");at(Ve.cond(br).then(br,\".call(this,a0,a1);\").else(br,\"=\",ht,\"[\",cr,\"]=\",Ve.link(function(Nr){return q(we,Ve,et,Nr,2)}),\"(\",Pt,\");\",br,\".call(this,a0,a1);\"))}}Object.keys(et.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ft(Ve,et){var at=Ve.proc(\"scope\",3);Ve.batchId=\"a2\";var kt=Ve.shared,Ot=kt.current;if(ls(Ve,at,et.context),et.framebuffer&&et.framebuffer.append(Ve,at),Ai(Object.keys(et.state)).forEach(function(Rt){var mt=et.state[Rt],Pt=mt.append(Ve,at);En(Pt)?Pt.forEach(function(ht,cr){vn(ht)?at.set(Ve.next[Rt],\"[\"+cr+\"]\",ht):at.set(Ve.next[Rt],\"[\"+cr+\"]\",Ve.link(ht,{stable:!0}))}):Rn(mt)?at.set(kt.next,\".\"+Rt,Ve.link(Pt,{stable:!0})):at.set(kt.next,\".\"+Rt,Pt)}),io(Ve,at,et,!0,!0),[Tt,xr,Jt,Pr,Kt].forEach(function(Rt){var mt=et.draw[Rt];if(mt){var Pt=mt.append(Ve,at);vn(Pt)?at.set(kt.draw,\".\"+Rt,Pt):at.set(kt.draw,\".\"+Rt,Ve.link(Pt),{stable:!0})}}),Object.keys(et.uniforms).forEach(function(Rt){var mt=et.uniforms[Rt].append(Ve,at);Array.isArray(mt)&&(mt=\"[\"+mt.map(function(Pt){return vn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+\"]\"),at.set(kt.uniforms,\"[\"+Ve.link(xt.id(Rt),{stable:!0})+\"]\",mt)}),Object.keys(et.attributes).forEach(function(Rt){var mt=et.attributes[Rt].append(Ve,at),Pt=Ve.scopeAttrib(Rt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,\".\"+ht,mt[ht])})}),et.scopeVAO){var It=et.scopeVAO.append(Ve,at);vn(It)?at.set(kt.vao,\".targetVAO\",It):at.set(kt.vao,\".targetVAO\",Ve.link(It,{stable:!0}))}function Bt(Rt){var mt=et.shader[Rt];if(mt){var Pt=mt.append(Ve,at);vn(Pt)?at.set(kt.shader,\".\"+Rt,Pt):at.set(kt.shader,\".\"+Rt,Ve.link(Pt,{stable:!0}))}}Bt(Xe),Bt(ot),Object.keys(et.state).length>0&&(at(Ot,\".dirty=true;\"),at.exit(Ot,\".dirty=true;\")),at(\"a1(\",Ve.shared.context,\",a0,\",Ve.batchId,\");\")}function Zt(Ve){if(!(typeof Ve!=\"object\"||En(Ve))){for(var et=Object.keys(Ve),at=0;at<et.length;++at)if(h.isDynamic(Ve[et[at]]))return!0;return!1}}function hr(Ve,et,at){var kt=et.static[at];if(!kt||!Zt(kt))return;var Ot=Ve.global,It=Object.keys(kt),Bt=!1,Rt=!1,mt=!1,Pt=Ve.global.def(\"{}\");It.forEach(function(cr){var br=kt[cr];if(h.isDynamic(br)){typeof br==\"function\"&&(br=kt[cr]=h.unbox(br));var Nr=Nn(br,null);Bt=Bt||Nr.thisDep,mt=mt||Nr.propDep,Rt=Rt||Nr.contextDep}else{switch(Ot(Pt,\".\",cr,\"=\"),typeof br){case\"number\":Ot(br);break;case\"string\":Ot('\"',br,'\"');break;case\"object\":Array.isArray(br)&&Ot(\"[\",br.join(),\"]\");break;default:Ot(Ve.link(br));break}Ot(\";\")}});function ht(cr,br){It.forEach(function(Nr){var Ri=kt[Nr];if(h.isDynamic(Ri)){var hi=cr.invoke(br,Ri);br(Pt,\".\",Nr,\"=\",hi,\";\")}})}et.dynamic[at]=new h.DynamicVariable(Xo,{thisDep:Bt,contextDep:Rt,propDep:mt,ref:Pt,append:ht}),delete et.static[at]}function qt(Ve,et,at,kt,Ot){var It=Ln();It.stats=It.link(Ot),Object.keys(et.static).forEach(function(Rt){hr(It,et,Rt)}),dr.forEach(function(Rt){hr(It,Ve,Rt)});var Bt=Vl(Ve,et,at,kt,It);return Bt.shader.program&&(Bt.shader.program.attributes.sort(function(Rt,mt){return Rt.name<mt.name?-1:1}),Bt.shader.program.uniforms.sort(function(Rt,mt){return Rt.name<mt.name?-1:1})),de(It,Bt),ft(It,Bt),Ue(It,Bt),e(It.compile(),{destroy:function(){Bt.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ve=Ln(),et=Ve.proc(\"poll\"),at=Ve.proc(\"refresh\"),kt=Ve.block();et(kt),at(kt);var Ot=Ve.shared,It=Ot.gl,Bt=Ot.next,Rt=Ot.current;kt(Rt,\".dirty=false;\"),Gs(Ve,et),Gs(Ve,at,null,!0);var mt;Ii&&(mt=Ve.link(Ii)),zt.oes_vertex_array_object&&at(Ve.link(zt.oes_vertex_array_object),\".bindVertexArrayOES(null);\");var Pt=at.def(Ot.attributes),ht=at.def(0),cr=Ve.cond(ht,\".buffer\");cr.then(It,\".enableVertexAttribArray(i);\",It,\".bindBuffer(\",Sr,\",\",ht,\".buffer.buffer);\",It,\".vertexAttribPointer(i,\",ht,\".size,\",ht,\".type,\",ht,\".normalized,\",ht,\".stride,\",ht,\".offset);\").else(It,\".disableVertexAttribArray(i);\",It,\".vertexAttrib4f(i,\",ht,\".x,\",ht,\".y,\",ht,\".z,\",ht,\".w);\",ht,\".buffer=null;\");var br=Ve.link(Ir.maxAttributes,{stable:!0});return at(\"for(var i=0;i<\",br,\";++i){\",ht,\"=\",Pt,\"[i];\",cr,\"}\"),Ii&&at(\"for(var i=0;i<\",br,\";++i){\",mt,\".vertexAttribDivisorANGLE(i,\",Pt,\"[i].divisor);\",\"}\"),at(Ve.shared.vao,\".currentVAO=null;\",Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"),Object.keys(li).forEach(function(Nr){var Ri=li[Nr],hi=kt.def(Bt,\".\",Nr),wi=Ve.block();wi(\"if(\",hi,\"){\",It,\".enable(\",Ri,\")}else{\",It,\".disable(\",Ri,\")}\",Rt,\".\",Nr,\"=\",hi,\";\"),at(wi),et(\"if(\",hi,\"!==\",Rt,\".\",Nr,\"){\",wi,\"}\")}),Object.keys(mn).forEach(function(Nr){var Ri=mn[Nr],hi=Xi[Nr],wi,gn,tn=Ve.block();if(tn(It,\".\",Ri,\"(\"),En(hi)){var Ci=hi.length;wi=Ve.global.def(Bt,\".\",Nr),gn=Ve.global.def(Rt,\".\",Nr),tn(M(Ci,function(qi){return wi+\"[\"+qi+\"]\"}),\");\",M(Ci,function(qi){return gn+\"[\"+qi+\"]=\"+wi+\"[\"+qi+\"];\"}).join(\"\")),et(\"if(\",M(Ci,function(qi){return wi+\"[\"+qi+\"]!==\"+gn+\"[\"+qi+\"]\"}).join(\"||\"),\"){\",tn,\"}\")}else wi=kt.def(Bt,\".\",Nr),gn=kt.def(Rt,\".\",Nr),tn(wi,\");\",Rt,\".\",Nr,\"=\",wi,\";\"),et(\"if(\",wi,\"!==\",gn,\"){\",tn,\"}\");at(tn)}),Ve.compile()}(),compile:qt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Rs=function(Ee,xt){if(!xt.ext_disjoint_timer_query)return null;var zt=[];function Ir(){return zt.pop()||xt.ext_disjoint_timer_query.createQueryEXT()}function Hr(xi){zt.push(xi)}var Br=[];function Vr(xi){var Ii=Ir();xt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Br.push(Ii),ji(Br.length-1,Br.length,xi)}function mi(){xt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Oi=[];function Mi(){return Oi.pop()||new Ni}function Hn(xi){Oi.push(xi)}var Qi=[];function ji(xi,Ii,ci){var nn=Mi();nn.startQueryIndex=xi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ci,Qi.push(nn)}var si=[],Mr=[];function Yr(){var xi,Ii,ci=Br.length;if(ci!==0){Mr.length=Math.max(Mr.length,ci+1),si.length=Math.max(si.length,ci+1),si[0]=0,Mr[0]=0;var nn=0;for(xi=0,Ii=0;Ii<Br.length;++Ii){var Xi=Br[Ii];xt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,Da)?(nn+=xt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,yo),Hr(Xi)):Br[xi++]=Xi,si[Ii+1]=nn,Mr[Ii+1]=xi}for(Br.length=xi,xi=0,Ii=0;Ii<Qi.length;++Ii){var qn=Qi[Ii],vi=qn.startQueryIndex,li=qn.endQueryIndex;qn.sum+=si[li]-si[vi];var mn=Mr[vi],Ki=Mr[li];Ki===mn?(qn.stats.gpuTime+=qn.sum/1e6,Hn(qn)):(qn.startQueryIndex=mn,qn.endQueryIndex=Ki,Qi[xi++]=qn)}Qi.length=xi}}return{beginQuery:Vr,endQuery:mi,pushScopeStats:ji,update:Yr,getNumPendingQueries:function(){return Br.length},clear:function(){zt.push.apply(zt,Br);for(var xi=0;xi<zt.length;xi++)xt.ext_disjoint_timer_query.deleteQueryEXT(zt[xi]);Br.length=0,zt.length=0},restore:function(){Br.length=0,zt.length=0}}},Es=16384,Zs=256,Gn=1024,Ha=34962,Fo=\"webglcontextlost\",Uo=\"webglcontextrestored\",Qs=1,Ml=2,bu=3;function vl(Ee,xt){for(var zt=0;zt<Ee.length;++zt)if(Ee[zt]===xt)return zt;return-1}function Sc(Ee){var xt=_(Ee);if(!xt)return null;var zt=xt.gl,Ir=zt.getContextAttributes(),Hr=zt.isContextLost(),Br=k(zt,xt);if(!Br)return null;var Vr=x(),mi=Ia(),Ni=xt.cachedCode||{},Oi=Br.extensions,Mi=Rs(zt,Oi),Hn=v(),Qi=zt.drawingBufferWidth,ji=zt.drawingBufferHeight,si={tick:0,time:0,viewportWidth:Qi,viewportHeight:ji,framebufferWidth:Qi,framebufferHeight:ji,drawingBufferWidth:Qi,drawingBufferHeight:ji,pixelRatio:xt.pixelRatio},Mr={},Yr={elements:null,primitive:4,count:-1,offset:0,instances:-1},xi=ei(zt,Oi),Ii=ri(zt,mi,xt,Xi),ci=Cr(zt,Oi,Ii,mi),nn=Cu(zt,Oi,xi,mi,Ii,ci,Yr);function Xi(q){return nn.destroyBuffer(q)}var qn=Wu(zt,Vr,mi,xt),vi=of(zt,Oi,xi,function(){Ki.procs.poll()},si,mi,xt),li=Dc(zt,Oi,xi,mi,xt),mn=lf(zt,Oi,xi,vi,li,mi),Ki=Ea(zt,Vr,Oi,xi,Ii,ci,vi,mn,Mr,nn,qn,Yr,si,Mi,Ni,xt),Ui=Wl(zt,mn,Ki.procs.poll,si,Ir,Oi,xi),Bi=Ki.next,vn=zt.canvas,Un=[],na=[],Yi=[],Ln=[xt.onDestroy],ra=null;function oa(){if(Un.length===0){Mi&&Mi.update(),ra=null;return}ra=d.next(oa),Ks();for(var q=Un.length-1;q>=0;--q){var K=Un[q];K&&K(si,null,0)}zt.flush(),Mi&&Mi.update()}function wa(){!ra&&Un.length>0&&(ra=d.next(oa))}function ns(){ra&&(d.cancel(oa),ra=null)}function Ys(q){q.preventDefault(),Hr=!0,ns(),na.forEach(function(K){K()})}function Va(q){zt.getError(),Hr=!1,Br.restore(),qn.restore(),Ii.restore(),vi.restore(),li.restore(),mn.restore(),nn.restore(),Mi&&Mi.restore(),Ki.procs.refresh(),wa(),Yi.forEach(function(K){K()})}vn&&(vn.addEventListener(Fo,Ys,!1),vn.addEventListener(Uo,Va,!1));function El(){Un.length=0,ns(),vn&&(vn.removeEventListener(Fo,Ys),vn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),li.clear(),nn.clear(),vi.clear(),ci.clear(),Ii.clear(),Mi&&Mi.clear(),Ln.forEach(function(q){q()})}function zo(q){function K(It){var Bt=e({},It);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,\"stencil\"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Rt(mt){if(mt in Bt){var Pt=Bt[mt];delete Bt[mt],Object.keys(Pt).forEach(function(ht){Bt[mt+\".\"+ht]=Pt[ht]})}}return Rt(\"blend\"),Rt(\"depth\"),Rt(\"cull\"),Rt(\"stencil\"),Rt(\"polygonOffset\"),Rt(\"scissor\"),Rt(\"sample\"),\"vao\"in It&&(Bt.vao=It.vao),Bt}function de(It,Bt){var Rt={},mt={};return Object.keys(It).forEach(function(Pt){var ht=It[Pt];if(h.isDynamic(ht)){mt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var cr=0;cr<ht.length;++cr)if(h.isDynamic(ht[cr])){mt[Pt]=h.unbox(ht,Pt);return}}Rt[Pt]=ht}),{dynamic:mt,static:Rt}}var ne=de(q.context||{},!0),we=de(q.uniforms||{},!0),Ue=de(q.attributes||{},!1),ft=de(K(q),!1),Zt={gpuTime:0,cpuTime:0,count:0},hr=Ki.compile(ft,Ue,we,ne,Zt),qt=hr.draw,Ve=hr.batch,et=hr.scope,at=[];function kt(It){for(;at.length<It;)at.push(null);return at}function Ot(It,Bt){var Rt;if(typeof It==\"function\")return et.call(this,null,It,0);if(typeof Bt==\"function\")if(typeof It==\"number\")for(Rt=0;Rt<It;++Rt)et.call(this,null,Bt,Rt);else if(Array.isArray(It))for(Rt=0;Rt<It.length;++Rt)et.call(this,It[Rt],Bt,Rt);else return et.call(this,It,Bt,0);else if(typeof It==\"number\"){if(It>0)return Ve.call(this,kt(It|0),It|0)}else if(Array.isArray(It)){if(It.length)return Ve.call(this,It,It.length)}else return qt.call(this,It)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var el=mn.setFBO=zo({framebuffer:h.define.call(null,Qs,\"framebuffer\")});function ol(q,K){var de=0;Ki.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Es),\"depth\"in K&&(zt.clearDepth(+K.depth),de|=Zs),\"stencil\"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if(\"framebuffer\"in q)if(q.framebuffer&&q.framebuffer_reglType===\"framebufferCube\")for(var K=0;K<6;++K)el(e({framebuffer:q.framebuffer.faces[K]},q),ol);else el(q,ol);else ol(null,q)}function ls(q){Un.push(q);function K(){var de=vl(Un,q);function ne(){var we=vl(Un,ne);Un[we]=Un[Un.length-1],Un.length-=1,Un.length<=0&&ns()}Un[de]=ne}return wa(),{cancel:K}}function Gs(){var q=Bi.viewport,K=Bi.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ks(){si.tick+=1,si.time=sl(),Gs(),Ki.procs.poll()}function Ta(){vi.refresh(),Gs(),Ki.procs.refresh(),Mi&&Mi.update()}function sl(){return(v()-Hn)/1e3}Ta();function io(q,K){var de;switch(q){case\"frame\":return ls(K);case\"lost\":de=na;break;case\"restore\":de=Yi;break;case\"destroy\":de=Ln;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ni}function D(q){Object.entries(q).forEach(function(K){Ni[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,Qs),context:h.define.bind(null,Ml),this:h.define.bind(null,bu),draw:zo({}),buffer:function(q){return Ii.create(q,Ha,!1,!1)},elements:function(q){return ci.create(q,!1)},texture:vi.create2D,cube:vi.createCube,renderbuffer:li.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:nn.createVAO,attributes:Ir,frame:ls,on:io,limits:xi,hasExtension:function(q){return xi.extensions.indexOf(q.toLowerCase())>=0},read:Ui,destroy:El,_gl:zt,_refresh:Ta,poll:function(){Ks(),Mi&&Mi.update()},now:sl,stats:mi,getCachedCode:Y,preloadCachedCode:D});return xt.onDone(null,J),J}return Sc})});var Tz=ye((p1r,dBe)=>{\"use strict\";var tUt=MX(),rUt=hBe();dBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has(\"parcoords\"))){try{o.regl=rUt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener(\"webglcontextlost\",function(s){t&&t.emit&&t.emit(\"plotly_webglcontextlost\",{event:s,layer:o.key})},!1)}}),a||tUt({container:i._glcontainer.node()}),a}});var cK=ye((uK,yBe)=>{\"use strict\";var vBe=uY(),pBe=NY(),iUt=rqe(),gBe=fBe(),lK=Dr(),nUt=Sg().selectMode,aUt=Tz(),oUt=Ru(),sUt=mU(),lUt=aY().styleTextSelection,mBe={};function uUt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var uK=yBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=aUt(t,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],mBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(sUt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=iUt(h)),a.line2d===!0&&(a.line2d=pBe(h)),a.scatter2d===!0&&(a.scatter2d=vBe(h)),a.fill2d===!0&&(a.fill2d=pBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;l<f;l++)a.glText[l]=new gBe(h);if(a.glText){if(f>a.glText.length){var d=f-a.glText.length;for(l=0;l<d;l++)a.glText.push(new gBe(h))}else if(f<a.glText.length){var v=a.glText.length-f,x=a.glText.splice(f,v);x.forEach(function(j){j.destroy()})}for(l=0;l<f;l++)a.glText[l].update(a.textOptions[l])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(j){if(j&&j.positions){for(var re=j.positions,oe=0;oe<re.length&&(isNaN(re[oe])||isNaN(re[oe+1]));)oe+=2;for(var _e=re.length-2;_e>oe&&(isNaN(re[_e])||isNaN(re[_e+1]));)_e-=2;j.positions=re.slice(oe,_e+2)}return j}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=lK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(j,re){var oe=n[re];if(!(!j||!oe||!oe[0]||!oe[0].trace)){var _e=oe[0],Me=_e.trace,ke=_e.t,me=a.lineOptions[re],ie,Se,Le=[];Me._ownfill&&Le.push(re),Me._nexttrace&&Le.push(re+1),Le.length&&(a.fillOrder[re]=Le);var Ae=[],De=me&&me.positions||ke.positions,Pe,ge;if(Me.fill===\"tozeroy\"){for(Pe=0;Pe<De.length&&isNaN(De[Pe+1]);)Pe+=2;for(ge=De.length-2;ge>Pe&&isNaN(De[ge+1]);)ge-=2;De[Pe+1]!==0&&(Ae=[De[Pe],0]),Ae=Ae.concat(De.slice(Pe,ge+2)),De[ge+1]!==0&&(Ae=Ae.concat([De[ge],0]))}else if(Me.fill===\"tozerox\"){for(Pe=0;Pe<De.length&&isNaN(De[Pe]);)Pe+=2;for(ge=De.length-2;ge>Pe&&isNaN(De[ge]);)ge-=2;De[Pe]!==0&&(Ae=[0,De[Pe+1]]),Ae=Ae.concat(De.slice(Pe,ge+2)),De[ge]!==0&&(Ae=Ae.concat([0,De[ge+1]]))}else if(Me.fill===\"toself\"||Me.fill===\"tonext\"){for(Ae=[],ie=0,j.splitNull=!0,Se=0;Se<De.length;Se+=2)(isNaN(De[Se])||isNaN(De[Se+1]))&&(Ae=Ae.concat(De.slice(ie,Se)),Ae.push(De[ie],De[ie+1]),Ae.push(null,null),ie=Se+2);Ae=Ae.concat(De.slice(ie)),ie&&Ae.push(De[ie],De[ie+1])}else{var Fe=Me._nexttrace;if(Fe){var ce=a.lineOptions[re+1];if(ce){var Ze=ce.positions;if(Me.fill===\"tonexty\"){for(Ae=De.slice(),re=Math.floor(Ze.length/2);re--;){var ct=Ze[re*2],pt=Ze[re*2+1];isNaN(ct)||isNaN(pt)||Ae.push(ct,pt)}j.fill=Fe.fillcolor}}}}if(Me._prevtrace&&Me._prevtrace.fill===\"tonext\"){var Wt=a.lineOptions[re-1].positions,st=Ae.length/2;ie=st;var lt=[ie];for(Se=0;Se<Wt.length;Se+=2)(isNaN(Wt[Se])||isNaN(Wt[Se+1]))&&(lt.push(Se/2+st+1),ie=Se+2);Ae=Ae.concat(Wt),j.hole=lt}return j.fillmode=Me.fill,j.opacity=Me.opacity,j.positions=Ae,j}}),a.fill2d.update(a.fillOptions))}var p=i.dragmode,C=nUt(p),E=i.clickmode.indexOf(\"select\")>-1;for(l=0;l<f;l++){var A=n[l][0],L=A.trace,_=A.t,k=_.index,M=L._length,g=_.x,P=_.y;if(L.selectedpoints||C||E){if(C||(C=!0),L.selectedpoints){var T=a.selectBatch[k]=lK.selIndices2selPoints(L),z={};for(u=0;u<T.length;u++)z[T[u]]=1;var O=[];for(u=0;u<M;u++)z[u]||O.push(u);a.unselectBatch[k]=O}var V=_.xpx=new Array(M),G=_.ypx=new Array(M);for(u=0;u<M;u++)V[u]=o.c2p(g[u]),G[u]=s.c2p(P[u])}else _.xpx=_.ypx=null}if(C){if(a.select2d||(a.select2d=vBe(i._glcanvas.data()[1].regl)),a.scatter2d){var Z=new Array(f);for(l=0;l<f;l++)Z[l]=a.selectBatch[l].length||a.unselectBatch[l].length?a.markerUnselectedOptions[l]:{};a.scatter2d.update(Z)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&n.forEach(function(j){var re=((j||[])[0]||{}).trace||{};oUt.hasText(re)&&lUt(j)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var H={viewport:uUt(i,o,s,t._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(s._rl||s.range)[0],(o._rl||o.range)[1],(s._rl||s.range)[1]]},N=lK.repeat(H,a.count);a.fill2d&&a.fill2d.update(N),a.line2d&&a.line2d.update(N),a.error2d&&a.error2d.update(N.concat(N)),a.scatter2d&&a.scatter2d.update(N),a.select2d&&a.select2d.update(N),a.glText&&a.glText.forEach(function(j){j.update(H)})}}};uK.reglPrecompiled=mBe});var bBe=ye((g1r,xBe)=>{\"use strict\";var _Be=Oze();_Be.plot=cK();xBe.exports=_Be});var TBe=ye((m1r,wBe)=>{\"use strict\";wBe.exports=bBe()});var fK=ye((y1r,EBe)=>{\"use strict\";var cUt=pf(),MBe=Tu(),ABe=df().axisHoverFormat,fUt=Qo().hovertemplateAttrs,EC=sC(),hUt=hd().idRegex,dUt=pl().templatedArray,d5=Ao().extendFlat,o1=cUt.marker,vUt=o1.line,pUt=d5(MBe(\"marker.line\",{editTypeOverride:\"calc\"}),{width:d5({},vUt.width,{editType:\"calc\"}),editType:\"calc\"}),Az=d5(MBe(\"marker\"),{symbol:o1.symbol,angle:o1.angle,size:d5({},o1.size,{editType:\"markerSize\"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:pUt,editType:\"calc\"});Az.color.editType=Az.cmin.editType=Az.cmax.editType=\"style\";function SBe(e){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:hUt[e],editType:\"plot\"}}}EBe.exports={dimensions:dUt(\"dimension\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},label:{valType:\"string\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},axis:{type:{valType:\"enumerated\",values:[\"linear\",\"log\",\"date\",\"category\"],editType:\"calc+clearAxisTypes\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:d5({},EC.text,{}),hovertext:d5({},EC.hovertext,{}),hovertemplate:fUt(),xhoverformat:ABe(\"x\"),yhoverformat:ABe(\"y\"),marker:Az,xaxes:SBe(\"x\"),yaxes:SBe(\"y\"),diagonal:{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},showupperhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},showlowerhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},selected:{marker:EC.selected.marker,editType:\"calc\"},unselected:{marker:EC.unselected.marker,editType:\"calc\"},opacity:EC.opacity}});var Sz=ye((_1r,CBe)=>{\"use strict\";CBe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i<t.length;i++)a=t[i],a.visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),e._length=n,i=0;i<t.length;i++)a=t[i],a.visible&&(a._length=n);return n}});var PBe=ye((x1r,LBe)=>{\"use strict\";var hK=Dr(),gUt=Yd(),kBe=fK(),mUt=Ru(),yUt=$p(),_Ut=Sz(),xUt=BF().isOpenSymbol;LBe.exports=function(t,r,n,i){function a(d,v){return hK.coerce(t,r,kBe,d,v)}var o=gUt(t,r,{name:\"dimensions\",handleItemDefaults:bUt}),s=a(\"diagonal.visible\"),l=a(\"showupperhalf\"),u=a(\"showlowerhalf\"),c=_Ut(r,o,\"values\");if(!c||!s&&!l&&!u){r.visible=!1;return}a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"xhoverformat\"),a(\"yhoverformat\"),yUt(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var f=xUt(r.marker.symbol),h=mUt.isBubble(r);a(\"marker.line.width\",f||h?1:0),wUt(t,r,i,a),hK.coerceSelectionMarkerOpacity(r,a)};function bUt(e,t){function r(i,a){return hK.coerce(e,t,kBe.dimensions,i,a)}r(\"label\");var n=r(\"values\");n&&n.length?r(\"visible\"):t.visible=!1,r(\"axis.type\"),r(\"axis.matches\")}function wUt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;u<a;u++){var d=u?u+1:\"\";f[u]=\"x\"+d,h[u]=\"y\"+d}var v=n(\"xaxes\",f),x=n(\"yaxes\",h),b=t._diag=new Array(a);t._xaxes={},t._yaxes={};var p=[],C=[];function E(z,O,V,G){if(z){var Z=z.charAt(0),H=r._splomAxes[Z];if(t[\"_\"+Z+\"axes\"][z]=1,G.push(z),!(z in H)){var N=H[z]={};V&&(N.label=V.label||\"\",V.visible&&V.axis&&(V.axis.type&&(N.type=V.axis.type),V.axis.matches&&(N.matches=O)))}}}var A=!l&&!s,L=!l&&!o;for(t._axesDim={},u=0;u<a;u++){var _=i[u],k=u===0,M=u===a-1,g=k&&A||M&&L?void 0:v[u],P=k&&L||M&&A?void 0:x[u];E(g,P,_,p),E(P,g,_,C),b[u]=[g,P],t._axesDim[g]=u,t._axesDim[P]=u}for(u=0;u<p.length;u++)for(c=0;c<C.length;c++){var T=p[u]+C[c];(u>c&&o||u<c&&s||u===c&&(l||!s||!o))&&(r._splomSubplots[T]=1)}(!s||!l&&o&&s)&&(r._splomGridDflt.xside=\"bottom\",r._splomGridDflt.yside=\"left\")}});var DBe=ye((b1r,RBe)=>{\"use strict\";var IBe=Dr();RBe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=IBe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||IBe.extendFlat(l,o),l}});var OBe=ye((w1r,zBe)=>{\"use strict\";var dK=Dr(),Mz=hf(),TUt=O0().calcMarkerSize,AUt=O0().calcAxisExpansion,SUt=F0(),FBe=Y2().markerSelection,MUt=Y2().markerStyle,EUt=DBe(),CUt=hs().BADNUM,kUt=ox().TOO_MANY_POINTS;zBe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(E,A){for(var L=E.makeCalcdata({v:A.values,vcalendar:r.calendar},\"v\"),_=0;_<L.length;_++)L[_]=L[_]===CUt?NaN:L[_];o.push(L),s.push(E.type===\"log\"?dK.simpleMap(L,E.c2l):L)}for(u=0;u<n.length;u++)if(f=n[u],f.visible){if(h=Mz.getFromId(t,r._diag[u][0]),d=Mz.getFromId(t,r._diag[u][1]),h&&d&&h.type!==d.type){dK.log(\"Skipping splom dimension \"+u+\" with conflicting axis types\");continue}h?(v(h,f),d&&d.type===\"category\"&&(d._categories=h._categories.slice())):v(d,f),l.push(u)}SUt(t,r),dK.extendFlat(a,MUt(t,r));var x=o.length,b=x*i>kUt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=TUt(r,i),c=0;c<l.length;c++)u=l[c],f=n[u],h=Mz.getFromId(t,r._diag[u][0])||{},d=Mz.getFromId(t,r._diag[u][1])||{},AUt(t,r,h,d,o[c],o[c],p);var C=EUt(t,r);return C.matrix||(C.matrix=!0),C.matrixOptions=a,C.selectedOptions=FBe(t,r,r.selected),C.unselectedOptions=FBe(t,r,r.unselected),[{x:!1,y:!1,t:{},trace:r}]}});var BBe=ye((qBe,CC)=>{(function(){var e,t,r,n,i,a;typeof performance!=\"undefined\"&&performance!==null&&performance.now?CC.exports=function(){return performance.now()}:typeof process!=\"undefined\"&&process!==null&&process.hrtime?(CC.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(CC.exports=function(){return Date.now()-r},r=Date.now()):(CC.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(qBe)});var UBe=ye((T1r,kz)=>{var LUt=BBe(),s1=window,Ez=[\"moz\",\"webkit\"],p5=\"AnimationFrame\",g5=s1[\"request\"+p5],kC=s1[\"cancel\"+p5]||s1[\"cancelRequest\"+p5];for(v5=0;!g5&&v5<Ez.length;v5++)g5=s1[Ez[v5]+\"Request\"+p5],kC=s1[Ez[v5]+\"Cancel\"+p5]||s1[Ez[v5]+\"CancelRequest\"+p5];var v5;(!g5||!kC)&&(Cz=0,vK=0,dx=[],NBe=1e3/60,g5=function(e){if(dx.length===0){var t=LUt(),r=Math.max(0,NBe-(t-Cz));Cz=r+t,setTimeout(function(){var n=dx.slice(0);dx.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(Cz)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return dx.push({handle:++vK,callback:e,cancelled:!1}),vK},kC=function(e){for(var t=0;t<dx.length;t++)dx[t].handle===e&&(dx[t].cancelled=!0)});var Cz,vK,dx,NBe;kz.exports=function(e){return g5.call(s1,e)};kz.exports.cancel=function(){kC.apply(s1,arguments)};kz.exports.polyfill=function(e){e||(e=s1),e.requestAnimationFrame=g5,e.cancelAnimationFrame=kC}});var GBe=ye((A1r,VBe)=>{VBe.exports=function(t,r){var n=typeof t==\"number\",i=typeof r==\"number\";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error(\"array length must be positive\");for(var o=new Array(a),s=0,l=t;s<a;s++,l++)o[s]=l;return o}});var XBe=ye((S1r,WBe)=>{\"use strict\";var PUt=uY(),IUt=Xm(),RUt=j2(),HBe=UBe(),DUt=GBe(),pK=e5(),FUt=W2();WBe.exports=vx;function vx(e,t){if(!(this instanceof vx))return new vx(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=PUt(e),this.canvas=this.scatter.canvas}vx.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=HBe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,HBe(()=>{this.dirty=!1})),this)};vx.prototype.update=function(...e){if(!e.length)return;for(let n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);let t=[],r=0;for(let n=0;n<this.traces.length;n++){let i=this.traces[n],a=this.traces[n].passes;for(let o=0;o<a.length;o++)t.push(this.passes[a[o]]);i.passOffset=r,r+=i.passes.length}return this.scatter.update(...t),this};vx.prototype.updateItem=function(e,t){let{regl:r}=this;if(t===null)return this.traces[e]=null,this;if(!t)return this;let n=IUt(t,{data:\"data items columns rows values dimensions samples x\",snap:\"snap cluster\",size:\"sizes size radius\",color:\"colors color fill fill-color fillColor\",opacity:\"opacity alpha transparency opaque\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",borderColor:\"borderColors borderColor bordercolor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range ranges databox dataBox\",viewport:\"viewport viewBox viewbox\",domain:\"domain domains area areas\",padding:\"pad padding paddings pads margin margins\",transpose:\"transpose transposed\",diagonal:\"diagonal diag showDiagonal\",upper:\"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf\",lower:\"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower\"}),i=this.traces[e]||(this.traces[e]={id:e,buffer:r.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),color:\"black\",marker:null,size:12,borderColor:\"transparent\",borderSize:1,viewport:pK([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(n.color!=null&&(i.color=n.color),n.size!=null&&(i.size=n.size),n.marker!=null&&(i.marker=n.marker),n.borderColor!=null&&(i.borderColor=n.borderColor),n.borderSize!=null&&(i.borderSize=n.borderSize),n.opacity!=null&&(i.opacity=n.opacity),n.viewport&&(i.viewport=pK(n.viewport)),n.diagonal!=null&&(i.diagonal=n.diagonal),n.upper!=null&&(i.upper=n.upper),n.lower!=null&&(i.lower=n.lower),n.data){i.buffer(FUt(n.data)),i.columns=n.data.length,i.count=n.data[0].length,i.bounds=[];for(let x=0;x<i.columns;x++)i.bounds[x]=RUt(n.data[x],1)}let a;n.range&&(i.range=n.range,a=i.range&&typeof i.range[0]!=\"number\"),n.domain&&(i.domain=n.domain);let o=!1;n.padding!=null&&(Array.isArray(n.padding)&&n.padding.length===i.columns&&typeof n.padding[n.padding.length-1]==\"number\"?(i.padding=n.padding.map(jBe),o=!0):i.padding=jBe(n.padding));let s=i.columns,l=i.count,u=i.viewport.width,c=i.viewport.height,f=i.viewport.x,h=i.viewport.y,d=u/s,v=c/s;i.passes=[];for(let x=0;x<s;x++)for(let b=0;b<s;b++){if(!i.diagonal&&b===x||!i.upper&&x>b||!i.lower&&x<b)continue;let p=zUt(i.id,x,b),C=this.passes[p]||(this.passes[p]={});if(n.data&&(n.transpose?C.positions={x:{buffer:i.buffer,offset:b,count:l,stride:s},y:{buffer:i.buffer,offset:x,count:l,stride:s}}:C.positions={x:{buffer:i.buffer,offset:b*l,count:l},y:{buffer:i.buffer,offset:x*l,count:l}},C.bounds=Lz(i.bounds,x,b)),n.domain||n.viewport||n.data){let E=o?Lz(i.padding,x,b):i.padding;if(i.domain){let[A,L,_,k]=Lz(i.domain,x,b);C.viewport=[f+A*u+E[0],h+L*c+E[1],f+_*u-E[2],h+k*c-E[3]]}else C.viewport=[f+b*d+d*E[0],h+x*v+v*E[1],f+(b+1)*d-d*E[2],h+(x+1)*v-v*E[3]]}n.color&&(C.color=i.color),n.size&&(C.size=i.size),n.marker&&(C.marker=i.marker),n.borderSize&&(C.borderSize=i.borderSize),n.borderColor&&(C.borderColor=i.borderColor),n.opacity&&(C.opacity=i.opacity),n.range&&(C.range=a?Lz(i.range,x,b):i.range||C.bounds),i.passes.push(p)}return this};vx.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r<e.length;r++)if(typeof e[r]==\"number\"){let{passes:n,passOffset:i}=this.traces[e[r]];t.push(...DUt(i,i+n.length))}else if(e[r].length){let n=e[r],{passes:i,passOffset:a}=this.traces[r];i=i.map((o,s)=>{t[a+s]=n})}this.scatter.draw(...t)}return this};vx.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function zUt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function Lz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function jBe(e){if(typeof e==\"number\")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=pK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var YBe=ye((M1r,ZBe)=>{\"use strict\";var OUt=XBe(),gK=Dr(),Pz=hf(),qUt=Sg().selectMode;ZBe.exports=function(t,r,n){if(n.length)for(var i=0;i<n.length;i++)BUt(t,n[i][0])};function BUt(e,t){var r=e._fullLayout,n=r._size,i=t.trace,a=t.t,o=r._splomScenes[i.uid],s=o.matrixOptions,l=s.cdata,u=r._glcanvas.data()[0].regl,c=r.dragmode,f,h,d,v,x;if(l.length!==0){s.lower=i.showupperhalf,s.upper=i.showlowerhalf,s.diagonal=i.diagonal.visible;var b=i._visibleDims,p=l.length,C=o.viewOpts={};for(C.ranges=new Array(p),C.domains=new Array(p),x=0;x<b.length;x++){d=b[x];var E=C.ranges[x]=new Array(4),A=C.domains[x]=new Array(4);f=Pz.getFromId(e,i._diag[d][0]),f&&(E[0]=f._rl[0],E[2]=f._rl[1],A[0]=f.domain[0],A[2]=f.domain[1]),h=Pz.getFromId(e,i._diag[d][1]),h&&(E[1]=h._rl[0],E[3]=h._rl[1],A[1]=h.domain[0],A[3]=h.domain[1])}var L=e._context.plotGlPixelRatio,_=n.l*L,k=n.b*L,M=n.w*L,g=n.h*L;C.viewport=[_,k,M+_,g+k],o.matrix===!0&&(o.matrix=OUt(u));var P=r.clickmode.indexOf(\"select\")>-1,T=qUt(c)||!!i.selectedpoints||P,z=!0;if(T){var O=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var V=i.selectedpoints,G={};for(d=0;d<V.length;d++)G[V[d]]=!0;var Z=[];for(d=0;d<O;d++)G[d]||Z.push(d);o.unselectBatch=Z}var H=a.xpx=new Array(p),N=a.ypx=new Array(p);for(x=0;x<b.length;x++){if(d=b[x],f=Pz.getFromId(e,i._diag[d][0]),f)for(H[x]=new Array(O),v=0;v<O;v++)H[x][v]=f.c2p(l[x][v]);if(h=Pz.getFromId(e,i._diag[d][1]),h)for(N[x]=new Array(O),v=0;v<O;v++)N[x][v]=h.c2p(l[x][v])}if(o.selectBatch.length||o.unselectBatch.length){var j=gK.extendFlat({},s,o.unselectedOptions,C),re=gK.extendFlat({},s,o.selectedOptions,C);o.matrix.update(j,re),z=!1}}else a.xpx=a.ypx=null;if(z){var oe=gK.extendFlat({},s,C);o.matrix.update(oe,null)}}}});var mK=ye(KBe=>{\"use strict\";KBe.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s<o.length;s++){var l=o[s];if(t._diag[l][a]===n)return s}return!1}});var tNe=ye((C1r,eNe)=>{\"use strict\";var JBe=mK(),NUt=qF().calcHover,$Be=ho().getFromId,UUt=Ao().extendFlat;function VUt(e,t,r,n,i){i||(i={});var a=(n||\"\").charAt(0)===\"x\",o=(n||\"\").charAt(0)===\"y\",s=QBe(e,t,r);if((a||o)&&i.hoversubplots===\"axis\"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=UUt({},e),f=0;f<l.length;f++){var h=l[f];if(h!==e.xa._id+e.ya._id){o?c.xa=$Be(u,h,\"x\"):c.ya=$Be(u,h,\"y\");var d=a||o,v=QBe(c,t,r,d);s=s.concat(v)}}return s}function QBe(e,t,r,n){var i=e.cd,a=i[0].trace,o=e.scene,s=o.matrixOptions.cdata,l=e.xa,u=e.ya,c=l.c2p(t),f=u.c2p(r),h=e.distance,d=JBe.getDimIndex(a,l),v=JBe.getDimIndex(a,u);if(d===!1||v===!1)return[e];for(var x=s[d],b=s[v],p,C,E=h,A=0;A<x.length;A++)if(!(n&&A!==e.index)){var L=x[A],_=b[A],k=l.c2p(L)-c,M=u.c2p(_)-f,g=Math.sqrt(k*k+M*M);(n||g<E)&&(E=C=g,p=A)}return e.index=p,e.distance=E,e.dxy=C,p===void 0?[e]:[NUt(e,x,b,a)]}eNe.exports={hoverPoints:VUt}});var sNe=ye((k1r,oNe)=>{\"use strict\";var aNe=Dr(),rNe=aNe.pushUnique,iNe=Ru(),nNe=mK();oNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!iNe.hasMarkers(i)&&!iNe.hasText(i);if(i.visible!==!0||f)return c;var h=nNe.getDimIndex(i,l),d=nNe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],x=a.ypx[d],b=s[h],p=s[d],C=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var A=0;A<b.length;A++)r.contains([v[A],x[A]],null,A,t)?(c.push({pointNumber:A,x:b[A],y:p[A]}),rNe(C,A)):C.indexOf(A)!==-1?rNe(C,A):E.push(A);var L=o.matrixOptions;return!C.length&&!E.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,aNe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=C,o.unselectBatch=E,c}});var cNe=ye((L1r,uNe)=>{\"use strict\";var lNe=Dr(),GUt=F0(),HUt=Y2().markerStyle;uNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){GUt(t,n),lNe.extendFlat(i.matrixOptions,HUt(t,n));var a=lNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var hNe=ye((P1r,fNe)=>{\"use strict\";var jUt=qa(),WUt=uV();fNe.exports={moduleType:\"trace\",name:\"splom\",categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:fK(),supplyDefaults:PBe(),colorbar:$d(),calc:OBe(),plot:YBe(),hoverPoints:tNe().hoverPoints,selectPoints:sNe(),editStyle:cNe(),meta:{}};jUt.register(WUt)});var yNe=ye((I1r,mNe)=>{\"use strict\";var XUt=NY(),ZUt=qa(),YUt=Tz(),KUt=Id().getModuleCalcData,px=vh(),dNe=hf().getFromId,vNe=ho().shouldShowZeroLine,pNe=\"splom\",gNe={};function JUt(e){var t=e._fullLayout,r=ZUt.getModule(pNe),n=KUt(e.calcdata,r)[0],i=YUt(e,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],gNe);i&&(t._hasOnlyLargeSploms&&yK(e),r.plot(e,{},n))}function $Ut(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&yK(e);for(var n=0;n<t.length;n++){var i=t[n][0],a=i.trace,o=r._splomScenes[a.uid];a.type===\"splom\"&&o&&o.matrix&&QUt(e,a,o)}}function QUt(e,t,r){for(var n=r.matrixOptions.data.length,i=t._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],l=a[o]=new Array(4),u=dNe(e,t._diag[s][0]);u&&(l[0]=u.r2l(u.range[0]),l[2]=u.r2l(u.range[1]));var c=dNe(e,t._diag[s][1]);c&&(l[1]=c.r2l(c.range[0]),l[3]=c.r2l(c.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function yK(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,n=t._splomGrid;n||(n=t._splomGrid=XUt(r)),n.update(eVt(e))}function eVt(e){var t=e._context.plotGlPixelRatio,r=e._fullLayout,n=r._size,i=[0,0,r.width*t,r.height*t],a={},o;function s(_,k,M,g,P,T){M*=t,g*=t,P*=t,T*=t;var z=k[_+\"color\"],O=k[_+\"width\"],V=String(z+O);V in a?a[V].data.push(NaN,NaN,M,g,P,T):a[V]={data:[M,g,P,T],join:\"rect\",thickness:O*t,color:z,viewport:i,range:i,overlay:!1}}for(o in r._splomSubplots){var l=r._plots[o],u=l.xaxis,c=l.yaxis,f=u._gridVals,h=c._gridVals,d=u._offset,v=u._length,x=c._length,b=n.b+c.domain[0]*n.h,p=-c._m,C=-p*c.r2l(c.range[0],c.calendar),E,A;if(u.showgrid)for(o=0;o<f.length;o++)E=d+u.l2p(f[o].x),s(\"grid\",u,E,b,E,b+x);if(c.showgrid)for(o=0;o<h.length;o++)A=b+C+p*h[o].x,s(\"grid\",c,d,A,d+v,A);vNe(e,u,c)&&(E=d+u.l2p(0),s(\"zeroline\",u,E,b,E,b+x)),vNe(e,c,u)&&(A=b+C+0,s(\"zeroline\",c,d,A,d+v,A))}var L=[];for(o in a)L.push(a[o]);return L}function tVt(e,t,r,n){var i={},a;if(n._splomScenes){for(a=0;a<e.length;a++){var o=e[a];o.type===\"splom\"&&(i[o.uid]=1)}for(a=0;a<r.length;a++){var s=r[a];if(!i[s.uid]){var l=n._splomScenes[s.uid];l&&l.destroy&&l.destroy(),n._splomScenes[s.uid]=null,delete n._splomScenes[s.uid]}}}Object.keys(n._splomScenes||{}).length===0&&delete n._splomScenes,n._splomGrid&&!t._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),px.clean(e,t,r,n)}mNe.exports={name:pNe,attr:px.attr,attrRegex:px.attrRegex,layoutAttributes:px.layoutAttributes,supplyLayoutDefaults:px.supplyLayoutDefaults,drawFramework:px.drawFramework,plot:JUt,drag:$Ut,updateGrid:yK,clean:tVt,updateFx:px.updateFx,toSVG:px.toSVG,reglPrecompiled:gNe}});var bNe=ye((R1r,xNe)=>{\"use strict\";var _Ne=hNe();_Ne.basePlotModule=yNe(),xNe.exports=_Ne});var TNe=ye((D1r,wNe)=>{\"use strict\";wNe.exports=bNe()});var bK=ye((F1r,ANe)=>{\"use strict\";var rVt=Tu(),_K=Rd(),xK=ec(),iVt=kc().attributes,Iz=Ao().extendFlat,nVt=pl().templatedArray;ANe.exports={domain:iVt({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:xK({editType:\"plot\"}),tickfont:xK({autoShadowDflt:!0,editType:\"plot\"}),rangefont:xK({editType:\"plot\"}),dimensions:nVt(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:Iz({},_K.tickvals,{editType:\"plot\"}),ticktext:Iz({},_K.ticktext,{editType:\"plot\"}),tickformat:Iz({},_K.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:Iz({editType:\"calc\"},rVt(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"})),unselected:{line:{color:{valType:\"color\",dflt:\"#7f7f7f\",editType:\"plot\"},opacity:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"plot\"},editType:\"plot\"},editType:\"plot\"}}});var LC=ye((z1r,SNe)=>{\"use strict\";SNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[\"contextLineLayer\",\"focusLineLayer\",\"pickLineLayer\"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:\"magenta\",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:\"axis-extent-text\",parcoordsLineLayers:\"parcoords-line-layers\",parcoordsLineLayer:\"parcoords-lines\",parcoords:\"parcoords\",parcoordsControlView:\"parcoords-control-view\",yAxis:\"y-axis\",axisOverlays:\"axis-overlays\",axis:\"axis\",axisHeading:\"axis-heading\",axisTitle:\"axis-title\",axisExtent:\"axis-extent\",axisExtentTop:\"axis-extent-top\",axisExtentTopText:\"axis-extent-top-text\",axisExtentBottom:\"axis-extent-bottom\",axisExtentBottomText:\"axis-extent-bottom-text\",axisBrush:\"axis-brush\"},id:{filterBarPattern:\"filter-bar-pattern\"}}});var Km=ye((O1r,ENe)=>{\"use strict\";var aVt=VS();function MNe(e){return[e]}ENe.exports={keyFun:function(e){return e.key},repeat:MNe,descend:aVt,wrap:MNe,unwrap:function(e){return e[0]}}});var AK=ye((q1r,qNe)=>{\"use strict\";var yh=LC(),em=Oa(),oVt=Km().keyFun,Rz=Km().repeat,m5=Dr().sorterAsc,sVt=Dr().strTranslate,CNe=yh.bar.snapRatio;function kNe(e,t){return e*(1-CNe)+t*CNe}var LNe=yh.bar.snapClose;function lVt(e,t){return e*(1-LNe)+t*LNe}function Fz(e,t,r,n){if(uVt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c<i*o;c+=i){var f=c+i,h=t[f];if(i*r<i*lVt(l,h))return kNe(l,u);if(i*r<i*h||f===o)return kNe(h,l);u=l,l=h}}function uVt(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}function cVt(e){e.attr(\"x\",-yh.bar.captureWidth/2).attr(\"width\",yh.bar.captureWidth)}function fVt(e){e.attr(\"visibility\",\"visible\").style(\"visibility\",\"visible\").attr(\"fill\",\"yellow\").attr(\"opacity\",0)}function hVt(e){if(!e.brush.filterSpecified)return\"0,\"+e.height;for(var t=PNe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,a,o=t.length?t[0][0]:null,s=0;s<t.length;s++)n=t[s],i=n[1]-n[0],r.push(o),r.push(i),a=s+1,a<t.length&&(o=t[a][0]-n[1]);return r.push(e.height),r}function PNe(e,t){return e.map(function(r){return r.map(function(n){return Math.max(0,n*t)}).sort(m5)})}function dVt(e,t){var r=yh.bar.handleHeight;if(!(t>e[1]+r||t<e[0]-r))return t>=.9*e[1]+.1*e[0]?\"n\":t<=.9*e[0]+.1*e[1]?\"s\":\"ns\"}function INe(){em.select(document.body).style(\"cursor\",null)}function TK(e){e.attr(\"stroke-dasharray\",hVt)}function Dz(e,t){var r=em.select(e).selectAll(\".highlight, .highlight-shadow\"),n=t?r.transition().duration(yh.bar.snapDuration).each(\"end\",t):r;TK(n)}function RNe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=PNe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]<u[h][0]-t?f:h),!isNaN(i)){var v=u[i],x=dVt(v,t);x&&(a.interval=l[i],a.intervalPix=v,a.region=x)}}if(e.ordinal&&!a.region){var b=e.unitTickvals,p=e.unitToPaddedPx.invert(t);for(o=0;o<b.length;o++){var C=[b[Math.max(o-1,0)]*.25+b[o]*.75,b[Math.min(o+1,b.length-1)]*.25+b[o]*.75];if(p>=C[0]&&p<=C[1]){a.clickableOrdinalRange=C;break}}}return a}function vVt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*yh.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=RNe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region===\"ns\",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-yh.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region===\"s\"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function DNe(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*yh.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(m5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Dz(e.parentNode)}function pVt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(FNe(e,t),DNe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,INe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&wK(r)):wK(r),i.brushCallback(t),Dz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),i.newExtent=[Fz(0,l,i.newExtent[0],i.stayingIntervals),Fz(1,l,i.newExtent[1],i.stayingIntervals)];var u=i.newExtent[1]>i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||wK(r),i.brushCallback(t),u?Dz(e.parentNode,s):(s(),Dz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function FNe(e,t){var r=t.height-em.mouse(e)[1]-2*yh.verticalPadding,n=RNe(t,r),i=\"crosshair\";n.clickableOrdinalRange?i=\"pointer\":n.region&&(i=n.region+\"-resize\"),em.select(document.body).style(\"cursor\",i)}function gVt(e){e.on(\"mousemove\",function(t){em.event.preventDefault(),t.parent.inBrushDrag||FNe(this,t)}).on(\"mouseleave\",function(t){t.parent.inBrushDrag||INe()}).call(em.behavior.drag().on(\"dragstart\",function(t){vVt(this,t)}).on(\"drag\",function(t){DNe(this,t)}).on(\"dragend\",function(t){pVt(this,t)}))}function zNe(e,t){return e[0]-t[0]}function mVt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(\".background\").data(Rz);i.enter().append(\"rect\").classed(\"background\",!0).call(cVt).call(fVt).style(\"pointer-events\",n?\"none\":\"auto\").attr(\"transform\",sVt(0,yh.verticalPadding)),i.call(gVt).attr(\"height\",function(s){return s.height-yh.verticalPadding});var a=e.selectAll(\".highlight-shadow\").data(Rz);a.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-yh.bar.width/2).attr(\"stroke-width\",yh.bar.width+yh.bar.strokeWidth).attr(\"stroke\",t).attr(\"opacity\",yh.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),a.attr(\"y1\",function(s){return s.height}).call(TK);var o=e.selectAll(\".highlight\").data(Rz);o.enter().append(\"line\").classed(\"highlight\",!0).attr(\"x\",-yh.bar.width/2).attr(\"stroke-width\",yh.bar.width-yh.bar.strokeWidth).attr(\"stroke\",yh.bar.fillColor).attr(\"opacity\",yh.bar.fillOpacity).attr(\"stroke-linecap\",\"butt\"),o.attr(\"y1\",function(s){return s.height}).call(TK)}function yVt(e,t,r){var n=e.selectAll(\".\"+yh.cn.axisBrush).data(Rz,oVt);n.enter().append(\"g\").classed(yh.cn.axisBrush,!0),mVt(n,t,r)}function _Vt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function wK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function xVt(e){return function(r){var n=r.brush,i=_Vt(n),a=i.slice();n.filter.set(a),e()}}function ONe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function bVt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(m5)}).sort(zNe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=ONe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function wVt(e,t,r,n,i,a){var o=bVt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:xVt(i),brushEndCallback:a}}}function TVt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(m5)}),t.multiselect?e=ONe(e.sort(zNe)):e=[e[0]]):e=[e.sort(m5)],t.tickvals){var r=t.tickvals.slice().sort(m5);if(e=e.map(function(n){var i=[Fz(0,r,n[0],[]),Fz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}qNe.exports={makeBrush:wVt,ensureAxisBrush:yVt,cleanRanges:TVt}});var UNe=ye((B1r,NNe)=>{\"use strict\";var gx=Dr(),AVt=pv().hasColorscale,SVt=Jh(),MVt=kc().defaults,EVt=Yd(),CVt=ho(),BNe=bK(),kVt=AK(),SK=LC().maxDimensionCount,LVt=Sz();function PVt(e,t,r,n,i){var a=i(\"line.color\",r);if(AVt(e,\"line\")&&gx.isArrayOrTypedArray(a)){if(a.length)return i(\"line.colorscale\"),SVt(e,t,n,i,{prefix:\"line.\",cLetter:\"c\"}),a.length;t.line.color=r}return 1/0}function IVt(e,t,r,n){function i(u,c){return gx.coerce(e,t,BNe.dimensions,u,c)}var a=i(\"values\"),o=i(\"visible\");if(a&&a.length||(o=t.visible=!1),o){i(\"label\"),i(\"tickvals\"),i(\"ticktext\"),i(\"tickformat\");var s=i(\"range\");t._ax={_id:\"y\",type:\"linear\",showexponent:\"all\",exponentformat:\"B\",range:s},CVt.setConvert(t._ax,n.layout),i(\"multiselect\");var l=i(\"constraintrange\");l&&(t.constraintrange=kVt.cleanRanges(l,t))}}NNe.exports=function(t,r,n,i){function a(c,f){return gx.coerce(t,r,BNe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>SK&&(gx.log(\"parcoords traces support up to \"+SK+\" dimensions at the moment\"),o.splice(SK));var s=EVt(t,r,{name:\"dimensions\",layout:i,handleItemDefaults:IVt}),l=PVt(t,r,n,i,a);MVt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),LVt(r,s,\"values\",l);var u=gx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});gx.coerceFont(a,\"labelfont\",u),gx.coerceFont(a,\"tickfont\",u,{autoShadowDflt:!0}),gx.coerceFont(a,\"rangefont\",u),a(\"labelangle\"),a(\"labelside\"),a(\"unselected.line.color\"),a(\"unselected.line.opacity\")}});var GNe=ye((N1r,VNe)=>{\"use strict\";var RVt=Dr().isArrayOrTypedArray,MK=tc(),DVt=Km().wrap;VNe.exports=function(t,r){var n,i;return MK.hasColorscale(r,\"line\")&&RVt(r.line.color)?(n=r.line.color,i=MK.extractOpts(r.line).colorscale,MK.calc(t,r,{vals:n,containerStr:\"line\",cLetter:\"c\"})):(n=FVt(r._length),i=[[0,r.line.color],[1,r.line.color]]),DVt({lineColor:n,cscale:i})};function FVt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}});function zVt(e){var c,f;var t,r=[],n=1,i;if(typeof e==\"number\")return{space:\"rgb\",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e==\"number\")return{space:\"rgb\",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),EK.default[e])r=EK.default[e].slice(),i=\"rgb\";else if(e===\"transparent\")n=0,i=\"rgb\",r=[0,0,0];else if(e[0]===\"#\"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i=\"rgb\"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\\s*\\(([^\\)]*)\\)/.exec(e)){var l=t[1];i=l.replace(/a$/,\"\");var u=i===\"cmyk\"?4:i===\"gray\"?1:3;r=t[2].trim().split(/\\s*[,\\/]\\s*|\\s+/),i===\"color\"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]===\"%\")return h=parseFloat(h)/100,d===3?h:i===\"rgb\"?h*255:i[0]===\"h\"||i[0]===\"l\"&&!d?h*100:i===\"lab\"?h*125:i===\"lch\"?d<2?h*150:h*360:i[0]===\"o\"&&!d?h:i===\"oklab\"?h*.4:i===\"oklch\"?d<2?h*.4:h*360:h;if(i[d]===\"h\"||d===2&&i[i.length-1]===\"h\"){if(HNe[h]!==void 0)return HNe[h];if(h.endsWith(\"deg\"))return parseFloat(h);if(h.endsWith(\"turn\"))return parseFloat(h)*360;if(h.endsWith(\"grad\"))return parseFloat(h)*360/400;if(h.endsWith(\"rad\"))return parseFloat(h)*180/Math.PI}return h===\"none\"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\\s|\\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(\"\"))==null?void 0:f.toLowerCase())||\"rgb\");return{space:i,values:r,alpha:n}}var EK,jNe,HNe,WNe=gu(()=>{EK=Xet(dX(),1),jNe=zVt,HNe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var PC,CK=gu(()=>{PC={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}});var zz,XNe=gu(()=>{CK();zz={name:\"hsl\",min:[0,0,0],max:[360,100,100],channel:[\"hue\",\"saturation\",\"lightness\"],alias:[\"HSL\"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};PC.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var YNe={};uee(YNe,{default:()=>ZNe});function ZNe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=jNe(e);if(!i.space)return[];let a=i.space[0]===\"h\"?zz.min:PC.min,o=i.space[0]===\"h\"?zz.max:PC.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]===\"h\"&&(t=zz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var KNe=gu(()=>{WNe();CK();XNe()});var kK=ye(Oz=>{\"use strict\";var OVt=Dr().isTypedArray;Oz.convertTypedArray=function(e){return OVt(e)?Array.prototype.slice.call(e):e};Oz.isOrdinal=function(e){return!!e.tickvals};Oz.isVisible=function(e){return e.visible||!(\"visible\"in e)}});var oUe=ye((Y1r,aUe)=>{\"use strict\";var qVt=[\"precision highp float;\",\"\",\"varying vec4 fragColor;\",\"\",\"attribute vec4 p01_04, p05_08, p09_12, p13_16,\",\"               p17_20, p21_24, p25_28, p29_32,\",\"               p33_36, p37_40, p41_44, p45_48,\",\"               p49_52, p53_56, p57_60, colors;\",\"\",\"uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\",\"             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\",\"\",\"uniform vec2 resolution, viewBoxPos, viewBoxSize;\",\"uniform float maskHeight;\",\"uniform float drwLayer; // 0: context, 1: focus, 2: pick\",\"uniform vec4 contextColor;\",\"uniform sampler2D maskTexture, palette;\",\"\",\"bool isPick    = (drwLayer > 1.5);\",\"bool isContext = (drwLayer < 0.5);\",\"\",\"const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\",\"const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\",\"\",\"float val(mat4 p, mat4 v) {\",\"    return dot(matrixCompMult(p, v) * UNITS, UNITS);\",\"}\",\"\",\"float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\",\"    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\",\"    return y1 * (1.0 - ratio) + y2 * ratio;\",\"}\",\"\",\"int iMod(int a, int b) {\",\"    return a - b * (a / b);\",\"}\",\"\",\"bool fOutside(float p, float lo, float hi) {\",\"    return (lo < hi) && (lo > p || p > hi);\",\"}\",\"\",\"bool vOutside(vec4 p, vec4 lo, vec4 hi) {\",\"    return (\",\"        fOutside(p[0], lo[0], hi[0]) ||\",\"        fOutside(p[1], lo[1], hi[1]) ||\",\"        fOutside(p[2], lo[2], hi[2]) ||\",\"        fOutside(p[3], lo[3], hi[3])\",\"    );\",\"}\",\"\",\"bool mOutside(mat4 p, mat4 lo, mat4 hi) {\",\"    return (\",\"        vOutside(p[0], lo[0], hi[0]) ||\",\"        vOutside(p[1], lo[1], hi[1]) ||\",\"        vOutside(p[2], lo[2], hi[2]) ||\",\"        vOutside(p[3], lo[3], hi[3])\",\"    );\",\"}\",\"\",\"bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    return mOutside(A, loA, hiA) ||\",\"           mOutside(B, loB, hiB) ||\",\"           mOutside(C, loC, hiC) ||\",\"           mOutside(D, loD, hiD);\",\"}\",\"\",\"bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    mat4 pnts[4];\",\"    pnts[0] = A;\",\"    pnts[1] = B;\",\"    pnts[2] = C;\",\"    pnts[3] = D;\",\"\",\"    for(int i = 0; i < 4; ++i) {\",\"        for(int j = 0; j < 4; ++j) {\",\"            for(int k = 0; k < 4; ++k) {\",\"                if(0 == iMod(\",\"                    int(255.0 * texture2D(maskTexture,\",\"                        vec2(\",\"                            (float(i * 2 + j / 2) + 0.5) / 8.0,\",\"                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\",\"                        ))[3]\",\"                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\",\"                    2\",\"                )) return true;\",\"            }\",\"        }\",\"    }\",\"    return false;\",\"}\",\"\",\"vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    float x = 0.5 * sign(v) + 0.5;\",\"    float y = axisY(x, A, B, C, D);\",\"    float z = 1.0 - abs(v);\",\"\",\"    z += isContext ? 0.0 : 2.0 * float(\",\"        outsideBoundingBox(A, B, C, D) ||\",\"        outsideRasterMask(A, B, C, D)\",\"    );\",\"\",\"    return vec4(\",\"        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\",\"        z,\",\"        1.0\",\"    );\",\"}\",\"\",\"void main() {\",\"    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\",\"    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\",\"    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\",\"    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\",\"\",\"    float v = colors[3];\",\"\",\"    gl_Position = position(isContext, v, A, B, C, D);\",\"\",\"    fragColor =\",\"        isContext ? vec4(contextColor) :\",\"        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\",\"}\"].join(`\n",
       "`),BVt=[\"precision highp float;\",\"\",\"varying vec4 fragColor;\",\"\",\"void main() {\",\"    gl_FragColor = fragColor;\",\"}\"].join(`\n",
       "`),IC=LC().maxDimensionCount,rUe=Dr(),JNe=1e-6,qz=2048,NVt=new Uint8Array(4),$Ne=new Uint8Array(4),QNe={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function UVt(e){e.read({x:0,y:0,width:1,height:1,data:NVt})}function iUe(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function VVt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],iUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}r.drawCompleted||(UVt(e),r.drawCompleted=!0),s(0)}function GVt(e){return Math.max(JNe,Math.min(1-JNe,e))}function HVt(e,t){for(var r=new Array(256),n=0;n<256;n++)r[n]=e(n/255).concat(t);return r}function LK(e,t){return(e>>>8*t)%256/255}function jVt(e,t,r){for(var n=new Array(e*(IC+4)),i=0,a=0;a<e;a++){for(var o=0;o<IC;o++)n[i++]=o<t.length?t[o].paddedUnitValues[a]:.5;n[i++]=LK(a,2),n[i++]=LK(a,1),n[i++]=LK(a,0),n[i++]=GVt(r[a])}return n}function WVt(e,t,r){for(var n=new Array(t*8),i=0,a=0;a<t;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=e*4+s,u=r[a*64+l];l===63&&o===0&&(u*=-1),n[i++]=u}return n}function eUe(e){var t=\"0\"+e;return t.substr(t.length-2)}function nUe(e){return e<IC?\"p\"+eUe(e+1)+\"_\"+eUe(e+4):\"colors\"}function XVt(e,t,r){for(var n=0;n<=IC;n+=4)e[nUe(n)](WVt(n/4,t,r))}function ZVt(e){for(var t={},r=0;r<=IC;r+=4)t[nUe(r)]=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)});return t}function YVt(e,t,r,n,i,a,o,s,l,u,c,f,h,d){for(var v=[[],[]],x=0;x<64;x++)v[0][x]=x===i?1:0,v[1][x]=x===a?1:0;o*=d,s*=d,l*=d,u*=d;var b=e.lines.canvasOverdrag*d,p=e.domain,C=e.canvasWidth*d,E=e.canvasHeight*d,A=e.pad.l*d,L=e.pad.b*d,_=e.layoutHeight*d,k=e.layoutWidth*d,M=e.deselectedLines.color,g=e.deselectedLines.opacity,P=rUe.extendFlat({key:c,resolution:[C,E],viewBoxPos:[o+b,s],viewBoxSize:[l,u],i0:i,i1:a,dim0A:v[0].slice(0,16),dim0B:v[0].slice(16,32),dim0C:v[0].slice(32,48),dim0D:v[0].slice(48,64),dim1A:v[1].slice(0,16),dim1B:v[1].slice(16,32),dim1C:v[1].slice(32,48),dim1D:v[1].slice(48,64),drwLayer:f,contextColor:[M[0]/255,M[1]/255,M[2]/255,g!==\"auto\"?M[3]*g:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(n===t?0:o+b)+(A-b)+k*p.x[0],scissorWidth:(n===r?C-o+b:l+.5)+(n===t?o+b:0),scissorY:s+L+_*p.y[0],scissorHeight:u,viewportX:A-b+k*p.x[0],viewportY:L+_*p.y[0],viewportWidth:C,viewportHeight:E},h);return P}function tUe(e){var t=qz-1,r=Math.max(0,Math.floor(e[0]*t),0),n=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(r,n),Math.max(r,n)]}aUe.exports=function(e,t){var r=t.context,n=t.pick,i=t.regl,a=i._gl,o=a.getParameter(a.ALIASED_LINE_WIDTH_RANGE),s=Math.max(o[0],Math.min(o[1],t.viewModel.plotGlPixelRatio)),l={currentRafs:{},drawCompleted:!0,clearOnly:!1},u,c,f,h,d=ZVt(i),v,x=i.texture(QNe),b=[];C(t);var p=i({profile:!1,blend:{enable:r,func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:1,dstAlpha:1},equation:{rgb:\"add\",alpha:\"add\"},color:[0,0,0,0]},depth:{enable:!r,mask:!0,func:\"less\",range:[0,1]},cull:{enable:!0,face:\"back\"},scissor:{enable:!0,box:{x:i.prop(\"scissorX\"),y:i.prop(\"scissorY\"),width:i.prop(\"scissorWidth\"),height:i.prop(\"scissorHeight\")}},viewport:{x:i.prop(\"viewportX\"),y:i.prop(\"viewportY\"),width:i.prop(\"viewportWidth\"),height:i.prop(\"viewportHeight\")},dither:!1,vert:qVt,frag:BVt,primitive:\"lines\",lineWidth:s,attributes:d,uniforms:{resolution:i.prop(\"resolution\"),viewBoxPos:i.prop(\"viewBoxPos\"),viewBoxSize:i.prop(\"viewBoxSize\"),dim0A:i.prop(\"dim0A\"),dim1A:i.prop(\"dim1A\"),dim0B:i.prop(\"dim0B\"),dim1B:i.prop(\"dim1B\"),dim0C:i.prop(\"dim0C\"),dim1C:i.prop(\"dim1C\"),dim0D:i.prop(\"dim0D\"),dim1D:i.prop(\"dim1D\"),loA:i.prop(\"loA\"),hiA:i.prop(\"hiA\"),loB:i.prop(\"loB\"),hiB:i.prop(\"hiB\"),loC:i.prop(\"loC\"),hiC:i.prop(\"hiC\"),loD:i.prop(\"loD\"),hiD:i.prop(\"hiD\"),palette:x,contextColor:i.prop(\"contextColor\"),maskTexture:i.prop(\"maskTexture\"),drwLayer:i.prop(\"drwLayer\"),maskHeight:i.prop(\"maskHeight\")},offset:i.prop(\"offset\"),count:i.prop(\"count\")});function C(M){u=M.model,c=M.viewModel,f=c.dimensions.slice(),h=f[0]?f[0].values.length:0;var g=u.lines,P=n?g.color.map(function(z,O){return O/g.color.length}):g.color,T=jVt(h,f,P);XVt(d,h,T),!r&&!n&&(x=i.texture(rUe.extendFlat({data:HVt(u.unitToColor,255)},QNe)))}function E(M){var g,P,T,z=[[],[]];for(T=0;T<64;T++){var O=!M&&T<f.length?f[T].brush.filter.getBounds():[-1/0,1/0];z[0][T]=O[0],z[1][T]=O[1]}var V=qz*8,G=new Array(V);for(g=0;g<V;g++)G[g]=255;if(!M)for(g=0;g<f.length;g++){var Z=g%8,H=(g-Z)/8,N=Math.pow(2,Z),j=f[g],re=j.brush.filter.get();if(!(re.length<2)){var oe=tUe(re[0])[1];for(P=1;P<re.length;P++){var _e=tUe(re[P]);for(T=oe+1;T<_e[0];T++)G[T*8+H]&=~N;oe=Math.max(oe,_e[1])}}}var Me={shape:[8,qz],format:\"alpha\",type:\"uint8\",mag:\"nearest\",min:\"nearest\",data:G};return v?v(Me):v=i.texture(Me),{maskTexture:v,maskHeight:qz,loA:z[0].slice(0,16),loB:z[0].slice(16,32),loC:z[0].slice(32,48),loD:z[0].slice(48,64),hiA:z[1].slice(0,16),hiB:z[1].slice(16,32),hiC:z[1].slice(32,48),hiD:z[1].slice(48,64)}}function A(M,g,P){var T=M.length,z,O,V,G=1/0,Z=-1/0;for(z=0;z<T;z++)M[z].dim0.canvasX<G&&(G=M[z].dim0.canvasX,O=z),M[z].dim1.canvasX>Z&&(Z=M[z].dim1.canvasX,V=z);T===0&&iUe(i,0,0,u.canvasWidth,u.canvasHeight);var H=E(r);for(z=0;z<T;z++){var N=M[z],j=N.dim0.crossfilterDimensionIndex,re=N.dim1.crossfilterDimensionIndex,oe=N.canvasX,_e=N.canvasY,Me=oe+N.panelSizeX,ke=N.plotGlPixelRatio;if(g||!b[j]||b[j][0]!==oe||b[j][1]!==Me){b[j]=[oe,Me];var me=YVt(u,O,V,z,j,re,oe,_e,N.panelSizeX,N.panelSizeY,N.dim0.crossfilterDimensionIndex,r?0:n?2:1,H,ke);l.clearOnly=P;var ie=g?u.lines.blockLineCount:h;VVt(i,p,l,ie,h,me)}}}function L(M,g){return i.read({x:M,y:g,width:1,height:1,data:$Ne}),$Ne}function _(M,g,P,T){var z=new Uint8Array(4*P*T);return i.read({x:M,y:g,width:P,height:T,data:z}),z}function k(){e.style[\"pointer-events\"]=\"none\",x.destroy(),v&&v.destroy();for(var M in d)d[M].destroy()}return{render:A,readPixel:L,readPixels:_,destroy:k,update:C}}});var xUe=ye((K1r,_Ue)=>{\"use strict\";var Bd=Oa(),l1=Dr(),PK=l1.isArrayOrTypedArray,hUe=l1.numberFormat,dUe=(KNe(),ab(YNe)).default,vUe=ho(),KVt=l1.strRotate,Jm=l1.strTranslate,JVt=ru(),Bz=So(),sUe=tc(),DK=Km(),tg=DK.keyFun,$m=DK.repeat,pUe=DK.unwrap,y5=kK(),Dl=LC(),gUe=AK(),$Vt=oUe();function lUe(e,t,r){return l1.aggNums(e,null,t,r)}function mUe(e,t){return FK(lUe(Math.min,e,t),lUe(Math.max,e,t))}function Nz(e){var t=e.range;return t?FK(t[0],t[1]):mUe(e.values,e._length)}function FK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function QVt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function eGt(e,t,r,n,i){var a=Nz(r);return n?Bd.scale.ordinal().domain(n.map(QVt(hUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Bd.scale.linear().domain(a).range([e-t,t])}function tGt(e,t){return Bd.scale.linear().range([t,e-t])}function rGt(e,t){return Bd.scale.linear().domain(Nz(e)).range([t,1-t])}function iGt(e){if(e.tickvals){var t=Nz(e);return Bd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function nGt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=dUe(a[1]);return Bd.rgb(\"rgb(\"+o[0]+\",\"+o[1]+\",\"+o[2]+\")\")}),n=function(a){return function(o){return o[a]}},i=\"rgb\".split(\"\").map(function(a){return Bd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function RK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function aGt(e,t,r){var n=pUe(t),i=n.trace,a=y5.convertTypedArray(n.lineColor),o=i.line,s={color:dUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=sUe.extractOpts(o),u=l.reversescale?sUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,x=i.labelfont,b=i.tickfont,p=i.rangefont,C=l1.extendDeepNoArrays({},o,{color:a.map(Bd.scale.linear().domain(Nz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),E=Math.floor(h*(c.x[1]-c.x[0])),A=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},_=E,k=A;return{key:r,colCount:f.filter(y5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:nGt(u),lines:C,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:x,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:_*Dl.canvasPixelRatio+2*C.canvasOverdrag,canvasHeight:k*Dl.canvasPixelRatio,width:_,height:k,canvasPixelRatio:Dl.canvasPixelRatio}}function oGt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=tGt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(y5.isVisible).map(function(h,d){var v=rGt(h,l),x=f[h.label];f[h.label]=(x||0)+1;var b=h.label+(x?\"__\"+x:\"\"),p=h.constraintrange,C=p&&p.length;C&&!PK(p[0])&&(p=[p]);var E=C?p.map(function(O){return O.map(v)}):[[-1/0,1/0]],A=function(){var O=c;O.focusLayer&&O.focusLayer.render(O.panels,!0);var V=RK(O);!e.contextShown()&&V?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!V&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,k;function M(O,V){return{val:O,text:k[V]}}function g(O,V){return O.val-V.val}if(PK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),k=h.ticktext,!PK(k)||!k.length?k=_.map(hUe(h.tickformat)):k.length>_.length?k=k.slice(0,_.length):_.length>k.length&&(_=_.slice(0,k.length));for(var P=1;P<_.length;P++)if(_[P]<_[P-1]){for(var T=_.map(M).sort(g),z=0;z<_.length;z++)_[z]=T[z].val,k[z]=T[z].text;break}}else _=void 0;return L=y5.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:k,ordinal:y5.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(v),unitTickvals:_&&_.map(v),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:eGt(i,Dl.verticalPadding,h,_,k),ordinalScale:iGt(h),parent:c,model:r,brush:gUe.makeBrush(e,C,E,function(){e.linePickActive(!1)},A,function(O){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var V=v.invert,G=O.map(function(Z){return Z.map(V).sort(l1.sorterAsc)}).sort(function(Z,H){return Z[0]-H[0]});t.filterChanged(c.key,h._index,G)}})}}),c}function uUe(e){e.classed(Dl.cn.axisExtentText,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"default\")}function sGt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function cUe(e,t){var r=t===\"top\"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function IK(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a<i.length-1;a++){var o=n[a]||(n[a]={}),s=i[a],l=i[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=t.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function lGt(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].length;r++)for(var n=e[t][r].trace,i=n.dimensions,a=0;a<i.length;a++){var o=i[a].values,s=i[a]._ax;s&&(s.range?s.range=FK(s.range[0],s.range[1]):s.range=mUe(o,n._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=i[a].tickformat,vUe.calcTicks(s),s.cleanRange())}}function yUe(e,t){return vUe.tickText(e._ax,t,!1).text}function fUe(e,t){if(e.ordinal)return\"\";var r=e.domainScale.domain(),n=r[t?r.length-1:0];return yUe(e.model.dimensions[e.visibleIndex],n)}_Ue.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=o._toppaper,l=o._glcontainer,u=t._context.plotGlPixelRatio,c=t._fullLayout.paper_bgcolor;lGt(r);var f=sGt(),h=r.filter(function(z){return pUe(z).trace.visible}).map(aGt.bind(0,n)).map(oGt.bind(0,f,i));l.each(function(z,O){return l1.extendFlat(z,h[O])});var d=l.selectAll(\".gl-canvas\").each(function(z){z.viewModel=h[0],z.viewModel.plotGlPixelRatio=u,z.viewModel.paperColor=c,z.model=z.viewModel?z.viewModel.model:null}),v=null,x=d.filter(function(z){return z.pick});x.style(\"pointer-events\",a?\"none\":\"auto\").on(\"mousemove\",function(z){if(f.linePickActive()&&z.lineLayer&&i&&i.hover){var O=Bd.event,V=this.width,G=this.height,Z=Bd.mouse(this),H=Z[0],N=Z[1];if(H<0||N<0||H>=V||N>=G)return;var j=z.lineLayer.readPixel(H,G-1-N),re=j[3]!==0,oe=re?j[2]+256*(j[1]+256*j[0]):null,_e={x:H,y:N,clientX:O.clientX,clientY:O.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style(\"opacity\",function(z){return z.pick?0:1}),s.style(\"background\",\"rgba(255, 255, 255, 0)\");var b=s.selectAll(\".\"+Dl.cn.parcoords).data(h,tg);b.exit().remove(),b.enter().append(\"g\").classed(Dl.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),b.attr(\"transform\",function(z){return Jm(z.model.translateX,z.model.translateY)});var p=b.selectAll(\".\"+Dl.cn.parcoordsControlView).data($m,tg);p.enter().append(\"g\").classed(Dl.cn.parcoordsControlView,!0),p.attr(\"transform\",function(z){return Jm(z.model.pad.l,z.model.pad.t)});var C=p.selectAll(\".\"+Dl.cn.yAxis).data(function(z){return z.dimensions},tg);C.enter().append(\"g\").classed(Dl.cn.yAxis,!0),p.each(function(z){IK(C,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=$Vt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var O=!z.context||i;z.lineLayer.render(z.viewModel.panels,O)}}),C.attr(\"transform\",function(z){return Jm(z.xScale(z.xIndex),0)}),C.call(Bd.behavior.drag().origin(function(z){return z}).on(\"drag\",function(z){var O=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,Bd.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,C.sort(function(V,G){return V.x-G.x}).each(function(V,G){V.xIndex=G,V.x=z===V?V.x:V.xScale(V.xIndex),V.canvasX=V.x*V.model.canvasPixelRatio}),IK(C,O,u),C.filter(function(V){return Math.abs(z.xIndex-V.xIndex)!==0}).attr(\"transform\",function(V){return Jm(V.xScale(V.xIndex),0)}),Bd.select(this).attr(\"transform\",Jm(z.x,0)),C.each(function(V,G,Z){Z===z.parent.key&&(O.dimensions[G]=V)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!RK(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on(\"dragend\",function(z){var O=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,IK(C,O,u),Bd.select(this).attr(\"transform\",function(V){return Jm(V.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!RK(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(O.key,O.dimensions.map(function(V){return V.crossfilterDimensionIndex}))})),C.exit().remove();var E=C.selectAll(\".\"+Dl.cn.axisOverlays).data($m,tg);E.enter().append(\"g\").classed(Dl.cn.axisOverlays,!0),E.selectAll(\".\"+Dl.cn.axis).remove();var A=E.selectAll(\".\"+Dl.cn.axis).data($m,tg);A.enter().append(\"g\").classed(Dl.cn.axis,!0),A.each(function(z){var O=z.model.height/z.model.tickDistance,V=z.domainScale,G=V.domain();Bd.select(this).call(Bd.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(O,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return y5.isOrdinal(z)?Z:yUe(z.model.dimensions[z.visibleIndex],Z)}).scale(V)),Bz.font(A.selectAll(\"text\"),z.model.tickFont)}),A.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),A.selectAll(\"text\").style(\"cursor\",\"default\");var L=E.selectAll(\".\"+Dl.cn.axisHeading).data($m,tg);L.enter().append(\"g\").classed(Dl.cn.axisHeading,!0);var _=L.selectAll(\".\"+Dl.cn.axisTitle).data($m,tg);_.enter().append(\"text\").classed(Dl.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",a?\"none\":\"auto\"),_.text(function(z){return z.label}).each(function(z){var O=Bd.select(this);Bz.font(O,z.model.labelFont),JVt.convertToTspans(O,t)}).attr(\"transform\",function(z){var O=cUe(z.model.labelAngle,z.model.labelSide),V=Dl.axisTitleOffset;return(O.dir>0?\"\":Jm(0,2*V+z.model.height))+KVt(O.degrees)+Jm(-V*O.dx,-V*O.dy)}).attr(\"text-anchor\",function(z){var O=cUe(z.model.labelAngle,z.model.labelSide),V=Math.abs(O.dx),G=Math.abs(O.dy);return 2*V>G?O.dir*O.dx<0?\"start\":\"end\":\"middle\"});var k=E.selectAll(\".\"+Dl.cn.axisExtent).data($m,tg);k.enter().append(\"g\").classed(Dl.cn.axisExtent,!0);var M=k.selectAll(\".\"+Dl.cn.axisExtentTop).data($m,tg);M.enter().append(\"g\").classed(Dl.cn.axisExtentTop,!0),M.attr(\"transform\",Jm(0,-Dl.axisExtentOffset));var g=M.selectAll(\".\"+Dl.cn.axisExtentTopText).data($m,tg);g.enter().append(\"text\").classed(Dl.cn.axisExtentTopText,!0).call(uUe),g.text(function(z){return fUe(z,!0)}).each(function(z){Bz.font(Bd.select(this),z.model.rangeFont)});var P=k.selectAll(\".\"+Dl.cn.axisExtentBottom).data($m,tg);P.enter().append(\"g\").classed(Dl.cn.axisExtentBottom,!0),P.attr(\"transform\",function(z){return Jm(0,z.model.height+Dl.axisExtentOffset)});var T=P.selectAll(\".\"+Dl.cn.axisExtentBottomText).data($m,tg);T.enter().append(\"text\").classed(Dl.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(uUe),T.text(function(z){return fUe(z,!1)}).each(function(z){Bz.font(Bd.select(this),z.model.rangeFont)}),gUe.ensureAxisBrush(E,c,t)}});var OK=ye((zK,AUe)=>{\"use strict\";var uGt=xUe(),cGt=Tz(),bUe=kK().isVisible,TUe={};function wUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function fGt(e,t){return function(n,i){return wUe(e,t,n)-wUe(e,t,i)}}var zK=AUe.exports=function(t,r){var n=t._fullLayout,i=cGt(t,[],TUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,x){var b=v[0].trace;s[x]=b.index;var p=l[x]=b.index;a[x]=t.data[p].dimensions,o[x]=t.data[p].dimensions.slice()});var c=function(v,x,b){var p=o[v][x],C=b.map(function(M){return M.slice()}),E=\"dimensions[\"+x+\"].constraintrange\",A=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(A[E]===void 0){var L=p.constraintrange;A[E]=L||null}var _=t._fullData[s[v]].dimensions[x];C.length?(C.length===1&&(C=C[0]),p.constraintrange=C,_.constraintrange=C.slice(),C=[C]):(delete p.constraintrange,delete _.constraintrange,C=null);var k={};k[E]=C,t.emit(\"plotly_restyle\",[k,[l[v]]])},f=function(v){t.emit(\"plotly_hover\",v)},h=function(v){t.emit(\"plotly_unhover\",v)},d=function(v,x){var b=fGt(x,o[v].filter(bUe));a[v].sort(b),o[v].filter(function(p){return!bUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit(\"plotly_restyle\",[{dimensions:[a[v]]},[l[v]]])};uGt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};zK.reglPrecompiled=TUe});var MUe=ye(RC=>{\"use strict\";var SUe=Oa(),hGt=Id().getModuleCalcData,dGt=OK(),vGt=Wp();RC.name=\"parcoords\";RC.plot=function(e){var t=hGt(e.calcdata,\"parcoords\")[0];t.length&&dGt(e,t)};RC.clean=function(e,t,r,n){var i=n._has&&n._has(\"parcoords\"),a=t._has&&t._has(\"parcoords\");i&&!a&&(n._paperdiv.selectAll(\".parcoords\").remove(),n._glimages.selectAll(\"*\").remove())};RC.toSVG=function(e){var t=e._fullLayout._glimages,r=SUe.select(e).selectAll(\".svg-container\"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\");function i(){var a=this,o=a.toDataURL(\"image/png\"),s=t.append(\"svg:image\");s.attr({xmlns:vGt.svg,\"xlink:href\":o,preserveAspectRatio:\"none\",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){SUe.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")},60)}});var CUe=ye(($1r,EUe)=>{\"use strict\";EUe.exports={attributes:bK(),supplyDefaults:UNe(),calc:GNe(),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:MUe(),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}});var PUe=ye((Q1r,LUe)=>{\"use strict\";var kUe=CUe();kUe.plot=OK();LUe.exports=kUe});var RUe=ye((e_r,IUe)=>{\"use strict\";IUe.exports=PUe()});var qK=ye((t_r,OUe)=>{\"use strict\";var FUe=Ao().extendFlat,pGt=Gl(),DUe=ec(),gGt=Tu(),zUe=Qo().hovertemplateAttrs,mGt=kc().attributes,yGt=FUe({editType:\"calc\"},gGt(\"line\",{editTypeOverride:\"calc\"}),{shape:{valType:\"enumerated\",values:[\"linear\",\"hspline\"],dflt:\"linear\",editType:\"plot\"},hovertemplate:zUe({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\"]})});OUe.exports={domain:mGt({name:\"parcats\",trace:!0,editType:\"calc\"}),hoverinfo:FUe({},pGt.hoverinfo,{flags:[\"count\",\"probability\"],editType:\"plot\",arrayOk:!1}),hoveron:{valType:\"enumerated\",values:[\"category\",\"color\",\"dimension\"],dflt:\"category\",editType:\"plot\"},hovertemplate:zUe({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\",\"category\",\"categorycount\",\"colorcount\",\"bandcolorcount\"]}),arrangement:{valType:\"enumerated\",values:[\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"perpendicular\",editType:\"plot\"},bundlecolors:{valType:\"boolean\",dflt:!0,editType:\"plot\"},sortpaths:{valType:\"enumerated\",values:[\"forward\",\"backward\"],dflt:\"forward\",editType:\"plot\"},labelfont:DUe({editType:\"calc\"}),tickfont:DUe({autoShadowDflt:!0,editType:\"calc\"}),dimensions:{_isLinkedToArray:\"dimension\",label:{valType:\"string\",editType:\"calc\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",dflt:[],editType:\"calc\"},displayindex:{valType:\"integer\",editType:\"calc\"},editType:\"calc\",visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"}},line:yGt,counts:{valType:\"number\",min:0,dflt:1,arrayOk:!0,editType:\"calc\"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var NUe=ye((r_r,BUe)=>{\"use strict\";var _5=Dr(),_Gt=pv().hasColorscale,xGt=Jh(),bGt=kc().defaults,wGt=Yd(),qUe=qK(),TGt=Sz(),AGt=vv().isTypedArraySpec;function SGt(e,t,r,n,i){i(\"line.shape\"),i(\"line.hovertemplate\");var a=i(\"line.color\",n.colorway[0]);if(_Gt(e,\"line\")&&_5.isArrayOrTypedArray(a)){if(a.length)return i(\"line.colorscale\"),xGt(e,t,n,i,{prefix:\"line.\",cLetter:\"c\"}),a.length;t.line.color=r}return 1/0}function MGt(e,t){function r(u,c){return _5.coerce(e,t,qUe.dimensions,u,c)}var n=r(\"values\"),i=r(\"visible\");if(n&&n.length||(i=t.visible=!1),i){r(\"label\"),r(\"displayindex\",t._index);var a=e.categoryarray,o=_5.isArrayOrTypedArray(a)&&a.length>0||AGt(a),s;o&&(s=\"array\");var l=r(\"categoryorder\",s);l===\"array\"?(r(\"categoryarray\"),r(\"ticktext\")):(delete e.categoryarray,delete e.ticktext),!o&&l===\"array\"&&(t.categoryorder=\"trace\")}}BUe.exports=function(t,r,n,i){function a(u,c){return _5.coerce(t,r,qUe,u,c)}var o=wGt(t,r,{name:\"dimensions\",handleItemDefaults:MGt}),s=SGt(t,r,n,i,a);bGt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),TGt(r,o,\"values\",s),a(\"hoveron\"),a(\"hovertemplate\"),a(\"arrangement\"),a(\"bundlecolors\"),a(\"sortpaths\"),a(\"counts\");var l=i.font;_5.coerceFont(a,\"labelfont\",l,{overrideDflt:{size:Math.round(l.size)}}),_5.coerceFont(a,\"tickfont\",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var VUe=ye((i_r,UUe)=>{\"use strict\";var EGt=Km().wrap,CGt=pv().hasColorscale,kGt=gv(),LGt=YO(),PGt=So(),DC=Dr(),IGt=Eo();UUe.exports=function(t,r){var n=DC.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder===\"trace\")P=null;else if(g.categoryorder===\"array\")P=g.categoryarray;else{P=LGt(g.values);for(var T=!0,z=0;z<P.length;z++)if(!IGt(P[z])){T=!1;break}P.sort(T?DC.sorterAsc:void 0),g.categoryorder===\"category descending\"&&(P=P.reverse())}return BGt(g.values,P)}),a,o,s;DC.isArrayOrTypedArray(r.counts)?a=r.counts:a=[r.counts],NGt(n),n.forEach(function(g,P){UGt(g,i[P])});var l=r.line,u;l?(CGt(r,\"line\")&&kGt(t,r,{vals:r.line.color,containerStr:\"line\",cLetter:\"c\"}),u=PGt.tryColorscale(l)):u=DC.identity;function c(g){var P,T;return DC.isArrayOrTypedArray(l.color)?(P=l.color[g%l.color.length],T=P):P=l.color,{color:u(P),rawColor:T}}var f=n[0].values.length,h={},d=i.map(function(g){return g.inds});s=0;var v,x;for(v=0;v<f;v++){var b=[];for(x=0;x<d.length;x++)b.push(d[x][v]);o=a[v%a.length],s+=o;var p=c(v),C=b+\"-\"+p.rawColor;h[C]===void 0&&(h[C]=OGt(b,p.color,p.rawColor)),qGt(h[C],v,o)}var E=n.map(function(g,P){return DGt(P,g._index,g._displayindex,g.label,s)});for(v=0;v<f;v++)for(o=a[v%a.length],x=0;x<E.length;x++){var A=E[x].containerInd,L=i[x].inds[v],_=E[x].categories;if(_[L]===void 0){var k=r.dimensions[A]._categoryarray[L],M=r.dimensions[A]._ticktext[L];_[L]=FGt(x,L,k,M)}zGt(_[L],v,o)}return EGt(RGt(E,h,s))};function RGt(e,t,r){var n=e.map(function(i){return i.categories.length}).reduce(function(i,a){return Math.max(i,a)});return{dimensions:e,paths:t,trace:void 0,maxCats:n,count:r}}function DGt(e,t,r,n,i){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:n,count:i,categories:[],dragX:null}}function FGt(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function zGt(e,t,r){e.valueInds.push(t),e.count+=r}function OGt(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function qGt(e,t,r){e.valueInds.push(t),e.count+=r}function BGt(e,t){t==null?t=[]:t=t.map(function(u){return u});var r={},n={},i=[];t.forEach(function(u,c){r[u]=0,n[u]=c});for(var a=0;a<e.length;a++){var o=e[a],s;r[o]===void 0?(r[o]=1,s=t.push(o)-1,n[o]=s):(r[o]++,s=n[o]),i.push(s)}var l=t.map(function(u){return r[u]});return{uniqueValues:t,uniqueCounts:l,inds:i}}function NGt(e){var t=e.map(function(n){return n.displayindex}),r;if(VGt(t))for(r=0;r<e.length;r++)e[r]._displayindex=e[r].displayindex;else for(r=0;r<e.length;r++)e[r]._displayindex=r}function UGt(e,t){e._categoryarray=t.uniqueValues,e.ticktext===null||e.ticktext===void 0?e._ticktext=[]:e._ticktext=e.ticktext.slice();for(var r=e._ticktext.length;r<t.uniqueValues.length;r++)e._ticktext.push(t.uniqueValues[r])}function VGt(e){for(var t=new Array(e.length),r=0;r<e.length;r++){if(e[r]<0||e[r]>=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var JUe=ye((n_r,KUe)=>{\"use strict\";var Fl=Oa(),GGt=(R2(),ab(I2)).interpolateNumber,HGt=UP(),OC=vf(),mx=Dr(),FC=mx.strTranslate,GUe=So(),BK=cd(),jGt=ru();function WGt(e,t,r,n){var i=t._context.staticPlot,a=e.map(sHt.bind(0,t,r)),o=n.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",i?\"none\":\"all\");var s=o.selectAll(\"g.trace.parcats\").data(a,u1),l=s.enter().append(\"g\").attr(\"class\",\"trace parcats\");s.attr(\"transform\",function(C){return FC(C.x,C.y)}),l.append(\"g\").attr(\"class\",\"paths\");var u=s.select(\"g.paths\"),c=u.selectAll(\"path.path\").data(function(C){return C.paths},u1);c.attr(\"fill\",function(C){return C.model.color});var f=c.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",function(C){return C.model.color}).attr(\"fill-opacity\",0);VK(f),c.attr(\"d\",function(C){return C.svgD}),f.empty()||c.sort(NK),c.exit().remove(),c.on(\"mouseover\",XGt).on(\"mouseout\",ZGt).on(\"click\",YGt),l.append(\"g\").attr(\"class\",\"dimensions\");var h=s.select(\"g.dimensions\"),d=h.selectAll(\"g.dimension\").data(function(C){return C.dimensions},u1);d.enter().append(\"g\").attr(\"class\",\"dimension\"),d.attr(\"transform\",function(C){return FC(C.x,0)}),d.exit().remove();var v=d.selectAll(\"g.category\").data(function(C){return C.categories},u1),x=v.enter().append(\"g\").attr(\"class\",\"category\");v.attr(\"transform\",function(C){return FC(0,C.y)}),x.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),v.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",function(C){return C.width}).attr(\"height\",function(C){return C.height}),jUe(x);var b=v.selectAll(\"rect.bandrect\").data(function(C){return C.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr(\"fill\",function(C){return C.color});var p=b.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",function(C){return C.color}).attr(\"fill-opacity\",0);b.attr(\"fill\",function(C){return C.color}).attr(\"width\",function(C){return C.width}).attr(\"height\",function(C){return C.height}).attr(\"y\",function(C){return C.y}).attr(\"cursor\",function(C){return C.parcatsViewModel.arrangement===\"fixed\"?\"default\":C.parcatsViewModel.arrangement===\"perpendicular\"?\"ns-resize\":\"move\"}),HK(p),b.exit().remove(),x.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\"),v.select(\"text.catlabel\").attr(\"text-anchor\",function(C){return zC(C)?\"start\":\"end\"}).attr(\"alignment-baseline\",\"middle\").style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",function(C){return zC(C)?C.width+5:-5}).attr(\"y\",function(C){return C.height/2}).text(function(C){return C.model.categoryLabel}).each(function(C){GUe.font(Fl.select(this),C.parcatsViewModel.categorylabelfont),jGt.convertToTspans(Fl.select(this),t)}),x.append(\"text\").attr(\"class\",\"dimlabel\"),v.select(\"text.dimlabel\").attr(\"text-anchor\",\"middle\").attr(\"alignment-baseline\",\"baseline\").attr(\"cursor\",function(C){return C.parcatsViewModel.arrangement===\"fixed\"?\"default\":\"ew-resize\"}).attr(\"x\",function(C){return C.width/2}).attr(\"y\",-5).text(function(C,E){return E===0?C.parcatsViewModel.model.dimensions[C.model.dimensionInd].dimensionLabel:null}).each(function(C){GUe.font(Fl.select(this),C.parcatsViewModel.labelfont)}),v.selectAll(\"rect.bandrect\").on(\"mouseover\",rHt).on(\"mouseout\",iHt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(C){return{x:C.x,y:0}}).on(\"dragstart\",nHt).on(\"drag\",aHt).on(\"dragend\",oHt)),s.each(function(C){C.traceSelection=Fl.select(this),C.pathSelection=Fl.select(this).selectAll(\"g.paths\").selectAll(\"path.path\"),C.dimensionSelection=Fl.select(this).selectAll(\"g.dimensions\").selectAll(\"g.dimension\")}),s.exit().remove()}KUe.exports=function(e,t,r,n){WGt(r,e,n,t)};function u1(e){return e.key}function zC(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function NK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function XGt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){mx.raiseToTop(this),GK(Fl.select(this));var t=qC(e),r=UK(e);if(e.parcatsViewModel.graphDiv.emit(\"plotly_hover\",{points:t,event:Fl.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf(\"none\")===-1){var n=Fl.mouse(this)[0],i=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=i._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f<e.leftXs.length-1;f++)if(e.leftXs[f]+e.dimWidths[f]-2<=n&&n<=e.leftXs[f+1]+2){var h=e.parcatsViewModel.dimensions[f],d=e.parcatsViewModel.dimensions[f+1];u=(h.x+h.width+d.x)/2,c=(e.topYs[f]+e.topYs[f+1]+e.height)/2;break}var v=e.parcatsViewModel.x+u,x=e.parcatsViewModel.y+c,b=BK.mostReadable(e.model.color,[\"black\",\"white\"]),p=e.model.count,C=p/e.parcatsViewModel.model.count,E={countLabel:p,probabilityLabel:C.toFixed(3)},A=[];e.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&A.push([\"Count:\",E.countLabel].join(\" \")),e.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&A.push([\"P:\",E.probabilityLabel].join(\" \"));var L=A.join(\"<br>\"),_=Fl.mouse(i)[0];OC.loneHover({trace:a,x:v-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:b,idealAlign:_<v?\"right\":\"left\",hovertemplate:(a.line||{}).hovertemplate,hovertemplateLabels:E,eventData:[{data:a._input,fullData:a,count:p,probability:C}]},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:i})}}}function ZGt(e){if(!e.parcatsViewModel.dragDimension&&(VK(Fl.select(this)),OC.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(NK),e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1)){var t=qC(e),r=UK(e);e.parcatsViewModel.graphDiv.emit(\"plotly_unhover\",{points:t,event:Fl.event,constraints:r})}}function qC(e){for(var t=[],r=XUe(e.parcatsViewModel),n=0;n<e.model.valueInds.length;n++){var i=e.model.valueInds[n];t.push({curveNumber:r,pointNumber:i})}return t}function UK(e){for(var t={},r=e.parcatsViewModel.model.dimensions,n=0;n<r.length;n++){var i=r[n],a=i.categories[e.model.categoryInds[n]];t[i.containerInd]=a.categoryValue}return e.model.rawColor!==void 0&&(t.color=e.model.rawColor),t}function YGt(e){if(e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){var t=qC(e),r=UK(e);e.parcatsViewModel.graphDiv.emit(\"plotly_click\",{points:t,event:Fl.event,constraints:r})}}function VK(e){e.attr(\"fill\",function(t){return t.model.color}).attr(\"fill-opacity\",.6).attr(\"stroke\",\"lightgray\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1)}function GK(e){e.attr(\"fill-opacity\",.8).attr(\"stroke\",function(t){return BK.mostReadable(t.model.color,[\"black\",\"white\"])}).attr(\"stroke-width\",.3)}function KGt(e){e.select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}function jUe(e){e.select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",1).attr(\"stroke-opacity\",1)}function JGt(e){e.attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}function HK(e){e.attr(\"stroke\",\"black\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1).attr(\"fill-opacity\",1)}function Uz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(i){return i.model.categoryInds[r]===n&&i.model.color===e.color})}function $Gt(e){var t=Fl.select(e.parentNode).selectAll(\"rect.bandrect\");t.each(function(r){var n=Uz(r);GK(n),n.each(function(){mx.raiseToTop(this)})}),KGt(Fl.select(e.parentNode))}function QGt(e){var t=Fl.select(e).datum(),r=Uz(t);GK(r),r.each(function(){mx.raiseToTop(this)}),Fl.select(e.parentNode).selectAll(\"rect.bandrect\").filter(function(n){return n.color===t.color}).each(function(){mx.raiseToTop(this),JGt(Fl.select(this))})}function jK(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Fl.select(e.parentNode).selectAll(\"rect.bandrect\"),s=[];o.each(function(u){var c=Uz(u);c.each(function(f){Array.prototype.push.apply(s,qC(f))})});var l={};l[i.dimensionInd]=i.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function WK(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Uz(n),s=[];o.each(function(u){Array.prototype.push.apply(s,qC(u))});var l={};l[i.dimensionInd]=i.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function WUe(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=Fl.select(r.parentNode).select(\"rect.catrect\"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,d=\"left\"):(h=o.left+o.width,d=\"right\");var v=s.model.count,x=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:x,probabilityLabel:b.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&C.push([\"Count:\",p.countLabel].join(\" \")),s.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&C.push([\"P(\"+p.categoryLabel+\"):\",p.probabilityLabel].join(\" \"));var E=C.join(\"<br>\");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:E,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:x,probability:b}]}}function eHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each(function(){var i=this;n.push(WUe(e,t,i))}),n}function tHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d=\"left\"):(h=a.left+a.width,d=\"right\");var v=s.model.categoryLabel,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,C=0;l.pathSelection.each(function(P){P.model.color===o.color&&(C+=P.model.count)});var E=b/x,A=b/C,L=b/p,_={countLabel:b,categoryLabel:v,probabilityLabel:E.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&k.push([\"Count:\",_.countLabel].join(\" \")),s.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&(k.push(\"P(color \\u2229 \"+v+\"): \"+_.probabilityLabel),k.push(\"P(\"+v+\" | color): \"+A.toFixed(3)),k.push(\"P(color | \"+v+\"): \"+L.toFixed(3)));var M=k.join(\"<br>\"),g=BK.mostReadable(o.color,[\"black\",\"white\"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:o.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:_,eventData:[{data:c._input,fullData:c,category:v,count:x,probability:E,categorycount:p,colorcount:C,bandcolorcount:b}]}}function rHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a===\"color\"?(QGt(o),WK(o,\"plotly_hover\",Fl.event)):($Gt(o),jK(o,\"plotly_hover\",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf(\"none\")===-1){var s;a===\"category\"?s=WUe(r,i,o):a===\"color\"?s=tHt(r,i,o):a===\"dimension\"&&(s=eHt(r,i,o)),s&&OC.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function iHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(VK(t.pathSelection),jUe(t.dimensionSelection.selectAll(\"g.category\")),HK(t.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),OC.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(NK),t.hoverinfoItems.indexOf(\"skip\")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r===\"color\"?WK(n,\"plotly_unhover\",Fl.event):jK(n,\"plotly_unhover\",Fl.event)}}function nHt(e){e.parcatsViewModel.arrangement!==\"fixed\"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll(\"g.category\").select(\"rect.catrect\").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,mx.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll(\"rect.bandrect\").each(function(i){i.y<n&&n<=i.y+i.height&&(e.potentialClickBand=this)}))}),e.parcatsViewModel.dragDimension=e,OC.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function aHt(e){if(e.parcatsViewModel.arrangement!==\"fixed\"&&(e.dragHasMoved=!0,e.dragDimensionDisplayInd!==null)){var t=e.dragDimensionDisplayInd,r=t-1,n=t+1,i=e.parcatsViewModel.dimensions[t];if(e.dragCategoryDisplayInd!==null){var a=i.categories[e.dragCategoryDisplayInd];a.model.dragY+=Fl.event.dy;var o=a.model.dragY,s=a.model.displayInd,l=i.categories,u=l[s-1],c=l[s+1];u!==void 0&&o<u.y+u.height/2&&(a.model.displayInd=u.model.displayInd,u.model.displayInd=s),c!==void 0&&o+a.height>c.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement===\"freeform\"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragX<f.x+f.width&&(i.model.displayInd=f.model.displayInd,f.model.displayInd=t),h!==void 0&&i.model.dragX+i.width>h.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}ZK(e.parcatsViewModel),XK(e.parcatsViewModel),YUe(e.parcatsViewModel),ZUe(e.parcatsViewModel)}}function oHt(e){if(e.parcatsViewModel.arrangement!==\"fixed\"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var t={},r=XUe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t[\"dimensions[\"+v+\"].displayindex\"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t[\"dimensions[\"+e.model.containerInd+\"].categoryarray\"]=[l],t[\"dimensions[\"+e.model.containerInd+\"].ticktext\"]=[u],t[\"dimensions[\"+e.model.containerInd+\"].categoryorder\"]=\"array\"}}if(e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron===\"color\"?WK(e.potentialClickBand,\"plotly_click\",Fl.event.sourceEvent):jK(e.potentialClickBand,\"plotly_click\",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,ZK(e.parcatsViewModel),XK(e.parcatsViewModel);var f=Fl.transition().duration(300).ease(\"cubic-in-out\");f.each(function(){YUe(e.parcatsViewModel,!0),ZUe(e.parcatsViewModel,!0)}).each(\"end\",function(){(i||a)&&HGt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function XUe(e){for(var t,r=e.graphDiv._fullData,n=0;n<r.length;n++)if(e.key===r[n].uid){t=n;break}return t}function ZUe(e,t){t===void 0&&(t=!1);function r(n){return t?n.transition():n}e.pathSelection.data(function(n){return n.paths},u1),r(e.pathSelection).attr(\"d\",function(n){return n.svgD})}function YUe(e,t){t===void 0&&(t=!1);function r(l){return t?l.transition():l}e.dimensionSelection.data(function(l){return l.dimensions},u1);var n=e.dimensionSelection.selectAll(\"g.category\").data(function(l){return l.categories},u1);r(e.dimensionSelection).attr(\"transform\",function(l){return FC(l.x,0)}),r(n).attr(\"transform\",function(l){return FC(0,l.y)});var i=n.select(\".dimlabel\");i.text(function(l,u){return u===0?l.parcatsViewModel.model.dimensions[l.model.dimensionInd].dimensionLabel:null});var a=n.select(\".catlabel\");a.attr(\"text-anchor\",function(l){return zC(l)?\"start\":\"end\"}).attr(\"x\",function(l){return zC(l)?l.width+5:-5}).each(function(l){var u,c;zC(l)?(u=l.width+5,c=\"start\"):(u=-5,c=\"end\"),Fl.select(this).selectAll(\"tspan\").attr(\"x\",u).attr(\"text-anchor\",c)});var o=n.selectAll(\"rect.bandrect\").data(function(l){return l.bands},u1),s=o.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"cursor\",\"move\").attr(\"stroke-opacity\",0).attr(\"fill\",function(l){return l.color}).attr(\"fill-opacity\",0);o.attr(\"fill\",function(l){return l.color}).attr(\"width\",function(l){return l.width}).attr(\"height\",function(l){return l.height}).attr(\"y\",function(l){return l.y}),HK(s),o.each(function(){mx.raiseToTop(this)}),o.exit().remove()}function sHt(e,t,r){var n=r[0],i=t.margin||{l:80,r:80,t:100,b:80},a=n.trace,o=a.domain,s=t.width,l=t.height,u=Math.floor(s*(o.x[1]-o.x[0])),c=Math.floor(l*(o.y[1]-o.y[0])),f=o.x[0]*s+i.l,h=t.height-o.y[1]*t.height+i.t,d=a.line.shape,v;a.hoverinfo===\"all\"?v=[\"count\",\"probability\"]:v=(a.hoverinfo||\"\").split(\"+\");var x={trace:a,key:a.uid,model:n,x:f,y:h,width:u,height:c,hoveron:a.hoveron,hoverinfoItems:v,arrangement:a.arrangement,bundlecolors:a.bundlecolors,sortpaths:a.sortpaths,labelfont:a.labelfont,categorylabelfont:a.tickfont,pathShape:d,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return n.dimensions&&(ZK(x),XK(x)),x}function HUe(e,t,r,n,i){var a=[],o=[],s,l;for(l=0;l<r.length-1;l++)s=GGt(r[l]+e[l],e[l+1]),a.push(s(i)),o.push(s(1-i));var u=\"M \"+e[0]+\",\"+t[0];for(u+=\"l\"+r[0]+\",0 \",l=1;l<r.length;l++)u+=\"C\"+a[l-1]+\",\"+t[l-1]+\" \"+o[l-1]+\",\"+t[l]+\" \"+e[l]+\",\"+t[l],u+=\"l\"+r[l]+\",0 \";for(u+=\"l0,\"+n+\" \",u+=\"l -\"+r[r.length-1]+\",0 \",l=r.length-2;l>=0;l--)u+=\"C\"+o[l]+\",\"+(t[l+1]+n)+\" \"+a[l]+\",\"+(t[l]+n)+\" \"+(e[l]+r[l])+\",\"+(t[l]+n),u+=\"l-\"+r[l]+\",0 \";return u+=\"Z\",u}function XK(e){var t=e.dimensions,r=e.model,n=t.map(function(O){return O.categories.map(function(V){return V.y})}),i=e.model.dimensions.map(function(O){return O.categories.map(function(V){return V.displayInd})}),a=e.model.dimensions.map(function(O){return O.displayInd}),o=e.dimensions.map(function(O){return O.model.dimensionInd}),s=t.map(function(O){return O.x}),l=t.map(function(O){return O.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(O){var V=O.categoryInds.map(function(Z,H){return i[H][Z]}),G=o.map(function(Z){return V[Z]});return G}u.sort(function(O,V){var G=f(O),Z=f(V);return e.sortpaths===\"backward\"&&(G.reverse(),Z.reverse()),G.push(O.valueInds[0]),Z.push(V.valueInds[0]),e.bundlecolors&&(G.unshift(O.rawColor),Z.unshift(V.rawColor)),G<Z?-1:G>Z?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(O){return O.height}).reduce(function(O,V){return O+V}),x=0;x<u.length;x++){var b=u[x],p;d>0?p=v*(b.count/d):p=0;for(var C=new Array(n.length),E=0;E<b.categoryInds.length;E++){var A=b.categoryInds[E],L=i[E][A],_=a[E];C[_]=n[_][L],n[_][L]+=p;var k=e.dimensions[_].categories[L],M=k.bands.length,g=k.bands[M-1];if(g===void 0||b.rawColor!==g.rawColor){var P=g===void 0?0:g.y+g.height;k.bands.push({key:P,color:b.color,rawColor:b.rawColor,height:p,width:k.width,count:b.count,y:P,categoryViewModel:k,parcatsViewModel:e})}else{var T=k.bands[M-1];T.height+=p,T.count+=b.count}}var z;e.pathShape===\"hspline\"?z=HUe(s,C,l,p,.5):z=HUe(s,C,l,p,0),h[x]={key:b.valueInds[0],model:b,height:p,leftXs:s,topYs:C,dimWidths:l,svgD:z,parcatsViewModel:e}}e.paths=h}function ZK(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var i=t[n].dimensionInd,a=e.model.dimensions[i];r.push(lHt(e,a))}e.dimensions=r}function lHt(e,t){var r=40,n=16,i=e.model.dimensions.length,a=t.displayInd,o,s,l;i>1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),x,b,p,C,E,A=(c-f)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,k){return _.displayInd-k.displayInd}),E=0;E<f;E++)C=L[E].categoryInd,b=t.categories[C],d>0?x=b.count/d*v:x=0,p={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:A,bands:[],parcatsViewModel:e},A=A+x+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var YK=ye((a_r,$Ue)=>{\"use strict\";var uHt=JUe();$Ue.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;uHt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var eVe=ye(Vz=>{\"use strict\";var cHt=Id().getModuleCalcData,fHt=YK(),QUe=\"parcats\";Vz.name=QUe;Vz.plot=function(e,t,r,n){var i=cHt(e.calcdata,QUe);if(i.length){var a=i[0];fHt(e,a,r,n)}};Vz.clean=function(e,t,r,n){var i=n._has&&n._has(\"parcats\"),a=t._has&&t._has(\"parcats\");i&&!a&&n._paperdiv.selectAll(\".parcats\").remove()}});var rVe=ye((s_r,tVe)=>{\"use strict\";tVe.exports={attributes:qK(),supplyDefaults:NUe(),calc:VUe(),plot:YK(),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:eVe(),categories:[\"noOpacity\"],meta:{}}});var nVe=ye((l_r,iVe)=>{\"use strict\";iVe.exports=rVe()});var c1=ye((u_r,fVe)=>{\"use strict\";var hHt=Z1(),aVe=\"1.13.4\",uVe='\\xA9 <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',oVe=['\\xA9 <a target=\"_blank\" href=\"https://carto.com/\">Carto</a>',uVe].join(\" \"),sVe=['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">ODbL</a>'].join(\" \"),dHt=['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>'].join(\" \"),cVe={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:uVe,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:oVe,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:oVe,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:sVe,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:sVe,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:dHt,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"}},lVe=hHt(cVe);fVe.exports={requiredVersion:aVe,styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:cVe,styleValuesNonMapbox:lVe,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install @plotly/mapbox-gl@\"+aVe+\".\"].join(`\n",
       "`),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\"  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(`\n",
       "`),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",lVe.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(`\n",
       "`),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(`\n",
       "`),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":`content: \"\"; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E')`}}});var BC=ye((c_r,pVe)=>{\"use strict\";var hVe=Dr(),dVe=Ca().defaultLine,vHt=kc().attributes,pHt=ec(),gHt=pf().textposition,mHt=mc().overrideAll,yHt=pl().templatedArray,KK=c1(),vVe=pHt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});vVe.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\";var _Ht=pVe.exports=mHt({_arrayAttrRegexps:[hVe.counterRegex(\"mapbox\",\".layers\",!0)],domain:vHt({name:\"mapbox\"}),accesstoken:{valType:\"string\",noBlank:!0,strict:!0},style:{valType:\"any\",values:KK.styleValuesMapbox.concat(KK.styleValuesNonMapbox),dflt:KK.styleValueDflt},center:{lon:{valType:\"number\",dflt:0},lat:{valType:\"number\",dflt:0}},zoom:{valType:\"number\",dflt:1},bearing:{valType:\"number\",dflt:0},pitch:{valType:\"number\",dflt:0},bounds:{west:{valType:\"number\"},east:{valType:\"number\"},south:{valType:\"number\"},north:{valType:\"number\"}},layers:yHt(\"layer\",{visible:{valType:\"boolean\",dflt:!0},sourcetype:{valType:\"enumerated\",values:[\"geojson\",\"vector\",\"raster\",\"image\"],dflt:\"geojson\"},source:{valType:\"any\"},sourcelayer:{valType:\"string\",dflt:\"\"},sourceattribution:{valType:\"string\"},type:{valType:\"enumerated\",values:[\"circle\",\"line\",\"fill\",\"symbol\",\"raster\"],dflt:\"circle\"},coordinates:{valType:\"any\"},below:{valType:\"string\"},color:{valType:\"color\",dflt:dVe},opacity:{valType:\"number\",min:0,max:1,dflt:1},minzoom:{valType:\"number\",min:0,max:24,dflt:0},maxzoom:{valType:\"number\",min:0,max:24,dflt:24},circle:{radius:{valType:\"number\",dflt:15}},line:{width:{valType:\"number\",dflt:2},dash:{valType:\"data_array\"}},fill:{outlinecolor:{valType:\"color\",dflt:dVe}},symbol:{icon:{valType:\"string\",dflt:\"marker\"},iconsize:{valType:\"number\",dflt:10},text:{valType:\"string\",dflt:\"\"},placement:{valType:\"enumerated\",values:[\"point\",\"line\",\"line-center\"],dflt:\"point\"},textfont:vVe,textposition:hVe.extendFlat({},gHt,{arrayOk:!1})}})},\"plot\",\"from-root\");_Ht.uirevision={valType:\"any\",editType:\"none\"}});var Gz=ye((f_r,yVe)=>{\"use strict\";var xHt=Qo().hovertemplateAttrs,bHt=Qo().texttemplateAttrs,wHt=Eg(),NC=G2(),x5=pf(),gVe=BC(),THt=Gl(),AHt=Tu(),ew=Ao().extendFlat,SHt=mc().overrideAll,MHt=BC(),mVe=NC.line,b5=NC.marker;yVe.exports=SHt({lon:NC.lon,lat:NC.lat,cluster:{enabled:{valType:\"boolean\"},maxzoom:ew({},MHt.layers.maxzoom,{}),step:{valType:\"number\",arrayOk:!0,dflt:-1,min:-1},size:{valType:\"number\",arrayOk:!0,dflt:20,min:0},color:{valType:\"color\",arrayOk:!0},opacity:ew({},b5.opacity,{dflt:1})},mode:ew({},x5.mode,{dflt:\"markers\"}),text:ew({},x5.text,{}),texttemplate:bHt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"text\"]}),hovertext:ew({},x5.hovertext,{}),line:{color:mVe.color,width:mVe.width},connectgaps:x5.connectgaps,marker:ew({symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},angle:{valType:\"number\",dflt:\"auto\",arrayOk:!0},allowoverlap:{valType:\"boolean\",dflt:!1},opacity:b5.opacity,size:b5.size,sizeref:b5.sizeref,sizemin:b5.sizemin,sizemode:b5.sizemode},AHt(\"marker\")),fill:NC.fill,fillcolor:wHt(),textfont:gVe.layers.symbol.textfont,textposition:gVe.layers.symbol.textposition,below:{valType:\"string\"},selected:{marker:x5.selected.marker},unselected:{marker:x5.unselected.marker},hoverinfo:ew({},THt.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]}),hovertemplate:xHt()},\"calc\",\"nested\")});var JK=ye((h_r,_Ve)=>{\"use strict\";var EHt=[\"Metropolis Black Italic\",\"Metropolis Black\",\"Metropolis Bold Italic\",\"Metropolis Bold\",\"Metropolis Extra Bold Italic\",\"Metropolis Extra Bold\",\"Metropolis Extra Light Italic\",\"Metropolis Extra Light\",\"Metropolis Light Italic\",\"Metropolis Light\",\"Metropolis Medium Italic\",\"Metropolis Medium\",\"Metropolis Regular Italic\",\"Metropolis Regular\",\"Metropolis Semi Bold Italic\",\"Metropolis Semi Bold\",\"Metropolis Thin Italic\",\"Metropolis Thin\",\"Open Sans Bold Italic\",\"Open Sans Bold\",\"Open Sans Extrabold Italic\",\"Open Sans Extrabold\",\"Open Sans Italic\",\"Open Sans Light Italic\",\"Open Sans Light\",\"Open Sans Regular\",\"Open Sans Semibold Italic\",\"Open Sans Semibold\",\"Klokantech Noto Sans Bold\",\"Klokantech Noto Sans CJK Bold\",\"Klokantech Noto Sans CJK Regular\",\"Klokantech Noto Sans Italic\",\"Klokantech Noto Sans Regular\"];_Ve.exports={isSupportedFont:function(e){return EHt.indexOf(e)!==-1}}});var wVe=ye((d_r,bVe)=>{\"use strict\";var UC=Dr(),$K=Ru(),CHt=$p(),kHt=R0(),LHt=D0(),PHt=Ig(),xVe=Gz(),IHt=JK().isSupportedFont;bVe.exports=function(t,r,n,i){function a(p,C){return UC.coerce(t,r,xVe,p,C)}function o(p,C){return UC.coerce2(t,r,xVe,p,C)}var s=RHt(t,r,a);if(!s){r.visible=!1;return}if(a(\"text\"),a(\"texttemplate\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"mode\"),a(\"below\"),$K.hasMarkers(r)){CHt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a(\"marker.allowoverlap\"),a(\"marker.angle\");var l=r.marker;l.symbol!==\"circle\"&&(UC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),UC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}$K.hasLines(r)&&(kHt(t,r,n,i,a,{noDash:!0}),a(\"connectgaps\"));var u=o(\"cluster.maxzoom\"),c=o(\"cluster.step\"),f=o(\"cluster.color\",r.marker&&r.marker.color||n),h=o(\"cluster.size\"),d=o(\"cluster.opacity\"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,x=a(\"cluster.enabled\",v);if(x||$K.hasText(r)){var b=i.font.family;LHt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:IHt(b)?b:\"Open Sans Regular\",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a(\"fill\"),r.fill!==\"none\"&&PHt(t,r,n,a),UC.coerceSelectionMarkerOpacity(r,a)};function RHt(e,t,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var QK=ye((v_r,AVe)=>{\"use strict\";var TVe=ho();AVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=TVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=TVe.tickText(o,o.c2l(s[1]),!0).text,i}});var eJ=ye((p_r,MVe)=>{\"use strict\";var SVe=Dr();MVe.exports=function(t,r){var n=t.split(\" \"),i=n[0],a=n[1],o=SVe.isArrayOrTypedArray(r)?SVe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=[\"\",\"\"],c=[0,0];switch(i){case\"top\":u[0]=\"top\",c[1]=-l;break;case\"bottom\":u[0]=\"bottom\",c[1]=l;break}switch(a){case\"left\":u[1]=\"right\",c[0]=-s;break;case\"right\":u[1]=\"left\",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join(\"-\"):u[0]?f=u[0]:u[1]?f=u[1]:f=\"center\",{anchor:f,offset:c}}});var IVe=ye((g_r,PVe)=>{\"use strict\";var kVe=Eo(),av=Dr(),DHt=hs().BADNUM,jz=tx(),EVe=tc(),FHt=So(),zHt=S3(),Wz=Ru(),OHt=JK().isSupportedFont,qHt=eJ(),BHt=rp().appendArrayPointValue,NHt=ru().NEWLINES,UHt=ru().BR_TAG_ALL;PVe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!==\"none\",o=Wz.hasLines(n),s=Wz.hasMarkers(n),l=Wz.hasText(n),u=s&&n.marker.symbol===\"circle\",c=s&&n.marker.symbol!==\"circle\",f=n.cluster&&n.cluster.enabled,h=Hz(\"fill\"),d=Hz(\"line\"),v=Hz(\"circle\"),x=Hz(\"symbol\"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var p;if((a||o)&&(p=jz.calcTraceToLineCoords(r)),a&&(h.geojson=jz.makePolygon(p),h.layout.visibility=\"visible\",av.extendFlat(h.paint,{\"fill-color\":n.fillcolor})),o&&(d.geojson=jz.makeLine(p),d.layout.visibility=\"visible\",av.extendFlat(d.paint,{\"line-width\":n.line.width,\"line-color\":n.line.color,\"line-opacity\":n.opacity})),u){var C=VHt(r);v.geojson=C.geojson,v.layout.visibility=\"visible\",f&&(v.filter=[\"!\",[\"has\",\"point_count\"]],b.cluster={type:\"circle\",filter:[\"has\",\"point_count\"],layout:{visibility:\"visible\"},paint:{\"circle-color\":rJ(n.cluster.color,n.cluster.step),\"circle-radius\":rJ(n.cluster.size,n.cluster.step),\"circle-opacity\":rJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:\"symbol\",filter:[\"has\",\"point_count\"],paint:{},layout:{\"text-field\":\"{point_count_abbreviated}\",\"text-font\":CVe(n),\"text-size\":12}}),av.extendFlat(v.paint,{\"circle-color\":C.mcc,\"circle-radius\":C.mrc,\"circle-opacity\":C.mo})}if(u&&f&&(v.filter=[\"!\",[\"has\",\"point_count\"]]),(c||l)&&(x.geojson=GHt(r,t),av.extendFlat(x.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),c&&(av.extendFlat(x.layout,{\"icon-size\":n.marker.size/10}),\"angle\"in n.marker&&n.marker.angle!==\"auto\"&&av.extendFlat(x.layout,{\"icon-rotate\":{type:\"identity\",property:\"angle\"},\"icon-rotation-alignment\":\"map\"}),x.layout[\"icon-allow-overlap\"]=n.marker.allowoverlap,av.extendFlat(x.paint,{\"icon-opacity\":n.opacity*n.marker.opacity,\"icon-color\":n.marker.color})),l)){var E=(n.marker||{}).size,A=qHt(n.textposition,E);av.extendFlat(x.layout,{\"text-size\":n.textfont.size,\"text-anchor\":A.anchor,\"text-offset\":A.offset,\"text-font\":CVe(n)}),av.extendFlat(x.paint,{\"text-color\":n.textfont.color,\"text-opacity\":n.opacity})}return b};function Hz(e){return{type:e,geojson:jz.makeBlank(),layout:{visibility:\"none\"},filter:null,paint:{}}}function VHt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(EVe.hasColorscale(t,\"marker\")?c=EVe.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=zHt(t));var h;o&&(h=function(E){var A=kVe(E)?+av.constrain(E,0,1):0;return l(A)});var d=[];for(s=0;s<e.length;s++){var v=e[s],x=v.lonlat;if(!LVe(x)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:\"Feature\",id:s+1,geometry:{type:\"Point\",coordinates:x},properties:b})}}var p;if(n)for(p=FHt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var C=d[s].properties;p.selectedOpacityFn&&(C.mo=l(p.selectedOpacityFn(C))),p.selectedColorFn&&(C.mcc=p.selectedColorFn(C)),p.selectedSizeFn&&(C.mrc=p.selectedSizeFn(C))}return{geojson:{type:\"FeatureCollection\",features:d},mcc:i||p&&p.selectedColorFn?{type:\"identity\",property:\"mcc\"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:\"identity\",property:\"mrc\"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:\"identity\",property:\"mo\"}:l(r.opacity)}}function GHt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!==\"circle\"?tJ(a):Xz,l=o!==\"auto\"?tJ(o,!0):Xz,u=Wz.hasText(n)?tJ(n.text):Xz,c=[],f=0;f<e.length;f++){var h=e[f];if(!LVe(h.lonlat)){var d=n.texttemplate,v;if(d){var x=Array.isArray(d)?d[f]||\"\":d,b=n._module.formatLabels(h,n,r),p={};BHt(p,n,h.i);var C=n._meta||{};v=av.texttemplateString(x,b,r._d3locale,p,h,C)}else v=u(f);v&&(v=v.replace(NHt,\"\").replace(UHt,`\n",
       "`)),c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:\"FeatureCollection\",features:c}}function tJ(e,t){return av.isArrayOrTypedArray(e)?t?function(r){return kVe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:Xz}function Xz(){return\"\"}function LVe(e){return e[0]===DHt}function rJ(e,t){var r;if(av.isArrayOrTypedArray(e)&&av.isArrayOrTypedArray(t)){r=[\"step\",[\"get\",\"point_count\"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function CVe(e){var t=e.textfont,r=t.family,n=t.style,i=t.weight,a=r.split(\" \"),o=a[a.length-1]===\"Italic\";o&&a.pop(),o=o||n===\"italic\";var s=a.join(\" \");i===\"bold\"&&a.indexOf(\"Bold\")===-1?s+=\" Bold\":i<=1e3&&(a[0]===\"Metropolis\"?(s=\"Metropolis\",i>850?s+=\" Black\":i>750?s+=\" Extra Bold\":i>650?s+=\" Bold\":i>550?s+=\" Semi Bold\":i>450?s+=\" Medium\":i>350?s+=\" Regular\":i>250?s+=\" Light\":i>150?s+=\" Extra Light\":s+=\" Thin\"):a.slice(0,2).join(\" \")===\"Open Sans\"?(s=\"Open Sans\",i>750?s+=\" Extrabold\":i>650?s+=\" Bold\":i>550?s+=\" Semibold\":i>350?s+=\" Regular\":s+=\" Light\"):a.slice(0,3).join(\" \")===\"Klokantech Noto Sans\"&&(s=\"Klokantech Noto Sans\",a[3]===\"CJK\"&&(s+=\" CJK\"),s+=i>500?\" Bold\":\" Regular\")),o&&(s+=\" Italic\"),s===\"Open Sans Regular Italic\"?s=\"Open Sans Italic\":s===\"Open Sans Regular Bold\"?s=\"Open Sans Bold\":s===\"Open Sans Regular Bold Italic\"?s=\"Open Sans Bold Italic\":s===\"Klokantech Noto Sans Regular Italic\"&&(s=\"Klokantech Noto Sans Italic\"),OHt(s)||(s=r);var l=s.split(\", \");return l}});var zVe=ye((m_r,FVe)=>{\"use strict\";var HHt=Dr(),RVe=IVe(),w5=c1().traceLayerPrefix,rg={cluster:[\"cluster\",\"clusterCount\",\"circle\"],nonCluster:[\"fill\",\"line\",\"circle\",\"symbol\"]};function DVe(e,t,r,n){this.type=\"scattermapbox\",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:\"source-\"+t+\"-fill\",line:\"source-\"+t+\"-line\",circle:\"source-\"+t+\"-circle\",symbol:\"source-\"+t+\"-symbol\",cluster:\"source-\"+t+\"-circle\",clusterCount:\"source-\"+t+\"-circle\"},this.layerIds={fill:w5+t+\"-fill\",line:w5+t+\"-line\",circle:w5+t+\"-circle\",symbol:w5+t+\"-symbol\",cluster:w5+t+\"-cluster\",clusterCount:w5+t+\"-cluster-count\"},this.below=null}var VC=DVe.prototype;VC.addSource=function(e,t,r){var n={type:\"geojson\",data:t.geojson};r&&r.enabled&&HHt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};VC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};VC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,\"setLayoutProperty\",n.layout),n.layout.visibility===\"visible\"&&this.subplot.setOptions(i,\"setPaintProperty\",n.paint)):this.subplot.addLayer(n,r)};VC.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=RVe(n.gd,t),o=n.belowLookup[\"trace-\"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(E){E||u.addSource(\"circle\",a.circle,r.cluster);for(var A=rg.cluster,L=0;L<A.length;L++){var _=A[L],k=a[_];u.addLayer(_,k,o)}}function f(E){for(var A=rg.cluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(u.layerIds[_])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var A=rg.nonCluster,L=0;L<A.length;L++){var _=A[L],k=a[_];E||u.addSource(_,k),u.addLayer(_,k,o)}}function d(E){for(var A=rg.nonCluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(u.layerIds[_]),E||i.removeSource(u.sourceIds[_])}}function v(E){l?f(E):d(E)}function x(E){s?c(E):h(E)}function b(){for(var E=s?rg.cluster:rg.nonCluster,A=0;A<E.length;A++){var L=E[A],_=a[L];_&&(n.setOptions(u.layerIds[L],\"setLayoutProperty\",_.layout),_.layout.visibility===\"visible\"&&(L!==\"cluster\"&&u.setSourceData(L,_),n.setOptions(u.layerIds[L],\"setPaintProperty\",_.paint)))}}var p=this.isHidden,C=r.visible!==!0;C?p||v():p?C||x():l!==s?(v(),x()):(this.below!==o&&(v(!0),x(!0)),b()),this.clusterEnabled=s,this.isHidden=C,this.below=o,t[0].trace._glTrace=this};VC.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?rg.cluster:rg.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};FVe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new DVe(t,n.uid,i,a),s=RVe(t.gd,r),l=o.below=t.belowLookup[\"trace-\"+n.uid],u,c,f;if(i)for(o.addSource(\"circle\",s.circle,n.cluster),u=0;u<rg.cluster.length;u++)c=rg.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<rg.nonCluster.length;u++)c=rg.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var Zz=ye((y_r,qVe)=>{\"use strict\";var jHt=vf(),iJ=Dr(),WHt=oT(),XHt=iJ.fillText,ZHt=hs().BADNUM,YHt=c1().traceLayerPrefix;function KHt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=YHt+i.uid+\"-circle\",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function x(M){var g=M.lonlat;if(g[0]===ZHt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=iJ.modHalf(g[0],360),T=g[1],z=s.project([P,T]),O=z.x-a.c2p([v,T]),V=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+V*V)-G,1-3/G)}if(jHt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],p=b.lonlat,C=[iJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(C),A=o.c2p(C),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var k=i._module.formatLabels(b,i,_);return e.lonLabel=k.lonLabel,e.latLabel=k.latLabel,e.color=WHt(i,b),e.extraText=OVe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function OVe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split(\"+\"),a=i.indexOf(\"all\")!==-1,o=i.indexOf(\"lon\")!==-1,s=i.indexOf(\"lat\")!==-1,l=t.lonlat,u=[];function c(f){return f+\"\\xB0\"}return a||o&&s?u.push(\"(\"+c(l[1])+\", \"+c(l[0])+\")\"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf(\"text\")!==-1)&&XHt(t,e,u),u.join(\"<br>\")}qVe.exports={hoverPoints:KHt,getExtraText:OVe}});var NVe=ye((__r,BVe)=>{\"use strict\";BVe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var VVe=ye((x_r,UVe)=>{\"use strict\";var JHt=Dr(),$Ht=Ru(),QHt=hs().BADNUM;UVe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!$Ht.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==QHt){var f=[JHt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var oJ=ye((nJ,aJ)=>{(function(e,t){typeof nJ==\"object\"&&typeof aJ!=\"undefined\"?aJ.exports=t():(e=e||self,e.mapboxgl=t())})(nJ,function(){\"use strict\";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o=\"var sharedChunk = {}; (\"+e+\")(sharedChunk); (\"+t+\")(sharedChunk);\",s={};e(s),r=a(s),typeof window!=\"undefined\"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:\"text/javascript\"})))}}return n([\"exports\"],function(i){\"use strict\";function a(m,y){return y={exports:{}},m(y,y.exports),y.exports}var o=\"1.13.4\",s=l;function l(m,y,I,U){this.cx=3*m,this.bx=3*(I-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*y,this.by=3*(U-y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=U,this.p2x=I,this.p2y=U}l.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},l.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},l.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},l.prototype.solveCurveX=function(m,y){typeof y==\"undefined\"&&(y=1e-6);var I,U,$,ae,he;for($=m,he=0;he<8;he++){if(ae=this.sampleCurveX($)-m,Math.abs(ae)<y)return $;var Oe=this.sampleCurveDerivativeX($);if(Math.abs(Oe)<1e-6)break;$=$-ae/Oe}if(I=0,U=1,$=m,$<I)return I;if($>U)return U;for(;I<U;){if(ae=this.sampleCurveX($),Math.abs(ae-m)<y)return $;m>ae?I=$:U=$,$=(U-I)*.5+I}return $},l.prototype.solve=function(m,y){return this.sampleCurveY(this.solveCurveX(m,y))};var u=c;function c(m,y){this.x=m,this.y=y}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,y){return this.clone()._rotateAround(m,y)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var y=m.x-this.x,I=m.y-this.y;return y*y+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,y){return Math.atan2(this.x*y-this.y*m,this.x*m+this.y*y)},_matMult:function(m){var y=m[0]*this.x+m[1]*this.y,I=m[2]*this.x+m[3]*this.y;return this.x=y,this.y=I,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var y=Math.cos(m),I=Math.sin(m),U=y*this.x-I*this.y,$=I*this.x+y*this.y;return this.x=U,this.y=$,this},_rotateAround:function(m,y){var I=Math.cos(m),U=Math.sin(m),$=y.x+I*(this.x-y.x)-U*(this.y-y.y),ae=y.y+U*(this.x-y.x)+I*(this.y-y.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(m){return m instanceof c?m:Array.isArray(m)?new c(m[0],m[1]):m};var f=typeof self!=\"undefined\"?self:{};function h(m,y){if(Array.isArray(m)){if(!Array.isArray(y)||m.length!==y.length)return!1;for(var I=0;I<m.length;I++)if(!h(m[I],y[I]))return!1;return!0}if(typeof m==\"object\"&&m!==null&&y!==null){if(typeof y!=\"object\")return!1;var U=Object.keys(m);if(U.length!==Object.keys(y).length)return!1;for(var $ in m)if(!h(m[$],y[$]))return!1;return!0}return m===y}var d=Math.pow(2,53)-1;function v(m){if(m<=0)return 0;if(m>=1)return 1;var y=m*m,I=y*m;return 4*(m<.5?I:3*(m-y)+I-.75)}function x(m,y,I,U){var $=new s(m,y,I,U);return function(ae){return $.solve(ae)}}var b=x(.25,.1,.25,1);function p(m,y,I){return Math.min(I,Math.max(y,m))}function C(m,y,I){var U=I-y,$=((m-y)%U+U)%U+y;return $===y?I:$}function E(m,y,I){if(!m.length)return I(null,[]);var U=m.length,$=new Array(m.length),ae=null;m.forEach(function(he,Oe){y(he,function(rt,gt){rt&&(ae=rt),$[Oe]=gt,--U===0&&I(ae,$)})})}function A(m){var y=[];for(var I in m)y.push(m[I]);return y}function L(m,y){var I=[];for(var U in m)U in y||I.push(U);return I}function _(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,$=y;U<$.length;U+=1){var ae=$[U];for(var he in ae)m[he]=ae[he]}return m}function k(m,y){for(var I={},U=0;U<y.length;U++){var $=y[U];$ in m&&(I[$]=m[$])}return I}var M=1;function g(){return M++}function P(){function m(y){return y?(y^Math.random()*16>>y/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function T(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function z(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,y){m.forEach(function(I){y[I]&&(y[I]=y[I].bind(y))})}function V(m,y){return m.indexOf(y,m.length-y.length)!==-1}function G(m,y,I){var U={};for(var $ in m)U[$]=y.call(I||this,m[$],$,m);return U}function Z(m,y,I){var U={};for(var $ in m)y.call(I||this,m[$],$,m)&&(U[$]=m[$]);return U}function H(m){return Array.isArray(m)?m.map(H):typeof m==\"object\"&&m?G(m,H):m}function N(m,y){for(var I=0;I<m.length;I++)if(y.indexOf(m[I])>=0)return!0;return!1}var j={};function re(m){j[m]||(typeof console!=\"undefined\"&&console.warn(m),j[m]=!0)}function oe(m,y,I){return(I.y-m.y)*(y.x-m.x)>(y.y-m.y)*(I.x-m.x)}function _e(m){for(var y=0,I=0,U=m.length,$=U-1,ae=void 0,he=void 0;I<U;$=I++)ae=m[I],he=m[$],y+=(he.x-ae.x)*(ae.y+he.y);return y}function Me(m){var y=m[0],I=m[1],U=m[2];return I+=90,I*=Math.PI/180,U*=Math.PI/180,{x:y*Math.cos(I)*Math.sin(U),y:y*Math.sin(I)*Math.sin(U),z:y*Math.cos(U)}}function ke(){return typeof WorkerGlobalScope!=\"undefined\"&&typeof self!=\"undefined\"&&self instanceof WorkerGlobalScope}function me(m){var y=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,I={};if(m.replace(y,function($,ae,he,Oe){var rt=he||Oe;return I[ae]=rt?rt.toLowerCase():!0,\"\"}),I[\"max-age\"]){var U=parseInt(I[\"max-age\"],10);isNaN(U)?delete I[\"max-age\"]:I[\"max-age\"]=U}return I}var ie=null;function Se(m){if(ie==null){var y=m.navigator?m.navigator.userAgent:null;ie=!!m.safari||!!(y&&(/\\b(iPad|iPhone|iPod)\\b/.test(y)||y.match(\"Safari\")&&!y.match(\"Chrome\")))}return ie}function Le(m){try{var y=f[m];return y.setItem(\"_mapbox_test_\",1),y.removeItem(\"_mapbox_test_\"),!0}catch(I){return!1}}function Ae(m){return f.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(y,I){return String.fromCharCode(+(\"0x\"+I))}))}function De(m){return decodeURIComponent(f.atob(m).split(\"\").map(function(y){return\"%\"+(\"00\"+y.charCodeAt(0).toString(16)).slice(-2)}).join(\"\"))}var Pe=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),ge=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,Fe=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,Ze,ct={now:Pe,frame:function(y){var I=ge(y);return{cancel:function(){return Fe(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var U=f.document.createElement(\"canvas\"),$=U.getContext(\"2d\");if(!$)throw new Error(\"failed to create canvas 2d context\");return U.width=y.width,U.height=y.height,$.drawImage(y,0,0,y.width,y.height),$.getImageData(-I,-I,y.width+2*I,y.height+2*I)},resolveURL:function(y){return ce||(ce=f.document.createElement(\"a\")),ce.href=y,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(Ze==null&&(Ze=f.matchMedia(\"(prefers-reduced-motion: reduce)\")),Ze.matches):!1}},pt={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf(\"https://api.mapbox.cn\")===0?\"https://events.mapbox.cn/events/v2\":this.API_URL.indexOf(\"https://api.mapbox.com\")===0?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Wt={supported:!1,testSupport:$t},st,lt=!1,Gt,Nt=!1;f.document&&(Gt=f.document.createElement(\"img\"),Gt.onload=function(){st&&sr(st),st=null,Nt=!0},Gt.onerror=function(){lt=!0,st=null},Gt.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");function $t(m){lt||!Gt||(Nt?sr(m):st=m)}function sr(m){var y=m.createTexture();m.bindTexture(m.TEXTURE_2D,y);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Gt),m.isContextLost())return;Wt.supported=!0}catch(I){}m.deleteTexture(y),lt=!0}var wr=\"01\";function ur(){for(var m=\"1\",y=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",I=\"\",U=0;U<10;U++)I+=y[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[m,wr,I].join(\"\"),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var Qe=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};Qe.prototype._createSkuToken=function(){var y=ur();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},Qe.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Qe.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},Qe.prototype.normalizeStyleURL=function(y,I){if(!Et(y))return y;var U=Yt(y);return U.path=\"/styles/v1\"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Qe.prototype.normalizeGlyphsURL=function(y,I){if(!Et(y))return y;var U=Yt(y);return U.path=\"/fonts/v1\"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Qe.prototype.normalizeSourceURL=function(y,I){if(!Et(y))return y;var U=Yt(y);return U.path=\"/v4/\"+U.authority+\".json\",U.params.push(\"secure\"),this._makeAPIURL(U,this._customAccessToken||I)},Qe.prototype.normalizeSpriteURL=function(y,I,U,$){var ae=Yt(y);return Et(y)?(ae.path=\"/styles/v1\"+ae.path+\"/sprite\"+I+U,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=\"\"+I+U,lr(ae))},Qe.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!Et(y))return y;var U=Yt(y),$=/(\\.(png|jpg)\\d*)(?=$)/,ae=/^.+\\/v4\\//,he=ct.devicePixelRatio>=2||I===512?\"@2x\":\"\",Oe=Wt.supported?\".webp\":\"$1\";U.path=U.path.replace($,\"\"+he+Oe),U.path=U.path.replace(ae,\"/\"),U.path=\"/v4\"+U.path;var rt=this._customAccessToken||bt(U.params)||pt.ACCESS_TOKEN;return pt.REQUIRE_ACCESS_TOKEN&&rt&&this._skuToken&&U.params.push(\"sku=\"+this._skuToken),this._makeAPIURL(U,rt)},Qe.prototype.canonicalizeTileURL=function(y,I){var U=\"/v4/\",$=/\\.[\\w]+$/,ae=Yt(y);if(!ae.path.match(/(^\\/v4\\/)/)||!ae.path.match($))return y;var he=\"mapbox://tiles/\";he+=ae.path.replace(U,\"\");var Oe=ae.params;return I&&(Oe=Oe.filter(function(rt){return!rt.match(/^access_token=/)})),Oe.length&&(he+=\"?\"+Oe.join(\"&\")),he},Qe.prototype.canonicalizeTileset=function(y,I){for(var U=I?Et(I):!1,$=[],ae=0,he=y.tiles||[];ae<he.length;ae+=1){var Oe=he[ae];Ut(Oe)?$.push(this.canonicalizeTileURL(Oe,U)):$.push(Oe)}return $},Qe.prototype._makeAPIURL=function(y,I){var U=\"See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\",$=Yt(pt.API_URL);if(y.protocol=$.protocol,y.authority=$.authority,y.protocol===\"http\"){var ae=y.params.indexOf(\"secure\");ae>=0&&y.params.splice(ae,1)}if($.path!==\"/\"&&(y.path=\"\"+$.path+y.path),!pt.REQUIRE_ACCESS_TOKEN)return lr(y);if(I=I||pt.ACCESS_TOKEN,!I)throw new Error(\"An API access token is required to use Mapbox GL. \"+U);if(I[0]===\"s\")throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+U);return y.params=y.params.filter(function(he){return he.indexOf(\"access_token\")===-1}),y.params.push(\"access_token=\"+I),lr(y)};function Et(m){return m.indexOf(\"mapbox:\")===0}var er=/^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/|\\?|$)/i;function Ut(m){return er.test(m)}function Ft(m){return m.indexOf(\"sku=\")>0&&Ut(m)}function bt(m){for(var y=0,I=m;y<I.length;y+=1){var U=I[y],$=U.match(/^access_token=(.*)$/);if($)return $[1]}return null}var yt=/^(\\w+):\\/\\/([^/?]*)(\\/[^?]+)?\\??(.+)?/;function Yt(m){var y=m.match(yt);if(!y)throw new Error(\"Unable to parse URL object\");return{protocol:y[1],authority:y[2],path:y[3]||\"/\",params:y[4]?y[4].split(\"&\"):[]}}function lr(m){var y=m.params.length?\"?\"+m.params.join(\"&\"):\"\";return m.protocol+\"://\"+m.authority+m.path+y}var Tr=\"mapbox.eventData\";function Rr(m){if(!m)return null;var y=m.split(\".\");if(!y||y.length!==3)return null;try{var I=JSON.parse(De(y[1]));return I}catch(U){return null}}var ei=function(y){this.type=y,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ei.prototype.getStorageKey=function(y){var I=Rr(pt.ACCESS_TOKEN),U=\"\";return I&&I.u?U=Ae(I.u):U=pt.ACCESS_TOKEN||\"\",y?Tr+\".\"+y+\":\"+U:Tr+\":\"+U},ei.prototype.fetchEventData=function(){var y=Le(\"localStorage\"),I=this.getStorageKey(),U=this.getStorageKey(\"uuid\");if(y)try{var $=f.localStorage.getItem(I);$&&(this.eventData=JSON.parse($));var ae=f.localStorage.getItem(U);ae&&(this.anonId=ae)}catch(he){re(\"Unable to read from LocalStorage\")}},ei.prototype.saveEventData=function(){var y=Le(\"localStorage\"),I=this.getStorageKey(),U=this.getStorageKey(\"uuid\");if(y)try{f.localStorage.setItem(U,this.anonId),Object.keys(this.eventData).length>=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){re(\"Unable to write to LocalStorage\")}},ei.prototype.processRequests=function(y){},ei.prototype.postEvent=function(y,I,U,$){var ae=this;if(pt.EVENTS_URL){var he=Yt(pt.EVENTS_URL);he.params.push(\"access_token=\"+($||pt.ACCESS_TOKEN||\"\"));var Oe={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:o,skuId:wr,userId:this.anonId},rt=I?_(Oe,I):Oe,gt={url:lr(he),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([rt])};this.pendingRequest=$r(gt,function(Mt){ae.pendingRequest=null,U(Mt),ae.saveEventData(),ae.processRequests($)})}},ei.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Wr=function(m){function y(){m.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postMapLoadEvent=function(U,$,ae,he){this.skuToken=ae,(pt.EVENTS_URL&&he||pt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(Oe){return Et(Oe)||Ut(Oe)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},y.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,Oe=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(Oe,{skuToken:this.skuToken},function(rt){rt||he&&($.success[he]=!0)},U))}},y}(ei),Ur=function(m){function y(I){m.call(this,\"appUserTurnstile\"),this._customAccessToken=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postTurnstileEvent=function(U,$){pt.EVENTS_URL&&pt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(ae){return Et(ae)||Ut(ae)})&&this.queueRequest(Date.now(),$)},y.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Rr(pt.ACCESS_TOKEN),he=ae?ae.u:pt.ACCESS_TOKEN,Oe=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),Oe=!0);var rt=this.queue.shift();if(this.eventData.lastSuccess){var gt=new Date(this.eventData.lastSuccess),Mt=new Date(rt),or=(rt-this.eventData.lastSuccess)/(24*60*60*1e3);Oe=Oe||or>=1||or<-1||gt.getDate()!==Mt.getDate()}else Oe=!0;if(!Oe)return this.processRequests();this.postEvent(rt,{\"enabled.telemetry\":!1},function(_r){_r||($.eventData.lastSuccess=rt,$.eventData.tokenU=he)},U)}},y}(ei),dt=new Ur,Ge=dt.postTurnstileEvent.bind(dt),Je=new Wr,je=Je.postMapLoadEvent.bind(Je),$e=\"mapbox-tiles\",wt=500,Ie=50,xe=1e3*60*7,Ce;function vt(){f.caches&&!Ce&&(Ce=f.caches.open($e))}var nr;function ir(m,y){if(nr===void 0)try{new Response(new ReadableStream),nr=!0}catch(I){nr=!1}nr?y(m.body):m.blob().then(y)}function pr(m,y,I){if(vt(),!!Ce){var U={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(he,Oe){return U.headers.set(Oe,he)});var $=me(y.headers.get(\"Cache-Control\")||\"\");if(!$[\"no-store\"]){$[\"max-age\"]&&U.headers.set(\"Expires\",new Date(I+$[\"max-age\"]*1e3).toUTCString());var ae=new Date(U.headers.get(\"Expires\")).getTime()-I;ae<xe||ir(y,function(he){var Oe=new f.Response(he,U);vt(),Ce&&Ce.then(function(rt){return rt.put(oi(m.url),Oe)}).catch(function(rt){return re(rt.message)})})}}}function oi(m){var y=m.indexOf(\"?\");return y<0?m:m.slice(0,y)}function di(m,y){if(vt(),!Ce)return y(null);var I=oi(m.url);Ce.then(function(U){U.match(I).then(function($){var ae=Jr($);U.delete(I),ae&&U.put(I,$.clone()),y(null,$,ae)}).catch(y)}).catch(y)}function Jr(m){if(!m)return!1;var y=new Date(m.headers.get(\"Expires\")||0),I=me(m.headers.get(\"Cache-Control\")||\"\");return y>Date.now()&&!I[\"no-cache\"]}var fi=1/0;function Hi(m){fi++,fi>Ie&&(m.getActor().send(\"enforceCacheSizeLimit\",wt),fi=0)}function Pn(m){vt(),Ce&&Ce.then(function(y){y.keys().then(function(I){for(var U=0;U<I.length-m;U++)y.delete(I[U])})})}function wn(m){var y=f.caches.delete($e);m&&y.catch(m).then(function(){return m()})}function pn(m,y){wt=m,Ie=y}var Vn;function kn(){return Vn==null&&(Vn=f.OffscreenCanvas&&new f.OffscreenCanvas(1,1).getContext(\"2d\")&&typeof f.createImageBitmap==\"function\"),Vn}var ea={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};typeof Object.freeze==\"function\"&&Object.freeze(ea);var ua=function(m){function y(I,U,$){U===401&&Ut($)&&(I+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),m.call(this,I),this.status=U,this.url=$,this.name=this.constructor.name,this.message=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.toString=function(){return this.name+\": \"+this.message+\" (\"+this.status+\"): \"+this.url},y}(Error),Vt=ke()?function(){return self.worker&&self.worker.referrer}:function(){return(f.location.protocol===\"blob:\"?f.parent:f).location.href},_t=function(m){return/^file:/.test(m)||/^file:/.test(Vt())&&!/^\\w+:/.test(m)};function tr(m,y){var I=new f.AbortController,U=new f.Request(m.url,{method:m.method||\"GET\",body:m.body,credentials:m.credentials,headers:m.headers,referrer:Vt(),signal:I.signal}),$=!1,ae=!1,he=Ft(U.url);m.type===\"json\"&&U.headers.set(\"Accept\",\"application/json\");var Oe=function(gt,Mt,or){if(!ae){if(gt&&gt.message!==\"SecurityError\"&&re(gt),Mt&&or)return rt(Mt);var _r=Date.now();f.fetch(U).then(function(vr){if(vr.ok){var Fr=he?vr.clone():null;return rt(vr,Fr,_r)}else return y(new ua(vr.statusText,vr.status,m.url))}).catch(function(vr){vr.code!==20&&y(new Error(vr.message))})}},rt=function(gt,Mt,or){(m.type===\"arrayBuffer\"?gt.arrayBuffer():m.type===\"json\"?gt.json():gt.text()).then(function(_r){ae||(Mt&&or&&pr(U,Mt,or),$=!0,y(null,_r,gt.headers.get(\"Cache-Control\"),gt.headers.get(\"Expires\")))}).catch(function(_r){ae||y(new Error(_r.message))})};return he?di(U,Oe):Oe(null,null),{cancel:function(){ae=!0,$||I.abort()}}}function ar(m,y){var I=new f.XMLHttpRequest;I.open(m.method||\"GET\",m.url,!0),m.type===\"arrayBuffer\"&&(I.responseType=\"arraybuffer\");for(var U in m.headers)I.setRequestHeader(U,m.headers[U]);return m.type===\"json\"&&(I.responseType=\"text\",I.setRequestHeader(\"Accept\",\"application/json\")),I.withCredentials=m.credentials===\"include\",I.onerror=function(){y(new Error(I.statusText))},I.onload=function(){if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(m.type===\"json\")try{$=JSON.parse(I.response)}catch(ae){return y(ae)}y(null,$,I.getResponseHeader(\"Cache-Control\"),I.getResponseHeader(\"Expires\"))}else y(new ua(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var Er=function(m,y){if(!_t(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty(\"signal\"))return tr(m,y);if(ke()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send(\"getResource\",m,y,void 0,I)}}return ar(m,y)},Zr=function(m,y){return Er(_(m,{type:\"json\"}),y)},ri=function(m,y){return Er(_(m,{type:\"arrayBuffer\"}),y)},$r=function(m,y){return Er(_(m,{method:\"POST\"}),y)};function zi(m){var y=f.document.createElement(\"a\");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var Ji=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";function en(m,y,I,U){var $=new f.Image,ae=f.URL;$.onload=function(){y(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=Ji})},$.onerror=function(){return y(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))};var he=new f.Blob([new Uint8Array(m)],{type:\"image/png\"});$.cacheControl=I,$.expires=U,$.src=m.byteLength?ae.createObjectURL(he):Ji}function cn(m,y){var I=new f.Blob([new Uint8Array(m)],{type:\"image/png\"});f.createImageBitmap(I).then(function(U){y(null,U)}).catch(function(U){y(new Error(\"Could not load image because of \"+U.message+\". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))})}var yn,Mn,Ba=function(){yn=[],Mn=0};Ba();var la=function(m,y){if(Wt.supported&&(m.headers||(m.headers={}),m.headers.accept=\"image/webp,*/*\"),Mn>=pt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Mn++;var U=!1,$=function(){if(!U)for(U=!0,Mn--;yn.length&&Mn<pt.MAX_PARALLEL_IMAGE_REQUESTS;){var he=yn.shift(),Oe=he.requestParameters,rt=he.callback,gt=he.cancelled;gt||(he.cancel=la(Oe,rt).cancel)}},ae=ri(m,function(he,Oe,rt,gt){$(),he?y(he):Oe&&(kn()?cn(Oe,y):en(Oe,y,rt,gt))});return{cancel:function(){ae.cancel(),$()}}},ma=function(m,y){var I=f.document.createElement(\"video\");I.muted=!0,I.onloadstart=function(){y(null,I)};for(var U=0;U<m.length;U++){var $=f.document.createElement(\"source\");zi(m[U])||(I.crossOrigin=\"Anonymous\"),$.src=m[U],I.appendChild($)}return{cancel:function(){}}};function Wa(m,y,I){var U=I[m]&&I[m].indexOf(y)!==-1;U||(I[m]=I[m]||[],I[m].push(y))}function Fa(m,y,I){if(I&&I[m]){var U=I[m].indexOf(y);U!==-1&&I[m].splice(U,1)}}var Wo=function(y,I){I===void 0&&(I={}),_(this,I),this.type=y},da=function(m){function y(I,U){U===void 0&&(U={}),m.call(this,\"error\",_({error:I},U))}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Wo),Wn=function(){};Wn.prototype.on=function(y,I){return this._listeners=this._listeners||{},Wa(y,I,this._listeners),this},Wn.prototype.off=function(y,I){return Fa(y,I,this._listeners),Fa(y,I,this._oneTimeListeners),this},Wn.prototype.once=function(y,I){return this._oneTimeListeners=this._oneTimeListeners||{},Wa(y,I,this._oneTimeListeners),this},Wn.prototype.fire=function(y,I){typeof y==\"string\"&&(y=new Wo(y,I||{}));var U=y.type;if(this.listens(U)){y.target=this;for(var $=this._listeners&&this._listeners[U]?this._listeners[U].slice():[],ae=0,he=$;ae<he.length;ae+=1){var Oe=he[ae];Oe.call(this,y)}for(var rt=this._oneTimeListeners&&this._oneTimeListeners[U]?this._oneTimeListeners[U].slice():[],gt=0,Mt=rt;gt<Mt.length;gt+=1){var or=Mt[gt];Fa(U,or,this._oneTimeListeners),or.call(this,y)}var _r=this._eventedParent;_r&&(_(y,typeof this._eventedParentData==\"function\"?this._eventedParentData():this._eventedParentData),_r.fire(y))}else y instanceof da&&console.error(y.error);return this},Wn.prototype.listens=function(y){return this._listeners&&this._listeners[y]&&this._listeners[y].length>0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Wn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ga=8,vo={version:{required:!0,type:\"enum\",values:[8]},name:{type:\"string\"},metadata:{type:\"*\"},center:{type:\"array\",value:\"number\"},zoom:{type:\"number\"},bearing:{type:\"number\",default:0,period:360,units:\"degrees\"},pitch:{type:\"number\",default:0,units:\"degrees\"},light:{type:\"light\"},sources:{required:!0,type:\"sources\"},sprite:{type:\"string\"},glyphs:{type:\"string\"},transition:{type:\"transition\"},layers:{required:!0,type:\"array\",value:\"layer\"}},jn={\"*\":{type:\"source\"}},St=[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],Cr={type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},Qr={type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},pi={type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{}},default:\"mapbox\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},fn={type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{type:\"*\"},maxzoom:{type:\"number\",default:18},attribution:{type:\"string\"},buffer:{type:\"number\",default:128,maximum:512,minimum:0},filter:{type:\"*\"},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},clusterMinPoints:{type:\"number\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},Sn={type:{required:!0,type:\"enum\",values:{video:{}}},urls:{required:!0,type:\"array\",value:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},En={type:{required:!0,type:\"enum\",values:{image:{}}},url:{required:!0,type:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},ki={id:{type:\"string\",required:!0},type:{type:\"enum\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},_n=[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],ya={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Jn={\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Ma={\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},_o={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},No={\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},po={\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Lo={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Co={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Fs={type:\"array\",value:\"*\"},zs={type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},ul={type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},cl={type:\"array\",minimum:0,maximum:24,value:[\"number\",\"color\"],length:2},zl={type:\"array\",value:\"*\",minimum:1},cs={anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},nl=[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],Ss={\"fill-antialias\":{type:\"boolean\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},fl={\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},Js={\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},Os={\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Io={\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},us={\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Zl={\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Su={\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},nc={duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},ws={\"*\":{type:\"string\"}},Fn={$version:Ga,$root:vo,sources:jn,source:St,source_vector:Cr,source_raster:Qr,source_raster_dem:pi,source_geojson:fn,source_video:Sn,source_image:En,layer:ki,layout:_n,layout_background:ya,layout_fill:Jn,layout_circle:Ma,layout_heatmap:_o,\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:Co,filter:Fs,filter_operator:zs,geometry_type:ul,function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},function_stop:cl,expression:zl,light:cs,paint:nl,paint_fill:Ss,\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:fl,paint_circle:Js,paint_heatmap:Os,paint_symbol:Io,paint_raster:us,paint_hillshade:Zl,paint_background:Su,transition:nc,\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:ws},_a=function(y,I,U,$){this.message=(y?y+\": \":\"\")+U,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(m){var y=m.key,I=m.value;return I?[new _a(y,I,\"constants have been deprecated as of v8\")]:[]}function Ol(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,$=y;U<$.length;U+=1){var ae=$[U];for(var he in ae)m[he]=ae[he]}return m}function xo(m){return m instanceof Number||m instanceof String||m instanceof Boolean?m.valueOf():m}function Yl(m){if(Array.isArray(m))return m.map(Yl);if(m instanceof Object&&!(m instanceof Number||m instanceof String||m instanceof Boolean)){var y={};for(var I in m)y[I]=Yl(m[I]);return y}return xo(m)}var Us=function(m){function y(I,U){m.call(this,U),this.message=U,this.key=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Error),Hl=function(y,I){I===void 0&&(I=[]),this.parent=y,this.bindings={};for(var U=0,$=I;U<$.length;U+=1){var ae=$[U],he=ae[0],Oe=ae[1];this.bindings[he]=Oe}};Hl.prototype.concat=function(y){return new Hl(this,y)},Hl.prototype.get=function(y){if(this.bindings[y])return this.bindings[y];if(this.parent)return this.parent.get(y);throw new Error(y+\" not found in scope.\")},Hl.prototype.has=function(y){return this.bindings[y]?!0:this.parent?this.parent.has(y):!1};var ac={kind:\"null\"},aa={kind:\"number\"},Oo={kind:\"string\"},qo={kind:\"boolean\"},ql={kind:\"color\"},Pc={kind:\"object\"},Do={kind:\"value\"},rf={kind:\"error\"},Uf={kind:\"collator\"},ml={kind:\"formatted\"},Zc={kind:\"resolvedImage\"};function Kl(m,y){return{kind:\"array\",itemType:m,N:y}}function qs(m){if(m.kind===\"array\"){var y=qs(m.itemType);return typeof m.N==\"number\"?\"array<\"+y+\", \"+m.N+\">\":m.itemType.kind===\"value\"?\"array\":\"array<\"+y+\">\"}else return m.kind}var yu=[ac,aa,Oo,qo,ql,ml,Pc,Kl(Do),Zc];function oc(m,y){if(y.kind===\"error\")return null;if(m.kind===\"array\"){if(y.kind===\"array\"&&(y.N===0&&y.itemType.kind===\"value\"||!oc(m.itemType,y.itemType))&&(typeof m.N!=\"number\"||m.N===y.N))return null}else{if(m.kind===y.kind)return null;if(m.kind===\"value\")for(var I=0,U=yu;I<U.length;I+=1){var $=U[I];if(!oc($,y))return null}}return\"Expected \"+qs(m)+\" but found \"+qs(y)+\" instead.\"}function Cf(m,y){return y.some(function(I){return I.kind===m.kind})}function sc(m,y){return y.some(function(I){return I===\"null\"?m===null:I===\"array\"?Array.isArray(m):I===\"object\"?m&&!Array.isArray(m)&&typeof m==\"object\":I===typeof m})}var Nh=a(function(m,y){var I={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function U(gt){return gt=Math.round(gt),gt<0?0:gt>255?255:gt}function $(gt){return gt<0?0:gt>1?1:gt}function ae(gt){return gt[gt.length-1]===\"%\"?U(parseFloat(gt)/100*255):U(parseInt(gt))}function he(gt){return gt[gt.length-1]===\"%\"?$(parseFloat(gt)/100):$(parseFloat(gt))}function Oe(gt,Mt,or){return or<0?or+=1:or>1&&(or-=1),or*6<1?gt+(Mt-gt)*or*6:or*2<1?Mt:or*3<2?gt+(Mt-gt)*(2/3-or)*6:gt}function rt(gt){var Mt=gt.replace(/ /g,\"\").toLowerCase();if(Mt in I)return I[Mt].slice();if(Mt[0]===\"#\"){if(Mt.length===4){var or=parseInt(Mt.substr(1),16);return or>=0&&or<=4095?[(or&3840)>>4|(or&3840)>>8,or&240|(or&240)>>4,or&15|(or&15)<<4,1]:null}else if(Mt.length===7){var or=parseInt(Mt.substr(1),16);return or>=0&&or<=16777215?[(or&16711680)>>16,(or&65280)>>8,or&255,1]:null}return null}var _r=Mt.indexOf(\"(\"),vr=Mt.indexOf(\")\");if(_r!==-1&&vr+1===Mt.length){var Fr=Mt.substr(0,_r),ai=Mt.substr(_r+1,vr-(_r+1)).split(\",\"),Gi=1;switch(Fr){case\"rgba\":if(ai.length!==4)return null;Gi=he(ai.pop());case\"rgb\":return ai.length!==3?null:[ae(ai[0]),ae(ai[1]),ae(ai[2]),Gi];case\"hsla\":if(ai.length!==4)return null;Gi=he(ai.pop());case\"hsl\":if(ai.length!==3)return null;var Ti=(parseFloat(ai[0])%360+360)%360/360,bn=he(ai[1]),rn=he(ai[2]),xn=rn<=.5?rn*(bn+1):rn+bn-rn*bn,Dn=rn*2-xn;return[U(Oe(Dn,xn,Ti+1/3)*255),U(Oe(Dn,xn,Ti)*255),U(Oe(Dn,xn,Ti-1/3)*255),Gi];default:return null}}return null}try{y.parseCSSColor=rt}catch(gt){}}),kf=Nh.parseCSSColor,fs=function(y,I,U,$){$===void 0&&($=1),this.r=y,this.g=I,this.b=U,this.a=$};fs.parse=function(y){if(y){if(y instanceof fs)return y;if(typeof y==\"string\"){var I=kf(y);if(I)return new fs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},fs.prototype.toString=function(){var y=this.toArray(),I=y[0],U=y[1],$=y[2],ae=y[3];return\"rgba(\"+Math.round(I)+\",\"+Math.round(U)+\",\"+Math.round($)+\",\"+ae+\")\"},fs.prototype.toArray=function(){var y=this,I=y.r,U=y.g,$=y.b,ae=y.a;return ae===0?[0,0,0,0]:[I*255/ae,U*255/ae,$*255/ae,ae]},fs.black=new fs(0,0,0,1),fs.white=new fs(1,1,1,1),fs.transparent=new fs(0,0,0,0),fs.red=new fs(1,0,0,1);var nf=function(y,I,U){y?this.sensitivity=I?\"variant\":\"case\":this.sensitivity=I?\"accent\":\"base\",this.locale=U,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"})};nf.prototype.compare=function(y,I){return this.collator.compare(y,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Vf=function(y,I,U,$,ae){this.text=y,this.image=I,this.scale=U,this.fontStack=$,this.textColor=ae},Jl=function(y){this.sections=y};Jl.fromString=function(y){return new Jl([new Vf(y,null,null,null,null)])},Jl.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(y){return y.text.length!==0||y.image&&y.image.name.length!==0})},Jl.factory=function(y){return y instanceof Jl?y:Jl.fromString(y)},Jl.prototype.toString=function(){return this.sections.length===0?\"\":this.sections.map(function(y){return y.text}).join(\"\")},Jl.prototype.serialize=function(){for(var y=[\"format\"],I=0,U=this.sections;I<U.length;I+=1){var $=U[I];if($.image){y.push([\"image\",$.image.name]);continue}y.push($.text);var ae={};$.fontStack&&(ae[\"text-font\"]=[\"literal\",$.fontStack.split(\",\")]),$.scale&&(ae[\"font-scale\"]=$.scale),$.textColor&&(ae[\"text-color\"]=[\"rgba\"].concat($.textColor.toArray())),y.push(ae)}return y};var hl=function(y){this.name=y.name,this.available=y.available};hl.prototype.toString=function(){return this.name},hl.fromString=function(y){return y?new hl({name:y,available:!1}):null},hl.prototype.serialize=function(){return[\"image\",this.name]};function lc(m,y,I,U){if(!(typeof m==\"number\"&&m>=0&&m<=255&&typeof y==\"number\"&&y>=0&&y<=255&&typeof I==\"number\"&&I>=0&&I<=255)){var $=typeof U==\"number\"?[m,y,I,U]:[m,y,I];return\"Invalid rgba value [\"+$.join(\", \")+\"]: 'r', 'g', and 'b' must be between 0 and 255.\"}return typeof U==\"undefined\"||typeof U==\"number\"&&U>=0&&U<=1?null:\"Invalid rgba value [\"+[m,y,I,U].join(\", \")+\"]: 'a' must be between 0 and 1.\"}function Fu(m){if(m===null)return!0;if(typeof m==\"string\")return!0;if(typeof m==\"boolean\")return!0;if(typeof m==\"number\")return!0;if(m instanceof fs)return!0;if(m instanceof nf)return!0;if(m instanceof Jl)return!0;if(m instanceof hl)return!0;if(Array.isArray(m)){for(var y=0,I=m;y<I.length;y+=1){var U=I[y];if(!Fu(U))return!1}return!0}else if(typeof m==\"object\"){for(var $ in m)if(!Fu(m[$]))return!1;return!0}else return!1}function Cs(m){if(m===null)return ac;if(typeof m==\"string\")return Oo;if(typeof m==\"boolean\")return qo;if(typeof m==\"number\")return aa;if(m instanceof fs)return ql;if(m instanceof nf)return Uf;if(m instanceof Jl)return ml;if(m instanceof hl)return Zc;if(Array.isArray(m)){for(var y=m.length,I,U=0,$=m;U<$.length;U+=1){var ae=$[U],he=Cs(ae);if(!I)I=he;else{if(I===he)continue;I=Do;break}}return Kl(I||Do,y)}else return Pc}function js(m){var y=typeof m;return m===null?\"\":y===\"string\"||y===\"number\"||y===\"boolean\"?String(m):m instanceof fs||m instanceof Jl||m instanceof hl?m.toString():JSON.stringify(m)}var Go=function(y,I){this.type=y,this.value=I};Go.parse=function(y,I){if(y.length!==2)return I.error(\"'literal' expression requires exactly one argument, but found \"+(y.length-1)+\" instead.\");if(!Fu(y[1]))return I.error(\"invalid value\");var U=y[1],$=Cs(U),ae=I.expectedType;return $.kind===\"array\"&&$.N===0&&ae&&ae.kind===\"array\"&&(typeof ae.N!=\"number\"||ae.N===0)&&($=ae),new Go($,U)},Go.prototype.evaluate=function(){return this.value},Go.prototype.eachChild=function(){},Go.prototype.outputDefined=function(){return!0},Go.prototype.serialize=function(){return this.type.kind===\"array\"||this.type.kind===\"object\"?[\"literal\",this.value]:this.value instanceof fs?[\"rgba\"].concat(this.value.toArray()):this.value instanceof Jl?this.value.serialize():this.value};var gs=function(y){this.name=\"ExpressionEvaluationError\",this.message=y};gs.prototype.toJSON=function(){return this.message};var uc={string:Oo,number:aa,boolean:qo,object:Pc},bl=function(y,I){this.type=y,this.args=I};bl.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var U=1,$,ae=y[0];if(ae===\"array\"){var he;if(y.length>2){var Oe=y[1];if(typeof Oe!=\"string\"||!(Oe in uc)||Oe===\"object\")return I.error('The item type argument of \"array\" must be one of string, number, boolean',1);he=uc[Oe],U++}else he=Do;var rt;if(y.length>3){if(y[2]!==null&&(typeof y[2]!=\"number\"||y[2]<0||y[2]!==Math.floor(y[2])))return I.error('The length argument to \"array\" must be a positive integer literal',2);rt=y[2],U++}$=Kl(he,rt)}else $=uc[ae];for(var gt=[];U<y.length;U++){var Mt=I.parse(y[U],U,Do);if(!Mt)return null;gt.push(Mt)}return new bl($,gt)},bl.prototype.evaluate=function(y){for(var I=0;I<this.args.length;I++){var U=this.args[I].evaluate(y),$=oc(this.type,Cs(U));if($){if(I===this.args.length-1)throw new gs(\"Expected value to be of type \"+qs(this.type)+\", but found \"+qs(Cs(U))+\" instead.\")}else return U}return null},bl.prototype.eachChild=function(y){this.args.forEach(y)},bl.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},bl.prototype.serialize=function(){var y=this.type,I=[y.kind];if(y.kind===\"array\"){var U=y.itemType;if(U.kind===\"string\"||U.kind===\"number\"||U.kind===\"boolean\"){I.push(U.kind);var $=y.N;(typeof $==\"number\"||this.args.length>1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(y){this.type=ml,this.sections=y};Gu.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var U=y[1];if(!Array.isArray(U)&&typeof U==\"object\")return I.error(\"First argument must be an image or text section.\");for(var $=[],ae=!1,he=1;he<=y.length-1;++he){var Oe=y[he];if(ae&&typeof Oe==\"object\"&&!Array.isArray(Oe)){ae=!1;var rt=null;if(Oe[\"font-scale\"]&&(rt=I.parse(Oe[\"font-scale\"],1,aa),!rt))return null;var gt=null;if(Oe[\"text-font\"]&&(gt=I.parse(Oe[\"text-font\"],1,Kl(Oo)),!gt))return null;var Mt=null;if(Oe[\"text-color\"]&&(Mt=I.parse(Oe[\"text-color\"],1,ql),!Mt))return null;var or=$[$.length-1];or.scale=rt,or.font=gt,or.textColor=Mt}else{var _r=I.parse(y[he],1,Do);if(!_r)return null;var vr=_r.type.kind;if(vr!==\"string\"&&vr!==\"value\"&&vr!==\"null\"&&vr!==\"resolvedImage\")return I.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");ae=!0,$.push({content:_r,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(y){var I=function(U){var $=U.content.evaluate(y);return Cs($)===Zc?new Vf(\"\",$,null,null,null):new Vf(js($),null,U.scale?U.scale.evaluate(y):null,U.font?U.font.evaluate(y).join(\",\"):null,U.textColor?U.textColor.evaluate(y):null)};return new Jl(this.sections.map(I))},Gu.prototype.eachChild=function(y){for(var I=0,U=this.sections;I<U.length;I+=1){var $=U[I];y($.content),$.scale&&y($.scale),$.font&&y($.font),$.textColor&&y($.textColor)}},Gu.prototype.outputDefined=function(){return!1},Gu.prototype.serialize=function(){for(var y=[\"format\"],I=0,U=this.sections;I<U.length;I+=1){var $=U[I];y.push($.content.serialize());var ae={};$.scale&&(ae[\"font-scale\"]=$.scale.serialize()),$.font&&(ae[\"text-font\"]=$.font.serialize()),$.textColor&&(ae[\"text-color\"]=$.textColor.serialize()),y.push(ae)}return y};var Bs=function(y){this.type=Zc,this.input=y};Bs.parse=function(y,I){if(y.length!==2)return I.error(\"Expected two arguments.\");var U=I.parse(y[1],1,Oo);return U?new Bs(U):I.error(\"No image name provided.\")},Bs.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=hl.fromString(I);return U&&y.availableImages&&(U.available=y.availableImages.indexOf(I)>-1),U},Bs.prototype.eachChild=function(y){y(this.input)},Bs.prototype.outputDefined=function(){return!1},Bs.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ad={\"to-boolean\":qo,\"to-color\":ql,\"to-number\":aa,\"to-string\":Oo},Po=function(y,I){this.type=y,this.args=I};Po.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var U=y[0];if((U===\"to-boolean\"||U===\"to-string\")&&y.length!==2)return I.error(\"Expected one argument.\");for(var $=ad[U],ae=[],he=1;he<y.length;he++){var Oe=I.parse(y[he],he,Do);if(!Oe)return null;ae.push(Oe)}return new Po($,ae)},Po.prototype.evaluate=function(y){if(this.type.kind===\"boolean\")return!!this.args[0].evaluate(y);if(this.type.kind===\"color\"){for(var I,U,$=0,ae=this.args;$<ae.length;$+=1){var he=ae[$];if(I=he.evaluate(y),U=null,I instanceof fs)return I;if(typeof I==\"string\"){var Oe=y.parseColor(I);if(Oe)return Oe}else if(Array.isArray(I)&&(I.length<3||I.length>4?U=\"Invalid rbga value \"+JSON.stringify(I)+\": expected an array containing either three or four numeric values.\":U=lc(I[0],I[1],I[2],I[3]),!U))return new fs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new gs(U||\"Could not parse color from value '\"+(typeof I==\"string\"?I:String(JSON.stringify(I)))+\"'\")}else if(this.type.kind===\"number\"){for(var rt=null,gt=0,Mt=this.args;gt<Mt.length;gt+=1){var or=Mt[gt];if(rt=or.evaluate(y),rt===null)return 0;var _r=Number(rt);if(!isNaN(_r))return _r}throw new gs(\"Could not convert \"+JSON.stringify(rt)+\" to number.\")}else return this.type.kind===\"formatted\"?Jl.fromString(js(this.args[0].evaluate(y))):this.type.kind===\"resolvedImage\"?hl.fromString(js(this.args[0].evaluate(y))):js(this.args[0].evaluate(y))},Po.prototype.eachChild=function(y){this.args.forEach(y)},Po.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},Po.prototype.serialize=function(){if(this.type.kind===\"formatted\")return new Gu([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind===\"resolvedImage\")return new Bs(this.args[0]).serialize();var y=[\"to-\"+this.type.kind];return this.eachChild(function(I){y.push(I.serialize())}),y};var od=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],Yo=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Yo.prototype.id=function(){return this.feature&&\"id\"in this.feature?this.feature.id:null},Yo.prototype.geometryType=function(){return this.feature?typeof this.feature.type==\"number\"?od[this.feature.type]:this.feature.type:null},Yo.prototype.geometry=function(){return this.feature&&\"geometry\"in this.feature?this.feature.geometry:null},Yo.prototype.canonicalID=function(){return this.canonical},Yo.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Yo.prototype.parseColor=function(y){var I=this._parseColorCache[y];return I||(I=this._parseColorCache[y]=fs.parse(y)),I};var Pa=function(y,I,U,$){this.name=y,this.type=I,this._evaluate=U,this.args=$};Pa.prototype.evaluate=function(y){return this._evaluate(y,this.args)},Pa.prototype.eachChild=function(y){this.args.forEach(y)},Pa.prototype.outputDefined=function(){return!1},Pa.prototype.serialize=function(){return[this.name].concat(this.args.map(function(y){return y.serialize()}))},Pa.parse=function(y,I){var U,$=y[0],ae=Pa.definitions[$];if(!ae)return I.error('Unknown expression \"'+$+'\". If you wanted a literal array, use [\"literal\", [...]].',0);for(var he=Array.isArray(ae)?ae[0]:ae.type,Oe=Array.isArray(ae)?[[ae[1],ae[2]]]:ae.overloads,rt=Oe.filter(function(to){var ao=to[0];return!Array.isArray(ao)||ao.length===y.length-1}),gt=null,Mt=0,or=rt;Mt<or.length;Mt+=1){var _r=or[Mt],vr=_r[0],Fr=_r[1];gt=new ks(I.registry,I.path,null,I.scope);for(var ai=[],Gi=!1,Ti=1;Ti<y.length;Ti++){var bn=y[Ti],rn=Array.isArray(vr)?vr[Ti-1]:vr.type,xn=gt.parse(bn,1+ai.length,rn);if(!xn){Gi=!0;break}ai.push(xn)}if(!Gi){if(Array.isArray(vr)&&vr.length!==ai.length){gt.error(\"Expected \"+vr.length+\" arguments, but found \"+ai.length+\" instead.\");continue}for(var Dn=0;Dn<ai.length;Dn++){var Zn=Array.isArray(vr)?vr[Dn]:vr.type,ga=ai[Dn];gt.concat(Dn+1).checkSubtype(Zn,ga.type)}if(gt.errors.length===0)return new Pa($,he,Fr,ai)}}if(rt.length===1)(U=I.errors).push.apply(U,gt.errors);else{for(var ha=rt.length?rt:Oe,eo=ha.map(function(to){var ao=to[0];return af(ao)}).join(\" | \"),za=[],Za=1;Za<y.length;Za++){var Ko=I.parse(y[Za],1+za.length);if(!Ko)return null;za.push(qs(Ko.type))}I.error(\"Expected arguments of type \"+eo+\", but found (\"+za.join(\", \")+\") instead.\")}return null},Pa.register=function(y,I){Pa.definitions=I;for(var U in I)y[U]=Pa};function af(m){return Array.isArray(m)?\"(\"+m.map(qs).join(\", \")+\")\":\"(\"+qs(m.type)+\"...)\"}var Hu=function(y,I,U){this.type=Uf,this.locale=U,this.caseSensitive=y,this.diacriticSensitive=I};Hu.parse=function(y,I){if(y.length!==2)return I.error(\"Expected one argument.\");var U=y[1];if(typeof U!=\"object\"||Array.isArray(U))return I.error(\"Collator options argument must be an object.\");var $=I.parse(U[\"case-sensitive\"]===void 0?!1:U[\"case-sensitive\"],1,qo);if(!$)return null;var ae=I.parse(U[\"diacritic-sensitive\"]===void 0?!1:U[\"diacritic-sensitive\"],1,qo);if(!ae)return null;var he=null;return U.locale&&(he=I.parse(U.locale,1,Oo),!he)?null:new Hu($,ae,he)},Hu.prototype.evaluate=function(y){return new nf(this.caseSensitive.evaluate(y),this.diacriticSensitive.evaluate(y),this.locale?this.locale.evaluate(y):null)},Hu.prototype.eachChild=function(y){y(this.caseSensitive),y(this.diacriticSensitive),this.locale&&y(this.locale)},Hu.prototype.outputDefined=function(){return!1},Hu.prototype.serialize=function(){var y={};return y[\"case-sensitive\"]=this.caseSensitive.serialize(),y[\"diacritic-sensitive\"]=this.diacriticSensitive.serialize(),this.locale&&(y.locale=this.locale.serialize()),[\"collator\",y]};var wl=8192;function Gf(m,y){m[0]=Math.min(m[0],y[0]),m[1]=Math.min(m[1],y[1]),m[2]=Math.max(m[2],y[0]),m[3]=Math.max(m[3],y[1])}function Ic(m){return(180+m)/360}function mf(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function Bl(m,y){return!(m[0]<=y[0]||m[2]>=y[2]||m[1]<=y[1]||m[3]>=y[3])}function _h(m,y){var I=Ic(m[0]),U=mf(m[1]),$=Math.pow(2,y.z);return[Math.round(I*$*wl),Math.round(U*$*wl)]}function Qf(m,y,I){var U=m[0]-y[0],$=m[1]-y[1],ae=m[0]-I[0],he=m[1]-I[1];return U*he-ae*$===0&&U*ae<=0&&$*he<=0}function yf(m,y,I){return y[1]>m[1]!=I[1]>m[1]&&m[0]<(I[0]-y[0])*(m[1]-y[1])/(I[1]-y[1])+y[0]}function Yc(m,y){for(var I=!1,U=0,$=y.length;U<$;U++)for(var ae=y[U],he=0,Oe=ae.length;he<Oe-1;he++){if(Qf(m,ae[he],ae[he+1]))return!1;yf(m,ae[he],ae[he+1])&&(I=!I)}return I}function eh(m,y){for(var I=0;I<y.length;I++)if(Yc(m,y[I]))return!0;return!1}function th(m,y){return m[0]*y[1]-m[1]*y[0]}function ju(m,y,I,U){var $=m[0]-I[0],ae=m[1]-I[1],he=y[0]-I[0],Oe=y[1]-I[1],rt=U[0]-I[0],gt=U[1]-I[1],Mt=$*gt-rt*ae,or=he*gt-rt*Oe;return Mt>0&&or<0||Mt<0&&or>0}function Hf(m,y,I,U){var $=[y[0]-m[0],y[1]-m[1]],ae=[U[0]-I[0],U[1]-I[1]];return th(ae,$)===0?!1:!!(ju(m,y,I,U)&&ju(I,U,m,y))}function cc(m,y,I){for(var U=0,$=I;U<$.length;U+=1)for(var ae=$[U],he=0;he<ae.length-1;++he)if(Hf(m,y,ae[he],ae[he+1]))return!0;return!1}function of(m,y){for(var I=0;I<m.length;++I)if(!Yc(m[I],y))return!1;for(var U=0;U<m.length-1;++U)if(cc(m[U],m[U+1],y))return!1;return!0}function Nl(m,y){for(var I=0;I<y.length;I++)if(of(m,y[I]))return!0;return!1}function Kc(m,y,I){for(var U=[],$=0;$<m.length;$++){for(var ae=[],he=0;he<m[$].length;he++){var Oe=_h(m[$][he],I);Gf(y,Oe),ae.push(Oe)}U.push(ae)}return U}function Rc(m,y,I){for(var U=[],$=0;$<m.length;$++){var ae=Kc(m[$],y,I);U.push(ae)}return U}function ms(m,y,I,U){if(m[0]<I[0]||m[0]>I[2]){var $=U*.5,ae=m[0]-I[0]>$?-U:I[0]-m[0]>$?U:0;ae===0&&(ae=m[0]-I[2]>$?-U:I[2]-m[0]>$?U:0),m[0]+=ae}Gf(y,m)}function jf(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Uh(m,y,I,U){for(var $=Math.pow(2,U.z)*wl,ae=[U.x*wl,U.y*wl],he=[],Oe=0,rt=m;Oe<rt.length;Oe+=1)for(var gt=rt[Oe],Mt=0,or=gt;Mt<or.length;Mt+=1){var _r=or[Mt],vr=[_r.x+ae[0],_r.y+ae[1]];ms(vr,y,I,$),he.push(vr)}return he}function rh(m,y,I,U){for(var $=Math.pow(2,U.z)*wl,ae=[U.x*wl,U.y*wl],he=[],Oe=0,rt=m;Oe<rt.length;Oe+=1){for(var gt=rt[Oe],Mt=[],or=0,_r=gt;or<_r.length;or+=1){var vr=_r[or],Fr=[vr.x+ae[0],vr.y+ae[1]];Gf(y,Fr),Mt.push(Fr)}he.push(Mt)}if(y[2]-y[0]<=$/2){jf(y);for(var ai=0,Gi=he;ai<Gi.length;ai+=1)for(var Ti=Gi[ai],bn=0,rn=Ti;bn<rn.length;bn+=1){var xn=rn[bn];ms(xn,y,I,$)}}return he}function sf(m,y){var I=[1/0,1/0,-1/0,-1/0],U=[1/0,1/0,-1/0,-1/0],$=m.canonicalID();if(y.type===\"Polygon\"){var ae=Kc(y.coordinates,U,$),he=Uh(m.geometry(),I,U,$);if(!Bl(I,U))return!1;for(var Oe=0,rt=he;Oe<rt.length;Oe+=1){var gt=rt[Oe];if(!Yc(gt,ae))return!1}}if(y.type===\"MultiPolygon\"){var Mt=Rc(y.coordinates,U,$),or=Uh(m.geometry(),I,U,$);if(!Bl(I,U))return!1;for(var _r=0,vr=or;_r<vr.length;_r+=1){var Fr=vr[_r];if(!eh(Fr,Mt))return!1}}return!0}function xh(m,y){var I=[1/0,1/0,-1/0,-1/0],U=[1/0,1/0,-1/0,-1/0],$=m.canonicalID();if(y.type===\"Polygon\"){var ae=Kc(y.coordinates,U,$),he=rh(m.geometry(),I,U,$);if(!Bl(I,U))return!1;for(var Oe=0,rt=he;Oe<rt.length;Oe+=1){var gt=rt[Oe];if(!of(gt,ae))return!1}}if(y.type===\"MultiPolygon\"){var Mt=Rc(y.coordinates,U,$),or=rh(m.geometry(),I,U,$);if(!Bl(I,U))return!1;for(var _r=0,vr=or;_r<vr.length;_r+=1){var Fr=vr[_r];if(!Nl(Fr,Mt))return!1}}return!0}var Mu=function(y,I){this.type=qo,this.geojson=y,this.geometries=I};Mu.parse=function(y,I){if(y.length!==2)return I.error(\"'within' expression requires exactly one argument, but found \"+(y.length-1)+\" instead.\");if(Fu(y[1])){var U=y[1];if(U.type===\"FeatureCollection\")for(var $=0;$<U.features.length;++$){var ae=U.features[$].geometry.type;if(ae===\"Polygon\"||ae===\"MultiPolygon\")return new Mu(U,U.features[$].geometry)}else if(U.type===\"Feature\"){var he=U.geometry.type;if(he===\"Polygon\"||he===\"MultiPolygon\")return new Mu(U,U.geometry)}else if(U.type===\"Polygon\"||U.type===\"MultiPolygon\")return new Mu(U,U)}return I.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\")},Mu.prototype.evaluate=function(y){if(y.geometry()!=null&&y.canonicalID()!=null){if(y.geometryType()===\"Point\")return sf(y,this.geometries);if(y.geometryType()===\"LineString\")return xh(y,this.geometries)}return!1},Mu.prototype.eachChild=function(){},Mu.prototype.outputDefined=function(){return!0},Mu.prototype.serialize=function(){return[\"within\",this.geojson]};function ih(m){if(m instanceof Pa){if(m.name===\"get\"&&m.args.length===1)return!1;if(m.name===\"feature-state\")return!1;if(m.name===\"has\"&&m.args.length===1)return!1;if(m.name===\"properties\"||m.name===\"geometry-type\"||m.name===\"id\")return!1;if(/^filter-/.test(m.name))return!1}if(m instanceof Mu)return!1;var y=!0;return m.eachChild(function(I){y&&!ih(I)&&(y=!1)}),y}function Ws(m){if(m instanceof Pa&&m.name===\"feature-state\")return!1;var y=!0;return m.eachChild(function(I){y&&!Ws(I)&&(y=!1)}),y}function Eu(m,y){if(m instanceof Pa&&y.indexOf(m.name)>=0)return!1;var I=!0;return m.eachChild(function(U){I&&!Eu(U,y)&&(I=!1)}),I}var Dc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Dc.parse=function(y,I){if(y.length!==2||typeof y[1]!=\"string\")return I.error(\"'var' expression requires exactly one string literal argument.\");var U=y[1];return I.scope.has(U)?new Dc(U,I.scope.get(U)):I.error('Unknown variable \"'+U+'\". Make sure \"'+U+'\" has been bound in an enclosing \"let\" expression before using it.',1)},Dc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return[\"var\",this.name]};var ks=function(y,I,U,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=y,this.path=I,this.key=I.map(function(he){return\"[\"+he+\"]\"}).join(\"\"),this.scope=$,this.errors=ae,this.expectedType=U};ks.prototype.parse=function(y,I,U,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,U,$)._parse(y,ae):this._parse(y,ae)},ks.prototype._parse=function(y,I){(y===null||typeof y==\"string\"||typeof y==\"boolean\"||typeof y==\"number\")&&(y=[\"literal\",y]);function U(Mt,or,_r){return _r===\"assert\"?new bl(or,[Mt]):_r===\"coerce\"?new Po(or,[Mt]):Mt}if(Array.isArray(y)){if(y.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');var $=y[0];if(typeof $!=\"string\")return this.error(\"Expression name must be a string, but found \"+typeof $+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(y,this);if(!he)return null;if(this.expectedType){var Oe=this.expectedType,rt=he.type;if((Oe.kind===\"string\"||Oe.kind===\"number\"||Oe.kind===\"boolean\"||Oe.kind===\"object\"||Oe.kind===\"array\")&&rt.kind===\"value\")he=U(he,Oe,I.typeAnnotation||\"assert\");else if((Oe.kind===\"color\"||Oe.kind===\"formatted\"||Oe.kind===\"resolvedImage\")&&(rt.kind===\"value\"||rt.kind===\"string\"))he=U(he,Oe,I.typeAnnotation||\"coerce\");else if(this.checkSubtype(Oe,rt))return null}if(!(he instanceof Go)&&he.type.kind!==\"resolvedImage\"&&bc(he)){var gt=new Yo;try{he=new Go(he.type,he.evaluate(gt))}catch(Mt){return this.error(Mt.message),null}}return he}return this.error('Unknown expression \"'+$+'\". If you wanted a literal array, use [\"literal\", [...]].',0)}else return typeof y==\"undefined\"?this.error(\"'undefined' value invalid. Use null instead.\"):typeof y==\"object\"?this.error('Bare objects invalid. Use [\"literal\", {...}] instead.'):this.error(\"Expected an array, but found \"+typeof y+\" instead.\")},ks.prototype.concat=function(y,I,U){var $=typeof y==\"number\"?this.path.concat(y):this.path,ae=U?this.scope.concat(U):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(y){for(var I=[],U=arguments.length-1;U-- >0;)I[U]=arguments[U+1];var $=\"\"+this.key+I.map(function(ae){return\"[\"+ae+\"]\"}).join(\"\");this.errors.push(new Us($,y))},ks.prototype.checkSubtype=function(y,I){var U=oc(y,I);return U&&this.error(U),U};function bc(m){if(m instanceof Dc)return bc(m.boundExpression);if(m instanceof Pa&&m.name===\"error\")return!1;if(m instanceof Hu)return!1;if(m instanceof Mu)return!1;var y=m instanceof Po||m instanceof bl,I=!0;return m.eachChild(function(U){y?I=I&&bc(U):I=I&&U instanceof Go}),I?ih(m)&&Eu(m,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"]):!1}function hu(m,y){for(var I=m.length-1,U=0,$=I,ae=0,he,Oe;U<=$;)if(ae=Math.floor((U+$)/2),he=m[ae],Oe=m[ae+1],he<=y){if(ae===I||y<Oe)return ae;U=ae+1}else if(he>y)$=ae-1;else throw new gs(\"Input is not a number.\");return 0}var _u=function(y,I,U){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=U;$<ae.length;$+=1){var he=ae[$],Oe=he[0],rt=he[1];this.labels.push(Oe),this.outputs.push(rt)}};_u.parse=function(y,I){if(y.length-1<4)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if((y.length-1)%2!==0)return I.error(\"Expected an even number of arguments.\");var U=I.parse(y[1],1,aa);if(!U)return null;var $=[],ae=null;I.expectedType&&I.expectedType.kind!==\"value\"&&(ae=I.expectedType);for(var he=1;he<y.length;he+=2){var Oe=he===1?-1/0:y[he],rt=y[he+1],gt=he,Mt=he+1;if(typeof Oe!=\"number\")return I.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',gt);if($.length&&$[$.length-1][0]>=Oe)return I.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',gt);var or=I.parse(rt,Mt,ae);if(!or)return null;ae=ae||or.type,$.push([Oe,or])}return new _u(ae,U,$)},_u.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return U[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return U[ae-1].evaluate(y);var he=hu(I,$);return U[he].evaluate(y)},_u.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I<U.length;I+=1){var $=U[I];y($)}},_u.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})},_u.prototype.serialize=function(){for(var y=[\"step\",this.input.serialize()],I=0;I<this.labels.length;I++)I>0&&y.push(this.labels[I]),y.push(this.outputs[I].serialize());return y};function al(m,y,I){return m*(1-I)+y*I}function nh(m,y,I){return new fs(al(m.r,y.r,I),al(m.g,y.g,I),al(m.b,y.b,I),al(m.a,y.a,I))}function bh(m,y,I){return m.map(function(U,$){return al(U,y[$],I)})}var zu=Object.freeze({__proto__:null,number:al,color:nh,array:bh}),Fc=.95047,wc=1,bd=1.08883,_f=4/29,Lf=6/29,Ou=3*Lf*Lf,xf=Lf*Lf*Lf,jl=Math.PI/180,lf=180/Math.PI;function Vh(m){return m>xf?Math.pow(m,1/3):m/Ou+_f}function Pf(m){return m>Lf?m*m*m:Ou*(m-_f)}function Ls(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function du(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Cu(m){var y=du(m.r),I=du(m.g),U=du(m.b),$=Vh((.4124564*y+.3575761*I+.1804375*U)/Fc),ae=Vh((.2126729*y+.7151522*I+.072175*U)/wc),he=Vh((.0193339*y+.119192*I+.9503041*U)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:m.a}}function Wf(m){var y=(m.l+16)/116,I=isNaN(m.a)?y:y+m.a/500,U=isNaN(m.b)?y:y-m.b/200;return y=wc*Pf(y),I=Fc*Pf(I),U=bd*Pf(U),new fs(Ls(3.2404542*I-1.5371385*y-.4985314*U),Ls(-.969266*I+1.8760108*y+.041556*U),Ls(.0556434*I-.2040259*y+1.0572252*U),m.alpha)}function Vs(m,y,I){return{l:al(m.l,y.l,I),a:al(m.a,y.a,I),b:al(m.b,y.b,I),alpha:al(m.alpha,y.alpha,I)}}function bf(m){var y=Cu(m),I=y.l,U=y.a,$=y.b,ae=Math.atan2($,U)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(U*U+$*$),l:I,alpha:m.a}}function zc(m){var y=m.h*jl,I=m.c,U=m.l;return Wf({l:U,a:Math.cos(y)*I,b:Math.sin(y)*I,alpha:m.alpha})}function Wu(m,y,I){var U=y-m;return m+I*(U>180||U<-180?U-360*Math.round(U/360):U)}function If(m,y,I){return{h:Wu(m.h,y.h,I),c:al(m.c,y.c,I),l:al(m.l,y.l,I),alpha:al(m.alpha,y.alpha,I)}}var Xu={forward:Cu,reverse:Wf,interpolate:Vs},uf={forward:bf,reverse:zc,interpolate:If},Xf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(y,I,U,$,ae){this.type=y,this.operator=I,this.interpolation=U,this.input=$,this.labels=[],this.outputs=[];for(var he=0,Oe=ae;he<Oe.length;he+=1){var rt=Oe[he],gt=rt[0],Mt=rt[1];this.labels.push(gt),this.outputs.push(Mt)}};Wl.interpolationFactor=function(y,I,U,$){var ae=0;if(y.name===\"exponential\")ae=ah(I,y.base,U,$);else if(y.name===\"linear\")ae=ah(I,1,U,$);else if(y.name===\"cubic-bezier\"){var he=y.controlPoints,Oe=new s(he[0],he[1],he[2],he[3]);ae=Oe.solve(ah(I,1,U,$))}return ae},Wl.parse=function(y,I){var U=y[0],$=y[1],ae=y[2],he=y.slice(3);if(!Array.isArray($)||$.length===0)return I.error(\"Expected an interpolation type expression.\",1);if($[0]===\"linear\")$={name:\"linear\"};else if($[0]===\"exponential\"){var Oe=$[1];if(typeof Oe!=\"number\")return I.error(\"Exponential interpolation requires a numeric base.\",1,1);$={name:\"exponential\",base:Oe}}else if($[0]===\"cubic-bezier\"){var rt=$.slice(1);if(rt.length!==4||rt.some(function(Ti){return typeof Ti!=\"number\"||Ti<0||Ti>1}))return I.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);$={name:\"cubic-bezier\",controlPoints:rt}}else return I.error(\"Unknown interpolation type \"+String($[0]),1,0);if(y.length-1<4)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if((y.length-1)%2!==0)return I.error(\"Expected an even number of arguments.\");if(ae=I.parse(ae,2,aa),!ae)return null;var gt=[],Mt=null;U===\"interpolate-hcl\"||U===\"interpolate-lab\"?Mt=ql:I.expectedType&&I.expectedType.kind!==\"value\"&&(Mt=I.expectedType);for(var or=0;or<he.length;or+=2){var _r=he[or],vr=he[or+1],Fr=or+3,ai=or+4;if(typeof _r!=\"number\")return I.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Fr);if(gt.length&&gt[gt.length-1][0]>=_r)return I.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',Fr);var Gi=I.parse(vr,ai,Mt);if(!Gi)return null;Mt=Mt||Gi.type,gt.push([_r,Gi])}return Mt.kind!==\"number\"&&Mt.kind!==\"color\"&&!(Mt.kind===\"array\"&&Mt.itemType.kind===\"number\"&&typeof Mt.N==\"number\")?I.error(\"Type \"+qs(Mt)+\" is not interpolatable.\"):new Wl(Mt,U,$,ae,gt)},Wl.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return U[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return U[ae-1].evaluate(y);var he=hu(I,$),Oe=I[he],rt=I[he+1],gt=Wl.interpolationFactor(this.interpolation,$,Oe,rt),Mt=U[he].evaluate(y),or=U[he+1].evaluate(y);return this.operator===\"interpolate\"?zu[this.type.kind.toLowerCase()](Mt,or,gt):this.operator===\"interpolate-hcl\"?uf.reverse(uf.interpolate(uf.forward(Mt),uf.forward(or),gt)):Xu.reverse(Xu.interpolate(Xu.forward(Mt),Xu.forward(or),gt))},Wl.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I<U.length;I+=1){var $=U[I];y($)}},Wl.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})},Wl.prototype.serialize=function(){var y;this.interpolation.name===\"linear\"?y=[\"linear\"]:this.interpolation.name===\"exponential\"?this.interpolation.base===1?y=[\"linear\"]:y=[\"exponential\",this.interpolation.base]:y=[\"cubic-bezier\"].concat(this.interpolation.controlPoints);for(var I=[this.operator,y,this.input.serialize()],U=0;U<this.labels.length;U++)I.push(this.labels[U],this.outputs[U].serialize());return I};function ah(m,y,I,U){var $=U-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Zu=function(y,I){this.type=y,this.args=I};Zu.parse=function(y,I){if(y.length<2)return I.error(\"Expectected at least one argument.\");var U=null,$=I.expectedType;$&&$.kind!==\"value\"&&(U=$);for(var ae=[],he=0,Oe=y.slice(1);he<Oe.length;he+=1){var rt=Oe[he],gt=I.parse(rt,1+ae.length,U,void 0,{typeAnnotation:\"omit\"});if(!gt)return null;U=U||gt.type,ae.push(gt)}var Mt=$&&ae.some(function(or){return oc($,or.type)});return Mt?new Zu(Do,ae):new Zu(U,ae)},Zu.prototype.evaluate=function(y){for(var I=null,U=0,$,ae=0,he=this.args;ae<he.length;ae+=1){var Oe=he[ae];if(U++,I=Oe.evaluate(y),I&&I instanceof hl&&!I.available&&($||($=I.name),I=null,U===this.args.length&&(I=$)),I!==null)break}return I},Zu.prototype.eachChild=function(y){this.args.forEach(y)},Zu.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},Zu.prototype.serialize=function(){var y=[\"coalesce\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Oc=function(y,I){this.type=I.type,this.bindings=[].concat(y),this.result=I};Oc.prototype.evaluate=function(y){return this.result.evaluate(y)},Oc.prototype.eachChild=function(y){for(var I=0,U=this.bindings;I<U.length;I+=1){var $=U[I];y($[1])}y(this.result)},Oc.parse=function(y,I){if(y.length<4)return I.error(\"Expected at least 3 arguments, but found \"+(y.length-1)+\" instead.\");for(var U=[],$=1;$<y.length-1;$+=2){var ae=y[$];if(typeof ae!=\"string\")return I.error(\"Expected string, but found \"+typeof ae+\" instead.\",$);if(/[^a-zA-Z0-9_]/.test(ae))return I.error(\"Variable names must contain only alphanumeric characters or '_'.\",$);var he=I.parse(y[$+1],$+1);if(!he)return null;U.push([ae,he])}var Oe=I.parse(y[y.length-1],y.length-1,I.expectedType,U);return Oe?new Oc(U,Oe):null},Oc.prototype.outputDefined=function(){return this.result.outputDefined()},Oc.prototype.serialize=function(){for(var y=[\"let\"],I=0,U=this.bindings;I<U.length;I+=1){var $=U[I],ae=$[0],he=$[1];y.push(ae,he.serialize())}return y.push(this.result.serialize()),y};var Tc=function(y,I,U){this.type=y,this.index=I,this.input=U};Tc.parse=function(y,I){if(y.length!==3)return I.error(\"Expected 2 arguments, but found \"+(y.length-1)+\" instead.\");var U=I.parse(y[1],1,aa),$=I.parse(y[2],2,Kl(I.expectedType||Do));if(!U||!$)return null;var ae=$.type;return new Tc(ae.itemType,U,$)},Tc.prototype.evaluate=function(y){var I=this.index.evaluate(y),U=this.input.evaluate(y);if(I<0)throw new gs(\"Array index out of bounds: \"+I+\" < 0.\");if(I>=U.length)throw new gs(\"Array index out of bounds: \"+I+\" > \"+(U.length-1)+\".\");if(I!==Math.floor(I))throw new gs(\"Array index must be an integer, but found \"+I+\" instead.\");return U[I]},Tc.prototype.eachChild=function(y){y(this.index),y(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var Tl=function(y,I){this.type=qo,this.needle=y,this.haystack=I};Tl.parse=function(y,I){if(y.length!==3)return I.error(\"Expected 2 arguments, but found \"+(y.length-1)+\" instead.\");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);return!U||!$?null:Cf(U.type,[qo,Oo,aa,ac,Do])?new Tl(U,$):I.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+qs(U.type)+\" instead\")},Tl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!U)return!1;if(!sc(I,[\"boolean\",\"string\",\"number\",\"null\"]))throw new gs(\"Expected first argument to be of type boolean, string, number or null, but found \"+qs(Cs(I))+\" instead.\");if(!sc(U,[\"string\",\"array\"]))throw new gs(\"Expected second argument to be of type array or string, but found \"+qs(Cs(U))+\" instead.\");return U.indexOf(I)>=0},Tl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},Tl.prototype.outputDefined=function(){return!0},Tl.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var vu=function(y,I,U){this.type=aa,this.needle=y,this.haystack=I,this.fromIndex=U};vu.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error(\"Expected 3 or 4 arguments, but found \"+(y.length-1)+\" instead.\");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);if(!U||!$)return null;if(!Cf(U.type,[qo,Oo,aa,ac,Do]))return I.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+qs(U.type)+\" instead\");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new vu(U,$,ae):null}else return new vu(U,$)},vu.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!sc(I,[\"boolean\",\"string\",\"number\",\"null\"]))throw new gs(\"Expected first argument to be of type boolean, string, number or null, but found \"+qs(Cs(I))+\" instead.\");if(!sc(U,[\"string\",\"array\"]))throw new gs(\"Expected second argument to be of type array or string, but found \"+qs(Cs(U))+\" instead.\");if(this.fromIndex){var $=this.fromIndex.evaluate(y);return U.indexOf(I,$)}return U.indexOf(I)},vu.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var y=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),y]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var qc=function(y,I,U,$,ae,he){this.inputType=y,this.type=I,this.input=U,this.cases=$,this.outputs=ae,this.otherwise=he};qc.parse=function(y,I){if(y.length<5)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if(y.length%2!==1)return I.error(\"Expected an even number of arguments.\");var U,$;I.expectedType&&I.expectedType.kind!==\"value\"&&($=I.expectedType);for(var ae={},he=[],Oe=2;Oe<y.length-1;Oe+=2){var rt=y[Oe],gt=y[Oe+1];Array.isArray(rt)||(rt=[rt]);var Mt=I.concat(Oe);if(rt.length===0)return Mt.error(\"Expected at least one branch label.\");for(var or=0,_r=rt;or<_r.length;or+=1){var vr=_r[or];if(typeof vr!=\"number\"&&typeof vr!=\"string\")return Mt.error(\"Branch labels must be numbers or strings.\");if(typeof vr==\"number\"&&Math.abs(vr)>Number.MAX_SAFE_INTEGER)return Mt.error(\"Branch labels must be integers no larger than \"+Number.MAX_SAFE_INTEGER+\".\");if(typeof vr==\"number\"&&Math.floor(vr)!==vr)return Mt.error(\"Numeric branch labels must be integer values.\");if(!U)U=Cs(vr);else if(Mt.checkSubtype(U,Cs(vr)))return null;if(typeof ae[String(vr)]!=\"undefined\")return Mt.error(\"Branch labels must be unique.\");ae[String(vr)]=he.length}var Fr=I.parse(gt,Oe,$);if(!Fr)return null;$=$||Fr.type,he.push(Fr)}var ai=I.parse(y[1],1,Do);if(!ai)return null;var Gi=I.parse(y[y.length-1],y.length-1,$);return!Gi||ai.type.kind!==\"value\"&&I.concat(1).checkSubtype(U,ai.type)?null:new qc(U,$,ai,ae,he,Gi)},qc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=Cs(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return U.evaluate(y)},qc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},qc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},qc.prototype.serialize=function(){for(var y=this,I=[\"match\",this.input.serialize()],U=Object.keys(this.cases).sort(),$=[],ae={},he=0,Oe=U;he<Oe.length;he+=1){var rt=Oe[he],gt=ae[this.cases[rt]];gt===void 0?(ae[this.cases[rt]]=$.length,$.push([this.cases[rt],[rt]])):$[gt][1].push(rt)}for(var Mt=function(ai){return y.inputType.kind===\"number\"?Number(ai):ai},or=0,_r=$;or<_r.length;or+=1){var vr=_r[or],gt=vr[0],Fr=vr[1];Fr.length===1?I.push(Mt(Fr[0])):I.push(Fr.map(Mt)),I.push(this.outputs[outputIndex$1].serialize())}return I.push(this.otherwise.serialize()),I};var cf=function(y,I,U){this.type=y,this.branches=I,this.otherwise=U};cf.parse=function(y,I){if(y.length<4)return I.error(\"Expected at least 3 arguments, but found only \"+(y.length-1)+\".\");if(y.length%2!==0)return I.error(\"Expected an odd number of arguments.\");var U;I.expectedType&&I.expectedType.kind!==\"value\"&&(U=I.expectedType);for(var $=[],ae=1;ae<y.length-1;ae+=2){var he=I.parse(y[ae],ae,qo);if(!he)return null;var Oe=I.parse(y[ae+1],ae+1,U);if(!Oe)return null;$.push([he,Oe]),U=U||Oe.type}var rt=I.parse(y[y.length-1],y.length-1,U);return rt?new cf(U,$,rt):null},cf.prototype.evaluate=function(y){for(var I=0,U=this.branches;I<U.length;I+=1){var $=U[I],ae=$[0],he=$[1];if(ae.evaluate(y))return he.evaluate(y)}return this.otherwise.evaluate(y)},cf.prototype.eachChild=function(y){for(var I=0,U=this.branches;I<U.length;I+=1){var $=U[I],ae=$[0],he=$[1];y(ae),y(he)}y(this.otherwise)},cf.prototype.outputDefined=function(){return this.branches.every(function(y){var I=y[0],U=y[1];return U.outputDefined()})&&this.otherwise.outputDefined()},cf.prototype.serialize=function(){var y=[\"case\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var fc=function(y,I,U,$){this.type=y,this.input=I,this.beginIndex=U,this.endIndex=$};fc.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error(\"Expected 3 or 4 arguments, but found \"+(y.length-1)+\" instead.\");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,aa);if(!U||!$)return null;if(!Cf(U.type,[Kl(Do),Oo,Do]))return I.error(\"Expected first argument to be of type array or string, but found \"+qs(U.type)+\" instead\");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new fc(U.type,U,$,ae):null}else return new fc(U.type,U,$)},fc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=this.beginIndex.evaluate(y);if(!sc(I,[\"string\",\"array\"]))throw new gs(\"Expected first argument to be of type array or string, but found \"+qs(Cs(I))+\" instead.\");if(this.endIndex){var $=this.endIndex.evaluate(y);return I.slice(U,$)}return I.slice(U)},fc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var y=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),y]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};function Bc(m,y){return m===\"==\"||m===\"!=\"?y.kind===\"boolean\"||y.kind===\"string\"||y.kind===\"number\"||y.kind===\"null\"||y.kind===\"value\":y.kind===\"string\"||y.kind===\"number\"||y.kind===\"value\"}function At(m,y,I){return y===I}function Xt(m,y,I){return y!==I}function kr(m,y,I){return y<I}function Ar(m,y,I){return y>I}function Kr(m,y,I){return y<=I}function Ei(m,y,I){return y>=I}function Wi(m,y,I,U){return U.compare(y,I)===0}function hn(m,y,I,U){return!Wi(m,y,I,U)}function Tn(m,y,I,U){return U.compare(y,I)<0}function Bn(m,y,I,U){return U.compare(y,I)>0}function Zi(m,y,I,U){return U.compare(y,I)<=0}function $i(m,y,I,U){return U.compare(y,I)>=0}function an(m,y,I){var U=m!==\"==\"&&m!==\"!=\";return function(){function $(ae,he,Oe){this.type=qo,this.lhs=ae,this.rhs=he,this.collator=Oe,this.hasUntypedArgument=ae.type.kind===\"value\"||he.type.kind===\"value\"}return $.parse=function(he,Oe){if(he.length!==3&&he.length!==4)return Oe.error(\"Expected two or three arguments.\");var rt=he[0],gt=Oe.parse(he[1],1,Do);if(!gt)return null;if(!Bc(rt,gt.type))return Oe.concat(1).error('\"'+rt+`\" comparisons are not supported for type '`+qs(gt.type)+\"'.\");var Mt=Oe.parse(he[2],2,Do);if(!Mt)return null;if(!Bc(rt,Mt.type))return Oe.concat(2).error('\"'+rt+`\" comparisons are not supported for type '`+qs(Mt.type)+\"'.\");if(gt.type.kind!==Mt.type.kind&&gt.type.kind!==\"value\"&&Mt.type.kind!==\"value\")return Oe.error(\"Cannot compare types '\"+qs(gt.type)+\"' and '\"+qs(Mt.type)+\"'.\");U&&(gt.type.kind===\"value\"&&Mt.type.kind!==\"value\"?gt=new bl(Mt.type,[gt]):gt.type.kind!==\"value\"&&Mt.type.kind===\"value\"&&(Mt=new bl(gt.type,[Mt])));var or=null;if(he.length===4){if(gt.type.kind!==\"string\"&&Mt.type.kind!==\"string\"&&gt.type.kind!==\"value\"&&Mt.type.kind!==\"value\")return Oe.error(\"Cannot use collator to compare non-string types.\");if(or=Oe.parse(he[3],3,Uf),!or)return null}return new $(gt,Mt,or)},$.prototype.evaluate=function(he){var Oe=this.lhs.evaluate(he),rt=this.rhs.evaluate(he);if(U&&this.hasUntypedArgument){var gt=Cs(Oe),Mt=Cs(rt);if(gt.kind!==Mt.kind||!(gt.kind===\"string\"||gt.kind===\"number\"))throw new gs('Expected arguments for \"'+m+'\" to be (string, string) or (number, number), but found ('+gt.kind+\", \"+Mt.kind+\") instead.\")}if(this.collator&&!U&&this.hasUntypedArgument){var or=Cs(Oe),_r=Cs(rt);if(or.kind!==\"string\"||_r.kind!==\"string\")return y(he,Oe,rt)}return this.collator?I(he,Oe,rt,this.collator.evaluate(he)):y(he,Oe,rt)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[m];return this.eachChild(function(Oe){he.push(Oe.serialize())}),he},$}()}var Di=an(\"==\",At,Wi),$n=an(\"!=\",Xt,hn),ka=an(\"<\",kr,Tn),Ra=an(\">\",Ar,Bn),La=an(\"<=\",Kr,Zi),Na=an(\">=\",Ei,$i),Yn=function(y,I,U,$,ae){this.type=Oo,this.number=y,this.locale=I,this.currency=U,this.minFractionDigits=$,this.maxFractionDigits=ae};Yn.parse=function(y,I){if(y.length!==3)return I.error(\"Expected two arguments.\");var U=I.parse(y[1],1,aa);if(!U)return null;var $=y[2];if(typeof $!=\"object\"||Array.isArray($))return I.error(\"NumberFormat options argument must be an object.\");var ae=null;if($.locale&&(ae=I.parse($.locale,1,Oo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,Oo),!he))return null;var Oe=null;if($[\"min-fraction-digits\"]&&(Oe=I.parse($[\"min-fraction-digits\"],1,aa),!Oe))return null;var rt=null;return $[\"max-fraction-digits\"]&&(rt=I.parse($[\"max-fraction-digits\"],1,aa),!rt)?null:new Yn(U,ae,he,Oe,rt)},Yn.prototype.evaluate=function(y){return new Intl.NumberFormat(this.locale?this.locale.evaluate(y):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(y):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(y):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(y):void 0}).format(this.number.evaluate(y))},Yn.prototype.eachChild=function(y){y(this.number),this.locale&&y(this.locale),this.currency&&y(this.currency),this.minFractionDigits&&y(this.minFractionDigits),this.maxFractionDigits&&y(this.maxFractionDigits)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var y={};return this.locale&&(y.locale=this.locale.serialize()),this.currency&&(y.currency=this.currency.serialize()),this.minFractionDigits&&(y[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(y[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),y]};var zn=function(y){this.type=aa,this.input=y};zn.parse=function(y,I){if(y.length!==2)return I.error(\"Expected 1 argument, but found \"+(y.length-1)+\" instead.\");var U=I.parse(y[1],1);return U?U.type.kind!==\"array\"&&U.type.kind!==\"string\"&&U.type.kind!==\"value\"?I.error(\"Expected argument of type string or array, but found \"+qs(U.type)+\" instead.\"):new zn(U):null},zn.prototype.evaluate=function(y){var I=this.input.evaluate(y);if(typeof I==\"string\")return I.length;if(Array.isArray(I))return I.length;throw new gs(\"Expected value to be of type string or array, but found \"+qs(Cs(I))+\" instead.\")},zn.prototype.eachChild=function(y){y(this.input)},zn.prototype.outputDefined=function(){return!1},zn.prototype.serialize=function(){var y=[\"length\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ka={\"==\":Di,\"!=\":$n,\">\":Ra,\"<\":ka,\">=\":Na,\"<=\":La,array:bl,at:Tc,boolean:bl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:Bs,in:Tl,\"index-of\":vu,interpolate:Wl,\"interpolate-hcl\":Wl,\"interpolate-lab\":Wl,length:zn,let:Oc,literal:Go,match:qc,number:bl,\"number-format\":Yn,object:bl,slice:fc,step:_u,string:bl,\"to-boolean\":Po,\"to-color\":Po,\"to-number\":Po,\"to-string\":Po,var:Dc,within:Mu};function bo(m,y){var I=y[0],U=y[1],$=y[2],ae=y[3];I=I.evaluate(m),U=U.evaluate(m),$=$.evaluate(m);var he=ae?ae.evaluate(m):1,Oe=lc(I,U,$,he);if(Oe)throw new gs(Oe);return new fs(I/255*he,U/255*he,$/255*he,he)}function Xo(m,y){return m in y}function Ms(m,y){var I=y[m];return typeof I==\"undefined\"?null:I}function os(m,y,I,U){for(;I<=U;){var $=I+U>>1;if(y[$]===m)return!0;y[$]>m?U=$-1:I=$+1}return!1}function Ts(m){return{type:m}}Pa.register(Ka,{error:[rf,[Oo],function(m,y){var I=y[0];throw new gs(I.evaluate(m))}],typeof:[Oo,[Do],function(m,y){var I=y[0];return qs(Cs(I.evaluate(m)))}],\"to-rgba\":[Kl(aa,4),[ql],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[ql,[aa,aa,aa],bo],rgba:[ql,[aa,aa,aa,aa],bo],has:{type:qo,overloads:[[[Oo],function(m,y){var I=y[0];return Xo(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],U=y[1];return Xo(I.evaluate(m),U.evaluate(m))}]]},get:{type:Do,overloads:[[[Oo],function(m,y){var I=y[0];return Ms(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],U=y[1];return Ms(I.evaluate(m),U.evaluate(m))}]]},\"feature-state\":[Do,[Oo],function(m,y){var I=y[0];return Ms(I.evaluate(m),m.featureState||{})}],properties:[Pc,[],function(m){return m.properties()}],\"geometry-type\":[Oo,[],function(m){return m.geometryType()}],id:[Do,[],function(m){return m.id()}],zoom:[aa,[],function(m){return m.globals.zoom}],\"heatmap-density\":[aa,[],function(m){return m.globals.heatmapDensity||0}],\"line-progress\":[aa,[],function(m){return m.globals.lineProgress||0}],accumulated:[Do,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],\"+\":[aa,Ts(aa),function(m,y){for(var I=0,U=0,$=y;U<$.length;U+=1){var ae=$[U];I+=ae.evaluate(m)}return I}],\"*\":[aa,Ts(aa),function(m,y){for(var I=1,U=0,$=y;U<$.length;U+=1){var ae=$[U];I*=ae.evaluate(m)}return I}],\"-\":{type:aa,overloads:[[[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)-U.evaluate(m)}],[[aa],function(m,y){var I=y[0];return-I.evaluate(m)}]]},\"/\":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)/U.evaluate(m)}],\"%\":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)%U.evaluate(m)}],ln2:[aa,[],function(){return Math.LN2}],pi:[aa,[],function(){return Math.PI}],e:[aa,[],function(){return Math.E}],\"^\":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return Math.pow(I.evaluate(m),U.evaluate(m))}],sqrt:[aa,[aa],function(m,y){var I=y[0];return Math.sqrt(I.evaluate(m))}],log10:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN10}],ln:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))}],log2:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN2}],sin:[aa,[aa],function(m,y){var I=y[0];return Math.sin(I.evaluate(m))}],cos:[aa,[aa],function(m,y){var I=y[0];return Math.cos(I.evaluate(m))}],tan:[aa,[aa],function(m,y){var I=y[0];return Math.tan(I.evaluate(m))}],asin:[aa,[aa],function(m,y){var I=y[0];return Math.asin(I.evaluate(m))}],acos:[aa,[aa],function(m,y){var I=y[0];return Math.acos(I.evaluate(m))}],atan:[aa,[aa],function(m,y){var I=y[0];return Math.atan(I.evaluate(m))}],min:[aa,Ts(aa),function(m,y){return Math.min.apply(Math,y.map(function(I){return I.evaluate(m)}))}],max:[aa,Ts(aa),function(m,y){return Math.max.apply(Math,y.map(function(I){return I.evaluate(m)}))}],abs:[aa,[aa],function(m,y){var I=y[0];return Math.abs(I.evaluate(m))}],round:[aa,[aa],function(m,y){var I=y[0],U=I.evaluate(m);return U<0?-Math.round(-U):Math.round(U)}],floor:[aa,[aa],function(m,y){var I=y[0];return Math.floor(I.evaluate(m))}],ceil:[aa,[aa],function(m,y){var I=y[0];return Math.ceil(I.evaluate(m))}],\"filter-==\":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1];return m.properties()[I.value]===U.value}],\"filter-id-==\":[qo,[Do],function(m,y){var I=y[0];return m.id()===I.value}],\"filter-type-==\":[qo,[Oo],function(m,y){var I=y[0];return m.geometryType()===I.value}],\"filter-<\":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$<ae}],\"filter-id-<\":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U<$}],\"filter->\":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$>ae}],\"filter-id->\":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U>$}],\"filter-<=\":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$<=ae}],\"filter-id-<=\":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U<=$}],\"filter->=\":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$>=ae}],\"filter-id->=\":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U>=$}],\"filter-has\":[qo,[Do],function(m,y){var I=y[0];return I.value in m.properties()}],\"filter-has-id\":[qo,[],function(m){return m.id()!==null&&m.id()!==void 0}],\"filter-type-in\":[qo,[Kl(Oo)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],\"filter-id-in\":[qo,[Kl(Do)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],\"filter-in-small\":[qo,[Oo,Kl(Do)],function(m,y){var I=y[0],U=y[1];return U.value.indexOf(m.properties()[I.value])>=0}],\"filter-in-large\":[qo,[Oo,Kl(Do)],function(m,y){var I=y[0],U=y[1];return os(m.properties()[I.value],U.value,0,U.value.length-1)}],all:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)&&U.evaluate(m)}],[Ts(qo),function(m,y){for(var I=0,U=y;I<U.length;I+=1){var $=U[I];if(!$.evaluate(m))return!1}return!0}]]},any:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)||U.evaluate(m)}],[Ts(qo),function(m,y){for(var I=0,U=y;I<U.length;I+=1){var $=U[I];if($.evaluate(m))return!0}return!1}]]},\"!\":[qo,[qo],function(m,y){var I=y[0];return!I.evaluate(m)}],\"is-supported-script\":[qo,[Oo],function(m,y){var I=y[0],U=m.globals&&m.globals.isSupportedScript;return U?U(I.evaluate(m)):!0}],upcase:[Oo,[Oo],function(m,y){var I=y[0];return I.evaluate(m).toUpperCase()}],downcase:[Oo,[Oo],function(m,y){var I=y[0];return I.evaluate(m).toLowerCase()}],concat:[Oo,Ts(Do),function(m,y){return y.map(function(I){return js(I.evaluate(m))}).join(\"\")}],\"resolved-locale\":[Oo,[Uf],function(m,y){var I=y[0];return I.evaluate(m).resolvedLocale()}]});function Ho(m){return{result:\"success\",value:m}}function yl(m){return{result:\"error\",value:m}}function Xs(m){return m[\"property-type\"]===\"data-driven\"||m[\"property-type\"]===\"cross-faded-data-driven\"}function Ps(m){return!!m.expression&&m.expression.parameters.indexOf(\"zoom\")>-1}function va(m){return!!m.expression&&m.expression.interpolated}function no(m){return m instanceof Number?\"number\":m instanceof String?\"string\":m instanceof Boolean?\"boolean\":Array.isArray(m)?\"array\":m===null?\"null\":typeof m}function _s(m){return typeof m==\"object\"&&m!==null&&!Array.isArray(m)}function is(m){return m}function $l(m,y){var I=y.type===\"color\",U=m.stops&&typeof m.stops[0][0]==\"object\",$=U||m.property!==void 0,ae=U||!$,he=m.type||(va(y)?\"exponential\":\"interval\");if(I&&(m=Ol({},m),m.stops&&(m.stops=m.stops.map(function(ha){return[ha[0],fs.parse(ha[1])]})),m.default?m.default=fs.parse(m.default):m.default=fs.parse(y.default)),m.colorSpace&&m.colorSpace!==\"rgb\"&&!Xf[m.colorSpace])throw new Error(\"Unknown color space: \"+m.colorSpace);var Oe,rt,gt;if(he===\"exponential\")Oe=pu;else if(he===\"interval\")Oe=Nc;else if(he===\"categorical\"){Oe=Yu,rt=Object.create(null);for(var Mt=0,or=m.stops;Mt<or.length;Mt+=1){var _r=or[Mt];rt[_r[0]]=_r[1]}gt=typeof m.stops[0][0]}else if(he===\"identity\")Oe=Uc;else throw new Error('Unknown function type \"'+he+'\"');if(U){for(var vr={},Fr=[],ai=0;ai<m.stops.length;ai++){var Gi=m.stops[ai],Ti=Gi[0].zoom;vr[Ti]===void 0&&(vr[Ti]={zoom:Ti,type:m.type,property:m.property,default:m.default,stops:[]},Fr.push(Ti)),vr[Ti].stops.push([Gi[0].value,Gi[1]])}for(var bn=[],rn=0,xn=Fr;rn<xn.length;rn+=1){var Dn=xn[rn];bn.push([vr[Dn].zoom,$l(vr[Dn],y)])}var Zn={name:\"linear\"};return{kind:\"composite\",interpolationType:Zn,interpolationFactor:Wl.interpolationFactor.bind(void 0,Zn),zoomStops:bn.map(function(ha){return ha[0]}),evaluate:function(eo,za){var Za=eo.zoom;return pu({stops:bn,base:m.base},y,Za).evaluate(Za,za)}}}else if(ae){var ga=he===\"exponential\"?{name:\"exponential\",base:m.base!==void 0?m.base:1}:null;return{kind:\"camera\",interpolationType:ga,interpolationFactor:Wl.interpolationFactor.bind(void 0,ga),zoomStops:m.stops.map(function(ha){return ha[0]}),evaluate:function(ha){var eo=ha.zoom;return Oe(m,y,eo,rt,gt)}}}else return{kind:\"source\",evaluate:function(eo,za){var Za=za&&za.properties?za.properties[m.property]:void 0;return Za===void 0?ku(m.default,y.default):Oe(m,y,Za,rt,gt)}}}function ku(m,y,I){if(m!==void 0)return m;if(y!==void 0)return y;if(I!==void 0)return I}function Yu(m,y,I,U,$){var ae=typeof I===$?U[I]:void 0;return ku(ae,m.default,y.default)}function Nc(m,y,I){if(no(I)!==\"number\")return ku(m.default,y.default);var U=m.stops.length;if(U===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[U-1][0])return m.stops[U-1][1];var $=hu(m.stops.map(function(ae){return ae[0]}),I);return m.stops[$][1]}function pu(m,y,I){var U=m.base!==void 0?m.base:1;if(no(I)!==\"number\")return ku(m.default,y.default);var $=m.stops.length;if($===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[$-1][0])return m.stops[$-1][1];var ae=hu(m.stops.map(function(or){return or[0]}),I),he=xu(I,U,m.stops[ae][0],m.stops[ae+1][0]),Oe=m.stops[ae][1],rt=m.stops[ae+1][1],gt=zu[y.type]||is;if(m.colorSpace&&m.colorSpace!==\"rgb\"){var Mt=Xf[m.colorSpace];gt=function(or,_r){return Mt.reverse(Mt.interpolate(Mt.forward(or),Mt.forward(_r),he))}}return typeof Oe.evaluate==\"function\"?{evaluate:function(){for(var _r=[],vr=arguments.length;vr--;)_r[vr]=arguments[vr];var Fr=Oe.evaluate.apply(void 0,_r),ai=rt.evaluate.apply(void 0,_r);if(!(Fr===void 0||ai===void 0))return gt(Fr,ai,he)}}:gt(Oe,rt,he)}function Uc(m,y,I){return y.type===\"color\"?I=fs.parse(I):y.type===\"formatted\"?I=Jl.fromString(I.toString()):y.type===\"resolvedImage\"?I=hl.fromString(I.toString()):no(I)!==y.type&&(y.type!==\"enum\"||!y.values[I])&&(I=void 0),ku(I,m.default,y.default)}function xu(m,y,I,U){var $=U-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Ac=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new Yo,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type===\"enum\"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=U,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(y,I,U,$,ae,he){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=U||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var Oe=this.expression.evaluate(this._evaluator);if(Oe==null||typeof Oe==\"number\"&&Oe!==Oe)return this._defaultValue;if(this._enumValues&&!(Oe in this._enumValues))throw new gs(\"Expected value to be one of \"+Object.keys(this._enumValues).map(function(rt){return JSON.stringify(rt)}).join(\", \")+\", but found \"+JSON.stringify(Oe)+\" instead.\");return Oe}catch(rt){return this._warningHistory[rt.message]||(this._warningHistory[rt.message]=!0,typeof console!=\"undefined\"&&console.warn(rt.message)),this._defaultValue}};function Ua(m){return Array.isArray(m)&&m.length>0&&typeof m[0]==\"string\"&&m[0]in Ka}function oo(m,y){var I=new ks(Ka,[],y?Q(y):void 0),U=I.parse(m,void 0,void 0,void 0,y&&y.type===\"string\"?{typeAnnotation:\"coerce\"}:void 0);return U?Ho(new Ac(U,y)):yl(I.errors)}var Vc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!==\"constant\"&&!Ws(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,$,ae,he)},Vc.prototype.evaluate=function(y,I,U,$,ae,he){return this._styleExpression.evaluate(y,I,U,$,ae,he)};var hc=function(y,I,U,$){this.kind=y,this.zoomStops=U,this._styleExpression=I,this.isStateDependent=y!==\"camera\"&&!Ws(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,$,ae,he)},hc.prototype.evaluate=function(y,I,U,$,ae,he){return this._styleExpression.evaluate(y,I,U,$,ae,he)},hc.prototype.interpolationFactor=function(y,I,U){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,y,I,U):0};function Ku(m,y){if(m=oo(m,y),m.result===\"error\")return m;var I=m.value.expression,U=ih(I);if(!U&&!Xs(y))return yl([new Us(\"\",\"data expressions not supported\")]);var $=Eu(I,[\"zoom\"]);if(!$&&!Ps(y))return yl([new Us(\"\",\"zoom expressions not supported\")]);var ae=B(I);if(!ae&&!$)return yl([new Us(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);if(ae instanceof Us)return yl([ae]);if(ae instanceof Wl&&!va(y))return yl([new Us(\"\",'\"interpolate\" expressions cannot be used with this property')]);if(!ae)return Ho(U?new Vc(\"constant\",m.value):new Vc(\"source\",m.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(U?new hc(\"camera\",m.value,ae.labels,he):new hc(\"composite\",m.value,ae.labels,he))}var ue=function(y,I){this._parameters=y,this._specification=I,Ol(this,$l(this._parameters,this._specification))};ue.deserialize=function(y){return new ue(y._parameters,y._specification)},ue.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(_s(m))return new ue(m,y);if(Ua(m)){var I=Ku(m,y);if(I.result===\"error\")throw new Error(I.value.map(function($){return $.key+\": \"+$.message}).join(\", \"));return I.value}else{var U=m;return typeof m==\"string\"&&y.type===\"color\"&&(U=fs.parse(m)),{kind:\"constant\",evaluate:function(){return U}}}}function B(m){var y=null;if(m instanceof Oc)y=B(m.result);else if(m instanceof Zu)for(var I=0,U=m.args;I<U.length;I+=1){var $=U[I];if(y=B($),y)break}else(m instanceof _u||m instanceof Wl)&&m.input instanceof Pa&&m.input.name===\"zoom\"&&(y=m);return y instanceof Us||m.eachChild(function(ae){var he=B(ae);he instanceof Us?y=he:!y&&he?y=new Us(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):y&&he&&y!==he&&(y=new Us(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'))}),y}function Q(m){var y={color:ql,string:Oo,number:aa,enum:Oo,boolean:qo,formatted:ml,resolvedImage:Zc};return m.type===\"array\"?Kl(y[m.value]||Do,m.length):y[m.type]}function ee(m){return m.type===\"color\"&&_s(m.default)?new fs(0,0,0,0):m.type===\"color\"?fs.parse(m.default)||null:m.default===void 0?null:m.default}function le(m){var y=m.key,I=m.value,U=m.valueSpec||{},$=m.objectElementValidators||{},ae=m.style,he=m.styleSpec,Oe=[],rt=no(I);if(rt!==\"object\")return[new _a(y,I,\"object expected, \"+rt+\" found\")];for(var gt in I){var Mt=gt.split(\".\")[0],or=U[Mt]||U[\"*\"],_r=void 0;if($[Mt])_r=$[Mt];else if(U[Mt])_r=Qa;else if($[\"*\"])_r=$[\"*\"];else if(U[\"*\"])_r=Qa;else{Oe.push(new _a(y,I[gt],'unknown property \"'+gt+'\"'));continue}Oe=Oe.concat(_r({key:(y&&y+\".\")+gt,value:I[gt],valueSpec:or,style:ae,styleSpec:he,object:I,objectKey:gt},I))}for(var vr in U)$[vr]||U[vr].required&&U[vr].default===void 0&&I[vr]===void 0&&Oe.push(new _a(y,I,'missing required property \"'+vr+'\"'));return Oe}function qe(m){var y=m.value,I=m.valueSpec,U=m.style,$=m.styleSpec,ae=m.key,he=m.arrayElementValidator||Qa;if(no(y)!==\"array\")return[new _a(ae,y,\"array expected, \"+no(y)+\" found\")];if(I.length&&y.length!==I.length)return[new _a(ae,y,\"array length \"+I.length+\" expected, length \"+y.length+\" found\")];if(I[\"min-length\"]&&y.length<I[\"min-length\"])return[new _a(ae,y,\"array length at least \"+I[\"min-length\"]+\" expected, length \"+y.length+\" found\")];var Oe={type:I.value,values:I.values};$.$version<7&&(Oe.function=I.function),no(I.value)===\"object\"&&(Oe=I.value);for(var rt=[],gt=0;gt<y.length;gt++)rt=rt.concat(he({array:y,arrayIndex:gt,value:y[gt],valueSpec:Oe,style:U,styleSpec:$,key:ae+\"[\"+gt+\"]\"}));return rt}function Xe(m){var y=m.key,I=m.value,U=m.valueSpec,$=no(I);return $===\"number\"&&I!==I&&($=\"NaN\"),$!==\"number\"?[new _a(y,I,\"number expected, \"+$+\" found\")]:\"minimum\"in U&&I<U.minimum?[new _a(y,I,I+\" is less than the minimum value \"+U.minimum)]:\"maximum\"in U&&I>U.maximum?[new _a(y,I,I+\" is greater than the maximum value \"+U.maximum)]:[]}function ot(m){var y=m.valueSpec,I=xo(m.value.type),U,$={},ae,he,Oe=I!==\"categorical\"&&m.value.property===void 0,rt=!Oe,gt=no(m.value.stops)===\"array\"&&no(m.value.stops[0])===\"array\"&&no(m.value.stops[0][0])===\"object\",Mt=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:or,default:Fr}});return I===\"identity\"&&Oe&&Mt.push(new _a(m.key,m.value,'missing required property \"property\"')),I!==\"identity\"&&!m.value.stops&&Mt.push(new _a(m.key,m.value,'missing required property \"stops\"')),I===\"exponential\"&&m.valueSpec.expression&&!va(m.valueSpec)&&Mt.push(new _a(m.key,m.value,\"exponential functions not supported\")),m.styleSpec.$version>=8&&(rt&&!Xs(m.valueSpec)?Mt.push(new _a(m.key,m.value,\"property functions not supported\")):Oe&&!Ps(m.valueSpec)&&Mt.push(new _a(m.key,m.value,\"zoom functions not supported\"))),(I===\"categorical\"||gt)&&m.value.property===void 0&&Mt.push(new _a(m.key,m.value,'\"property\" property is required')),Mt;function or(ai){if(I===\"identity\")return[new _a(ai.key,ai.value,'identity function may not have a \"stops\" property')];var Gi=[],Ti=ai.value;return Gi=Gi.concat(qe({key:ai.key,value:Ti,valueSpec:ai.valueSpec,style:ai.style,styleSpec:ai.styleSpec,arrayElementValidator:_r})),no(Ti)===\"array\"&&Ti.length===0&&Gi.push(new _a(ai.key,Ti,\"array must have at least one stop\")),Gi}function _r(ai){var Gi=[],Ti=ai.value,bn=ai.key;if(no(Ti)!==\"array\")return[new _a(bn,Ti,\"array expected, \"+no(Ti)+\" found\")];if(Ti.length!==2)return[new _a(bn,Ti,\"array length 2 expected, length \"+Ti.length+\" found\")];if(gt){if(no(Ti[0])!==\"object\")return[new _a(bn,Ti,\"object expected, \"+no(Ti[0])+\" found\")];if(Ti[0].zoom===void 0)return[new _a(bn,Ti,\"object stop key must have zoom\")];if(Ti[0].value===void 0)return[new _a(bn,Ti,\"object stop key must have value\")];if(he&&he>xo(Ti[0].zoom))return[new _a(bn,Ti[0].zoom,\"stop zoom values must appear in ascending order\")];xo(Ti[0].zoom)!==he&&(he=xo(Ti[0].zoom),ae=void 0,$={}),Gi=Gi.concat(le({key:bn+\"[0]\",value:Ti[0],valueSpec:{zoom:{}},style:ai.style,styleSpec:ai.styleSpec,objectElementValidators:{zoom:Xe,value:vr}}))}else Gi=Gi.concat(vr({key:bn+\"[0]\",value:Ti[0],valueSpec:{},style:ai.style,styleSpec:ai.styleSpec},Ti));return Ua(Yl(Ti[1]))?Gi.concat([new _a(bn+\"[1]\",Ti[1],\"expressions are not allowed in function stops.\")]):Gi.concat(Qa({key:bn+\"[1]\",value:Ti[1],valueSpec:y,style:ai.style,styleSpec:ai.styleSpec}))}function vr(ai,Gi){var Ti=no(ai.value),bn=xo(ai.value),rn=ai.value!==null?ai.value:Gi;if(!U)U=Ti;else if(Ti!==U)return[new _a(ai.key,rn,Ti+\" stop domain type must match previous stop domain type \"+U)];if(Ti!==\"number\"&&Ti!==\"string\"&&Ti!==\"boolean\")return[new _a(ai.key,rn,\"stop domain value must be a number, string, or boolean\")];if(Ti!==\"number\"&&I!==\"categorical\"){var xn=\"number expected, \"+Ti+\" found\";return Xs(y)&&I===void 0&&(xn+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new _a(ai.key,rn,xn)]}return I===\"categorical\"&&Ti===\"number\"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(ai.key,rn,\"integer expected, found \"+bn)]:I!==\"categorical\"&&Ti===\"number\"&&ae!==void 0&&bn<ae?[new _a(ai.key,rn,\"stop domain values must appear in ascending order\")]:(ae=bn,I===\"categorical\"&&bn in $?[new _a(ai.key,rn,\"stop domain values must be unique\")]:($[bn]=!0,[]))}function Fr(ai){return Qa({key:ai.key,value:ai.value,valueSpec:y,style:ai.style,styleSpec:ai.styleSpec})}}function Tt(m){var y=(m.expressionContext===\"property\"?Ku:oo)(Yl(m.value),m.valueSpec);if(y.result===\"error\")return y.value.map(function(U){return new _a(\"\"+m.key+U.key,m.value,U.message)});var I=y.value.expression||y.value._styleExpression.expression;if(m.expressionContext===\"property\"&&m.propertyKey===\"text-font\"&&!I.outputDefined())return[new _a(m.key,m.value,'Invalid data expression for \"'+m.propertyKey+'\". Output values must be contained as literals within the expression.')];if(m.expressionContext===\"property\"&&m.propertyType===\"layout\"&&!Ws(I))return[new _a(m.key,m.value,'\"feature-state\" data expressions are not supported with layout properties.')];if(m.expressionContext===\"filter\"&&!Ws(I))return[new _a(m.key,m.value,'\"feature-state\" data expressions are not supported with filters.')];if(m.expressionContext&&m.expressionContext.indexOf(\"cluster\")===0){if(!Eu(I,[\"zoom\",\"feature-state\"]))return[new _a(m.key,m.value,'\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];if(m.expressionContext===\"cluster-initial\"&&!ih(I))return[new _a(m.key,m.value,\"Feature data expressions are not supported with initial expression part of cluster properties.\")]}return[]}function Kt(m){var y=m.value,I=m.key,U=no(y);return U!==\"boolean\"?[new _a(I,y,\"boolean expected, \"+U+\" found\")]:[]}function Jt(m){var y=m.key,I=m.value,U=no(I);return U!==\"string\"?[new _a(y,I,\"color expected, \"+U+\" found\")]:kf(I)===null?[new _a(y,I,'color expected, \"'+I+'\" found')]:[]}function xr(m){var y=m.key,I=m.value,U=m.valueSpec,$=[];return Array.isArray(U.values)?U.values.indexOf(xo(I))===-1&&$.push(new _a(y,I,\"expected one of [\"+U.values.join(\", \")+\"], \"+JSON.stringify(I)+\" found\")):Object.keys(U.values).indexOf(xo(I))===-1&&$.push(new _a(y,I,\"expected one of [\"+Object.keys(U.values).join(\", \")+\"], \"+JSON.stringify(I)+\" found\")),$}function Pr(m){if(m===!0||m===!1)return!0;if(!Array.isArray(m)||m.length===0)return!1;switch(m[0]){case\"has\":return m.length>=2&&m[1]!==\"$id\"&&m[1]!==\"$type\";case\"in\":return m.length>=3&&(typeof m[1]!=\"string\"||Array.isArray(m[2]));case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case\"any\":case\"all\":for(var y=0,I=m.slice(1);y<I.length;y+=1){var U=I[y];if(!Pr(U)&&typeof U!=\"boolean\")return!1}return!0;default:return!0}}var ve={type:\"boolean\",default:!1,transition:!1,\"property-type\":\"data-driven\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]}};function be(m){if(m==null)return{filter:function(){return!0},needGeometry:!1};Pr(m)||(m=tt(m));var y=oo(m,ve);if(y.result===\"error\")throw new Error(y.value.map(function(U){return U.key+\": \"+U.message}).join(\", \"));var I=Be(m);return{filter:function(U,$,ae){return y.value.evaluate(U,$,{},ae)},needGeometry:I}}function Re(m,y){return m<y?-1:m>y?1:0}function Be(m){if(!Array.isArray(m))return!1;if(m[0]===\"within\")return!0;for(var y=1;y<m.length;y++)if(Be(m[y]))return!0;return!1}function tt(m){if(!m)return!0;var y=m[0];if(m.length<=1)return y!==\"any\";var I=y===\"==\"?We(m[1],m[2],\"==\"):y===\"!=\"?rr(We(m[1],m[2],\"==\")):y===\"<\"||y===\">\"||y===\"<=\"||y===\">=\"?We(m[1],m[2],y):y===\"any\"?it(m.slice(1)):y===\"all\"?[\"all\"].concat(m.slice(1).map(tt)):y===\"none\"?[\"all\"].concat(m.slice(1).map(tt).map(rr)):y===\"in\"?Dt(m[1],m.slice(2)):y===\"!in\"?rr(Dt(m[1],m.slice(2))):y===\"has\"?Ht(m[1]):y===\"!has\"?rr(Ht(m[1])):y===\"within\"?m:!0;return I}function We(m,y,I){switch(m){case\"$type\":return[\"filter-type-\"+I,y];case\"$id\":return[\"filter-id-\"+I,y];default:return[\"filter-\"+I,m,y]}}function it(m){return[\"any\"].concat(m.map(tt))}function Dt(m,y){if(y.length===0)return!1;switch(m){case\"$type\":return[\"filter-type-in\",[\"literal\",y]];case\"$id\":return[\"filter-id-in\",[\"literal\",y]];default:return y.length>200&&!y.some(function(I){return typeof I!=typeof y[0]})?[\"filter-in-large\",m,[\"literal\",y.sort(Re)]]:[\"filter-in-small\",m,[\"literal\",y]]}}function Ht(m){switch(m){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",m]}}function rr(m){return[\"!\",m]}function dr(m){return Pr(Yl(m.value))?Tt(Ol({},m,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):Sr(m)}function Sr(m){var y=m.value,I=m.key;if(no(y)!==\"array\")return[new _a(I,y,\"array expected, \"+no(y)+\" found\")];var U=m.styleSpec,$,ae=[];if(y.length<1)return[new _a(I,y,\"filter array must have at least 1 element\")];switch(ae=ae.concat(xr({key:I+\"[0]\",value:y[0],valueSpec:U.filter_operator,style:m.style,styleSpec:m.styleSpec})),xo(y[0])){case\"<\":case\"<=\":case\">\":case\">=\":y.length>=2&&xo(y[1])===\"$type\"&&ae.push(new _a(I,y,'\"$type\" cannot be use with operator \"'+y[0]+'\"'));case\"==\":case\"!=\":y.length!==3&&ae.push(new _a(I,y,'filter array for operator \"'+y[0]+'\" must have 3 elements'));case\"in\":case\"!in\":y.length>=2&&($=no(y[1]),$!==\"string\"&&ae.push(new _a(I+\"[1]\",y[1],\"string expected, \"+$+\" found\")));for(var he=2;he<y.length;he++)$=no(y[he]),xo(y[1])===\"$type\"?ae=ae.concat(xr({key:I+\"[\"+he+\"]\",value:y[he],valueSpec:U.geometry_type,style:m.style,styleSpec:m.styleSpec})):$!==\"string\"&&$!==\"number\"&&$!==\"boolean\"&&ae.push(new _a(I+\"[\"+he+\"]\",y[he],\"string, number, or boolean expected, \"+$+\" found\"));break;case\"any\":case\"all\":case\"none\":for(var Oe=1;Oe<y.length;Oe++)ae=ae.concat(Sr({key:I+\"[\"+Oe+\"]\",value:y[Oe],style:m.style,styleSpec:m.styleSpec}));break;case\"has\":case\"!has\":$=no(y[1]),y.length!==2?ae.push(new _a(I,y,'filter array for \"'+y[0]+'\" operator must have 2 elements')):$!==\"string\"&&ae.push(new _a(I+\"[1]\",y[1],\"string expected, \"+$+\" found\"));break;case\"within\":$=no(y[1]),y.length!==2?ae.push(new _a(I,y,'filter array for \"'+y[0]+'\" operator must have 2 elements')):$!==\"object\"&&ae.push(new _a(I+\"[1]\",y[1],\"object expected, \"+$+\" found\"));break}return ae}function Or(m,y){var I=m.key,U=m.style,$=m.styleSpec,ae=m.value,he=m.objectKey,Oe=$[y+\"_\"+m.layerType];if(!Oe)return[];var rt=he.match(/^(.*)-transition$/);if(y===\"paint\"&&rt&&Oe[rt[1]]&&Oe[rt[1]].transition)return Qa({key:I,value:ae,valueSpec:$.transition,style:U,styleSpec:$});var gt=m.valueSpec||Oe[he];if(!gt)return[new _a(I,ae,'unknown property \"'+he+'\"')];var Mt;if(no(ae)===\"string\"&&Xs(gt)&&!gt.tokens&&(Mt=/^{([^}]+)}$/.exec(ae)))return[new _a(I,ae,'\"'+he+'\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": '+JSON.stringify(Mt[1])+\" }`.\")];var or=[];return m.layerType===\"symbol\"&&(he===\"text-field\"&&U&&!U.glyphs&&or.push(new _a(I,ae,'use of \"text-field\" requires a style \"glyphs\" property')),he===\"text-font\"&&_s(Yl(ae))&&xo(ae.type)===\"identity\"&&or.push(new _a(I,ae,'\"text-font\" does not support identity functions'))),or.concat(Qa({key:m.key,value:ae,valueSpec:gt,style:U,styleSpec:$,expressionContext:\"property\",propertyType:y,propertyKey:he}))}function jr(m){return Or(m,\"paint\")}function ii(m){return Or(m,\"layout\")}function Li(m){var y=[],I=m.value,U=m.key,$=m.style,ae=m.styleSpec;!I.type&&!I.ref&&y.push(new _a(U,I,'either \"type\" or \"ref\" is required'));var he=xo(I.type),Oe=xo(I.ref);if(I.id)for(var rt=xo(I.id),gt=0;gt<m.arrayIndex;gt++){var Mt=$.layers[gt];xo(Mt.id)===rt&&y.push(new _a(U,I.id,'duplicate layer id \"'+I.id+'\", previously used at line '+Mt.id.__line__))}if(\"ref\"in I){[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(function(Fr){Fr in I&&y.push(new _a(U,I[Fr],'\"'+Fr+'\" is prohibited for ref layers'))});var or;$.layers.forEach(function(Fr){xo(Fr.id)===Oe&&(or=Fr)}),or?or.ref?y.push(new _a(U,I.ref,\"ref cannot reference another ref layer\")):he=xo(or.type):y.push(new _a(U,I.ref,'ref layer \"'+Oe+'\" not found'))}else if(he!==\"background\")if(!I.source)y.push(new _a(U,I,'missing required property \"source\"'));else{var _r=$.sources&&$.sources[I.source],vr=_r&&xo(_r.type);_r?vr===\"vector\"&&he===\"raster\"?y.push(new _a(U,I.source,'layer \"'+I.id+'\" requires a raster source')):vr===\"raster\"&&he!==\"raster\"?y.push(new _a(U,I.source,'layer \"'+I.id+'\" requires a vector source')):vr===\"vector\"&&!I[\"source-layer\"]?y.push(new _a(U,I,'layer \"'+I.id+'\" must specify a \"source-layer\"')):vr===\"raster-dem\"&&he!==\"hillshade\"?y.push(new _a(U,I.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):he===\"line\"&&I.paint&&I.paint[\"line-gradient\"]&&(vr!==\"geojson\"||!_r.lineMetrics)&&y.push(new _a(U,I,'layer \"'+I.id+'\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):y.push(new _a(U,I.source,'source \"'+I.source+'\" not found'))}return y=y.concat(le({key:U,value:I,valueSpec:ae.layer,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{\"*\":function(){return[]},type:function(){return Qa({key:U+\".type\",value:I.type,valueSpec:ae.layer.type,style:m.style,styleSpec:m.styleSpec,object:I,objectKey:\"type\"})},filter:dr,layout:function(ai){return le({layer:I,key:ai.key,value:ai.value,style:ai.style,styleSpec:ai.styleSpec,objectElementValidators:{\"*\":function(Ti){return ii(Ol({layerType:he},Ti))}}})},paint:function(ai){return le({layer:I,key:ai.key,value:ai.value,style:ai.style,styleSpec:ai.styleSpec,objectElementValidators:{\"*\":function(Ti){return jr(Ol({layerType:he},Ti))}}})}}})),y}function un(m){var y=m.value,I=m.key,U=no(y);return U!==\"string\"?[new _a(I,y,\"string expected, \"+U+\" found\")]:[]}var sn={promoteId:Kn};function In(m){var y=m.value,I=m.key,U=m.styleSpec,$=m.style;if(!y.type)return[new _a(I,y,'\"type\" is required')];var ae=xo(y.type),he;switch(ae){case\"vector\":case\"raster\":case\"raster-dem\":return he=le({key:I,value:y,valueSpec:U[\"source_\"+ae.replace(\"-\",\"_\")],style:m.style,styleSpec:U,objectElementValidators:sn}),he;case\"geojson\":if(he=le({key:I,value:y,valueSpec:U.source_geojson,style:$,styleSpec:U,objectElementValidators:sn}),y.cluster)for(var Oe in y.clusterProperties){var rt=y.clusterProperties[Oe],gt=rt[0],Mt=rt[1],or=typeof gt==\"string\"?[gt,[\"accumulated\"],[\"get\",Oe]]:gt;he.push.apply(he,Tt({key:I+\".\"+Oe+\".map\",value:Mt,expressionContext:\"cluster-map\"})),he.push.apply(he,Tt({key:I+\".\"+Oe+\".reduce\",value:or,expressionContext:\"cluster-reduce\"}))}return he;case\"video\":return le({key:I,value:y,valueSpec:U.source_video,style:$,styleSpec:U});case\"image\":return le({key:I,value:y,valueSpec:U.source_image,style:$,styleSpec:U});case\"canvas\":return[new _a(I,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")];default:return xr({key:I+\".type\",value:y.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:$,styleSpec:U})}}function Kn(m){var y=m.key,I=m.value;if(no(I)===\"string\")return un({key:y,value:I});var U=[];for(var $ in I)U.push.apply(U,un({key:y+\".\"+$,value:I[$]}));return U}function Aa(m){var y=m.value,I=m.styleSpec,U=I.light,$=m.style,ae=[],he=no(y);if(y===void 0)return ae;if(he!==\"object\")return ae=ae.concat([new _a(\"light\",y,\"object expected, \"+he+\" found\")]),ae;for(var Oe in y){var rt=Oe.match(/^(.*)-transition$/);rt&&U[rt[1]]&&U[rt[1]].transition?ae=ae.concat(Qa({key:Oe,value:y[Oe],valueSpec:I.transition,style:$,styleSpec:I})):U[Oe]?ae=ae.concat(Qa({key:Oe,value:y[Oe],valueSpec:U[Oe],style:$,styleSpec:I})):ae=ae.concat([new _a(Oe,y[Oe],'unknown property \"'+Oe+'\"')])}return ae}function fa(m){return un(m).length===0?[]:Tt(m)}function $a(m){return un(m).length===0?[]:Tt(m)}var ko={\"*\":function(){return[]},array:qe,boolean:Kt,number:Xe,color:Jt,constants:Vu,enum:xr,filter:dr,function:ot,layer:Li,object:le,source:In,light:Aa,string:un,formatted:fa,resolvedImage:$a};function Qa(m){var y=m.value,I=m.valueSpec,U=m.styleSpec;if(I.expression&&_s(xo(y)))return ot(m);if(I.expression&&Ua(Yl(y)))return Tt(m);if(I.type&&ko[I.type])return ko[I.type](m);var $=le(Ol({},m,{valueSpec:I.type?U[I.type]:I}));return $}function mo(m){var y=m.value,I=m.key,U=un(m);return U.length||(y.indexOf(\"{fontstack}\")===-1&&U.push(new _a(I,y,'\"glyphs\" url must include a \"{fontstack}\" token')),y.indexOf(\"{range}\")===-1&&U.push(new _a(I,y,'\"glyphs\" url must include a \"{range}\" token'))),U}function Bo(m,y){y===void 0&&(y=Fn);var I=[];return I=I.concat(Qa({key:\"\",value:m,valueSpec:y.$root,styleSpec:y,style:m,objectElementValidators:{glyphs:mo,\"*\":function(){return[]}}})),m.constants&&(I=I.concat(Vu({key:\"constants\",value:m.constants,style:m,styleSpec:y}))),Is(I)}Bo.source=As(In),Bo.light=As(Aa),Bo.layer=As(Li),Bo.filter=As(dr),Bo.paintProperty=As(jr),Bo.layoutProperty=As(ii);function Is(m){return[].concat(m).sort(function(y,I){return y.line-I.line})}function As(m){return function(){for(var y=[],I=arguments.length;I--;)y[I]=arguments[I];return Is(m.apply(this,y))}}var wo=Bo,To=wo.light,dl=wo.paintProperty,Ul=wo.layoutProperty;function Lu(m,y){var I=!1;if(y&&y.length)for(var U=0,$=y;U<$.length;U+=1){var ae=$[U];m.fire(new da(new Error(ae.message))),I=!0}return I}var au=Ql,$s=3;function Ql(m,y,I){var U=this.cells=[];if(m instanceof ArrayBuffer){this.arrayBuffer=m;var $=new Int32Array(this.arrayBuffer);m=$[0],y=$[1],I=$[2],this.d=y+2*I;for(var ae=0;ae<this.d*this.d;ae++){var he=$[$s+ae],Oe=$[$s+ae+1];U.push(he===Oe?null:$.subarray(he,Oe))}var rt=$[$s+U.length],gt=$[$s+U.length+1];this.keys=$.subarray(rt,gt),this.bboxes=$.subarray(gt),this.insert=this._insertReadonly}else{this.d=y+2*I;for(var Mt=0;Mt<this.d*this.d;Mt++)U.push([]);this.keys=[],this.bboxes=[]}this.n=y,this.extent=m,this.padding=I,this.scale=y/m,this.uid=0;var or=I/y*m;this.min=-or,this.max=m+or}Ql.prototype.insert=function(m,y,I,U,$){this._forEachCell(y,I,U,$,this._insertCell,this.uid++),this.keys.push(m),this.bboxes.push(y),this.bboxes.push(I),this.bboxes.push(U),this.bboxes.push($)},Ql.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},Ql.prototype._insertCell=function(m,y,I,U,$,ae){this.cells[$].push(ae)},Ql.prototype.query=function(m,y,I,U,$){var ae=this.min,he=this.max;if(m<=ae&&y<=ae&&he<=I&&he<=U&&!$)return Array.prototype.slice.call(this.keys);var Oe=[],rt={};return this._forEachCell(m,y,I,U,this._queryCell,Oe,rt,$),Oe},Ql.prototype._queryCell=function(m,y,I,U,$,ae,he,Oe){var rt=this.cells[$];if(rt!==null)for(var gt=this.keys,Mt=this.bboxes,or=0;or<rt.length;or++){var _r=rt[or];if(he[_r]===void 0){var vr=_r*4;(Oe?Oe(Mt[vr+0],Mt[vr+1],Mt[vr+2],Mt[vr+3]):m<=Mt[vr+2]&&y<=Mt[vr+3]&&I>=Mt[vr+0]&&U>=Mt[vr+1])?(he[_r]=!0,ae.push(gt[_r])):he[_r]=!1}}},Ql.prototype._forEachCell=function(m,y,I,U,$,ae,he,Oe){for(var rt=this._convertToCellCoord(m),gt=this._convertToCellCoord(y),Mt=this._convertToCellCoord(I),or=this._convertToCellCoord(U),_r=rt;_r<=Mt;_r++)for(var vr=gt;vr<=or;vr++){var Fr=this.d*vr+_r;if(!(Oe&&!Oe(this._convertFromCellCoord(_r),this._convertFromCellCoord(vr),this._convertFromCellCoord(_r+1),this._convertFromCellCoord(vr+1)))&&$.call(this,m,y,I,U,Fr,ae,he,Oe))return}},Ql.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},Ql.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},Ql.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=$s+this.cells.length+1+1,I=0,U=0;U<this.cells.length;U++)I+=this.cells[U].length;var $=new Int32Array(y+I+this.keys.length+this.bboxes.length);$[0]=this.extent,$[1]=this.n,$[2]=this.padding;for(var ae=y,he=0;he<m.length;he++){var Oe=m[he];$[$s+he]=ae,$.set(Oe,ae),ae+=Oe.length}return $[$s+m.length]=ae,$.set(this.keys,ae),ae+=this.keys.length,$[$s+m.length+1]=ae,$.set(this.bboxes,ae),ae+=this.bboxes.length,$.buffer};var dc=f.ImageData,Al=f.ImageBitmap,Sl={};function X(m,y,I){I===void 0&&(I={}),Object.defineProperty(y,\"_classRegistryKey\",{value:m,writeable:!1}),Sl[m]={klass:y,omit:I.omit||[],shallow:I.shallow||[]}}X(\"Object\",Object),au.serialize=function(y,I){var U=y.toArrayBuffer();return I&&I.push(U),{buffer:U}},au.deserialize=function(y){return new au(y.buffer)},X(\"Grid\",au),X(\"Color\",fs),X(\"Error\",Error),X(\"ResolvedImage\",hl),X(\"StylePropertyFunction\",ue),X(\"StyleExpression\",Ac,{omit:[\"_evaluator\"]}),X(\"ZoomDependentExpression\",hc),X(\"ZoomConstantExpression\",Vc),X(\"CompoundExpression\",Pa,{omit:[\"_evaluate\"]});for(var se in Ka)Ka[se]._classRegistryKey||X(\"Expression_\"+se,Ka[se]);function Te(m){return m&&typeof ArrayBuffer!=\"undefined\"&&(m instanceof ArrayBuffer||m.constructor&&m.constructor.name===\"ArrayBuffer\")}function Ne(m){return Al&&m instanceof Al}function He(m,y){if(m==null||typeof m==\"boolean\"||typeof m==\"number\"||typeof m==\"string\"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp)return m;if(Te(m)||Ne(m))return y&&y.push(m),m;if(ArrayBuffer.isView(m)){var I=m;return y&&y.push(I.buffer),I}if(m instanceof dc)return y&&y.push(m.data.buffer),m;if(Array.isArray(m)){for(var U=[],$=0,ae=m;$<ae.length;$+=1){var he=ae[$];U.push(He(he,y))}return U}if(typeof m==\"object\"){var Oe=m.constructor,rt=Oe._classRegistryKey;if(!rt)throw new Error(\"can't serialize object of unregistered class\");var gt=Oe.serialize?Oe.serialize(m,y):{};if(!Oe.serialize){for(var Mt in m)if(m.hasOwnProperty(Mt)&&!(Sl[rt].omit.indexOf(Mt)>=0)){var or=m[Mt];gt[Mt]=Sl[rt].shallow.indexOf(Mt)>=0?or:He(or,y)}m instanceof Error&&(gt.message=m.message)}if(gt.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return rt!==\"Object\"&&(gt.$name=rt),gt}throw new Error(\"can't serialize object of type \"+typeof m)}function Ye(m){if(m==null||typeof m==\"boolean\"||typeof m==\"number\"||typeof m==\"string\"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Te(m)||Ne(m)||ArrayBuffer.isView(m)||m instanceof dc)return m;if(Array.isArray(m))return m.map(Ye);if(typeof m==\"object\"){var y=m.$name||\"Object\",I=Sl[y],U=I.klass;if(!U)throw new Error(\"can't deserialize unregistered class \"+y);if(U.deserialize)return U.deserialize(m);for(var $=Object.create(U.prototype),ae=0,he=Object.keys(m);ae<he.length;ae+=1){var Oe=he[ae];if(Oe!==\"$name\"){var rt=m[Oe];$[Oe]=Sl[y].shallow.indexOf(Oe)>=0?rt:Ye(rt)}}return $}throw new Error(\"can't deserialize object of type \"+typeof m)}var Ct=function(){this.first=!0};Ct.prototype.update=function(y,I){var U=Math.floor(y);return this.first?(this.first=!1,this.lastIntegerZoom=U,this.lastIntegerZoomTime=0,this.lastZoom=y,this.lastFloorZoom=U,!0):(this.lastFloorZoom>U?(this.lastIntegerZoom=U+1,this.lastIntegerZoomTime=I):this.lastFloorZoom<U&&(this.lastIntegerZoom=U,this.lastIntegerZoomTime=I),y!==this.lastZoom?(this.lastZoom=y,this.lastFloorZoom=U,!0):!1)};var nt={\"Latin-1 Supplement\":function(m){return m>=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},\"Arabic Supplement\":function(m){return m>=1872&&m<=1919},\"Arabic Extended-A\":function(m){return m>=2208&&m<=2303},\"Hangul Jamo\":function(m){return m>=4352&&m<=4607},\"Unified Canadian Aboriginal Syllabics\":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},\"Unified Canadian Aboriginal Syllabics Extended\":function(m){return m>=6320&&m<=6399},\"General Punctuation\":function(m){return m>=8192&&m<=8303},\"Letterlike Symbols\":function(m){return m>=8448&&m<=8527},\"Number Forms\":function(m){return m>=8528&&m<=8591},\"Miscellaneous Technical\":function(m){return m>=8960&&m<=9215},\"Control Pictures\":function(m){return m>=9216&&m<=9279},\"Optical Character Recognition\":function(m){return m>=9280&&m<=9311},\"Enclosed Alphanumerics\":function(m){return m>=9312&&m<=9471},\"Geometric Shapes\":function(m){return m>=9632&&m<=9727},\"Miscellaneous Symbols\":function(m){return m>=9728&&m<=9983},\"Miscellaneous Symbols and Arrows\":function(m){return m>=11008&&m<=11263},\"CJK Radicals Supplement\":function(m){return m>=11904&&m<=12031},\"Kangxi Radicals\":function(m){return m>=12032&&m<=12255},\"Ideographic Description Characters\":function(m){return m>=12272&&m<=12287},\"CJK Symbols and Punctuation\":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},\"Hangul Compatibility Jamo\":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},\"Bopomofo Extended\":function(m){return m>=12704&&m<=12735},\"CJK Strokes\":function(m){return m>=12736&&m<=12783},\"Katakana Phonetic Extensions\":function(m){return m>=12784&&m<=12799},\"Enclosed CJK Letters and Months\":function(m){return m>=12800&&m<=13055},\"CJK Compatibility\":function(m){return m>=13056&&m<=13311},\"CJK Unified Ideographs Extension A\":function(m){return m>=13312&&m<=19903},\"Yijing Hexagram Symbols\":function(m){return m>=19904&&m<=19967},\"CJK Unified Ideographs\":function(m){return m>=19968&&m<=40959},\"Yi Syllables\":function(m){return m>=40960&&m<=42127},\"Yi Radicals\":function(m){return m>=42128&&m<=42191},\"Hangul Jamo Extended-A\":function(m){return m>=43360&&m<=43391},\"Hangul Syllables\":function(m){return m>=44032&&m<=55215},\"Hangul Jamo Extended-B\":function(m){return m>=55216&&m<=55295},\"Private Use Area\":function(m){return m>=57344&&m<=63743},\"CJK Compatibility Ideographs\":function(m){return m>=63744&&m<=64255},\"Arabic Presentation Forms-A\":function(m){return m>=64336&&m<=65023},\"Vertical Forms\":function(m){return m>=65040&&m<=65055},\"CJK Compatibility Forms\":function(m){return m>=65072&&m<=65103},\"Small Form Variants\":function(m){return m>=65104&&m<=65135},\"Arabic Presentation Forms-B\":function(m){return m>=65136&&m<=65279},\"Halfwidth and Fullwidth Forms\":function(m){return m>=65280&&m<=65519}};function jt(m){for(var y=0,I=m;y<I.length;y+=1){var U=I[y];if(qr(U.charCodeAt(0)))return!0}return!1}function gr(m){for(var y=0,I=m;y<I.length;y+=1){var U=I[y];if(!yr(U.charCodeAt(0)))return!1}return!0}function yr(m){return!(nt.Arabic(m)||nt[\"Arabic Supplement\"](m)||nt[\"Arabic Extended-A\"](m)||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m))}function Gr(m){return m<11904?!1:!!(nt[\"Bopomofo Extended\"](m)||nt.Bopomofo(m)||nt[\"CJK Compatibility Forms\"](m)||nt[\"CJK Compatibility Ideographs\"](m)||nt[\"CJK Compatibility\"](m)||nt[\"CJK Radicals Supplement\"](m)||nt[\"CJK Strokes\"](m)||nt[\"CJK Symbols and Punctuation\"](m)||nt[\"CJK Unified Ideographs Extension A\"](m)||nt[\"CJK Unified Ideographs\"](m)||nt[\"Enclosed CJK Letters and Months\"](m)||nt[\"Halfwidth and Fullwidth Forms\"](m)||nt.Hiragana(m)||nt[\"Ideographic Description Characters\"](m)||nt[\"Kangxi Radicals\"](m)||nt[\"Katakana Phonetic Extensions\"](m)||nt.Katakana(m)||nt[\"Vertical Forms\"](m)||nt[\"Yi Radicals\"](m)||nt[\"Yi Syllables\"](m))}function qr(m){return m===746||m===747?!0:m<4352?!1:!!(nt[\"Bopomofo Extended\"](m)||nt.Bopomofo(m)||nt[\"CJK Compatibility Forms\"](m)&&!(m>=65097&&m<=65103)||nt[\"CJK Compatibility Ideographs\"](m)||nt[\"CJK Compatibility\"](m)||nt[\"CJK Radicals Supplement\"](m)||nt[\"CJK Strokes\"](m)||nt[\"CJK Symbols and Punctuation\"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||nt[\"CJK Unified Ideographs Extension A\"](m)||nt[\"CJK Unified Ideographs\"](m)||nt[\"Enclosed CJK Letters and Months\"](m)||nt[\"Hangul Compatibility Jamo\"](m)||nt[\"Hangul Jamo Extended-A\"](m)||nt[\"Hangul Jamo Extended-B\"](m)||nt[\"Hangul Jamo\"](m)||nt[\"Hangul Syllables\"](m)||nt.Hiragana(m)||nt[\"Ideographic Description Characters\"](m)||nt.Kanbun(m)||nt[\"Kangxi Radicals\"](m)||nt[\"Katakana Phonetic Extensions\"](m)||nt.Katakana(m)&&m!==12540||nt[\"Halfwidth and Fullwidth Forms\"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||nt[\"Small Form Variants\"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||nt[\"Unified Canadian Aboriginal Syllabics\"](m)||nt[\"Unified Canadian Aboriginal Syllabics Extended\"](m)||nt[\"Vertical Forms\"](m)||nt[\"Yijing Hexagram Symbols\"](m)||nt[\"Yi Syllables\"](m)||nt[\"Yi Radicals\"](m))}function _i(m){return!!(nt[\"Latin-1 Supplement\"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||nt[\"General Punctuation\"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||nt[\"Letterlike Symbols\"](m)||nt[\"Number Forms\"](m)||nt[\"Miscellaneous Technical\"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||nt[\"Control Pictures\"](m)&&m!==9251||nt[\"Optical Character Recognition\"](m)||nt[\"Enclosed Alphanumerics\"](m)||nt[\"Geometric Shapes\"](m)||nt[\"Miscellaneous Symbols\"](m)&&!(m>=9754&&m<=9759)||nt[\"Miscellaneous Symbols and Arrows\"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||nt[\"CJK Symbols and Punctuation\"](m)||nt.Katakana(m)||nt[\"Private Use Area\"](m)||nt[\"CJK Compatibility Forms\"](m)||nt[\"Small Form Variants\"](m)||nt[\"Halfwidth and Fullwidth Forms\"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function bi(m){return!(qr(m)||_i(m))}function Xr(m){return nt.Arabic(m)||nt[\"Arabic Supplement\"](m)||nt[\"Arabic Extended-A\"](m)||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m)}function ni(m){return m>=1424&&m<=2303||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m)}function gi(m,y){return!(!y&&ni(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||nt.Khmer(m))}function Pi(m){for(var y=0,I=m;y<I.length;y+=1){var U=I[y];if(ni(U.charCodeAt(0)))return!0}return!1}function Ai(m,y){for(var I=0,U=m;I<U.length;I+=1){var $=U[I];if(!gi($.charCodeAt(0),y))return!1}return!0}var ti={unavailable:\"unavailable\",deferred:\"deferred\",loading:\"loading\",loaded:\"loaded\",error:\"error\"},Rn=null,Cn=ti.unavailable,Nn=null,ia=function(m){m&&typeof m==\"string\"&&m.indexOf(\"NetworkError\")>-1&&(Cn=ti.error),Rn&&Rn(m)};function Ea(){Ia.fire(new Wo(\"pluginStateChange\",{pluginStatus:Cn,pluginURL:Nn}))}var Ia=new Wn,yo=function(){return Cn},Da=function(m){return m({pluginStatus:Cn,pluginURL:Nn}),Ia.on(\"pluginStateChange\",m),m},go=function(m,y,I){if(I===void 0&&(I=!1),Cn===ti.deferred||Cn===ti.loading||Cn===ti.loaded)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");Nn=ct.resolveURL(m),Cn=ti.deferred,Rn=y,Ea(),I||Rs()},Rs=function(){if(Cn!==ti.deferred||!Nn)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");Cn=ti.loading,Ea(),Nn&&ri({url:Nn},function(m){m?ia(m):(Cn=ti.loaded,Ea())})},Es={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Cn===ti.loaded||Es.applyArabicShaping!=null},isLoading:function(){return Cn===ti.loading},setState:function(y){Cn=y.pluginStatus,Nn=y.pluginURL},isParsed:function(){return Es.applyArabicShaping!=null&&Es.processBidirectionalText!=null&&Es.processStyledBidirectionalText!=null},getPluginURL:function(){return Nn}},Zs=function(){!Es.isLoading()&&!Es.isLoaded()&&yo()===\"deferred\"&&Rs()},Gn=function(y,I){this.zoom=y,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ct,this.transition={})};Gn.prototype.isSupportedScript=function(y){return Ai(y,Es.isLoaded())},Gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Gn.prototype.getCrossfadeParameters=function(){var y=this.zoom,I=y-Math.floor(y),U=this.crossFadingFactor();return y>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*U}:{fromScale:.5,toScale:1,t:1-(1-U)*I}};var Ha=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};Ha.prototype.isDataDriven=function(){return this.expression.kind===\"source\"||this.expression.kind===\"composite\"},Ha.prototype.possiblyEvaluate=function(y,I,U){return this.property.possiblyEvaluate(this,y,I,U)};var Fo=function(y){this.property=y,this.value=new Ha(y,void 0)};Fo.prototype.transitioned=function(y,I){return new Qs(this.property,this.value,I,_({},y.transition,this.transition),y.now)},Fo.prototype.untransitioned=function(){return new Qs(this.property,this.value,null,{},0)};var Uo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(y){return H(this._values[y].value.value)},Uo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].value=new Ha(this._values[y].property,I===null?void 0:H(I))},Uo.prototype.getTransition=function(y){return H(this._values[y].transition)},Uo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].transition=H(I)||void 0},Uo.prototype.serialize=function(){for(var y={},I=0,U=Object.keys(this._values);I<U.length;I+=1){var $=U[I],ae=this.getValue($);ae!==void 0&&(y[$]=ae);var he=this.getTransition($);he!==void 0&&(y[$+\"-transition\"]=he)}return y},Uo.prototype.transitioned=function(y,I){for(var U=new Ml(this._properties),$=0,ae=Object.keys(this._values);$<ae.length;$+=1){var he=ae[$];U._values[he]=this._values[he].transitioned(y,I._values[he])}return U},Uo.prototype.untransitioned=function(){for(var y=new Ml(this._properties),I=0,U=Object.keys(this._values);I<U.length;I+=1){var $=U[I];y._values[$]=this._values[$].untransitioned()}return y};var Qs=function(y,I,U,$,ae){this.property=y,this.value=I,this.begin=ae+$.delay||0,this.end=this.begin+$.duration||0,y.specification.transition&&($.delay||$.duration)&&(this.prior=U)};Qs.prototype.possiblyEvaluate=function(y,I,U){var $=y.now||0,ae=this.value.possiblyEvaluate(y,I,U),he=this.prior;if(he){if($>this.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($<this.begin)return he.possiblyEvaluate(y,I,U);var Oe=($-this.begin)/(this.end-this.begin);return this.property.interpolate(he.possiblyEvaluate(y,I,U),ae,v(Oe))}else return ae};var Ml=function(y){this._properties=y,this._values=Object.create(y.defaultTransitioningPropertyValues)};Ml.prototype.possiblyEvaluate=function(y,I,U){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var Oe=he[ae];$._values[Oe]=this._values[Oe].possiblyEvaluate(y,I,U)}return $},Ml.prototype.hasTransition=function(){for(var y=0,I=Object.keys(this._values);y<I.length;y+=1){var U=I[y];if(this._values[U].prior)return!0}return!1};var bu=function(y){this._properties=y,this._values=Object.create(y.defaultPropertyValues)};bu.prototype.getValue=function(y){return H(this._values[y].value)},bu.prototype.setValue=function(y,I){this._values[y]=new Ha(this._values[y].property,I===null?void 0:H(I))},bu.prototype.serialize=function(){for(var y={},I=0,U=Object.keys(this._values);I<U.length;I+=1){var $=U[I],ae=this.getValue($);ae!==void 0&&(y[$]=ae)}return y},bu.prototype.possiblyEvaluate=function(y,I,U){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var Oe=he[ae];$._values[Oe]=this._values[Oe].possiblyEvaluate(y,I,U)}return $};var vl=function(y,I,U){this.property=y,this.value=I,this.parameters=U};vl.prototype.isConstant=function(){return this.value.kind===\"constant\"},vl.prototype.constantOr=function(y){return this.value.kind===\"constant\"?this.value.value:y},vl.prototype.evaluate=function(y,I,U,$){return this.property.evaluate(this.value,this.parameters,y,I,U,$)};var Sc=function(y){this._properties=y,this._values=Object.create(y.defaultPossiblyEvaluatedValues)};Sc.prototype.get=function(y){return this._values[y]};var Ee=function(y){this.specification=y};Ee.prototype.possiblyEvaluate=function(y,I){return y.expression.evaluate(I)},Ee.prototype.interpolate=function(y,I,U){var $=zu[this.specification.type];return $?$(y,I,U):y};var xt=function(y,I){this.specification=y,this.overrides=I};xt.prototype.possiblyEvaluate=function(y,I,U,$){return y.expression.kind===\"constant\"||y.expression.kind===\"camera\"?new vl(this,{kind:\"constant\",value:y.expression.evaluate(I,null,{},U,$)},I):new vl(this,y.expression,I)},xt.prototype.interpolate=function(y,I,U){if(y.value.kind!==\"constant\"||I.value.kind!==\"constant\")return y;if(y.value.value===void 0||I.value.value===void 0)return new vl(this,{kind:\"constant\",value:void 0},y.parameters);var $=zu[this.specification.type];return $?new vl(this,{kind:\"constant\",value:$(y.value.value,I.value.value,U)},y.parameters):y},xt.prototype.evaluate=function(y,I,U,$,ae,he){return y.kind===\"constant\"?y.value:y.evaluate(I,U,$,ae,he)};var zt=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(U,$,ae,he){if(U.value===void 0)return new vl(this,{kind:\"constant\",value:void 0},$);if(U.expression.kind===\"constant\"){var Oe=U.expression.evaluate($,null,{},ae,he),rt=U.property.specification.type===\"resolvedImage\",gt=rt&&typeof Oe!=\"string\"?Oe.name:Oe,Mt=this._calculate(gt,gt,gt,$);return new vl(this,{kind:\"constant\",value:Mt},$)}else if(U.expression.kind===\"camera\"){var or=this._calculate(U.expression.evaluate({zoom:$.zoom-1}),U.expression.evaluate({zoom:$.zoom}),U.expression.evaluate({zoom:$.zoom+1}),$);return new vl(this,{kind:\"constant\",value:or},$)}else return new vl(this,U.expression,$)},y.prototype.evaluate=function(U,$,ae,he,Oe,rt){if(U.kind===\"source\"){var gt=U.evaluate($,ae,he,Oe,rt);return this._calculate(gt,gt,gt,$)}else return U.kind===\"composite\"?this._calculate(U.evaluate({zoom:Math.floor($.zoom)-1},ae,he),U.evaluate({zoom:Math.floor($.zoom)},ae,he),U.evaluate({zoom:Math.floor($.zoom)+1},ae,he),$):U.value},y.prototype._calculate=function(U,$,ae,he){var Oe=he.zoom;return Oe>he.zoomHistory.lastIntegerZoom?{from:U,to:$}:{from:ae,to:$}},y.prototype.interpolate=function(U){return U},y}(xt),Ir=function(y){this.specification=y};Ir.prototype.possiblyEvaluate=function(y,I,U,$){if(y.value!==void 0)if(y.expression.kind===\"constant\"){var ae=y.expression.evaluate(I,null,{},U,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(y.expression.evaluate(new Gn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom+1),I)),I)},Ir.prototype._calculate=function(y,I,U,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:U,to:I}},Ir.prototype.interpolate=function(y){return y};var Hr=function(y){this.specification=y};Hr.prototype.possiblyEvaluate=function(y,I,U,$){return!!y.expression.evaluate(I,null,{},U,$)},Hr.prototype.interpolate=function(){return!1};var Br=function(y){this.properties=y,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in y){var U=y[I];U.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new Ha(U,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(U);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X(\"DataDrivenProperty\",xt),X(\"DataConstantProperty\",Ee),X(\"CrossFadedDataDrivenProperty\",zt),X(\"CrossFadedProperty\",Ir),X(\"ColorRampProperty\",Hr);var Vr=\"-transition\",mi=function(m){function y(I,U){if(m.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!==\"custom\"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!==\"background\"&&(this.source=I.source,this.sourceLayer=I[\"source-layer\"],this.filter=I.filter),U.layout&&(this._unevaluatedLayout=new bu(U.layout)),U.paint)){this._transitionablePaint=new Uo(U.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(U.paint)}}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},y.prototype.getLayoutProperty=function(U){return U===\"visibility\"?this.visibility:this._unevaluatedLayout.getValue(U)},y.prototype.setLayoutProperty=function(U,$,ae){if(ae===void 0&&(ae={}),$!=null){var he=\"layers.\"+this.id+\".layout.\"+U;if(this._validate(Ul,he,U,$,ae))return}if(U===\"visibility\"){this.visibility=$;return}this._unevaluatedLayout.setValue(U,$)},y.prototype.getPaintProperty=function(U){return V(U,Vr)?this._transitionablePaint.getTransition(U.slice(0,-Vr.length)):this._transitionablePaint.getValue(U)},y.prototype.setPaintProperty=function(U,$,ae){if(ae===void 0&&(ae={}),$!=null){var he=\"layers.\"+this.id+\".paint.\"+U;if(this._validate(dl,he,U,$,ae))return!1}if(V(U,Vr))return this._transitionablePaint.setTransition(U.slice(0,-Vr.length),$||void 0),!1;var Oe=this._transitionablePaint._values[U],rt=Oe.property.specification[\"property-type\"]===\"cross-faded-data-driven\",gt=Oe.value.isDataDriven(),Mt=Oe.value;this._transitionablePaint.setValue(U,$),this._handleSpecialPaintPropertyUpdate(U);var or=this._transitionablePaint._values[U].value,_r=or.isDataDriven();return _r||gt||rt||this._handleOverridablePaintPropertyUpdate(U,Mt,or)},y.prototype._handleSpecialPaintPropertyUpdate=function(U){},y.prototype._handleOverridablePaintPropertyUpdate=function(U,$,ae){return!1},y.prototype.isHidden=function(U){return this.minzoom&&U<this.minzoom||this.maxzoom&&U>=this.maxzoom?!0:this.visibility===\"none\"},y.prototype.updateTransitions=function(U){this._transitioningPaint=this._transitionablePaint.transitioned(U,this._transitioningPaint)},y.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},y.prototype.recalculate=function(U,$){U.getCrossfadeParameters&&(this._crossfadeParameters=U.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(U,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(U,void 0,$)},y.prototype.serialize=function(){var U={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(U.layout=U.layout||{},U.layout.visibility=this.visibility),Z(U,function($,ae){return $!==void 0&&!(ae===\"layout\"&&!Object.keys($).length)&&!(ae===\"paint\"&&!Object.keys($).length)})},y.prototype._validate=function(U,$,ae,he,Oe){return Oe===void 0&&(Oe={}),Oe&&Oe.validate===!1?!1:Lu(this,U.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Fn,style:{glyphs:!0,sprite:!0}}))},y.prototype.is3D=function(){return!1},y.prototype.isTileClipped=function(){return!1},y.prototype.hasOffscreenPass=function(){return!1},y.prototype.resize=function(){},y.prototype.isStateDependent=function(){for(var U in this.paint._values){var $=this.paint.get(U);if(!(!($ instanceof vl)||!Xs($.property.specification))&&($.value.kind===\"source\"||$.value.kind===\"composite\")&&$.value.isStateDependent)return!0}return!1},y}(Wn),Ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Oi=function(y,I){this._structArray=y,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Mi=128,Hn=5,Qi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Qi.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},Qi.deserialize=function(y){var I=Object.create(this.prototype);return I.arrayBuffer=y.arrayBuffer,I.length=y.length,I.capacity=y.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},Qi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Qi.prototype.clear=function(){this.length=0},Qi.prototype.resize=function(y){this.reserve(y),this.length=y},Qi.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*Hn),Mi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Qi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};function ji(m,y){y===void 0&&(y=1);var I=0,U=0,$=m.map(function(he){var Oe=si(he.type),rt=I=Mr(I,Math.max(y,Oe)),gt=he.components||1;return U=Math.max(U,Oe),I+=Oe*gt,{name:he.name,type:he.type,components:gt,offset:rt}}),ae=Mr(I,Math.max(U,y));return{members:$,size:ae,alignment:y}}function si(m){return Ni[m].BYTES_PER_ELEMENT}function Mr(m,y){return Math.ceil(m/y)*y}var Yr=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.int16[he+0]=$,this.int16[he+1]=ae,U},y}(Qi);Yr.prototype.bytesPerElement=4,X(\"StructArrayLayout2i4\",Yr);var xi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*4;return this.int16[rt+0]=$,this.int16[rt+1]=ae,this.int16[rt+2]=he,this.int16[rt+3]=Oe,U},y}(Qi);xi.prototype.bytesPerElement=8,X(\"StructArrayLayout4i8\",xi);var Ii=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Mt=U*6;return this.int16[Mt+0]=$,this.int16[Mt+1]=ae,this.int16[Mt+2]=he,this.int16[Mt+3]=Oe,this.int16[Mt+4]=rt,this.int16[Mt+5]=gt,U},y}(Qi);Ii.prototype.bytesPerElement=12,X(\"StructArrayLayout2i4i12\",Ii);var ci=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Mt=U*4,or=U*8;return this.int16[Mt+0]=$,this.int16[Mt+1]=ae,this.uint8[or+4]=he,this.uint8[or+5]=Oe,this.uint8[or+6]=rt,this.uint8[or+7]=gt,U},y}(Qi);ci.prototype.bytesPerElement=8,X(\"StructArrayLayout2i4ub8\",ci);var nn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.float32[he+0]=$,this.float32[he+1]=ae,U},y}(Qi);nn.prototype.bytesPerElement=8,X(\"StructArrayLayout2f8\",nn);var Xi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r){var vr=this.length;return this.resize(vr+1),this.emplace(vr,U,$,ae,he,Oe,rt,gt,Mt,or,_r)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr){var Fr=U*10;return this.uint16[Fr+0]=$,this.uint16[Fr+1]=ae,this.uint16[Fr+2]=he,this.uint16[Fr+3]=Oe,this.uint16[Fr+4]=rt,this.uint16[Fr+5]=gt,this.uint16[Fr+6]=Mt,this.uint16[Fr+7]=or,this.uint16[Fr+8]=_r,this.uint16[Fr+9]=vr,U},y}(Qi);Xi.prototype.bytesPerElement=20,X(\"StructArrayLayout10ui20\",Xi);var qn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr){var ai=this.length;return this.resize(ai+1),this.emplace(ai,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai){var Gi=U*12;return this.int16[Gi+0]=$,this.int16[Gi+1]=ae,this.int16[Gi+2]=he,this.int16[Gi+3]=Oe,this.uint16[Gi+4]=rt,this.uint16[Gi+5]=gt,this.uint16[Gi+6]=Mt,this.uint16[Gi+7]=or,this.int16[Gi+8]=_r,this.int16[Gi+9]=vr,this.int16[Gi+10]=Fr,this.int16[Gi+11]=ai,U},y}(Qi);qn.prototype.bytesPerElement=24,X(\"StructArrayLayout4i4ui4i24\",qn);var vi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.float32[Oe+0]=$,this.float32[Oe+1]=ae,this.float32[Oe+2]=he,U},y}(Qi);vi.prototype.bytesPerElement=12,X(\"StructArrayLayout3f12\",vi);var li=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.uint32[ae+0]=$,U},y}(Qi);li.prototype.bytesPerElement=4,X(\"StructArrayLayout1ul4\",li);var mn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Mt,or){var _r=this.length;return this.resize(_r+1),this.emplace(_r,U,$,ae,he,Oe,rt,gt,Mt,or)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r){var vr=U*10,Fr=U*5;return this.int16[vr+0]=$,this.int16[vr+1]=ae,this.int16[vr+2]=he,this.int16[vr+3]=Oe,this.int16[vr+4]=rt,this.int16[vr+5]=gt,this.uint32[Fr+3]=Mt,this.uint16[vr+8]=or,this.uint16[vr+9]=_r,U},y}(Qi);mn.prototype.bytesPerElement=20,X(\"StructArrayLayout6i1ul2ui20\",mn);var Ki=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Mt=U*6;return this.int16[Mt+0]=$,this.int16[Mt+1]=ae,this.int16[Mt+2]=he,this.int16[Mt+3]=Oe,this.int16[Mt+4]=rt,this.int16[Mt+5]=gt,U},y}(Qi);Ki.prototype.bytesPerElement=12,X(\"StructArrayLayout2i2i2i12\",Ki);var Ui=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe){var rt=this.length;return this.resize(rt+1),this.emplace(rt,U,$,ae,he,Oe)},y.prototype.emplace=function(U,$,ae,he,Oe,rt){var gt=U*4,Mt=U*8;return this.float32[gt+0]=$,this.float32[gt+1]=ae,this.float32[gt+2]=he,this.int16[Mt+6]=Oe,this.int16[Mt+7]=rt,U},y}(Qi);Ui.prototype.bytesPerElement=16,X(\"StructArrayLayout2f1f2i16\",Ui);var Bi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*12,gt=U*3;return this.uint8[rt+0]=$,this.uint8[rt+1]=ae,this.float32[gt+1]=he,this.float32[gt+2]=Oe,U},y}(Qi);Bi.prototype.bytesPerElement=12,X(\"StructArrayLayout2ub2f12\",Bi);var vn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.uint16[Oe+0]=$,this.uint16[Oe+1]=ae,this.uint16[Oe+2]=he,U},y}(Qi);vn.prototype.bytesPerElement=6,X(\"StructArrayLayout3ui6\",vn);var Un=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn,xn){var Dn=U*24,Zn=U*12,ga=U*48;return this.int16[Dn+0]=$,this.int16[Dn+1]=ae,this.uint16[Dn+2]=he,this.uint16[Dn+3]=Oe,this.uint32[Zn+2]=rt,this.uint32[Zn+3]=gt,this.uint32[Zn+4]=Mt,this.uint16[Dn+10]=or,this.uint16[Dn+11]=_r,this.uint16[Dn+12]=vr,this.float32[Zn+7]=Fr,this.float32[Zn+8]=ai,this.uint8[ga+36]=Gi,this.uint8[ga+37]=Ti,this.uint8[ga+38]=bn,this.uint32[Zn+10]=rn,this.int16[Dn+22]=xn,U},y}(Qi);Un.prototype.bytesPerElement=48,X(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Un);var na=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn,xn,Dn,Zn,ga,ha,eo,za,Za,Ko,to,ao){var xs=this.length;return this.resize(xs+1),this.emplace(xs,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn,xn,Dn,Zn,ga,ha,eo,za,Za,Ko,to,ao)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn,xn,Dn,Zn,ga,ha,eo,za,Za,Ko,to,ao,xs){var jo=U*34,Cl=U*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=Oe,this.int16[jo+4]=rt,this.int16[jo+5]=gt,this.int16[jo+6]=Mt,this.int16[jo+7]=or,this.uint16[jo+8]=_r,this.uint16[jo+9]=vr,this.uint16[jo+10]=Fr,this.uint16[jo+11]=ai,this.uint16[jo+12]=Gi,this.uint16[jo+13]=Ti,this.uint16[jo+14]=bn,this.uint16[jo+15]=rn,this.uint16[jo+16]=xn,this.uint16[jo+17]=Dn,this.uint16[jo+18]=Zn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[Cl+12]=Za,this.float32[Cl+13]=Ko,this.float32[Cl+14]=to,this.float32[Cl+15]=ao,this.float32[Cl+16]=xs,U},y}(Qi);na.prototype.bytesPerElement=68,X(\"StructArrayLayout8i15ui1ul4f68\",na);var Yi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.float32[ae+0]=$,U},y}(Qi);Yi.prototype.bytesPerElement=4,X(\"StructArrayLayout1f4\",Yi);var Ln=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.int16[Oe+0]=$,this.int16[Oe+1]=ae,this.int16[Oe+2]=he,U},y}(Qi);Ln.prototype.bytesPerElement=6,X(\"StructArrayLayout3i6\",Ln);var ra=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*2,rt=U*4;return this.uint32[Oe+0]=$,this.uint16[rt+2]=ae,this.uint16[rt+3]=he,U},y}(Qi);ra.prototype.bytesPerElement=8,X(\"StructArrayLayout1ul2ui8\",ra);var oa=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,U},y}(Qi);oa.prototype.bytesPerElement=4,X(\"StructArrayLayout2ui4\",oa);var wa=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.uint16[ae+0]=$,U},y}(Qi);wa.prototype.bytesPerElement=2,X(\"StructArrayLayout1ui2\",wa);var ns=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*4;return this.float32[rt+0]=$,this.float32[rt+1]=ae,this.float32[rt+2]=he,this.float32[rt+3]=Oe,U},y}(Qi);ns.prototype.bytesPerElement=16,X(\"StructArrayLayout4f16\",ns);var Ys=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(y.prototype,I),y}(Oi);Ys.prototype.size=20;var Va=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Ys(this,U)},y}(mn);X(\"CollisionBoxArray\",Va);var El=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(U){this._structArray.uint8[this._pos1+37]=U},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(U){this._structArray.uint8[this._pos1+38]=U},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+10]=U},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(y.prototype,I),y}(Oi);El.prototype.size=48;var zo=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new El(this,U)},y}(Un);X(\"PlacedSymbolArray\",zo);var el=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+12]=U},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(y.prototype,I),y}(Oi);el.prototype.size=68;var ol=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new el(this,U)},y}(na);X(\"SymbolInstanceArray\",ol);var Vl=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getoffsetX=function(U){return this.float32[U*1+0]},y}(Yi);X(\"GlyphOffsetArray\",Vl);var ls=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getx=function(U){return this.int16[U*3+0]},y.prototype.gety=function(U){return this.int16[U*3+1]},y.prototype.gettileUnitDistanceFromAnchor=function(U){return this.int16[U*3+2]},y}(Ln);X(\"SymbolLineVertexArray\",ls);var Gs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(y.prototype,I),y}(Oi);Gs.prototype.size=8;var Ks=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Gs(this,U)},y}(ra);X(\"FeatureIndexArray\",Ks);var Ta=ji([{name:\"a_pos\",components:2,type:\"Int16\"}],4),sl=Ta.members,io=function(y){y===void 0&&(y=[]),this.segments=y};io.prototype.prepareSegment=function(y,I,U,$){var ae=this.segments[this.segments.length-1];return y>io.MAX_VERTEX_ARRAY_LENGTH&&re(\"Max vertices per segment is \"+io.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+y),(!ae||ae.vertexLength+y>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:U.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var y=0,I=this.segments;y<I.length;y+=1){var U=I[y];for(var $ in U.vaos)U.vaos[$].destroy()}},io.simpleSegment=function(y,I,U,$){return new io([{vertexOffset:y,primitiveOffset:I,vertexLength:U,primitiveLength:$,vaos:{},sortKey:0}])},io.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,X(\"SegmentVector\",io);function Y(m,y){return m=p(Math.floor(m),0,255),y=p(Math.floor(y),0,255),256*m+y}var D=ji([{name:\"a_pattern_from\",components:4,type:\"Uint16\"},{name:\"a_pattern_to\",components:4,type:\"Uint16\"},{name:\"a_pixel_ratio_from\",components:1,type:\"Uint16\"},{name:\"a_pixel_ratio_to\",components:1,type:\"Uint16\"}]),J=a(function(m){function y(I,U){var $,ae,he,Oe,rt,gt,Mt,or;for($=I.length&3,ae=I.length-$,he=U,rt=3432918353,gt=461845907,or=0;or<ae;)Mt=I.charCodeAt(or)&255|(I.charCodeAt(++or)&255)<<8|(I.charCodeAt(++or)&255)<<16|(I.charCodeAt(++or)&255)<<24,++or,Mt=(Mt&65535)*rt+(((Mt>>>16)*rt&65535)<<16)&4294967295,Mt=Mt<<15|Mt>>>17,Mt=(Mt&65535)*gt+(((Mt>>>16)*gt&65535)<<16)&4294967295,he^=Mt,he=he<<13|he>>>19,Oe=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(Oe&65535)+27492+(((Oe>>>16)+58964&65535)<<16);switch(Mt=0,$){case 3:Mt^=(I.charCodeAt(or+2)&255)<<16;case 2:Mt^=(I.charCodeAt(or+1)&255)<<8;case 1:Mt^=I.charCodeAt(or)&255,Mt=(Mt&65535)*rt+(((Mt>>>16)*rt&65535)<<16)&4294967295,Mt=Mt<<15|Mt>>>17,Mt=(Mt&65535)*gt+(((Mt>>>16)*gt&65535)<<16)&4294967295,he^=Mt}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}m.exports=y}),q=a(function(m){function y(I,U){for(var $=I.length,ae=U^$,he=0,Oe;$>=4;)Oe=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,Oe=(Oe&65535)*1540483477+(((Oe>>>16)*1540483477&65535)<<16),Oe^=Oe>>>24,Oe=(Oe&65535)*1540483477+(((Oe>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Oe,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}m.exports=y}),K=J,de=J,ne=q;K.murmur3=de,K.murmur2=ne;var we=function(){this.ids=[],this.positions=[],this.indexed=!1};we.prototype.add=function(y,I,U,$){this.ids.push(ft(y)),this.positions.push(I,U,$)},we.prototype.getPositions=function(y){for(var I=ft(y),U=0,$=this.ids.length-1;U<$;){var ae=U+$>>1;this.ids[ae]>=I?$=ae:U=ae+1}for(var he=[];this.ids[U]===I;){var Oe=this.positions[3*U],rt=this.positions[3*U+1],gt=this.positions[3*U+2];he.push({index:Oe,start:rt,end:gt}),U++}return he},we.serialize=function(y,I){var U=new Float64Array(y.ids),$=new Uint32Array(y.positions);return Zt(U,$,0,U.length-1),I&&I.push(U.buffer,$.buffer),{ids:U,positions:$}},we.deserialize=function(y){var I=new we;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var Ue=Math.pow(2,53)-1;function ft(m){var y=+m;return!isNaN(y)&&y<=Ue?y:K(String(m))}function Zt(m,y,I,U){for(;I<U;){for(var $=m[I+U>>1],ae=I-1,he=U+1;;){do ae++;while(m[ae]<$);do he--;while(m[he]>$);if(ae>=he)break;hr(m,ae,he),hr(y,3*ae,3*he),hr(y,3*ae+1,3*he+1),hr(y,3*ae+2,3*he+2)}he-I<U-he?(Zt(m,y,I,he),I=he+1):(Zt(m,y,he+1,U),U=he)}}function hr(m,y,I){var U=m[y];m[y]=m[I],m[I]=U}X(\"FeaturePositionMap\",we);var qt=function(y,I){this.gl=y.gl,this.location=I},Ve=function(m){function y(I,U){m.call(this,I,U),this.current=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){this.current!==U&&(this.current=U,this.gl.uniform1i(this.location,U))},y}(qt),et=function(m){function y(I,U){m.call(this,I,U),this.current=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){this.current!==U&&(this.current=U,this.gl.uniform1f(this.location,U))},y}(qt),at=function(m){function y(I,U){m.call(this,I,U),this.current=[0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){(U[0]!==this.current[0]||U[1]!==this.current[1])&&(this.current=U,this.gl.uniform2f(this.location,U[0],U[1]))},y}(qt),kt=function(m){function y(I,U){m.call(this,I,U),this.current=[0,0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){(U[0]!==this.current[0]||U[1]!==this.current[1]||U[2]!==this.current[2])&&(this.current=U,this.gl.uniform3f(this.location,U[0],U[1],U[2]))},y}(qt),Ot=function(m){function y(I,U){m.call(this,I,U),this.current=[0,0,0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){(U[0]!==this.current[0]||U[1]!==this.current[1]||U[2]!==this.current[2]||U[3]!==this.current[3])&&(this.current=U,this.gl.uniform4f(this.location,U[0],U[1],U[2],U[3]))},y}(qt),It=function(m){function y(I,U){m.call(this,I,U),this.current=fs.transparent}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){(U.r!==this.current.r||U.g!==this.current.g||U.b!==this.current.b||U.a!==this.current.a)&&(this.current=U,this.gl.uniform4f(this.location,U.r,U.g,U.b,U.a))},y}(qt),Bt=new Float32Array(16),Rt=function(m){function y(I,U){m.call(this,I,U),this.current=Bt}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(U){if(U[12]!==this.current[12]||U[0]!==this.current[0]){this.current=U,this.gl.uniformMatrix4fv(this.location,!1,U);return}for(var $=1;$<16;$++)if(U[$]!==this.current[$]){this.current=U,this.gl.uniformMatrix4fv(this.location,!1,U);break}},y}(qt);function mt(m){return[Y(255*m.r,255*m.g),Y(255*m.b,255*m.a)]}var Pt=function(y,I,U){this.value=y,this.uniformNames=I.map(function($){return\"u_\"+$}),this.type=U};Pt.prototype.setUniform=function(y,I,U){y.set(U.constantOr(this.value))},Pt.prototype.getBinding=function(y,I,U){return this.type===\"color\"?new It(y,I):new et(y,I)};var ht=function(y,I){this.uniformNames=I.map(function(U){return\"u_\"+U}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ht.prototype.setConstantPatternPositions=function(y,I){this.pixelRatioFrom=I.pixelRatio,this.pixelRatioTo=y.pixelRatio,this.patternFrom=I.tlbr,this.patternTo=y.tlbr},ht.prototype.setUniform=function(y,I,U,$){var ae=$===\"u_pattern_to\"?this.patternTo:$===\"u_pattern_from\"?this.patternFrom:$===\"u_pixel_ratio_to\"?this.pixelRatioTo:$===\"u_pixel_ratio_from\"?this.pixelRatioFrom:null;ae&&y.set(ae)},ht.prototype.getBinding=function(y,I,U){return U.substr(0,9)===\"u_pattern\"?new Ot(y,I):new et(y,I)};var cr=function(y,I,U,$){this.expression=y,this.type=U,this.maxValue=0,this.paintVertexAttributes=I.map(function(ae){return{name:\"a_\"+ae,type:\"Float32\",components:U===\"color\"?2:1,offset:0}}),this.paintVertexArray=new $};cr.prototype.populatePaintArray=function(y,I,U,$,ae){var he=this.paintVertexArray.length,Oe=this.expression.evaluate(new Gn(0),I,{},$,[],ae);this.paintVertexArray.resize(y),this._setPaintValue(he,y,Oe)},cr.prototype.updatePaintArray=function(y,I,U,$){var ae=this.expression.evaluate({zoom:0},U,$);this._setPaintValue(y,I,ae)},cr.prototype._setPaintValue=function(y,I,U){if(this.type===\"color\")for(var $=mt(U),ae=y;ae<I;ae++)this.paintVertexArray.emplace(ae,$[0],$[1]);else{for(var he=y;he<I;he++)this.paintVertexArray.emplace(he,U);this.maxValue=Math.max(this.maxValue,Math.abs(U))}},cr.prototype.upload=function(y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},cr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var br=function(y,I,U,$,ae,he){this.expression=y,this.uniformNames=I.map(function(Oe){return\"u_\"+Oe+\"_t\"}),this.type=U,this.useIntegerZoom=$,this.zoom=ae,this.maxValue=0,this.paintVertexAttributes=I.map(function(Oe){return{name:\"a_\"+Oe,type:\"Float32\",components:U===\"color\"?4:2,offset:0}}),this.paintVertexArray=new he};br.prototype.populatePaintArray=function(y,I,U,$,ae){var he=this.expression.evaluate(new Gn(this.zoom),I,{},$,[],ae),Oe=this.expression.evaluate(new Gn(this.zoom+1),I,{},$,[],ae),rt=this.paintVertexArray.length;this.paintVertexArray.resize(y),this._setPaintValue(rt,y,he,Oe)},br.prototype.updatePaintArray=function(y,I,U,$){var ae=this.expression.evaluate({zoom:this.zoom},U,$),he=this.expression.evaluate({zoom:this.zoom+1},U,$);this._setPaintValue(y,I,ae,he)},br.prototype._setPaintValue=function(y,I,U,$){if(this.type===\"color\")for(var ae=mt(U),he=mt($),Oe=y;Oe<I;Oe++)this.paintVertexArray.emplace(Oe,ae[0],ae[1],he[0],he[1]);else{for(var rt=y;rt<I;rt++)this.paintVertexArray.emplace(rt,U,$);this.maxValue=Math.max(this.maxValue,Math.abs(U),Math.abs($))}},br.prototype.upload=function(y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},br.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},br.prototype.setUniform=function(y,I){var U=this.useIntegerZoom?Math.floor(I.zoom):I.zoom,$=p(this.expression.interpolationFactor(U,this.zoom,this.zoom+1),0,1);y.set($)},br.prototype.getBinding=function(y,I,U){return new et(y,I)};var Nr=function(y,I,U,$,ae,he){this.expression=y,this.type=I,this.useIntegerZoom=U,this.zoom=$,this.layerId=he,this.zoomInPaintVertexArray=new ae,this.zoomOutPaintVertexArray=new ae};Nr.prototype.populatePaintArray=function(y,I,U){var $=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(y),this.zoomOutPaintVertexArray.resize(y),this._setPaintValues($,y,I.patterns&&I.patterns[this.layerId],U)},Nr.prototype.updatePaintArray=function(y,I,U,$,ae){this._setPaintValues(y,I,U.patterns&&U.patterns[this.layerId],ae)},Nr.prototype._setPaintValues=function(y,I,U,$){if(!(!$||!U)){var ae=U.min,he=U.mid,Oe=U.max,rt=$[ae],gt=$[he],Mt=$[Oe];if(!(!rt||!gt||!Mt))for(var or=y;or<I;or++)this.zoomInPaintVertexArray.emplace(or,gt.tl[0],gt.tl[1],gt.br[0],gt.br[1],rt.tl[0],rt.tl[1],rt.br[0],rt.br[1],gt.pixelRatio,rt.pixelRatio),this.zoomOutPaintVertexArray.emplace(or,gt.tl[0],gt.tl[1],gt.br[0],gt.br[1],Mt.tl[0],Mt.tl[1],Mt.br[0],Mt.br[1],gt.pixelRatio,Mt.pixelRatio)}},Nr.prototype.upload=function(y){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=y.createVertexBuffer(this.zoomInPaintVertexArray,D.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=y.createVertexBuffer(this.zoomOutPaintVertexArray,D.members,this.expression.isStateDependent))},Nr.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Ri=function(y,I,U){this.binders={},this._buffers=[];var $=[];for(var ae in y.paint._values)if(U(ae)){var he=y.paint.get(ae);if(!(!(he instanceof vl)||!Xs(he.property.specification))){var Oe=wi(ae,y.type),rt=he.value,gt=he.property.specification.type,Mt=he.property.useIntegerZoom,or=he.property.specification[\"property-type\"],_r=or===\"cross-faded\"||or===\"cross-faded-data-driven\";if(rt.kind===\"constant\")this.binders[ae]=_r?new ht(rt.value,Oe):new Pt(rt.value,Oe,gt),$.push(\"/u_\"+ae);else if(rt.kind===\"source\"||_r){var vr=tn(ae,gt,\"source\");this.binders[ae]=_r?new Nr(rt,gt,Mt,I,vr,y.id):new cr(rt,Oe,gt,vr),$.push(\"/a_\"+ae)}else{var Fr=tn(ae,gt,\"composite\");this.binders[ae]=new br(rt,Oe,gt,Mt,I,Fr),$.push(\"/z_\"+ae)}}}this.cacheKey=$.sort().join(\"\")};Ri.prototype.getMaxValue=function(y){var I=this.binders[y];return I instanceof cr||I instanceof br?I.maxValue:0},Ri.prototype.populatePaintArrays=function(y,I,U,$,ae){for(var he in this.binders){var Oe=this.binders[he];(Oe instanceof cr||Oe instanceof br||Oe instanceof Nr)&&Oe.populatePaintArray(y,I,U,$,ae)}},Ri.prototype.setConstantPatternPositions=function(y,I){for(var U in this.binders){var $=this.binders[U];$ instanceof ht&&$.setConstantPatternPositions(y,I)}},Ri.prototype.updatePaintArrays=function(y,I,U,$,ae){var he=!1;for(var Oe in y)for(var rt=I.getPositions(Oe),gt=0,Mt=rt;gt<Mt.length;gt+=1){var or=Mt[gt],_r=U.feature(or.index);for(var vr in this.binders){var Fr=this.binders[vr];if((Fr instanceof cr||Fr instanceof br||Fr instanceof Nr)&&Fr.expression.isStateDependent===!0){var ai=$.paint.get(vr);Fr.expression=ai.value,Fr.updatePaintArray(or.start,or.end,_r,y[Oe],ae),he=!0}}}return he},Ri.prototype.defines=function(){var y=[];for(var I in this.binders){var U=this.binders[I];(U instanceof Pt||U instanceof ht)&&y.push.apply(y,U.uniformNames.map(function($){return\"#define HAS_UNIFORM_\"+$}))}return y},Ri.prototype.getBinderAttributes=function(){var y=[];for(var I in this.binders){var U=this.binders[I];if(U instanceof cr||U instanceof br)for(var $=0;$<U.paintVertexAttributes.length;$++)y.push(U.paintVertexAttributes[$].name);else if(U instanceof Nr)for(var ae=0;ae<D.members.length;ae++)y.push(D.members[ae].name)}return y},Ri.prototype.getBinderUniforms=function(){var y=[];for(var I in this.binders){var U=this.binders[I];if(U instanceof Pt||U instanceof ht||U instanceof br)for(var $=0,ae=U.uniformNames;$<ae.length;$+=1){var he=ae[$];y.push(he)}}return y},Ri.prototype.getPaintVertexBuffers=function(){return this._buffers},Ri.prototype.getUniforms=function(y,I){var U=[];for(var $ in this.binders){var ae=this.binders[$];if(ae instanceof Pt||ae instanceof ht||ae instanceof br)for(var he=0,Oe=ae.uniformNames;he<Oe.length;he+=1){var rt=Oe[he];if(I[rt]){var gt=ae.getBinding(y,I[rt],rt);U.push({name:rt,property:$,binding:gt})}}}return U},Ri.prototype.setUniforms=function(y,I,U,$){for(var ae=0,he=I;ae<he.length;ae+=1){var Oe=he[ae],rt=Oe.name,gt=Oe.property,Mt=Oe.binding;this.binders[gt].setUniform(Mt,$,U.get(gt),rt)}},Ri.prototype.updatePaintBuffers=function(y){this._buffers=[];for(var I in this.binders){var U=this.binders[I];if(y&&U instanceof Nr){var $=y.fromScale===2?U.zoomInPaintVertexBuffer:U.zoomOutPaintVertexBuffer;$&&this._buffers.push($)}else(U instanceof cr||U instanceof br)&&U.paintVertexBuffer&&this._buffers.push(U.paintVertexBuffer)}},Ri.prototype.upload=function(y){for(var I in this.binders){var U=this.binders[I];(U instanceof cr||U instanceof br||U instanceof Nr)&&U.upload(y)}this.updatePaintBuffers()},Ri.prototype.destroy=function(){for(var y in this.binders){var I=this.binders[y];(I instanceof cr||I instanceof br||I instanceof Nr)&&I.destroy()}};var hi=function(y,I,U){U===void 0&&(U=function(){return!0}),this.programConfigurations={};for(var $=0,ae=y;$<ae.length;$+=1){var he=ae[$];this.programConfigurations[he.id]=new Ri(he,I,U)}this.needsUpload=!1,this._featureMap=new we,this._bufferOffset=0};hi.prototype.populatePaintArrays=function(y,I,U,$,ae,he){for(var Oe in this.programConfigurations)this.programConfigurations[Oe].populatePaintArrays(y,I,$,ae,he);I.id!==void 0&&this._featureMap.add(I.id,U,this._bufferOffset,y),this._bufferOffset=y,this.needsUpload=!0},hi.prototype.updatePaintArrays=function(y,I,U,$){for(var ae=0,he=U;ae<he.length;ae+=1){var Oe=he[ae];this.needsUpload=this.programConfigurations[Oe.id].updatePaintArrays(y,this._featureMap,I,Oe,$)||this.needsUpload}},hi.prototype.get=function(y){return this.programConfigurations[y]},hi.prototype.upload=function(y){if(this.needsUpload){for(var I in this.programConfigurations)this.programConfigurations[I].upload(y);this.needsUpload=!1}},hi.prototype.destroy=function(){for(var y in this.programConfigurations)this.programConfigurations[y].destroy()};function wi(m,y){var I={\"text-opacity\":[\"opacity\"],\"icon-opacity\":[\"opacity\"],\"text-color\":[\"fill_color\"],\"icon-color\":[\"fill_color\"],\"text-halo-color\":[\"halo_color\"],\"icon-halo-color\":[\"halo_color\"],\"text-halo-blur\":[\"halo_blur\"],\"icon-halo-blur\":[\"halo_blur\"],\"text-halo-width\":[\"halo_width\"],\"icon-halo-width\":[\"halo_width\"],\"line-gap-width\":[\"gapwidth\"],\"line-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-extrusion-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"]};return I[m]||[m.replace(y+\"-\",\"\").replace(/-/g,\"_\")]}function gn(m){var y={\"line-pattern\":{source:Xi,composite:Xi},\"fill-pattern\":{source:Xi,composite:Xi},\"fill-extrusion-pattern\":{source:Xi,composite:Xi}};return y[m]}function tn(m,y,I){var U={color:{source:nn,composite:ns},number:{source:Yi,composite:nn}},$=gn(m);return $&&$[I]||U[y][I]}X(\"ConstantBinder\",Pt),X(\"CrossFadedConstantBinder\",ht),X(\"SourceExpressionBinder\",cr),X(\"CrossFadedCompositeBinder\",Nr),X(\"CompositeExpressionBinder\",br),X(\"ProgramConfiguration\",Ri,{omit:[\"_buffers\"]}),X(\"ProgramConfigurationSet\",hi);var Ci=8192,qi=15,Vi=Math.pow(2,qi-1)-1,on=-Vi-1;function On(m){for(var y=Ci/m.extent,I=m.loadGeometry(),U=0;U<I.length;U++)for(var $=I[U],ae=0;ae<$.length;ae++){var he=$[ae],Oe=Math.round(he.x*y),rt=Math.round(he.y*y);he.x=p(Oe,on,Vi),he.y=p(rt,on,Vi),(Oe<he.x||Oe>he.x+1||rt<he.y||rt>he.y+1)&&re(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return I}function Ja(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?On(m):[]}}function co(m,y,I,U,$){m.emplaceBack(y*2+(U+1)/2,I*2+($+1)/2)}var rs=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Yr,this.indexArray=new vn,this.segments=new io,this.programConfigurations=new hi(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};rs.prototype.populate=function(y,I,U){var $=this.layers[0],ae=[],he=null;$.type===\"circle\"&&(he=$.layout.get(\"circle-sort-key\"));for(var Oe=0,rt=y;Oe<rt.length;Oe+=1){var gt=rt[Oe],Mt=gt.feature,or=gt.id,_r=gt.index,vr=gt.sourceLayerIndex,Fr=this.layers[0]._featureFilter.needGeometry,ai=Ja(Mt,Fr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),ai,U)){var Gi=he?he.evaluate(ai,{},U):void 0,Ti={id:or,properties:Mt.properties,type:Mt.type,sourceLayerIndex:vr,index:_r,geometry:Fr?ai.geometry:On(Mt),patterns:{},sortKey:Gi};ae.push(Ti)}}he&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var bn=0,rn=ae;bn<rn.length;bn+=1){var xn=rn[bn],Dn=xn,Zn=Dn.geometry,ga=Dn.index,ha=Dn.sourceLayerIndex,eo=y[ga].feature;this.addFeature(xn,Zn,ga,U),I.featureIndex.insert(eo,Zn,ga,ha,this.index)}},rs.prototype.update=function(y,I,U){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,U)},rs.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},rs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},rs.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,sl),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},rs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},rs.prototype.addFeature=function(y,I,U,$){for(var ae=0,he=I;ae<he.length;ae+=1)for(var Oe=he[ae],rt=0,gt=Oe;rt<gt.length;rt+=1){var Mt=gt[rt],or=Mt.x,_r=Mt.y;if(!(or<0||or>=Ci||_r<0||_r>=Ci)){var vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Fr=vr.vertexLength;co(this.layoutVertexArray,or,_r,-1,-1),co(this.layoutVertexArray,or,_r,1,-1),co(this.layoutVertexArray,or,_r,1,1),co(this.layoutVertexArray,or,_r,-1,1),this.indexArray.emplaceBack(Fr,Fr+1,Fr+2),this.indexArray.emplaceBack(Fr,Fr+3,Fr+2),vr.vertexLength+=4,vr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,{},$)},X(\"CircleBucket\",rs,{omit:[\"layers\"]});function so(m,y){for(var I=0;I<m.length;I++)if(Td(y,m[I]))return!0;for(var U=0;U<y.length;U++)if(Td(m,y[U]))return!0;return!!kv(m,y)}function Zo(m,y,I){return!!(Td(m,y)||Yv(y,m,I))}function ys(m,y){if(m.length===1)return dp(y,m[0]);for(var I=0;I<y.length;I++)for(var U=y[I],$=0;$<U.length;$++)if(Td(m,U[$]))return!0;for(var ae=0;ae<m.length;ae++)if(dp(y,m[ae]))return!0;for(var he=0;he<y.length;he++)if(kv(m,y[he]))return!0;return!1}function ou(m,y,I){for(var U=0;U<y.length;U++){var $=y[U];if(m.length>=3){for(var ae=0;ae<$.length;ae++)if(Td(m,$[ae]))return!0}if(Cv(m,$,I))return!0}return!1}function Cv(m,y,I){if(m.length>1){if(kv(m,y))return!0;for(var U=0;U<y.length;U++)if(Yv(y[U],m,I))return!0}for(var $=0;$<m.length;$++)if(Yv(m[$],y,I))return!0;return!1}function kv(m,y){if(m.length===0||y.length===0)return!1;for(var I=0;I<m.length-1;I++)for(var U=m[I],$=m[I+1],ae=0;ae<y.length-1;ae++){var he=y[ae],Oe=y[ae+1];if(wd(U,$,he,Oe))return!0}return!1}function wd(m,y,I,U){return oe(m,I,U)!==oe(y,I,U)&&oe(m,y,I)!==oe(m,y,U)}function Yv(m,y,I){var U=I*I;if(y.length===1)return m.distSqr(y[0])<U;for(var $=1;$<y.length;$++){var ae=y[$-1],he=y[$];if(cg(m,ae,he)<U)return!0}return!1}function cg(m,y,I){var U=y.distSqr(I);if(U===0)return m.distSqr(y);var $=((m.x-y.x)*(I.x-y.x)+(m.y-y.y)*(I.y-y.y))/U;return $<0?m.distSqr(y):$>1?m.distSqr(I):m.distSqr(I.sub(y)._mult($)._add(y))}function dp(m,y){for(var I=!1,U,$,ae,he=0;he<m.length;he++){U=m[he];for(var Oe=0,rt=U.length-1;Oe<U.length;rt=Oe++)$=U[Oe],ae=U[rt],$.y>y.y!=ae.y>y.y&&y.x<(ae.x-$.x)*(y.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(m,y){for(var I=!1,U=0,$=m.length-1;U<m.length;$=U++){var ae=m[U],he=m[$];ae.y>y.y!=he.y>y.y&&y.x<(he.x-ae.x)*(y.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function vp(m,y,I,U,$){for(var ae=0,he=m;ae<he.length;ae+=1){var Oe=he[ae];if(y<=Oe.x&&I<=Oe.y&&U>=Oe.x&&$>=Oe.y)return!0}var rt=[new u(y,I),new u(y,$),new u(U,$),new u(U,I)];if(m.length>2)for(var gt=0,Mt=rt;gt<Mt.length;gt+=1){var or=Mt[gt];if(Td(m,or))return!0}for(var _r=0;_r<m.length-1;_r++){var vr=m[_r],Fr=m[_r+1];if(Vd(vr,Fr,rt))return!0}return!1}function Vd(m,y,I){var U=I[0],$=I[2];if(m.x<U.x&&y.x<U.x||m.x>$.x&&y.x>$.x||m.y<U.y&&y.y<U.y||m.y>$.y&&y.y>$.y)return!1;var ae=oe(m,y,I[0]);return ae!==oe(m,y,I[1])||ae!==oe(m,y,I[2])||ae!==oe(m,y,I[3])}function Ad(m,y,I){var U=y.paint.get(m).value;return U.kind===\"constant\"?U.value:I.programConfigurations.get(y.id).getMaxValue(m)}function Lv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kv(m,y,I,U,$){if(!y[0]&&!y[1])return m;var ae=u.convert(y)._mult($);I===\"viewport\"&&ae._rotate(-U);for(var he=[],Oe=0;Oe<m.length;Oe++){var rt=m[Oe];he.push(rt.sub(ae))}return he}var Pv=new Br({\"circle-sort-key\":new xt(Fn.layout_circle[\"circle-sort-key\"])}),ny=new Br({\"circle-radius\":new xt(Fn.paint_circle[\"circle-radius\"]),\"circle-color\":new xt(Fn.paint_circle[\"circle-color\"]),\"circle-blur\":new xt(Fn.paint_circle[\"circle-blur\"]),\"circle-opacity\":new xt(Fn.paint_circle[\"circle-opacity\"]),\"circle-translate\":new Ee(Fn.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new Ee(Fn.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new Ee(Fn.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new Ee(Fn.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new xt(Fn.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new xt(Fn.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new xt(Fn.paint_circle[\"circle-stroke-opacity\"])}),fg={paint:ny,layout:Pv},oh=typeof Float32Array!=\"undefined\"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var m=arguments,y=0,I=arguments.length;I--;)y+=m[I]*m[I];return Math.sqrt(y)});function hg(){var m=new oh(4);return oh!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}function ay(m,y,I){var U=y[0],$=y[1],ae=y[2],he=y[3],Oe=Math.sin(I),rt=Math.cos(I);return m[0]=U*rt+ae*Oe,m[1]=$*rt+he*Oe,m[2]=U*-Oe+ae*rt,m[3]=$*-Oe+he*rt,m}function Gh(){var m=new oh(9);return oh!=Float32Array&&(m[1]=0,m[2]=0,m[3]=0,m[5]=0,m[6]=0,m[7]=0),m[0]=1,m[4]=1,m[8]=1,m}function rm(m,y){var I=Math.sin(y),U=Math.cos(y);return m[0]=U,m[1]=I,m[2]=0,m[3]=-I,m[4]=U,m[5]=0,m[6]=0,m[7]=0,m[8]=1,m}function w1(){var m=new oh(16);return oh!=Float32Array&&(m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[11]=0,m[12]=0,m[13]=0,m[14]=0),m[0]=1,m[5]=1,m[10]=1,m[15]=1,m}function T1(m){var y=new oh(16);return y[0]=m[0],y[1]=m[1],y[2]=m[2],y[3]=m[3],y[4]=m[4],y[5]=m[5],y[6]=m[6],y[7]=m[7],y[8]=m[8],y[9]=m[9],y[10]=m[10],y[11]=m[11],y[12]=m[12],y[13]=m[13],y[14]=m[14],y[15]=m[15],y}function oy(m){return m[0]=1,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=1,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=1,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}function im(m,y){var I=y[0],U=y[1],$=y[2],ae=y[3],he=y[4],Oe=y[5],rt=y[6],gt=y[7],Mt=y[8],or=y[9],_r=y[10],vr=y[11],Fr=y[12],ai=y[13],Gi=y[14],Ti=y[15],bn=I*Oe-U*he,rn=I*rt-$*he,xn=I*gt-ae*he,Dn=U*rt-$*Oe,Zn=U*gt-ae*Oe,ga=$*gt-ae*rt,ha=Mt*ai-or*Fr,eo=Mt*Gi-_r*Fr,za=Mt*Ti-vr*Fr,Za=or*Gi-_r*ai,Ko=or*Ti-vr*ai,to=_r*Ti-vr*Gi,ao=bn*to-rn*Ko+xn*Za+Dn*za-Zn*eo+ga*ha;return ao?(ao=1/ao,m[0]=(Oe*to-rt*Ko+gt*Za)*ao,m[1]=($*Ko-U*to-ae*Za)*ao,m[2]=(ai*ga-Gi*Zn+Ti*Dn)*ao,m[3]=(_r*Zn-or*ga-vr*Dn)*ao,m[4]=(rt*za-he*to-gt*eo)*ao,m[5]=(I*to-$*za+ae*eo)*ao,m[6]=(Gi*xn-Fr*ga-Ti*rn)*ao,m[7]=(Mt*ga-_r*xn+vr*rn)*ao,m[8]=(he*Ko-Oe*za+gt*ha)*ao,m[9]=(U*za-I*Ko-ae*ha)*ao,m[10]=(Fr*Zn-ai*xn+Ti*bn)*ao,m[11]=(or*xn-Mt*Zn-vr*bn)*ao,m[12]=(Oe*eo-he*Za-rt*ha)*ao,m[13]=(I*Za-U*eo+$*ha)*ao,m[14]=(ai*rn-Fr*Dn-Gi*bn)*ao,m[15]=(Mt*Dn-or*rn+_r*bn)*ao,m):null}function nm(m,y,I){var U=y[0],$=y[1],ae=y[2],he=y[3],Oe=y[4],rt=y[5],gt=y[6],Mt=y[7],or=y[8],_r=y[9],vr=y[10],Fr=y[11],ai=y[12],Gi=y[13],Ti=y[14],bn=y[15],rn=I[0],xn=I[1],Dn=I[2],Zn=I[3];return m[0]=rn*U+xn*Oe+Dn*or+Zn*ai,m[1]=rn*$+xn*rt+Dn*_r+Zn*Gi,m[2]=rn*ae+xn*gt+Dn*vr+Zn*Ti,m[3]=rn*he+xn*Mt+Dn*Fr+Zn*bn,rn=I[4],xn=I[5],Dn=I[6],Zn=I[7],m[4]=rn*U+xn*Oe+Dn*or+Zn*ai,m[5]=rn*$+xn*rt+Dn*_r+Zn*Gi,m[6]=rn*ae+xn*gt+Dn*vr+Zn*Ti,m[7]=rn*he+xn*Mt+Dn*Fr+Zn*bn,rn=I[8],xn=I[9],Dn=I[10],Zn=I[11],m[8]=rn*U+xn*Oe+Dn*or+Zn*ai,m[9]=rn*$+xn*rt+Dn*_r+Zn*Gi,m[10]=rn*ae+xn*gt+Dn*vr+Zn*Ti,m[11]=rn*he+xn*Mt+Dn*Fr+Zn*bn,rn=I[12],xn=I[13],Dn=I[14],Zn=I[15],m[12]=rn*U+xn*Oe+Dn*or+Zn*ai,m[13]=rn*$+xn*rt+Dn*_r+Zn*Gi,m[14]=rn*ae+xn*gt+Dn*vr+Zn*Ti,m[15]=rn*he+xn*Mt+Dn*Fr+Zn*bn,m}function vc(m,y,I){var U=I[0],$=I[1],ae=I[2],he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti;return y===m?(m[12]=y[0]*U+y[4]*$+y[8]*ae+y[12],m[13]=y[1]*U+y[5]*$+y[9]*ae+y[13],m[14]=y[2]*U+y[6]*$+y[10]*ae+y[14],m[15]=y[3]*U+y[7]*$+y[11]*ae+y[15]):(he=y[0],Oe=y[1],rt=y[2],gt=y[3],Mt=y[4],or=y[5],_r=y[6],vr=y[7],Fr=y[8],ai=y[9],Gi=y[10],Ti=y[11],m[0]=he,m[1]=Oe,m[2]=rt,m[3]=gt,m[4]=Mt,m[5]=or,m[6]=_r,m[7]=vr,m[8]=Fr,m[9]=ai,m[10]=Gi,m[11]=Ti,m[12]=he*U+Mt*$+Fr*ae+y[12],m[13]=Oe*U+or*$+ai*ae+y[13],m[14]=rt*U+_r*$+Gi*ae+y[14],m[15]=gt*U+vr*$+Ti*ae+y[15]),m}function eu(m,y,I){var U=I[0],$=I[1],ae=I[2];return m[0]=y[0]*U,m[1]=y[1]*U,m[2]=y[2]*U,m[3]=y[3]*U,m[4]=y[4]*$,m[5]=y[5]*$,m[6]=y[6]*$,m[7]=y[7]*$,m[8]=y[8]*ae,m[9]=y[9]*ae,m[10]=y[10]*ae,m[11]=y[11]*ae,m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15],m}function Sd(m,y,I){var U=Math.sin(I),$=Math.cos(I),ae=y[4],he=y[5],Oe=y[6],rt=y[7],gt=y[8],Mt=y[9],or=y[10],_r=y[11];return y!==m&&(m[0]=y[0],m[1]=y[1],m[2]=y[2],m[3]=y[3],m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15]),m[4]=ae*$+gt*U,m[5]=he*$+Mt*U,m[6]=Oe*$+or*U,m[7]=rt*$+_r*U,m[8]=gt*$-ae*U,m[9]=Mt*$-he*U,m[10]=or*$-Oe*U,m[11]=_r*$-rt*U,m}function sy(m,y,I){var U=Math.sin(I),$=Math.cos(I),ae=y[0],he=y[1],Oe=y[2],rt=y[3],gt=y[4],Mt=y[5],or=y[6],_r=y[7];return y!==m&&(m[8]=y[8],m[9]=y[9],m[10]=y[10],m[11]=y[11],m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15]),m[0]=ae*$+gt*U,m[1]=he*$+Mt*U,m[2]=Oe*$+or*U,m[3]=rt*$+_r*U,m[4]=gt*$-ae*U,m[5]=Mt*$-he*U,m[6]=or*$-Oe*U,m[7]=_r*$-rt*U,m}function A1(m,y,I,U,$){var ae=1/Math.tan(y/2),he;return m[0]=ae/I,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=ae,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[11]=-1,m[12]=0,m[13]=0,m[15]=0,$!=null&&$!==1/0?(he=1/(U-$),m[10]=($+U)*he,m[14]=2*$*U*he):(m[10]=-1,m[14]=-2*U),m}function wu(m,y,I,U,$,ae,he){var Oe=1/(y-I),rt=1/(U-$),gt=1/(ae-he);return m[0]=-2*Oe,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=-2*rt,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=2*gt,m[11]=0,m[12]=(y+I)*Oe,m[13]=($+U)*rt,m[14]=(he+ae)*gt,m[15]=1,m}var Bx=nm;function am(){var m=new oh(3);return oh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0),m}function Mw(m){var y=new oh(3);return y[0]=m[0],y[1]=m[1],y[2]=m[2],y}function Iv(m,y,I){return m[0]=y[0]+I[0],m[1]=y[1]+I[1],m[2]=y[2]+I[2],m}function om(m,y,I){return m[0]=y[0]-I[0],m[1]=y[1]-I[1],m[2]=y[2]-I[2],m}function Ew(m,y,I){return m[0]=y[0]*I,m[1]=y[1]*I,m[2]=y[2]*I,m}function Nx(m,y){var I=y[0],U=y[1],$=y[2],ae=I*I+U*U+$*$;return ae>0&&(ae=1/Math.sqrt(ae)),m[0]=y[0]*ae,m[1]=y[1]*ae,m[2]=y[2]*ae,m}function F9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function z9(m,y,I){var U=y[0],$=y[1],ae=y[2],he=I[0],Oe=I[1],rt=I[2];return m[0]=$*rt-ae*Oe,m[1]=ae*he-U*rt,m[2]=U*Oe-$*he,m}function O9(m,y,I){var U=y[0],$=y[1],ae=y[2];return m[0]=U*I[0]+$*I[3]+ae*I[6],m[1]=U*I[1]+$*I[4]+ae*I[7],m[2]=U*I[2]+$*I[5]+ae*I[8],m}var q9=om,EQ=function(){var m=am();return function(y,I,U,$,ae,he){var Oe,rt;for(I||(I=3),U||(U=0),$?rt=Math.min($*I+U,y.length):rt=y.length,Oe=U;Oe<rt;Oe+=I)m[0]=y[Oe],m[1]=y[Oe+1],m[2]=y[Oe+2],ae(m,m,he),y[Oe]=m[0],y[Oe+1]=m[1],y[Oe+2]=m[2];return y}}();function B9(){var m=new oh(4);return oh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0,m[3]=0),m}function N9(m,y,I){return m[0]=y[0]*I,m[1]=y[1]*I,m[2]=y[2]*I,m[3]=y[3]*I,m}function U9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]+m[3]*y[3]}function ly(m,y,I){var U=y[0],$=y[1],ae=y[2],he=y[3];return m[0]=I[0]*U+I[4]*$+I[8]*ae+I[12]*he,m[1]=I[1]*U+I[5]*$+I[9]*ae+I[13]*he,m[2]=I[2]*U+I[6]*$+I[10]*ae+I[14]*he,m[3]=I[3]*U+I[7]*$+I[11]*ae+I[15]*he,m}var Ux=function(){var m=B9();return function(y,I,U,$,ae,he){var Oe,rt;for(I||(I=4),U||(U=0),$?rt=Math.min($*I+U,y.length):rt=y.length,Oe=U;Oe<rt;Oe+=I)m[0]=y[Oe],m[1]=y[Oe+1],m[2]=y[Oe+2],m[3]=y[Oe+3],ae(m,m,he),y[Oe]=m[0],y[Oe+1]=m[1],y[Oe+2]=m[2],y[Oe+3]=m[3];return y}}();function gk(){var m=new oh(2);return oh!=Float32Array&&(m[0]=0,m[1]=0),m}function tS(m){var y=m[0],I=m[1];return y*y+I*I}var rS=tS,CQ=function(){var m=gk();return function(y,I,U,$,ae,he){var Oe,rt;for(I||(I=2),U||(U=0),$?rt=Math.min($*I+U,y.length):rt=y.length,Oe=U;Oe<rt;Oe+=I)m[0]=y[Oe],m[1]=y[Oe+1],ae(m,m,he),y[Oe]=m[0],y[Oe+1]=m[1];return y}}(),V9=function(m){function y(I){m.call(this,I,fg)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new rs(U)},y.prototype.queryRadius=function(U){var $=U;return Ad(\"circle-radius\",this,$)+Ad(\"circle-stroke-width\",this,$)+Lv(this.paint.get(\"circle-translate\"))},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt,Mt){for(var or=Kv(U,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),rt.angle,gt),_r=this.paint.get(\"circle-radius\").evaluate($,ae),vr=this.paint.get(\"circle-stroke-width\").evaluate($,ae),Fr=_r+vr,ai=this.paint.get(\"circle-pitch-alignment\")===\"map\",Gi=ai?or:yk(or,Mt),Ti=ai?Fr*gt:Fr,bn=0,rn=he;bn<rn.length;bn+=1)for(var xn=rn[bn],Dn=0,Zn=xn;Dn<Zn.length;Dn+=1){var ga=Zn[Dn],ha=ai?ga:mk(ga,Mt),eo=Ti,za=ly([],[ga.x,ga.y,0,1],Mt);if(this.paint.get(\"circle-pitch-scale\")===\"viewport\"&&this.paint.get(\"circle-pitch-alignment\")===\"map\"?eo*=za[3]/rt.cameraToCenterDistance:this.paint.get(\"circle-pitch-scale\")===\"map\"&&this.paint.get(\"circle-pitch-alignment\")===\"viewport\"&&(eo*=rt.cameraToCenterDistance/za[3]),Zo(Gi,ha,eo))return!0}return!1},y}(mi);function mk(m,y){var I=ly([],[m.x,m.y,0,1],y);return new u(I[0]/I[3],I[1]/I[3])}function yk(m,y){return m.map(function(I){return mk(I,y)})}var iS=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(rs);X(\"HeatmapBucket\",iS,{omit:[\"layers\"]});function Md(m,y,I,U){var $=y.width,ae=y.height;if(!U)U=new Uint8Array($*ae*I);else if(U instanceof Uint8ClampedArray)U=new Uint8Array(U.buffer);else if(U.length!==$*ae*I)throw new RangeError(\"mismatched image size\");return m.width=$,m.height=ae,m.data=U,m}function Cw(m,y,I){var U=y.width,$=y.height;if(!(U===m.width&&$===m.height)){var ae=Md({},{width:U,height:$},I);kw(m,ae,{x:0,y:0},{x:0,y:0},{width:Math.min(m.width,U),height:Math.min(m.height,$)},I),m.width=U,m.height=$,m.data=ae.data}}function kw(m,y,I,U,$,ae){if($.width===0||$.height===0)return y;if($.width>m.width||$.height>m.height||I.x>m.width-$.width||I.y>m.height-$.height)throw new RangeError(\"out of range source coordinates for image copy\");if($.width>y.width||$.height>y.height||U.x>y.width-$.width||U.y>y.height-$.height)throw new RangeError(\"out of range destination coordinates for image copy\");for(var he=m.data,Oe=y.data,rt=0;rt<$.height;rt++)for(var gt=((I.y+rt)*m.width+I.x)*ae,Mt=((U.y+rt)*y.width+U.x)*ae,or=0;or<$.width*ae;or++)Oe[Mt+or]=he[gt+or];return y}var Rv=function(y,I){Md(this,y,1,I)};Rv.prototype.resize=function(y){Cw(this,y,1)},Rv.prototype.clone=function(){return new Rv({width:this.width,height:this.height},new Uint8Array(this.data))},Rv.copy=function(y,I,U,$,ae){kw(y,I,U,$,ae,1)};var wh=function(y,I){Md(this,y,4,I)};wh.prototype.resize=function(y){Cw(this,y,4)},wh.prototype.replace=function(y,I){I?this.data.set(y):y instanceof Uint8ClampedArray?this.data=new Uint8Array(y.buffer):this.data=y},wh.prototype.clone=function(){return new wh({width:this.width,height:this.height},new Uint8Array(this.data))},wh.copy=function(y,I,U,$,ae){kw(y,I,U,$,ae,4)},X(\"AlphaImage\",Rv),X(\"RGBAImage\",wh);var Vx=new Br({\"heatmap-radius\":new xt(Fn.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new xt(Fn.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new Ee(Fn.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new Hr(Fn.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new Ee(Fn.paint_heatmap[\"heatmap-opacity\"])}),S1={paint:Vx};function Gx(m){var y={},I=m.resolution||256,U=m.clips?m.clips.length:1,$=m.image||new wh({width:I,height:U}),ae=function(bn,rn,xn){y[m.evaluationKey]=xn;var Dn=m.expression.evaluate(y);$.data[bn+rn+0]=Math.floor(Dn.r*255/Dn.a),$.data[bn+rn+1]=Math.floor(Dn.g*255/Dn.a),$.data[bn+rn+2]=Math.floor(Dn.b*255/Dn.a),$.data[bn+rn+3]=Math.floor(Dn.a*255)};if(m.clips)for(var gt=0,Mt=0;gt<U;++gt,Mt+=I*4)for(var or=0,_r=0;or<I;or++,_r+=4){var vr=or/(I-1),Fr=m.clips[gt],ai=Fr.start,Gi=Fr.end,Ti=ai*(1-vr)+Gi*vr;ae(Mt,_r,Ti)}else for(var he=0,Oe=0;he<I;he++,Oe+=4){var rt=he/(I-1);ae(0,Oe,rt)}return $}var Lw=function(m){function y(I){m.call(this,I,S1),this._updateColorRamp()}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new iS(U)},y.prototype._handleSpecialPaintPropertyUpdate=function(U){U===\"heatmap-color\"&&this._updateColorRamp()},y.prototype._updateColorRamp=function(){var U=this._transitionablePaint._values[\"heatmap-color\"].value.expression;this.colorRamp=Gx({expression:U,evaluationKey:\"heatmapDensity\",image:this.colorRamp}),this.colorRampTexture=null},y.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},y.prototype.queryRadius=function(){return 0},y.prototype.queryIntersectsFeature=function(){return!1},y.prototype.hasOffscreenPass=function(){return this.paint.get(\"heatmap-opacity\")!==0&&this.visibility!==\"none\"},y}(mi),G9=new Br({\"hillshade-illumination-direction\":new Ee(Fn.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new Ee(Fn.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new Ee(Fn.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new Ee(Fn.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new Ee(Fn.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new Ee(Fn.paint_hillshade[\"hillshade-accent-color\"])}),H9={paint:G9},_k=function(m){function y(I){m.call(this,I,H9)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.hasOffscreenPass=function(){return this.paint.get(\"hillshade-exaggeration\")!==0&&this.visibility!==\"none\"},y}(mi),xk=ji([{name:\"a_pos\",components:2,type:\"Int16\"}],4),j9=xk.members,Pw=M1,bk=M1;function M1(m,y,I){I=I||2;var U=y&&y.length,$=U?y[0]*I:m.length,ae=Iw(m,0,$,I,!0),he=[];if(!ae||ae.next===ae.prev)return he;var Oe,rt,gt,Mt,or,_r,vr;if(U&&(ae=lm(m,y,ae,I)),m.length>80*I){Oe=gt=m[0],rt=Mt=m[1];for(var Fr=I;Fr<$;Fr+=I)or=m[Fr],_r=m[Fr+1],or<Oe&&(Oe=or),_r<rt&&(rt=_r),or>gt&&(gt=or),_r>Mt&&(Mt=_r);vr=Math.max(gt-Oe,Mt-rt),vr=vr!==0?1/vr:0}return Hx(ae,he,I,Oe,rt,vr),he}function Iw(m,y,I,U,$){var ae,he;if($===cS(m,y,I,U)>0)for(ae=y;ae<I;ae+=U)he=Mk(ae,m[ae],m[ae+1],he);else for(ae=I-U;ae>=y;ae-=U)he=Mk(ae,m[ae],m[ae+1],he);return he&&Wx(he,he.next)&&(Yx(he),he=he.next),he}function sm(m,y){if(!m)return m;y||(y=m);var I=m,U;do if(U=!1,!I.steiner&&(Wx(I,I.next)||wf(I.prev,I,I.next)===0)){if(Yx(I),I=y=I.prev,I===I.next)break;U=!0}else I=I.next;while(U||I!==y);return y}function Hx(m,y,I,U,$,ae,he){if(m){!he&&ae&&Rw(m,U,$,ae);for(var Oe=m,rt,gt;m.prev!==m.next;){if(rt=m.prev,gt=m.next,ae?Tk(m,U,$,ae):wk(m)){y.push(rt.i/I),y.push(m.i/I),y.push(gt.i/I),Yx(m),m=gt.next,Oe=gt.next;continue}if(m=gt,m===Oe){he?he===1?(m=jx(sm(m),y,I),Hx(m,y,I,U,$,ae,2)):he===2&&v0(m,y,I,U,$,ae):Hx(sm(m),y,I,U,$,ae,1);break}}}}function wk(m){var y=m.prev,I=m,U=m.next;if(wf(y,I,U)>=0)return!1;for(var $=m.next.next;$!==m.prev;){if(um(y.x,y.y,I.x,I.y,U.x,U.y,$.x,$.y)&&wf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function Tk(m,y,I,U){var $=m.prev,ae=m,he=m.next;if(wf($,ae,he)>=0)return!1;for(var Oe=$.x<ae.x?$.x<he.x?$.x:he.x:ae.x<he.x?ae.x:he.x,rt=$.y<ae.y?$.y<he.y?$.y:he.y:ae.y<he.y?ae.y:he.y,gt=$.x>ae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Mt=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,or=oS(Oe,rt,y,I,U),_r=oS(gt,Mt,y,I,U),vr=m.prevZ,Fr=m.nextZ;vr&&vr.z>=or&&Fr&&Fr.z<=_r;){if(vr!==m.prev&&vr!==m.next&&um($.x,$.y,ae.x,ae.y,he.x,he.y,vr.x,vr.y)&&wf(vr.prev,vr,vr.next)>=0||(vr=vr.prevZ,Fr!==m.prev&&Fr!==m.next&&um($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&wf(Fr.prev,Fr,Fr.next)>=0))return!1;Fr=Fr.nextZ}for(;vr&&vr.z>=or;){if(vr!==m.prev&&vr!==m.next&&um($.x,$.y,ae.x,ae.y,he.x,he.y,vr.x,vr.y)&&wf(vr.prev,vr,vr.next)>=0)return!1;vr=vr.prevZ}for(;Fr&&Fr.z<=_r;){if(Fr!==m.prev&&Fr!==m.next&&um($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&wf(Fr.prev,Fr,Fr.next)>=0)return!1;Fr=Fr.nextZ}return!0}function jx(m,y,I){var U=m;do{var $=U.prev,ae=U.next.next;!Wx($,ae)&&Dw($,U,U.next,ae)&&Zx($,ae)&&Zx(ae,$)&&(y.push($.i/I),y.push(U.i/I),y.push(ae.i/I),Yx(U),Yx(U.next),U=m=ae),U=U.next}while(U!==m);return sm(U)}function v0(m,y,I,U,$,ae){var he=m;do{for(var Oe=he.next.next;Oe!==he.prev;){if(he.i!==Oe.i&&E1(he,Oe)){var rt=lS(he,Oe);he=sm(he,he.next),rt=sm(rt,rt.next),Hx(he,y,I,U,$,ae),Hx(rt,y,I,U,$,ae);return}Oe=Oe.next}he=he.next}while(he!==m)}function lm(m,y,I,U){var $=[],ae,he,Oe,rt,gt;for(ae=0,he=y.length;ae<he;ae++)Oe=y[ae]*U,rt=ae<he-1?y[ae+1]*U:m.length,gt=Iw(m,Oe,rt,U,!1),gt===gt.next&&(gt.steiner=!0),$.push(sS(gt));for($.sort(Ak),ae=0;ae<$.length;ae++)nS($[ae],I),I=sm(I,I.next);return I}function Ak(m,y){return m.x-y.x}function nS(m,y){if(y=W9(m,y),y){var I=lS(y,m);sm(y,y.next),sm(I,I.next)}}function W9(m,y){var I=y,U=m.x,$=m.y,ae=-1/0,he;do{if($<=I.y&&$>=I.next.y&&I.next.y!==I.y){var Oe=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Oe<=U&&Oe>ae){if(ae=Oe,Oe===U){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x<I.next.x?I:I.next}}I=I.next}while(I!==y);if(!he)return null;if(U===ae)return he;var rt=he,gt=he.x,Mt=he.y,or=1/0,_r;I=he;do U>=I.x&&I.x>=gt&&U!==I.x&&um($<Mt?U:ae,$,gt,Mt,$<Mt?ae:U,$,I.x,I.y)&&(_r=Math.abs($-I.y)/(U-I.x),Zx(I,m)&&(_r<or||_r===or&&(I.x>he.x||I.x===he.x&&X9(he,I)))&&(he=I,or=_r)),I=I.next;while(I!==rt);return he}function X9(m,y){return wf(m.prev,m,y.prev)<0&&wf(y.next,m,m.next)<0}function Rw(m,y,I,U){var $=m;do $.z===null&&($.z=oS($.x,$.y,y,I,U)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==m);$.prevZ.nextZ=null,$.prevZ=null,aS($)}function aS(m){var y,I,U,$,ae,he,Oe,rt,gt=1;do{for(I=m,m=null,ae=null,he=0;I;){for(he++,U=I,Oe=0,y=0;y<gt&&(Oe++,U=U.nextZ,!!U);y++);for(rt=gt;Oe>0||rt>0&&U;)Oe!==0&&(rt===0||!U||I.z<=U.z)?($=I,I=I.nextZ,Oe--):($=U,U=U.nextZ,rt--),ae?ae.nextZ=$:m=$,$.prevZ=ae,ae=$;I=U}ae.nextZ=null,gt*=2}while(he>1);return m}function oS(m,y,I,U,$){return m=32767*(m-I)*$,y=32767*(y-U)*$,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,m|y<<1}function sS(m){var y=m,I=m;do(y.x<I.x||y.x===I.x&&y.y<I.y)&&(I=y),y=y.next;while(y!==m);return I}function um(m,y,I,U,$,ae,he,Oe){return($-he)*(y-Oe)-(m-he)*(ae-Oe)>=0&&(m-he)*(U-Oe)-(I-he)*(y-Oe)>=0&&(I-he)*(ae-Oe)-($-he)*(U-Oe)>=0}function E1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!Sk(m,y)&&(Zx(m,y)&&Zx(y,m)&&Z9(m,y)&&(wf(m.prev,m,y.prev)||wf(m,y.prev,y))||Wx(m,y)&&wf(m.prev,m,m.next)>0&&wf(y.prev,y,y.next)>0)}function wf(m,y,I){return(y.y-m.y)*(I.x-y.x)-(y.x-m.x)*(I.y-y.y)}function Wx(m,y){return m.x===y.x&&m.y===y.y}function Dw(m,y,I,U){var $=uy(wf(m,y,I)),ae=uy(wf(m,y,U)),he=uy(wf(I,U,m)),Oe=uy(wf(I,U,y));return!!($!==ae&&he!==Oe||$===0&&Xx(m,I,y)||ae===0&&Xx(m,U,y)||he===0&&Xx(I,m,U)||Oe===0&&Xx(I,y,U))}function Xx(m,y,I){return y.x<=Math.max(m.x,I.x)&&y.x>=Math.min(m.x,I.x)&&y.y<=Math.max(m.y,I.y)&&y.y>=Math.min(m.y,I.y)}function uy(m){return m>0?1:m<0?-1:0}function Sk(m,y){var I=m;do{if(I.i!==m.i&&I.next.i!==m.i&&I.i!==y.i&&I.next.i!==y.i&&Dw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function Zx(m,y){return wf(m.prev,m,m.next)<0?wf(m,y,m.next)>=0&&wf(m,m.prev,y)>=0:wf(m,y,m.prev)<0||wf(m,m.next,y)<0}function Z9(m,y){var I=m,U=!1,$=(m.x+y.x)/2,ae=(m.y+y.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(U=!U),I=I.next;while(I!==m);return U}function lS(m,y){var I=new uS(m.i,m.x,m.y),U=new uS(y.i,y.x,y.y),$=m.next,ae=y.prev;return m.next=y,y.prev=m,I.next=$,$.prev=I,U.next=I,I.prev=U,ae.next=U,U.prev=ae,U}function Mk(m,y,I,U){var $=new uS(m,y,I);return U?($.next=U.next,$.prev=U,U.next.prev=$,U.next=$):($.prev=$,$.next=$),$}function Yx(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function uS(m,y,I){this.i=m,this.x=y,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}M1.deviation=function(m,y,I,U){var $=y&&y.length,ae=$?y[0]*I:m.length,he=Math.abs(cS(m,0,ae,I));if($)for(var Oe=0,rt=y.length;Oe<rt;Oe++){var gt=y[Oe]*I,Mt=Oe<rt-1?y[Oe+1]*I:m.length;he-=Math.abs(cS(m,gt,Mt,I))}var or=0;for(Oe=0;Oe<U.length;Oe+=3){var _r=U[Oe]*I,vr=U[Oe+1]*I,Fr=U[Oe+2]*I;or+=Math.abs((m[_r]-m[Fr])*(m[vr+1]-m[_r+1])-(m[_r]-m[vr])*(m[Fr+1]-m[_r+1]))}return he===0&&or===0?0:Math.abs((or-he)/he)};function cS(m,y,I,U){for(var $=0,ae=y,he=I-U;ae<I;ae+=U)$+=(m[he]-m[ae])*(m[ae+1]+m[he+1]),he=ae;return $}M1.flatten=function(m){for(var y=m[0][0].length,I={vertices:[],holes:[],dimensions:y},U=0,$=0;$<m.length;$++){for(var ae=0;ae<m[$].length;ae++)for(var he=0;he<y;he++)I.vertices.push(m[$][ae][he]);$>0&&(U+=m[$-1].length,I.holes.push(U))}return I},Pw.default=bk;function fS(m,y,I,U,$){dg(m,y,I||0,U||m.length-1,$||Ek)}function dg(m,y,I,U,$){for(;U>I;){if(U-I>600){var ae=U-I+1,he=y-I+1,Oe=Math.log(ae),rt=.5*Math.exp(2*Oe/3),gt=.5*Math.sqrt(Oe*rt*(ae-rt)/ae)*(he-ae/2<0?-1:1),Mt=Math.max(I,Math.floor(y-he*rt/ae+gt)),or=Math.min(U,Math.floor(y+(ae-he)*rt/ae+gt));dg(m,y,Mt,or,$)}var _r=m[y],vr=I,Fr=U;for(C1(m,I,y),$(m[U],_r)>0&&C1(m,I,U);vr<Fr;){for(C1(m,vr,Fr),vr++,Fr--;$(m[vr],_r)<0;)vr++;for(;$(m[Fr],_r)>0;)Fr--}$(m[I],_r)===0?C1(m,I,Fr):(Fr++,C1(m,Fr,U)),Fr<=y&&(I=Fr+1),y<=Fr&&(U=Fr-1)}}function C1(m,y,I){var U=m[y];m[y]=m[I],m[I]=U}function Ek(m,y){return m<y?-1:m>y?1:0}function Fw(m,y){var I=m.length;if(I<=1)return[m];for(var U=[],$,ae,he=0;he<I;he++){var Oe=_e(m[he]);Oe!==0&&(m[he].area=Math.abs(Oe),ae===void 0&&(ae=Oe<0),ae===Oe<0?($&&U.push($),$=[m[he]]):$.push(m[he]))}if($&&U.push($),y>1)for(var rt=0;rt<U.length;rt++)U[rt].length<=y||(fS(U[rt],y,1,U[rt].length-1,Ck),U[rt]=U[rt].slice(0,y));return U}function Ck(m,y){return y.area-m.area}function zw(m,y,I){for(var U=I.patternDependencies,$=!1,ae=0,he=y;ae<he.length;ae+=1){var Oe=he[ae],rt=Oe.paint.get(m+\"-pattern\");rt.isConstant()||($=!0);var gt=rt.constantOr(null);gt&&($=!0,U[gt.to]=!0,U[gt.from]=!0)}return $}function Kx(m,y,I,U,$){for(var ae=$.patternDependencies,he=0,Oe=y;he<Oe.length;he+=1){var rt=Oe[he],gt=rt.paint.get(m+\"-pattern\"),Mt=gt.value;if(Mt.kind!==\"constant\"){var or=Mt.evaluate({zoom:U-1},I,{},$.availableImages),_r=Mt.evaluate({zoom:U},I,{},$.availableImages),vr=Mt.evaluate({zoom:U+1},I,{},$.availableImages);or=or&&or.name?or.name:or,_r=_r&&_r.name?_r.name:_r,vr=vr&&vr.name?vr.name:vr,ae[or]=!0,ae[_r]=!0,ae[vr]=!0,I.patterns[rt.id]={min:or,mid:_r,max:vr}}}return I}var Jx=500,pp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yr,this.indexArray=new vn,this.indexArray2=new oa,this.programConfigurations=new hi(y.layers,y.zoom),this.segments=new io,this.segments2=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};pp.prototype.populate=function(y,I,U){this.hasPattern=zw(\"fill\",this.layers,I);for(var $=this.layers[0].layout.get(\"fill-sort-key\"),ae=[],he=0,Oe=y;he<Oe.length;he+=1){var rt=Oe[he],gt=rt.feature,Mt=rt.id,or=rt.index,_r=rt.sourceLayerIndex,vr=this.layers[0]._featureFilter.needGeometry,Fr=Ja(gt,vr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),Fr,U)){var ai=$?$.evaluate(Fr,{},U,I.availableImages):void 0,Gi={id:Mt,properties:gt.properties,type:gt.type,sourceLayerIndex:_r,index:or,geometry:vr?Fr.geometry:On(gt),patterns:{},sortKey:ai};ae.push(Gi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var Ti=0,bn=ae;Ti<bn.length;Ti+=1){var rn=bn[Ti],xn=rn,Dn=xn.geometry,Zn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=Kx(\"fill\",this.layers,rn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(rn,Dn,Zn,U,{});var eo=y[Zn].feature;I.featureIndex.insert(eo,Dn,Zn,ga,this.index)}},pp.prototype.update=function(y,I,U){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,U)},pp.prototype.addFeatures=function(y,I,U){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,U)}},pp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},pp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},pp.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,j9),this.indexBuffer=y.createIndexBuffer(this.indexArray),this.indexBuffer2=y.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(y),this.uploaded=!0},pp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},pp.prototype.addFeature=function(y,I,U,$,ae){for(var he=0,Oe=Fw(I,Jx);he<Oe.length;he+=1){for(var rt=Oe[he],gt=0,Mt=0,or=rt;Mt<or.length;Mt+=1){var _r=or[Mt];gt+=_r.length}for(var vr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray),Fr=vr.vertexLength,ai=[],Gi=[],Ti=0,bn=rt;Ti<bn.length;Ti+=1){var rn=bn[Ti];if(rn.length!==0){rn!==rt[0]&&Gi.push(ai.length/2);var xn=this.segments2.prepareSegment(rn.length,this.layoutVertexArray,this.indexArray2),Dn=xn.vertexLength;this.layoutVertexArray.emplaceBack(rn[0].x,rn[0].y),this.indexArray2.emplaceBack(Dn+rn.length-1,Dn),ai.push(rn[0].x),ai.push(rn[0].y);for(var Zn=1;Zn<rn.length;Zn++)this.layoutVertexArray.emplaceBack(rn[Zn].x,rn[Zn].y),this.indexArray2.emplaceBack(Dn+Zn-1,Dn+Zn),ai.push(rn[Zn].x),ai.push(rn[Zn].y);xn.vertexLength+=rn.length,xn.primitiveLength+=rn.length}}for(var ga=Pw(ai,Gi),ha=0;ha<ga.length;ha+=3)this.indexArray.emplaceBack(Fr+ga[ha],Fr+ga[ha+1],Fr+ga[ha+2]);vr.vertexLength+=gt,vr.primitiveLength+=ga.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,ae,$)},X(\"FillBucket\",pp,{omit:[\"layers\",\"patternFeatures\"]});var hS=new Br({\"fill-sort-key\":new xt(Fn.layout_fill[\"fill-sort-key\"])}),kk=new Br({\"fill-antialias\":new Ee(Fn.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new xt(Fn.paint_fill[\"fill-opacity\"]),\"fill-color\":new xt(Fn.paint_fill[\"fill-color\"]),\"fill-outline-color\":new xt(Fn.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new Ee(Fn.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new Ee(Fn.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new zt(Fn.paint_fill[\"fill-pattern\"])}),Jv={paint:kk,layout:hS},$x=function(m){function y(I){m.call(this,I,Jv)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(U,$){m.prototype.recalculate.call(this,U,$);var ae=this.paint._values[\"fill-outline-color\"];ae.value.kind===\"constant\"&&ae.value.value===void 0&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"])},y.prototype.createBucket=function(U){return new pp(U)},y.prototype.queryRadius=function(){return Lv(this.paint.get(\"fill-translate\"))},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt){var Mt=Kv(U,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),rt.angle,gt);return ys(Mt,he)},y.prototype.isTileClipped=function(){return!0},y}(mi),Lk=ji([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4),Pk=Lk.members,dS=cy;function cy(m,y,I,U,$){this.properties={},this.extent=I,this.type=0,this._pbf=m,this._geometry=-1,this._keys=U,this._values=$,m.readFields(Ik,this,y)}function Ik(m,y,I){m==1?y.id=I.readVarint():m==2?Rk(I,y):m==3?y.type=I.readVarint():m==4&&(y._geometry=I.pos)}function Rk(m,y){for(var I=m.readVarint()+m.pos;m.pos<I;){var U=y._keys[m.readVarint()],$=y._values[m.readVarint()];y.properties[U]=$}}cy.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],cy.prototype.loadGeometry=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,U=0,$=0,ae=0,he=[],Oe;m.pos<y;){if(U<=0){var rt=m.readVarint();I=rt&7,U=rt>>3}if(U--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),I===1&&(Oe&&he.push(Oe),Oe=[]),Oe.push(new u($,ae));else if(I===7)Oe&&Oe.push(Oe[0].clone());else throw new Error(\"unknown command \"+I)}return Oe&&he.push(Oe),he},cy.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,U=0,$=0,ae=0,he=1/0,Oe=-1/0,rt=1/0,gt=-1/0;m.pos<y;){if(U<=0){var Mt=m.readVarint();I=Mt&7,U=Mt>>3}if(U--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),$<he&&(he=$),$>Oe&&(Oe=$),ae<rt&&(rt=ae),ae>gt&&(gt=ae);else if(I!==7)throw new Error(\"unknown command \"+I)}return[he,rt,Oe,gt]},cy.prototype.toGeoJSON=function(m,y,I){var U=this.extent*Math.pow(2,I),$=this.extent*m,ae=this.extent*y,he=this.loadGeometry(),Oe=cy.types[this.type],rt,gt;function Mt(vr){for(var Fr=0;Fr<vr.length;Fr++){var ai=vr[Fr],Gi=180-(ai.y+ae)*360/U;vr[Fr]=[(ai.x+$)*360/U-180,360/Math.PI*Math.atan(Math.exp(Gi*Math.PI/180))-90]}}switch(this.type){case 1:var or=[];for(rt=0;rt<he.length;rt++)or[rt]=he[rt][0];he=or,Mt(he);break;case 2:for(rt=0;rt<he.length;rt++)Mt(he[rt]);break;case 3:for(he=Y9(he),rt=0;rt<he.length;rt++)for(gt=0;gt<he[rt].length;gt++)Mt(he[rt][gt]);break}he.length===1?he=he[0]:Oe=\"Multi\"+Oe;var _r={type:\"Feature\",geometry:{type:Oe,coordinates:he},properties:this.properties};return\"id\"in this&&(_r.id=this.id),_r};function Y9(m){var y=m.length;if(y<=1)return[m];for(var I=[],U,$,ae=0;ae<y;ae++){var he=Dk(m[ae]);he!==0&&($===void 0&&($=he<0),$===he<0?(U&&I.push(U),U=[m[ae]]):U.push(m[ae]))}return U&&I.push(U),I}function Dk(m){for(var y=0,I=0,U=m.length,$=U-1,ae,he;I<U;$=I++)ae=m[I],he=m[$],y+=(he.x-ae.x)*(ae.y+he.y);return y}var vg=vS;function vS(m,y){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=m,this._keys=[],this._values=[],this._features=[],m.readFields(Fk,this,y),this.length=this._features.length}function Fk(m,y,I){m===15?y.version=I.readVarint():m===1?y.name=I.readString():m===5?y.extent=I.readVarint():m===2?y._features.push(I.pos):m===3?y._keys.push(I.readString()):m===4&&y._values.push(zk(I))}function zk(m){for(var y=null,I=m.readVarint()+m.pos;m.pos<I;){var U=m.readVarint()>>3;y=U===1?m.readString():U===2?m.readFloat():U===3?m.readDouble():U===4?m.readVarint64():U===5?m.readVarint():U===6?m.readSVarint():U===7?m.readBoolean():null}return y}vS.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[m];var y=this._pbf.readVarint()+this._pbf.pos;return new dS(this._pbf,y,this.extent,this._keys,this._values)};var Ok=K9;function K9(m,y){this.layers=m.readFields(J9,{},y)}function J9(m,y,I){if(m===3){var U=new vg(I,I.readVarint()+I.pos);U.length&&(y[U.name]=U)}}var qk=Ok,k1=dS,Bk=vg,pg={VectorTile:qk,VectorTileFeature:k1,VectorTileLayer:Bk},Nk=pg.VectorTileFeature.types,Ow=500,L1=Math.pow(2,13);function cm(m,y,I,U,$,ae,he,Oe){m.emplaceBack(y,I,Math.floor(U*L1)*2+he,$*L1*2,ae*L1*2,Math.round(Oe))}var Vp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Ii,this.indexArray=new vn,this.programConfigurations=new hi(y.layers,y.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(y,I,U){this.features=[],this.hasPattern=zw(\"fill-extrusion\",this.layers,I);for(var $=0,ae=y;$<ae.length;$+=1){var he=ae[$],Oe=he.feature,rt=he.id,gt=he.index,Mt=he.sourceLayerIndex,or=this.layers[0]._featureFilter.needGeometry,_r=Ja(Oe,or);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),_r,U)){var vr={id:rt,sourceLayerIndex:Mt,index:gt,geometry:or?_r.geometry:On(Oe),properties:Oe.properties,type:Oe.type,patterns:{}};this.hasPattern?this.features.push(Kx(\"fill-extrusion\",this.layers,vr,this.zoom,I)):this.addFeature(vr,vr.geometry,gt,U,{}),I.featureIndex.insert(Oe,vr.geometry,gt,Mt,this.index,!0)}}},Vp.prototype.addFeatures=function(y,I,U){for(var $=0,ae=this.features;$<ae.length;$+=1){var he=ae[$],Oe=he.geometry;this.addFeature(he,Oe,he.index,I,U)}},Vp.prototype.update=function(y,I,U){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,U)},Vp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Vp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Vp.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,Pk),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},Vp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Vp.prototype.addFeature=function(y,I,U,$,ae){for(var he=0,Oe=Fw(I,Ow);he<Oe.length;he+=1){for(var rt=Oe[he],gt=0,Mt=0,or=rt;Mt<or.length;Mt+=1){var _r=or[Mt];gt+=_r.length}for(var vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Fr=0,ai=rt;Fr<ai.length;Fr+=1){var Gi=ai[Fr];if(Gi.length!==0&&!Q9(Gi))for(var Ti=0,bn=0;bn<Gi.length;bn++){var rn=Gi[bn];if(bn>=1){var xn=Gi[bn-1];if(!$9(rn,xn)){vr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Dn=rn.sub(xn)._perp()._unit(),Zn=xn.dist(rn);Ti+Zn>32768&&(Ti=0),cm(this.layoutVertexArray,rn.x,rn.y,Dn.x,Dn.y,0,0,Ti),cm(this.layoutVertexArray,rn.x,rn.y,Dn.x,Dn.y,0,1,Ti),Ti+=Zn,cm(this.layoutVertexArray,xn.x,xn.y,Dn.x,Dn.y,0,0,Ti),cm(this.layoutVertexArray,xn.x,xn.y,Dn.x,Dn.y,0,1,Ti);var ga=vr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),vr.vertexLength+=4,vr.primitiveLength+=2}}}}if(vr.vertexLength+gt>io.MAX_VERTEX_ARRAY_LENGTH&&(vr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray)),Nk[y.type]===\"Polygon\"){for(var ha=[],eo=[],za=vr.vertexLength,Za=0,Ko=rt;Za<Ko.length;Za+=1){var to=Ko[Za];if(to.length!==0){to!==rt[0]&&eo.push(ha.length/2);for(var ao=0;ao<to.length;ao++){var xs=to[ao];cm(this.layoutVertexArray,xs.x,xs.y,0,0,1,1,0),ha.push(xs.x),ha.push(xs.y)}}}for(var jo=Pw(ha,eo),Cl=0;Cl<jo.length;Cl+=3)this.indexArray.emplaceBack(za+jo[Cl],za+jo[Cl+2],za+jo[Cl+1]);vr.primitiveLength+=jo.length/3,vr.vertexLength+=gt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,ae,$)},X(\"FillExtrusionBucket\",Vp,{omit:[\"layers\",\"features\"]});function $9(m,y){return m.x===y.x&&(m.x<0||m.x>Ci)||m.y===y.y&&(m.y<0||m.y>Ci)}function Q9(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>Ci})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>Ci})}var P1=new Br({\"fill-extrusion-opacity\":new Ee(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new xt(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new Ee(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new Ee(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new zt(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new xt(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new xt(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\"fill-extrusion-vertical-gradient\":new Ee(Fn[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"])}),sd={paint:P1},fm=function(m){function y(I){m.call(this,I,sd)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new Vp(U)},y.prototype.queryRadius=function(){return Lv(this.paint.get(\"fill-extrusion-translate\"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt,Mt){var or=Kv(U,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),rt.angle,gt),_r=this.paint.get(\"fill-extrusion-height\").evaluate($,ae),vr=this.paint.get(\"fill-extrusion-base\").evaluate($,ae),Fr=eO(or,Mt,rt,0),ai=gS(he,vr,_r,Mt),Gi=ai[0],Ti=ai[1];return Uk(Gi,Ti,Fr)},y}(mi);function fy(m,y){return m.x*y.x+m.y*y.y}function pS(m,y){if(m.length===1){for(var I=0,U=y[I++],$;!$||U.equals($);)if($=y[I++],!$)return 1/0;for(;I<y.length;I++){var ae=y[I],he=m[0],Oe=$.sub(U),rt=ae.sub(U),gt=he.sub(U),Mt=fy(Oe,Oe),or=fy(Oe,rt),_r=fy(rt,rt),vr=fy(gt,Oe),Fr=fy(gt,rt),ai=Mt*_r-or*or,Gi=(_r*vr-or*Fr)/ai,Ti=(Mt*Fr-or*vr)/ai,bn=1-Gi-Ti,rn=U.z*bn+$.z*Gi+ae.z*Ti;if(isFinite(rn))return rn}return 1/0}else{for(var xn=1/0,Dn=0,Zn=y;Dn<Zn.length;Dn+=1){var ga=Zn[Dn];xn=Math.min(xn,ga.z)}return xn}}function Uk(m,y,I){var U=1/0;ys(I,y)&&(U=pS(I,y[0]));for(var $=0;$<y.length;$++)for(var ae=y[$],he=m[$],Oe=0;Oe<ae.length-1;Oe++){var rt=ae[Oe],gt=ae[Oe+1],Mt=he[Oe],or=he[Oe+1],_r=[rt,gt,or,Mt,rt];so(I,_r)&&(U=Math.min(U,pS(I,_r)))}return U===1/0?!1:U}function gS(m,y,I,U){for(var $=[],ae=[],he=U[8]*y,Oe=U[9]*y,rt=U[10]*y,gt=U[11]*y,Mt=U[8]*I,or=U[9]*I,_r=U[10]*I,vr=U[11]*I,Fr=0,ai=m;Fr<ai.length;Fr+=1){for(var Gi=ai[Fr],Ti=[],bn=[],rn=0,xn=Gi;rn<xn.length;rn+=1){var Dn=xn[rn],Zn=Dn.x,ga=Dn.y,ha=U[0]*Zn+U[4]*ga+U[12],eo=U[1]*Zn+U[5]*ga+U[13],za=U[2]*Zn+U[6]*ga+U[14],Za=U[3]*Zn+U[7]*ga+U[15],Ko=ha+he,to=eo+Oe,ao=za+rt,xs=Za+gt,jo=ha+Mt,Cl=eo+or,Iu=za+_r,kl=Za+vr,Ll=new u(Ko/xs,to/xs);Ll.z=ao/xs,Ti.push(Ll);var _l=new u(jo/kl,Cl/kl);_l.z=Iu/kl,bn.push(_l)}$.push(Ti),ae.push(bn)}return[$,ae]}function eO(m,y,I,U){for(var $=[],ae=0,he=m;ae<he.length;ae+=1){var Oe=he[ae],rt=[Oe.x,Oe.y,U,1];ly(rt,rt,y),$.push(new u(rt[0]/rt[3],rt[1]/rt[3]))}return $}var Vk=ji([{name:\"a_pos_normal\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4),Gk=Vk.members,tO=ji([{name:\"a_uv_x\",components:1,type:\"Float32\"},{name:\"a_split_index\",components:1,type:\"Float32\"}]),Hk=tO.members,mS=pg.VectorTileFeature.types,qw=63,jk=Math.cos(75/2*(Math.PI/180)),Qx=15,yS=20,Wk=15,Bw=1/2,eb=Math.pow(2,Wk-1)/Bw,sh=function(y){var I=this;this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=y.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(U){I.gradients[U.id]={}}),this.layoutVertexArray=new ci,this.layoutVertexArray2=new nn,this.indexArray=new vn,this.programConfigurations=new hi(y.layers,y.zoom),this.segments=new io,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};sh.prototype.populate=function(y,I,U){this.hasPattern=zw(\"line\",this.layers,I);for(var $=this.layers[0].layout.get(\"line-sort-key\"),ae=[],he=0,Oe=y;he<Oe.length;he+=1){var rt=Oe[he],gt=rt.feature,Mt=rt.id,or=rt.index,_r=rt.sourceLayerIndex,vr=this.layers[0]._featureFilter.needGeometry,Fr=Ja(gt,vr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),Fr,U)){var ai=$?$.evaluate(Fr,{},U):void 0,Gi={id:Mt,properties:gt.properties,type:gt.type,sourceLayerIndex:_r,index:or,geometry:vr?Fr.geometry:On(gt),patterns:{},sortKey:ai};ae.push(Gi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var Ti=0,bn=ae;Ti<bn.length;Ti+=1){var rn=bn[Ti],xn=rn,Dn=xn.geometry,Zn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=Kx(\"line\",this.layers,rn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(rn,Dn,Zn,U,{});var eo=y[Zn].feature;I.featureIndex.insert(eo,Dn,Zn,ga,this.index)}},sh.prototype.update=function(y,I,U){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,U)},sh.prototype.addFeatures=function(y,I,U){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,U)}},sh.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},sh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},sh.prototype.upload=function(y){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=y.createVertexBuffer(this.layoutVertexArray2,Hk)),this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,Gk),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},sh.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},sh.prototype.lineFeatureClips=function(y){if(y.properties&&y.properties.hasOwnProperty(\"mapbox_clip_start\")&&y.properties.hasOwnProperty(\"mapbox_clip_end\")){var I=+y.properties.mapbox_clip_start,U=+y.properties.mapbox_clip_end;return{start:I,end:U}}},sh.prototype.addFeature=function(y,I,U,$,ae){var he=this.layers[0].layout,Oe=he.get(\"line-join\").evaluate(y,{}),rt=he.get(\"line-cap\"),gt=he.get(\"line-miter-limit\"),Mt=he.get(\"line-round-limit\");this.lineClips=this.lineFeatureClips(y);for(var or=0,_r=I;or<_r.length;or+=1){var vr=_r[or];this.addLine(vr,y,Oe,rt,gt,Mt)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,ae,$)},sh.prototype.addLine=function(y,I,U,$,ae,he){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Oe=0;Oe<y.length-1;Oe++)this.totalDistance+=y[Oe].dist(y[Oe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var rt=mS[I.type]===\"Polygon\",gt=y.length;gt>=2&&y[gt-1].equals(y[gt-2]);)gt--;for(var Mt=0;Mt<gt-1&&y[Mt].equals(y[Mt+1]);)Mt++;if(!(gt<(rt?3:2))){U===\"bevel\"&&(ae=1.05);var or=this.overscaling<=16?Qx*Ci/(512*this.overscaling):0,_r=this.segments.prepareSegment(gt*10,this.layoutVertexArray,this.indexArray),vr,Fr=void 0,ai=void 0,Gi=void 0,Ti=void 0;this.e1=this.e2=-1,rt&&(vr=y[gt-2],Ti=y[Mt].sub(vr)._unit()._perp());for(var bn=Mt;bn<gt;bn++)if(ai=bn===gt-1?rt?y[Mt+1]:void 0:y[bn+1],!(ai&&y[bn].equals(ai))){Ti&&(Gi=Ti),vr&&(Fr=vr),vr=y[bn],Ti=ai?ai.sub(vr)._unit()._perp():Gi,Gi=Gi||Ti;var rn=Gi.add(Ti);(rn.x!==0||rn.y!==0)&&rn._unit();var xn=Gi.x*Ti.x+Gi.y*Ti.y,Dn=rn.x*Ti.x+rn.y*Ti.y,Zn=Dn!==0?1/Dn:1/0,ga=2*Math.sqrt(2-2*Dn),ha=Dn<jk&&Fr&&ai,eo=Gi.x*Ti.y-Gi.y*Ti.x>0;if(ha&&bn>Mt){var za=vr.dist(Fr);if(za>2*or){var Za=vr.sub(vr.sub(Fr)._mult(or/za)._round());this.updateDistance(Fr,Za),this.addCurrentVertex(Za,Gi,0,0,_r),Fr=Za}}var Ko=Fr&&ai,to=Ko?U:rt?\"butt\":$;if(Ko&&to===\"round\"&&(Zn<he?to=\"miter\":Zn<=2&&(to=\"fakeround\")),to===\"miter\"&&Zn>ae&&(to=\"bevel\"),to===\"bevel\"&&(Zn>2&&(to=\"flipbevel\"),Zn<ae&&(to=\"miter\")),Fr&&this.updateDistance(Fr,vr),to===\"miter\")rn._mult(Zn),this.addCurrentVertex(vr,rn,0,0,_r);else if(to===\"flipbevel\"){if(Zn>100)rn=Ti.mult(-1);else{var ao=Zn*Gi.add(Ti).mag()/Gi.sub(Ti).mag();rn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(vr,rn,0,0,_r),this.addCurrentVertex(vr,rn.mult(-1),0,0,_r)}else if(to===\"bevel\"||to===\"fakeround\"){var xs=-Math.sqrt(Zn*Zn-1),jo=eo?xs:0,Cl=eo?0:xs;if(Fr&&this.addCurrentVertex(vr,Gi,jo,Cl,_r),to===\"fakeround\")for(var Iu=Math.round(ga*180/Math.PI/yS),kl=1;kl<Iu;kl++){var Ll=kl/Iu;if(Ll!==.5){var _l=Ll-.5,Qu=1.0904+xn*(-3.2452+xn*(3.55645-xn*1.43519)),gc=.848013+xn*(-1.06021+xn*.215638);Ll=Ll+Ll*_l*(Ll-1)*(Qu*_l*_l+gc)}var Af=Ti.sub(Gi)._mult(Ll)._add(Gi)._unit()._mult(eo?-1:1);this.addHalfVertex(vr,Af.x,Af.y,!1,eo,0,_r)}ai&&this.addCurrentVertex(vr,Ti,-jo,-Cl,_r)}else if(to===\"butt\")this.addCurrentVertex(vr,rn,0,0,_r);else if(to===\"square\"){var Df=Fr?1:-1;this.addCurrentVertex(vr,rn,Df,Df,_r)}else to===\"round\"&&(Fr&&(this.addCurrentVertex(vr,Gi,0,0,_r),this.addCurrentVertex(vr,Gi,1,1,_r,!0)),ai&&(this.addCurrentVertex(vr,Ti,-1,-1,_r,!0),this.addCurrentVertex(vr,Ti,0,0,_r)));if(ha&&bn<gt-1){var Xh=vr.dist(ai);if(Xh>2*or){var ch=vr.add(ai.sub(vr)._mult(or/Xh)._round());this.updateDistance(vr,ch),this.addCurrentVertex(ch,Ti,0,0,_r),vr=ch}}}}},sh.prototype.addCurrentVertex=function(y,I,U,$,ae,he){he===void 0&&(he=!1);var Oe=I.x+I.y*U,rt=I.y-I.x*U,gt=-I.x+I.y*$,Mt=-I.y-I.x*$;this.addHalfVertex(y,Oe,rt,he,!1,U,ae),this.addHalfVertex(y,gt,Mt,he,!0,-$,ae),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,U,$,ae,he))},sh.prototype.addHalfVertex=function(y,I,U,$,ae,he,Oe){var rt=y.x,gt=y.y,Mt=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,or=Mt*Bw;if(this.layoutVertexArray.emplaceBack((rt<<1)+($?1:0),(gt<<1)+(ae?1:0),Math.round(qw*I)+128,Math.round(qw*U)+128,(he===0?0:he<0?-1:1)+1|(or&63)<<2,or>>6),this.lineClips){var _r=this.scaledDistance-this.lineClips.start,vr=this.lineClips.end-this.lineClips.start,Fr=_r/vr;this.layoutVertexArray2.emplaceBack(Fr,this.lineClipsArray.length)}var ai=Oe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ai),Oe.primitiveLength++),ae?this.e2=ai:this.e1=ai},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},X(\"LineBucket\",sh,{omit:[\"layers\",\"patternFeatures\"]});var _S=new Br({\"line-cap\":new Ee(Fn.layout_line[\"line-cap\"]),\"line-join\":new xt(Fn.layout_line[\"line-join\"]),\"line-miter-limit\":new Ee(Fn.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new Ee(Fn.layout_line[\"line-round-limit\"]),\"line-sort-key\":new xt(Fn.layout_line[\"line-sort-key\"])}),xS=new Br({\"line-opacity\":new xt(Fn.paint_line[\"line-opacity\"]),\"line-color\":new xt(Fn.paint_line[\"line-color\"]),\"line-translate\":new Ee(Fn.paint_line[\"line-translate\"]),\"line-translate-anchor\":new Ee(Fn.paint_line[\"line-translate-anchor\"]),\"line-width\":new xt(Fn.paint_line[\"line-width\"]),\"line-gap-width\":new xt(Fn.paint_line[\"line-gap-width\"]),\"line-offset\":new xt(Fn.paint_line[\"line-offset\"]),\"line-blur\":new xt(Fn.paint_line[\"line-blur\"]),\"line-dasharray\":new Ir(Fn.paint_line[\"line-dasharray\"]),\"line-pattern\":new zt(Fn.paint_line[\"line-pattern\"]),\"line-gradient\":new Hr(Fn.paint_line[\"line-gradient\"])}),Nw={paint:xS,layout:_S},rO=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(U,$){return $=new Gn(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),m.prototype.possiblyEvaluate.call(this,U,$)},y.prototype.evaluate=function(U,$,ae,he){return $=_({},$,{zoom:Math.floor($.zoom)}),m.prototype.evaluate.call(this,U,$,ae,he)},y}(xt),R=new rO(Nw.paint.properties[\"line-width\"].specification);R.useIntegerZoom=!0;var S=function(m){function y(I){m.call(this,I,Nw),this.gradientVersion=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._handleSpecialPaintPropertyUpdate=function(U){if(U===\"line-gradient\"){var $=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values[\"line-gradient\"].value.expression},y.prototype.recalculate=function(U,$){m.prototype.recalculate.call(this,U,$),this.paint._values[\"line-floorwidth\"]=R.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,U)},y.prototype.createBucket=function(U){return new sh(U)},y.prototype.queryRadius=function(U){var $=U,ae=F(Ad(\"line-width\",this,$),Ad(\"line-gap-width\",this,$)),he=Ad(\"line-offset\",this,$);return ae/2+Math.abs(he)+Lv(this.paint.get(\"line-translate\"))},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt){var Mt=Kv(U,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),rt.angle,gt),or=gt/2*F(this.paint.get(\"line-width\").evaluate($,ae),this.paint.get(\"line-gap-width\").evaluate($,ae)),_r=this.paint.get(\"line-offset\").evaluate($,ae);return _r&&(he=W(he,_r*gt)),ou(Mt,he,or)},y.prototype.isTileClipped=function(){return!0},y}(mi);function F(m,y){return y>0?y+2*m:m}function W(m,y){for(var I=[],U=new u(0,0),$=0;$<m.length;$++){for(var ae=m[$],he=[],Oe=0;Oe<ae.length;Oe++){var rt=ae[Oe-1],gt=ae[Oe],Mt=ae[Oe+1],or=Oe===0?U:gt.sub(rt)._unit()._perp(),_r=Oe===ae.length-1?U:Mt.sub(gt)._unit()._perp(),vr=or._add(_r)._unit(),Fr=vr.x*_r.x+vr.y*_r.y;vr._mult(1/Fr),he.push(vr._mult(y)._add(gt))}I.push(he)}return I}var te=ji([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),fe=ji([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),pe=ji([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),ze=ji([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}]),Ke=ji([{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]),ut=ji([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4),Lt=ji([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4),Qt=ji([{name:\"triangle\",components:3,type:\"Uint16\"}]),fr=ji([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),mr=ji([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Lr=ji([{type:\"Float32\",name:\"offsetX\"}]),zr=ji([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function ui(m,y,I){var U=y.layout.get(\"text-transform\").evaluate(I,{});return U===\"uppercase\"?m=m.toLocaleUpperCase():U===\"lowercase\"&&(m=m.toLocaleLowerCase()),Es.applyArabicShaping&&(m=Es.applyArabicShaping(m)),m}function yi(m,y,I){return m.sections.forEach(function(U){U.text=ui(U.text,y,I)}),m}function dn(m){var y={},I={},U=[],$=0;function ae(Ti){U.push(m[Ti]),$++}function he(Ti,bn,rn){var xn=I[Ti];return delete I[Ti],I[bn]=xn,U[xn].geometry[0].pop(),U[xn].geometry[0]=U[xn].geometry[0].concat(rn[0]),xn}function Oe(Ti,bn,rn){var xn=y[bn];return delete y[bn],y[Ti]=xn,U[xn].geometry[0].shift(),U[xn].geometry[0]=rn[0].concat(U[xn].geometry[0]),xn}function rt(Ti,bn,rn){var xn=rn?bn[0][bn[0].length-1]:bn[0][0];return Ti+\":\"+xn.x+\":\"+xn.y}for(var gt=0;gt<m.length;gt++){var Mt=m[gt],or=Mt.geometry,_r=Mt.text?Mt.text.toString():null;if(!_r){ae(gt);continue}var vr=rt(_r,or),Fr=rt(_r,or,!0);if(vr in I&&Fr in y&&I[vr]!==y[Fr]){var ai=Oe(vr,Fr,or),Gi=he(vr,Fr,U[ai].geometry);delete y[vr],delete I[Fr],I[rt(_r,U[Gi].geometry,!0)]=Gi,U[ai].geometry=null}else vr in I?he(vr,Fr,or):Fr in y?Oe(vr,Fr,or):(ae(gt),y[vr]=$-1,I[Fr]=$-1)}return U.filter(function(Ti){return Ti.geometry})}var Fi={\"!\":\"\\uFE15\",\"#\":\"\\uFF03\",$:\"\\uFF04\",\"%\":\"\\uFF05\",\"&\":\"\\uFF06\",\"(\":\"\\uFE35\",\")\":\"\\uFE36\",\"*\":\"\\uFF0A\",\"+\":\"\\uFF0B\",\",\":\"\\uFE10\",\"-\":\"\\uFE32\",\".\":\"\\u30FB\",\"/\":\"\\uFF0F\",\":\":\"\\uFE13\",\";\":\"\\uFE14\",\"<\":\"\\uFE3F\",\"=\":\"\\uFF1D\",\">\":\"\\uFE40\",\"?\":\"\\uFE16\",\"@\":\"\\uFF20\",\"[\":\"\\uFE47\",\"\\\\\":\"\\uFF3C\",\"]\":\"\\uFE48\",\"^\":\"\\uFF3E\",_:\"\\uFE33\",\"`\":\"\\uFF40\",\"{\":\"\\uFE37\",\"|\":\"\\u2015\",\"}\":\"\\uFE38\",\"~\":\"\\uFF5E\",\"\\xA2\":\"\\uFFE0\",\"\\xA3\":\"\\uFFE1\",\"\\xA5\":\"\\uFFE5\",\"\\xA6\":\"\\uFFE4\",\"\\xAC\":\"\\uFFE2\",\"\\xAF\":\"\\uFFE3\",\"\\u2013\":\"\\uFE32\",\"\\u2014\":\"\\uFE31\",\"\\u2018\":\"\\uFE43\",\"\\u2019\":\"\\uFE44\",\"\\u201C\":\"\\uFE41\",\"\\u201D\":\"\\uFE42\",\"\\u2026\":\"\\uFE19\",\"\\u2027\":\"\\u30FB\",\"\\u20A9\":\"\\uFFE6\",\"\\u3001\":\"\\uFE11\",\"\\u3002\":\"\\uFE12\",\"\\u3008\":\"\\uFE3F\",\"\\u3009\":\"\\uFE40\",\"\\u300A\":\"\\uFE3D\",\"\\u300B\":\"\\uFE3E\",\"\\u300C\":\"\\uFE41\",\"\\u300D\":\"\\uFE42\",\"\\u300E\":\"\\uFE43\",\"\\u300F\":\"\\uFE44\",\"\\u3010\":\"\\uFE3B\",\"\\u3011\":\"\\uFE3C\",\"\\u3014\":\"\\uFE39\",\"\\u3015\":\"\\uFE3A\",\"\\u3016\":\"\\uFE17\",\"\\u3017\":\"\\uFE18\",\"\\uFF01\":\"\\uFE15\",\"\\uFF08\":\"\\uFE35\",\"\\uFF09\":\"\\uFE36\",\"\\uFF0C\":\"\\uFE10\",\"\\uFF0D\":\"\\uFE32\",\"\\uFF0E\":\"\\u30FB\",\"\\uFF1A\":\"\\uFE13\",\"\\uFF1B\":\"\\uFE14\",\"\\uFF1C\":\"\\uFE3F\",\"\\uFF1E\":\"\\uFE40\",\"\\uFF1F\":\"\\uFE16\",\"\\uFF3B\":\"\\uFE47\",\"\\uFF3D\":\"\\uFE48\",\"\\uFF3F\":\"\\uFE33\",\"\\uFF5B\":\"\\uFE37\",\"\\uFF5C\":\"\\u2015\",\"\\uFF5D\":\"\\uFE38\",\"\\uFF5F\":\"\\uFE35\",\"\\uFF60\":\"\\uFE36\",\"\\uFF61\":\"\\uFE12\",\"\\uFF62\":\"\\uFE41\",\"\\uFF63\":\"\\uFE42\"};function ln(m){for(var y=\"\",I=0;I<m.length;I++){var U=m.charCodeAt(I+1)||null,$=m.charCodeAt(I-1)||null,ae=(!U||!bi(U)||Fi[m[I+1]])&&(!$||!bi($)||Fi[m[I-1]]);ae&&Fi[m[I]]?y+=Fi[m[I]]:y+=m[I]}return y}var An=24,pa=function(m,y,I,U,$){var ae,he,Oe=$*8-U-1,rt=(1<<Oe)-1,gt=rt>>1,Mt=-7,or=I?$-1:0,_r=I?-1:1,vr=m[y+or];for(or+=_r,ae=vr&(1<<-Mt)-1,vr>>=-Mt,Mt+=Oe;Mt>0;ae=ae*256+m[y+or],or+=_r,Mt-=8);for(he=ae&(1<<-Mt)-1,ae>>=-Mt,Mt+=U;Mt>0;he=he*256+m[y+or],or+=_r,Mt-=8);if(ae===0)ae=1-gt;else{if(ae===rt)return he?NaN:(vr?-1:1)*(1/0);he=he+Math.pow(2,U),ae=ae-gt}return(vr?-1:1)*he*Math.pow(2,ae-U)},ro=function(m,y,I,U,$,ae){var he,Oe,rt,gt=ae*8-$-1,Mt=(1<<gt)-1,or=Mt>>1,_r=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,vr=U?0:ae-1,Fr=U?1:-1,ai=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(Oe=isNaN(y)?1:0,he=Mt):(he=Math.floor(Math.log(y)/Math.LN2),y*(rt=Math.pow(2,-he))<1&&(he--,rt*=2),he+or>=1?y+=_r/rt:y+=_r*Math.pow(2,1-or),y*rt>=2&&(he++,rt/=2),he+or>=Mt?(Oe=0,he=Mt):he+or>=1?(Oe=(y*rt-1)*Math.pow(2,$),he=he+or):(Oe=y*Math.pow(2,or-1)*Math.pow(2,$),he=0));$>=8;m[I+vr]=Oe&255,vr+=Fr,Oe/=256,$-=8);for(he=he<<$|Oe,gt+=$;gt>0;m[I+vr]=he&255,vr+=Fr,he/=256,gt-=8);m[I+vr-Fr]|=ai*128},Vo={read:pa,write:ro},Xa=sa;function sa(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}sa.Varint=0,sa.Fixed64=1,sa.Bytes=2,sa.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Xn=typeof TextDecoder==\"undefined\"?null:new TextDecoder(\"utf8\");sa.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos<I;){var U=this.readVarint(),$=U>>3,ae=this.pos;this.type=U&7,m($,y,this),this.pos===ae&&this.skip(U)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Hh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Dv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Hh(this.buf,this.pos)+Hh(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readSFixed64:function(){var m=Hh(this.buf,this.pos)+Dv(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readFloat:function(){var m=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var y=this.buf,I,U;return U=y[this.pos++],I=U&127,U<128||(U=y[this.pos++],I|=(U&127)<<7,U<128)||(U=y[this.pos++],I|=(U&127)<<14,U<128)||(U=y[this.pos++],I|=(U&127)<<21,U<128)?I:(U=y[this.pos],I|=(U&15)<<28,Ro(I,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,y=this.pos;return this.pos=m,m-y>=lo&&Xn?tu(this.buf,y,m):lv(this.buf,y,m)},readBytes:function(){var m=this.readVarint()+this.pos,y=this.buf.subarray(this.pos,m);return this.pos=m,y},readPackedVarint:function(m,y){if(this.type!==sa.Bytes)return m.push(this.readVarint(y));var I=uo(this);for(m=m||[];this.pos<I;)m.push(this.readVarint(y));return m},readPackedSVarint:function(m){if(this.type!==sa.Bytes)return m.push(this.readSVarint());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSVarint());return m},readPackedBoolean:function(m){if(this.type!==sa.Bytes)return m.push(this.readBoolean());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readBoolean());return m},readPackedFloat:function(m){if(this.type!==sa.Bytes)return m.push(this.readFloat());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFloat());return m},readPackedDouble:function(m){if(this.type!==sa.Bytes)return m.push(this.readDouble());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readDouble());return m},readPackedFixed32:function(m){if(this.type!==sa.Bytes)return m.push(this.readFixed32());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFixed32());return m},readPackedSFixed32:function(m){if(this.type!==sa.Bytes)return m.push(this.readSFixed32());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSFixed32());return m},readPackedFixed64:function(m){if(this.type!==sa.Bytes)return m.push(this.readFixed64());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFixed64());return m},readPackedSFixed64:function(m){if(this.type!==sa.Bytes)return m.push(this.readSFixed64());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSFixed64());return m},skip:function(m){var y=m&7;if(y===sa.Varint)for(;this.buf[this.pos++]>127;);else if(y===sa.Bytes)this.pos=this.readVarint()+this.pos;else if(y===sa.Fixed32)this.pos+=4;else if(y===sa.Fixed64)this.pos+=8;else throw new Error(\"Unimplemented type: \"+y)},writeTag:function(m,y){this.writeVarint(m<<3|y)},realloc:function(m){for(var y=this.length||16;y<this.pos+m;)y*=2;if(y!==this.length){var I=new Uint8Array(y);I.set(this.buf),this.buf=I,this.length=y}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(m){this.realloc(4),Rf(this.buf,m,this.pos),this.pos+=4},writeSFixed32:function(m){this.realloc(4),Rf(this.buf,m,this.pos),this.pos+=4},writeFixed64:function(m){this.realloc(8),Rf(this.buf,m&-1,this.pos),Rf(this.buf,Math.floor(m*fo),this.pos+4),this.pos+=8},writeSFixed64:function(m){this.realloc(8),Rf(this.buf,m&-1,this.pos),Rf(this.buf,Math.floor(m*fo),this.pos+4),this.pos+=8},writeVarint:function(m){if(m=+m||0,m>268435455||m<0){Ju(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var y=this.pos;this.pos=pc(this.buf,m,this.pos);var I=this.pos-y;I>=128&&$v(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Vo.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Vo.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var y=m.length;this.writeVarint(y),this.realloc(y);for(var I=0;I<y;I++)this.buf[this.pos++]=m[I]},writeRawMessage:function(m,y){this.pos++;var I=this.pos;m(y,this);var U=this.pos-I;U>=128&&$v(I,U,this),this.pos=I-1,this.writeVarint(U),this.pos+=U},writeMessage:function(m,y,I){this.writeTag(m,sa.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,ld,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,Ah,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,jd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Gd,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,Tf,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,Sh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Ed,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,ud,y)},writeBytesField:function(m,y){this.writeTag(m,sa.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,sa.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,sa.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function Ro(m,y,I){var U=I.buf,$,ae;if(ae=U[I.pos++],$=(ae&112)>>4,ae<128||(ae=U[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=U[I.pos++],$|=(ae&1)<<31,ae<128))return $o(m,$,y);throw new Error(\"Expected varint not more than 10 bytes\")}function uo(m){return m.type===sa.Bytes?m.readVarint()+m.pos:m.pos+1}function $o(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function Ju(m,y){var I,U;if(m>=0?(I=m%4294967296|0,U=m/4294967296|0):(I=~(-m%4294967296),U=~(-m/4294967296),I^4294967295?I=I+1|0:(I=0,U=U+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error(\"Given varint doesn't fit into 10 bytes\");y.realloc(10),qu(I,U,y),Th(U,y)}function qu(m,y,I){I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos]=m&127}function Th(m,y){var I=(m&7)<<4;y.buf[y.pos++]|=I|((m>>>=3)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127)))))}function $v(m,y,I){var U=y<=16383?1:y<=2097151?2:y<=268435455?3:Math.floor(Math.log(y)/(Math.LN2*7));I.realloc(U);for(var $=I.pos-1;$>=m;$--)I.buf[$+U]=I.buf[$]}function ld(m,y){for(var I=0;I<m.length;I++)y.writeVarint(m[I])}function Ah(m,y){for(var I=0;I<m.length;I++)y.writeSVarint(m[I])}function Gd(m,y){for(var I=0;I<m.length;I++)y.writeFloat(m[I])}function Hd(m,y){for(var I=0;I<m.length;I++)y.writeDouble(m[I])}function jd(m,y){for(var I=0;I<m.length;I++)y.writeBoolean(m[I])}function Tf(m,y){for(var I=0;I<m.length;I++)y.writeFixed32(m[I])}function Sh(m,y){for(var I=0;I<m.length;I++)y.writeSFixed32(m[I])}function Ed(m,y){for(var I=0;I<m.length;I++)y.writeFixed64(m[I])}function ud(m,y){for(var I=0;I<m.length;I++)y.writeSFixed64(m[I])}function Hh(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+m[y+3]*16777216}function Rf(m,y,I){m[I]=y,m[I+1]=y>>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Dv(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+(m[y+3]<<24)}function lv(m,y,I){for(var U=\"\",$=y;$<I;){var ae=m[$],he=null,Oe=ae>239?4:ae>223?3:ae>191?2:1;if($+Oe>I)break;var rt,gt,Mt;Oe===1?ae<128&&(he=ae):Oe===2?(rt=m[$+1],(rt&192)===128&&(he=(ae&31)<<6|rt&63,he<=127&&(he=null))):Oe===3?(rt=m[$+1],gt=m[$+2],(rt&192)===128&&(gt&192)===128&&(he=(ae&15)<<12|(rt&63)<<6|gt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):Oe===4&&(rt=m[$+1],gt=m[$+2],Mt=m[$+3],(rt&192)===128&&(gt&192)===128&&(Mt&192)===128&&(he=(ae&15)<<18|(rt&63)<<12|(gt&63)<<6|Mt&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,Oe=1):he>65535&&(he-=65536,U+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),U+=String.fromCharCode(he),$+=Oe}return U}function tu(m,y,I){return Xn.decode(m.subarray(y,I))}function pc(m,y,I){for(var U=0,$,ae;U<y.length;U++){if($=y.charCodeAt(U),$>55295&&$<57344)if(ae)if($<56320){m[I++]=239,m[I++]=191,m[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||U+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ae=$;continue}else ae&&(m[I++]=239,m[I++]=191,m[I++]=189,ae=null);$<128?m[I++]=$:($<2048?m[I++]=$>>6|192:($<65536?m[I++]=$>>12|224:(m[I++]=$>>18|240,m[I++]=$>>12&63|128),m[I++]=$>>6&63|128),m[I++]=$&63|128)}return I}var $u=3;function Fv(m,y,I){m===1&&I.readMessage(ff,y)}function ff(m,y,I){if(m===3){var U=I.readMessage(I1,{}),$=U.id,ae=U.bitmap,he=U.width,Oe=U.height,rt=U.left,gt=U.top,Mt=U.advance;y.push({id:$,bitmap:new Rv({width:he+2*$u,height:Oe+2*$u},ae),metrics:{width:he,height:Oe,left:rt,top:gt,advance:Mt}})}}function I1(m,y,I){m===1?y.id=I.readVarint():m===2?y.bitmap=I.readBytes():m===3?y.width=I.readVarint():m===4?y.height=I.readVarint():m===5?y.left=I.readSVarint():m===6?y.top=I.readSVarint():m===7&&(y.advance=I.readVarint())}function p0(m){return new Xa(m).readFields(Fv,[])}var Gp=$u;function Qv(m){for(var y=0,I=0,U=0,$=m;U<$.length;U+=1){var ae=$[U];y+=ae.w*ae.h,I=Math.max(I,ae.w)}m.sort(function(Gi,Ti){return Ti.h-Gi.h});for(var he=Math.max(Math.ceil(Math.sqrt(y/.95)),I),Oe=[{x:0,y:0,w:he,h:1/0}],rt=0,gt=0,Mt=0,or=m;Mt<or.length;Mt+=1)for(var _r=or[Mt],vr=Oe.length-1;vr>=0;vr--){var Fr=Oe[vr];if(!(_r.w>Fr.w||_r.h>Fr.h)){if(_r.x=Fr.x,_r.y=Fr.y,gt=Math.max(gt,_r.y+_r.h),rt=Math.max(rt,_r.x+_r.w),_r.w===Fr.w&&_r.h===Fr.h){var ai=Oe.pop();vr<Oe.length&&(Oe[vr]=ai)}else _r.h===Fr.h?(Fr.x+=_r.w,Fr.w-=_r.w):_r.w===Fr.w?(Fr.y+=_r.h,Fr.h-=_r.h):(Oe.push({x:Fr.x+_r.w,y:Fr.y,w:Fr.w-_r.w,h:_r.h}),Fr.y+=_r.h,Fr.h-=_r.h);break}}return{w:rt,h:gt,fill:y/(rt*gt)||0}}var Gc=1,Zf=function(y,I){var U=I.pixelRatio,$=I.version,ae=I.stretchX,he=I.stretchY,Oe=I.content;this.paddedRect=y,this.pixelRatio=U,this.stretchX=ae,this.stretchY=he,this.content=Oe,this.version=$},ep={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ep.tl.get=function(){return[this.paddedRect.x+Gc,this.paddedRect.y+Gc]},ep.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Gc,this.paddedRect.y+this.paddedRect.h-Gc]},ep.tlbr.get=function(){return this.tl.concat(this.br)},ep.displaySize.get=function(){return[(this.paddedRect.w-Gc*2)/this.pixelRatio,(this.paddedRect.h-Gc*2)/this.pixelRatio]},Object.defineProperties(Zf.prototype,ep);var gg=function(y,I){var U={},$={};this.haveRenderCallbacks=[];var ae=[];this.addImages(y,U,ae),this.addImages(I,$,ae);var he=Qv(ae),Oe=he.w,rt=he.h,gt=new wh({width:Oe||1,height:rt||1});for(var Mt in y){var or=y[Mt],_r=U[Mt].paddedRect;wh.copy(or.data,gt,{x:0,y:0},{x:_r.x+Gc,y:_r.y+Gc},or.data)}for(var vr in I){var Fr=I[vr],ai=$[vr].paddedRect,Gi=ai.x+Gc,Ti=ai.y+Gc,bn=Fr.data.width,rn=Fr.data.height;wh.copy(Fr.data,gt,{x:0,y:0},{x:Gi,y:Ti},Fr.data),wh.copy(Fr.data,gt,{x:0,y:rn-1},{x:Gi,y:Ti-1},{width:bn,height:1}),wh.copy(Fr.data,gt,{x:0,y:0},{x:Gi,y:Ti+rn},{width:bn,height:1}),wh.copy(Fr.data,gt,{x:bn-1,y:0},{x:Gi-1,y:Ti},{width:1,height:rn}),wh.copy(Fr.data,gt,{x:0,y:0},{x:Gi+bn,y:Ti},{width:1,height:rn})}this.image=gt,this.iconPositions=U,this.patternPositions=$};gg.prototype.addImages=function(y,I,U){for(var $ in y){var ae=y[$],he={x:0,y:0,w:ae.data.width+2*Gc,h:ae.data.height+2*Gc};U.push(he),I[$]=new Zf(he,ae),ae.hasRenderCallback&&this.haveRenderCallbacks.push($)}},gg.prototype.patchUpdatedImages=function(y,I){y.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var U in y.updatedImages)this.patchUpdatedImage(this.iconPositions[U],y.getImage(U),I),this.patchUpdatedImage(this.patternPositions[U],y.getImage(U),I)},gg.prototype.patchUpdatedImage=function(y,I,U){if(!(!y||!I)&&y.version!==I.version){y.version=I.version;var $=y.tl,ae=$[0],he=$[1];U.update(I.data,void 0,{x:ae,y:he})}},X(\"ImagePosition\",Zf),X(\"ImageAtlas\",gg);var uv={horizontal:1,vertical:2,horizontalOnly:3},R1=-17;function bS(m){for(var y=0,I=m;y<I.length;y+=1){var U=I[y];if(U.positionedGlyphs.length!==0)return!1}return!0}var Uw=57344,g0=63743,hy=function(){this.scale=1,this.fontStack=\"\",this.imageName=null};hy.forText=function(y,I){var U=new hy;return U.scale=y||1,U.fontStack=I,U},hy.forImage=function(y){var I=new hy;return I.imageName=y,I};var jh=function(){this.text=\"\",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};jh.fromFeature=function(y,I){for(var U=new jh,$=0;$<y.sections.length;$++){var ae=y.sections[$];ae.image?U.addImageSection(ae):U.addTextSection(ae,I)}return U},jh.prototype.length=function(){return this.text.length},jh.prototype.getSection=function(y){return this.sections[this.sectionIndex[y]]},jh.prototype.getSectionIndex=function(y){return this.sectionIndex[y]},jh.prototype.getCharCode=function(y){return this.text.charCodeAt(y)},jh.prototype.verticalizePunctuation=function(){this.text=ln(this.text)},jh.prototype.trim=function(){for(var y=0,I=0;I<this.text.length&&m0[this.text.charCodeAt(I)];I++)y++;for(var U=this.text.length,$=this.text.length-1;$>=0&&$>=y&&m0[this.text.charCodeAt($)];$--)U--;this.text=this.text.substring(y,U),this.sectionIndex=this.sectionIndex.slice(y,U)},jh.prototype.substring=function(y,I){var U=new jh;return U.text=this.text.substring(y,I),U.sectionIndex=this.sectionIndex.slice(y,I),U.sections=this.sections,U},jh.prototype.toString=function(){return this.text},jh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,U){return Math.max(I,y.sections[U].scale)},0)},jh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(hy.forText(y.scale,y.fontStack||I));for(var U=this.sections.length-1,$=0;$<y.text.length;++$)this.sectionIndex.push(U)},jh.prototype.addImageSection=function(y){var I=y.image?y.image.name:\"\";if(I.length===0){re(\"Can't add FormattedSection with an empty image.\");return}var U=this.getNextImageSectionCharCode();if(!U){re(\"Reached maximum number of images \"+(g0-Uw+2));return}this.text+=String.fromCharCode(U),this.sections.push(hy.forImage(I)),this.sectionIndex.push(this.sections.length-1)},jh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=g0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function iO(m,y){for(var I=[],U=m.text,$=0,ae=0,he=y;ae<he.length;ae+=1){var Oe=he[ae];I.push(m.substring($,Oe)),$=Oe}return $<U.length&&I.push(m.substring($,U.length)),I}function Vw(m,y,I,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai){var Gi=jh.fromFeature(m,$);or===uv.vertical&&Gi.verticalizePunctuation();var Ti,bn=Es.processBidirectionalText,rn=Es.processStyledBidirectionalText;if(bn&&Gi.sections.length===1){Ti=[];for(var xn=bn(Gi.toString(),Gw(Gi,gt,ae,y,U,vr,Fr)),Dn=0,Zn=xn;Dn<Zn.length;Dn+=1){var ga=Zn[Dn],ha=new jh;ha.text=ga,ha.sections=Gi.sections;for(var eo=0;eo<ga.length;eo++)ha.sectionIndex.push(0);Ti.push(ha)}}else if(rn){Ti=[];for(var za=rn(Gi.text,Gi.sectionIndex,Gw(Gi,gt,ae,y,U,vr,Fr)),Za=0,Ko=za;Za<Ko.length;Za+=1){var to=Ko[Za],ao=new jh;ao.text=to[0],ao.sectionIndex=to[1],ao.sections=Gi.sections,Ti.push(ao)}}else Ti=iO(Gi,Gw(Gi,gt,ae,y,U,vr,Fr));var xs=[],jo={positionedLines:xs,text:Gi.toString(),top:Mt[1],bottom:Mt[1],left:Mt[0],right:Mt[0],writingMode:or,iconsInText:!1,verticalizable:!1};return oO(jo,y,I,U,Ti,he,Oe,rt,or,gt,_r,ai),bS(xs)?!1:jo}var m0={};m0[9]=!0,m0[10]=!0,m0[11]=!0,m0[12]=!0,m0[13]=!0,m0[32]=!0;var cv={};cv[10]=!0,cv[32]=!0,cv[38]=!0,cv[40]=!0,cv[41]=!0,cv[43]=!0,cv[45]=!0,cv[47]=!0,cv[173]=!0,cv[183]=!0,cv[8203]=!0,cv[8208]=!0,cv[8211]=!0,cv[8231]=!0;function Xk(m,y,I,U,$,ae){if(y.imageName){var rt=U[y.imageName];return rt?rt.displaySize[0]*y.scale*An/ae+$:0}else{var he=I[y.fontStack],Oe=he&&he[m];return Oe?Oe.metrics.advance*y.scale+$:0}}function nO(m,y,I,U,$,ae){for(var he=0,Oe=0;Oe<m.length();Oe++){var rt=m.getSection(Oe);he+=Xk(m.getCharCode(Oe),rt,U,$,y,ae)}var gt=Math.max(1,Math.ceil(he/I));return he/gt}function Zk(m,y,I,U){var $=Math.pow(m-y,2);return U?m<y?$/2:$*2:$+Math.abs(I)*I}function aO(m,y,I){var U=0;return m===10&&(U-=1e4),I&&(U+=150),(m===40||m===65288)&&(U+=50),(y===41||y===65289)&&(U+=50),U}function gp(m,y,I,U,$,ae){for(var he=null,Oe=Zk(y,I,$,ae),rt=0,gt=U;rt<gt.length;rt+=1){var Mt=gt[rt],or=y-Mt.x,_r=Zk(or,I,$,ae)+Mt.badness;_r<=Oe&&(he=Mt,Oe=_r)}return{index:m,x:y,priorBreak:he,badness:Oe}}function tb(m){return m?tb(m.priorBreak).concat(m.index):[]}function Gw(m,y,I,U,$,ae,he){if(ae!==\"point\")return[];if(!m)return[];for(var Oe=[],rt=nO(m,y,I,U,$,he),gt=m.text.indexOf(\"\\u200B\")>=0,Mt=0,or=0;or<m.length();or++){var _r=m.getSection(or),vr=m.getCharCode(or);if(m0[vr]||(Mt+=Xk(vr,_r,U,$,y,he)),or<m.length()-1){var Fr=Gr(vr);(cv[vr]||Fr||_r.imageName)&&Oe.push(gp(or+1,Mt,rt,Oe,aO(vr,m.getCharCode(or+1),Fr&&gt),!1))}}return tb(gp(m.length(),Mt,rt,Oe,0,!0))}function wS(m){var y=.5,I=.5;switch(m){case\"right\":case\"top-right\":case\"bottom-right\":y=1;break;case\"left\":case\"top-left\":case\"bottom-left\":y=0;break}switch(m){case\"bottom\":case\"bottom-right\":case\"bottom-left\":I=1;break;case\"top\":case\"top-right\":case\"top-left\":I=0;break}return{horizontalAlign:y,verticalAlign:I}}function oO(m,y,I,U,$,ae,he,Oe,rt,gt,Mt,or){for(var _r=0,vr=R1,Fr=0,ai=0,Gi=Oe===\"right\"?1:Oe===\"left\"?0:.5,Ti=0,bn=0,rn=$;bn<rn.length;bn+=1){var xn=rn[bn];xn.trim();var Dn=xn.getMaxScale(),Zn=(Dn-1)*An,ga={positionedGlyphs:[],lineOffset:0};m.positionedLines[Ti]=ga;var ha=ga.positionedGlyphs,eo=0;if(!xn.length()){vr+=ae,++Ti;continue}for(var za=0;za<xn.length();za++){var Za=xn.getSection(za),Ko=xn.getSectionIndex(za),to=xn.getCharCode(za),ao=0,xs=null,jo=null,Cl=null,Iu=An,kl=!(rt===uv.horizontal||!Mt&&!qr(to)||Mt&&(m0[to]||Xr(to)));if(Za.imageName){var Af=U[Za.imageName];if(!Af)continue;Cl=Za.imageName,m.iconsInText=m.iconsInText||!0,jo=Af.paddedRect;var Df=Af.displaySize;Za.scale=Za.scale*An/or,xs={width:Df[0],height:Df[1],left:Gc,top:-Gp,advance:kl?Df[1]:Df[0]};var Xh=An-Df[1]*Za.scale;ao=Zn+Xh,Iu=xs.advance;var ch=kl?Df[0]*Za.scale-An*Dn:Df[1]*Za.scale-An*Dn;ch>0&&ch>eo&&(eo=ch)}else{var Ll=I[Za.fontStack],_l=Ll&&Ll[to];if(_l&&_l.rect)jo=_l.rect,xs=_l.metrics;else{var Qu=y[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;xs=gc.metrics}ao=(Dn-Za.scale)*An}kl?(m.verticalizable=!0,ha.push({glyph:to,imageName:Cl,x:_r,y:vr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Ko,metrics:xs,rect:jo}),_r+=Iu*Za.scale+gt):(ha.push({glyph:to,imageName:Cl,x:_r,y:vr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Ko,metrics:xs,rect:jo}),_r+=xs.advance*Za.scale+gt)}if(ha.length!==0){var Xd=_r-gt;Fr=Math.max(Xd,Fr),sO(ha,0,ha.length-1,Gi,eo)}_r=0;var Zd=ae*Dn+eo;ga.lineOffset=Math.max(eo,Zn),vr+=Zd,ai=Math.max(Zd,ai),++Ti}var Zh=vr-R1,fv=wS(he),hv=fv.horizontalAlign,Mh=fv.verticalAlign;Cd(m.positionedLines,Gi,hv,Mh,Fr,ai,ae,Zh,$.length),m.top+=-Mh*Zh,m.bottom=m.top+Zh,m.left+=-hv*Fr,m.right=m.left+Fr}function sO(m,y,I,U,$){if(!(!U&&!$))for(var ae=m[I],he=ae.metrics.advance*ae.scale,Oe=(m[I].x+he)*U,rt=y;rt<=I;rt++)m[rt].x-=Oe,m[rt].y+=$}function Cd(m,y,I,U,$,ae,he,Oe,rt){var gt=(y-I)*$,Mt=0;ae!==he?Mt=-Oe*U-R1:Mt=(-U*rt+.5)*he;for(var or=0,_r=m;or<_r.length;or+=1)for(var vr=_r[or],Fr=0,ai=vr.positionedGlyphs;Fr<ai.length;Fr+=1){var Gi=ai[Fr];Gi.x+=gt,Gi.y+=Mt}}function tp(m,y,I){var U=wS(I),$=U.horizontalAlign,ae=U.verticalAlign,he=y[0],Oe=y[1],rt=he-m.displaySize[0]*$,gt=rt+m.displaySize[0],Mt=Oe-m.displaySize[1]*ae,or=Mt+m.displaySize[1];return{image:m,top:Mt,bottom:or,left:rt,right:gt}}function hm(m,y,I,U,$,ae){var he=m.image,Oe;if(he.content){var rt=he.content,gt=he.pixelRatio||1;Oe=[rt[0]/gt,rt[1]/gt,he.displaySize[0]-rt[2]/gt,he.displaySize[1]-rt[3]/gt]}var Mt=y.left*ae,or=y.right*ae,_r,vr,Fr,ai;I===\"width\"||I===\"both\"?(ai=$[0]+Mt-U[3],vr=$[0]+or+U[1]):(ai=$[0]+(Mt+or-he.displaySize[0])/2,vr=ai+he.displaySize[0]);var Gi=y.top*ae,Ti=y.bottom*ae;return I===\"height\"||I===\"both\"?(_r=$[1]+Gi-U[0],Fr=$[1]+Ti+U[2]):(_r=$[1]+(Gi+Ti-he.displaySize[1])/2,Fr=_r+he.displaySize[1]),{image:he,top:_r,right:vr,bottom:Fr,left:ai,collisionPadding:Oe}}var Wd=function(m){function y(I,U,$,ae){m.call(this,I,U),this.angle=$,ae!==void 0&&(this.segment=ae)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.clone=function(){return new y(this.x,this.y,this.angle,this.segment)},y}(u);X(\"Anchor\",Wd);var kd=128;function mp(m,y){var I=y.expression;if(I.kind===\"constant\"){var U=I.evaluate(new Gn(m+1));return{kind:\"constant\",layoutSize:U}}else{if(I.kind===\"source\")return{kind:\"source\"};for(var $=I.zoomStops,ae=I.interpolationType,he=0;he<$.length&&$[he]<=m;)he++;he=Math.max(0,he-1);for(var Oe=he;Oe<$.length&&$[Oe]<m+1;)Oe++;Oe=Math.min($.length-1,Oe);var rt=$[he],gt=$[Oe];if(I.kind===\"composite\")return{kind:\"composite\",minZoom:rt,maxZoom:gt,interpolationType:ae};var Mt=I.evaluate(new Gn(rt)),or=I.evaluate(new Gn(gt));return{kind:\"camera\",minZoom:rt,maxZoom:gt,minSize:Mt,maxSize:or,interpolationType:ae}}}function kQ(m,y,I){var U=y.uSize,$=y.uSizeT,ae=I.lowerSize,he=I.upperSize;return m.kind===\"source\"?ae/kd:m.kind===\"composite\"?al(ae/kd,he/kd,$):U}function LQ(m,y){var I=0,U=0;if(m.kind===\"constant\")U=m.layoutSize;else if(m.kind!==\"source\"){var $=m.interpolationType,ae=m.minZoom,he=m.maxZoom,Oe=$?p(Wl.interpolationFactor($,y,ae,he),0,1):0;m.kind===\"camera\"?U=al(m.minSize,m.maxSize,Oe):I=Oe}return{uSizeT:I,uSize:U}}var QQe=Object.freeze({__proto__:null,getSizeData:mp,evaluateSizeForFeature:kQ,evaluateSizeForZoom:LQ,SIZE_PACK_FACTOR:kd});function PQ(m,y,I,U,$){if(y.segment===void 0)return!0;for(var ae=y,he=y.segment+1,Oe=0;Oe>-I/2;){if(he--,he<0)return!1;Oe-=m[he].dist(ae),ae=m[he]}Oe+=m[he].dist(m[he+1]),he++;for(var rt=[],gt=0;Oe<I/2;){var Mt=m[he-1],or=m[he],_r=m[he+1];if(!_r)return!1;var vr=Mt.angleTo(or)-or.angleTo(_r);for(vr=Math.abs((vr+3*Math.PI)%(Math.PI*2)-Math.PI),rt.push({distance:Oe,angleDelta:vr}),gt+=vr;Oe-rt[0].distance>U;)gt-=rt.shift().angleDelta;if(gt>$)return!1;he++,Oe+=or.dist(_r)}return!0}function IQ(m){for(var y=0,I=0;I<m.length-1;I++)y+=m[I].dist(m[I+1]);return y}function RQ(m,y,I){return m?3/5*y*I:0}function DQ(m,y){return Math.max(m?m.right-m.left:0,y?y.right-y.left:0)}function eet(m,y,I,U,$,ae){for(var he=RQ(I,$,ae),Oe=DQ(I,U)*ae,rt=0,gt=IQ(m)/2,Mt=0;Mt<m.length-1;Mt++){var or=m[Mt],_r=m[Mt+1],vr=or.dist(_r);if(rt+vr>gt){var Fr=(gt-rt)/vr,ai=al(or.x,_r.x,Fr),Gi=al(or.y,_r.y,Fr),Ti=new Wd(ai,Gi,_r.angleTo(or),Mt);return Ti._round(),!he||PQ(m,Ti,Oe,he,y)?Ti:void 0}rt+=vr}}function tet(m,y,I,U,$,ae,he,Oe,rt){var gt=RQ(U,ae,he),Mt=DQ(U,$),or=Mt*he,_r=m[0].x===0||m[0].x===rt||m[0].y===0||m[0].y===rt;y-or<y/4&&(y=or+y/4);var vr=ae*2,Fr=_r?y/2*Oe%y:(Mt/2+vr)*he*Oe%y;return FQ(m,Fr,y,gt,I,or,_r,!1,rt)}function FQ(m,y,I,U,$,ae,he,Oe,rt){for(var gt=ae/2,Mt=IQ(m),or=0,_r=y-I,vr=[],Fr=0;Fr<m.length-1;Fr++){for(var ai=m[Fr],Gi=m[Fr+1],Ti=ai.dist(Gi),bn=Gi.angleTo(ai);_r+I<or+Ti;){_r+=I;var rn=(_r-or)/Ti,xn=al(ai.x,Gi.x,rn),Dn=al(ai.y,Gi.y,rn);if(xn>=0&&xn<rt&&Dn>=0&&Dn<rt&&_r-gt>=0&&_r+gt<=Mt){var Zn=new Wd(xn,Dn,bn,Fr);Zn._round(),(!U||PQ(m,Zn,ae,U,$))&&vr.push(Zn)}}or+=Ti}return!Oe&&!vr.length&&!he&&(vr=FQ(m,or/2,I,U,$,ae,he,!0,rt)),vr}function zQ(m,y,I,U,$){for(var ae=[],he=0;he<m.length;he++)for(var Oe=m[he],rt=void 0,gt=0;gt<Oe.length-1;gt++){var Mt=Oe[gt],or=Oe[gt+1];Mt.x<y&&or.x<y||(Mt.x<y?Mt=new u(y,Mt.y+(or.y-Mt.y)*((y-Mt.x)/(or.x-Mt.x)))._round():or.x<y&&(or=new u(y,Mt.y+(or.y-Mt.y)*((y-Mt.x)/(or.x-Mt.x)))._round()),!(Mt.y<I&&or.y<I)&&(Mt.y<I?Mt=new u(Mt.x+(or.x-Mt.x)*((I-Mt.y)/(or.y-Mt.y)),I)._round():or.y<I&&(or=new u(Mt.x+(or.x-Mt.x)*((I-Mt.y)/(or.y-Mt.y)),I)._round()),!(Mt.x>=U&&or.x>=U)&&(Mt.x>=U?Mt=new u(U,Mt.y+(or.y-Mt.y)*((U-Mt.x)/(or.x-Mt.x)))._round():or.x>=U&&(or=new u(U,Mt.y+(or.y-Mt.y)*((U-Mt.x)/(or.x-Mt.x)))._round()),!(Mt.y>=$&&or.y>=$)&&(Mt.y>=$?Mt=new u(Mt.x+(or.x-Mt.x)*(($-Mt.y)/(or.y-Mt.y)),$)._round():or.y>=$&&(or=new u(Mt.x+(or.x-Mt.x)*(($-Mt.y)/(or.y-Mt.y)),$)._round()),(!rt||!Mt.equals(rt[rt.length-1]))&&(rt=[Mt],ae.push(rt)),rt.push(or)))))}return ae}var Hw=Gc;function OQ(m,y,I,U){var $=[],ae=m.image,he=ae.pixelRatio,Oe=ae.paddedRect.w-2*Hw,rt=ae.paddedRect.h-2*Hw,gt=m.right-m.left,Mt=m.bottom-m.top,or=ae.stretchX||[[0,Oe]],_r=ae.stretchY||[[0,rt]],vr=function(Ll,_l){return Ll+_l[1]-_l[0]},Fr=or.reduce(vr,0),ai=_r.reduce(vr,0),Gi=Oe-Fr,Ti=rt-ai,bn=0,rn=Fr,xn=0,Dn=ai,Zn=0,ga=Gi,ha=0,eo=Ti;if(ae.content&&U){var za=ae.content;bn=Yk(or,0,za[0]),xn=Yk(_r,0,za[1]),rn=Yk(or,za[0],za[2]),Dn=Yk(_r,za[1],za[3]),Zn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-rn,eo=za[3]-za[1]-Dn}var Za=function(Ll,_l,Qu,gc){var Af=Kk(Ll.stretch-bn,rn,gt,m.left),Df=Jk(Ll.fixed-Zn,ga,Ll.stretch,Fr),Xh=Kk(_l.stretch-xn,Dn,Mt,m.top),ch=Jk(_l.fixed-ha,eo,_l.stretch,ai),Xd=Kk(Qu.stretch-bn,rn,gt,m.left),Zd=Jk(Qu.fixed-Zn,ga,Qu.stretch,Fr),Zh=Kk(gc.stretch-xn,Dn,Mt,m.top),fv=Jk(gc.fixed-ha,eo,gc.stretch,ai),hv=new u(Af,Xh),Mh=new u(Xd,Xh),dv=new u(Xd,Zh),yp=new u(Af,Zh),py=new u(Df/he,ch/he),z1=new u(Zd/he,fv/he),O1=y*Math.PI/180;if(O1){var q1=Math.sin(O1),$w=Math.cos(O1),y0=[$w,-q1,q1,$w];hv._matMult(y0),Mh._matMult(y0),yp._matMult(y0),dv._matMult(y0)}var i6=Ll.stretch+Ll.fixed,pO=Qu.stretch+Qu.fixed,n6=_l.stretch+_l.fixed,gO=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+Hw+i6,y:ae.paddedRect.y+Hw+n6,w:pO-i6,h:gO-n6},Qw=ga/he/gt,a6=eo/he/Mt;return{tl:hv,tr:Mh,bl:yp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:py,pixelOffsetBR:z1,minFontScaleX:Qw,minFontScaleY:a6,isSDF:I}};if(!U||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Oe+1},{fixed:0,stretch:rt+1}));else for(var Ko=qQ(or,Gi,Fr),to=qQ(_r,Ti,ai),ao=0;ao<Ko.length-1;ao++)for(var xs=Ko[ao],jo=Ko[ao+1],Cl=0;Cl<to.length-1;Cl++){var Iu=to[Cl],kl=to[Cl+1];$.push(Za(xs,Iu,jo,kl))}return $}function Yk(m,y,I){for(var U=0,$=0,ae=m;$<ae.length;$+=1){var he=ae[$];U+=Math.max(y,Math.min(I,he[1]))-Math.max(y,Math.min(I,he[0]))}return U}function qQ(m,y,I){for(var U=[{fixed:-Hw,stretch:0}],$=0,ae=m;$<ae.length;$+=1){var he=ae[$],Oe=he[0],rt=he[1],gt=U[U.length-1];U.push({fixed:Oe-gt.stretch,stretch:gt.stretch}),U.push({fixed:Oe-gt.stretch,stretch:gt.stretch+(rt-Oe)})}return U.push({fixed:y+Hw,stretch:I}),U}function Kk(m,y,I,U){return m/y*I+U}function Jk(m,y,I,U){return m-y*I/U}function ret(m,y,I,U,$,ae,he,Oe){for(var rt=U.layout.get(\"text-rotate\").evaluate(ae,{})*Math.PI/180,gt=[],Mt=0,or=y.positionedLines;Mt<or.length;Mt+=1)for(var _r=or[Mt],vr=0,Fr=_r.positionedGlyphs;vr<Fr.length;vr+=1){var ai=Fr[vr];if(ai.rect){var Gi=ai.rect||{},Ti=1,bn=Gp+Ti,rn=!0,xn=1,Dn=0,Zn=($||Oe)&&ai.vertical,ga=ai.metrics.advance*ai.scale/2;if(Oe&&y.verticalizable){var ha=(ai.scale-1)*An,eo=(An-ai.metrics.width*ai.scale)/2;Dn=_r.lineOffset/2-(ai.imageName?-eo:ha)}if(ai.imageName){var za=he[ai.imageName];rn=za.sdf,xn=za.pixelRatio,bn=Gc/xn}var Za=$?[ai.x+ga,ai.y]:[0,0],Ko=$?[0,0]:[ai.x+ga+I[0],ai.y+I[1]-Dn],to=[0,0];Zn&&(to=Ko,Ko=[0,0]);var ao=(ai.metrics.left-bn)*ai.scale-ga+Ko[0],xs=(-ai.metrics.top-bn)*ai.scale+Ko[1],jo=ao+Gi.w*ai.scale/xn,Cl=xs+Gi.h*ai.scale/xn,Iu=new u(ao,xs),kl=new u(jo,xs),Ll=new u(ao,Cl),_l=new u(jo,Cl);if(Zn){var Qu=new u(-ga,ga-R1),gc=-Math.PI/2,Af=An/2-ga,Df=ai.imageName?Af:0,Xh=new u(5-R1-Af,-Df),ch=new(Function.prototype.bind.apply(u,[null].concat(to)));Iu._rotateAround(gc,Qu)._add(Xh)._add(ch),kl._rotateAround(gc,Qu)._add(Xh)._add(ch),Ll._rotateAround(gc,Qu)._add(Xh)._add(ch),_l._rotateAround(gc,Qu)._add(Xh)._add(ch)}if(rt){var Xd=Math.sin(rt),Zd=Math.cos(rt),Zh=[Zd,-Xd,Xd,Zd];Iu._matMult(Zh),kl._matMult(Zh),Ll._matMult(Zh),_l._matMult(Zh)}var fv=new u(0,0),hv=new u(0,0),Mh=0,dv=0;gt.push({tl:Iu,tr:kl,bl:Ll,br:_l,tex:Gi,writingMode:y.writingMode,glyphOffset:Za,sectionIndex:ai.sectionIndex,isSDF:rn,pixelOffsetTL:fv,pixelOffsetBR:hv,minFontScaleX:Mh,minFontScaleY:dv})}}return gt}var $k=function(y,I,U,$,ae,he,Oe,rt,gt,Mt){if(this.boxStartIndex=y.length,gt){var or=he.top,_r=he.bottom,vr=he.collisionPadding;vr&&(or-=vr[1],_r+=vr[3]);var Fr=_r-or;Fr>0&&(Fr=Math.max(10,Fr),this.circleDiameter=Fr)}else{var ai=he.top*Oe-rt,Gi=he.bottom*Oe+rt,Ti=he.left*Oe-rt,bn=he.right*Oe+rt,rn=he.collisionPadding;if(rn&&(Ti-=rn[0]*Oe,ai-=rn[1]*Oe,bn+=rn[2]*Oe,Gi+=rn[3]*Oe),Mt){var xn=new u(Ti,ai),Dn=new u(bn,ai),Zn=new u(Ti,Gi),ga=new u(bn,Gi),ha=Mt*Math.PI/180;xn._rotate(ha),Dn._rotate(ha),Zn._rotate(ha),ga._rotate(ha),Ti=Math.min(xn.x,Dn.x,Zn.x,ga.x),bn=Math.max(xn.x,Dn.x,Zn.x,ga.x),ai=Math.min(xn.y,Dn.y,Zn.y,ga.y),Gi=Math.max(xn.y,Dn.y,Zn.y,ga.y)}y.emplaceBack(I.x,I.y,Ti,ai,bn,Gi,U,$,ae)}this.boxEndIndex=y.length},jw=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=iet),this.data=y,this.length=this.data.length,this.compare=I,this.length>0)for(var U=(this.length>>1)-1;U>=0;U--)this._down(U)};jw.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},jw.prototype.pop=function(){if(this.length!==0){var y=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),y}},jw.prototype.peek=function(){return this.data[0]},jw.prototype._up=function(y){for(var I=this,U=I.data,$=I.compare,ae=U[y];y>0;){var he=y-1>>1,Oe=U[he];if($(ae,Oe)>=0)break;U[y]=Oe,y=he}U[y]=ae},jw.prototype._down=function(y){for(var I=this,U=I.data,$=I.compare,ae=this.length>>1,he=U[y];y<ae;){var Oe=(y<<1)+1,rt=U[Oe],gt=Oe+1;if(gt<this.length&&$(U[gt],rt)<0&&(Oe=gt,rt=U[gt]),$(rt,he)>=0)break;U[y]=rt,y=Oe}U[y]=he};function iet(m,y){return m<y?-1:m>y?1:0}function net(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var U=1/0,$=1/0,ae=-1/0,he=-1/0,Oe=m[0],rt=0;rt<Oe.length;rt++){var gt=Oe[rt];(!rt||gt.x<U)&&(U=gt.x),(!rt||gt.y<$)&&($=gt.y),(!rt||gt.x>ae)&&(ae=gt.x),(!rt||gt.y>he)&&(he=gt.y)}var Mt=ae-U,or=he-$,_r=Math.min(Mt,or),vr=_r/2,Fr=new jw([],aet);if(_r===0)return new u(U,$);for(var ai=U;ai<ae;ai+=_r)for(var Gi=$;Gi<he;Gi+=_r)Fr.push(new Ww(ai+vr,Gi+vr,vr,m));for(var Ti=set(m),bn=Fr.length;Fr.length;){var rn=Fr.pop();(rn.d>Ti.d||!Ti.d)&&(Ti=rn,I&&console.log(\"found best %d after %d probes\",Math.round(1e4*rn.d)/1e4,bn)),!(rn.max-Ti.d<=y)&&(vr=rn.h/2,Fr.push(new Ww(rn.p.x-vr,rn.p.y-vr,vr,m)),Fr.push(new Ww(rn.p.x+vr,rn.p.y-vr,vr,m)),Fr.push(new Ww(rn.p.x-vr,rn.p.y+vr,vr,m)),Fr.push(new Ww(rn.p.x+vr,rn.p.y+vr,vr,m)),bn+=4)}return I&&(console.log(\"num probes: \"+bn),console.log(\"best distance: \"+Ti.d)),Ti.p}function aet(m,y){return y.max-m.max}function Ww(m,y,I,U){this.p=new u(m,y),this.h=I,this.d=oet(this.p,U),this.max=this.d+this.h*Math.SQRT2}function oet(m,y){for(var I=!1,U=1/0,$=0;$<y.length;$++)for(var ae=y[$],he=0,Oe=ae.length,rt=Oe-1;he<Oe;rt=he++){var gt=ae[he],Mt=ae[rt];gt.y>m.y!=Mt.y>m.y&&m.x<(Mt.x-gt.x)*(m.y-gt.y)/(Mt.y-gt.y)+gt.x&&(I=!I),U=Math.min(U,cg(m,gt,Mt))}return(I?1:-1)*Math.sqrt(U)}function set(m){for(var y=0,I=0,U=0,$=m[0],ae=0,he=$.length,Oe=he-1;ae<he;Oe=ae++){var rt=$[ae],gt=$[Oe],Mt=rt.x*gt.y-gt.x*rt.y;I+=(rt.x+gt.x)*Mt,U+=(rt.y+gt.y)*Mt,y+=Mt*3}return new Ww(I/y,U/y,0,m)}var Xw=7,lO=Number.POSITIVE_INFINITY;function BQ(m,y){function I($,ae){var he=0,Oe=0;ae<0&&(ae=0);var rt=ae/Math.sqrt(2);switch($){case\"top-right\":case\"top-left\":Oe=rt-Xw;break;case\"bottom-right\":case\"bottom-left\":Oe=-rt+Xw;break;case\"bottom\":Oe=-ae+Xw;break;case\"top\":Oe=ae-Xw;break}switch($){case\"top-right\":case\"bottom-right\":he=-rt;break;case\"top-left\":case\"bottom-left\":he=rt;break;case\"left\":he=ae;break;case\"right\":he=-ae;break}return[he,Oe]}function U($,ae,he){var Oe=0,rt=0;switch(ae=Math.abs(ae),he=Math.abs(he),$){case\"top-right\":case\"top-left\":case\"top\":rt=he-Xw;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":rt=-he+Xw;break}switch($){case\"top-right\":case\"bottom-right\":case\"right\":Oe=-ae;break;case\"top-left\":case\"bottom-left\":case\"left\":Oe=ae;break}return[Oe,rt]}return y[1]!==lO?U(m,y[0],y[1]):I(m,y[0])}function uet(m,y,I,U,$,ae,he){m.createArrays();var Oe=512*m.overscaling;m.tilePixelRatio=Ci/Oe,m.compareText={},m.iconsNeedLinear=!1;var rt=m.layers[0].layout,gt=m.layers[0]._unevaluatedLayout._values,Mt={};if(m.textSizeData.kind===\"composite\"){var or=m.textSizeData,_r=or.minZoom,vr=or.maxZoom;Mt.compositeTextSizes=[gt[\"text-size\"].possiblyEvaluate(new Gn(_r),he),gt[\"text-size\"].possiblyEvaluate(new Gn(vr),he)]}if(m.iconSizeData.kind===\"composite\"){var Fr=m.iconSizeData,ai=Fr.minZoom,Gi=Fr.maxZoom;Mt.compositeIconSizes=[gt[\"icon-size\"].possiblyEvaluate(new Gn(ai),he),gt[\"icon-size\"].possiblyEvaluate(new Gn(Gi),he)]}Mt.layoutTextSize=gt[\"text-size\"].possiblyEvaluate(new Gn(m.zoom+1),he),Mt.layoutIconSize=gt[\"icon-size\"].possiblyEvaluate(new Gn(m.zoom+1),he),Mt.textMaxSize=gt[\"text-size\"].possiblyEvaluate(new Gn(18));for(var Ti=rt.get(\"text-line-height\")*An,bn=rt.get(\"text-rotation-alignment\")===\"map\"&&rt.get(\"symbol-placement\")!==\"point\",rn=rt.get(\"text-keep-upright\"),xn=rt.get(\"text-size\"),Dn=function(){var ha=ga[Zn],eo=rt.get(\"text-font\").evaluate(ha,{},he).join(\",\"),za=xn.evaluate(ha,{},he),Za=Mt.layoutTextSize.evaluate(ha,{},he),Ko=Mt.layoutIconSize.evaluate(ha,{},he),to={horizontal:{},vertical:void 0},ao=ha.text,xs=[0,0];if(ao){var jo=ao.toString(),Cl=rt.get(\"text-letter-spacing\").evaluate(ha,{},he)*An,Iu=gr(jo)?Cl:0,kl=rt.get(\"text-anchor\").evaluate(ha,{},he),Ll=rt.get(\"text-variable-anchor\");if(!Ll){var _l=rt.get(\"text-radial-offset\").evaluate(ha,{},he);_l?xs=BQ(kl,[_l*An,lO]):xs=rt.get(\"text-offset\").evaluate(ha,{},he).map(function(py){return py*An})}var Qu=bn?\"center\":rt.get(\"text-justify\").evaluate(ha,{},he),gc=rt.get(\"symbol-placement\"),Af=gc===\"point\"?rt.get(\"text-max-width\").evaluate(ha,{},he)*An:0,Df=function(){m.allowVerticalPlacement&&jt(jo)&&(to.vertical=Vw(ao,y,I,$,eo,Af,Ti,kl,\"left\",Iu,xs,uv.vertical,!0,gc,Za,za))};if(!bn&&Ll){for(var Xh=Qu===\"auto\"?Ll.map(function(py){return uO(py)}):[Qu],ch=!1,Xd=0;Xd<Xh.length;Xd++){var Zd=Xh[Xd];if(!to.horizontal[Zd])if(ch)to.horizontal[Zd]=to.horizontal[0];else{var Zh=Vw(ao,y,I,$,eo,Af,Ti,\"center\",Zd,Iu,xs,uv.horizontal,!1,gc,Za,za);Zh&&(to.horizontal[Zd]=Zh,ch=Zh.positionedLines.length===1)}}Df()}else{Qu===\"auto\"&&(Qu=uO(kl));var fv=Vw(ao,y,I,$,eo,Af,Ti,kl,Qu,Iu,xs,uv.horizontal,!1,gc,Za,za);fv&&(to.horizontal[Qu]=fv),Df(),jt(jo)&&bn&&rn&&(to.vertical=Vw(ao,y,I,$,eo,Af,Ti,kl,Qu,Iu,xs,uv.vertical,!1,gc,Za,za))}}var hv=void 0,Mh=!1;if(ha.icon&&ha.icon.name){var dv=U[ha.icon.name];dv&&(hv=tp($[ha.icon.name],rt.get(\"icon-offset\").evaluate(ha,{},he),rt.get(\"icon-anchor\").evaluate(ha,{},he)),Mh=dv.sdf,m.sdfIcons===void 0?m.sdfIcons=dv.sdf:m.sdfIcons!==dv.sdf&&re(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),(dv.pixelRatio!==m.pixelRatio||rt.get(\"icon-rotate\").constantOr(1)!==0)&&(m.iconsNeedLinear=!0))}var yp=UQ(to.horizontal)||to.vertical;m.iconsInText=yp?yp.iconsInText:!1,(yp||hv)&&cet(m,ha,to,hv,U,Mt,Za,Ko,xs,Mh,he)},Zn=0,ga=m.features;Zn<ga.length;Zn+=1)Dn();ae&&m.generateCollisionDebugBuffers()}function uO(m){switch(m){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function cet(m,y,I,U,$,ae,he,Oe,rt,gt,Mt){var or=ae.textMaxSize.evaluate(y,{});or===void 0&&(or=he);var _r=m.layers[0].layout,vr=_r.get(\"icon-offset\").evaluate(y,{},Mt),Fr=UQ(I.horizontal),ai=24,Gi=he/ai,Ti=m.tilePixelRatio*Gi,bn=m.tilePixelRatio*or/ai,rn=m.tilePixelRatio*Oe,xn=m.tilePixelRatio*_r.get(\"symbol-spacing\"),Dn=_r.get(\"text-padding\")*m.tilePixelRatio,Zn=_r.get(\"icon-padding\")*m.tilePixelRatio,ga=_r.get(\"text-max-angle\")/180*Math.PI,ha=_r.get(\"text-rotation-alignment\")===\"map\"&&_r.get(\"symbol-placement\")!==\"point\",eo=_r.get(\"icon-rotation-alignment\")===\"map\"&&_r.get(\"symbol-placement\")!==\"point\",za=_r.get(\"symbol-placement\"),Za=xn/2,Ko=_r.get(\"icon-text-fit\"),to;U&&Ko!==\"none\"&&(m.allowVerticalPlacement&&I.vertical&&(to=hm(U,I.vertical,Ko,_r.get(\"icon-text-fit-padding\"),vr,Gi)),Fr&&(U=hm(U,Fr,Ko,_r.get(\"icon-text-fit-padding\"),vr,Gi)));var ao=function($w,y0){y0.x<0||y0.x>=Ci||y0.y<0||y0.y>=Ci||fet(m,y0,$w,I,U,$,to,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,Ti,Dn,ha,rt,rn,Zn,eo,vr,y,ae,gt,Mt,he)};if(za===\"line\")for(var xs=0,jo=zQ(y.geometry,0,0,Ci,Ci);xs<jo.length;xs+=1)for(var Cl=jo[xs],Iu=tet(Cl,xn,ga,I.vertical||Fr,U,ai,bn,m.overscaling,Ci),kl=0,Ll=Iu;kl<Ll.length;kl+=1){var _l=Ll[kl],Qu=Fr;(!Qu||!het(m,Qu.text,Za,_l))&&ao(Cl,_l)}else if(za===\"line-center\")for(var gc=0,Af=y.geometry;gc<Af.length;gc+=1){var Df=Af[gc];if(Df.length>1){var Xh=eet(Df,ga,I.vertical||Fr,U,ai,bn);Xh&&ao(Df,Xh)}}else if(y.type===\"Polygon\")for(var ch=0,Xd=Fw(y.geometry,0);ch<Xd.length;ch+=1){var Zd=Xd[ch],Zh=net(Zd,16);ao(Zd[0],new Wd(Zh.x,Zh.y,0))}else if(y.type===\"LineString\")for(var fv=0,hv=y.geometry;fv<hv.length;fv+=1){var Mh=hv[fv];ao(Mh,new Wd(Mh[0].x,Mh[0].y,0))}else if(y.type===\"Point\")for(var dv=0,yp=y.geometry;dv<yp.length;dv+=1)for(var py=yp[dv],z1=0,O1=py;z1<O1.length;z1+=1){var q1=O1[z1];ao([q1],new Wd(q1.x,q1.y,0))}}var TS=255,D1=TS*kd;function NQ(m,y,I,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr){var ai=ret(y,I,Oe,$,ae,he,U,m.allowVerticalPlacement),Gi=m.textSizeData,Ti=null;Gi.kind===\"source\"?(Ti=[kd*$.layout.get(\"text-size\").evaluate(he,{})],Ti[0]>D1&&re(m.layerIds[0]+': Value for \"text-size\" is >= '+TS+'. Reduce your \"text-size\".')):Gi.kind===\"composite\"&&(Ti=[kd*vr.compositeTextSizes[0].evaluate(he,{},Fr),kd*vr.compositeTextSizes[1].evaluate(he,{},Fr)],(Ti[0]>D1||Ti[1]>D1)&&re(m.layerIds[0]+': Value for \"text-size\" is >= '+TS+'. Reduce your \"text-size\".')),m.addSymbols(m.text,ai,Ti,Oe,ae,he,gt,y,rt.lineStartIndex,rt.lineLength,_r,Fr);for(var bn=0,rn=Mt;bn<rn.length;bn+=1){var xn=rn[bn];or[xn]=m.text.placedSymbolArray.length-1}return ai.length*4}function UQ(m){for(var y in m)return m[y];return null}function fet(m,y,I,U,$,ae,he,Oe,rt,gt,Mt,or,_r,vr,Fr,ai,Gi,Ti,bn,rn,xn,Dn,Zn,ga,ha){var eo,za=m.addToLineVertexArray(y,I),Za,Ko,to,ao,xs=0,jo=0,Cl=0,Iu=0,kl=-1,Ll=-1,_l={},Qu=K(\"\"),gc=0,Af=0;if(Oe._unevaluatedLayout.getValue(\"text-radial-offset\")===void 0?(eo=Oe.layout.get(\"text-offset\").evaluate(xn,{},ga).map(function(MS){return MS*An}),gc=eo[0],Af=eo[1]):(gc=Oe.layout.get(\"text-radial-offset\").evaluate(xn,{},ga)*An,Af=lO),m.allowVerticalPlacement&&U.vertical){var Df=Oe.layout.get(\"text-rotate\").evaluate(xn,{},ga),Xh=Df+90,ch=U.vertical;to=new $k(rt,y,gt,Mt,or,ch,_r,vr,Fr,Xh),he&&(ao=new $k(rt,y,gt,Mt,or,he,Gi,Ti,Fr,Xh))}if($){var Xd=Oe.layout.get(\"icon-rotate\").evaluate(xn,{}),Zd=Oe.layout.get(\"icon-text-fit\")!==\"none\",Zh=OQ($,Xd,Zn,Zd),fv=he?OQ(he,Xd,Zn,Zd):void 0;Ko=new $k(rt,y,gt,Mt,or,$,Gi,Ti,!1,Xd),xs=Zh.length*4;var hv=m.iconSizeData,Mh=null;hv.kind===\"source\"?(Mh=[kd*Oe.layout.get(\"icon-size\").evaluate(xn,{})],Mh[0]>D1&&re(m.layerIds[0]+': Value for \"icon-size\" is >= '+TS+'. Reduce your \"icon-size\".')):hv.kind===\"composite\"&&(Mh=[kd*Dn.compositeIconSizes[0].evaluate(xn,{},ga),kd*Dn.compositeIconSizes[1].evaluate(xn,{},ga)],(Mh[0]>D1||Mh[1]>D1)&&re(m.layerIds[0]+': Value for \"icon-size\" is >= '+TS+'. Reduce your \"icon-size\".')),m.addSymbols(m.icon,Zh,Mh,rn,bn,xn,!1,y,za.lineStartIndex,za.lineLength,-1,ga),kl=m.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,m.addSymbols(m.icon,fv,Mh,rn,bn,xn,uv.vertical,y,za.lineStartIndex,za.lineLength,-1,ga),Ll=m.icon.placedSymbolArray.length-1)}for(var dv in U.horizontal){var yp=U.horizontal[dv];if(!Za){Qu=K(yp.text);var py=Oe.layout.get(\"text-rotate\").evaluate(xn,{},ga);Za=new $k(rt,y,gt,Mt,or,yp,_r,vr,Fr,py)}var z1=yp.positionedLines.length===1;if(Cl+=NQ(m,y,yp,ae,Oe,Fr,xn,ai,za,U.vertical?uv.horizontal:uv.horizontalOnly,z1?Object.keys(U.horizontal):[dv],_l,kl,Dn,ga),z1)break}U.vertical&&(Iu+=NQ(m,y,U.vertical,ae,Oe,Fr,xn,ai,za,uv.vertical,[\"vertical\"],_l,Ll,Dn,ga));var O1=Za?Za.boxStartIndex:m.collisionBoxArray.length,q1=Za?Za.boxEndIndex:m.collisionBoxArray.length,$w=to?to.boxStartIndex:m.collisionBoxArray.length,y0=to?to.boxEndIndex:m.collisionBoxArray.length,i6=Ko?Ko.boxStartIndex:m.collisionBoxArray.length,pO=Ko?Ko.boxEndIndex:m.collisionBoxArray.length,n6=ao?ao.boxStartIndex:m.collisionBoxArray.length,gO=ao?ao.boxEndIndex:m.collisionBoxArray.length,Hp=-1,Qw=function(MS,iee){return MS&&MS.circleDiameter?Math.max(MS.circleDiameter,iee):iee};Hp=Qw(Za,Hp),Hp=Qw(to,Hp),Hp=Qw(Ko,Hp),Hp=Qw(ao,Hp);var a6=Hp>-1?1:0;a6&&(Hp*=ha/An),m.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&re(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),xn.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xn.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,_l.right>=0?_l.right:-1,_l.center>=0?_l.center:-1,_l.left>=0?_l.left:-1,_l.vertical||-1,kl,Ll,Qu,O1,q1,$w,y0,i6,pO,n6,gO,gt,Cl,Iu,xs,jo,a6,0,_r,gc,Af,Hp)}function het(m,y,I,U){var $=m.compareText;if(!(y in $))$[y]=[];else for(var ae=$[y],he=ae.length-1;he>=0;he--)if(U.dist(ae[he])<I)return!0;return $[y].push(U),!1}var det=pg.VectorTileFeature.types,vet=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function Qk(m,y,I,U,$,ae,he,Oe,rt,gt,Mt,or,_r){var vr=Oe?Math.min(D1,Math.round(Oe[0])):0,Fr=Oe?Math.min(D1,Math.round(Oe[1])):0;m.emplaceBack(y,I,Math.round(U*32),Math.round($*32),ae,he,(vr<<1)+(rt?1:0),Fr,gt*16,Mt*16,or*256,_r*256)}function cO(m,y,I){m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I)}function pet(m){for(var y=0,I=m.sections;y<I.length;y+=1){var U=I[y];if(Pi(U.text))return!0}return!1}var Zw=function(y){this.layoutVertexArray=new qn,this.indexArray=new vn,this.programConfigurations=y,this.segments=new io,this.dynamicLayoutVertexArray=new vi,this.opacityVertexArray=new li,this.placedSymbolArray=new zo};Zw.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Zw.prototype.upload=function(y,I,U,$){this.isEmpty()||(U&&(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,te.members),this.indexBuffer=y.createIndexBuffer(this.indexArray,I),this.dynamicLayoutVertexBuffer=y.createVertexBuffer(this.dynamicLayoutVertexArray,fe.members,!0),this.opacityVertexBuffer=y.createVertexBuffer(this.opacityVertexArray,vet,!0),this.opacityVertexBuffer.itemSize=1),(U||$)&&this.programConfigurations.upload(y))},Zw.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},X(\"SymbolBuffers\",Zw);var AS=function(y,I,U){this.layoutVertexArray=new y,this.layoutAttributes=I,this.indexArray=new U,this.segments=new io,this.collisionVertexArray=new Bi};AS.prototype.upload=function(y){this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=y.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=y.createVertexBuffer(this.collisionVertexArray,ze.members,!0)},AS.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},X(\"CollisionBuffers\",AS);var Pu=function(y){this.collisionBoxArray=y.collisionBoxArray,this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(rt){return rt.id}),this.index=y.index,this.pixelRatio=y.pixelRatio,this.sourceLayerIndex=y.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=oy([]),this.placementViewportMatrix=oy([]);var I=this.layers[0],U=I._unevaluatedLayout._values;this.textSizeData=mp(this.zoom,U[\"text-size\"]),this.iconSizeData=mp(this.zoom,U[\"icon-size\"]);var $=this.layers[0].layout,ae=$.get(\"symbol-sort-key\"),he=$.get(\"symbol-z-order\");this.canOverlap=$.get(\"text-allow-overlap\")||$.get(\"icon-allow-overlap\")||$.get(\"text-ignore-placement\")||$.get(\"icon-ignore-placement\"),this.sortFeaturesByKey=he!==\"viewport-y\"&&ae.constantOr(1)!==void 0;var Oe=he===\"viewport-y\"||he===\"auto\"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Oe&&this.canOverlap,$.get(\"symbol-placement\")===\"point\"&&(this.writingModes=$.get(\"text-writing-mode\").map(function(rt){return uv[rt]})),this.stateDependentLayerIds=this.layers.filter(function(rt){return rt.isStateDependent()}).map(function(rt){return rt.id}),this.sourceID=y.sourceID};Pu.prototype.createArrays=function(){this.text=new Zw(new hi(this.layers,this.zoom,function(y){return/^text/.test(y)})),this.icon=new Zw(new hi(this.layers,this.zoom,function(y){return/^icon/.test(y)})),this.glyphOffsetArray=new Vl,this.lineVertexArray=new ls,this.symbolInstances=new ol},Pu.prototype.calculateGlyphDependencies=function(y,I,U,$,ae){for(var he=0;he<y.length;he++)if(I[y.charCodeAt(he)]=!0,(U||$)&&ae){var Oe=Fi[y.charAt(he)];Oe&&(I[Oe.charCodeAt(0)]=!0)}},Pu.prototype.populate=function(y,I,U){var $=this.layers[0],ae=$.layout,he=ae.get(\"text-font\"),Oe=ae.get(\"text-field\"),rt=ae.get(\"icon-image\"),gt=(Oe.value.kind!==\"constant\"||Oe.value.value instanceof Jl&&!Oe.value.value.isEmpty()||Oe.value.value.toString().length>0)&&(he.value.kind!==\"constant\"||he.value.value.length>0),Mt=rt.value.kind!==\"constant\"||!!rt.value.value||Object.keys(rt.parameters).length>0,or=ae.get(\"symbol-sort-key\");if(this.features=[],!(!gt&&!Mt)){for(var _r=I.iconDependencies,vr=I.glyphDependencies,Fr=I.availableImages,ai=new Gn(this.zoom),Gi=0,Ti=y;Gi<Ti.length;Gi+=1){var bn=Ti[Gi],rn=bn.feature,xn=bn.id,Dn=bn.index,Zn=bn.sourceLayerIndex,ga=$._featureFilter.needGeometry,ha=Ja(rn,ga);if($._featureFilter.filter(ai,ha,U)){ga||(ha.geometry=On(rn));var eo=void 0;if(gt){var za=$.getValueAndResolveTokens(\"text-field\",ha,U,Fr),Za=Jl.factory(za);pet(Za)&&(this.hasRTLText=!0),(!this.hasRTLText||yo()===\"unavailable\"||this.hasRTLText&&Es.isParsed())&&(eo=yi(Za,$,ha))}var Ko=void 0;if(Mt){var to=$.getValueAndResolveTokens(\"icon-image\",ha,U,Fr);to instanceof hl?Ko=to:Ko=hl.fromString(to)}if(!(!eo&&!Ko)){var ao=this.sortFeaturesByKey?or.evaluate(ha,{},U):void 0,xs={id:xn,text:eo,icon:Ko,index:Dn,sourceLayerIndex:Zn,geometry:ha.geometry,properties:rn.properties,type:det[rn.type],sortKey:ao};if(this.features.push(xs),Ko&&(_r[Ko.name]=!0),eo){var jo=he.evaluate(ha,{},U).join(\",\"),Cl=ae.get(\"text-rotation-alignment\")===\"map\"&&ae.get(\"symbol-placement\")!==\"point\";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(uv.vertical)>=0;for(var Iu=0,kl=eo.sections;Iu<kl.length;Iu+=1){var Ll=kl[Iu];if(Ll.image)_r[Ll.image.name]=!0;else{var _l=jt(eo.toString()),Qu=Ll.fontStack||jo,gc=vr[Qu]=vr[Qu]||{};this.calculateGlyphDependencies(Ll.text,gc,Cl,this.allowVerticalPlacement,_l)}}}}}}ae.get(\"symbol-placement\")===\"line\"&&(this.features=dn(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Af,Df){return Af.sortKey-Df.sortKey})}},Pu.prototype.update=function(y,I,U){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(y,I,this.layers,U),this.icon.programConfigurations.updatePaintArrays(y,I,this.layers,U))},Pu.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Pu.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Pu.prototype.upload=function(y){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(y),this.iconCollisionBox.upload(y)),this.text.upload(y,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(y,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Pu.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Pu.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Pu.prototype.addToLineVertexArray=function(y,I){var U=this.lineVertexArray.length;if(y.segment!==void 0){for(var $=y.dist(I[y.segment+1]),ae=y.dist(I[y.segment]),he={},Oe=y.segment+1;Oe<I.length;Oe++)he[Oe]={x:I[Oe].x,y:I[Oe].y,tileUnitDistanceFromAnchor:$},Oe<I.length-1&&($+=I[Oe+1].dist(I[Oe]));for(var rt=y.segment||0;rt>=0;rt--)he[rt]={x:I[rt].x,y:I[rt].y,tileUnitDistanceFromAnchor:ae},rt>0&&(ae+=I[rt-1].dist(I[rt]));for(var gt=0;gt<I.length;gt++){var Mt=he[gt];this.lineVertexArray.emplaceBack(Mt.x,Mt.y,Mt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:U,lineLength:this.lineVertexArray.length-U}},Pu.prototype.addSymbols=function(y,I,U,$,ae,he,Oe,rt,gt,Mt,or,_r){for(var vr=y.indexArray,Fr=y.layoutVertexArray,ai=y.segments.prepareSegment(4*I.length,Fr,vr,this.canOverlap?he.sortKey:void 0),Gi=this.glyphOffsetArray.length,Ti=ai.vertexLength,bn=this.allowVerticalPlacement&&Oe===uv.vertical?Math.PI/2:0,rn=he.text&&he.text.sections,xn=0;xn<I.length;xn++){var Dn=I[xn],Zn=Dn.tl,ga=Dn.tr,ha=Dn.bl,eo=Dn.br,za=Dn.tex,Za=Dn.pixelOffsetTL,Ko=Dn.pixelOffsetBR,to=Dn.minFontScaleX,ao=Dn.minFontScaleY,xs=Dn.glyphOffset,jo=Dn.isSDF,Cl=Dn.sectionIndex,Iu=ai.vertexLength,kl=xs[1];Qk(Fr,rt.x,rt.y,Zn.x,kl+Zn.y,za.x,za.y,U,jo,Za.x,Za.y,to,ao),Qk(Fr,rt.x,rt.y,ga.x,kl+ga.y,za.x+za.w,za.y,U,jo,Ko.x,Za.y,to,ao),Qk(Fr,rt.x,rt.y,ha.x,kl+ha.y,za.x,za.y+za.h,U,jo,Za.x,Ko.y,to,ao),Qk(Fr,rt.x,rt.y,eo.x,kl+eo.y,za.x+za.w,za.y+za.h,U,jo,Ko.x,Ko.y,to,ao),cO(y.dynamicLayoutVertexArray,rt,bn),vr.emplaceBack(Iu,Iu+1,Iu+2),vr.emplaceBack(Iu+1,Iu+2,Iu+3),ai.vertexLength+=4,ai.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(xs[0]),(xn===I.length-1||Cl!==I[xn+1].sectionIndex)&&y.programConfigurations.populatePaintArrays(Fr.length,he,he.index,{},_r,rn&&rn[Cl])}y.placedSymbolArray.emplaceBack(rt.x,rt.y,Gi,this.glyphOffsetArray.length-Gi,Ti,gt,Mt,rt.segment,U?U[0]:0,U?U[1]:0,$[0],$[1],Oe,0,!1,0,or)},Pu.prototype._addCollisionDebugVertex=function(y,I,U,$,ae,he){return I.emplaceBack(0,0),y.emplaceBack(U.x,U.y,$,ae,Math.round(he.x),Math.round(he.y))},Pu.prototype.addCollisionDebugVertices=function(y,I,U,$,ae,he,Oe){var rt=ae.segments.prepareSegment(4,ae.layoutVertexArray,ae.indexArray),gt=rt.vertexLength,Mt=ae.layoutVertexArray,or=ae.collisionVertexArray,_r=Oe.anchorX,vr=Oe.anchorY;this._addCollisionDebugVertex(Mt,or,he,_r,vr,new u(y,I)),this._addCollisionDebugVertex(Mt,or,he,_r,vr,new u(U,I)),this._addCollisionDebugVertex(Mt,or,he,_r,vr,new u(U,$)),this._addCollisionDebugVertex(Mt,or,he,_r,vr,new u(y,$)),rt.vertexLength+=4;var Fr=ae.indexArray;Fr.emplaceBack(gt,gt+1),Fr.emplaceBack(gt+1,gt+2),Fr.emplaceBack(gt+2,gt+3),Fr.emplaceBack(gt+3,gt),rt.primitiveLength+=4},Pu.prototype.addDebugCollisionBoxes=function(y,I,U,$){for(var ae=y;ae<I;ae++){var he=this.collisionBoxArray.get(ae),Oe=he.x1,rt=he.y1,gt=he.x2,Mt=he.y2;this.addCollisionDebugVertices(Oe,rt,gt,Mt,$?this.textCollisionBox:this.iconCollisionBox,he.anchorPoint,U)}},Pu.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new AS(Ki,ut.members,oa),this.iconCollisionBox=new AS(Ki,ut.members,oa);for(var y=0;y<this.symbolInstances.length;y++){var I=this.symbolInstances.get(y);this.addDebugCollisionBoxes(I.textBoxStartIndex,I.textBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.verticalTextBoxStartIndex,I.verticalTextBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.iconBoxStartIndex,I.iconBoxEndIndex,I,!1),this.addDebugCollisionBoxes(I.verticalIconBoxStartIndex,I.verticalIconBoxEndIndex,I,!1)}},Pu.prototype._deserializeCollisionBoxesForSymbol=function(y,I,U,$,ae,he,Oe,rt,gt){for(var Mt={},or=I;or<U;or++){var _r=y.get(or);Mt.textBox={x1:_r.x1,y1:_r.y1,x2:_r.x2,y2:_r.y2,anchorPointX:_r.anchorPointX,anchorPointY:_r.anchorPointY},Mt.textFeatureIndex=_r.featureIndex;break}for(var vr=$;vr<ae;vr++){var Fr=y.get(vr);Mt.verticalTextBox={x1:Fr.x1,y1:Fr.y1,x2:Fr.x2,y2:Fr.y2,anchorPointX:Fr.anchorPointX,anchorPointY:Fr.anchorPointY},Mt.verticalTextFeatureIndex=Fr.featureIndex;break}for(var ai=he;ai<Oe;ai++){var Gi=y.get(ai);Mt.iconBox={x1:Gi.x1,y1:Gi.y1,x2:Gi.x2,y2:Gi.y2,anchorPointX:Gi.anchorPointX,anchorPointY:Gi.anchorPointY},Mt.iconFeatureIndex=Gi.featureIndex;break}for(var Ti=rt;Ti<gt;Ti++){var bn=y.get(Ti);Mt.verticalIconBox={x1:bn.x1,y1:bn.y1,x2:bn.x2,y2:bn.y2,anchorPointX:bn.anchorPointX,anchorPointY:bn.anchorPointY},Mt.verticalIconFeatureIndex=bn.featureIndex;break}return Mt},Pu.prototype.deserializeCollisionBoxes=function(y){this.collisionArrays=[];for(var I=0;I<this.symbolInstances.length;I++){var U=this.symbolInstances.get(I);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(y,U.textBoxStartIndex,U.textBoxEndIndex,U.verticalTextBoxStartIndex,U.verticalTextBoxEndIndex,U.iconBoxStartIndex,U.iconBoxEndIndex,U.verticalIconBoxStartIndex,U.verticalIconBoxEndIndex))}},Pu.prototype.hasTextData=function(){return this.text.segments.get().length>0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(y,I){for(var U=y.placedSymbolArray.get(I),$=U.vertexStartIndex+U.numGlyphs*4,ae=U.vertexStartIndex;ae<$;ae+=4)y.indexArray.emplaceBack(ae,ae+1,ae+2),y.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(y){if(this.sortedAngle===y&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(y),U=Math.cos(y),$=[],ae=[],he=[],Oe=0;Oe<this.symbolInstances.length;++Oe){he.push(Oe);var rt=this.symbolInstances.get(Oe);$.push(Math.round(I*rt.anchorX+U*rt.anchorY)|0),ae.push(rt.featureIndex)}return he.sort(function(gt,Mt){return $[gt]-$[Mt]||ae[Mt]-ae[gt]}),he},Pu.prototype.addToSortKeyRanges=function(y,I){var U=this.sortKeyRanges[this.sortKeyRanges.length-1];U&&U.sortKey===I?U.symbolInstanceEnd=y+1:this.sortKeyRanges.push({sortKey:I,symbolInstanceStart:y,symbolInstanceEnd:y+1})},Pu.prototype.sortFeatures=function(y){var I=this;if(this.sortFeaturesByY&&this.sortedAngle!==y&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(y),this.sortedAngle=y,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var U=0,$=this.symbolInstanceIndexes;U<$.length;U+=1){var ae=$[U],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(Oe,rt,gt){Oe>=0&&gt.indexOf(Oe)===rt&&I.addIndicesForPlacedSymbol(I.text,Oe)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X(\"SymbolBucket\",Pu,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=cO;function get(m,y){return y.replace(/{([^{}]+)}/g,function(I,U){return U in m?String(m[U]):\"\"})}var met=new Br({\"symbol-placement\":new Ee(Fn.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new Ee(Fn.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new Ee(Fn.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new xt(Fn.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new Ee(Fn.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new Ee(Fn.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new Ee(Fn.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new Ee(Fn.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new Ee(Fn.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new xt(Fn.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new Ee(Fn.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new Ee(Fn.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new xt(Fn.layout_symbol[\"icon-image\"]),\"icon-rotate\":new xt(Fn.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new Ee(Fn.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new Ee(Fn.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new xt(Fn.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new xt(Fn.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new Ee(Fn.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new Ee(Fn.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new Ee(Fn.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new xt(Fn.layout_symbol[\"text-field\"]),\"text-font\":new xt(Fn.layout_symbol[\"text-font\"]),\"text-size\":new xt(Fn.layout_symbol[\"text-size\"]),\"text-max-width\":new xt(Fn.layout_symbol[\"text-max-width\"]),\"text-line-height\":new Ee(Fn.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new xt(Fn.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new xt(Fn.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new xt(Fn.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new Ee(Fn.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new xt(Fn.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new Ee(Fn.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new Ee(Fn.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new xt(Fn.layout_symbol[\"text-rotate\"]),\"text-padding\":new Ee(Fn.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new Ee(Fn.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new xt(Fn.layout_symbol[\"text-transform\"]),\"text-offset\":new xt(Fn.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new Ee(Fn.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new Ee(Fn.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new Ee(Fn.layout_symbol[\"text-optional\"])}),yet=new Br({\"icon-opacity\":new xt(Fn.paint_symbol[\"icon-opacity\"]),\"icon-color\":new xt(Fn.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new xt(Fn.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new xt(Fn.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new xt(Fn.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new Ee(Fn.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new Ee(Fn.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new xt(Fn.paint_symbol[\"text-opacity\"]),\"text-color\":new xt(Fn.paint_symbol[\"text-color\"],{runtimeType:ql,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),\"text-halo-color\":new xt(Fn.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new xt(Fn.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new xt(Fn.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new Ee(Fn.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new Ee(Fn.paint_symbol[\"text-translate-anchor\"])}),fO={paint:yet,layout:met},Yw=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:ac,this.defaultValue=y};Yw.prototype.evaluate=function(y){if(y.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(y.formattedSection))return I.getOverride(y.formattedSection)}return y.feature&&y.featureState?this.defaultValue.evaluate(y.feature,y.featureState):this.defaultValue.property.specification.default},Yw.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},X(\"FormatSectionOverride\",Yw,{omit:[\"defaultValue\"]});var _et=function(m){function y(I){m.call(this,I,fO)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(U,$){if(m.prototype.recalculate.call(this,U,$),this.layout.get(\"icon-rotation-alignment\")===\"auto\"&&(this.layout.get(\"symbol-placement\")!==\"point\"?this.layout._values[\"icon-rotation-alignment\"]=\"map\":this.layout._values[\"icon-rotation-alignment\"]=\"viewport\"),this.layout.get(\"text-rotation-alignment\")===\"auto\"&&(this.layout.get(\"symbol-placement\")!==\"point\"?this.layout._values[\"text-rotation-alignment\"]=\"map\":this.layout._values[\"text-rotation-alignment\"]=\"viewport\"),this.layout.get(\"text-pitch-alignment\")===\"auto\"&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")),this.layout.get(\"icon-pitch-alignment\")===\"auto\"&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\")),this.layout.get(\"symbol-placement\")===\"point\"){var ae=this.layout.get(\"text-writing-mode\");if(ae){for(var he=[],Oe=0,rt=ae;Oe<rt.length;Oe+=1){var gt=rt[Oe];he.indexOf(gt)<0&&he.push(gt)}this.layout._values[\"text-writing-mode\"]=he}else this.layout._values[\"text-writing-mode\"]=[\"horizontal\"]}this._setPaintOverrides()},y.prototype.getValueAndResolveTokens=function(U,$,ae,he){var Oe=this.layout.get(U).evaluate($,{},ae,he),rt=this._unevaluatedLayout._values[U];return!rt.isDataDriven()&&!Ua(rt.value)&&Oe?get($.properties,Oe):Oe},y.prototype.createBucket=function(U){return new Pu(U)},y.prototype.queryRadius=function(){return 0},y.prototype.queryIntersectsFeature=function(){return!1},y.prototype._setPaintOverrides=function(){for(var U=0,$=fO.paint.overridableProperties;U<$.length;U+=1){var ae=$[U];if(y.hasPaintOverride(this.layout,ae)){var he=this.paint.get(ae),Oe=new Yw(he),rt=new Ac(Oe,he.property.specification),gt=null;he.value.kind===\"constant\"||he.value.kind===\"source\"?gt=new Vc(\"source\",rt):gt=new hc(\"composite\",rt,he.value.zoomStops,he.value._interpolationType),this.paint._values[ae]=new vl(he.property,gt,he.parameters)}}},y.prototype._handleOverridablePaintPropertyUpdate=function(U,$,ae){return!this.layout||$.isDataDriven()||ae.isDataDriven()?!1:y.hasPaintOverride(this.layout,U)},y.hasPaintOverride=function(U,$){var ae=U.get(\"text-field\"),he=fO.paint.properties[$],Oe=!1,rt=function(or){for(var _r=0,vr=or;_r<vr.length;_r+=1){var Fr=vr[_r];if(he.overrides&&he.overrides.hasOverride(Fr)){Oe=!0;return}}};if(ae.value.kind===\"constant\"&&ae.value.value instanceof Jl)rt(ae.value.value.sections);else if(ae.value.kind===\"source\"){var gt=function(or){if(!Oe)if(or instanceof Go&&Cs(or.value)===ml){var _r=or.value;rt(_r.sections)}else or instanceof Gu?rt(or.sections):or.eachChild(gt)},Mt=ae.value;Mt._styleExpression&&gt(Mt._styleExpression.expression)}return Oe},y}(mi),xet=new Br({\"background-color\":new Ee(Fn.paint_background[\"background-color\"]),\"background-pattern\":new Ir(Fn.paint_background[\"background-pattern\"]),\"background-opacity\":new Ee(Fn.paint_background[\"background-opacity\"])}),bet={paint:xet},wet=function(m){function y(I){m.call(this,I,bet)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(mi),Tet=new Br({\"raster-opacity\":new Ee(Fn.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new Ee(Fn.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new Ee(Fn.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new Ee(Fn.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new Ee(Fn.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new Ee(Fn.paint_raster[\"raster-contrast\"]),\"raster-resampling\":new Ee(Fn.paint_raster[\"raster-resampling\"]),\"raster-fade-duration\":new Ee(Fn.paint_raster[\"raster-fade-duration\"])}),Aet={paint:Tet},Met=function(m){function y(I){m.call(this,I,Aet)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(mi);function Eet(m){var y=[],I=m.id;return I===void 0&&y.push({message:\"layers.\"+I+': missing required property \"id\"'}),m.render===void 0&&y.push({message:\"layers.\"+I+': missing required method \"render\"'}),m.renderingMode&&m.renderingMode!==\"2d\"&&m.renderingMode!==\"3d\"&&y.push({message:\"layers.\"+I+': property \"renderingMode\" must be either \"2d\" or \"3d\"'}),y}var Cet=function(m){function y(I){m.call(this,I,{}),this.implementation=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.is3D=function(){return this.implementation.renderingMode===\"3d\"},y.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},y.prototype.recalculate=function(){},y.prototype.updateTransitions=function(){},y.prototype.hasTransition=function(){},y.prototype.serialize=function(){},y.prototype.onAdd=function(U){this.implementation.onAdd&&this.implementation.onAdd(U,U.painter.context.gl)},y.prototype.onRemove=function(U){this.implementation.onRemove&&this.implementation.onRemove(U,U.painter.context.gl)},y}(mi),ket={circle:V9,heatmap:Lw,hillshade:_k,fill:$x,\"fill-extrusion\":fm,line:S,symbol:_et,background:wet,raster:Met};function Let(m){return m.type===\"custom\"?new Cet(m):new ket[m.type](m)}var VQ=f.HTMLImageElement,GQ=f.HTMLCanvasElement,HQ=f.HTMLVideoElement,jQ=f.ImageData,e6=f.ImageBitmap,rb=function(y,I,U,$){this.context=y,this.format=U,this.texture=y.gl.createTexture(),this.update(I,$)};rb.prototype.update=function(y,I,U){var $=y.width,ae=y.height,he=(!this.size||this.size[0]!==$||this.size[1]!==ae)&&!U,Oe=this,rt=Oe.context,gt=rt.gl;if(this.useMipmap=!!(I&&I.useMipmap),gt.bindTexture(gt.TEXTURE_2D,this.texture),rt.pixelStoreUnpackFlipY.set(!1),rt.pixelStoreUnpack.set(1),rt.pixelStoreUnpackPremultiplyAlpha.set(this.format===gt.RGBA&&(!I||I.premultiply!==!1)),he)this.size=[$,ae],y instanceof VQ||y instanceof GQ||y instanceof HQ||y instanceof jQ||e6&&y instanceof e6?gt.texImage2D(gt.TEXTURE_2D,0,this.format,this.format,gt.UNSIGNED_BYTE,y):gt.texImage2D(gt.TEXTURE_2D,0,this.format,$,ae,0,this.format,gt.UNSIGNED_BYTE,y.data);else{var Mt=U||{x:0,y:0},or=Mt.x,_r=Mt.y;y instanceof VQ||y instanceof GQ||y instanceof HQ||y instanceof jQ||e6&&y instanceof e6?gt.texSubImage2D(gt.TEXTURE_2D,0,or,_r,gt.RGBA,gt.UNSIGNED_BYTE,y):gt.texSubImage2D(gt.TEXTURE_2D,0,or,_r,$,ae,gt.RGBA,gt.UNSIGNED_BYTE,y.data)}this.useMipmap&&this.isSizePowerOfTwo()&&gt.generateMipmap(gt.TEXTURE_2D)},rb.prototype.bind=function(y,I,U){var $=this,ae=$.context,he=ae.gl;he.bindTexture(he.TEXTURE_2D,this.texture),U===he.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(U=he.LINEAR),y!==this.filter&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MAG_FILTER,y),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MIN_FILTER,U||y),this.filter=y),I!==this.wrap&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_S,I),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_T,I),this.wrap=I)},rb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},rb.prototype.destroy=function(){var y=this.context,I=y.gl;I.deleteTexture(this.texture),this.texture=null};var hO=function(y){var I=this;this._callback=y,this._triggered=!1,typeof MessageChannel!=\"undefined\"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){I._triggered=!1,I._callback()})};hO.prototype.trigger=function(){var y=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){y._triggered=!1,y._callback()},0))},hO.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Kw=function(y,I,U){this.target=y,this.parent=I,this.mapId=U,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},O([\"receive\",\"process\"],this),this.invoker=new hO(this.process),this.target.addEventListener(\"message\",this.receive,!1),this.globalScope=ke()?y:f};Kw.prototype.send=function(y,I,U,$,ae){var he=this;ae===void 0&&(ae=!1);var Oe=Math.round(Math.random()*1e18).toString(36).substring(0,10);U&&(this.callbacks[Oe]=U);var rt=Se(this.globalScope)?void 0:[];return this.target.postMessage({id:Oe,type:y,hasCallback:!!U,targetMapId:$,mustQueue:ae,sourceMapId:this.mapId,data:He(I,rt)},rt),{cancel:function(){U&&delete he.callbacks[Oe],he.target.postMessage({id:Oe,type:\"<cancel>\",targetMapId:$,sourceMapId:he.mapId})}}},Kw.prototype.receive=function(y){var I=y.data,U=I.id;if(U&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===\"<cancel>\"){delete this.tasks[U];var $=this.cancelCallbacks[U];delete this.cancelCallbacks[U],$&&$()}else ke()||I.mustQueue?(this.tasks[U]=I,this.taskQueue.push(U),this.invoker.trigger()):this.processTask(U,I)},Kw.prototype.process=function(){if(this.taskQueue.length){var y=this.taskQueue.shift(),I=this.tasks[y];delete this.tasks[y],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(y,I)}},Kw.prototype.processTask=function(y,I){var U=this;if(I.type===\"<response>\"){var $=this.callbacks[y];delete this.callbacks[y],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],Oe=I.hasCallback?function(_r,vr){ae=!0,delete U.cancelCallbacks[y],U.target.postMessage({id:y,type:\"<response>\",sourceMapId:U.mapId,error:_r?He(_r):null,data:He(vr,he)},he)}:function(_r){ae=!0},rt=null,gt=Ye(I.data);if(this.parent[I.type])rt=this.parent[I.type](I.sourceMapId,gt,Oe);else if(this.parent.getWorkerSource){var Mt=I.type.split(\".\"),or=this.parent.getWorkerSource(I.sourceMapId,Mt[0],gt.source);rt=or[Mt[1]](gt,Oe)}else Oe(new Error(\"Could not find function \"+I.type));!ae&&rt&&rt.cancel&&(this.cancelCallbacks[y]=rt.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};function Pet(m,y,I){y=Math.pow(2,I)-y-1;var U=WQ(m*256,y*256,I),$=WQ((m+1)*256,(y+1)*256,I);return U[0]+\",\"+U[1]+\",\"+$[0]+\",\"+$[1]}function WQ(m,y,I){var U=2*Math.PI*6378137/256/Math.pow(2,I),$=m*U-2*Math.PI*6378137/2,ae=y*U-2*Math.PI*6378137/2;return[$,ae]}var lh=function(y,I){y&&(I?this.setSouthWest(y).setNorthEast(I):y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1]))};lh.prototype.setNorthEast=function(y){return this._ne=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.setSouthWest=function(y){return this._sw=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.extend=function(y){var I=this._sw,U=this._ne,$,ae;if(y instanceof Hc)$=y,ae=y;else if(y instanceof lh){if($=y._sw,ae=y._ne,!$||!ae)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var he=y;return this.extend(lh.convert(he))}else{var Oe=y;return this.extend(Hc.convert(Oe))}return this}return!I&&!U?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),U.lng=Math.max(ae.lng,U.lng),U.lat=Math.max(ae.lat,U.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(y){var I=Hc.convert(y),U=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=U&&U<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=U&&U>=this._ne.lng),ae&&he},lh.convert=function(y){return!y||y instanceof lh?y:new lh(y)};var XQ=63710088e-1,Hc=function(y,I){if(isNaN(y)||isNaN(I))throw new Error(\"Invalid LngLat object: (\"+y+\", \"+I+\")\");if(this.lng=+y,this.lat=+I,this.lat>90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};Hc.prototype.wrap=function(){return new Hc(C(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Hc.prototype.distanceTo=function(y){var I=Math.PI/180,U=this.lat*I,$=y.lat*I,ae=Math.sin(U)*Math.sin($)+Math.cos(U)*Math.cos($)*Math.cos((y.lng-this.lng)*I),he=XQ*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,U=360*y/I,$=U/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-U),new Hc(this.lng+$,this.lat+U))},Hc.convert=function(y){if(y instanceof Hc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new Hc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y==\"object\"&&y!==null)return new Hc(Number(\"lng\"in y?y.lng:y.lon),Number(y.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")};var ZQ=2*Math.PI*XQ;function YQ(m){return ZQ*Math.cos(m*Math.PI/180)}function KQ(m){return(180+m)/360}function JQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function $Q(m,y){return m/YQ(y)}function Iet(m){return m*360-180}function dO(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function Ret(m,y){return m*YQ(dO(y))}function Det(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(y,I,U){U===void 0&&(U=0),this.x=+y,this.y=+I,this.z=+U};ib.fromLngLat=function(y,I){I===void 0&&(I=0);var U=Hc.convert(y);return new ib(KQ(U.lng),JQ(U.lat),$Q(I,U.lat))},ib.prototype.toLngLat=function(){return new Hc(Iet(this.x),dO(this.y))},ib.prototype.toAltitude=function(){return Ret(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/ZQ*Det(dO(this.y))};var nb=function(y,I,U){this.z=y,this.x=I,this.y=U,this.key=SS(0,y,y,I,U)};nb.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},nb.prototype.url=function(y,I){var U=Pet(this.x,this.y,this.z),$=Fet(this.z,this.x,this.y);return y[(this.x+this.y)%y.length].replace(\"{prefix}\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\"{z}\",String(this.z)).replace(\"{x}\",String(this.x)).replace(\"{y}\",String(I===\"tms\"?Math.pow(2,this.z)-this.y-1:this.y)).replace(\"{quadkey}\",$).replace(\"{bbox-epsg-3857}\",U)},nb.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*Ci,(y.y*I-this.y)*Ci)},nb.prototype.toString=function(){return this.z+\"/\"+this.x+\"/\"+this.y};var QQ=function(y,I){this.wrap=y,this.canonical=I,this.key=SS(y,I.z,I.z,I.x,I.y)},uh=function(y,I,U,$,ae){this.overscaledZ=y,this.wrap=I,this.canonical=new nb(U,+$,+ae),this.key=SS(I,y,U,$,ae)};uh.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},uh.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new uh(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(y,I){var U=this.canonical.z-y;return y>this.canonical.z?SS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):SS(this.wrap*+I,y,y,this.canonical.x>>U,this.canonical.y>>U)},uh.prototype.isChildOf=function(y){if(y.wrap!==this.wrap)return!1;var I=this.canonical.z-y.canonical.z;return y.overscaledZ===0||y.overscaledZ<this.overscaledZ&&y.canonical.x===this.canonical.x>>I&&y.canonical.y===this.canonical.y>>I},uh.prototype.children=function(y){if(this.overscaledZ>=y)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,U=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,U,$),new uh(I,this.wrap,I,U+1,$),new uh(I,this.wrap,I,U,$+1),new uh(I,this.wrap,I,U+1,$+1)]},uh.prototype.isLessThan=function(y){return this.wrap<y.wrap?!0:this.wrap>y.wrap?!1:this.overscaledZ<y.overscaledZ?!0:this.overscaledZ>y.overscaledZ?!1:this.canonical.x<y.canonical.x?!0:this.canonical.x>y.canonical.x?!1:this.canonical.y<y.canonical.y},uh.prototype.wrapped=function(){return new uh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.unwrapTo=function(y){return new uh(this.overscaledZ,y,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},uh.prototype.toUnwrapped=function(){return new QQ(this.wrap,this.canonical)},uh.prototype.toString=function(){return this.overscaledZ+\"/\"+this.canonical.x+\"/\"+this.canonical.y},uh.prototype.getTilePoint=function(y){return this.canonical.getTilePoint(new ib(y.x-this.wrap,y.y))};function SS(m,y,I,U,$){m*=2,m<0&&(m=m*-1-1);var ae=1<<I;return(ae*ae*m+ae*$+U).toString(36)+I.toString(36)+y.toString(36)}function Fet(m,y,I){for(var U=\"\",$,ae=m;ae>0;ae--)$=1<<ae-1,U+=(y&$?1:0)+(I&$?2:0);return U}X(\"CanonicalTileID\",nb),X(\"OverscaledTileID\",uh,{omit:[\"posMatrix\"]});var dy=function(y,I,U){if(this.uid=y,I.height!==I.width)throw new RangeError(\"DEM tiles must be square\");if(U&&U!==\"mapbox\"&&U!==\"terrarium\")return re('\"'+U+'\" is not a valid encoding type. Valid types include \"mapbox\" and \"terrarium\".');this.stride=I.height;var $=this.dim=I.height-2;this.data=new Uint32Array(I.data.buffer),this.encoding=U||\"mapbox\";for(var ae=0;ae<$;ae++)this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae)],this.data[this._idx($,ae)]=this.data[this._idx($-1,ae)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae,0)],this.data[this._idx(ae,$)]=this.data[this._idx(ae,$-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx($,-1)]=this.data[this._idx($-1,0)],this.data[this._idx(-1,$)]=this.data[this._idx(0,$-1)],this.data[this._idx($,$)]=this.data[this._idx($-1,$-1)]};dy.prototype.get=function(y,I){var U=new Uint8Array(this.data.buffer),$=this._idx(y,I)*4,ae=this.encoding===\"terrarium\"?this._unpackTerrarium:this._unpackMapbox;return ae(U[$],U[$+1],U[$+2])},dy.prototype.getUnpackVector=function(){return this.encoding===\"terrarium\"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},dy.prototype._idx=function(y,I){if(y<-1||y>=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(I+1)*this.stride+(y+1)},dy.prototype._unpackMapbox=function(y,I,U){return(y*256*256+I*256+U)/10-1e4},dy.prototype._unpackTerrarium=function(y,I,U){return y*256+I+U/256-32768},dy.prototype.getPixels=function(){return new wh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dy.prototype.backfillBorder=function(y,I,U){if(this.dim!==y.dim)throw new Error(\"dem dimension mismatch\");var $=I*this.dim,ae=I*this.dim+this.dim,he=U*this.dim,Oe=U*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(U){case-1:he=Oe-1;break;case 1:Oe=he+1;break}for(var rt=-I*this.dim,gt=-U*this.dim,Mt=he;Mt<Oe;Mt++)for(var or=$;or<ae;or++)this.data[this._idx(or,Mt)]=y.data[this._idx(or+rt,Mt+gt)]},X(\"DEMData\",dy);function zet(m,y){var I={};if(!y)return I;for(var U=function(){var he=ae[$],Oe=he.layerIds.map(function(or){return y.getLayer(or)}).filter(Boolean);if(Oe.length!==0){he.layers=Oe,he.stateDependentLayerIds&&(he.stateDependentLayers=he.stateDependentLayerIds.map(function(or){return Oe.filter(function(_r){return _r.id===or})[0]}));for(var rt=0,gt=Oe;rt<gt.length;rt+=1){var Mt=gt[rt];I[Mt.id]=he}}},$=0,ae=m;$<ae.length;$+=1)U();return I}var t6=function(y){this._stringToNumber={},this._numberToString=[];for(var I=0;I<y.length;I++){var U=y[I];this._stringToNumber[U]=I,this._numberToString[I]=U}};t6.prototype.encode=function(y){return this._stringToNumber[y]},t6.prototype.decode=function(y){return this._numberToString[y]};var r6=function(y,I,U,$,ae){this.type=\"Feature\",this._vectorTileFeature=y,y._z=I,y._x=U,y._y=$,this.properties=y.properties,this.id=ae},vO={geometry:{configurable:!0}};vO.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},vO.geometry.set=function(m){this._geometry=m},r6.prototype.toJSON=function(){var y={geometry:this.geometry};for(var I in this)I===\"_geometry\"||I===\"_vectorTileFeature\"||(y[I]=this[I]);return y},Object.defineProperties(r6.prototype,vO);var Jw=function(){this.state={},this.stateChanges={},this.deletedStates={}};Jw.prototype.updateState=function(y,I,U){var $=String(I);if(this.stateChanges[y]=this.stateChanges[y]||{},this.stateChanges[y][$]=this.stateChanges[y][$]||{},_(this.stateChanges[y][$],U),this.deletedStates[y]===null){this.deletedStates[y]={};for(var ae in this.state[y])ae!==$&&(this.deletedStates[y][ae]=null)}else{var he=this.deletedStates[y]&&this.deletedStates[y][$]===null;if(he){this.deletedStates[y][$]={};for(var Oe in this.state[y][$])U[Oe]||(this.deletedStates[y][$][Oe]=null)}else for(var rt in U){var gt=this.deletedStates[y]&&this.deletedStates[y][$]&&this.deletedStates[y][$][rt]===null;gt&&delete this.deletedStates[y][$][rt]}}},Jw.prototype.removeFeatureState=function(y,I,U){var $=this.deletedStates[y]===null;if(!$){var ae=String(I);if(this.deletedStates[y]=this.deletedStates[y]||{},U&&I!==void 0)this.deletedStates[y][ae]!==null&&(this.deletedStates[y][ae]=this.deletedStates[y][ae]||{},this.deletedStates[y][ae][U]=null);else if(I!==void 0){var he=this.stateChanges[y]&&this.stateChanges[y][ae];if(he){this.deletedStates[y][ae]={};for(U in this.stateChanges[y][ae])this.deletedStates[y][ae][U]=null}else this.deletedStates[y][ae]=null}else this.deletedStates[y]=null}},Jw.prototype.getState=function(y,I){var U=String(I),$=this.state[y]||{},ae=this.stateChanges[y]||{},he=_({},$[U],ae[U]);if(this.deletedStates[y]===null)return{};if(this.deletedStates[y]){var Oe=this.deletedStates[y][I];if(Oe===null)return{};for(var rt in Oe)delete he[rt]}return he},Jw.prototype.initializeTileState=function(y,I){y.setFeatureState(this.state,I)},Jw.prototype.coalesceChanges=function(y,I){var U={};for(var $ in this.stateChanges){this.state[$]=this.state[$]||{};var ae={};for(var he in this.stateChanges[$])this.state[$][he]||(this.state[$][he]={}),_(this.state[$][he],this.stateChanges[$][he]),ae[he]=this.state[$][he];U[$]=ae}for(var Oe in this.deletedStates){this.state[Oe]=this.state[Oe]||{};var rt={};if(this.deletedStates[Oe]===null)for(var gt in this.state[Oe])rt[gt]={},this.state[Oe][gt]={};else for(var Mt in this.deletedStates[Oe]){var or=this.deletedStates[Oe][Mt]===null;if(or)this.state[Oe][Mt]={};else for(var _r=0,vr=Object.keys(this.deletedStates[Oe][Mt]);_r<vr.length;_r+=1){var Fr=vr[_r];delete this.state[Oe][Mt][Fr]}rt[Mt]=this.state[Oe][Mt]}U[Oe]=U[Oe]||{},_(U[Oe],rt)}if(this.stateChanges={},this.deletedStates={},Object.keys(U).length!==0)for(var ai in y){var Gi=y[ai];Gi.setFeatureState(U,I)}};var vy=function(y,I){this.tileID=y,this.x=y.canonical.x,this.y=y.canonical.y,this.z=y.canonical.z,this.grid=new au(Ci,16,0),this.grid3D=new au(Ci,16,0),this.featureIndexArray=new Ks,this.promoteId=I};vy.prototype.insert=function(y,I,U,$,ae,he){var Oe=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(U,$,ae);for(var rt=he?this.grid3D:this.grid,gt=0;gt<I.length;gt++){for(var Mt=I[gt],or=[1/0,1/0,-1/0,-1/0],_r=0;_r<Mt.length;_r++){var vr=Mt[_r];or[0]=Math.min(or[0],vr.x),or[1]=Math.min(or[1],vr.y),or[2]=Math.max(or[2],vr.x),or[3]=Math.max(or[3],vr.y)}or[0]<Ci&&or[1]<Ci&&or[2]>=0&&or[3]>=0&&rt.insert(Oe,or[0],or[1],or[2],or[3])}},vy.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new pg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new t6(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},vy.prototype.query=function(y,I,U,$){var ae=this;this.loadVTLayers();for(var he=y.params||{},Oe=Ci/y.tileSize/y.scale,rt=be(he.filter),gt=y.queryGeometry,Mt=y.queryPadding*Oe,or=tee(gt),_r=this.grid.query(or.minX-Mt,or.minY-Mt,or.maxX+Mt,or.maxY+Mt),vr=tee(y.cameraQueryGeometry),Fr=this.grid3D.query(vr.minX-Mt,vr.minY-Mt,vr.maxX+Mt,vr.maxY+Mt,function(Zn,ga,ha,eo){return vp(y.cameraQueryGeometry,Zn-Mt,ga-Mt,ha+Mt,eo+Mt)}),ai=0,Gi=Fr;ai<Gi.length;ai+=1){var Ti=Gi[ai];_r.push(Ti)}_r.sort(Oet);for(var bn={},rn,xn=function(Zn){var ga=_r[Zn];if(ga!==rn){rn=ga;var ha=ae.featureIndexArray.get(ga),eo=null;ae.loadMatchingFeature(bn,ha.bucketIndex,ha.sourceLayerIndex,ha.featureIndex,rt,he.layers,he.availableImages,I,U,$,function(za,Za,Ko){return eo||(eo=On(za)),Za.queryIntersectsFeature(gt,za,Ko,eo,ae.z,y.transform,Oe,y.pixelPosMatrix)})}},Dn=0;Dn<_r.length;Dn++)xn(Dn);return bn},vy.prototype.loadMatchingFeature=function(y,I,U,$,ae,he,Oe,rt,gt,Mt,or){var _r=this.bucketLayerIDs[I];if(!(he&&!N(he,_r))){var vr=this.sourceLayerCoder.decode(U),Fr=this.vtLayers[vr],ai=Fr.feature($);if(ae.needGeometry){var Gi=Ja(ai,!0);if(!ae.filter(new Gn(this.tileID.overscaledZ),Gi,this.tileID.canonical))return}else if(!ae.filter(new Gn(this.tileID.overscaledZ),ai))return;for(var Ti=this.getId(ai,vr),bn=0;bn<_r.length;bn++){var rn=_r[bn];if(!(he&&he.indexOf(rn)<0)){var xn=rt[rn];if(xn){var Dn={};Ti!==void 0&&Mt&&(Dn=Mt.getState(xn.sourceLayer||\"_geojsonTileLayer\",Ti));var Zn=_({},gt[rn]);Zn.paint=eee(Zn.paint,xn.paint,ai,Dn,Oe),Zn.layout=eee(Zn.layout,xn.layout,ai,Dn,Oe);var ga=!or||or(ai,xn,Dn);if(ga){var ha=new r6(ai,this.z,this.x,this.y,Ti);ha.layer=Zn;var eo=y[rn];eo===void 0&&(eo=y[rn]=[]),eo.push({featureIndex:$,feature:ha,intersectionZ:ga})}}}}}},vy.prototype.lookupSymbolFeatures=function(y,I,U,$,ae,he,Oe,rt){var gt={};this.loadVTLayers();for(var Mt=be(ae),or=0,_r=y;or<_r.length;or+=1){var vr=_r[or];this.loadMatchingFeature(gt,U,$,vr,Mt,he,Oe,rt,I)}return gt},vy.prototype.hasLayer=function(y){for(var I=0,U=this.bucketLayerIDs;I<U.length;I+=1)for(var $=U[I],ae=0,he=$;ae<he.length;ae+=1){var Oe=he[ae];if(y===Oe)return!0}return!1},vy.prototype.getId=function(y,I){var U=y.id;if(this.promoteId){var $=typeof this.promoteId==\"string\"?this.promoteId:this.promoteId[I];U=y.properties[$],typeof U==\"boolean\"&&(U=Number(U))}return U},X(\"FeatureIndex\",vy,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});function eee(m,y,I,U,$){return G(m,function(ae,he){var Oe=y instanceof Sc?y.get(he):null;return Oe&&Oe.evaluate?Oe.evaluate(I,U,$):Oe})}function tee(m){for(var y=1/0,I=1/0,U=-1/0,$=-1/0,ae=0,he=m;ae<he.length;ae+=1){var Oe=he[ae];y=Math.min(y,Oe.x),I=Math.min(I,Oe.y),U=Math.max(U,Oe.x),$=Math.max($,Oe.y)}return{minX:y,minY:I,maxX:U,maxY:$}}function Oet(m,y){return y-m}var qet=3e4,Wh=function(y,I){this.tileID=y,this.uid=g(),this.uses=0,this.tileSize=I,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state=\"loading\"};Wh.prototype.registerFadeDuration=function(y){var I=y+this.timeAdded;I<ct.now()||this.fadeEndTime&&I<this.fadeEndTime||(this.fadeEndTime=I)},Wh.prototype.wasRequested=function(){return this.state===\"errored\"||this.state===\"loaded\"||this.state===\"reloading\"},Wh.prototype.loadVectorData=function(y,I,U){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",!y){this.collisionBoxArray=new Va;return}y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestFeatureIndex.rawTileData=y.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=zet(y.buckets,I.style),this.hasSymbolBuckets=!1;for(var $ in this.buckets){var ae=this.buckets[$];if(ae instanceof Pu)if(this.hasSymbolBuckets=!0,U)ae.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var he in this.buckets){var Oe=this.buckets[he];if(Oe instanceof Pu&&Oe.hasRTLText){this.hasRTLText=!0,Zs();break}}this.queryPadding=0;for(var rt in this.buckets){var gt=this.buckets[rt];this.queryPadding=Math.max(this.queryPadding,I.style.getLayer(rt).queryRadius(gt))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage)},Wh.prototype.unloadVectorData=function(){for(var y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\"},Wh.prototype.getBucket=function(y){return this.buckets[y.id]},Wh.prototype.upload=function(y){for(var I in this.buckets){var U=this.buckets[I];U.uploadPending()&&U.upload(y)}var $=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new rb(y,this.imageAtlas.image,$.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new rb(y,this.glyphAtlasImage,$.ALPHA),this.glyphAtlasImage=null)},Wh.prototype.prepare=function(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)},Wh.prototype.queryRenderedFeatures=function(y,I,U,$,ae,he,Oe,rt,gt,Mt){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:$,cameraQueryGeometry:ae,scale:he,tileSize:this.tileSize,pixelPosMatrix:Mt,transform:rt,params:Oe,queryPadding:this.queryPadding*gt},y,I,U)},Wh.prototype.querySourceFeatures=function(y,I){var U=this.latestFeatureIndex;if(!(!U||!U.rawTileData)){var $=U.loadVTLayers(),ae=I?I.sourceLayer:\"\",he=$._geojsonTileLayer||$[ae];if(he)for(var Oe=be(I&&I.filter),rt=this.tileID.canonical,gt=rt.z,Mt=rt.x,or=rt.y,_r={z:gt,x:Mt,y:or},vr=0;vr<he.length;vr++){var Fr=he.feature(vr);if(Oe.needGeometry){var ai=Ja(Fr,!0);if(!Oe.filter(new Gn(this.tileID.overscaledZ),ai,this.tileID.canonical))continue}else if(!Oe.filter(new Gn(this.tileID.overscaledZ),Fr))continue;var Gi=U.getId(Fr,ae),Ti=new r6(Fr,gt,Mt,or,Gi);Ti.tile=_r,y.push(Ti)}}},Wh.prototype.hasData=function(){return this.state===\"loaded\"||this.state===\"reloading\"||this.state===\"expired\"},Wh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Wh.prototype.setExpiryData=function(y){var I=this.expirationTime;if(y.cacheControl){var U=me(y.cacheControl);U[\"max-age\"]&&(this.expirationTime=Date.now()+U[\"max-age\"]*1e3)}else y.expires&&(this.expirationTime=new Date(y.expires).getTime());if(this.expirationTime){var $=Date.now(),ae=!1;if(this.expirationTime>$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime<I)ae=!0;else{var he=this.expirationTime-I;he?this.expirationTime=$+Math.max(he,qet):ae=!0}ae?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0}},Wh.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},Wh.prototype.setFeatureState=function(y,I){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(y).length===0)){var U=this.latestFeatureIndex.loadVTLayers();for(var $ in this.buckets)if(I.style.hasLayer($)){var ae=this.buckets[$],he=ae.layers[0].sourceLayer||\"_geojsonTileLayer\",Oe=U[he],rt=y[he];if(!(!Oe||!rt||Object.keys(rt).length===0)){ae.update(rt,Oe,this.imageAtlas&&this.imageAtlas.patternPositions||{});var gt=I&&I.style&&I.style.getLayer($);gt&&(this.queryPadding=Math.max(this.queryPadding,gt.queryRadius(ae)))}}}},Wh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Wh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<ct.now()},Wh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Wh.prototype.setHoldDuration=function(y){this.symbolFadeHoldUntil=ct.now()+y},Wh.prototype.setDependencies=function(y,I){for(var U={},$=0,ae=I;$<ae.length;$+=1){var he=ae[$];U[he]=!0}this.dependencies[y]=U},Wh.prototype.hasDependency=function(y,I){for(var U=0,$=y;U<$.length;U+=1){var ae=$[U],he=this.dependencies[ae];if(he)for(var Oe=0,rt=I;Oe<rt.length;Oe+=1){var gt=rt[Oe];if(he[gt])return!0}}return!1};var Bet=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"],F1=f.performance,ree=function(y){this._marks={start:[y.url,\"start\"].join(\"#\"),end:[y.url,\"end\"].join(\"#\"),measure:y.url.toString()},F1.mark(this._marks.start)};ree.prototype.finish=function(){F1.mark(this._marks.end);var y=F1.getEntriesByName(this._marks.measure);return y.length===0&&(F1.measure(this._marks.measure,this._marks.start,this._marks.end),y=F1.getEntriesByName(this._marks.measure),F1.clearMarks(this._marks.start),F1.clearMarks(this._marks.end),F1.clearMeasures(this._marks.measure)),y},i.Actor=Kw,i.AlphaImage=Rv,i.CanonicalTileID=nb,i.CollisionBoxArray=Va,i.Color=fs,i.DEMData=dy,i.DataConstantProperty=Ee,i.DictionaryCoder=t6,i.EXTENT=Ci,i.ErrorEvent=da,i.EvaluationParameters=Gn,i.Event=Wo,i.Evented=Wn,i.FeatureIndex=vy,i.FillBucket=pp,i.FillExtrusionBucket=Vp,i.ImageAtlas=gg,i.ImagePosition=Zf,i.LineBucket=sh,i.LngLat=Hc,i.LngLatBounds=lh,i.MercatorCoordinate=ib,i.ONE_EM=An,i.OverscaledTileID=uh,i.Point=u,i.Point$1=u,i.Properties=Br,i.Protobuf=Xa,i.RGBAImage=wh,i.RequestManager=Qe,i.RequestPerformance=ree,i.ResourceType=ea,i.SegmentVector=io,i.SourceFeatureState=Jw,i.StructArrayLayout1ui2=wa,i.StructArrayLayout2f1f2i16=Ui,i.StructArrayLayout2i4=Yr,i.StructArrayLayout3ui6=vn,i.StructArrayLayout4i8=xi,i.SymbolBucket=Pu,i.Texture=rb,i.Tile=Wh,i.Transitionable=Uo,i.Uniform1f=et,i.Uniform1i=Ve,i.Uniform2f=at,i.Uniform3f=kt,i.Uniform4f=Ot,i.UniformColor=It,i.UniformMatrix4f=Rt,i.UnwrappedTileID=QQ,i.ValidationError=_a,i.WritingMode=uv,i.ZoomHistory=Ct,i.add=Iv,i.addDynamicAttributes=cO,i.asyncAll=E,i.bezier=x,i.bindAll=O,i.browser=ct,i.cacheEntryPossiblyAdded=Hi,i.clamp=p,i.clearTileCache=wn,i.clipLine=zQ,i.clone=T1,i.clone$1=H,i.clone$2=Mw,i.collisionCircleLayout=Lt,i.config=pt,i.create=w1,i.create$1=Gh,i.create$2=hg,i.createCommonjsModule=a,i.createExpression=oo,i.createLayout=ji,i.createStyleLayer=Let,i.cross=z9,i.deepEqual=h,i.dot=F9,i.dot$1=U9,i.ease=b,i.emitValidationErrors=Lu,i.endsWith=V,i.enforceCacheSizeLimit=Pn,i.evaluateSizeForFeature=kQ,i.evaluateSizeForZoom=LQ,i.evaluateVariableOffset=BQ,i.evented=Ia,i.extend=_,i.featureFilter=be,i.filterObject=Z,i.fromRotation=rm,i.getAnchorAlignment=wS,i.getAnchorJustification=uO,i.getArrayBuffer=ri,i.getImage=la,i.getJSON=Zr,i.getRTLTextPluginStatus=yo,i.getReferrer=Vt,i.getVideo=ma,i.identity=oy,i.invert=im,i.isChar=nt,i.isMapboxURL=Et,i.keysDifference=L,i.makeRequest=Er,i.mapObject=G,i.mercatorXfromLng=KQ,i.mercatorYfromLat=JQ,i.mercatorZfromAltitude=$Q,i.mul=Bx,i.multiply=nm,i.mvt=pg,i.nextPowerOfTwo=T,i.normalize=Nx,i.number=al,i.offscreenCanvasSupported=kn,i.ortho=wu,i.parseGlyphPBF=p0,i.pbf=Xa,i.performSymbolLayout=uet,i.perspective=A1,i.pick=k,i.plugin=Es,i.polygonIntersectsPolygon=so,i.postMapLoadEvent=je,i.postTurnstileEvent=Ge,i.potpack=Qv,i.refProperties=Bet,i.register=X,i.registerForPluginStateChange=Da,i.renderColorRamp=Gx,i.rotate=ay,i.rotateX=Sd,i.rotateZ=sy,i.scale=eu,i.scale$1=N9,i.scale$2=Ew,i.setCacheLimits=pn,i.setRTLTextPlugin=go,i.sphericalToCartesian=Me,i.sqrLen=rS,i.styleSpec=Fn,i.sub=q9,i.symbolSize=QQe,i.transformMat3=O9,i.transformMat4=ly,i.translate=vc,i.triggerPluginCompletionEvent=ia,i.uniqueId=g,i.validateCustomStyleLayer=Eet,i.validateLight=To,i.validateStyle=wo,i.values=A,i.vectorTile=pg,i.version=o,i.warnOnce=re,i.webpSupported=Wt,i.window=f,i.wrap=C}),n([\"./shared\"],function(i){\"use strict\";function a(Vt){var _t=typeof Vt;if(_t===\"number\"||_t===\"boolean\"||_t===\"string\"||Vt===void 0||Vt===null)return JSON.stringify(Vt);if(Array.isArray(Vt)){for(var tr=\"[\",ar=0,Er=Vt;ar<Er.length;ar+=1){var Zr=Er[ar];tr+=a(Zr)+\",\"}return tr+\"]\"}for(var ri=Object.keys(Vt).sort(),$r=\"{\",zi=0;zi<ri.length;zi++)$r+=JSON.stringify(ri[zi])+\":\"+a(Vt[ri[zi]])+\",\";return $r+\"}\"}function o(Vt){for(var _t=\"\",tr=0,ar=i.refProperties;tr<ar.length;tr+=1){var Er=ar[tr];_t+=\"/\"+a(Vt[Er])}return _t}function s(Vt,_t){for(var tr={},ar=0;ar<Vt.length;ar++){var Er=_t&&_t[Vt[ar].id]||o(Vt[ar]);_t&&(_t[Vt[ar].id]=Er);var Zr=tr[Er];Zr||(Zr=tr[Er]=[]),Zr.push(Vt[ar])}var ri=[];for(var $r in tr)ri.push(tr[$r]);return ri}var l=function(_t){this.keyCache={},_t&&this.replace(_t)};l.prototype.replace=function(_t){this._layerConfigs={},this._layers={},this.update(_t,[])},l.prototype.update=function(_t,tr){for(var ar=this,Er=0,Zr=_t;Er<Zr.length;Er+=1){var ri=Zr[Er];this._layerConfigs[ri.id]=ri;var $r=this._layers[ri.id]=i.createStyleLayer(ri);$r._featureFilter=i.featureFilter($r.filter),this.keyCache[ri.id]&&delete this.keyCache[ri.id]}for(var zi=0,Ji=tr;zi<Ji.length;zi+=1){var en=Ji[zi];delete this.keyCache[en],delete this._layerConfigs[en],delete this._layers[en]}this.familiesBySource={};for(var cn=s(i.values(this._layerConfigs),this.keyCache),yn=0,Mn=cn;yn<Mn.length;yn+=1){var Ba=Mn[yn],la=Ba.map(function(Wn){return ar._layers[Wn.id]}),ma=la[0];if(ma.visibility!==\"none\"){var Wa=ma.source||\"\",Fa=this.familiesBySource[Wa];Fa||(Fa=this.familiesBySource[Wa]={});var Wo=ma.sourceLayer||\"_geojsonTileLayer\",da=Fa[Wo];da||(da=Fa[Wo]=[]),da.push(la)}}};var u=1,c=function(_t){var tr={},ar=[];for(var Er in _t){var Zr=_t[Er],ri=tr[Er]={};for(var $r in Zr){var zi=Zr[+$r];if(!(!zi||zi.bitmap.width===0||zi.bitmap.height===0)){var Ji={x:0,y:0,w:zi.bitmap.width+2*u,h:zi.bitmap.height+2*u};ar.push(Ji),ri[$r]={rect:Ji,metrics:zi.metrics}}}}var en=i.potpack(ar),cn=en.w,yn=en.h,Mn=new i.AlphaImage({width:cn||1,height:yn||1});for(var Ba in _t){var la=_t[Ba];for(var ma in la){var Wa=la[+ma];if(!(!Wa||Wa.bitmap.width===0||Wa.bitmap.height===0)){var Fa=tr[Ba][ma].rect;i.AlphaImage.copy(Wa.bitmap,Mn,{x:0,y:0},{x:Fa.x+u,y:Fa.y+u},Wa.bitmap)}}}this.image=Mn,this.positions=tr};i.register(\"GlyphAtlas\",c);var f=function(_t){this.tileID=new i.OverscaledTileID(_t.tileID.overscaledZ,_t.tileID.wrap,_t.tileID.canonical.z,_t.tileID.canonical.x,_t.tileID.canonical.y),this.uid=_t.uid,this.zoom=_t.zoom,this.pixelRatio=_t.pixelRatio,this.tileSize=_t.tileSize,this.source=_t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=_t.showCollisionBoxes,this.collectResourceTiming=!!_t.collectResourceTiming,this.returnDependencies=!!_t.returnDependencies,this.promoteId=_t.promoteId};f.prototype.parse=function(_t,tr,ar,Er,Zr){var ri=this;this.status=\"parsing\",this.data=_t,this.collisionBoxArray=new i.CollisionBoxArray;var $r=new i.DictionaryCoder(Object.keys(_t.layers).sort()),zi=new i.FeatureIndex(this.tileID,this.promoteId);zi.bucketLayerIDs=[];var Ji={},en={featureIndex:zi,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ar},cn=tr.familiesBySource[this.source];for(var yn in cn){var Mn=_t.layers[yn];if(Mn){Mn.version===1&&i.warnOnce('Vector tile source \"'+this.source+'\" layer \"'+yn+'\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Ba=$r.encode(yn),la=[],ma=0;ma<Mn.length;ma++){var Wa=Mn.feature(ma),Fa=zi.getId(Wa,yn);la.push({feature:Wa,id:Fa,index:ma,sourceLayerIndex:Ba})}for(var Wo=0,da=cn[yn];Wo<da.length;Wo+=1){var Wn=da[Wo],Ga=Wn[0];if(!(Ga.minzoom&&this.zoom<Math.floor(Ga.minzoom))&&!(Ga.maxzoom&&this.zoom>=Ga.maxzoom)&&Ga.visibility!==\"none\"){h(Wn,this.zoom,ar);var vo=Ji[Ga.id]=Ga.createBucket({index:zi.bucketLayerIDs.length,layers:Wn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(la,en,this.tileID.canonical),zi.bucketLayerIDs.push(Wn.map(function(ki){return ki.id}))}}}}var jn,St,Cr,Qr,pi=i.mapObject(en.glyphDependencies,function(ki){return Object.keys(ki).map(Number)});Object.keys(pi).length?Er.send(\"getGlyphs\",{uid:this.uid,stacks:pi},function(ki,_n){jn||(jn=ki,St=_n,En.call(ri))}):St={};var fn=Object.keys(en.iconDependencies);fn.length?Er.send(\"getImages\",{icons:fn,source:this.source,tileID:this.tileID,type:\"icons\"},function(ki,_n){jn||(jn=ki,Cr=_n,En.call(ri))}):Cr={};var Sn=Object.keys(en.patternDependencies);Sn.length?Er.send(\"getImages\",{icons:Sn,source:this.source,tileID:this.tileID,type:\"patterns\"},function(ki,_n){jn||(jn=ki,Qr=_n,En.call(ri))}):Qr={},En.call(this);function En(){if(jn)return Zr(jn);if(St&&Cr&&Qr){var ki=new c(St),_n=new i.ImageAtlas(Cr,Qr);for(var ya in Ji){var Jn=Ji[ya];Jn instanceof i.SymbolBucket?(h(Jn.layers,this.zoom,ar),i.performSymbolLayout(Jn,St,ki.positions,Cr,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Jn.hasPattern&&(Jn instanceof i.LineBucket||Jn instanceof i.FillBucket||Jn instanceof i.FillExtrusionBucket)&&(h(Jn.layers,this.zoom,ar),Jn.addFeatures(en,this.tileID.canonical,_n.patternPositions))}this.status=\"done\",Zr(null,{buckets:i.values(Ji).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:zi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ki.image,imageAtlas:_n,glyphMap:this.returnDependencies?St:null,iconMap:this.returnDependencies?Cr:null,glyphPositions:this.returnDependencies?ki.positions:null})}}};function h(Vt,_t,tr){for(var ar=new i.EvaluationParameters(_t),Er=0,Zr=Vt;Er<Zr.length;Er+=1){var ri=Zr[Er];ri.recalculate(ar,tr)}}function d(Vt,_t){var tr=i.getArrayBuffer(Vt.request,function(ar,Er,Zr,ri){ar?_t(ar):Er&&_t(null,{vectorTile:new i.vectorTile.VectorTile(new i.pbf(Er)),rawData:Er,cacheControl:Zr,expires:ri})});return function(){tr.cancel(),_t()}}var v=function(_t,tr,ar,Er){this.actor=_t,this.layerIndex=tr,this.availableImages=ar,this.loadVectorData=Er||d,this.loading={},this.loaded={}};v.prototype.loadTile=function(_t,tr){var ar=this,Er=_t.uid;this.loading||(this.loading={});var Zr=_t&&_t.request&&_t.request.collectResourceTiming?new i.RequestPerformance(_t.request):!1,ri=this.loading[Er]=new f(_t);ri.abort=this.loadVectorData(_t,function($r,zi){if(delete ar.loading[Er],$r||!zi)return ri.status=\"done\",ar.loaded[Er]=ri,tr($r);var Ji=zi.rawData,en={};zi.expires&&(en.expires=zi.expires),zi.cacheControl&&(en.cacheControl=zi.cacheControl);var cn={};if(Zr){var yn=Zr.finish();yn&&(cn.resourceTiming=JSON.parse(JSON.stringify(yn)))}ri.vectorTile=zi.vectorTile,ri.parse(zi.vectorTile,ar.layerIndex,ar.availableImages,ar.actor,function(Mn,Ba){if(Mn||!Ba)return tr(Mn);tr(null,i.extend({rawTileData:Ji.slice(0)},Ba,en,cn))}),ar.loaded=ar.loaded||{},ar.loaded[Er]=ri})},v.prototype.reloadTile=function(_t,tr){var ar=this,Er=this.loaded,Zr=_t.uid,ri=this;if(Er&&Er[Zr]){var $r=Er[Zr];$r.showCollisionBoxes=_t.showCollisionBoxes;var zi=function(Ji,en){var cn=$r.reloadCallback;cn&&(delete $r.reloadCallback,$r.parse($r.vectorTile,ri.layerIndex,ar.availableImages,ri.actor,cn)),tr(Ji,en)};$r.status===\"parsing\"?$r.reloadCallback=zi:$r.status===\"done\"&&($r.vectorTile?$r.parse($r.vectorTile,this.layerIndex,this.availableImages,this.actor,zi):zi())}},v.prototype.abortTile=function(_t,tr){var ar=this.loading,Er=_t.uid;ar&&ar[Er]&&ar[Er].abort&&(ar[Er].abort(),delete ar[Er]),tr()},v.prototype.removeTile=function(_t,tr){var ar=this.loaded,Er=_t.uid;ar&&ar[Er]&&delete ar[Er],tr()};var x=i.window.ImageBitmap,b=function(){this.loaded={}};b.prototype.loadTile=function(_t,tr){var ar=_t.uid,Er=_t.encoding,Zr=_t.rawImageData,ri=x&&Zr instanceof x?this.getImageData(Zr):Zr,$r=new i.DEMData(ar,ri,Er);this.loaded=this.loaded||{},this.loaded[ar]=$r,tr(null,$r)},b.prototype.getImageData=function(_t){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(_t.width,_t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=_t.width,this.offscreenCanvas.height=_t.height,this.offscreenCanvasContext.drawImage(_t,0,0,_t.width,_t.height);var tr=this.offscreenCanvasContext.getImageData(-1,-1,_t.width+2,_t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:tr.width,height:tr.height},tr.data)},b.prototype.removeTile=function(_t){var tr=this.loaded,ar=_t.uid;tr&&tr[ar]&&delete tr[ar]};var p=C;function C(Vt,_t){var tr=Vt&&Vt.type,ar;if(tr===\"FeatureCollection\")for(ar=0;ar<Vt.features.length;ar++)C(Vt.features[ar],_t);else if(tr===\"GeometryCollection\")for(ar=0;ar<Vt.geometries.length;ar++)C(Vt.geometries[ar],_t);else if(tr===\"Feature\")C(Vt.geometry,_t);else if(tr===\"Polygon\")E(Vt.coordinates,_t);else if(tr===\"MultiPolygon\")for(ar=0;ar<Vt.coordinates.length;ar++)E(Vt.coordinates[ar],_t);return Vt}function E(Vt,_t){if(Vt.length!==0){A(Vt[0],_t);for(var tr=1;tr<Vt.length;tr++)A(Vt[tr],!_t)}}function A(Vt,_t){for(var tr=0,ar=0,Er=Vt.length,Zr=Er-1;ar<Er;Zr=ar++)tr+=(Vt[ar][0]-Vt[Zr][0])*(Vt[Zr][1]+Vt[ar][1]);tr>=0!=!!_t&&Vt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(_t){this._feature=_t,this.extent=i.EXTENT,this.type=_t.type,this.properties=_t.tags,\"id\"in _t&&!isNaN(_t.id)&&(this.id=parseInt(_t.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var _t=[],tr=0,ar=this._feature.geometry;tr<ar.length;tr+=1){var Er=ar[tr];_t.push([new i.Point$1(Er[0],Er[1])])}return _t}else{for(var Zr=[],ri=0,$r=this._feature.geometry;ri<$r.length;ri+=1){for(var zi=$r[ri],Ji=[],en=0,cn=zi;en<cn.length;en+=1){var yn=cn[en];Ji.push(new i.Point$1(yn[0],yn[1]))}Zr.push(Ji)}return Zr}},_.prototype.toGeoJSON=function(_t,tr,ar){return L.call(this,_t,tr,ar)};var k=function(_t){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=i.EXTENT,this.length=_t.length,this._features=_t};k.prototype.feature=function(_t){return new _(this._features[_t])};var M=i.vectorTile.VectorTileFeature,g=P;function P(Vt,_t){this.options=_t||{},this.features=Vt,this.length=Vt.length}P.prototype.feature=function(Vt){return new T(this.features[Vt],this.options.extent)};function T(Vt,_t){this.id=typeof Vt.id==\"number\"?Vt.id:void 0,this.type=Vt.type,this.rawGeometry=Vt.type===1?[Vt.geometry]:Vt.geometry,this.properties=Vt.tags,this.extent=_t||4096}T.prototype.loadGeometry=function(){var Vt=this.rawGeometry;this.geometry=[];for(var _t=0;_t<Vt.length;_t++){for(var tr=Vt[_t],ar=[],Er=0;Er<tr.length;Er++)ar.push(new i.Point$1(tr[Er][0],tr[Er][1]));this.geometry.push(ar)}return this.geometry},T.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Vt=this.geometry,_t=1/0,tr=-1/0,ar=1/0,Er=-1/0,Zr=0;Zr<Vt.length;Zr++)for(var ri=Vt[Zr],$r=0;$r<ri.length;$r++){var zi=ri[$r];_t=Math.min(_t,zi.x),tr=Math.max(tr,zi.x),ar=Math.min(ar,zi.y),Er=Math.max(Er,zi.y)}return[_t,ar,tr,Er]},T.prototype.toGeoJSON=M.prototype.toGeoJSON;var z=Z,O=Z,V=H,G=g;function Z(Vt){var _t=new i.pbf;return N(Vt,_t),_t.finish()}function H(Vt,_t){_t=_t||{};var tr={};for(var ar in Vt)tr[ar]=new g(Vt[ar].features,_t),tr[ar].name=ar,tr[ar].version=_t.version,tr[ar].extent=_t.extent;return Z({layers:tr})}function N(Vt,_t){for(var tr in Vt.layers)_t.writeMessage(3,j,Vt.layers[tr])}function j(Vt,_t){_t.writeVarintField(15,Vt.version||1),_t.writeStringField(1,Vt.name||\"\"),_t.writeVarintField(5,Vt.extent||4096);var tr,ar={keys:[],values:[],keycache:{},valuecache:{}};for(tr=0;tr<Vt.length;tr++)ar.feature=Vt.feature(tr),_t.writeMessage(2,re,ar);var Er=ar.keys;for(tr=0;tr<Er.length;tr++)_t.writeStringField(3,Er[tr]);var Zr=ar.values;for(tr=0;tr<Zr.length;tr++)_t.writeMessage(4,me,Zr[tr])}function re(Vt,_t){var tr=Vt.feature;tr.id!==void 0&&_t.writeVarintField(1,tr.id),_t.writeMessage(2,oe,Vt),_t.writeVarintField(3,tr.type),_t.writeMessage(4,ke,tr)}function oe(Vt,_t){var tr=Vt.feature,ar=Vt.keys,Er=Vt.values,Zr=Vt.keycache,ri=Vt.valuecache;for(var $r in tr.properties){var zi=Zr[$r];typeof zi==\"undefined\"&&(ar.push($r),zi=ar.length-1,Zr[$r]=zi),_t.writeVarint(zi);var Ji=tr.properties[$r],en=typeof Ji;en!==\"string\"&&en!==\"boolean\"&&en!==\"number\"&&(Ji=JSON.stringify(Ji));var cn=en+\":\"+Ji,yn=ri[cn];typeof yn==\"undefined\"&&(Er.push(Ji),yn=Er.length-1,ri[cn]=yn),_t.writeVarint(yn)}}function _e(Vt,_t){return(_t<<3)+(Vt&7)}function Me(Vt){return Vt<<1^Vt>>31}function ke(Vt,_t){for(var tr=Vt.loadGeometry(),ar=Vt.type,Er=0,Zr=0,ri=tr.length,$r=0;$r<ri;$r++){var zi=tr[$r],Ji=1;ar===1&&(Ji=zi.length),_t.writeVarint(_e(1,Ji));for(var en=ar===3?zi.length-1:zi.length,cn=0;cn<en;cn++){cn===1&&ar!==1&&_t.writeVarint(_e(2,en-1));var yn=zi[cn].x-Er,Mn=zi[cn].y-Zr;_t.writeVarint(Me(yn)),_t.writeVarint(Me(Mn)),Er+=yn,Zr+=Mn}ar===3&&_t.writeVarint(_e(7,1))}}function me(Vt,_t){var tr=typeof Vt;tr===\"string\"?_t.writeStringField(1,Vt):tr===\"boolean\"?_t.writeBooleanField(7,Vt):tr===\"number\"&&(Vt%1!==0?_t.writeDoubleField(3,Vt):Vt<0?_t.writeSVarintField(6,Vt):_t.writeVarintField(5,Vt))}z.fromVectorTileJs=O,z.fromGeojsonVt=V,z.GeoJSONWrapper=G;function ie(Vt,_t,tr,ar,Er,Zr){if(!(Er-ar<=tr)){var ri=ar+Er>>1;Se(Vt,_t,ri,ar,Er,Zr%2),ie(Vt,_t,tr,ar,ri-1,Zr+1),ie(Vt,_t,tr,ri+1,Er,Zr+1)}}function Se(Vt,_t,tr,ar,Er,Zr){for(;Er>ar;){if(Er-ar>600){var ri=Er-ar+1,$r=tr-ar+1,zi=Math.log(ri),Ji=.5*Math.exp(2*zi/3),en=.5*Math.sqrt(zi*Ji*(ri-Ji)/ri)*($r-ri/2<0?-1:1),cn=Math.max(ar,Math.floor(tr-$r*Ji/ri+en)),yn=Math.min(Er,Math.floor(tr+(ri-$r)*Ji/ri+en));Se(Vt,_t,tr,cn,yn,Zr)}var Mn=_t[2*tr+Zr],Ba=ar,la=Er;for(Le(Vt,_t,ar,tr),_t[2*Er+Zr]>Mn&&Le(Vt,_t,ar,Er);Ba<la;){for(Le(Vt,_t,Ba,la),Ba++,la--;_t[2*Ba+Zr]<Mn;)Ba++;for(;_t[2*la+Zr]>Mn;)la--}_t[2*ar+Zr]===Mn?Le(Vt,_t,ar,la):(la++,Le(Vt,_t,la,Er)),la<=tr&&(ar=la+1),tr<=la&&(Er=la-1)}}function Le(Vt,_t,tr,ar){Ae(Vt,tr,ar),Ae(_t,2*tr,2*ar),Ae(_t,2*tr+1,2*ar+1)}function Ae(Vt,_t,tr){var ar=Vt[_t];Vt[_t]=Vt[tr],Vt[tr]=ar}function De(Vt,_t,tr,ar,Er,Zr,ri){for(var $r=[0,Vt.length-1,0],zi=[],Ji,en;$r.length;){var cn=$r.pop(),yn=$r.pop(),Mn=$r.pop();if(yn-Mn<=ri){for(var Ba=Mn;Ba<=yn;Ba++)Ji=_t[2*Ba],en=_t[2*Ba+1],Ji>=tr&&Ji<=Er&&en>=ar&&en<=Zr&&zi.push(Vt[Ba]);continue}var la=Math.floor((Mn+yn)/2);Ji=_t[2*la],en=_t[2*la+1],Ji>=tr&&Ji<=Er&&en>=ar&&en<=Zr&&zi.push(Vt[la]);var ma=(cn+1)%2;(cn===0?tr<=Ji:ar<=en)&&($r.push(Mn),$r.push(la-1),$r.push(ma)),(cn===0?Er>=Ji:Zr>=en)&&($r.push(la+1),$r.push(yn),$r.push(ma))}return zi}function Pe(Vt,_t,tr,ar,Er,Zr){for(var ri=[0,Vt.length-1,0],$r=[],zi=Er*Er;ri.length;){var Ji=ri.pop(),en=ri.pop(),cn=ri.pop();if(en-cn<=Zr){for(var yn=cn;yn<=en;yn++)ge(_t[2*yn],_t[2*yn+1],tr,ar)<=zi&&$r.push(Vt[yn]);continue}var Mn=Math.floor((cn+en)/2),Ba=_t[2*Mn],la=_t[2*Mn+1];ge(Ba,la,tr,ar)<=zi&&$r.push(Vt[Mn]);var ma=(Ji+1)%2;(Ji===0?tr-Er<=Ba:ar-Er<=la)&&(ri.push(cn),ri.push(Mn-1),ri.push(ma)),(Ji===0?tr+Er>=Ba:ar+Er>=la)&&(ri.push(Mn+1),ri.push(en),ri.push(ma))}return $r}function ge(Vt,_t,tr,ar){var Er=Vt-tr,Zr=_t-ar;return Er*Er+Zr*Zr}var Fe=function(Vt){return Vt[0]},ce=function(Vt){return Vt[1]},Ze=function(_t,tr,ar,Er,Zr){tr===void 0&&(tr=Fe),ar===void 0&&(ar=ce),Er===void 0&&(Er=64),Zr===void 0&&(Zr=Float64Array),this.nodeSize=Er,this.points=_t;for(var ri=_t.length<65536?Uint16Array:Uint32Array,$r=this.ids=new ri(_t.length),zi=this.coords=new Zr(_t.length*2),Ji=0;Ji<_t.length;Ji++)$r[Ji]=Ji,zi[2*Ji]=tr(_t[Ji]),zi[2*Ji+1]=ar(_t[Ji]);ie($r,zi,Er,0,$r.length-1,0)};Ze.prototype.range=function(_t,tr,ar,Er){return De(this.ids,this.coords,_t,tr,ar,Er,this.nodeSize)},Ze.prototype.within=function(_t,tr,ar){return Pe(this.ids,this.coords,_t,tr,ar,this.nodeSize)};var ct={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Vt){return Vt}},pt=function(_t){this.options=ur(Object.create(ct),_t),this.trees=new Array(this.options.maxZoom+1)};pt.prototype.load=function(_t){var tr=this.options,ar=tr.log,Er=tr.minZoom,Zr=tr.maxZoom,ri=tr.nodeSize;ar&&console.time(\"total time\");var $r=\"prepare \"+_t.length+\" points\";ar&&console.time($r),this.points=_t;for(var zi=[],Ji=0;Ji<_t.length;Ji++)_t[Ji].geometry&&zi.push(st(_t[Ji],Ji));this.trees[Zr+1]=new Ze(zi,Qe,Et,ri,Float32Array),ar&&console.timeEnd($r);for(var en=Zr;en>=Er;en--){var cn=+Date.now();zi=this._cluster(zi,en),this.trees[en]=new Ze(zi,Qe,Et,ri,Float32Array),ar&&console.log(\"z%d: %d clusters in %dms\",en,zi.length,+Date.now()-cn)}return ar&&console.timeEnd(\"total time\"),this},pt.prototype.getClusters=function(_t,tr){var ar=((_t[0]+180)%360+360)%360-180,Er=Math.max(-90,Math.min(90,_t[1])),Zr=_t[2]===180?180:((_t[2]+180)%360+360)%360-180,ri=Math.max(-90,Math.min(90,_t[3]));if(_t[2]-_t[0]>=360)ar=-180,Zr=180;else if(ar>Zr){var $r=this.getClusters([ar,Er,180,ri],tr),zi=this.getClusters([-180,Er,Zr,ri],tr);return $r.concat(zi)}for(var Ji=this.trees[this._limitZoom(tr)],en=Ji.range(Nt(ar),$t(ri),Nt(Zr),$t(Er)),cn=[],yn=0,Mn=en;yn<Mn.length;yn+=1){var Ba=Mn[yn],la=Ji.points[Ba];cn.push(la.numPoints?lt(la):this.points[la.index])}return cn},pt.prototype.getChildren=function(_t){var tr=this._getOriginId(_t),ar=this._getOriginZoom(_t),Er=\"No cluster with the specified id.\",Zr=this.trees[ar];if(!Zr)throw new Error(Er);var ri=Zr.points[tr];if(!ri)throw new Error(Er);for(var $r=this.options.radius/(this.options.extent*Math.pow(2,ar-1)),zi=Zr.within(ri.x,ri.y,$r),Ji=[],en=0,cn=zi;en<cn.length;en+=1){var yn=cn[en],Mn=Zr.points[yn];Mn.parentId===_t&&Ji.push(Mn.numPoints?lt(Mn):this.points[Mn.index])}if(Ji.length===0)throw new Error(Er);return Ji},pt.prototype.getLeaves=function(_t,tr,ar){tr=tr||10,ar=ar||0;var Er=[];return this._appendLeaves(Er,_t,tr,ar,0),Er},pt.prototype.getTile=function(_t,tr,ar){var Er=this.trees[this._limitZoom(_t)],Zr=Math.pow(2,_t),ri=this.options,$r=ri.extent,zi=ri.radius,Ji=zi/$r,en=(ar-Ji)/Zr,cn=(ar+1+Ji)/Zr,yn={features:[]};return this._addTileFeatures(Er.range((tr-Ji)/Zr,en,(tr+1+Ji)/Zr,cn),Er.points,tr,ar,Zr,yn),tr===0&&this._addTileFeatures(Er.range(1-Ji/Zr,en,1,cn),Er.points,Zr,ar,Zr,yn),tr===Zr-1&&this._addTileFeatures(Er.range(0,en,Ji/Zr,cn),Er.points,-1,ar,Zr,yn),yn.features.length?yn:null},pt.prototype.getClusterExpansionZoom=function(_t){for(var tr=this._getOriginZoom(_t)-1;tr<=this.options.maxZoom;){var ar=this.getChildren(_t);if(tr++,ar.length!==1)break;_t=ar[0].properties.cluster_id}return tr},pt.prototype._appendLeaves=function(_t,tr,ar,Er,Zr){for(var ri=this.getChildren(tr),$r=0,zi=ri;$r<zi.length;$r+=1){var Ji=zi[$r],en=Ji.properties;if(en&&en.cluster?Zr+en.point_count<=Er?Zr+=en.point_count:Zr=this._appendLeaves(_t,en.cluster_id,ar,Er,Zr):Zr<Er?Zr++:_t.push(Ji),_t.length===ar)break}return Zr},pt.prototype._addTileFeatures=function(_t,tr,ar,Er,Zr,ri){for(var $r=0,zi=_t;$r<zi.length;$r+=1){var Ji=zi[$r],en=tr[Ji],cn=en.numPoints,yn={type:1,geometry:[[Math.round(this.options.extent*(en.x*Zr-ar)),Math.round(this.options.extent*(en.y*Zr-Er))]],tags:cn?Gt(en):this.points[en.index].properties},Mn=void 0;cn?Mn=en.id:this.options.generateId?Mn=en.index:this.points[en.index].id&&(Mn=this.points[en.index].id),Mn!==void 0&&(yn.id=Mn),ri.features.push(yn)}},pt.prototype._limitZoom=function(_t){return Math.max(this.options.minZoom,Math.min(+_t,this.options.maxZoom+1))},pt.prototype._cluster=function(_t,tr){for(var ar=[],Er=this.options,Zr=Er.radius,ri=Er.extent,$r=Er.reduce,zi=Er.minPoints,Ji=Zr/(ri*Math.pow(2,tr)),en=0;en<_t.length;en++){var cn=_t[en];if(!(cn.zoom<=tr)){cn.zoom=tr;for(var yn=this.trees[tr+1],Mn=yn.within(cn.x,cn.y,Ji),Ba=cn.numPoints||1,la=Ba,ma=0,Wa=Mn;ma<Wa.length;ma+=1){var Fa=Wa[ma],Wo=yn.points[Fa];Wo.zoom>tr&&(la+=Wo.numPoints||1)}if(la>=zi){for(var da=cn.x*Ba,Wn=cn.y*Ba,Ga=$r&&Ba>1?this._map(cn,!0):null,vo=(en<<5)+(tr+1)+this.points.length,jn=0,St=Mn;jn<St.length;jn+=1){var Cr=St[jn],Qr=yn.points[Cr];if(!(Qr.zoom<=tr)){Qr.zoom=tr;var pi=Qr.numPoints||1;da+=Qr.x*pi,Wn+=Qr.y*pi,Qr.parentId=vo,$r&&(Ga||(Ga=this._map(cn,!0)),$r(Ga,this._map(Qr)))}}cn.parentId=vo,ar.push(Wt(da/la,Wn/la,vo,la,Ga))}else if(ar.push(cn),la>1)for(var fn=0,Sn=Mn;fn<Sn.length;fn+=1){var En=Sn[fn],ki=yn.points[En];ki.zoom<=tr||(ki.zoom=tr,ar.push(ki))}}}return ar},pt.prototype._getOriginId=function(_t){return _t-this.points.length>>5},pt.prototype._getOriginZoom=function(_t){return(_t-this.points.length)%32},pt.prototype._map=function(_t,tr){if(_t.numPoints)return tr?ur({},_t.properties):_t.properties;var ar=this.points[_t.index].properties,Er=this.options.map(ar);return tr&&Er===ar?ur({},Er):Er};function Wt(Vt,_t,tr,ar,Er){return{x:Vt,y:_t,zoom:1/0,id:tr,parentId:-1,numPoints:ar,properties:Er}}function st(Vt,_t){var tr=Vt.geometry.coordinates,ar=tr[0],Er=tr[1];return{x:Nt(ar),y:$t(Er),zoom:1/0,index:_t,parentId:-1}}function lt(Vt){return{type:\"Feature\",id:Vt.id,properties:Gt(Vt),geometry:{type:\"Point\",coordinates:[sr(Vt.x),wr(Vt.y)]}}}function Gt(Vt){var _t=Vt.numPoints,tr=_t>=1e4?Math.round(_t/1e3)+\"k\":_t>=1e3?Math.round(_t/100)/10+\"k\":_t;return ur(ur({},Vt.properties),{cluster:!0,cluster_id:Vt.id,point_count:_t,point_count_abbreviated:tr})}function Nt(Vt){return Vt/360+.5}function $t(Vt){var _t=Math.sin(Vt*Math.PI/180),tr=.5-.25*Math.log((1+_t)/(1-_t))/Math.PI;return tr<0?0:tr>1?1:tr}function sr(Vt){return(Vt-.5)*360}function wr(Vt){var _t=(180-Vt*360)*Math.PI/180;return 360*Math.atan(Math.exp(_t))/Math.PI-90}function ur(Vt,_t){for(var tr in _t)Vt[tr]=_t[tr];return Vt}function Qe(Vt){return Vt.x}function Et(Vt){return Vt.y}function er(Vt,_t,tr,ar){for(var Er=ar,Zr=tr-_t>>1,ri=tr-_t,$r,zi=Vt[_t],Ji=Vt[_t+1],en=Vt[tr],cn=Vt[tr+1],yn=_t+3;yn<tr;yn+=3){var Mn=Ut(Vt[yn],Vt[yn+1],zi,Ji,en,cn);if(Mn>Er)$r=yn,Er=Mn;else if(Mn===Er){var Ba=Math.abs(yn-Zr);Ba<ri&&($r=yn,ri=Ba)}}Er>ar&&($r-_t>3&&er(Vt,_t,$r,ar),Vt[$r+2]=Er,tr-$r>3&&er(Vt,$r,tr,ar))}function Ut(Vt,_t,tr,ar,Er,Zr){var ri=Er-tr,$r=Zr-ar;if(ri!==0||$r!==0){var zi=((Vt-tr)*ri+(_t-ar)*$r)/(ri*ri+$r*$r);zi>1?(tr=Er,ar=Zr):zi>0&&(tr+=ri*zi,ar+=$r*zi)}return ri=Vt-tr,$r=_t-ar,ri*ri+$r*$r}function Ft(Vt,_t,tr,ar){var Er={id:typeof Vt==\"undefined\"?null:Vt,type:_t,geometry:tr,tags:ar,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return bt(Er),Er}function bt(Vt){var _t=Vt.geometry,tr=Vt.type;if(tr===\"Point\"||tr===\"MultiPoint\"||tr===\"LineString\")yt(Vt,_t);else if(tr===\"Polygon\"||tr===\"MultiLineString\")for(var ar=0;ar<_t.length;ar++)yt(Vt,_t[ar]);else if(tr===\"MultiPolygon\")for(ar=0;ar<_t.length;ar++)for(var Er=0;Er<_t[ar].length;Er++)yt(Vt,_t[ar][Er])}function yt(Vt,_t){for(var tr=0;tr<_t.length;tr+=3)Vt.minX=Math.min(Vt.minX,_t[tr]),Vt.minY=Math.min(Vt.minY,_t[tr+1]),Vt.maxX=Math.max(Vt.maxX,_t[tr]),Vt.maxY=Math.max(Vt.maxY,_t[tr+1])}function Yt(Vt,_t){var tr=[];if(Vt.type===\"FeatureCollection\")for(var ar=0;ar<Vt.features.length;ar++)lr(tr,Vt.features[ar],_t,ar);else Vt.type===\"Feature\"?lr(tr,Vt,_t):lr(tr,{geometry:Vt},_t);return tr}function lr(Vt,_t,tr,ar){if(_t.geometry){var Er=_t.geometry.coordinates,Zr=_t.geometry.type,ri=Math.pow(tr.tolerance/((1<<tr.maxZoom)*tr.extent),2),$r=[],zi=_t.id;if(tr.promoteId?zi=_t.properties[tr.promoteId]:tr.generateId&&(zi=ar||0),Zr===\"Point\")Tr(Er,$r);else if(Zr===\"MultiPoint\")for(var Ji=0;Ji<Er.length;Ji++)Tr(Er[Ji],$r);else if(Zr===\"LineString\")Rr(Er,$r,ri,!1);else if(Zr===\"MultiLineString\")if(tr.lineMetrics){for(Ji=0;Ji<Er.length;Ji++)$r=[],Rr(Er[Ji],$r,ri,!1),Vt.push(Ft(zi,\"LineString\",$r,_t.properties));return}else ei(Er,$r,ri,!1);else if(Zr===\"Polygon\")ei(Er,$r,ri,!0);else if(Zr===\"MultiPolygon\")for(Ji=0;Ji<Er.length;Ji++){var en=[];ei(Er[Ji],en,ri,!0),$r.push(en)}else if(Zr===\"GeometryCollection\"){for(Ji=0;Ji<_t.geometry.geometries.length;Ji++)lr(Vt,{id:zi,geometry:_t.geometry.geometries[Ji],properties:_t.properties},tr,ar);return}else throw new Error(\"Input data is not a valid GeoJSON object.\");Vt.push(Ft(zi,Zr,$r,_t.properties))}}function Tr(Vt,_t){_t.push(Wr(Vt[0])),_t.push(Ur(Vt[1])),_t.push(0)}function Rr(Vt,_t,tr,ar){for(var Er,Zr,ri=0,$r=0;$r<Vt.length;$r++){var zi=Wr(Vt[$r][0]),Ji=Ur(Vt[$r][1]);_t.push(zi),_t.push(Ji),_t.push(0),$r>0&&(ar?ri+=(Er*Ji-zi*Zr)/2:ri+=Math.sqrt(Math.pow(zi-Er,2)+Math.pow(Ji-Zr,2))),Er=zi,Zr=Ji}var en=_t.length-3;_t[2]=1,er(_t,0,en,tr),_t[en+2]=1,_t.size=Math.abs(ri),_t.start=0,_t.end=_t.size}function ei(Vt,_t,tr,ar){for(var Er=0;Er<Vt.length;Er++){var Zr=[];Rr(Vt[Er],Zr,tr,ar),_t.push(Zr)}}function Wr(Vt){return Vt/360+.5}function Ur(Vt){var _t=Math.sin(Vt*Math.PI/180),tr=.5-.25*Math.log((1+_t)/(1-_t))/Math.PI;return tr<0?0:tr>1?1:tr}function dt(Vt,_t,tr,ar,Er,Zr,ri,$r){if(tr/=_t,ar/=_t,Zr>=tr&&ri<ar)return Vt;if(ri<tr||Zr>=ar)return null;for(var zi=[],Ji=0;Ji<Vt.length;Ji++){var en=Vt[Ji],cn=en.geometry,yn=en.type,Mn=Er===0?en.minX:en.minY,Ba=Er===0?en.maxX:en.maxY;if(Mn>=tr&&Ba<ar){zi.push(en);continue}else if(Ba<tr||Mn>=ar)continue;var la=[];if(yn===\"Point\"||yn===\"MultiPoint\")Ge(cn,la,tr,ar,Er);else if(yn===\"LineString\")Je(cn,la,tr,ar,Er,!1,$r.lineMetrics);else if(yn===\"MultiLineString\")$e(cn,la,tr,ar,Er,!1);else if(yn===\"Polygon\")$e(cn,la,tr,ar,Er,!0);else if(yn===\"MultiPolygon\")for(var ma=0;ma<cn.length;ma++){var Wa=[];$e(cn[ma],Wa,tr,ar,Er,!0),Wa.length&&la.push(Wa)}if(la.length){if($r.lineMetrics&&yn===\"LineString\"){for(ma=0;ma<la.length;ma++)zi.push(Ft(en.id,yn,la[ma],en.tags));continue}(yn===\"LineString\"||yn===\"MultiLineString\")&&(la.length===1?(yn=\"LineString\",la=la[0]):yn=\"MultiLineString\"),(yn===\"Point\"||yn===\"MultiPoint\")&&(yn=la.length===3?\"Point\":\"MultiPoint\"),zi.push(Ft(en.id,yn,la,en.tags))}}return zi.length?zi:null}function Ge(Vt,_t,tr,ar,Er){for(var Zr=0;Zr<Vt.length;Zr+=3){var ri=Vt[Zr+Er];ri>=tr&&ri<=ar&&(_t.push(Vt[Zr]),_t.push(Vt[Zr+1]),_t.push(Vt[Zr+2]))}}function Je(Vt,_t,tr,ar,Er,Zr,ri){for(var $r=je(Vt),zi=Er===0?Ie:xe,Ji=Vt.start,en,cn,yn=0;yn<Vt.length-3;yn+=3){var Mn=Vt[yn],Ba=Vt[yn+1],la=Vt[yn+2],ma=Vt[yn+3],Wa=Vt[yn+4],Fa=Er===0?Mn:Ba,Wo=Er===0?ma:Wa,da=!1;ri&&(en=Math.sqrt(Math.pow(Mn-ma,2)+Math.pow(Ba-Wa,2))),Fa<tr?Wo>tr&&(cn=zi($r,Mn,Ba,ma,Wa,tr),ri&&($r.start=Ji+en*cn)):Fa>ar?Wo<ar&&(cn=zi($r,Mn,Ba,ma,Wa,ar),ri&&($r.start=Ji+en*cn)):wt($r,Mn,Ba,la),Wo<tr&&Fa>=tr&&(cn=zi($r,Mn,Ba,ma,Wa,tr),da=!0),Wo>ar&&Fa<=ar&&(cn=zi($r,Mn,Ba,ma,Wa,ar),da=!0),!Zr&&da&&(ri&&($r.end=Ji+en*cn),_t.push($r),$r=je(Vt)),ri&&(Ji+=en)}var Wn=Vt.length-3;Mn=Vt[Wn],Ba=Vt[Wn+1],la=Vt[Wn+2],Fa=Er===0?Mn:Ba,Fa>=tr&&Fa<=ar&&wt($r,Mn,Ba,la),Wn=$r.length-3,Zr&&Wn>=3&&($r[Wn]!==$r[0]||$r[Wn+1]!==$r[1])&&wt($r,$r[0],$r[1],$r[2]),$r.length&&_t.push($r)}function je(Vt){var _t=[];return _t.size=Vt.size,_t.start=Vt.start,_t.end=Vt.end,_t}function $e(Vt,_t,tr,ar,Er,Zr){for(var ri=0;ri<Vt.length;ri++)Je(Vt[ri],_t,tr,ar,Er,Zr,!1)}function wt(Vt,_t,tr,ar){Vt.push(_t),Vt.push(tr),Vt.push(ar)}function Ie(Vt,_t,tr,ar,Er,Zr){var ri=(Zr-_t)/(ar-_t);return Vt.push(Zr),Vt.push(tr+(Er-tr)*ri),Vt.push(1),ri}function xe(Vt,_t,tr,ar,Er,Zr){var ri=(Zr-tr)/(Er-tr);return Vt.push(_t+(ar-_t)*ri),Vt.push(Zr),Vt.push(1),ri}function Ce(Vt,_t){var tr=_t.buffer/_t.extent,ar=Vt,Er=dt(Vt,1,-1-tr,tr,0,-1,2,_t),Zr=dt(Vt,1,1-tr,2+tr,0,-1,2,_t);return(Er||Zr)&&(ar=dt(Vt,1,-tr,1+tr,0,-1,2,_t)||[],Er&&(ar=vt(Er,1).concat(ar)),Zr&&(ar=ar.concat(vt(Zr,-1)))),ar}function vt(Vt,_t){for(var tr=[],ar=0;ar<Vt.length;ar++){var Er=Vt[ar],Zr=Er.type,ri;if(Zr===\"Point\"||Zr===\"MultiPoint\"||Zr===\"LineString\")ri=nr(Er.geometry,_t);else if(Zr===\"MultiLineString\"||Zr===\"Polygon\"){ri=[];for(var $r=0;$r<Er.geometry.length;$r++)ri.push(nr(Er.geometry[$r],_t))}else if(Zr===\"MultiPolygon\")for(ri=[],$r=0;$r<Er.geometry.length;$r++){for(var zi=[],Ji=0;Ji<Er.geometry[$r].length;Ji++)zi.push(nr(Er.geometry[$r][Ji],_t));ri.push(zi)}tr.push(Ft(Er.id,Zr,ri,Er.tags))}return tr}function nr(Vt,_t){var tr=[];tr.size=Vt.size,Vt.start!==void 0&&(tr.start=Vt.start,tr.end=Vt.end);for(var ar=0;ar<Vt.length;ar+=3)tr.push(Vt[ar]+_t,Vt[ar+1],Vt[ar+2]);return tr}function ir(Vt,_t){if(Vt.transformed)return Vt;var tr=1<<Vt.z,ar=Vt.x,Er=Vt.y,Zr,ri,$r;for(Zr=0;Zr<Vt.features.length;Zr++){var zi=Vt.features[Zr],Ji=zi.geometry,en=zi.type;if(zi.geometry=[],en===1)for(ri=0;ri<Ji.length;ri+=2)zi.geometry.push(pr(Ji[ri],Ji[ri+1],_t,tr,ar,Er));else for(ri=0;ri<Ji.length;ri++){var cn=[];for($r=0;$r<Ji[ri].length;$r+=2)cn.push(pr(Ji[ri][$r],Ji[ri][$r+1],_t,tr,ar,Er));zi.geometry.push(cn)}}return Vt.transformed=!0,Vt}function pr(Vt,_t,tr,ar,Er,Zr){return[Math.round(tr*(Vt*ar-Er)),Math.round(tr*(_t*ar-Zr))]}function oi(Vt,_t,tr,ar,Er){for(var Zr=_t===Er.maxZoom?0:Er.tolerance/((1<<_t)*Er.extent),ri={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:tr,y:ar,z:_t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},$r=0;$r<Vt.length;$r++){ri.numFeatures++,di(ri,Vt[$r],Zr,Er);var zi=Vt[$r].minX,Ji=Vt[$r].minY,en=Vt[$r].maxX,cn=Vt[$r].maxY;zi<ri.minX&&(ri.minX=zi),Ji<ri.minY&&(ri.minY=Ji),en>ri.maxX&&(ri.maxX=en),cn>ri.maxY&&(ri.maxY=cn)}return ri}function di(Vt,_t,tr,ar){var Er=_t.geometry,Zr=_t.type,ri=[];if(Zr===\"Point\"||Zr===\"MultiPoint\")for(var $r=0;$r<Er.length;$r+=3)ri.push(Er[$r]),ri.push(Er[$r+1]),Vt.numPoints++,Vt.numSimplified++;else if(Zr===\"LineString\")Jr(ri,Er,Vt,tr,!1,!1);else if(Zr===\"MultiLineString\"||Zr===\"Polygon\")for($r=0;$r<Er.length;$r++)Jr(ri,Er[$r],Vt,tr,Zr===\"Polygon\",$r===0);else if(Zr===\"MultiPolygon\")for(var zi=0;zi<Er.length;zi++){var Ji=Er[zi];for($r=0;$r<Ji.length;$r++)Jr(ri,Ji[$r],Vt,tr,!0,$r===0)}if(ri.length){var en=_t.tags||null;if(Zr===\"LineString\"&&ar.lineMetrics){en={};for(var cn in _t.tags)en[cn]=_t.tags[cn];en.mapbox_clip_start=Er.start/Er.size,en.mapbox_clip_end=Er.end/Er.size}var yn={geometry:ri,type:Zr===\"Polygon\"||Zr===\"MultiPolygon\"?3:Zr===\"LineString\"||Zr===\"MultiLineString\"?2:1,tags:en};_t.id!==null&&(yn.id=_t.id),Vt.features.push(yn)}}function Jr(Vt,_t,tr,ar,Er,Zr){var ri=ar*ar;if(ar>0&&_t.size<(Er?ri:ar)){tr.numPoints+=_t.length/3;return}for(var $r=[],zi=0;zi<_t.length;zi+=3)(ar===0||_t[zi+2]>ri)&&(tr.numSimplified++,$r.push(_t[zi]),$r.push(_t[zi+1])),tr.numPoints++;Er&&fi($r,Zr),Vt.push($r)}function fi(Vt,_t){for(var tr=0,ar=0,Er=Vt.length,Zr=Er-2;ar<Er;Zr=ar,ar+=2)tr+=(Vt[ar]-Vt[Zr])*(Vt[ar+1]+Vt[Zr+1]);if(tr>0===_t)for(ar=0,Er=Vt.length;ar<Er/2;ar+=2){var ri=Vt[ar],$r=Vt[ar+1];Vt[ar]=Vt[Er-2-ar],Vt[ar+1]=Vt[Er-1-ar],Vt[Er-2-ar]=ri,Vt[Er-1-ar]=$r}}function Hi(Vt,_t){return new Pn(Vt,_t)}function Pn(Vt,_t){_t=this.options=pn(Object.create(this.options),_t);var tr=_t.debug;if(tr&&console.time(\"preprocess data\"),_t.maxZoom<0||_t.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");if(_t.promoteId&&_t.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var ar=Yt(Vt,_t);this.tiles={},this.tileCoords=[],tr&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",_t.indexMaxZoom,_t.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),ar=Ce(ar,_t),ar.length&&this.splitTile(ar,0,0,0),tr&&(ar.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}Pn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Pn.prototype.splitTile=function(Vt,_t,tr,ar,Er,Zr,ri){for(var $r=[Vt,_t,tr,ar],zi=this.options,Ji=zi.debug;$r.length;){ar=$r.pop(),tr=$r.pop(),_t=$r.pop(),Vt=$r.pop();var en=1<<_t,cn=wn(_t,tr,ar),yn=this.tiles[cn];if(!yn&&(Ji>1&&console.time(\"creation\"),yn=this.tiles[cn]=oi(Vt,_t,tr,ar,zi),this.tileCoords.push({z:_t,x:tr,y:ar}),Ji)){Ji>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",_t,tr,ar,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd(\"creation\"));var Mn=\"z\"+_t;this.stats[Mn]=(this.stats[Mn]||0)+1,this.total++}if(yn.source=Vt,Er){if(_t===zi.maxZoom||_t===Er)continue;var Ba=1<<Er-_t;if(tr!==Math.floor(Zr/Ba)||ar!==Math.floor(ri/Ba))continue}else if(_t===zi.indexMaxZoom||yn.numPoints<=zi.indexMaxPoints)continue;if(yn.source=null,Vt.length!==0){Ji>1&&console.time(\"clipping\");var la=.5*zi.buffer/zi.extent,ma=.5-la,Wa=.5+la,Fa=1+la,Wo,da,Wn,Ga,vo,jn;Wo=da=Wn=Ga=null,vo=dt(Vt,en,tr-la,tr+Wa,0,yn.minX,yn.maxX,zi),jn=dt(Vt,en,tr+ma,tr+Fa,0,yn.minX,yn.maxX,zi),Vt=null,vo&&(Wo=dt(vo,en,ar-la,ar+Wa,1,yn.minY,yn.maxY,zi),da=dt(vo,en,ar+ma,ar+Fa,1,yn.minY,yn.maxY,zi),vo=null),jn&&(Wn=dt(jn,en,ar-la,ar+Wa,1,yn.minY,yn.maxY,zi),Ga=dt(jn,en,ar+ma,ar+Fa,1,yn.minY,yn.maxY,zi),jn=null),Ji>1&&console.timeEnd(\"clipping\"),$r.push(Wo||[],_t+1,tr*2,ar*2),$r.push(da||[],_t+1,tr*2,ar*2+1),$r.push(Wn||[],_t+1,tr*2+1,ar*2),$r.push(Ga||[],_t+1,tr*2+1,ar*2+1)}}},Pn.prototype.getTile=function(Vt,_t,tr){var ar=this.options,Er=ar.extent,Zr=ar.debug;if(Vt<0||Vt>24)return null;var ri=1<<Vt;_t=(_t%ri+ri)%ri;var $r=wn(Vt,_t,tr);if(this.tiles[$r])return ir(this.tiles[$r],Er);Zr>1&&console.log(\"drilling down to z%d-%d-%d\",Vt,_t,tr);for(var zi=Vt,Ji=_t,en=tr,cn;!cn&&zi>0;)zi--,Ji=Math.floor(Ji/2),en=Math.floor(en/2),cn=this.tiles[wn(zi,Ji,en)];return!cn||!cn.source?null:(Zr>1&&console.log(\"found parent tile z%d-%d-%d\",zi,Ji,en),Zr>1&&console.time(\"drilling down\"),this.splitTile(cn.source,zi,Ji,en,Vt,_t,tr),Zr>1&&console.timeEnd(\"drilling down\"),this.tiles[$r]?ir(this.tiles[$r],Er):null)};function wn(Vt,_t,tr){return((1<<Vt)*tr+_t)*32+Vt}function pn(Vt,_t){for(var tr in _t)Vt[tr]=_t[tr];return Vt}function Vn(Vt,_t){var tr=Vt.tileID.canonical;if(!this._geoJSONIndex)return _t(null,null);var ar=this._geoJSONIndex.getTile(tr.z,tr.x,tr.y);if(!ar)return _t(null,null);var Er=new k(ar.features),Zr=z(Er);(Zr.byteOffset!==0||Zr.byteLength!==Zr.buffer.byteLength)&&(Zr=new Uint8Array(Zr)),_t(null,{vectorTile:Er,rawData:Zr.buffer})}var kn=function(Vt){function _t(tr,ar,Er,Zr){Vt.call(this,tr,ar,Er,Vn),Zr&&(this.loadGeoJSON=Zr)}return Vt&&(_t.__proto__=Vt),_t.prototype=Object.create(Vt&&Vt.prototype),_t.prototype.constructor=_t,_t.prototype.loadData=function(ar,Er){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Er,this._pendingLoadDataParams=ar,this._state&&this._state!==\"Idle\"?this._state=\"NeedsLoadData\":(this._state=\"Coalescing\",this._loadData())},_t.prototype._loadData=function(){var ar=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Er=this._pendingCallback,Zr=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ri=Zr&&Zr.request&&Zr.request.collectResourceTiming?new i.RequestPerformance(Zr.request):!1;this.loadGeoJSON(Zr,function($r,zi){if($r||!zi)return Er($r);if(typeof zi!=\"object\")return Er(new Error(\"Input data given to '\"+Zr.source+\"' is not a valid GeoJSON object.\"));p(zi,!0);try{if(Zr.filter){var Ji=i.createExpression(Zr.filter,{type:\"boolean\",\"property-type\":\"data-driven\",overridable:!1,transition:!1});if(Ji.result===\"error\")throw new Error(Ji.value.map(function(Mn){return Mn.key+\": \"+Mn.message}).join(\", \"));var en=zi.features.filter(function(Mn){return Ji.value.evaluate({zoom:0},Mn)});zi={type:\"FeatureCollection\",features:en}}ar._geoJSONIndex=Zr.cluster?new pt(ea(Zr)).load(zi.features):Hi(zi,Zr.geojsonVtOptions)}catch(Mn){return Er(Mn)}ar.loaded={};var cn={};if(ri){var yn=ri.finish();yn&&(cn.resourceTiming={},cn.resourceTiming[Zr.source]=JSON.parse(JSON.stringify(yn)))}Er(null,cn)})}},_t.prototype.coalesce=function(){this._state===\"Coalescing\"?this._state=\"Idle\":this._state===\"NeedsLoadData\"&&(this._state=\"Coalescing\",this._loadData())},_t.prototype.reloadTile=function(ar,Er){var Zr=this.loaded,ri=ar.uid;return Zr&&Zr[ri]?Vt.prototype.reloadTile.call(this,ar,Er):this.loadTile(ar,Er)},_t.prototype.loadGeoJSON=function(ar,Er){if(ar.request)i.getJSON(ar.request,Er);else if(typeof ar.data==\"string\")try{return Er(null,JSON.parse(ar.data))}catch(Zr){return Er(new Error(\"Input data given to '\"+ar.source+\"' is not a valid GeoJSON object.\"))}else return Er(new Error(\"Input data given to '\"+ar.source+\"' is not a valid GeoJSON object.\"))},_t.prototype.removeSource=function(ar,Er){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Er()},_t.prototype.getClusterExpansionZoom=function(ar,Er){try{Er(null,this._geoJSONIndex.getClusterExpansionZoom(ar.clusterId))}catch(Zr){Er(Zr)}},_t.prototype.getClusterChildren=function(ar,Er){try{Er(null,this._geoJSONIndex.getChildren(ar.clusterId))}catch(Zr){Er(Zr)}},_t.prototype.getClusterLeaves=function(ar,Er){try{Er(null,this._geoJSONIndex.getLeaves(ar.clusterId,ar.limit,ar.offset))}catch(Zr){Er(Zr)}},_t}(v);function ea(Vt){var _t=Vt.superclusterOptions,tr=Vt.clusterProperties;if(!tr||!_t)return _t;for(var ar={},Er={},Zr={accumulated:null,zoom:0},ri={properties:null},$r=Object.keys(tr),zi=0,Ji=$r;zi<Ji.length;zi+=1){var en=Ji[zi],cn=tr[en],yn=cn[0],Mn=cn[1],Ba=i.createExpression(Mn),la=i.createExpression(typeof yn==\"string\"?[yn,[\"accumulated\"],[\"get\",en]]:yn);ar[en]=Ba.value,Er[en]=la.value}return _t.map=function(ma){ri.properties=ma;for(var Wa={},Fa=0,Wo=$r;Fa<Wo.length;Fa+=1){var da=Wo[Fa];Wa[da]=ar[da].evaluate(Zr,ri)}return Wa},_t.reduce=function(ma,Wa){ri.properties=Wa;for(var Fa=0,Wo=$r;Fa<Wo.length;Fa+=1){var da=Wo[Fa];Zr.accumulated=ma[da],ma[da]=Er[da].evaluate(Zr,ri)}},_t}var ua=function(_t){var tr=this;this.self=_t,this.actor=new i.Actor(_t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:v,geojson:kn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(ar,Er){if(tr.workerSourceTypes[ar])throw new Error('Worker source with name \"'+ar+'\" already registered.');tr.workerSourceTypes[ar]=Er},this.self.registerRTLTextPlugin=function(ar){if(i.plugin.isParsed())throw new Error(\"RTL text plugin already registered.\");i.plugin.applyArabicShaping=ar.applyArabicShaping,i.plugin.processBidirectionalText=ar.processBidirectionalText,i.plugin.processStyledBidirectionalText=ar.processStyledBidirectionalText}};return ua.prototype.setReferrer=function(_t,tr){this.referrer=tr},ua.prototype.setImages=function(_t,tr,ar){this.availableImages[_t]=tr;for(var Er in this.workerSources[_t]){var Zr=this.workerSources[_t][Er];for(var ri in Zr)Zr[ri].availableImages=tr}ar()},ua.prototype.setLayers=function(_t,tr,ar){this.getLayerIndex(_t).replace(tr),ar()},ua.prototype.updateLayers=function(_t,tr,ar){this.getLayerIndex(_t).update(tr.layers,tr.removedIds),ar()},ua.prototype.loadTile=function(_t,tr,ar){this.getWorkerSource(_t,tr.type,tr.source).loadTile(tr,ar)},ua.prototype.loadDEMTile=function(_t,tr,ar){this.getDEMWorkerSource(_t,tr.source).loadTile(tr,ar)},ua.prototype.reloadTile=function(_t,tr,ar){this.getWorkerSource(_t,tr.type,tr.source).reloadTile(tr,ar)},ua.prototype.abortTile=function(_t,tr,ar){this.getWorkerSource(_t,tr.type,tr.source).abortTile(tr,ar)},ua.prototype.removeTile=function(_t,tr,ar){this.getWorkerSource(_t,tr.type,tr.source).removeTile(tr,ar)},ua.prototype.removeDEMTile=function(_t,tr){this.getDEMWorkerSource(_t,tr.source).removeTile(tr)},ua.prototype.removeSource=function(_t,tr,ar){if(!(!this.workerSources[_t]||!this.workerSources[_t][tr.type]||!this.workerSources[_t][tr.type][tr.source])){var Er=this.workerSources[_t][tr.type][tr.source];delete this.workerSources[_t][tr.type][tr.source],Er.removeSource!==void 0?Er.removeSource(tr,ar):ar()}},ua.prototype.loadWorkerSource=function(_t,tr,ar){try{this.self.importScripts(tr.url),ar()}catch(Er){ar(Er.toString())}},ua.prototype.syncRTLPluginState=function(_t,tr,ar){try{i.plugin.setState(tr);var Er=i.plugin.getPluginURL();if(i.plugin.isLoaded()&&!i.plugin.isParsed()&&Er!=null){this.self.importScripts(Er);var Zr=i.plugin.isParsed(),ri=Zr?void 0:new Error(\"RTL Text Plugin failed to import scripts from \"+Er);ar(ri,Zr)}}catch($r){ar($r.toString())}},ua.prototype.getAvailableImages=function(_t){var tr=this.availableImages[_t];return tr||(tr=[]),tr},ua.prototype.getLayerIndex=function(_t){var tr=this.layerIndexes[_t];return tr||(tr=this.layerIndexes[_t]=new l),tr},ua.prototype.getWorkerSource=function(_t,tr,ar){var Er=this;if(this.workerSources[_t]||(this.workerSources[_t]={}),this.workerSources[_t][tr]||(this.workerSources[_t][tr]={}),!this.workerSources[_t][tr][ar]){var Zr={send:function(ri,$r,zi){Er.actor.send(ri,$r,zi,_t)}};this.workerSources[_t][tr][ar]=new this.workerSourceTypes[tr](Zr,this.getLayerIndex(_t),this.getAvailableImages(_t))}return this.workerSources[_t][tr][ar]},ua.prototype.getDEMWorkerSource=function(_t,tr){return this.demWorkerSources[_t]||(this.demWorkerSources[_t]={}),this.demWorkerSources[_t][tr]||(this.demWorkerSources[_t][tr]=new b),this.demWorkerSources[_t][tr]},ua.prototype.enforceCacheSizeLimit=function(_t,tr){i.enforceCacheSizeLimit(tr)},typeof WorkerGlobalScope!=\"undefined\"&&typeof self!=\"undefined\"&&self instanceof WorkerGlobalScope&&(self.worker=new ua(self)),ua}),n([\"./shared\"],function(i){\"use strict\";var a=i.createCommonjsModule(function(Y){Y.exports?Y.exports=D:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=D,window.mapboxgl.notSupportedReason=J);function D(kt){return!J(kt)}function J(kt){if(!q())return\"not a browser\";if(!K())return\"insufficent Array support\";if(!de())return\"insufficient Function support\";if(!ne())return\"insufficient Object support\";if(!we())return\"insufficient JSON support\";if(!Ue())return\"insufficient worker support\";if(!ft())return\"insufficient Uint8ClampedArray support\";if(!Zt())return\"insufficient ArrayBuffer support\";if(!hr())return\"insufficient Canvas/getImageData support\";if(!Ve(kt&&kt.failIfMajorPerformanceCaveat))return\"insufficient WebGL support\"}function q(){return typeof window!=\"undefined\"&&typeof document!=\"undefined\"}function K(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function de(){return Function.prototype&&Function.prototype.bind}function ne(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function we(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function Ue(){if(!(\"Worker\"in window&&\"Blob\"in window&&\"URL\"in window))return!1;var kt=new Blob([\"\"],{type:\"text/javascript\"}),Ot=URL.createObjectURL(kt),It,Bt;try{Bt=new Worker(Ot),It=!0}catch(Rt){It=!1}return Bt&&Bt.terminate(),URL.revokeObjectURL(Ot),It}function ft(){return\"Uint8ClampedArray\"in window}function Zt(){return ArrayBuffer.isView}function hr(){var kt=document.createElement(\"canvas\");kt.width=kt.height=1;var Ot=kt.getContext(\"2d\");if(!Ot)return!1;var It=Ot.getImageData(0,0,1,1);return It&&It.width===kt.width}var qt={};function Ve(kt){return qt[kt]===void 0&&(qt[kt]=at(kt)),qt[kt]}D.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function et(kt){var Ot=document.createElement(\"canvas\"),It=Object.create(D.webGLContextAttributes);return It.failIfMajorPerformanceCaveat=kt,Ot.probablySupportsContext?Ot.probablySupportsContext(\"webgl\",It)||Ot.probablySupportsContext(\"experimental-webgl\",It):Ot.supportsContext?Ot.supportsContext(\"webgl\",It)||Ot.supportsContext(\"experimental-webgl\",It):Ot.getContext(\"webgl\",It)||Ot.getContext(\"experimental-webgl\",It)}function at(kt){var Ot=et(kt);if(!Ot)return!1;var It=Ot.createShader(Ot.VERTEX_SHADER);return!It||Ot.isContextLost()?!1:(Ot.shaderSource(It,\"void main() {}\"),Ot.compileShader(It),Ot.getShaderParameter(It,Ot.COMPILE_STATUS)===!0)}}),o={};o.create=function(Y,D,J){var q=i.window.document.createElement(Y);return D!==void 0&&(q.className=D),J&&J.appendChild(q),q},o.createNS=function(Y,D){var J=i.window.document.createElementNS(Y,D);return J};var s=i.window.document&&i.window.document.documentElement.style;function l(Y){if(!s)return Y[0];for(var D=0;D<Y.length;D++)if(Y[D]in s)return Y[D];return Y[0]}var u=l([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]),c;o.disableDrag=function(){s&&u&&(c=s[u],s[u]=\"none\")},o.enableDrag=function(){s&&u&&(s[u]=c)};var f=l([\"transform\",\"WebkitTransform\"]);o.setTransform=function(Y,D){Y.style[f]=D};var h=!1;try{var d=Object.defineProperty({},\"passive\",{get:function(){h=!0}});i.window.addEventListener(\"test\",d,d),i.window.removeEventListener(\"test\",d,d)}catch(Y){h=!1}o.addEventListener=function(Y,D,J,q){q===void 0&&(q={}),\"passive\"in q&&h?Y.addEventListener(D,J,q):Y.addEventListener(D,J,q.capture)},o.removeEventListener=function(Y,D,J,q){q===void 0&&(q={}),\"passive\"in q&&h?Y.removeEventListener(D,J,q):Y.removeEventListener(D,J,q.capture)};var v=function(Y){Y.preventDefault(),Y.stopPropagation(),i.window.removeEventListener(\"click\",v,!0)};o.suppressClick=function(){i.window.addEventListener(\"click\",v,!0),i.window.setTimeout(function(){i.window.removeEventListener(\"click\",v,!0)},0)},o.mousePos=function(Y,D){var J=Y.getBoundingClientRect();return new i.Point(D.clientX-J.left-Y.clientLeft,D.clientY-J.top-Y.clientTop)},o.touchPos=function(Y,D){for(var J=Y.getBoundingClientRect(),q=[],K=0;K<D.length;K++)q.push(new i.Point(D[K].clientX-J.left-Y.clientLeft,D[K].clientY-J.top-Y.clientTop));return q},o.mouseButton=function(Y){return typeof i.window.InstallTrigger!=\"undefined\"&&Y.button===2&&Y.ctrlKey&&i.window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function x(Y,D,J){var q,K,de,ne=i.browser.devicePixelRatio>1?\"@2x\":\"\",we=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,\".json\"),i.ResourceType.SpriteJSON),function(Zt,hr){we=null,de||(de=Zt,q=hr,ft())}),Ue=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,\".png\"),i.ResourceType.SpriteImage),function(Zt,hr){Ue=null,de||(de=Zt,K=hr,ft())});function ft(){if(de)J(de);else if(q&&K){var Zt=i.browser.getImageData(K),hr={};for(var qt in q){var Ve=q[qt],et=Ve.width,at=Ve.height,kt=Ve.x,Ot=Ve.y,It=Ve.sdf,Bt=Ve.pixelRatio,Rt=Ve.stretchX,mt=Ve.stretchY,Pt=Ve.content,ht=new i.RGBAImage({width:et,height:at});i.RGBAImage.copy(Zt,ht,{x:kt,y:Ot},{x:0,y:0},{width:et,height:at}),hr[qt]={data:ht,pixelRatio:Bt,sdf:It,stretchX:Rt,stretchY:mt,content:Pt}}J(null,hr)}}return{cancel:function(){we&&(we.cancel(),we=null),Ue&&(Ue.cancel(),Ue=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,C=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(q){if(this.loaded!==q&&(this.loaded=q,q)){for(var K=0,de=this.requestors;K<de.length;K+=1){var ne=de[K],we=ne.ids,Ue=ne.callback;this._notify(we,Ue)}this.requestors=[]}},D.prototype.getImage=function(q){return this.images[q]},D.prototype.addImage=function(q,K){this._validate(q,K)&&(this.images[q]=K)},D.prototype._validate=function(q,K){var de=!0;return this._validateStretch(K.stretchX,K.data&&K.data.width)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"stretchX\" value'))),de=!1),this._validateStretch(K.stretchY,K.data&&K.data.height)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"stretchY\" value'))),de=!1),this._validateContent(K.content,K)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"content\" value'))),de=!1),de},D.prototype._validateStretch=function(q,K){if(!q)return!0;for(var de=0,ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];if(Ue[0]<de||Ue[1]<Ue[0]||K<Ue[1])return!1;de=Ue[1]}return!0},D.prototype._validateContent=function(q,K){return q?!(q.length!==4||q[0]<0||K.data.width<q[0]||q[1]<0||K.data.height<q[1]||q[2]<0||K.data.width<q[2]||q[3]<0||K.data.height<q[3]||q[2]<q[0]||q[3]<q[1]):!0},D.prototype.updateImage=function(q,K){var de=this.images[q];K.version=de.version+1,this.images[q]=K,this.updatedImages[q]=!0},D.prototype.removeImage=function(q){var K=this.images[q];delete this.images[q],delete this.patterns[q],K.userImage&&K.userImage.onRemove&&K.userImage.onRemove()},D.prototype.listImages=function(){return Object.keys(this.images)},D.prototype.getImages=function(q,K){var de=!0;if(!this.isLoaded())for(var ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];this.images[Ue]||(de=!1)}this.isLoaded()||de?this._notify(q,K):this.requestors.push({ids:q,callback:K})},D.prototype._notify=function(q,K){for(var de={},ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];this.images[Ue]||this.fire(new i.Event(\"styleimagemissing\",{id:Ue}));var ft=this.images[Ue];ft?de[Ue]={data:ft.data.clone(),pixelRatio:ft.pixelRatio,sdf:ft.sdf,version:ft.version,stretchX:ft.stretchX,stretchY:ft.stretchY,content:ft.content,hasRenderCallback:!!(ft.userImage&&ft.userImage.render)}:i.warnOnce('Image \"'+Ue+'\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.')}K(null,de)},D.prototype.getPixelSize=function(){var q=this.atlasImage,K=q.width,de=q.height;return{width:K,height:de}},D.prototype.getPattern=function(q){var K=this.patterns[q],de=this.getImage(q);if(!de)return null;if(K&&K.position.version===de.version)return K.position;if(K)K.position.version=de.version;else{var ne=de.data.width+p*2,we=de.data.height+p*2,Ue={w:ne,h:we,x:0,y:0},ft=new i.ImagePosition(Ue,de);this.patterns[q]={bin:Ue,position:ft}}return this._updatePatternAtlas(),this.patterns[q].position},D.prototype.bind=function(q){var K=q.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.Texture(q,this.atlasImage,K.RGBA),this.atlasTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE)},D.prototype._updatePatternAtlas=function(){var q=[];for(var K in this.patterns)q.push(this.patterns[K].bin);var de=i.potpack(q),ne=de.w,we=de.h,Ue=this.atlasImage;Ue.resize({width:ne||1,height:we||1});for(var ft in this.patterns){var Zt=this.patterns[ft],hr=Zt.bin,qt=hr.x+p,Ve=hr.y+p,et=this.images[ft].data,at=et.width,kt=et.height;i.RGBAImage.copy(et,Ue,{x:0,y:0},{x:qt,y:Ve},{width:at,height:kt}),i.RGBAImage.copy(et,Ue,{x:0,y:kt-1},{x:qt,y:Ve-1},{width:at,height:1}),i.RGBAImage.copy(et,Ue,{x:0,y:0},{x:qt,y:Ve+kt},{width:at,height:1}),i.RGBAImage.copy(et,Ue,{x:at-1,y:0},{x:qt-1,y:Ve},{width:1,height:kt}),i.RGBAImage.copy(et,Ue,{x:0,y:0},{x:qt+at,y:Ve},{width:1,height:kt})}this.dirty=!0},D.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},D.prototype.dispatchRenderCallbacks=function(q){for(var K=0,de=q;K<de.length;K+=1){var ne=de[K];if(!this.callbackDispatchedThisFrame[ne]){this.callbackDispatchedThisFrame[ne]=!0;var we=this.images[ne],Ue=b(we);Ue&&this.updateImage(ne,we)}}},D}(i.Evented);function E(Y,D,J,q,K){var de=D*256,ne=de+255,we=q.transformRequest(q.normalizeGlyphsURL(J).replace(\"{fontstack}\",Y).replace(\"{range}\",de+\"-\"+ne),i.ResourceType.Glyphs);i.getArrayBuffer(we,function(Ue,ft){if(Ue)K(Ue);else if(ft){for(var Zt={},hr=0,qt=i.parseGlyphPBF(ft);hr<qt.length;hr+=1){var Ve=qt[hr];Zt[Ve.id]=Ve}K(null,Zt)}})}var A=k,L=k,_=1e20;function k(Y,D,J,q,K,de){this.fontSize=Y||24,this.buffer=D===void 0?3:D,this.cutoff=q||.25,this.fontFamily=K||\"sans-serif\",this.fontWeight=de||\"normal\",this.radius=J||8;var ne=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement(\"canvas\"),this.canvas.width=this.canvas.height=ne,this.ctx=this.canvas.getContext(\"2d\"),this.ctx.font=this.fontWeight+\" \"+this.fontSize+\"px \"+this.fontFamily,this.ctx.textBaseline=\"middle\",this.ctx.fillStyle=\"black\",this.gridOuter=new Float64Array(ne*ne),this.gridInner=new Float64Array(ne*ne),this.f=new Float64Array(ne),this.d=new Float64Array(ne),this.z=new Float64Array(ne+1),this.v=new Int16Array(ne),this.middle=Math.round(ne/2*(navigator.userAgent.indexOf(\"Gecko/\")>=0?1.2:1))}k.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),q=0;q<this.size*this.size;q++){var K=D.data[q*4+3]/255;this.gridOuter[q]=K===1?0:K===0?_:Math.pow(Math.max(0,.5-K),2),this.gridInner[q]=K===1?_:K===0?0:Math.pow(Math.max(0,K-.5),2)}for(M(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),M(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),q=0;q<this.size*this.size;q++){var de=this.gridOuter[q]-this.gridInner[q];J[q]=Math.max(0,Math.min(255,Math.round(255-255*(de/this.radius+this.cutoff))))}return J};function M(Y,D,J,q,K,de,ne){for(var we=0;we<D;we++){for(var Ue=0;Ue<J;Ue++)q[Ue]=Y[Ue*D+we];for(g(q,K,de,ne,J),Ue=0;Ue<J;Ue++)Y[Ue*D+we]=K[Ue]}for(Ue=0;Ue<J;Ue++){for(we=0;we<D;we++)q[we]=Y[Ue*D+we];for(g(q,K,de,ne,D),we=0;we<D;we++)Y[Ue*D+we]=Math.sqrt(K[we])}}function g(Y,D,J,q,K){J[0]=0,q[0]=-_,q[1]=+_;for(var de=1,ne=0;de<K;de++){for(var we=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);we<=q[ne];)ne--,we=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);ne++,J[ne]=de,q[ne]=we,q[ne+1]=+_}for(de=0,ne=0;de<K;de++){for(;q[ne+1]<de;)ne++;D[de]=(de-J[ne])*(de-J[ne])+Y[J[ne]]}}A.default=L;var P=function(D,J){this.requestManager=D,this.localIdeographFontFamily=J,this.entries={}};P.prototype.setURL=function(D){this.url=D},P.prototype.getGlyphs=function(D,J){var q=this,K=[];for(var de in D)for(var ne=0,we=D[de];ne<we.length;ne+=1){var Ue=we[ne];K.push({stack:de,id:Ue})}i.asyncAll(K,function(ft,Zt){var hr=ft.stack,qt=ft.id,Ve=q.entries[hr];Ve||(Ve=q.entries[hr]={glyphs:{},requests:{},ranges:{}});var et=Ve.glyphs[qt];if(et!==void 0){Zt(null,{stack:hr,id:qt,glyph:et});return}if(et=q._tinySDF(Ve,hr,qt),et){Ve.glyphs[qt]=et,Zt(null,{stack:hr,id:qt,glyph:et});return}var at=Math.floor(qt/256);if(at*256>65535){Zt(new Error(\"glyphs > 65535 not supported\"));return}if(Ve.ranges[at]){Zt(null,{stack:hr,id:qt,glyph:et});return}var kt=Ve.requests[at];kt||(kt=Ve.requests[at]=[],P.loadGlyphRange(hr,at,q.url,q.requestManager,function(Ot,It){if(It){for(var Bt in It)q._doesCharSupportLocalGlyph(+Bt)||(Ve.glyphs[+Bt]=It[+Bt]);Ve.ranges[at]=!0}for(var Rt=0,mt=kt;Rt<mt.length;Rt+=1){var Pt=mt[Rt];Pt(Ot,It)}delete Ve.requests[at]})),kt.push(function(Ot,It){Ot?Zt(Ot):It&&Zt(null,{stack:hr,id:qt,glyph:It[qt]||null})})},function(ft,Zt){if(ft)J(ft);else if(Zt){for(var hr={},qt=0,Ve=Zt;qt<Ve.length;qt+=1){var et=Ve[qt],at=et.stack,kt=et.id,Ot=et.glyph;(hr[at]||(hr[at]={}))[kt]=Ot&&{id:Ot.id,bitmap:Ot.bitmap.clone(),metrics:Ot.metrics}}J(null,hr)}})},P.prototype._doesCharSupportLocalGlyph=function(D){return!!this.localIdeographFontFamily&&(i.isChar[\"CJK Unified Ideographs\"](D)||i.isChar[\"Hangul Syllables\"](D)||i.isChar.Hiragana(D)||i.isChar.Katakana(D))},P.prototype._tinySDF=function(D,J,q){var K=this.localIdeographFontFamily;if(K&&this._doesCharSupportLocalGlyph(q)){var de=D.tinySDF;if(!de){var ne=\"400\";/bold/i.test(J)?ne=\"900\":/medium/i.test(J)?ne=\"500\":/light/i.test(J)&&(ne=\"200\"),de=D.tinySDF=new P.TinySDF(24,3,8,.25,K,ne)}return{id:q,bitmap:new i.AlphaImage({width:30,height:30},de.draw(String.fromCharCode(q))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},P.loadGlyphRange=E,P.TinySDF=A;var T=function(){this.specification=i.styleSpec.light.position};T.prototype.possiblyEvaluate=function(D,J){return i.sphericalToCartesian(D.expression.evaluate(J))},T.prototype.interpolate=function(D,J,q){return{x:i.number(D.x,J.x,q),y:i.number(D.y,J.y,q),z:i.number(D.z,J.z,q)}};var z=new i.Properties({anchor:new i.DataConstantProperty(i.styleSpec.light.anchor),position:new T,color:new i.DataConstantProperty(i.styleSpec.light.color),intensity:new i.DataConstantProperty(i.styleSpec.light.intensity)}),O=\"-transition\",V=function(Y){function D(J){Y.call(this),this._transitionable=new i.Transitionable(z),this.setLight(J),this._transitioning=this._transitionable.untransitioned()}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getLight=function(){return this._transitionable.serialize()},D.prototype.setLight=function(q,K){if(K===void 0&&(K={}),!this._validate(i.validateLight,q,K))for(var de in q){var ne=q[de];i.endsWith(de,O)?this._transitionable.setTransition(de.slice(0,-O.length),ne):this._transitionable.setValue(de,ne)}},D.prototype.updateTransitions=function(q){this._transitioning=this._transitionable.transitioned(q,this._transitioning)},D.prototype.hasTransition=function(){return this._transitioning.hasTransition()},D.prototype.recalculate=function(q){this.properties=this._transitioning.possiblyEvaluate(q)},D.prototype._validate=function(q,K,de){return de&&de.validate===!1?!1:i.emitValidationErrors(this,q.call(i.validateStyle,i.extend({value:K,style:{glyphs:!0,sprite:!0},styleSpec:i.styleSpec})))},D}(i.Evented),G=function(D,J){this.width=D,this.height=J,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};G.prototype.getDash=function(D,J){var q=D.join(\",\")+String(J);return this.dashEntry[q]||(this.dashEntry[q]=this.addDash(D,J)),this.dashEntry[q]},G.prototype.getDashRanges=function(D,J,q){var K=D.length%2===1,de=[],ne=K?-D[D.length-1]*q:0,we=D[0]*q,Ue=!0;de.push({left:ne,right:we,isDash:Ue,zeroLength:D[0]===0});for(var ft=D[0],Zt=1;Zt<D.length;Zt++){Ue=!Ue;var hr=D[Zt];ne=ft*q,ft+=hr,we=ft*q,de.push({left:ne,right:we,isDash:Ue,zeroLength:hr===0})}return de},G.prototype.addRoundDash=function(D,J,q){for(var K=J/2,de=-q;de<=q;de++)for(var ne=this.nextRow+q+de,we=this.width*ne,Ue=0,ft=D[Ue],Zt=0;Zt<this.width;Zt++){Zt/ft.right>1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),et=void 0,at=de/q*(K+1);if(ft.isDash){var kt=K-Math.abs(at);et=Math.sqrt(Ve*Ve+kt*kt)}else et=K-Math.sqrt(Ve*Ve+at*at);this.data[we+Zt]=Math.max(0,Math.min(255,et+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var q=D[J],K=D[J+1];q.zeroLength?D.splice(J,1):K&&K.isDash===q.isDash&&(K.left=q.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var we=this.width*this.nextRow,Ue=0,ft=D[Ue],Zt=0;Zt<this.width;Zt++){Zt/ft.right>1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),et=ft.isDash?Ve:-Ve;this.data[we+Zt]=Math.max(0,Math.min(255,et+128))}},G.prototype.addDash=function(D,J){var q=J?7:0,K=2*q+1;if(this.nextRow+K>this.height)return i.warnOnce(\"LineAtlas out of space\"),null;for(var de=0,ne=0;ne<D.length;ne++)de+=D[ne];if(de!==0){var we=this.width/de,Ue=this.getDashRanges(D,this.width,we);J?this.addRoundDash(Ue,we,q):this.addRegularDash(Ue)}var ft={y:(this.nextRow+q+.5)/this.height,height:2*q/this.height,width:de};return this.nextRow+=K,this.dirty=!0,ft},G.prototype.bind=function(D){var J=D.gl;this.texture?(J.bindTexture(J.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,J.texSubImage2D(J.TEXTURE_2D,0,0,0,this.width,this.height,J.ALPHA,J.UNSIGNED_BYTE,this.data))):(this.texture=J.createTexture(),J.bindTexture(J.TEXTURE_2D,this.texture),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.ALPHA,this.width,this.height,0,J.ALPHA,J.UNSIGNED_BYTE,this.data))};var Z=function Y(D,J){this.workerPool=D,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var q=this.workerPool.acquire(this.id),K=0;K<q.length;K++){var de=q[K],ne=new Y.Actor(de,J,this.id);ne.name=\"Worker \"+K,this.actors.push(ne)}};Z.prototype.broadcast=function(D,J,q){q=q||function(){},i.asyncAll(this.actors,function(K,de){K.send(D,J,de)},q)},Z.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Z.prototype.remove=function(){this.actors.forEach(function(D){D.remove()}),this.actors=[],this.workerPool.release(this.id)},Z.Actor=i.Actor;function H(Y,D,J){var q=function(K,de){if(K)return J(K);if(de){var ne=i.pick(i.extend(de,Y),[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"mapbox_logo\",\"bounds\",\"scheme\",\"tileSize\",\"encoding\"]);de.vector_layers&&(ne.vectorLayers=de.vector_layers,ne.vectorLayerIds=ne.vectorLayers.map(function(we){return we.id})),ne.tiles=D.canonicalizeTileset(ne,Y.url),J(null,ne)}};return Y.url?i.getJSON(D.transformRequest(D.normalizeSourceURL(Y.url),i.ResourceType.Source),q):i.browser.frame(function(){return q(null,Y)})}var N=function(D,J,q){this.bounds=i.LngLatBounds.convert(this.validateBounds(D)),this.minzoom=J||0,this.maxzoom=q||24};N.prototype.validateBounds=function(D){return!Array.isArray(D)||D.length!==4?[-180,-90,180,90]:[Math.max(-180,D[0]),Math.max(-90,D[1]),Math.min(180,D[2]),Math.min(90,D[3])]},N.prototype.contains=function(D){var J=Math.pow(2,D.z),q={minX:Math.floor(i.mercatorXfromLng(this.bounds.getWest())*J),minY:Math.floor(i.mercatorYfromLat(this.bounds.getNorth())*J),maxX:Math.ceil(i.mercatorXfromLng(this.bounds.getEast())*J),maxY:Math.ceil(i.mercatorYfromLat(this.bounds.getSouth())*J)},K=D.x>=q.minX&&D.x<q.maxX&&D.y>=q.minY&&D.y<q.maxY;return K};var j=function(Y){function D(J,q,K,de){if(Y.call(this),this.id=J,this.dispatcher=K,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,i.extend(this,i.pick(q,[\"url\",\"scheme\",\"tileSize\",\"promoteId\"])),this._options=i.extend({type:\"vector\"},q),this._collectResourceTiming=q.collectResourceTiming,this.tileSize!==512)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(de)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=H(this._options,this.map._requestManager,function(K,de){q._tileJSONRequest=null,q._loaded=!0,K?q.fire(new i.ErrorEvent(K)):de&&(i.extend(q,de),de.bounds&&(q.tileBounds=new N(de.bounds,q.minzoom,q.maxzoom)),i.postTurnstileEvent(de.tiles,q.map._requestManager._customAccessToken),i.postMapLoadEvent(de.tiles,q.map._getMapId(),q.map._requestManager._skuToken,q.map._requestManager._customAccessToken),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setSourceProperty=function(q){this._tileJSONRequest&&this._tileJSONRequest.cancel(),q();var K=this.map.style.sourceCaches[this.id];K.clearTiles(),this.load()},D.prototype.setTiles=function(q){var K=this;return this.setSourceProperty(function(){K._options.tiles=q}),this},D.prototype.setUrl=function(q){var K=this;return this.setSourceProperty(function(){K.url=q,K._options.url=q}),this},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.loadTile=function(q,K){var de=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme)),ne={request:this.map._requestManager.transformRequest(de,i.ResourceType.Tile),uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,tileSize:this.tileSize*q.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ne.request.collectResourceTiming=this._collectResourceTiming,!q.actor||q.state===\"expired\"?(q.actor=this.dispatcher.getActor(),q.request=q.actor.send(\"loadTile\",ne,we.bind(this))):q.state===\"loading\"?q.reloadCallback=K:q.request=q.actor.send(\"reloadTile\",ne,we.bind(this));function we(Ue,ft){if(delete q.request,q.aborted)return K(null);if(Ue&&Ue.status!==404)return K(Ue);ft&&ft.resourceTiming&&(q.resourceTiming=ft.resourceTiming),this.map._refreshExpiredTiles&&ft&&q.setExpiryData(ft),q.loadVectorData(ft,this.map.painter),i.cacheEntryPossiblyAdded(this.dispatcher),K(null),q.reloadCallback&&(this.loadTile(q,q.reloadCallback),q.reloadCallback=null)}},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.actor&&q.actor.send(\"abortTile\",{uid:q.uid,type:this.type,source:this.id},void 0)},D.prototype.unloadTile=function(q){q.unloadVectorData(),q.actor&&q.actor.send(\"removeTile\",{uid:q.uid,type:this.type,source:this.id},void 0)},D.prototype.hasTransition=function(){return!1},D}(i.Evented),re=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.setEventedParent(de),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=i.extend({type:\"raster\"},q),i.extend(this,i.pick(q,[\"url\",\"scheme\",\"tileSize\"]))}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=H(this._options,this.map._requestManager,function(K,de){q._tileJSONRequest=null,q._loaded=!0,K?q.fire(new i.ErrorEvent(K)):de&&(i.extend(q,de),de.bounds&&(q.tileBounds=new N(de.bounds,q.minzoom,q.maxzoom)),i.postTurnstileEvent(de.tiles),i.postMapLoadEvent(de.tiles,q.map._getMapId(),q.map._requestManager._skuToken),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},D.prototype.loadTile=function(q,K){var de=this,ne=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);q.request=i.getImage(this.map._requestManager.transformRequest(ne,i.ResourceType.Tile),function(we,Ue){if(delete q.request,q.aborted)q.state=\"unloaded\",K(null);else if(we)q.state=\"errored\",K(we);else if(Ue){de.map._refreshExpiredTiles&&q.setExpiryData(Ue),delete Ue.cacheControl,delete Ue.expires;var ft=de.map.painter.context,Zt=ft.gl;q.texture=de.map.painter.getTileTexture(Ue.width),q.texture?q.texture.update(Ue,{useMipmap:!0}):(q.texture=new i.Texture(ft,Ue,Zt.RGBA,{useMipmap:!0}),q.texture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE,Zt.LINEAR_MIPMAP_NEAREST),ft.extTextureFilterAnisotropic&&Zt.texParameterf(Zt.TEXTURE_2D,ft.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ft.extTextureFilterAnisotropicMax)),q.state=\"loaded\",i.cacheEntryPossiblyAdded(de.dispatcher),K(null)}})},D.prototype.abortTile=function(q,K){q.request&&(q.request.cancel(),delete q.request),K()},D.prototype.unloadTile=function(q,K){q.texture&&this.map.painter.saveTileTexture(q.texture),K()},D.prototype.hasTransition=function(){return!1},D}(i.Evented),oe=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),this.type=\"raster-dem\",this.maxzoom=22,this._options=i.extend({type:\"raster-dem\"},q),this.encoding=q.encoding||\"mapbox\"}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.serialize=function(){return{type:\"raster-dem\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},D.prototype.loadTile=function(q,K){var de=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);q.request=i.getImage(this.map._requestManager.transformRequest(de,i.ResourceType.Tile),ne.bind(this)),q.neighboringTiles=this._getNeighboringTiles(q.tileID);function ne(Ue,ft){if(delete q.request,q.aborted)q.state=\"unloaded\",K(null);else if(Ue)q.state=\"errored\",K(Ue);else if(ft){this.map._refreshExpiredTiles&&q.setExpiryData(ft),delete ft.cacheControl,delete ft.expires;var Zt=i.window.ImageBitmap&&ft instanceof i.window.ImageBitmap&&i.offscreenCanvasSupported(),hr=Zt?ft:i.browser.getImageData(ft,1),qt={uid:q.uid,coord:q.tileID,source:this.id,rawImageData:hr,encoding:this.encoding};(!q.actor||q.state===\"expired\")&&(q.actor=this.dispatcher.getActor(),q.actor.send(\"loadDEMTile\",qt,we.bind(this)))}}function we(Ue,ft){Ue&&(q.state=\"errored\",K(Ue)),ft&&(q.dem=ft,q.needsHillshadePrepare=!0,q.state=\"loaded\",K(null))}},D.prototype._getNeighboringTiles=function(q){var K=q.canonical,de=Math.pow(2,K.z),ne=(K.x-1+de)%de,we=K.x===0?q.wrap-1:q.wrap,Ue=(K.x+1+de)%de,ft=K.x+1===de?q.wrap+1:q.wrap,Zt={};return Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y).key]={backfilled:!1},K.y>0&&(Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y-1).key]={backfilled:!1}),K.y+1<de&&(Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y+1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y+1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y+1).key]={backfilled:!1}),Zt},D.prototype.unloadTile=function(q){q.demTexture&&this.map.painter.saveTileTexture(q.demTexture),q.fbo&&(q.fbo.destroy(),delete q.fbo),q.dem&&delete q.dem,delete q.neighboringTiles,q.state=\"unloaded\",q.actor&&q.actor.send(\"removeDEMTile\",{uid:q.uid,source:this.id})},D}(re),_e=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=K.getActor(),this.setEventedParent(de),this._data=q.data,this._options=i.extend({},q),this._collectResourceTiming=q.collectResourceTiming,this._resourceTiming=[],q.maxzoom!==void 0&&(this.maxzoom=q.maxzoom),q.type&&(this.type=q.type),q.attribution&&(this.attribution=q.attribution),this.promoteId=q.promoteId;var ne=i.EXTENT/this.tileSize;this.workerOptions=i.extend({source:this.id,cluster:q.cluster||!1,geojsonVtOptions:{buffer:(q.buffer!==void 0?q.buffer:128)*ne,tolerance:(q.tolerance!==void 0?q.tolerance:.375)*ne,extent:i.EXTENT,maxZoom:this.maxzoom,lineMetrics:q.lineMetrics||!1,generateId:q.generateId||!1},superclusterOptions:{maxZoom:q.clusterMaxZoom!==void 0?Math.min(q.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,q.clusterMinPoints||2),extent:i.EXTENT,radius:(q.clusterRadius||50)*ne,log:!1,generateId:q.generateId||!1},clusterProperties:q.clusterProperties,filter:q.filter},q.workerOptions)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(K){if(K){q.fire(new i.ErrorEvent(K));return}var de={dataType:\"source\",sourceDataType:\"metadata\"};q._collectResourceTiming&&q._resourceTiming&&q._resourceTiming.length>0&&(de.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new i.Event(\"data\",de))})},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setData=function(q){var K=this;return this._data=q,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:\"source\",sourceDataType:\"content\"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event(\"data\",ne))}),this},D.prototype.getClusterExpansionZoom=function(q,K){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:q,source:this.id},K),this},D.prototype.getClusterChildren=function(q,K){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:q,source:this.id},K),this},D.prototype.getClusterLeaves=function(q,K,de,ne){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:q,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(q){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne==\"string\"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+\".loadData\",de,function(we,Ue){K._removed||Ue&&Ue.abandoned||(K._loaded=!0,Ue&&Ue.resourceTiming&&Ue.resourceTiming[K.id]&&(K._resourceTiming=Ue.resourceTiming[K.id].slice(0)),K.actor.send(K.type+\".coalesce\",{source:de.source},null),q(we))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(q,K){var de=this,ne=q.actor?\"reloadTile\":\"loadTile\";q.actor=this.actor;var we={type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};q.request=this.actor.send(ne,we,function(Ue,ft){return delete q.request,q.unloadVectorData(),q.aborted?K(null):Ue?K(Ue):(q.loadVectorData(ft,de.map.painter,ne===\"reloadTile\"),K(null))})},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.aborted=!0},D.prototype.unloadTile=function(q){q.unloadVectorData(),this.actor.send(\"removeTile\",{uid:q.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),Me=i.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),ke=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=q.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(q,K){var de=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,we){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):we&&(de.image=we,q&&(de.coordinates=q),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(q){var K=this;return!this.image||!q.url?this:(this.options.url=q.url,this.load(q.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})))},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setCoordinates=function(q){var K=this;this.coordinates=q;var de=q.map(i.MercatorCoordinate.fromLngLat);this.tileID=me(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(we){return K.tileID.getTilePoint(we)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(q,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!==\"loaded\"&&(ne.state=\"loaded\",ne.texture=this.texture)}}},D.prototype.loadTile=function(q,K){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={},K(null)):(q.state=\"errored\",K(null))},D.prototype.serialize=function(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function me(Y){for(var D=1/0,J=1/0,q=-1/0,K=-1/0,de=0,ne=Y;de<ne.length;de+=1){var we=ne[de];D=Math.min(D,we.x),J=Math.min(J,we.y),q=Math.max(q,we.x),K=Math.max(K,we.y)}var Ue=q-D,ft=K-J,Zt=Math.max(Ue,ft),hr=Math.max(0,Math.floor(-Math.log(Zt)/Math.LN2)),qt=Math.pow(2,hr);return new i.CanonicalTileID(hr,Math.floor((D+q)/2*qt),Math.floor((J+K)/2*qt))}var ie=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),this.roundZoom=!0,this.type=\"video\",this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1;var K=this.options;this.urls=[];for(var de=0,ne=K.urls;de<ne.length;de+=1){var we=ne[de];this.urls.push(this.map._requestManager.transformRequest(we,i.ResourceType.Source).url)}i.getVideo(this.urls,function(Ue,ft){q._loaded=!0,Ue?q.fire(new i.ErrorEvent(Ue)):ft&&(q.video=ft,q.video.loop=!0,q.video.addEventListener(\"playing\",function(){q.map.triggerRepaint()}),q.map&&q.video.play(),q._finishLoading())})},D.prototype.pause=function(){this.video&&this.video.pause()},D.prototype.play=function(){this.video&&this.video.play()},D.prototype.seek=function(q){if(this.video){var K=this.video.seekable;q<K.start(0)||q>K.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+K.start(0)+\" and \"+K.end(0)+\"-second mark.\"))):this.video.currentTime=q}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(q){this.map||(this.map=q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(q,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!==\"loaded\"&&(ne.state=\"loaded\",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(ke),Se=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),q.coordinates?(!Array.isArray(q.coordinates)||q.coordinates.length!==4||q.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(we){return typeof we!=\"number\"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'missing required property \"coordinates\"'))),q.animate&&typeof q.animate!=\"boolean\"&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'optional \"animate\" property must be a boolean value'))),q.canvas?typeof q.canvas!=\"string\"&&!(q.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'missing required property \"canvas\"'))),this.options=q,this.animate=q.animate!==void 0?q.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error(\"Canvas dimensions cannot be less than or equal to zero.\")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var we=this.tiles[ne];we.state!==\"loaded\"&&(we.state=\"loaded\",we.texture=this.texture)}}},D.prototype.serialize=function(){return{type:\"canvas\",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var q=0,K=[this.canvas.width,this.canvas.height];q<K.length;q+=1){var de=K[q];if(isNaN(de)||de<=0)return!0}return!1},D}(ke),Le={vector:j,raster:re,\"raster-dem\":oe,geojson:_e,video:ie,image:ke,canvas:Se},Ae=function(Y,D,J,q){var K=new Le[D.type](Y,D,J,q);if(K.id!==Y)throw new Error(\"Expected Source id to be \"+Y+\" instead of \"+K.id);return i.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],K),K},De=function(Y){return Le[Y]},Pe=function(Y,D){Le[Y]=D};function ge(Y,D){var J=i.identity([]);return i.translate(J,J,[1,1,0]),i.scale(J,J,[Y.width*.5,Y.height*.5,1]),i.multiply(J,J,Y.calculatePosMatrix(D.toUnwrapped()))}function Fe(Y,D,J){if(Y)for(var q=0,K=Y;q<K.length;q+=1){var de=K[q],ne=D[de];if(ne&&ne.source===J&&ne.type===\"fill-extrusion\")return!0}else for(var we in D){var Ue=D[we];if(Ue.source===J&&Ue.type===\"fill-extrusion\")return!0}return!1}function ce(Y,D,J,q,K,de){var ne=Fe(K&&K.layers,D,Y.id),we=de.maxPitchScaleFactor(),Ue=Y.tilesIn(q,we,ne);Ue.sort(pt);for(var ft=[],Zt=0,hr=Ue;Zt<hr.length;Zt+=1){var qt=hr[Zt];ft.push({wrappedTileID:qt.tileID.wrapped().key,queryResults:qt.tile.queryRenderedFeatures(D,J,Y._state,qt.queryGeometry,qt.cameraQueryGeometry,qt.scale,K,de,we,ge(Y.transform,qt.tileID))})}var Ve=Wt(ft);for(var et in Ve)Ve[et].forEach(function(at){var kt=at.feature,Ot=Y.getFeatureState(kt.layer[\"source-layer\"],kt.id);kt.source=kt.layer.source,kt.layer[\"source-layer\"]&&(kt.sourceLayer=kt.layer[\"source-layer\"]),kt.state=Ot});return Ve}function Ze(Y,D,J,q,K,de,ne){for(var we={},Ue=de.queryRenderedSymbols(q),ft=[],Zt=0,hr=Object.keys(Ue).map(Number);Zt<hr.length;Zt+=1){var qt=hr[Zt];ft.push(ne[qt])}ft.sort(pt);for(var Ve=function(){var It=at[et],Bt=It.featureIndex.lookupSymbolFeatures(Ue[It.bucketInstanceId],D,It.bucketIndex,It.sourceLayerIndex,K.filter,K.layers,K.availableImages,Y);for(var Rt in Bt){var mt=we[Rt]=we[Rt]||[],Pt=Bt[Rt];Pt.sort(function(Nr,Ri){var hi=It.featureSortOrder;if(hi){var wi=hi.indexOf(Nr.featureIndex),gn=hi.indexOf(Ri.featureIndex);return gn-wi}else return Ri.featureIndex-Nr.featureIndex});for(var ht=0,cr=Pt;ht<cr.length;ht+=1){var br=cr[ht];mt.push(br)}}},et=0,at=ft;et<at.length;et+=1)Ve();var kt=function(It){we[It].forEach(function(Bt){var Rt=Bt.feature,mt=Y[It],Pt=J[mt.source],ht=Pt.getFeatureState(Rt.layer[\"source-layer\"],Rt.id);Rt.source=Rt.layer.source,Rt.layer[\"source-layer\"]&&(Rt.sourceLayer=Rt.layer[\"source-layer\"]),Rt.state=ht})};for(var Ot in we)kt(Ot);return we}function ct(Y,D){for(var J=Y.getRenderableIds().map(function(Ue){return Y.getTileByID(Ue)}),q=[],K={},de=0;de<J.length;de++){var ne=J[de],we=ne.tileID.canonical.key;K[we]||(K[we]=!0,ne.querySourceFeatures(q,D))}return q}function pt(Y,D){var J=Y.tileID,q=D.tileID;return J.overscaledZ-q.overscaledZ||J.canonical.y-q.canonical.y||J.wrap-q.wrap||J.canonical.x-q.canonical.x}function Wt(Y){for(var D={},J={},q=0,K=Y;q<K.length;q+=1){var de=K[q],ne=de.queryResults,we=de.wrappedTileID,Ue=J[we]=J[we]||{};for(var ft in ne)for(var Zt=ne[ft],hr=Ue[ft]=Ue[ft]||{},qt=D[ft]=D[ft]||[],Ve=0,et=Zt;Ve<et.length;Ve+=1){var at=et[Ve];hr[at.featureIndex]||(hr[at.featureIndex]=!0,qt.push(at))}}return D}var st=function(D,J){this.max=D,this.onRemove=J,this.reset()};st.prototype.reset=function(){for(var D in this.data)for(var J=0,q=this.data[D];J<q.length;J+=1){var K=q[J];K.timeout&&clearTimeout(K.timeout),this.onRemove(K.value)}return this.data={},this.order=[],this},st.prototype.add=function(D,J,q){var K=this,de=D.wrapped().key;this.data[de]===void 0&&(this.data[de]=[]);var ne={value:J,timeout:void 0};if(q!==void 0&&(ne.timeout=setTimeout(function(){K.remove(D,ne)},q)),this.data[de].push(ne),this.order.push(de),this.order.length>this.max){var we=this._getAndRemoveByKey(this.order[0]);we&&this.onRemove(we)}return this},st.prototype.has=function(D){return D.wrapped().key in this.data},st.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},st.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},st.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},st.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},st.prototype.remove=function(D,J){if(!this.has(D))return this;var q=D.wrapped().key,K=J===void 0?0:this.data[q].indexOf(J),de=this.data[q][K];return this.data[q].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[q].length===0&&delete this.data[q],this.onRemove(de.value),this.order.splice(this.order.indexOf(q),1),this},st.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},st.prototype.filter=function(D){var J=[];for(var q in this.data)for(var K=0,de=this.data[q];K<de.length;K+=1){var ne=de[K];D(ne.value)||J.push(ne)}for(var we=0,Ue=J;we<Ue.length;we+=1){var ft=Ue[we];this.remove(ft.value.tileID,ft)}};var lt=function(D,J,q){this.context=D;var K=D.gl;this.buffer=K.createBuffer(),this.dynamicDraw=!!q,this.context.unbindVAO(),D.bindElementBuffer.set(this.buffer),K.bufferData(K.ELEMENT_ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?K.DYNAMIC_DRAW:K.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};lt.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},lt.prototype.updateData=function(D){var J=this.context.gl;this.context.unbindVAO(),this.bind(),J.bufferSubData(J.ELEMENT_ARRAY_BUFFER,0,D.arrayBuffer)},lt.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var Gt={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"},Nt=function(D,J,q,K){this.length=J.length,this.attributes=q,this.itemSize=J.bytesPerElement,this.dynamicDraw=K,this.context=D;var de=D.gl;this.buffer=de.createBuffer(),D.bindVertexBuffer.set(this.buffer),de.bufferData(de.ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?de.DYNAMIC_DRAW:de.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};Nt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Nt.prototype.updateData=function(D){var J=this.context.gl;this.bind(),J.bufferSubData(J.ARRAY_BUFFER,0,D.arrayBuffer)},Nt.prototype.enableAttributes=function(D,J){for(var q=0;q<this.attributes.length;q++){var K=this.attributes[q],de=J.attributes[K.name];de!==void 0&&D.enableVertexAttribArray(de)}},Nt.prototype.setVertexAttribPointers=function(D,J,q){for(var K=0;K<this.attributes.length;K++){var de=this.attributes[K],ne=J.attributes[de.name];ne!==void 0&&D.vertexAttribPointer(ne,de.components,D[Gt[de.type]],!1,this.itemSize,de.offset+this.itemSize*(q||0))}},Nt.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var $t=function(D){this.gl=D.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};$t.prototype.get=function(){return this.current},$t.prototype.set=function(D){},$t.prototype.getDefault=function(){return this.default},$t.prototype.setDefault=function(){this.set(this.default)};var sr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(q){var K=this.current;q.r===K.r&&q.g===K.g&&q.b===K.b&&q.a===K.a&&!this.dirty||(this.gl.clearColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},D}($t),wr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 1},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.clearDepth(q),this.current=q,this.dirty=!1)},D}($t),ur=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.clearStencil(q),this.current=q,this.dirty=!1)},D}($t),Qe=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[!0,!0,!0,!0]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&q[3]===K[3]&&!this.dirty||(this.gl.colorMask(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},D}($t),Et=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.depthMask(q),this.current=q,this.dirty=!1)},D}($t),er=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 255},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.stencilMask(q),this.current=q,this.dirty=!1)},D}($t),Ut=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},D.prototype.set=function(q){var K=this.current;q.func===K.func&&q.ref===K.ref&&q.mask===K.mask&&!this.dirty||(this.gl.stencilFunc(q.func,q.ref,q.mask),this.current=q,this.dirty=!1)},D}($t),Ft=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[q.KEEP,q.KEEP,q.KEEP]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&!this.dirty||(this.gl.stencilOp(q[0],q[1],q[2]),this.current=q,this.dirty=!1)},D}($t),bt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.STENCIL_TEST):K.disable(K.STENCIL_TEST),this.current=q,this.dirty=!1}},D}($t),yt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[0,1]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&!this.dirty||(this.gl.depthRange(q[0],q[1]),this.current=q,this.dirty=!1)},D}($t),Yt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.DEPTH_TEST):K.disable(K.DEPTH_TEST),this.current=q,this.dirty=!1}},D}($t),lr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.LESS},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.depthFunc(q),this.current=q,this.dirty=!1)},D}($t),Tr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.BLEND):K.disable(K.BLEND),this.current=q,this.dirty=!1}},D}($t),Rr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[q.ONE,q.ZERO]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&!this.dirty||(this.gl.blendFunc(q[0],q[1]),this.current=q,this.dirty=!1)},D}($t),ei=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(q){var K=this.current;q.r===K.r&&q.g===K.g&&q.b===K.b&&q.a===K.a&&!this.dirty||(this.gl.blendColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},D}($t),Wr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.FUNC_ADD},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.blendEquation(q),this.current=q,this.dirty=!1)},D}($t),Ur=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.CULL_FACE):K.disable(K.CULL_FACE),this.current=q,this.dirty=!1}},D}($t),dt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.BACK},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.cullFace(q),this.current=q,this.dirty=!1)},D}($t),Ge=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.CCW},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.frontFace(q),this.current=q,this.dirty=!1)},D}($t),Je=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.useProgram(q),this.current=q,this.dirty=!1)},D}($t),je=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.TEXTURE0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.activeTexture(q),this.current=q,this.dirty=!1)},D}($t),$e=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[0,0,q.drawingBufferWidth,q.drawingBufferHeight]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&q[3]===K[3]&&!this.dirty||(this.gl.viewport(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},D}($t),wt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindFramebuffer(K.FRAMEBUFFER,q),this.current=q,this.dirty=!1}},D}($t),Ie=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindRenderbuffer(K.RENDERBUFFER,q),this.current=q,this.dirty=!1}},D}($t),xe=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindTexture(K.TEXTURE_2D,q),this.current=q,this.dirty=!1}},D}($t),Ce=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindBuffer(K.ARRAY_BUFFER,q),this.current=q,this.dirty=!1}},D}($t),vt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){var K=this.gl;K.bindBuffer(K.ELEMENT_ARRAY_BUFFER,q),this.current=q,this.dirty=!1},D}($t),nr=function(Y){function D(J){Y.call(this,J),this.vao=J.extVertexArrayObject}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){!this.vao||q===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(q),this.current=q,this.dirty=!1)},D}($t),ir=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 4},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_ALIGNMENT,q),this.current=q,this.dirty=!1}},D}($t),pr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q),this.current=q,this.dirty=!1}},D}($t),oi=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_FLIP_Y_WEBGL,q),this.current=q,this.dirty=!1}},D}($t),di=function(Y){function D(J,q){Y.call(this,J),this.context=J,this.parent=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D}($t),Jr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.setDirty=function(){this.dirty=!0},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferTexture2D(K.FRAMEBUFFER,K.COLOR_ATTACHMENT0,K.TEXTURE_2D,q,0),this.current=q,this.dirty=!1}},D}(di),fi=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferRenderbuffer(K.FRAMEBUFFER,K.DEPTH_ATTACHMENT,K.RENDERBUFFER,q),this.current=q,this.dirty=!1}},D}(di),Hi=function(D,J,q,K){this.context=D,this.width=J,this.height=q;var de=D.gl,ne=this.framebuffer=de.createFramebuffer();this.colorAttachment=new Jr(D,ne),K&&(this.depthAttachment=new fi(D,ne))};Hi.prototype.destroy=function(){var D=this.context.gl,J=this.colorAttachment.get();if(J&&D.deleteTexture(J),this.depthAttachment){var q=this.depthAttachment.get();q&&D.deleteRenderbuffer(q)}D.deleteFramebuffer(this.framebuffer)};var Pn=519,wn=function(D,J,q){this.func=D,this.mask=J,this.range=q};wn.ReadOnly=!1,wn.ReadWrite=!0,wn.disabled=new wn(Pn,wn.ReadOnly,[0,1]);var pn=519,Vn=7680,kn=function(D,J,q,K,de,ne){this.test=D,this.ref=J,this.mask=q,this.fail=K,this.depthFail=de,this.pass=ne};kn.disabled=new kn({func:pn,mask:0},0,0,Vn,Vn,Vn);var ea=0,ua=1,Vt=771,_t=function(D,J,q){this.blendFunction=D,this.blendColor=J,this.mask=q};_t.Replace=[ua,ea],_t.disabled=new _t(_t.Replace,i.Color.transparent,[!1,!1,!1,!1]),_t.unblended=new _t(_t.Replace,i.Color.transparent,[!0,!0,!0,!0]),_t.alphaBlended=new _t([ua,Vt],i.Color.transparent,[!0,!0,!0,!0]);var tr=1029,ar=2305,Er=function(D,J,q){this.enable=D,this.mode=J,this.frontFace=q};Er.disabled=new Er(!1,tr,ar),Er.backCCW=new Er(!0,tr,ar);var Zr=function(D){this.gl=D,this.extVertexArrayObject=this.gl.getExtension(\"OES_vertex_array_object\"),this.clearColor=new sr(this),this.clearDepth=new wr(this),this.clearStencil=new ur(this),this.colorMask=new Qe(this),this.depthMask=new Et(this),this.stencilMask=new er(this),this.stencilFunc=new Ut(this),this.stencilOp=new Ft(this),this.stencilTest=new bt(this),this.depthRange=new yt(this),this.depthTest=new Yt(this),this.depthFunc=new lr(this),this.blend=new Tr(this),this.blendFunc=new Rr(this),this.blendColor=new ei(this),this.blendEquation=new Wr(this),this.cullFace=new Ur(this),this.cullFaceSide=new dt(this),this.frontFace=new Ge(this),this.program=new Je(this),this.activeTexture=new je(this),this.viewport=new $e(this),this.bindFramebuffer=new wt(this),this.bindRenderbuffer=new Ie(this),this.bindTexture=new xe(this),this.bindVertexBuffer=new Ce(this),this.bindElementBuffer=new vt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new nr(this),this.pixelStoreUnpack=new ir(this),this.pixelStoreUnpackPremultiplyAlpha=new pr(this),this.pixelStoreUnpackFlipY=new oi(this),this.extTextureFilterAnisotropic=D.getExtension(\"EXT_texture_filter_anisotropic\")||D.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||D.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=D.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=D.getExtension(\"OES_texture_half_float\"),this.extTextureHalfFloat&&(D.getExtension(\"OES_texture_half_float_linear\"),this.extRenderToTextureHalfFloat=D.getExtension(\"EXT_color_buffer_half_float\")),this.extTimerQuery=D.getExtension(\"EXT_disjoint_timer_query\"),this.maxTextureSize=D.getParameter(D.MAX_TEXTURE_SIZE)};Zr.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Zr.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Zr.prototype.createIndexBuffer=function(D,J){return new lt(this,D,J)},Zr.prototype.createVertexBuffer=function(D,J,q){return new Nt(this,D,J,q)},Zr.prototype.createRenderbuffer=function(D,J,q){var K=this.gl,de=K.createRenderbuffer();return this.bindRenderbuffer.set(de),K.renderbufferStorage(K.RENDERBUFFER,D,J,q),this.bindRenderbuffer.set(null),de},Zr.prototype.createFramebuffer=function(D,J,q){return new Hi(this,D,J,q)},Zr.prototype.clear=function(D){var J=D.color,q=D.depth,K=this.gl,de=0;J&&(de|=K.COLOR_BUFFER_BIT,this.clearColor.set(J),this.colorMask.set([!0,!0,!0,!0])),typeof q!=\"undefined\"&&(de|=K.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(q),this.depthMask.set(!0)),K.clear(de)},Zr.prototype.setCullFace=function(D){D.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(D.mode),this.frontFace.set(D.frontFace))},Zr.prototype.setDepthMode=function(D){D.func===this.gl.ALWAYS&&!D.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(D.func),this.depthMask.set(D.mask),this.depthRange.set(D.range))},Zr.prototype.setStencilMode=function(D){D.test.func===this.gl.ALWAYS&&!D.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(D.mask),this.stencilOp.set([D.fail,D.depthFail,D.pass]),this.stencilFunc.set({func:D.test.func,ref:D.ref,mask:D.test.mask}))},Zr.prototype.setColorMode=function(D){i.deepEqual(D.blendFunction,_t.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(D.blendFunction),this.blendColor.set(D.blendColor)),this.colorMask.set(D.mask)},Zr.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ri=function(Y){function D(J,q,K){var de=this;Y.call(this),this.id=J,this.dispatcher=K,this.on(\"data\",function(ne){ne.dataType===\"source\"&&ne.sourceDataType===\"metadata\"&&(de._sourceLoaded=!0),de._sourceLoaded&&!de._paused&&ne.dataType===\"source\"&&ne.sourceDataType===\"content\"&&(de.reload(),de.transform&&de.update(de.transform))}),this.on(\"error\",function(){de._sourceErrored=!0}),this._source=Ae(J,q,K,this),this._tiles={},this._cache=new st(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new i.SourceFeatureState}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){this.map=q,this._maxTileCacheSize=q?q._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(q)},D.prototype.onRemove=function(q){this._source&&this._source.onRemove&&this._source.onRemove(q)},D.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var q in this._tiles){var K=this._tiles[q];if(K.state!==\"loaded\"&&K.state!==\"errored\")return!1}return!0},D.prototype.getSource=function(){return this._source},D.prototype.pause=function(){this._paused=!0},D.prototype.resume=function(){if(this._paused){var q=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,q&&this.reload(),this.transform&&this.update(this.transform)}},D.prototype._loadTile=function(q,K){return this._source.loadTile(q,K)},D.prototype._unloadTile=function(q){if(this._source.unloadTile)return this._source.unloadTile(q,function(){})},D.prototype._abortTile=function(q){if(this._source.abortTile)return this._source.abortTile(q,function(){})},D.prototype.serialize=function(){return this._source.serialize()},D.prototype.prepare=function(q){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var K in this._tiles){var de=this._tiles[K];de.upload(q),de.prepare(this.map.style.imageManager)}},D.prototype.getIds=function(){return i.values(this._tiles).map(function(q){return q.tileID}).sort($r).map(function(q){return q.key})},D.prototype.getRenderableIds=function(q){var K=this,de=[];for(var ne in this._tiles)this._isIdRenderable(ne,q)&&de.push(this._tiles[ne]);return q?de.sort(function(we,Ue){var ft=we.tileID,Zt=Ue.tileID,hr=new i.Point(ft.canonical.x,ft.canonical.y)._rotate(K.transform.angle),qt=new i.Point(Zt.canonical.x,Zt.canonical.y)._rotate(K.transform.angle);return ft.overscaledZ-Zt.overscaledZ||qt.y-hr.y||qt.x-hr.x}).map(function(we){return we.tileID.key}):de.map(function(we){return we.tileID}).sort($r).map(function(we){return we.key})},D.prototype.hasRenderableParent=function(q){var K=this.findLoadedParent(q,0);return K?this._isIdRenderable(K.tileID.key):!1},D.prototype._isIdRenderable=function(q,K){return this._tiles[q]&&this._tiles[q].hasData()&&!this._coveredTiles[q]&&(K||!this._tiles[q].holdingForFade())},D.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var q in this._tiles)this._tiles[q].state!==\"errored\"&&this._reloadTile(q,\"reloading\")},D.prototype._reloadTile=function(q,K){var de=this._tiles[q];de&&(de.state!==\"loading\"&&(de.state=K),this._loadTile(de,this._tileLoaded.bind(this,de,q,K)))},D.prototype._tileLoaded=function(q,K,de,ne){if(ne){q.state=\"errored\",ne.status!==404?this._source.fire(new i.ErrorEvent(ne,{tile:q})):this.update(this.transform);return}q.timeAdded=i.browser.now(),de===\"expired\"&&(q.refreshedUponExpiration=!0),this._setTileReloadTimer(K,q),this.getSource().type===\"raster-dem\"&&q.dem&&this._backfillDEM(q),this._state.initializeTileState(q,this.map?this.map.painter:null),this._source.fire(new i.Event(\"data\",{dataType:\"source\",tile:q,coord:q.tileID}))},D.prototype._backfillDEM=function(q){for(var K=this.getRenderableIds(),de=0;de<K.length;de++){var ne=K[de];if(q.neighboringTiles&&q.neighboringTiles[ne]){var we=this.getTileByID(ne);Ue(q,we),Ue(we,q)}}function Ue(ft,Zt){ft.needsHillshadePrepare=!0;var hr=Zt.tileID.canonical.x-ft.tileID.canonical.x,qt=Zt.tileID.canonical.y-ft.tileID.canonical.y,Ve=Math.pow(2,ft.tileID.canonical.z),et=Zt.tileID.key;hr===0&&qt===0||Math.abs(qt)>1||(Math.abs(hr)>1&&(Math.abs(hr+Ve)===1?hr+=Ve:Math.abs(hr-Ve)===1&&(hr-=Ve)),!(!Zt.dem||!ft.dem)&&(ft.dem.backfillBorder(Zt.dem,hr,qt),ft.neighboringTiles&&ft.neighboringTiles[et]&&(ft.neighboringTiles[et].backfilled=!0)))}},D.prototype.getTile=function(q){return this.getTileByID(q.key)},D.prototype.getTileByID=function(q){return this._tiles[q]},D.prototype._retainLoadedChildren=function(q,K,de,ne){for(var we in this._tiles){var Ue=this._tiles[we];if(!(ne[we]||!Ue.hasData()||Ue.tileID.overscaledZ<=K||Ue.tileID.overscaledZ>de)){for(var ft=Ue.tileID;Ue&&Ue.tileID.overscaledZ>K+1;){var Zt=Ue.tileID.scaledTo(Ue.tileID.overscaledZ-1);Ue=this._tiles[Zt.key],Ue&&Ue.hasData()&&(ft=Zt)}for(var hr=ft;hr.overscaledZ>K;)if(hr=hr.scaledTo(hr.overscaledZ-1),q[hr.key]){ne[ft.key]=ft;break}}}},D.prototype.findLoadedParent=function(q,K){if(q.key in this._loadedParentTiles){var de=this._loadedParentTiles[q.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=q.overscaledZ-1;ne>=K;ne--){var we=q.scaledTo(ne),Ue=this._getLoadedTile(we);if(Ue)return Ue}},D.prototype._getLoadedTile=function(q){var K=this._tiles[q.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(q.wrapped().key);return de},D.prototype.updateCacheSize=function(q){var K=Math.ceil(q.width/this._source.tileSize)+1,de=Math.ceil(q.height/this._source.tileSize)+1,ne=K*de,we=5,Ue=Math.floor(ne*we),ft=typeof this._maxTileCacheSize==\"number\"?Math.min(this._maxTileCacheSize,Ue):Ue;this._cache.setMaxSize(ft)},D.prototype.handleWrapJump=function(q){var K=this._prevLng===void 0?q:this._prevLng,de=q-K,ne=de/360,we=Math.round(ne);if(this._prevLng=q,we){var Ue={};for(var ft in this._tiles){var Zt=this._tiles[ft];Zt.tileID=Zt.tileID.unwrapTo(Zt.tileID.wrap+we),Ue[Zt.tileID.key]=Zt}this._tiles=Ue;for(var hr in this._timers)clearTimeout(this._timers[hr]),delete this._timers[hr];for(var qt in this._tiles){var Ve=this._tiles[qt];this._setTileReloadTimer(qt,Ve)}}},D.prototype.update=function(q){var K=this;if(this.transform=q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Nr){return new i.OverscaledTileID(Nr.canonical.z,Nr.wrap,Nr.canonical.z,Nr.canonical.x,Nr.canonical.y)}):(de=q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Nr){return K._source.hasTile(Nr)}))):de=[];var ne=q.coveringZoomLevel(this._source),we=Math.max(ne-D.maxOverzooming,this._source.minzoom),Ue=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ft=this._updateRetainedTiles(de,ne);if(zi(this._source.type)){for(var Zt={},hr={},qt=Object.keys(ft),Ve=0,et=qt;Ve<et.length;Ve+=1){var at=et[Ve],kt=ft[at],Ot=this._tiles[at];if(!(!Ot||Ot.fadeEndTime&&Ot.fadeEndTime<=i.browser.now())){var It=this.findLoadedParent(kt,we);It&&(this._addTile(It.tileID),Zt[It.tileID.key]=It.tileID),hr[at]=kt}}this._retainLoadedChildren(hr,ne,Ue,ft);for(var Bt in Zt)ft[Bt]||(this._coveredTiles[Bt]=!0,ft[Bt]=Zt[Bt])}for(var Rt in ft)this._tiles[Rt].clearFadeHold();for(var mt=i.keysDifference(this._tiles,ft),Pt=0,ht=mt;Pt<ht.length;Pt+=1){var cr=ht[Pt],br=this._tiles[cr];br.hasSymbolBuckets&&!br.holdingForFade()?br.setHoldDuration(this.map._fadeDuration):(!br.hasSymbolBuckets||br.symbolFadeFinished())&&this._removeTile(cr)}this._updateLoadedParentTileCache()}},D.prototype.releaseSymbolFadeTiles=function(){for(var q in this._tiles)this._tiles[q].holdingForFade()&&this._removeTile(q)},D.prototype._updateRetainedTiles=function(q,K){for(var de={},ne={},we=Math.max(K-D.maxOverzooming,this._source.minzoom),Ue=Math.max(K+D.maxUnderzooming,this._source.minzoom),ft={},Zt=0,hr=q;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=this._addTile(qt);de[qt.key]=qt,!Ve.hasData()&&K<this._source.maxzoom&&(ft[qt.key]=qt)}this._retainLoadedChildren(ft,K,Ue,de);for(var et=0,at=q;et<at.length;et+=1){var kt=at[et],Ot=this._tiles[kt.key];if(!Ot.hasData()){if(K+1>this._source.maxzoom){var It=kt.children(this._source.maxzoom)[0],Bt=this.getTile(It);if(Bt&&Bt.hasData()){de[It.key]=It;continue}}else{var Rt=kt.children(this._source.maxzoom);if(de[Rt[0].key]&&de[Rt[1].key]&&de[Rt[2].key]&&de[Rt[3].key])continue}for(var mt=Ot.wasRequested(),Pt=kt.overscaledZ-1;Pt>=we;--Pt){var ht=kt.scaledTo(Pt);if(ne[ht.key]||(ne[ht.key]=!0,Ot=this.getTile(ht),!Ot&&mt&&(Ot=this._addTile(ht)),Ot&&(de[ht.key]=ht,mt=Ot.wasRequested(),Ot.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var q in this._tiles){for(var K=[],de=void 0,ne=this._tiles[q].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var we=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(we),de)break;ne=we}for(var Ue=0,ft=K;Ue<ft.length;Ue+=1){var Zt=ft[Ue];this._loadedParentTiles[Zt]=de}}},D.prototype._addTile=function(q){var K=this._tiles[q.key];if(K)return K;K=this._cache.getAndRemove(q),K&&(this._setTileReloadTimer(q.key,K),K.tileID=q,this._state.initializeTileState(K,this.map?this.map.painter:null),this._cacheTimers[q.key]&&(clearTimeout(this._cacheTimers[q.key]),delete this._cacheTimers[q.key],this._setTileReloadTimer(q.key,K)));var de=!!K;return de||(K=new i.Tile(q,this._source.tileSize*q.overscaleFactor()),this._loadTile(K,this._tileLoaded.bind(this,K,q.key,K.state))),K?(K.uses++,this._tiles[q.key]=K,de||this._source.fire(new i.Event(\"dataloading\",{tile:K,coord:K.tileID,dataType:\"source\"})),K):null},D.prototype._setTileReloadTimer=function(q,K){var de=this;q in this._timers&&(clearTimeout(this._timers[q]),delete this._timers[q]);var ne=K.getExpiryTimeout();ne&&(this._timers[q]=setTimeout(function(){de._reloadTile(q,\"expired\"),delete de._timers[q]},ne))},D.prototype._removeTile=function(q){var K=this._tiles[q];K&&(K.uses--,delete this._tiles[q],this._timers[q]&&(clearTimeout(this._timers[q]),delete this._timers[q]),!(K.uses>0)&&(K.hasData()&&K.state!==\"reloading\"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var q in this._tiles)this._removeTile(q);this._cache.reset()},D.prototype.tilesIn=function(q,K,de){var ne=this,we=[],Ue=this.transform;if(!Ue)return we;for(var ft=de?Ue.getCameraQueryGeometry(q):q,Zt=q.map(function(Pt){return Ue.pointCoordinate(Pt)}),hr=ft.map(function(Pt){return Ue.pointCoordinate(Pt)}),qt=this.getIds(),Ve=1/0,et=1/0,at=-1/0,kt=-1/0,Ot=0,It=hr;Ot<It.length;Ot+=1){var Bt=It[Ot];Ve=Math.min(Ve,Bt.x),et=Math.min(et,Bt.y),at=Math.max(at,Bt.x),kt=Math.max(kt,Bt.y)}for(var Rt=function(Pt){var ht=ne._tiles[qt[Pt]];if(!ht.holdingForFade()){var cr=ht.tileID,br=Math.pow(2,Ue.zoom-ht.tileID.overscaledZ),Nr=K*ht.queryPadding*i.EXTENT/ht.tileSize/br,Ri=[cr.getTilePoint(new i.MercatorCoordinate(Ve,et)),cr.getTilePoint(new i.MercatorCoordinate(at,kt))];if(Ri[0].x-Nr<i.EXTENT&&Ri[0].y-Nr<i.EXTENT&&Ri[1].x+Nr>=0&&Ri[1].y+Nr>=0){var hi=Zt.map(function(gn){return cr.getTilePoint(gn)}),wi=hr.map(function(gn){return cr.getTilePoint(gn)});we.push({tile:ht,tileID:cr,queryGeometry:hi,cameraQueryGeometry:wi,scale:br})}}},mt=0;mt<qt.length;mt++)Rt(mt);return we},D.prototype.getVisibleCoordinates=function(q){for(var K=this,de=this.getRenderableIds(q).map(function(ft){return K._tiles[ft].tileID}),ne=0,we=de;ne<we.length;ne+=1){var Ue=we[ne];Ue.posMatrix=this.transform.calculatePosMatrix(Ue.toUnwrapped())}return de},D.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(zi(this._source.type))for(var q in this._tiles){var K=this._tiles[q];if(K.fadeEndTime!==void 0&&K.fadeEndTime>=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(q,K,de){q=q||\"_geojsonTileLayer\",this._state.updateState(q,K,de)},D.prototype.removeFeatureState=function(q,K,de){q=q||\"_geojsonTileLayer\",this._state.removeFeatureState(q,K,de)},D.prototype.getFeatureState=function(q,K){return q=q||\"_geojsonTileLayer\",this._state.getState(q,K)},D.prototype.setDependencies=function(q,K,de){var ne=this._tiles[q];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(q,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(q,K)&&this._reloadTile(de,\"reloading\")}this._cache.filter(function(we){return!we.hasDependency(q,K)})},D}(i.Evented);ri.maxOverzooming=10,ri.maxUnderzooming=3;function $r(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),q=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||q-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function zi(Y){return Y===\"raster\"||Y===\"image\"||Y===\"video\"}function Ji(){return new i.window.Worker(io.workerUrl)}var en=\"mapboxgl_preloaded_worker_pool\",cn=function(){this.active={}};cn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length<cn.workerCount;)this.workers.push(new Ji);return this.active[D]=!0,this.workers.slice()},cn.prototype.release=function(D){delete this.active[D],this.numActive()===0&&(this.workers.forEach(function(J){J.terminate()}),this.workers=null)},cn.prototype.isPreloaded=function(){return!!this.active[en]},cn.prototype.numActive=function(){return Object.keys(this.active).length};var yn=Math.floor(i.browser.hardwareConcurrency/2);cn.workerCount=Math.max(Math.min(yn,6),1);var Mn;function Ba(){return Mn||(Mn=new cn),Mn}function la(){var Y=Ba();Y.acquire(en)}function ma(){var Y=Mn;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(en),Mn=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))}function Wa(Y,D){var J={};for(var q in Y)q!==\"ref\"&&(J[q]=Y[q]);return i.refProperties.forEach(function(K){K in D&&(J[K]=D[K])}),J}function Fa(Y){Y=Y.slice();for(var D=Object.create(null),J=0;J<Y.length;J++)D[Y[J].id]=Y[J];for(var q=0;q<Y.length;q++)\"ref\"in Y[q]&&(Y[q]=Wa(Y[q],D[Y[q].ref]));return Y}function Wo(){var Y={},D=i.styleSpec.$version;for(var J in i.styleSpec.$root){var q=i.styleSpec.$root[J];if(q.required){var K=null;J===\"version\"?K=D:q.type===\"array\"?K=[]:K={},K!=null&&(Y[J]=K)}}return Y}var da={setStyle:\"setStyle\",addLayer:\"addLayer\",removeLayer:\"removeLayer\",setPaintProperty:\"setPaintProperty\",setLayoutProperty:\"setLayoutProperty\",setFilter:\"setFilter\",addSource:\"addSource\",removeSource:\"removeSource\",setGeoJSONSourceData:\"setGeoJSONSourceData\",setLayerZoomRange:\"setLayerZoomRange\",setLayerProperty:\"setLayerProperty\",setCenter:\"setCenter\",setZoom:\"setZoom\",setBearing:\"setBearing\",setPitch:\"setPitch\",setSprite:\"setSprite\",setGlyphs:\"setGlyphs\",setTransition:\"setTransition\",setLight:\"setLight\"};function Wn(Y,D,J){J.push({command:da.addSource,args:[Y,D[Y]]})}function Ga(Y,D,J){D.push({command:da.removeSource,args:[Y]}),J[Y]=!0}function vo(Y,D,J,q){Ga(Y,J,q),Wn(Y,D,J)}function jn(Y,D,J){var q;for(q in Y[J])if(Y[J].hasOwnProperty(q)&&q!==\"data\"&&!i.deepEqual(Y[J][q],D[J][q]))return!1;for(q in D[J])if(D[J].hasOwnProperty(q)&&q!==\"data\"&&!i.deepEqual(Y[J][q],D[J][q]))return!1;return!0}function St(Y,D,J,q){Y=Y||{},D=D||{};var K;for(K in Y)Y.hasOwnProperty(K)&&(D.hasOwnProperty(K)||Ga(K,J,q));for(K in D)D.hasOwnProperty(K)&&(Y.hasOwnProperty(K)?i.deepEqual(Y[K],D[K])||(Y[K].type===\"geojson\"&&D[K].type===\"geojson\"&&jn(Y,D,K)?J.push({command:da.setGeoJSONSourceData,args:[K,D[K].data]}):vo(K,D,J,q)):Wn(K,D,J))}function Cr(Y,D,J,q,K,de){Y=Y||{},D=D||{};var ne;for(ne in Y)Y.hasOwnProperty(ne)&&(i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[q,ne,D[ne],K]}));for(ne in D)!D.hasOwnProperty(ne)||Y.hasOwnProperty(ne)||i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[q,ne,D[ne],K]})}function Qr(Y){return Y.id}function pi(Y,D){return Y[D.id]=D,Y}function fn(Y,D,J){Y=Y||[],D=D||[];var q=Y.map(Qr),K=D.map(Qr),de=Y.reduce(pi,{}),ne=D.reduce(pi,{}),we=q.slice(),Ue=Object.create(null),ft,Zt,hr,qt,Ve,et,at;for(ft=0,Zt=0;ft<q.length;ft++)hr=q[ft],ne.hasOwnProperty(hr)?Zt++:(J.push({command:da.removeLayer,args:[hr]}),we.splice(we.indexOf(hr,Zt),1));for(ft=0,Zt=0;ft<K.length;ft++)hr=K[K.length-1-ft],we[we.length-1-ft]!==hr&&(de.hasOwnProperty(hr)?(J.push({command:da.removeLayer,args:[hr]}),we.splice(we.lastIndexOf(hr,we.length-Zt),1)):Zt++,et=we[we.length-ft],J.push({command:da.addLayer,args:[ne[hr],et]}),we.splice(we.length-ft,0,hr),Ue[hr]=!0);for(ft=0;ft<K.length;ft++)if(hr=K[ft],qt=de[hr],Ve=ne[hr],!(Ue[hr]||i.deepEqual(qt,Ve))){if(!i.deepEqual(qt.source,Ve.source)||!i.deepEqual(qt[\"source-layer\"],Ve[\"source-layer\"])||!i.deepEqual(qt.type,Ve.type)){J.push({command:da.removeLayer,args:[hr]}),et=we[we.lastIndexOf(hr)+1],J.push({command:da.addLayer,args:[Ve,et]});continue}Cr(qt.layout,Ve.layout,J,hr,null,da.setLayoutProperty),Cr(qt.paint,Ve.paint,J,hr,null,da.setPaintProperty),i.deepEqual(qt.filter,Ve.filter)||J.push({command:da.setFilter,args:[hr,Ve.filter]}),(!i.deepEqual(qt.minzoom,Ve.minzoom)||!i.deepEqual(qt.maxzoom,Ve.maxzoom))&&J.push({command:da.setLayerZoomRange,args:[hr,Ve.minzoom,Ve.maxzoom]});for(at in qt)qt.hasOwnProperty(at)&&(at===\"layout\"||at===\"paint\"||at===\"filter\"||at===\"metadata\"||at===\"minzoom\"||at===\"maxzoom\"||(at.indexOf(\"paint.\")===0?Cr(qt[at],Ve[at],J,hr,at.slice(6),da.setPaintProperty):i.deepEqual(qt[at],Ve[at])||J.push({command:da.setLayerProperty,args:[hr,at,Ve[at]]})));for(at in Ve)!Ve.hasOwnProperty(at)||qt.hasOwnProperty(at)||at===\"layout\"||at===\"paint\"||at===\"filter\"||at===\"metadata\"||at===\"minzoom\"||at===\"maxzoom\"||(at.indexOf(\"paint.\")===0?Cr(qt[at],Ve[at],J,hr,at.slice(6),da.setPaintProperty):i.deepEqual(qt[at],Ve[at])||J.push({command:da.setLayerProperty,args:[hr,at,Ve[at]]}))}}function Sn(Y,D){if(!Y)return[{command:da.setStyle,args:[D]}];var J=[];try{if(!i.deepEqual(Y.version,D.version))return[{command:da.setStyle,args:[D]}];i.deepEqual(Y.center,D.center)||J.push({command:da.setCenter,args:[D.center]}),i.deepEqual(Y.zoom,D.zoom)||J.push({command:da.setZoom,args:[D.zoom]}),i.deepEqual(Y.bearing,D.bearing)||J.push({command:da.setBearing,args:[D.bearing]}),i.deepEqual(Y.pitch,D.pitch)||J.push({command:da.setPitch,args:[D.pitch]}),i.deepEqual(Y.sprite,D.sprite)||J.push({command:da.setSprite,args:[D.sprite]}),i.deepEqual(Y.glyphs,D.glyphs)||J.push({command:da.setGlyphs,args:[D.glyphs]}),i.deepEqual(Y.transition,D.transition)||J.push({command:da.setTransition,args:[D.transition]}),i.deepEqual(Y.light,D.light)||J.push({command:da.setLight,args:[D.light]});var q={},K=[];St(Y.sources,D.sources,K,q);var de=[];Y.layers&&Y.layers.forEach(function(ne){q[ne.source]?J.push({command:da.removeLayer,args:[ne.id]}):de.push(ne)}),J=J.concat(K),fn(de,D.layers,J)}catch(ne){console.warn(\"Unable to compute style diff:\",ne),J=[{command:da.setStyle,args:[D]}]}return J}var En=function(D,J){this.reset(D,J)};En.prototype.reset=function(D,J){this.points=D||[],this._distances=[0];for(var q=1;q<this.points.length;q++)this._distances[q]=this._distances[q-1]+this.points[q].dist(this.points[q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(J||0,this.length*.5),this.paddedLength=this.length-this.padding*2},En.prototype.lerp=function(D){if(this.points.length===1)return this.points[0];D=i.clamp(D,0,1);for(var J=1,q=this._distances[J],K=D*this.paddedLength+this.padding;q<K&&J<this._distances.length;)q=this._distances[++J];var de=J-1,ne=this._distances[de],we=q-ne,Ue=we>0?(K-ne)/we:0;return this.points[de].mult(1-Ue).add(this.points[J].mult(Ue))};var ki=function(D,J,q){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/q),this.yCellCount=Math.ceil(J/q);for(var ne=0;ne<this.xCellCount*this.yCellCount;ne++)K.push([]),de.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=D,this.height=J,this.xScale=this.xCellCount/D,this.yScale=this.yCellCount/J,this.boxUid=0,this.circleUid=0};ki.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ki.prototype.insert=function(D,J,q,K,de){this._forEachCell(J,q,K,de,this._insertBoxCell,this.boxUid++),this.boxKeys.push(D),this.bboxes.push(J),this.bboxes.push(q),this.bboxes.push(K),this.bboxes.push(de)},ki.prototype.insertCircle=function(D,J,q,K){this._forEachCell(J-K,q-K,J+K,q+K,this._insertCircleCell,this.circleUid++),this.circleKeys.push(D),this.circles.push(J),this.circles.push(q),this.circles.push(K)},ki.prototype._insertBoxCell=function(D,J,q,K,de,ne){this.boxCells[de].push(ne)},ki.prototype._insertCircleCell=function(D,J,q,K,de,ne){this.circleCells[de].push(ne)},ki.prototype._query=function(D,J,q,K,de,ne){if(q<0||D>this.width||K<0||J>this.height)return de?!1:[];var we=[];if(D<=0&&J<=0&&this.width<=q&&this.height<=K){if(de)return!0;for(var Ue=0;Ue<this.boxKeys.length;Ue++)we.push({key:this.boxKeys[Ue],x1:this.bboxes[Ue*4],y1:this.bboxes[Ue*4+1],x2:this.bboxes[Ue*4+2],y2:this.bboxes[Ue*4+3]});for(var ft=0;ft<this.circleKeys.length;ft++){var Zt=this.circles[ft*3],hr=this.circles[ft*3+1],qt=this.circles[ft*3+2];we.push({key:this.circleKeys[ft],x1:Zt-qt,y1:hr-qt,x2:Zt+qt,y2:hr+qt})}return ne?we.filter(ne):we}else{var Ve={hitTest:de,seenUids:{box:{},circle:{}}};return this._forEachCell(D,J,q,K,this._queryCell,we,Ve,ne),de?we.length>0:we}},ki.prototype._queryCircle=function(D,J,q,K,de){var ne=D-q,we=D+q,Ue=J-q,ft=J+q;if(we<0||ne>this.width||ft<0||Ue>this.height)return K?!1:[];var Zt=[],hr={hitTest:K,circle:{x:D,y:J,radius:q},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Ue,we,ft,this._queryCellCircle,Zt,hr,de),K?Zt.length>0:Zt},ki.prototype.query=function(D,J,q,K,de){return this._query(D,J,q,K,!1,de)},ki.prototype.hitTest=function(D,J,q,K,de){return this._query(D,J,q,K,!0,de)},ki.prototype.hitTestCircle=function(D,J,q,K){return this._queryCircle(D,J,q,!0,K)},ki.prototype._queryCell=function(D,J,q,K,de,ne,we,Ue){var ft=we.seenUids,Zt=this.boxCells[de];if(Zt!==null)for(var hr=this.bboxes,qt=0,Ve=Zt;qt<Ve.length;qt+=1){var et=Ve[qt];if(!ft.box[et]){ft.box[et]=!0;var at=et*4;if(D<=hr[at+2]&&J<=hr[at+3]&&q>=hr[at+0]&&K>=hr[at+1]&&(!Ue||Ue(this.boxKeys[et]))){if(we.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[et],x1:hr[at],y1:hr[at+1],x2:hr[at+2],y2:hr[at+3]})}}}var kt=this.circleCells[de];if(kt!==null)for(var Ot=this.circles,It=0,Bt=kt;It<Bt.length;It+=1){var Rt=Bt[It];if(!ft.circle[Rt]){ft.circle[Rt]=!0;var mt=Rt*3;if(this._circleAndRectCollide(Ot[mt],Ot[mt+1],Ot[mt+2],D,J,q,K)&&(!Ue||Ue(this.circleKeys[Rt]))){if(we.hitTest)return ne.push(!0),!0;var Pt=Ot[mt],ht=Ot[mt+1],cr=Ot[mt+2];ne.push({key:this.circleKeys[Rt],x1:Pt-cr,y1:ht-cr,x2:Pt+cr,y2:ht+cr})}}}},ki.prototype._queryCellCircle=function(D,J,q,K,de,ne,we,Ue){var ft=we.circle,Zt=we.seenUids,hr=this.boxCells[de];if(hr!==null)for(var qt=this.bboxes,Ve=0,et=hr;Ve<et.length;Ve+=1){var at=et[Ve];if(!Zt.box[at]){Zt.box[at]=!0;var kt=at*4;if(this._circleAndRectCollide(ft.x,ft.y,ft.radius,qt[kt+0],qt[kt+1],qt[kt+2],qt[kt+3])&&(!Ue||Ue(this.boxKeys[at])))return ne.push(!0),!0}}var Ot=this.circleCells[de];if(Ot!==null)for(var It=this.circles,Bt=0,Rt=Ot;Bt<Rt.length;Bt+=1){var mt=Rt[Bt];if(!Zt.circle[mt]){Zt.circle[mt]=!0;var Pt=mt*3;if(this._circlesCollide(It[Pt],It[Pt+1],It[Pt+2],ft.x,ft.y,ft.radius)&&(!Ue||Ue(this.circleKeys[mt])))return ne.push(!0),!0}}},ki.prototype._forEachCell=function(D,J,q,K,de,ne,we,Ue){for(var ft=this._convertToXCellCoord(D),Zt=this._convertToYCellCoord(J),hr=this._convertToXCellCoord(q),qt=this._convertToYCellCoord(K),Ve=ft;Ve<=hr;Ve++)for(var et=Zt;et<=qt;et++){var at=this.xCellCount*et+Ve;if(de.call(this,D,J,q,K,at,ne,we,Ue))return}},ki.prototype._convertToXCellCoord=function(D){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(D*this.xScale)))},ki.prototype._convertToYCellCoord=function(D){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(D*this.yScale)))},ki.prototype._circlesCollide=function(D,J,q,K,de,ne){var we=K-D,Ue=de-J,ft=q+ne;return ft*ft>we*we+Ue*Ue},ki.prototype._circleAndRectCollide=function(D,J,q,K,de,ne,we){var Ue=(ne-K)/2,ft=Math.abs(D-(K+Ue));if(ft>Ue+q)return!1;var Zt=(we-de)/2,hr=Math.abs(J-(de+Zt));if(hr>Zt+q)return!1;if(ft<=Ue||hr<=Zt)return!0;var qt=ft-Ue,Ve=hr-Zt;return qt*qt+Ve*Ve<=q*q};function _n(Y,D,J,q,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,q.angle)):i.multiply(de,q.labelPlaneMatrix,Y),de}function ya(Y,D,J,q,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-q.angle),de}else return q.glCoordMatrix}function Jn(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var q=J[3];return{point:new i.Point(J[0]/q,J[1]/q),signedDistanceFromCamera:q}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],q=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&q>=-D[1]&&q<=D[1];return K}function No(Y,D,J,q,K,de,ne,we){var Ue=q?Y.textSizeData:Y.iconSizeData,ft=i.evaluateSizeForZoom(Ue,J.transform.zoom),Zt=[256/J.width*2+1,256/J.height*2+1],hr=q?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;hr.clear();for(var qt=Y.lineVertexArray,Ve=q?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,et=J.transform.width/J.transform.height,at=!1,kt=0;kt<Ve.length;kt++){var Ot=Ve.get(kt);if(Ot.hidden||Ot.writingMode===i.WritingMode.vertical&&!at){cl(Ot.numGlyphs,hr);continue}at=!1;var It=[Ot.anchorX,Ot.anchorY,0,1];if(i.transformMat4(It,It,D),!_o(It,Zt)){cl(Ot.numGlyphs,hr);continue}var Bt=It[3],Rt=Ma(J.transform.cameraToCenterDistance,Bt),mt=i.evaluateSizeForFeature(Ue,ft,Ot),Pt=ne?mt/Rt:mt*Rt,ht=new i.Point(Ot.anchorX,Ot.anchorY),cr=Jn(ht,K).point,br={},Nr=Co(Ot,Pt,!1,we,D,K,de,Y.glyphOffsetArray,qt,hr,cr,ht,br,et);at=Nr.useVertical,(Nr.notEnoughRoom||at||Nr.needsFlipping&&Co(Ot,Pt,!0,we,D,K,de,Y.glyphOffsetArray,qt,hr,cr,ht,br,et).notEnoughRoom)&&cl(Ot.numGlyphs,hr)}q?Y.text.dynamicLayoutVertexBuffer.updateData(hr):Y.icon.dynamicLayoutVertexBuffer.updateData(hr)}function po(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=we.glyphStartIndex+we.numGlyphs,qt=we.lineStartIndex,Ve=we.lineStartIndex+we.lineLength,et=D.getoffsetX(we.glyphStartIndex),at=D.getoffsetX(hr-1),kt=zs(Y*et,J,q,K,de,ne,we.segment,qt,Ve,Ue,ft,Zt);if(!kt)return null;var Ot=zs(Y*at,J,q,K,de,ne,we.segment,qt,Ve,Ue,ft,Zt);return Ot?{first:kt,last:Ot}:null}function Lo(Y,D,J,q){if(Y===i.WritingMode.horizontal){var K=Math.abs(J.y-D.y),de=Math.abs(J.x-D.x)*q;if(K>de)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.y<J.y:D.x>J.x)?{needsFlipping:!0}:null}function Co(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve){var et=D/24,at=Y.lineOffsetX*et,kt=Y.lineOffsetY*et,Ot;if(Y.numGlyphs>1){var It=Y.glyphStartIndex+Y.numGlyphs,Bt=Y.lineStartIndex,Rt=Y.lineStartIndex+Y.lineLength,mt=po(et,we,at,kt,J,Zt,hr,Y,Ue,de,qt);if(!mt)return{notEnoughRoom:!0};var Pt=Jn(mt.first.point,ne).point,ht=Jn(mt.last.point,ne).point;if(q&&!J){var cr=Lo(Y.writingMode,Pt,ht,Ve);if(cr)return cr}Ot=[mt.first];for(var br=Y.glyphStartIndex+1;br<It-1;br++)Ot.push(zs(et*we.getoffsetX(br),at,kt,J,Zt,hr,Y.segment,Bt,Rt,Ue,de,qt));Ot.push(mt.last)}else{if(q&&!J){var Nr=Jn(hr,K).point,Ri=Y.lineStartIndex+Y.segment+1,hi=new i.Point(Ue.getx(Ri),Ue.gety(Ri)),wi=Jn(hi,K),gn=wi.signedDistanceFromCamera>0?wi.point:Fs(hr,hi,Nr,1,K),tn=Lo(Y.writingMode,Nr,gn,Ve);if(tn)return tn}var Ci=zs(et*we.getoffsetX(Y.glyphStartIndex),at,kt,J,Zt,hr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Ue,de,qt);if(!Ci)return{notEnoughRoom:!0};Ot=[Ci]}for(var qi=0,Vi=Ot;qi<Vi.length;qi+=1){var on=Vi[qi];i.addDynamicAttributes(ft,on.point,on.angle)}return{}}function Fs(Y,D,J,q,K){var de=Jn(Y.add(Y.sub(D)._unit()),K).point,ne=J.sub(de);return J.add(ne._mult(q/ne.mag()))}function zs(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr){var qt=q?Y-D:Y+D,Ve=qt>0?1:-1,et=0;q&&(Ve*=-1,et=Math.PI),Ve<0&&(et+=Math.PI);for(var at=Ve>0?we+ne:we+ne+1,kt=K,Ot=K,It=0,Bt=0,Rt=Math.abs(qt),mt=[];It+Bt<=Rt;){if(at+=Ve,at<we||at>=Ue)return null;if(Ot=kt,mt.push(kt),kt=hr[at],kt===void 0){var Pt=new i.Point(ft.getx(at),ft.gety(at)),ht=Jn(Pt,Zt);if(ht.signedDistanceFromCamera>0)kt=hr[at]=ht.point;else{var cr=at-Ve,br=It===0?de:new i.Point(ft.getx(cr),ft.gety(cr));kt=Fs(br,Pt,Ot,Rt-It+1,Zt)}}It+=Bt,Bt=Ot.dist(kt)}var Nr=(Rt-It)/Bt,Ri=kt.sub(Ot),hi=Ri.mult(Nr)._add(Ot);hi._add(Ri._unit()._perp()._mult(J*Ve));var wi=et+Math.atan2(kt.y-Ot.y,kt.x-Ot.x);return mt.push(hi),{point:hi,angle:wi,path:mt}}var ul=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function cl(Y,D){for(var J=0;J<Y;J++){var q=D.length;D.resize(q+4),D.float32.set(ul,q*3)}}function zl(Y,D,J){var q=D[0],K=D[1];return Y[0]=J[0]*q+J[4]*K+J[12],Y[1]=J[1]*q+J[5]*K+J[13],Y[3]=J[3]*q+J[7]*K+J[15],Y}var cs=100,nl=function(D,J,q){J===void 0&&(J=new ki(D.width+2*cs,D.height+2*cs,25)),q===void 0&&(q=new ki(D.width+2*cs,D.height+2*cs,25)),this.transform=D,this.grid=J,this.ignoredGrid=q,this.pitchfactor=Math.cos(D._pitch)*D.cameraToCenterDistance,this.screenRightBoundary=D.width+cs,this.screenBottomBoundary=D.height+cs,this.gridRightBoundary=D.width+2*cs,this.gridBottomBoundary=D.height+2*cs};nl.prototype.placeCollisionBox=function(D,J,q,K,de){var ne=this.projectAndGetPerspectiveRatio(K,D.anchorPointX,D.anchorPointY),we=q*ne.perspectiveRatio,Ue=D.x1*we+ne.point.x,ft=D.y1*we+ne.point.y,Zt=D.x2*we+ne.point.x,hr=D.y2*we+ne.point.y;return!this.isInsideGrid(Ue,ft,Zt,hr)||!J&&this.grid.hitTest(Ue,ft,Zt,hr,de)?{box:[],offscreen:!1}:{box:[Ue,ft,Zt,hr],offscreen:this.isOffscreen(Ue,ft,Zt,hr)}},nl.prototype.placeCollisionCircles=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve){var et=[],at=new i.Point(J.anchorX,J.anchorY),kt=Jn(at,ne),Ot=Ma(this.transform.cameraToCenterDistance,kt.signedDistanceFromCamera),It=Zt?de/Ot:de*Ot,Bt=It/i.ONE_EM,Rt=Jn(at,we).point,mt={},Pt=J.lineOffsetX*Bt,ht=J.lineOffsetY*Bt,cr=po(Bt,K,Pt,ht,!1,Rt,at,J,q,we,mt),br=!1,Nr=!1,Ri=!0;if(cr){for(var hi=qt*.5*Ot+Ve,wi=new i.Point(-cs,-cs),gn=new i.Point(this.screenRightBoundary,this.screenBottomBoundary),tn=new En,Ci=cr.first,qi=cr.last,Vi=[],on=Ci.path.length-1;on>=1;on--)Vi.push(Ci.path[on]);for(var On=1;On<qi.path.length;On++)Vi.push(qi.path[On]);var Ja=hi*2.5;if(Ue){var co=Vi.map(function(Pv){return Jn(Pv,Ue)});co.some(function(Pv){return Pv.signedDistanceFromCamera<=0})?Vi=[]:Vi=co.map(function(Pv){return Pv.point})}var rs=[];if(Vi.length>0){for(var so=Vi[0].clone(),Zo=Vi[0].clone(),ys=1;ys<Vi.length;ys++)so.x=Math.min(so.x,Vi[ys].x),so.y=Math.min(so.y,Vi[ys].y),Zo.x=Math.max(Zo.x,Vi[ys].x),Zo.y=Math.max(Zo.y,Vi[ys].y);so.x>=wi.x&&Zo.x<=gn.x&&so.y>=wi.y&&Zo.y<=gn.y?rs=[Vi]:Zo.x<wi.x||so.x>gn.x||Zo.y<wi.y||so.y>gn.y?rs=[]:rs=i.clipLine([Vi],wi.x,wi.y,gn.x,gn.y)}for(var ou=0,Cv=rs;ou<Cv.length;ou+=1){var kv=Cv[ou];tn.reset(kv,hi*.25);var wd=0;tn.length<=.5*hi?wd=1:wd=Math.ceil(tn.paddedLength/Ja)+1;for(var Yv=0;Yv<wd;Yv++){var cg=Yv/Math.max(wd-1,1),dp=tn.lerp(cg),Td=dp.x+cs,vp=dp.y+cs;et.push(Td,vp,hi,0);var Vd=Td-hi,Ad=vp-hi,Lv=Td+hi,Kv=vp+hi;if(Ri=Ri&&this.isOffscreen(Vd,Ad,Lv,Kv),Nr=Nr||this.isInsideGrid(Vd,Ad,Lv,Kv),!D&&this.grid.hitTestCircle(Td,vp,hi,hr)&&(br=!0,!ft))return{circles:[],offscreen:!1,collisionDetected:br}}}}return{circles:!ft&&br||!Nr?[]:et,offscreen:Ri,collisionDetected:br}},nl.prototype.queryRenderedSymbols=function(D){if(D.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var J=[],q=1/0,K=1/0,de=-1/0,ne=-1/0,we=0,Ue=D;we<Ue.length;we+=1){var ft=Ue[we],Zt=new i.Point(ft.x+cs,ft.y+cs);q=Math.min(q,Zt.x),K=Math.min(K,Zt.y),de=Math.max(de,Zt.x),ne=Math.max(ne,Zt.y),J.push(Zt)}for(var hr=this.grid.query(q,K,de,ne).concat(this.ignoredGrid.query(q,K,de,ne)),qt={},Ve={},et=0,at=hr;et<at.length;et+=1){var kt=at[et],Ot=kt.key;if(qt[Ot.bucketInstanceId]===void 0&&(qt[Ot.bucketInstanceId]={}),!qt[Ot.bucketInstanceId][Ot.featureIndex]){var It=[new i.Point(kt.x1,kt.y1),new i.Point(kt.x2,kt.y1),new i.Point(kt.x2,kt.y2),new i.Point(kt.x1,kt.y2)];i.polygonIntersectsPolygon(J,It)&&(qt[Ot.bucketInstanceId][Ot.featureIndex]=!0,Ve[Ot.bucketInstanceId]===void 0&&(Ve[Ot.bucketInstanceId]=[]),Ve[Ot.bucketInstanceId].push(Ot.featureIndex))}}return Ve},nl.prototype.insertCollisionBox=function(D,J,q,K,de){var ne=J?this.ignoredGrid:this.grid,we={bucketInstanceId:q,featureIndex:K,collisionGroupID:de};ne.insert(we,D[0],D[1],D[2],D[3])},nl.prototype.insertCollisionCircles=function(D,J,q,K,de){for(var ne=J?this.ignoredGrid:this.grid,we={bucketInstanceId:q,featureIndex:K,collisionGroupID:de},Ue=0;Ue<D.length;Ue+=4)ne.insertCircle(we,D[Ue],D[Ue+1],D[Ue+2])},nl.prototype.projectAndGetPerspectiveRatio=function(D,J,q){var K=[J,q,0,1];zl(K,K,D);var de=new i.Point((K[0]/K[3]+1)/2*this.transform.width+cs,(-K[1]/K[3]+1)/2*this.transform.height+cs);return{point:de,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/K[3])}},nl.prototype.isOffscreen=function(D,J,q,K){return q<cs||D>=this.screenRightBoundary||K<cs||J>this.screenBottomBoundary},nl.prototype.isInsideGrid=function(D,J,q,K){return q>=0&&D<this.gridRightBoundary&&K>=0&&J<this.gridBottomBoundary},nl.prototype.getViewportMatrix=function(){var D=i.identity([]);return i.translate(D,D,[-cs,-cs,0]),D};function Ss(Y,D,J){return D*(i.EXTENT/(Y.tileSize*Math.pow(2,J-Y.tileID.overscaledZ)))}var fl=function(D,J,q,K){D?this.opacity=Math.max(0,Math.min(1,D.opacity+(D.placed?J:-J))):this.opacity=K&&q?1:0,this.placed=q};fl.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Js=function(D,J,q,K,de){this.text=new fl(D?D.text:null,J,q,de),this.icon=new fl(D?D.icon:null,J,K,de)};Js.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Os=function(D,J,q){this.text=D,this.icon=J,this.skipFade=q},Io=function(){this.invProjMatrix=i.create(),this.viewportMatrix=i.create(),this.circles=[]},us=function(D,J,q,K,de){this.bucketInstanceId=D,this.featureIndex=J,this.sourceLayerIndex=q,this.bucketIndex=K,this.tileID=de},Zl=function(D){this.crossSourceCollisions=D,this.maxGroupID=0,this.collisionGroups={}};Zl.prototype.get=function(D){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[D]){var J=++this.maxGroupID;this.collisionGroups[D]={ID:J,predicate:function(q){return q.collisionGroupID===J}}}return this.collisionGroups[D]};function Su(Y,D,J,q,K){var de=i.getAnchorAlignment(Y),ne=de.horizontalAlign,we=de.verticalAlign,Ue=-(ne-.5)*D,ft=-(we-.5)*J,Zt=i.evaluateVariableOffset(Y,q);return new i.Point(Ue+Zt[0]*K,ft+Zt[1]*K)}function nc(Y,D,J,q,K,de){var ne=Y.x1,we=Y.x2,Ue=Y.y1,ft=Y.y2,Zt=Y.anchorPointX,hr=Y.anchorPointY,qt=new i.Point(D,J);return q&&qt._rotate(K?de:-de),{x1:ne+qt.x,y1:Ue+qt.y,x2:we+qt.x,y2:ft+qt.y,anchorPointX:Zt,anchorPointY:hr}}var ws=function(D,J,q,K){this.transform=D.clone(),this.collisionIndex=new nl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=J,this.retainedQueryData={},this.collisionGroups=new Zl(q),this.collisionCircleArrays={},this.prevPlacement=K,K&&(K.prevPlacement=void 0),this.placedOrientations={}};ws.prototype.getBucketParts=function(D,J,q,K){var de=q.getBucket(J),ne=q.latestFeatureIndex;if(!(!de||!ne||J.id!==de.layerIds[0])){var we=q.collisionBoxArray,Ue=de.layers[0].layout,ft=Math.pow(2,this.transform.zoom-q.tileID.overscaledZ),Zt=q.tileSize/i.EXTENT,hr=this.transform.calculatePosMatrix(q.tileID.toUnwrapped()),qt=Ue.get(\"text-pitch-alignment\")===\"map\",Ve=Ue.get(\"text-rotation-alignment\")===\"map\",et=Ss(q,1,this.transform.zoom),at=_n(hr,qt,Ve,this.transform,et),kt=null;if(qt){var Ot=ya(hr,qt,Ve,this.transform,et);kt=i.multiply([],this.transform.labelPlaneMatrix,Ot)}this.retainedQueryData[de.bucketInstanceId]=new us(de.bucketInstanceId,ne,de.sourceLayerIndex,de.index,q.tileID);var It={bucket:de,layout:Ue,posMatrix:hr,textLabelPlaneMatrix:at,labelToScreenMatrix:kt,scale:ft,textPixelRatio:Zt,holdingForFade:q.holdingForFade(),collisionBoxArray:we,partiallyEvaluatedTextSize:i.evaluateSizeForZoom(de.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(de.sourceID)};if(K)for(var Bt=0,Rt=de.sortKeyRanges;Bt<Rt.length;Bt+=1){var mt=Rt[Bt],Pt=mt.sortKey,ht=mt.symbolInstanceStart,cr=mt.symbolInstanceEnd;D.push({sortKey:Pt,symbolInstanceStart:ht,symbolInstanceEnd:cr,parameters:It})}else D.push({symbolInstanceStart:0,symbolInstanceEnd:de.symbolInstances.length,parameters:It})}},ws.prototype.attemptAnchorPlacement=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve,et,at){var kt=[qt.textOffset0,qt.textOffset1],Ot=Su(D,q,K,kt,de),It=this.collisionIndex.placeCollisionBox(nc(J,Ot.x,Ot.y,ne,we,this.transform.angle),hr,Ue,ft,Zt.predicate);if(at){var Bt=this.collisionIndex.placeCollisionBox(nc(at,Ot.x,Ot.y,ne,we,this.transform.angle),hr,Ue,ft,Zt.predicate);if(Bt.box.length===0)return}if(It.box.length>0){var Rt;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Rt=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:kt,width:q,height:K,anchor:D,textBoxScale:de,prevAnchor:Rt},this.markUsedJustification(Ve,D,qt,et),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,et,qt),this.placedOrientations[qt.crossTileID]=et),{shift:Ot,placedGlyphBoxes:It}}},ws.prototype.placeLayerBucketPart=function(D,J,q){var K=this,de=D.parameters,ne=de.bucket,we=de.layout,Ue=de.posMatrix,ft=de.textLabelPlaneMatrix,Zt=de.labelToScreenMatrix,hr=de.textPixelRatio,qt=de.holdingForFade,Ve=de.collisionBoxArray,et=de.partiallyEvaluatedTextSize,at=de.collisionGroup,kt=we.get(\"text-optional\"),Ot=we.get(\"icon-optional\"),It=we.get(\"text-allow-overlap\"),Bt=we.get(\"icon-allow-overlap\"),Rt=we.get(\"text-rotation-alignment\")===\"map\",mt=we.get(\"text-pitch-alignment\")===\"map\",Pt=we.get(\"icon-text-fit\")!==\"none\",ht=we.get(\"symbol-z-order\")===\"viewport-y\",cr=It&&(Bt||!ne.hasIconData()||Ot),br=Bt&&(It||!ne.hasTextData()||kt);!ne.collisionArrays&&Ve&&ne.deserializeCollisionBoxes(Ve);var Nr=function(Ci,qi){if(!J[Ci.crossTileID]){if(qt){K.placements[Ci.crossTileID]=new Os(!1,!1,!1);return}var Vi=!1,on=!1,On=!0,Ja=null,co={box:null,offscreen:null},rs={box:null,offscreen:null},so=null,Zo=null,ys=null,ou=0,Cv=0,kv=0;qi.textFeatureIndex?ou=qi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(ou=Ci.featureIndex),qi.verticalTextFeatureIndex&&(Cv=qi.verticalTextFeatureIndex);var wd=qi.textBox;if(wd){var Yv=function(vc){var eu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ci.crossTileID];Sd&&(K.placedOrientations[Ci.crossTileID]=Sd,eu=Sd,K.markUsedOrientation(ne,eu,Ci))}return eu},cg=function(vc,eu){if(ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&qi.verticalTextBox)for(var Sd=0,sy=ne.writingModes;Sd<sy.length;Sd+=1){var A1=sy[Sd];if(A1===i.WritingMode.vertical?(co=eu(),rs=co):co=vc(),co&&co.box&&co.box.length)break}else co=vc()};if(we.get(\"text-variable-anchor\")){var Vd=we.get(\"text-variable-anchor\");if(K.prevPlacement&&K.prevPlacement.variableOffsets[Ci.crossTileID]){var Ad=K.prevPlacement.variableOffsets[Ci.crossTileID];Vd.indexOf(Ad.anchor)>0&&(Vd=Vd.filter(function(vc){return vc!==Ad.anchor}),Vd.unshift(Ad.anchor))}var Lv=function(vc,eu,Sd){for(var sy=vc.x2-vc.x1,A1=vc.y2-vc.y1,wu=Ci.textBoxScale,Bx=Pt&&!Bt?eu:null,am={box:[],offscreen:!1},Mw=It?Vd.length*2:Vd.length,Iv=0;Iv<Mw;++Iv){var om=Vd[Iv%Vd.length],Ew=Iv>=Vd.length,Nx=K.attemptAnchorPlacement(om,vc,sy,A1,wu,Rt,mt,hr,Ue,at,Ew,Ci,ne,Sd,Bx);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){Vi=!0,Ja=Nx.shift;break}}return am},Kv=function(){return Lv(wd,qi.iconBox,i.WritingMode.horizontal)},Pv=function(){var vc=qi.verticalTextBox,eu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!eu&&Ci.numVerticalGlyphVertices>0&&vc?Lv(vc,qi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Kv,Pv),co&&(Vi=co.box,On=co.offscreen);var ny=Yv(co&&co.box);if(!Vi&&K.prevPlacement){var fg=K.prevPlacement.variableOffsets[Ci.crossTileID];fg&&(K.variableOffsets[Ci.crossTileID]=fg,K.markUsedJustification(ne,fg.anchor,Ci,ny))}}else{var dp=function(vc,eu){var Sd=K.collisionIndex.placeCollisionBox(vc,It,hr,Ue,at.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,eu,Ci),K.placedOrientations[Ci.crossTileID]=eu),Sd},Td=function(){return dp(wd,i.WritingMode.horizontal)},vp=function(){var vc=qi.verticalTextBox;return ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&vc?dp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Td,vp),Yv(co&&co.box&&co.box.length)}}if(so=co,Vi=so&&so.box&&so.box.length>0,On=so&&so.offscreen,Ci.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),hg=i.evaluateSizeForFeature(ne.textSizeData,et,oh),ay=we.get(\"text-padding\"),Gh=Ci.collisionCircleDiameter;Zo=K.collisionIndex.placeCollisionCircles(It,oh,ne.lineVertexArray,ne.glyphOffsetArray,hg,Ue,ft,Zt,q,mt,at.predicate,Gh,ay),Vi=It||Zo.circles.length>0&&!Zo.collisionDetected,On=On&&Zo.offscreen}if(qi.iconFeatureIndex&&(kv=qi.iconFeatureIndex),qi.iconBox){var rm=function(vc){var eu=Pt&&Ja?nc(vc,Ja.x,Ja.y,Rt,mt,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(eu,Bt,hr,Ue,at.predicate)};rs&&rs.box&&rs.box.length&&qi.verticalIconBox?(ys=rm(qi.verticalIconBox),on=ys.box.length>0):(ys=rm(qi.iconBox),on=ys.box.length>0),On=On&&ys.offscreen}var w1=kt||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,T1=Ot||Ci.numIconVertices===0;if(!w1&&!T1?on=Vi=on&&Vi:T1?w1||(on=on&&Vi):Vi=on&&Vi,Vi&&so&&so.box&&(rs&&rs.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,Cv,at.ID):K.collisionIndex.insertCollisionBox(so.box,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,ou,at.ID)),on&&ys&&K.collisionIndex.insertCollisionBox(ys.box,we.get(\"icon-ignore-placement\"),ne.bucketInstanceId,kv,at.ID),Zo&&(Vi&&K.collisionIndex.insertCollisionCircles(Zo.circles,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,ou,at.ID),q)){var oy=ne.bucketInstanceId,im=K.collisionCircleArrays[oy];im===void 0&&(im=K.collisionCircleArrays[oy]=new Io);for(var nm=0;nm<Zo.circles.length;nm+=4)im.circles.push(Zo.circles[nm+0]),im.circles.push(Zo.circles[nm+1]),im.circles.push(Zo.circles[nm+2]),im.circles.push(Zo.collisionDetected?1:0)}K.placements[Ci.crossTileID]=new Os(Vi||cr,on||br,On||ne.justReloaded),J[Ci.crossTileID]=!0}};if(ht)for(var Ri=ne.getSortedSymbolIndexes(this.transform.angle),hi=Ri.length-1;hi>=0;--hi){var wi=Ri[hi];Nr(ne.symbolInstances.get(wi),ne.collisionArrays[wi])}else for(var gn=D.symbolInstanceStart;gn<D.symbolInstanceEnd;gn++)Nr(ne.symbolInstances.get(gn),ne.collisionArrays[gn]);if(q&&ne.bucketInstanceId in this.collisionCircleArrays){var tn=this.collisionCircleArrays[ne.bucketInstanceId];i.invert(tn.invProjMatrix,Ue),tn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ne.justReloaded=!1},ws.prototype.markUsedJustification=function(D,J,q,K){var de={left:q.leftJustifiedTextSymbolIndex,center:q.centerJustifiedTextSymbolIndex,right:q.rightJustifiedTextSymbolIndex},ne;K===i.WritingMode.vertical?ne=q.verticalPlacedTextSymbolIndex:ne=de[i.getAnchorJustification(J)];for(var we=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex,q.verticalPlacedTextSymbolIndex],Ue=0,ft=we;Ue<ft.length;Ue+=1){var Zt=ft[Ue];Zt>=0&&(ne>=0&&Zt!==ne?D.text.placedSymbolArray.get(Zt).crossTileID=0:D.text.placedSymbolArray.get(Zt).crossTileID=q.crossTileID)}},ws.prototype.markUsedOrientation=function(D,J,q){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex],we=0,Ue=ne;we<Ue.length;we+=1){var ft=Ue[we];D.text.placedSymbolArray.get(ft).placedOrientation=K}q.verticalPlacedTextSymbolIndex&&(D.text.placedSymbolArray.get(q.verticalPlacedTextSymbolIndex).placedOrientation=de)},ws.prototype.commit=function(D){this.commitTime=D,this.zoomAtLastRecencyCheck=this.transform.zoom;var J=this.prevPlacement,q=!1;this.prevZoomAdjustment=J?J.zoomAdjustment(this.transform.zoom):0;var K=J?J.symbolFadeChange(D):1,de=J?J.opacities:{},ne=J?J.variableOffsets:{},we=J?J.placedOrientations:{};for(var Ue in this.placements){var ft=this.placements[Ue],Zt=de[Ue];Zt?(this.opacities[Ue]=new Js(Zt,K,ft.text,ft.icon),q=q||ft.text!==Zt.text.placed||ft.icon!==Zt.icon.placed):(this.opacities[Ue]=new Js(null,K,ft.text,ft.icon,ft.skipFade),q=q||ft.text||ft.icon)}for(var hr in de){var qt=de[hr];if(!this.opacities[hr]){var Ve=new Js(qt,K,!1,!1);Ve.isHidden()||(this.opacities[hr]=Ve,q=q||qt.text.placed||qt.icon.placed)}}for(var et in ne)!this.variableOffsets[et]&&this.opacities[et]&&!this.opacities[et].isHidden()&&(this.variableOffsets[et]=ne[et]);for(var at in we)!this.placedOrientations[at]&&this.opacities[at]&&!this.opacities[at].isHidden()&&(this.placedOrientations[at]=we[at]);q?this.lastPlacementChangeTime=D:typeof this.lastPlacementChangeTime!=\"number\"&&(this.lastPlacementChangeTime=J?J.lastPlacementChangeTime:D)},ws.prototype.updateLayerOpacities=function(D,J){for(var q={},K=0,de=J;K<de.length;K+=1){var ne=de[K],we=ne.getBucket(D);we&&ne.latestFeatureIndex&&D.id===we.layerIds[0]&&this.updateBucketOpacities(we,q,ne.collisionBoxArray)}},ws.prototype.updateBucketOpacities=function(D,J,q){var K=this;D.hasTextData()&&D.text.opacityVertexArray.clear(),D.hasIconData()&&D.icon.opacityVertexArray.clear(),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexArray.clear(),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexArray.clear();var de=D.layers[0].layout,ne=new Js(null,0,!1,!1,!0),we=de.get(\"text-allow-overlap\"),Ue=de.get(\"icon-allow-overlap\"),ft=de.get(\"text-variable-anchor\"),Zt=de.get(\"text-rotation-alignment\")===\"map\",hr=de.get(\"text-pitch-alignment\")===\"map\",qt=de.get(\"icon-text-fit\")!==\"none\",Ve=new Js(null,0,we&&(Ue||!D.hasIconData()||de.get(\"icon-optional\")),Ue&&(we||!D.hasTextData()||de.get(\"text-optional\")),!0);!D.collisionArrays&&q&&(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData())&&D.deserializeCollisionBoxes(q);for(var et=function(It,Bt,Rt){for(var mt=0;mt<Bt/4;mt++)It.opacityVertexArray.emplaceBack(Rt)},at=function(It){var Bt=D.symbolInstances.get(It),Rt=Bt.numHorizontalGlyphVertices,mt=Bt.numVerticalGlyphVertices,Pt=Bt.crossTileID,ht=J[Pt],cr=K.opacities[Pt];ht?cr=ne:cr||(cr=Ve,K.opacities[Pt]=cr),J[Pt]=!0;var br=Rt>0||mt>0,Nr=Bt.numIconVertices>0,Ri=K.placedOrientations[Bt.crossTileID],hi=Ri===i.WritingMode.vertical,wi=Ri===i.WritingMode.horizontal||Ri===i.WritingMode.horizontalOnly;if(br){var gn=ac(cr.text),tn=hi?aa:gn;et(D.text,Rt,tn);var Ci=wi?aa:gn;et(D.text,mt,Ci);var qi=cr.text.isHidden();[Bt.rightJustifiedTextSymbolIndex,Bt.centerJustifiedTextSymbolIndex,Bt.leftJustifiedTextSymbolIndex].forEach(function(kv){kv>=0&&(D.text.placedSymbolArray.get(kv).hidden=qi||hi?1:0)}),Bt.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Bt.verticalPlacedTextSymbolIndex).hidden=qi||wi?1:0);var Vi=K.variableOffsets[Bt.crossTileID];Vi&&K.markUsedJustification(D,Vi.anchor,Bt,Ri);var on=K.placedOrientations[Bt.crossTileID];on&&(K.markUsedJustification(D,\"left\",Bt,on),K.markUsedOrientation(D,on,Bt))}if(Nr){var On=ac(cr.icon),Ja=!(qt&&Bt.verticalPlacedIconSymbolIndex&&hi);if(Bt.placedIconSymbolIndex>=0){var co=Ja?On:aa;et(D.icon,Bt.numIconVertices,co),D.icon.placedSymbolArray.get(Bt.placedIconSymbolIndex).hidden=cr.icon.isHidden()}if(Bt.verticalPlacedIconSymbolIndex>=0){var rs=Ja?aa:On;et(D.icon,Bt.numVerticalIconVertices,rs),D.icon.placedSymbolArray.get(Bt.verticalPlacedIconSymbolIndex).hidden=cr.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[It];if(so){var Zo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ys=!0;if(ft){var ou=K.variableOffsets[Pt];ou?(Zo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Zt&&Zo._rotate(hr?K.transform.angle:-K.transform.angle)):ys=!1}so.textBox&&Fn(D.textCollisionBox.collisionVertexArray,cr.text.placed,!ys||hi,Zo.x,Zo.y),so.verticalTextBox&&Fn(D.textCollisionBox.collisionVertexArray,cr.text.placed,!ys||wi,Zo.x,Zo.y)}var Cv=!!(!wi&&so.verticalIconBox);so.iconBox&&Fn(D.iconCollisionBox.collisionVertexArray,cr.icon.placed,Cv,qt?Zo.x:0,qt?Zo.y:0),so.verticalIconBox&&Fn(D.iconCollisionBox.collisionVertexArray,cr.icon.placed,!Cv,qt?Zo.x:0,qt?Zo.y:0)}}},kt=0;kt<D.symbolInstances.length;kt++)at(kt);if(D.sortFeatures(this.transform.angle),this.retainedQueryData[D.bucketInstanceId]&&(this.retainedQueryData[D.bucketInstanceId].featureSortOrder=D.featureSortOrder),D.hasTextData()&&D.text.opacityVertexBuffer&&D.text.opacityVertexBuffer.updateData(D.text.opacityVertexArray),D.hasIconData()&&D.icon.opacityVertexBuffer&&D.icon.opacityVertexBuffer.updateData(D.icon.opacityVertexArray),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexBuffer&&D.iconCollisionBox.collisionVertexBuffer.updateData(D.iconCollisionBox.collisionVertexArray),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexBuffer&&D.textCollisionBox.collisionVertexBuffer.updateData(D.textCollisionBox.collisionVertexArray),D.bucketInstanceId in this.collisionCircleArrays){var Ot=this.collisionCircleArrays[D.bucketInstanceId];D.placementInvProjMatrix=Ot.invProjMatrix,D.placementViewportMatrix=Ot.viewportMatrix,D.collisionCircleArray=Ot.circles,delete this.collisionCircleArrays[D.bucketInstanceId]}},ws.prototype.symbolFadeChange=function(D){return this.fadeDuration===0?1:(D-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},ws.prototype.zoomAdjustment=function(D){return Math.max(0,(this.transform.zoom-D)/1.5)},ws.prototype.hasTransitions=function(D){return this.stale||D-this.lastPlacementChangeTime<this.fadeDuration},ws.prototype.stillRecent=function(D,J){var q=this.zoomAtLastRecencyCheck===J?1-this.zoomAdjustment(J):1;return this.zoomAtLastRecencyCheck=J,this.commitTime+this.fadeDuration*q>D},ws.prototype.setStale=function(){this.stale=!0};function Fn(Y,D,J,q,K){Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),Ol=Math.pow(2,17),xo=Math.pow(2,16),Yl=Math.pow(2,9),Us=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*Ol+D*xo+J*Yl+D*Us+J*Hl+D}var aa=0,Oo=function(D){this._sortAcrossTiles=D.layout.get(\"symbol-z-order\")!==\"viewport-y\"&&D.layout.get(\"symbol-sort-key\").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oo.prototype.continuePlacement=function(D,J,q,K,de){for(var ne=this._bucketParts;this._currentTileIndex<D.length;){var we=D[this._currentTileIndex];if(J.getBucketParts(ne,K,we,this._sortAcrossTiles),this._currentTileIndex++,de())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ne.sort(function(ft,Zt){return ft.sortKey-Zt.sortKey}));this._currentPartIndex<ne.length;){var Ue=ne[this._currentPartIndex];if(J.placeLayerBucketPart(Ue,this._seenCrossTileIDs,q),this._currentPartIndex++,de())return!0}return!1};var qo=function(D,J,q,K,de,ne,we){this.placement=new ws(D,de,ne,we),this._currentPlacementIndex=J.length-1,this._forceFullPlacement=q,this._showCollisionBoxes=K,this._done=!1};qo.prototype.isDone=function(){return this._done},qo.prototype.continuePlacement=function(D,J,q){for(var K=this,de=i.browser.now(),ne=function(){var hr=i.browser.now()-de;return K._forceFullPlacement?!1:hr>2};this._currentPlacementIndex>=0;){var we=D[this._currentPlacementIndex],Ue=J[we],ft=this.placement.collisionIndex.transform.zoom;if(Ue.type===\"symbol\"&&(!Ue.minzoom||Ue.minzoom<=ft)&&(!Ue.maxzoom||Ue.maxzoom>ft)){this._inProgressLayer||(this._inProgressLayer=new Oo(Ue));var Zt=this._inProgressLayer.continuePlacement(q[Ue.source],this.placement,this._showCollisionBoxes,Ue,ne);if(Zt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},qo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var ql=512/i.EXTENT/2,Pc=function(D,J,q){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=q;for(var K=0;K<J.length;K++){var de=J.get(K),ne=de.key;this.indexedSymbolInstances[ne]||(this.indexedSymbolInstances[ne]=[]),this.indexedSymbolInstances[ne].push({crossTileID:de.crossTileID,coord:this.getScaledCoordinates(de,D)})}};Pc.prototype.getScaledCoordinates=function(D,J){var q=J.canonical.z-this.tileID.canonical.z,K=ql/Math.pow(2,q);return{x:Math.floor((J.canonical.x*i.EXTENT+D.anchorX)*K),y:Math.floor((J.canonical.y*i.EXTENT+D.anchorY)*K)}},Pc.prototype.findMatches=function(D,J,q){for(var K=this.tileID.canonical.z<J.canonical.z?1:Math.pow(2,this.tileID.canonical.z-J.canonical.z),de=0;de<D.length;de++){var ne=D.get(de);if(!ne.crossTileID){var we=this.indexedSymbolInstances[ne.key];if(we)for(var Ue=this.getScaledCoordinates(ne,J),ft=0,Zt=we;ft<Zt.length;ft+=1){var hr=Zt[ft];if(Math.abs(hr.coord.x-Ue.x)<=K&&Math.abs(hr.coord.y-Ue.y)<=K&&!q[hr.crossTileID]){q[hr.crossTileID]=!0,ne.crossTileID=hr.crossTileID;break}}}}};var Do=function(){this.maxCrossTileID=0};Do.prototype.generate=function(){return++this.maxCrossTileID};var rf=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};rf.prototype.handleWrapJump=function(D){var J=Math.round((D-this.lng)/360);if(J!==0)for(var q in this.indexes){var K=this.indexes[q],de={};for(var ne in K){var we=K[ne];we.tileID=we.tileID.unwrapTo(we.tileID.wrap+J),de[we.tileID.key]=we}this.indexes[q]=de}this.lng=D},rf.prototype.addBucket=function(D,J,q){if(this.indexes[D.overscaledZ]&&this.indexes[D.overscaledZ][D.key]){if(this.indexes[D.overscaledZ][D.key].bucketInstanceId===J.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(D.overscaledZ,this.indexes[D.overscaledZ][D.key])}for(var K=0;K<J.symbolInstances.length;K++){var de=J.symbolInstances.get(K);de.crossTileID=0}this.usedCrossTileIDs[D.overscaledZ]||(this.usedCrossTileIDs[D.overscaledZ]={});var ne=this.usedCrossTileIDs[D.overscaledZ];for(var we in this.indexes){var Ue=this.indexes[we];if(Number(we)>D.overscaledZ)for(var ft in Ue){var Zt=Ue[ft];Zt.tileID.isChildOf(D)&&Zt.findMatches(J.symbolInstances,D,ne)}else{var hr=D.scaledTo(Number(we)),qt=Ue[hr.key];qt&&qt.findMatches(J.symbolInstances,D,ne)}}for(var Ve=0;Ve<J.symbolInstances.length;Ve++){var et=J.symbolInstances.get(Ve);et.crossTileID||(et.crossTileID=q.generate(),ne[et.crossTileID]=!0)}return this.indexes[D.overscaledZ]===void 0&&(this.indexes[D.overscaledZ]={}),this.indexes[D.overscaledZ][D.key]=new Pc(D,J.symbolInstances,J.bucketInstanceId),!0},rf.prototype.removeBucketCrossTileIDs=function(D,J){for(var q in J.indexedSymbolInstances)for(var K=0,de=J.indexedSymbolInstances[q];K<de.length;K+=1){var ne=de[K];delete this.usedCrossTileIDs[D][ne.crossTileID]}},rf.prototype.removeStaleBuckets=function(D){var J=!1;for(var q in this.indexes){var K=this.indexes[q];for(var de in K)D[K[de].bucketInstanceId]||(this.removeBucketCrossTileIDs(q,K[de]),delete K[de],J=!0)}return J};var Uf=function(){this.layerIndexes={},this.crossTileIDs=new Do,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Uf.prototype.addLayer=function(D,J,q){var K=this.layerIndexes[D.id];K===void 0&&(K=this.layerIndexes[D.id]=new rf);var de=!1,ne={};K.handleWrapJump(q);for(var we=0,Ue=J;we<Ue.length;we+=1){var ft=Ue[we],Zt=ft.getBucket(D);!Zt||D.id!==Zt.layerIds[0]||(Zt.bucketInstanceId||(Zt.bucketInstanceId=++this.maxBucketInstanceId),K.addBucket(ft.tileID,Zt,this.crossTileIDs)&&(de=!0),ne[Zt.bucketInstanceId]=!0)}return K.removeStaleBuckets(ne)&&(de=!0),de},Uf.prototype.pruneUnusedLayers=function(D){var J={};D.forEach(function(K){J[K]=!0});for(var q in this.layerIndexes)J[q]||delete this.layerIndexes[q]};var ml=function(Y,D){return i.emitValidationErrors(Y,D&&D.filter(function(J){return J.identifier!==\"source.canvas\"}))},Zc=i.pick(da,[\"addLayer\",\"removeLayer\",\"setPaintProperty\",\"setLayoutProperty\",\"setFilter\",\"addSource\",\"removeSource\",\"setLayerZoomRange\",\"setLight\",\"setTransition\",\"setGeoJSONSourceData\"]),Kl=i.pick(da,[\"setCenter\",\"setZoom\",\"setBearing\",\"setPitch\"]),qs=Wo(),yu=function(Y){function D(J,q){var K=this;q===void 0&&(q={}),Y.call(this),this.map=J,this.dispatcher=new Z(Ba(),this),this.imageManager=new C,this.imageManager.setEventedParent(this),this.glyphManager=new P(J._requestManager,q.localIdeographFontFamily),this.lineAtlas=new G(256,512),this.crossTileSymbolIndex=new Uf,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new i.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast(\"setReferrer\",i.getReferrer());var de=this;this._rtlTextPluginCallback=D.registerForPluginStateChange(function(ne){var we={pluginStatus:ne.pluginStatus,pluginURL:ne.pluginURL};de.dispatcher.broadcast(\"syncRTLPluginState\",we,function(Ue,ft){if(i.triggerPluginCompletionEvent(Ue),ft){var Zt=ft.every(function(qt){return qt});if(Zt)for(var hr in de.sourceCaches)de.sourceCaches[hr].reload()}})}),this.on(\"data\",function(ne){if(!(ne.dataType!==\"source\"||ne.sourceDataType!==\"metadata\")){var we=K.sourceCaches[ne.sourceId];if(we){var Ue=we.getSource();if(!(!Ue||!Ue.vectorLayerIds))for(var ft in K._layers){var Zt=K._layers[ft];Zt.source===Ue.id&&K._validateLayer(Zt)}}}})}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.loadURL=function(q,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event(\"dataloading\",{dataType:\"style\"}));var ne=typeof K.validate==\"boolean\"?K.validate:!i.isMapboxURL(q);q=this.map._requestManager.normalizeStyleURL(q,K.accessToken);var we=this.map._requestManager.transformRequest(q,i.ResourceType.Style);this._request=i.getJSON(we,function(Ue,ft){de._request=null,Ue?de.fire(new i.ErrorEvent(Ue)):ft&&de._load(ft,ne)})},D.prototype.loadJSON=function(q,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event(\"dataloading\",{dataType:\"style\"})),this._request=i.browser.frame(function(){de._request=null,de._load(q,K.validate!==!1)})},D.prototype.loadEmpty=function(){this.fire(new i.Event(\"dataloading\",{dataType:\"style\"})),this._load(qs,!1)},D.prototype._load=function(q,K){if(!(K&&ml(this,i.validateStyle(q)))){this._loaded=!0,this.stylesheet=q;for(var de in q.sources)this.addSource(de,q.sources[de],{validate:!1});q.sprite?this._loadSprite(q.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(q.glyphs);var ne=Fa(this.stylesheet.layers);this._order=ne.map(function(Zt){return Zt.id}),this._layers={},this._serializedLayers={};for(var we=0,Ue=ne;we<Ue.length;we+=1){var ft=Ue[we];ft=i.createStyleLayer(ft),ft.setEventedParent(this,{layer:{id:ft.id}}),this._layers[ft.id]=ft,this._serializedLayers[ft.id]=ft.serialize()}this.dispatcher.broadcast(\"setLayers\",this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new i.Event(\"data\",{dataType:\"style\"})),this.fire(new i.Event(\"style.load\"))}},D.prototype._loadSprite=function(q){var K=this;this._spriteRequest=x(q,this.map._requestManager,function(de,ne){if(K._spriteRequest=null,de)K.fire(new i.ErrorEvent(de));else if(ne)for(var we in ne)K.imageManager.addImage(we,ne[we]);K.imageManager.setLoaded(!0),K._availableImages=K.imageManager.listImages(),K.dispatcher.broadcast(\"setImages\",K._availableImages),K.fire(new i.Event(\"data\",{dataType:\"style\"}))})},D.prototype._validateLayer=function(q){var K=this.sourceCaches[q.source];if(K){var de=q.sourceLayer;if(de){var ne=K.getSource();(ne.type===\"geojson\"||ne.vectorLayerIds&&ne.vectorLayerIds.indexOf(de)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer \"'+de+'\" does not exist on source \"'+ne.id+'\" as specified by style layer \"'+q.id+'\"')))}}},D.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var q in this.sourceCaches)if(!this.sourceCaches[q].loaded())return!1;return!!this.imageManager.isLoaded()},D.prototype._serializeLayers=function(q){for(var K=[],de=0,ne=q;de<ne.length;de+=1){var we=ne[de],Ue=this._layers[we];Ue.type!==\"custom\"&&K.push(Ue.serialize())}return K},D.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var q in this.sourceCaches)if(this.sourceCaches[q].hasTransition())return!0;for(var K in this._layers)if(this._layers[K].hasTransition())return!0;return!1},D.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},D.prototype.update=function(q){if(this._loaded){var K=this._changed;if(this._changed){var de=Object.keys(this._updatedLayers),ne=Object.keys(this._removedLayers);(de.length||ne.length)&&this._updateWorkerLayers(de,ne);for(var we in this._updatedSources){var Ue=this._updatedSources[we];Ue===\"reload\"?this._reloadSource(we):Ue===\"clear\"&&this._clearSource(we)}this._updateTilesForChangedImages();for(var ft in this._updatedPaintProps)this._layers[ft].updateTransitions(q);this.light.updateTransitions(q),this._resetUpdates()}var Zt={};for(var hr in this.sourceCaches){var qt=this.sourceCaches[hr];Zt[hr]=qt.used,qt.used=!1}for(var Ve=0,et=this._order;Ve<et.length;Ve+=1){var at=et[Ve],kt=this._layers[at];kt.recalculate(q,this._availableImages),!kt.isHidden(q.zoom)&&kt.source&&(this.sourceCaches[kt.source].used=!0)}for(var Ot in Zt){var It=this.sourceCaches[Ot];Zt[Ot]!==It.used&&It.fire(new i.Event(\"data\",{sourceDataType:\"visibility\",dataType:\"source\",sourceId:Ot}))}this.light.recalculate(q),this.z=q.zoom,K&&this.fire(new i.Event(\"data\",{dataType:\"style\"}))}},D.prototype._updateTilesForChangedImages=function(){var q=Object.keys(this._changedImages);if(q.length){for(var K in this.sourceCaches)this.sourceCaches[K].reloadTilesForDependencies([\"icons\",\"patterns\"],q);this._changedImages={}}},D.prototype._updateWorkerLayers=function(q,K){this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(q),removedIds:K})},D.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},D.prototype.setState=function(q){var K=this;if(this._checkLoaded(),ml(this,i.validateStyle(q)))return!1;q=i.clone$1(q),q.layers=Fa(q.layers);var de=Sn(this.serialize(),q).filter(function(we){return!(we.command in Kl)});if(de.length===0)return!1;var ne=de.filter(function(we){return!(we.command in Zc)});if(ne.length>0)throw new Error(\"Unimplemented: \"+ne.map(function(we){return we.command}).join(\", \")+\".\");return de.forEach(function(we){we.command!==\"setTransition\"&&K[we.command].apply(K,we.args)}),this.stylesheet=q,!0},D.prototype.addImage=function(q,K){if(this.getImage(q))return this.fire(new i.ErrorEvent(new Error(\"An image with this name already exists.\")));this.imageManager.addImage(q,K),this._afterImageUpdated(q)},D.prototype.updateImage=function(q,K){this.imageManager.updateImage(q,K)},D.prototype.getImage=function(q){return this.imageManager.getImage(q)},D.prototype.removeImage=function(q){if(!this.getImage(q))return this.fire(new i.ErrorEvent(new Error(\"No image with this name exists.\")));this.imageManager.removeImage(q),this._afterImageUpdated(q)},D.prototype._afterImageUpdated=function(q){this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.dispatcher.broadcast(\"setImages\",this._availableImages),this.fire(new i.Event(\"data\",{dataType:\"style\"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(q,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error(\"There is already a source with this ID\");if(!K.type)throw new Error(\"The type property must be defined, but only the following properties were given: \"+Object.keys(K).join(\", \")+\".\");var we=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\"],Ue=we.indexOf(K.type)>=0;if(!(Ue&&this._validate(i.validateStyle.source,\"sources.\"+q,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ft=this.sourceCaches[q]=new ri(q,K,this.dispatcher);ft.style=this,ft.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ft.serialize(),sourceId:q}}),ft.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error(\"There is no source with this ID\");for(var K in this._layers)if(this._layers[K].source===q)return this.fire(new i.ErrorEvent(new Error('Source \"'+q+'\" cannot be removed while layer \"'+K+'\" is using it.')));var de=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],de.fire(new i.Event(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:q})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(q,K){this._checkLoaded();var de=this.sourceCaches[q].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()},D.prototype.addLayer=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=q.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+ne+'\" already exists on this map')));return}var we;if(q.type===\"custom\"){if(ml(this,i.validateCustomStyleLayer(q)))return;we=i.createStyleLayer(q)}else{if(typeof q.source==\"object\"&&(this.addSource(ne,q.source),q=i.clone$1(q),q=i.extend(q,{source:ne})),this._validate(i.validateStyle.layer,\"layers.\"+ne,q,{arrayIndex:-1},de))return;we=i.createStyleLayer(q),this._validateLayer(we),we.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[we.id]=we.serialize()}var Ue=K?this._order.indexOf(K):this._order.length;if(K&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+K+'\" does not exist on this map.')));return}if(this._order.splice(Ue,0,ne),this._layerOrderChanged=!0,this._layers[ne]=we,this._removedLayers[ne]&&we.source&&we.type!==\"custom\"){var ft=this._removedLayers[ne];delete this._removedLayers[ne],ft.type!==we.type?this._updatedSources[we.source]=\"clear\":(this._updatedSources[we.source]=\"reload\",this.sourceCaches[we.source].pause())}this._updateLayer(we),we.onAdd&&we.onAdd(this.map)},D.prototype.moveLayer=function(q,K){this._checkLoaded(),this._changed=!0;var de=this._layers[q];if(!de){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be moved.\")));return}if(q!==K){var ne=this._order.indexOf(q);this._order.splice(ne,1);var we=K?this._order.indexOf(K):this._order.length;if(K&&we===-1){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+K+'\" does not exist on this map.')));return}this._order.splice(we,0,q),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(q){this._checkLoaded();var K=this._layers[q];if(!K){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be removed.\")));return}K.setEventedParent(null);var de=this._order.indexOf(q);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=K,delete this._layers[q],delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(q){return this._layers[q]},D.prototype.hasLayer=function(q){return q in this._layers},D.prototype.setLayerZoomRange=function(q,K,de){this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot have zoom extent.\")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be filtered.\")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,\"layers.\"+ne.id+\".filter\",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(q){return i.clone$1(this.getLayer(q).filter)},D.prototype.setLayoutProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be styled.\")));return}i.deepEqual(we.getLayoutProperty(K),de)||(we.setLayoutProperty(K,de,ne),this._updateLayer(we))},D.prototype.getLayoutProperty=function(q,K){var de=this.getLayer(q);if(!de){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style.\")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be styled.\")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Ue=we.setPaintProperty(K,de,ne);Ue&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[q]=!0}},D.prototype.getPaintProperty=function(q,K){return this.getLayer(q).getPaintProperty(K)},D.prototype.setFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=q.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+de+\"' does not exist in the map's style.\")));return}var Ue=we.getSource().type;if(Ue===\"geojson\"&&ne){this.fire(new i.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\")));return}if(Ue===\"vector\"&&!ne){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}q.id===void 0&&this.fire(new i.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),we.setFeatureState(ne,q.id,K)},D.prototype.removeFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+de+\"' does not exist in the map's style.\")));return}var we=ne.getSource().type,Ue=we===\"vector\"?q.sourceLayer:void 0;if(we===\"vector\"&&!Ue){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}if(K&&typeof q.id!=\"string\"&&typeof q.id!=\"number\"){this.fire(new i.ErrorEvent(new Error(\"A feature id is required to remove its specific state property.\")));return}ne.removeFeatureState(Ue,q.id,K)},D.prototype.getFeatureState=function(q){this._checkLoaded();var K=q.source,de=q.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+K+\"' does not exist in the map's style.\")));return}var we=ne.getSource().type;if(we===\"vector\"&&!de){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}return q.id===void 0&&this.fire(new i.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),ne.getFeatureState(de,q.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(q){return q.serialize()}),layers:this._serializeLayers(this._order)},function(q){return q!==void 0})},D.prototype._updateLayer=function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&this.sourceCaches[q.source].getSource().type!==\"raster\"&&(this._updatedSources[q.source]=\"reload\",this.sourceCaches[q.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(q){for(var K=this,de=function(wi){return K._layers[wi].type===\"fill-extrusion\"},ne={},we=[],Ue=this._order.length-1;Ue>=0;Ue--){var ft=this._order[Ue];if(de(ft)){ne[ft]=Ue;for(var Zt=0,hr=q;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=qt[ft];if(Ve)for(var et=0,at=Ve;et<at.length;et+=1){var kt=at[et];we.push(kt)}}}}we.sort(function(wi,gn){return gn.intersectionZ-wi.intersectionZ});for(var Ot=[],It=this._order.length-1;It>=0;It--){var Bt=this._order[It];if(de(Bt))for(var Rt=we.length-1;Rt>=0;Rt--){var mt=we[Rt].feature;if(ne[mt.layer.id]<It)break;Ot.push(mt),we.pop()}else for(var Pt=0,ht=q;Pt<ht.length;Pt+=1){var cr=ht[Pt],br=cr[Bt];if(br)for(var Nr=0,Ri=br;Nr<Ri.length;Nr+=1){var hi=Ri[Nr];Ot.push(hi.feature)}}}return Ot},D.prototype.queryRenderedFeatures=function(q,K,de){K&&K.filter&&this._validate(i.validateStyle.filter,\"queryRenderedFeatures.filter\",K.filter,null,K);var ne={};if(K&&K.layers){if(!Array.isArray(K.layers))return this.fire(new i.ErrorEvent(new Error(\"parameters.layers must be an Array.\"))),[];for(var we=0,Ue=K.layers;we<Ue.length;we+=1){var ft=Ue[we],Zt=this._layers[ft];if(!Zt)return this.fire(new i.ErrorEvent(new Error(\"The layer '\"+ft+\"' does not exist in the map's style and cannot be queried for features.\"))),[];ne[Zt.source]=!0}}var hr=[];K.availableImages=this._availableImages;for(var qt in this.sourceCaches)K.layers&&!ne[qt]||hr.push(ce(this.sourceCaches[qt],this._layers,this._serializedLayers,q,K,de));return this.placement&&hr.push(Ze(this._layers,this._serializedLayers,this.sourceCaches,q,K,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(hr)},D.prototype.querySourceFeatures=function(q,K){K&&K.filter&&this._validate(i.validateStyle.filter,\"querySourceFeatures.filter\",K.filter,null,K);var de=this.sourceCaches[q];return de?ct(de,K):[]},D.prototype.addSourceType=function(q,K,de){if(D.getSourceType(q))return de(new Error('A source type called \"'+q+'\" already exists.'));if(D.setSourceType(q,K),!K.workerSourceURL)return de(null,null);this.dispatcher.broadcast(\"loadWorkerSource\",{name:q,url:K.workerSourceURL},de)},D.prototype.getLight=function(){return this.light.getLight()},D.prototype.setLight=function(q,K){K===void 0&&(K={}),this._checkLoaded();var de=this.light.getLight(),ne=!1;for(var we in q)if(!i.deepEqual(q[we],de[we])){ne=!0;break}if(ne){var Ue={now:i.browser.now(),transition:i.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(q,K),this.light.updateTransitions(Ue)}},D.prototype._validate=function(q,K,de,ne,we){return we===void 0&&(we={}),we&&we.validate===!1?!1:ml(this,q.call(i.validateStyle,i.extend({key:K,style:this.serialize(),value:de,styleSpec:i.styleSpec},ne)))},D.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),i.evented.off(\"pluginStateChange\",this._rtlTextPluginCallback);for(var q in this._layers){var K=this._layers[q];K.setEventedParent(null)}for(var de in this.sourceCaches)this.sourceCaches[de].clearTiles(),this.sourceCaches[de].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},D.prototype._clearSource=function(q){this.sourceCaches[q].clearTiles()},D.prototype._reloadSource=function(q){this.sourceCaches[q].resume(),this.sourceCaches[q].reload()},D.prototype._updateSources=function(q){for(var K in this.sourceCaches)this.sourceCaches[K].update(q)},D.prototype._generateCollisionBoxes=function(){for(var q in this.sourceCaches)this._reloadSource(q)},D.prototype._updatePlacement=function(q,K,de,ne,we){we===void 0&&(we=!1);for(var Ue=!1,ft=!1,Zt={},hr=0,qt=this._order;hr<qt.length;hr+=1){var Ve=qt[hr],et=this._layers[Ve];if(et.type===\"symbol\"){if(!Zt[et.source]){var at=this.sourceCaches[et.source];Zt[et.source]=at.getRenderableIds(!0).map(function(Pt){return at.getTileByID(Pt)}).sort(function(Pt,ht){return ht.tileID.overscaledZ-Pt.tileID.overscaledZ||(Pt.tileID.isLessThan(ht.tileID)?-1:1)})}var kt=this.crossTileSymbolIndex.addLayer(et,Zt[et.source],q.center.lng);Ue=Ue||kt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),we=we||this._layerOrderChanged||de===0,(we||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.browser.now(),q.zoom))&&(this.pauseablePlacement=new qo(q,this._order,we,K,de,ne,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Zt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.browser.now()),ft=!0),Ue&&this.pauseablePlacement.placement.setStale()),ft||Ue)for(var Ot=0,It=this._order;Ot<It.length;Ot+=1){var Bt=It[Ot],Rt=this._layers[Bt];Rt.type===\"symbol\"&&this.placement.updateLayerOpacities(Rt,Zt[Rt.source])}var mt=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.browser.now());return mt},D.prototype._releaseSymbolFadeTiles=function(){for(var q in this.sourceCaches)this.sourceCaches[q].releaseSymbolFadeTiles()},D.prototype.getImages=function(q,K,de){this.imageManager.getImages(K.icons,de),this._updateTilesForChangedImages();var ne=this.sourceCaches[K.source];ne&&ne.setDependencies(K.tileID.key,K.type,K.icons)},D.prototype.getGlyphs=function(q,K,de){this.glyphManager.getGlyphs(K.stacks,de)},D.prototype.getResource=function(q,K,de){return i.makeRequest(K,de)},D}(i.Evented);yu.getSourceType=De,yu.setSourceType=Pe,yu.registerForPluginStateChange=i.registerForPluginStateChange;var oc=i.createLayout([{name:\"a_pos\",type:\"Int16\",components:2}]),Cf=`#ifdef GL_ES\n",
       "precision mediump float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif`,sc=`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n",
       ");}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,Nh=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,kf=\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\",fs=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,nf=\"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}\",Vf=`varying vec3 v_data;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define mediump float radius\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define highp vec4 stroke_color\n",
       "#pragma mapbox: define mediump float stroke_width\n",
       "#pragma mapbox: define lowp float stroke_opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize highp vec4 stroke_color\n",
       "#pragma mapbox: initialize mediump float stroke_width\n",
       "#pragma mapbox: initialize lowp float stroke_opacity\n",
       "vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Jl=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define mediump float radius\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define highp vec4 stroke_color\n",
       "#pragma mapbox: define mediump float stroke_width\n",
       "#pragma mapbox: define lowp float stroke_opacity\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize highp vec4 stroke_color\n",
       "#pragma mapbox: initialize mediump float stroke_width\n",
       "#pragma mapbox: initialize lowp float stroke_opacity\n",
       "vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,hl=\"void main() {gl_FragColor=vec4(1.0);}\",lc=\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\",Fu=`uniform highp float u_intensity;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Cs=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#pragma mapbox: define mediump float radius\n",
       "const highp float ZERO=1.0/255.0/16.0;\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,js=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(0.0);\n",
       "#endif\n",
       "}`,Go=\"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\",gs=\"varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",uc=\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\",bl=\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",Gu=\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\",Bs=\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",ad=\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\",Po=`#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_FragColor=color*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,od=`attribute vec2 a_pos;uniform mat4 u_matrix;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);}`,Yo=`varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Pa=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,af=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Hu=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,wl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Gf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,Ic=`varying vec4 v_color;void main() {gl_FragColor=v_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,mf=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n",
       "#pragma mapbox: define highp float base\n",
       "#pragma mapbox: define highp float height\n",
       "#pragma mapbox: define highp vec4 color\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float base\n",
       "#pragma mapbox: initialize highp float height\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,_h=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n",
       "? a_pos\n",
       ": vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Qf=`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,yf=\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\",Yc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n",
       "#define PI 3.141592653589793\n",
       "void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,eh=\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\",th=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,ju=`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Hf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,cc=`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,of=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Nl=`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Kc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Rc=`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,ms=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,jf=\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\",Uh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,rh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,sf=`#define SDF_PX 8.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,xh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Mu=`#define SDF_PX 8.0\n",
       "#define SDF 1.0\n",
       "#define ICON 0.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,ih=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Ws=Vs(Cf,sc),Eu=Vs(Nh,kf),Dc=Vs(fs,nf),ks=Vs(Vf,Jl),bc=Vs(hl,lc),hu=Vs(Fu,Cs),_u=Vs(js,Go),al=Vs(gs,uc),nh=Vs(bl,Gu),bh=Vs(Bs,ad),zu=Vs(Po,od),Fc=Vs(Yo,Pa),wc=Vs(af,Hu),bd=Vs(wl,Gf),_f=Vs(Ic,mf),Lf=Vs(Bl,_h),Ou=Vs(Qf,yf),xf=Vs(Yc,eh),jl=Vs(th,ju),lf=Vs(Hf,cc),Vh=Vs(of,Nl),Pf=Vs(Kc,Rc),Ls=Vs(ms,jf),du=Vs(Uh,rh),Cu=Vs(sf,xh),Wf=Vs(Mu,ih);function Vs(Y,D){var J=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,q=D.match(/attribute ([\\w]+) ([\\w]+)/g),K=Y.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),de=D.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),ne=de?de.concat(K):K,we={};return Y=Y.replace(J,function(Ue,ft,Zt,hr,qt){return we[qt]=!0,ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "varying `+Zt+\" \"+hr+\" \"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifdef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`}),D=D.replace(J,function(Ue,ft,Zt,hr,qt){var Ve=hr===\"float\"?\"vec2\":\"vec4\",et=qt.match(/color/)?\"color\":Ve;return we[qt]?ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "uniform lowp float u_`+qt+`_t;\n",
       "attribute `+Zt+\" \"+Ve+\" a_\"+qt+`;\n",
       "varying `+Zt+\" \"+hr+\" \"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:et===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+qt+\" = a_\"+qt+`;\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+qt+\" = unpack_mix_\"+et+\"(a_\"+qt+\", u_\"+qt+`_t);\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "uniform lowp float u_`+qt+`_t;\n",
       "attribute `+Zt+\" \"+Ve+\" a_\"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:et===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = a_\"+qt+`;\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = unpack_mix_\"+et+\"(a_\"+qt+\", u_\"+qt+`_t);\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`}),{fragmentSource:Y,vertexSource:D,staticAttributes:q,staticUniforms:ne}}var bf=Object.freeze({__proto__:null,prelude:Ws,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:al,collisionCircle:nh,debug:bh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:_f,fillExtrusionPattern:Lf,hillshadePrepare:Ou,hillshade:xf,line:jl,lineGradient:lf,linePattern:Vh,lineSDF:Pf,raster:Ls,symbolIcon:du,symbolSDF:Cu,symbolTextAndIcon:Wf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,q,K,de,ne,we,Ue){this.context=D;for(var ft=this.boundPaintVertexBuffers.length!==K.length,Zt=0;!ft&&Zt<K.length;Zt++)this.boundPaintVertexBuffers[Zt]!==K[Zt]&&(ft=!0);var hr=!this.vao||this.boundProgram!==J||this.boundLayoutVertexBuffer!==q||ft||this.boundIndexBuffer!==de||this.boundVertexOffset!==ne||this.boundDynamicVertexBuffer!==we||this.boundDynamicVertexBuffer2!==Ue;!D.extVertexArrayObject||hr?this.freshBind(J,q,K,de,ne,we,Ue):(D.bindVertexArrayOES.set(this.vao),we&&we.bind(),de&&de.dynamicDraw&&de.bind(),Ue&&Ue.bind())},zc.prototype.freshBind=function(D,J,q,K,de,ne,we){var Ue,ft=D.numAttributes,Zt=this.context,hr=Zt.gl;if(Zt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Zt.extVertexArrayObject.createVertexArrayOES(),Zt.bindVertexArrayOES.set(this.vao),Ue=0,this.boundProgram=D,this.boundLayoutVertexBuffer=J,this.boundPaintVertexBuffers=q,this.boundIndexBuffer=K,this.boundVertexOffset=de,this.boundDynamicVertexBuffer=ne,this.boundDynamicVertexBuffer2=we;else{Ue=Zt.currentNumAttributes||0;for(var qt=ft;qt<Ue;qt++)hr.disableVertexAttribArray(qt)}J.enableAttributes(hr,D);for(var Ve=0,et=q;Ve<et.length;Ve+=1){var at=et[Ve];at.enableAttributes(hr,D)}ne&&ne.enableAttributes(hr,D),we&&we.enableAttributes(hr,D),J.bind(),J.setVertexAttribPointers(hr,D,de);for(var kt=0,Ot=q;kt<Ot.length;kt+=1){var It=Ot[kt];It.bind(),It.setVertexAttribPointers(hr,D,de)}ne&&(ne.bind(),ne.setVertexAttribPointers(hr,D,de)),K&&K.bind(),we&&(we.bind(),we.setVertexAttribPointers(hr,D,de)),Zt.currentNumAttributes=ft},zc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Wu(Y){for(var D=[],J=0;J<Y.length;J++)if(Y[J]!==null){var q=Y[J].split(\" \");D.push(q.pop())}return D}var If=function(D,J,q,K,de,ne){var we=D.gl;this.program=we.createProgram();for(var Ue=Wu(q.staticAttributes),ft=K?K.getBinderAttributes():[],Zt=Ue.concat(ft),hr=q.staticUniforms?Wu(q.staticUniforms):[],qt=K?K.getBinderUniforms():[],Ve=hr.concat(qt),et=[],at=0,kt=Ve;at<kt.length;at+=1){var Ot=kt[at];et.indexOf(Ot)<0&&et.push(Ot)}var It=K?K.defines():[];ne&&It.push(\"#define OVERDRAW_INSPECTOR;\");var Bt=It.concat(Ws.fragmentSource,q.fragmentSource).join(`\n",
       "`),Rt=It.concat(Ws.vertexSource,q.vertexSource).join(`\n",
       "`),mt=we.createShader(we.FRAGMENT_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(mt,Bt),we.compileShader(mt),we.attachShader(this.program,mt);var Pt=we.createShader(we.VERTEX_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(Pt,Rt),we.compileShader(Pt),we.attachShader(this.program,Pt),this.attributes={};var ht={};this.numAttributes=Zt.length;for(var cr=0;cr<this.numAttributes;cr++)Zt[cr]&&(we.bindAttribLocation(this.program,cr,Zt[cr]),this.attributes[Zt[cr]]=cr);we.linkProgram(this.program),we.deleteShader(Pt),we.deleteShader(mt);for(var br=0;br<et.length;br++){var Nr=et[br];if(Nr&&!ht[Nr]){var Ri=we.getUniformLocation(this.program,Nr);Ri&&(ht[Nr]=Ri)}}this.fixedUniforms=de(D,ht),this.binderUniforms=K?K.getUniforms(D,ht):[]};If.prototype.draw=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve,et,at,kt){var Ot,It=D.gl;if(!this.failedToCreate){D.program.set(this.program),D.setDepthMode(q),D.setStencilMode(K),D.setColorMode(de),D.setCullFace(ne);for(var Bt in this.fixedUniforms)this.fixedUniforms[Bt].set(we[Bt]);et&&et.setUniforms(D,this.binderUniforms,qt,{zoom:Ve});for(var Rt=(Ot={},Ot[It.LINES]=2,Ot[It.TRIANGLES]=3,Ot[It.LINE_STRIP]=1,Ot)[J],mt=0,Pt=hr.get();mt<Pt.length;mt+=1){var ht=Pt[mt],cr=ht.vaos||(ht.vaos={}),br=cr[Ue]||(cr[Ue]=new zc);br.bind(D,this,ft,et?et.getPaintVertexBuffers():[],Zt,ht.vertexOffset,at,kt),It.drawElements(J,ht.primitiveLength*Rt,It.UNSIGNED_SHORT,ht.primitiveOffset*Rt*2)}}};function Xu(Y,D,J){var q=1/Ss(J,1,D.transform.tileZoom),K=Math.pow(2,J.tileID.overscaledZ),de=J.tileSize*Math.pow(2,D.transform.tileZoom)/K,ne=de*(J.tileID.canonical.x+J.tileID.wrap*K),we=de*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[q,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[ne>>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function uf(Y,D,J,q){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Ue=ne.height,ft=Math.pow(2,q.tileID.overscaledZ),Zt=q.tileSize*Math.pow(2,J.transform.tileZoom)/ft,hr=Zt*(q.tileID.canonical.x+q.tileID.wrap*ft),qt=Zt*q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Ue],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/Ss(q,1,J.transform.tileZoom),u_pixel_coord_upper:[hr>>16,qt>>16],u_pixel_coord_lower:[hr&65535,qt&65535]}}var Xf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,q){var K=D.style.light,de=K.properties.get(\"position\"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get(\"anchor\")===\"viewport\"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Ue=K.properties.get(\"color\");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get(\"intensity\"),u_lightcolor:[Ue.r,Ue.g,Ue.b],u_vertical_gradient:+J,u_opacity:q}},Zu=function(Y,D,J,q,K,de,ne){return i.extend(ah(Y,D,J,q),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},Oc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},Tl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},qc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,q){return i.extend(qc(Y),Xu(J,D,q))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,q,K){return i.extend(cf(Y,D,J,q),{u_world:K})},At=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Xt=function(Y,D,J,q){var K=Y.transform,de,ne;if(q.paint.get(\"circle-pitch-alignment\")===\"map\"){var we=Ss(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(q.paint.get(\"circle-pitch-scale\")===\"map\"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,q.paint.get(\"circle-translate\"),q.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},kr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},Ar=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var q=Ss(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:q,u_extrude_scale:[D.pixelsToGLUnits[0]/(q*K),D.pixelsToGLUnits[1]/(q*K)],u_overscale_factor:de}},Ei=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Wi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},hn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},Tn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Bn=function(Y){return{u_matrix:Y}},Zi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},$i=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},an=function(Y,D,J,q){return{u_matrix:Y,u_extrude_scale:Ss(D,1,J),u_intensity:q}},Di=function(Y,D,J,q){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:q,u_opacity:D.paint.get(\"heatmap-opacity\")}},$n=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var q=J.paint.get(\"hillshade-shadow-color\"),K=J.paint.get(\"hillshade-highlight-color\"),de=J.paint.get(\"hillshade-accent-color\"),ne=J.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);J.paint.get(\"hillshade-illumination-anchor\")===\"viewport\"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get(\"hillshade-exaggeration\"),ne],u_shadow:q,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,q=i.create();return i.ortho(q,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(q,q,[0,-i.EXTENT,0]),{u_matrix:q,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),q=D.canonical.y;return[new i.MercatorCoordinate(0,q/J).toLngLat().lat,new i.MercatorCoordinate(0,(q+1)/J).toLngLat().lat]}var Yn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},zn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Xo=function(Y,D,J){var q=Y.transform;return{u_matrix:yl(Y,D,J),u_ratio:1/Ss(D,1,q.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},Ms=function(Y,D,J,q){return i.extend(Xo(Y,D,J),{u_image:0,u_image_height:q})},os=function(Y,D,J,q){var K=Y.transform,de=Ho(D,K);return{u_matrix:yl(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/Ss(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,q.fromScale,q.toScale],u_fade:q.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},Ts=function(Y,D,J,q,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Ue=J.layout.get(\"line-cap\")===\"round\",ft=ne.getDash(q.from,Ue),Zt=ne.getDash(q.to,Ue),hr=ft.width*K.fromScale,qt=Zt.width*K.toScale;return i.extend(Xo(Y,D,J),{u_patternscale_a:[we/hr,-ft.height/2],u_patternscale_b:[we/qt,-Zt.height/2],u_sdfgamma:ne.width/(Math.min(hr,qt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ft.y,u_tex_y_b:Zt.y,u_mix:K.t})};function Ho(Y,D){return 1/Ss(Y,1,D.tileZoom)}function yl(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get(\"line-translate\"),J.paint.get(\"line-translate-anchor\"))}var Xs=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ps=function(Y,D,J,q,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:q.mix,u_opacity:q.opacity*K.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get(\"raster-brightness-min\"),u_brightness_high:K.paint.get(\"raster-brightness-max\"),u_saturation_factor:_s(K.paint.get(\"raster-saturation\")),u_contrast_factor:no(K.paint.get(\"raster-contrast\")),u_spin_weights:va(K.paint.get(\"raster-hue-rotate\"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function _s(Y){return Y>0?1-1/(1.001-Y):-Y}var is=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},$l=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},ku=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,q,K,de,ne,we,Ue,ft){var Zt=K.transform;return{u_is_size_zoom_constant:+(Y===\"constant\"||Y===\"source\"),u_is_size_feature_constant:+(Y===\"constant\"||Y===\"camera\"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Zt.cameraToCenterDistance,u_pitch:Zt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Zt.width/Zt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Ue,u_pitch_with_map:+q,u_texsize:ft,u_texture:0}},Nc=function(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=K.transform;return i.extend(Yu(Y,D,J,q,K,de,ne,we,Ue,ft),{u_gamma_scale:q?Math.cos(hr._pitch)*hr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Zt})},pu=function(Y,D,J,q,K,de,ne,we,Ue,ft){return i.extend(Nc(Y,D,J,q,K,de,ne,we,!0,Ue,!0),{u_texsize_icon:ft,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,q,K,de){return i.extend(uf(q,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Xf,fillExtrusionPattern:Wl,fill:Oc,fillPattern:Tc,fillOutline:Tl,fillOutlinePattern:vu,circle:At,collisionBox:kr,collisionCircle:Ar,debug:Wi,clippingMask:Tn,heatmap:Zi,heatmapTexture:$i,hillshade:$n,hillshadePrepare:ka,line:Yn,lineGradient:zn,linePattern:Ka,lineSDF:bo,raster:Xs,symbolIcon:is,symbolSDF:$l,symbolTextAndIcon:ku,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=Y.useProgram(\"collisionBox\"),Zt=[],hr=0,qt=0,Ve=0;Ve<q.length;Ve++){var et=q[Ve],at=D.getTile(et),kt=at.getBucket(J);if(kt){var Ot=et.posMatrix;(K[0]!==0||K[1]!==0)&&(Ot=Y.translatePosMatrix(et.posMatrix,at,K,de));var It=ne?kt.textCollisionBox:kt.iconCollisionBox,Bt=kt.collisionCircleArray;if(Bt.length>0){var Rt=i.create(),mt=Ot;i.mul(Rt,kt.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Rt,Rt,kt.placementViewportMatrix),Zt.push({circleArray:Bt,circleOffset:qt,transform:mt,invTransform:Rt}),hr+=Bt.length/4,qt=hr}It&&ft.draw(we,Ue.LINES,wn.disabled,kn.disabled,Y.colorModeForRenderPass(),Er.disabled,Kr(Ot,Y.transform,at),J.id,It.layoutVertexBuffer,It.indexBuffer,It.segments,null,Y.transform.zoom,null,null,It.collisionVertexBuffer)}}if(!(!ne||!Zt.length)){var Pt=Y.useProgram(\"collisionCircle\"),ht=new i.StructArrayLayout2f1f2i16;ht.resize(hr*4),ht._trim();for(var cr=0,br=0,Nr=Zt;br<Nr.length;br+=1)for(var Ri=Nr[br],hi=0;hi<Ri.circleArray.length/4;hi++){var wi=hi*4,gn=Ri.circleArray[wi+0],tn=Ri.circleArray[wi+1],Ci=Ri.circleArray[wi+2],qi=Ri.circleArray[wi+3];ht.emplace(cr++,gn,tn,Ci,qi,0),ht.emplace(cr++,gn,tn,Ci,qi,1),ht.emplace(cr++,gn,tn,Ci,qi,2),ht.emplace(cr++,gn,tn,Ci,qi,3)}(!Vc||Vc.length<hr*2)&&(Vc=Ku(hr));for(var Vi=we.createIndexBuffer(Vc,!0),on=we.createVertexBuffer(ht,i.collisionCircleLayout.members,!0),On=0,Ja=Zt;On<Ja.length;On+=1){var co=Ja[On],rs=Ei(co.transform,co.invTransform,Y.transform);Pt.draw(we,Ue.TRIANGLES,wn.disabled,kn.disabled,Y.colorModeForRenderPass(),Er.disabled,rs,J.id,on,Vi,i.SegmentVector.simpleSegment(0,co.circleOffset*2,co.circleArray.length,co.circleArray.length/2),null,Y.transform.zoom,null,null,null)}on.destroy(),Vi.destroy()}}function Ku(Y){var D=Y*2,J=new i.StructArrayLayout3ui6;J.resize(D),J._trim();for(var q=0;q<D;q++){var K=q*6;J.uint16[K+0]=q*4+0,J.uint16[K+1]=q*4+1,J.uint16[K+2]=q*4+2,J.uint16[K+3]=q*4+2,J.uint16[K+4]=q*4+3,J.uint16[K+5]=q*4+0}return J}var ue=i.identity(new Float32Array(16));function w(Y,D,J,q,K){if(Y.renderPass===\"translucent\"){var de=kn.disabled,ne=Y.colorModeForRenderPass(),we=J.layout.get(\"text-variable-anchor\");we&&Q(q,Y,J,D,J.layout.get(\"text-rotation-alignment\"),J.layout.get(\"text-pitch-alignment\"),K),J.paint.get(\"icon-opacity\").constantOr(1)!==0&&qe(Y,D,J,q,!1,J.paint.get(\"icon-translate\"),J.paint.get(\"icon-translate-anchor\"),J.layout.get(\"icon-rotation-alignment\"),J.layout.get(\"icon-pitch-alignment\"),J.layout.get(\"icon-keep-upright\"),de,ne),J.paint.get(\"text-opacity\").constantOr(1)!==0&&qe(Y,D,J,q,!0,J.paint.get(\"text-translate\"),J.paint.get(\"text-translate-anchor\"),J.layout.get(\"text-rotation-alignment\"),J.layout.get(\"text-pitch-alignment\"),J.layout.get(\"text-keep-upright\"),de,ne),D.map.showCollisionBoxes&&(hc(Y,D,J,q,J.paint.get(\"text-translate\"),J.paint.get(\"text-translate-anchor\"),!0),hc(Y,D,J,q,J.paint.get(\"icon-translate\"),J.paint.get(\"icon-translate-anchor\"),!1))}}function B(Y,D,J,q,K,de){var ne=i.getAnchorAlignment(Y),we=ne.horizontalAlign,Ue=ne.verticalAlign,ft=-(we-.5)*D,Zt=-(Ue-.5)*J,hr=i.evaluateVariableOffset(Y,q);return new i.Point((ft/K+hr[0])*de,(Zt/K+hr[1])*de)}function Q(Y,D,J,q,K,de,ne){for(var we=D.transform,Ue=K===\"map\",ft=de===\"map\",Zt=0,hr=Y;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=q.getTile(qt),et=Ve.getBucket(J);if(!(!et||!et.text||!et.text.segments.get().length)){var at=et.textSizeData,kt=i.evaluateSizeForZoom(at,we.zoom),Ot=Ss(Ve,1,D.transform.zoom),It=_n(qt.posMatrix,ft,Ue,D.transform,Ot),Bt=J.layout.get(\"icon-text-fit\")!==\"none\"&&et.hasIconData();if(kt){var Rt=Math.pow(2,we.zoom-Ve.tileID.overscaledZ);ee(et,Ue,ft,ne,i.symbolSize,we,It,qt.posMatrix,Rt,kt,Bt)}}}}function ee(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=Y.text.placedSymbolArray,qt=Y.text.dynamicLayoutVertexArray,Ve=Y.icon.dynamicLayoutVertexArray,et={};qt.clear();for(var at=0;at<hr.length;at++){var kt=hr.get(at),Ot=Y.allowVerticalPlacement&&!kt.placedOrientation,It=!kt.hidden&&kt.crossTileID&&!Ot?q[kt.crossTileID]:null;if(!It)cl(kt.numGlyphs,qt);else{var Bt=new i.Point(kt.anchorX,kt.anchorY),Rt=Jn(Bt,J?we:ne),mt=Ma(de.cameraToCenterDistance,Rt.signedDistanceFromCamera),Pt=K.evaluateSizeForFeature(Y.textSizeData,ft,kt)*mt/i.ONE_EM;J&&(Pt*=Y.tilePixelRatio/Ue);for(var ht=It.width,cr=It.height,br=It.anchor,Nr=It.textOffset,Ri=It.textBoxScale,hi=B(br,ht,cr,Nr,Ri,Pt),wi=J?Jn(Bt.add(hi),ne).point:Rt.point.add(D?hi.rotate(-de.angle):hi),gn=Y.allowVerticalPlacement&&kt.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,tn=0;tn<kt.numGlyphs;tn++)i.addDynamicAttributes(qt,wi,gn);Zt&&kt.associatedIconIndex>=0&&(et[kt.associatedIconIndex]={shiftedAnchor:wi,angle:gn})}}if(Zt){Ve.clear();for(var Ci=Y.icon.placedSymbolArray,qi=0;qi<Ci.length;qi++){var Vi=Ci.get(qi);if(Vi.hidden)cl(Vi.numGlyphs,Ve);else{var on=et[qi];if(!on)cl(Vi.numGlyphs,Ve);else for(var On=0;On<Vi.numGlyphs;On++)i.addDynamicAttributes(Ve,on.shiftedAnchor,on.angle)}}Y.icon.dynamicLayoutVertexBuffer.updateData(Ve)}Y.text.dynamicLayoutVertexBuffer.updateData(qt)}function le(Y,D,J){return J.iconsInText&&D?\"symbolTextAndIcon\":Y?\"symbolSDF\":\"symbolIcon\"}function qe(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr){for(var qt=Y.context,Ve=qt.gl,et=Y.transform,at=we===\"map\",kt=Ue===\"map\",Ot=at&&J.layout.get(\"symbol-placement\")!==\"point\",It=at&&!kt&&!Ot,Bt=J.layout.get(\"symbol-sort-key\").constantOr(1)!==void 0,Rt=!1,mt=Y.depthModeForSublayer(0,wn.ReadOnly),Pt=J.layout.get(\"text-variable-anchor\"),ht=[],cr=0,br=q;cr<br.length;cr+=1){var Nr=br[cr],Ri=D.getTile(Nr),hi=Ri.getBucket(J);if(hi){var wi=K?hi.text:hi.icon;if(!(!wi||!wi.segments.get().length)){var gn=wi.programConfigurations.get(J.id),tn=K||hi.sdfIcons,Ci=K?hi.textSizeData:hi.iconSizeData,qi=kt||et.pitch!==0,Vi=Y.useProgram(le(tn,K,hi),gn),on=i.evaluateSizeForZoom(Ci,et.zoom),On=void 0,Ja=[0,0],co=void 0,rs=void 0,so=null,Zo=void 0;if(K){if(co=Ri.glyphAtlasTexture,rs=Ve.LINEAR,On=Ri.glyphAtlasTexture.size,hi.iconsInText){Ja=Ri.imageAtlasTexture.size,so=Ri.imageAtlasTexture;var ys=Ci.kind===\"composite\"||Ci.kind===\"camera\";Zo=qi||Y.options.rotating||Y.options.zooming||ys?Ve.LINEAR:Ve.NEAREST}}else{var ou=J.layout.get(\"icon-size\").constantOr(0)!==1||hi.iconsNeedLinear;co=Ri.imageAtlasTexture,rs=tn||Y.options.rotating||Y.options.zooming||ou||qi?Ve.LINEAR:Ve.NEAREST,On=Ri.imageAtlasTexture.size}var Cv=Ss(Ri,1,Y.transform.zoom),kv=_n(Nr.posMatrix,kt,at,Y.transform,Cv),wd=ya(Nr.posMatrix,kt,at,Y.transform,Cv),Yv=Pt&&hi.hasTextData(),cg=J.layout.get(\"icon-text-fit\")!==\"none\"&&Yv&&hi.hasIconData();Ot&&No(hi,Nr.posMatrix,Y,K,kv,wd,kt,ft);var dp=Y.translatePosMatrix(Nr.posMatrix,Ri,de,ne),Td=Ot||K&&Pt||cg?ue:kv,vp=Y.translatePosMatrix(wd,Ri,de,ne,!0),Vd=tn&&J.paint.get(K?\"text-halo-width\":\"icon-halo-width\").constantOr(1)!==0,Ad=void 0;tn?hi.iconsInText?Ad=pu(Ci.kind,on,It,kt,Y,dp,Td,vp,On,Ja):Ad=Nc(Ci.kind,on,It,kt,Y,dp,Td,vp,K,On,!0):Ad=Yu(Ci.kind,on,It,kt,Y,dp,Td,vp,K,On);var Lv={program:Vi,buffers:wi,uniformValues:Ad,atlasTexture:co,atlasTextureIcon:so,atlasInterpolation:rs,atlasInterpolationIcon:Zo,isSDF:tn,hasHalo:Vd};if(Bt&&hi.canOverlap){Rt=!0;for(var Kv=wi.segments.get(),Pv=0,ny=Kv;Pv<ny.length;Pv+=1){var fg=ny[Pv];ht.push({segments:new i.SegmentVector([fg]),sortKey:fg.sortKey,state:Lv})}}else ht.push({segments:wi.segments,sortKey:0,state:Lv})}}}Rt&&ht.sort(function(w1,T1){return w1.sortKey-T1.sortKey});for(var oh=0,hg=ht;oh<hg.length;oh+=1){var ay=hg[oh],Gh=ay.state;if(qt.activeTexture.set(Ve.TEXTURE0),Gh.atlasTexture.bind(Gh.atlasInterpolation,Ve.CLAMP_TO_EDGE),Gh.atlasTextureIcon&&(qt.activeTexture.set(Ve.TEXTURE1),Gh.atlasTextureIcon&&Gh.atlasTextureIcon.bind(Gh.atlasInterpolationIcon,Ve.CLAMP_TO_EDGE)),Gh.isSDF){var rm=Gh.uniformValues;Gh.hasHalo&&(rm.u_is_halo=1,Xe(Gh.buffers,ay.segments,J,Y,Gh.program,mt,Zt,hr,rm)),rm.u_is_halo=0}Xe(Gh.buffers,ay.segments,J,Y,Gh.program,mt,Zt,hr,Gh.uniformValues)}}function Xe(Y,D,J,q,K,de,ne,we,Ue){var ft=q.context,Zt=ft.gl;K.draw(ft,Zt.TRIANGLES,de,ne,we,Er.disabled,Ue,J.id,Y.layoutVertexBuffer,Y.indexBuffer,D,J.paint,q.transform.zoom,Y.programConfigurations.get(J.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function ot(Y,D,J,q){if(Y.renderPass===\"translucent\"){var K=J.paint.get(\"circle-opacity\"),de=J.paint.get(\"circle-stroke-width\"),ne=J.paint.get(\"circle-stroke-opacity\"),we=J.layout.get(\"circle-sort-key\").constantOr(1)!==void 0;if(!(K.constantOr(1)===0&&(de.constantOr(1)===0||ne.constantOr(1)===0))){for(var Ue=Y.context,ft=Ue.gl,Zt=Y.depthModeForSublayer(0,wn.ReadOnly),hr=kn.disabled,qt=Y.colorModeForRenderPass(),Ve=[],et=0;et<q.length;et++){var at=q[et],kt=D.getTile(at),Ot=kt.getBucket(J);if(Ot){var It=Ot.programConfigurations.get(J.id),Bt=Y.useProgram(\"circle\",It),Rt=Ot.layoutVertexBuffer,mt=Ot.indexBuffer,Pt=Xt(Y,at,kt,J),ht={programConfiguration:It,program:Bt,layoutVertexBuffer:Rt,indexBuffer:mt,uniformValues:Pt};if(we)for(var cr=Ot.segments.get(),br=0,Nr=cr;br<Nr.length;br+=1){var Ri=Nr[br];Ve.push({segments:new i.SegmentVector([Ri]),sortKey:Ri.sortKey,state:ht})}else Ve.push({segments:Ot.segments,sortKey:0,state:ht})}}we&&Ve.sort(function(co,rs){return co.sortKey-rs.sortKey});for(var hi=0,wi=Ve;hi<wi.length;hi+=1){var gn=wi[hi],tn=gn.state,Ci=tn.programConfiguration,qi=tn.program,Vi=tn.layoutVertexBuffer,on=tn.indexBuffer,On=tn.uniformValues,Ja=gn.segments;qi.draw(Ue,ft.TRIANGLES,Zt,hr,qt,Er.disabled,On,J.id,Vi,on,Ja,J.paint,Y.transform.zoom,Ci)}}}}function Tt(Y,D,J,q){if(J.paint.get(\"heatmap-opacity\")!==0)if(Y.renderPass===\"offscreen\"){var K=Y.context,de=K.gl,ne=kn.disabled,we=new _t([de.ONE,de.ONE],i.Color.transparent,[!0,!0,!0,!0]);Kt(K,Y,J),K.clear({color:i.Color.transparent});for(var Ue=0;Ue<q.length;Ue++){var ft=q[Ue];if(!D.hasRenderableParent(ft)){var Zt=D.getTile(ft),hr=Zt.getBucket(J);if(hr){var qt=hr.programConfigurations.get(J.id),Ve=Y.useProgram(\"heatmap\",qt),et=Y.transform,at=et.zoom;Ve.draw(K,de.TRIANGLES,wn.disabled,ne,we,Er.disabled,an(ft.posMatrix,Zt,at,J.paint.get(\"heatmap-intensity\")),J.id,hr.layoutVertexBuffer,hr.indexBuffer,hr.segments,J.paint,Y.transform.zoom,qt)}}}K.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass===\"translucent\"&&(Y.context.setColorMode(Y.colorModeForRenderPass()),xr(Y,J))}function Kt(Y,D,J){var q=Y.gl;Y.activeTexture.set(q.TEXTURE1),Y.viewport.set([0,0,D.width/4,D.height/4]);var K=J.heatmapFbo;if(K)q.bindTexture(q.TEXTURE_2D,K.colorAttachment.get()),Y.bindFramebuffer.set(K.framebuffer);else{var de=q.createTexture();q.bindTexture(q.TEXTURE_2D,de),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.LINEAR),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.LINEAR),K=J.heatmapFbo=Y.createFramebuffer(D.width/4,D.height/4,!1),Jt(Y,D,de,K)}}function Jt(Y,D,J,q){var K=Y.gl,de=Y.extRenderToTextureHalfFloat?Y.extTextureHalfFloat.HALF_FLOAT_OES:K.UNSIGNED_BYTE;K.texImage2D(K.TEXTURE_2D,0,K.RGBA,D.width/4,D.height/4,0,K.RGBA,de,null),q.colorAttachment.set(J)}function xr(Y,D){var J=Y.context,q=J.gl,K=D.heatmapFbo;if(K){J.activeTexture.set(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,K.colorAttachment.get()),J.activeTexture.set(q.TEXTURE1);var de=D.colorRampTexture;de||(de=D.colorRampTexture=new i.Texture(J,D.colorRamp,q.RGBA)),de.bind(q.LINEAR,q.CLAMP_TO_EDGE),Y.useProgram(\"heatmapTexture\").draw(J,q.TRIANGLES,wn.disabled,kn.disabled,Y.colorModeForRenderPass(),Er.disabled,Di(Y,D,0,1),D.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,D.paint,Y.transform.zoom)}}function Pr(Y,D,J,q){if(Y.renderPass===\"translucent\"){var K=J.paint.get(\"line-opacity\"),de=J.paint.get(\"line-width\");if(!(K.constantOr(1)===0||de.constantOr(1)===0))for(var ne=Y.depthModeForSublayer(0,wn.ReadOnly),we=Y.colorModeForRenderPass(),Ue=J.paint.get(\"line-dasharray\"),ft=J.paint.get(\"line-pattern\"),Zt=ft.constantOr(1),hr=J.paint.get(\"line-gradient\"),qt=J.getCrossfadeParameters(),Ve=Zt?\"linePattern\":Ue?\"lineSDF\":hr?\"lineGradient\":\"line\",et=Y.context,at=et.gl,kt=!0,Ot=0,It=q;Ot<It.length;Ot+=1){var Bt=It[Ot],Rt=D.getTile(Bt);if(!(Zt&&!Rt.patternsLoaded())){var mt=Rt.getBucket(J);if(mt){var Pt=mt.programConfigurations.get(J.id),ht=Y.context.program.get(),cr=Y.useProgram(Ve,Pt),br=kt||cr.program!==ht,Nr=ft.constantOr(null);if(Nr&&Rt.imageAtlas){var Ri=Rt.imageAtlas,hi=Ri.patternPositions[Nr.to.toString()],wi=Ri.patternPositions[Nr.from.toString()];hi&&wi&&Pt.setConstantPatternPositions(hi,wi)}var gn=Zt?os(Y,Rt,J,qt):Ue?Ts(Y,Rt,J,Ue,qt):hr?Ms(Y,Rt,J,mt.lineClipsArray.length):Xo(Y,Rt,J);if(Zt)et.activeTexture.set(at.TEXTURE0),Rt.imageAtlasTexture.bind(at.LINEAR,at.CLAMP_TO_EDGE),Pt.updatePaintBuffers(qt);else if(Ue&&(br||Y.lineAtlas.dirty))et.activeTexture.set(at.TEXTURE0),Y.lineAtlas.bind(et);else if(hr){var tn=mt.gradients[J.id],Ci=tn.texture;if(J.gradientVersion!==tn.version){var qi=256;if(J.stepInterpolant){var Vi=D.getSource().maxzoom,on=Bt.canonical.z===Vi?Math.ceil(1<<Y.transform.maxZoom-Bt.canonical.z):1,On=mt.maxLineLength/i.EXTENT,Ja=1024,co=On*Ja*on;qi=i.clamp(i.nextPowerOfTwo(co),256,et.maxTextureSize)}tn.gradient=i.renderColorRamp({expression:J.gradientExpression(),evaluationKey:\"lineProgress\",resolution:qi,image:tn.gradient||void 0,clips:mt.lineClipsArray}),tn.texture?tn.texture.update(tn.gradient):tn.texture=new i.Texture(et,tn.gradient,at.RGBA),tn.version=J.gradientVersion,Ci=tn.texture}et.activeTexture.set(at.TEXTURE0),Ci.bind(J.stepInterpolant?at.NEAREST:at.LINEAR,at.CLAMP_TO_EDGE)}cr.draw(et,at.TRIANGLES,ne,Y.stencilModeForClipping(Bt),we,Er.disabled,gn,J.id,mt.layoutVertexBuffer,mt.indexBuffer,mt.segments,J.paint,Y.transform.zoom,Pt,mt.layoutVertexBuffer2),kt=!1}}}}}function ve(Y,D,J,q){var K=J.paint.get(\"fill-color\"),de=J.paint.get(\"fill-opacity\");if(de.constantOr(1)!==0){var ne=Y.colorModeForRenderPass(),we=J.paint.get(\"fill-pattern\"),Ue=Y.opaquePassEnabledForLayer()&&!we.constantOr(1)&&K.constantOr(i.Color.transparent).a===1&&de.constantOr(0)===1?\"opaque\":\"translucent\";if(Y.renderPass===Ue){var ft=Y.depthModeForSublayer(1,Y.renderPass===\"opaque\"?wn.ReadWrite:wn.ReadOnly);be(Y,D,J,q,ft,ne,!1)}if(Y.renderPass===\"translucent\"&&J.paint.get(\"fill-antialias\")){var Zt=Y.depthModeForSublayer(J.getPaintProperty(\"fill-outline-color\")?2:0,wn.ReadOnly);be(Y,D,J,q,Zt,ne,!0)}}}function be(Y,D,J,q,K,de,ne){var we=Y.context.gl,Ue=J.paint.get(\"fill-pattern\"),ft=Ue&&Ue.constantOr(1),Zt=J.getCrossfadeParameters(),hr,qt,Ve,et,at;ne?(qt=ft&&!J.getPaintProperty(\"fill-outline-color\")?\"fillOutlinePattern\":\"fillOutline\",hr=we.LINES):(qt=ft?\"fillPattern\":\"fill\",hr=we.TRIANGLES);for(var kt=0,Ot=q;kt<Ot.length;kt+=1){var It=Ot[kt],Bt=D.getTile(It);if(!(ft&&!Bt.patternsLoaded())){var Rt=Bt.getBucket(J);if(Rt){var mt=Rt.programConfigurations.get(J.id),Pt=Y.useProgram(qt,mt);ft&&(Y.context.activeTexture.set(we.TEXTURE0),Bt.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),mt.updatePaintBuffers(Zt));var ht=Ue.constantOr(null);if(ht&&Bt.imageAtlas){var cr=Bt.imageAtlas,br=cr.patternPositions[ht.to.toString()],Nr=cr.patternPositions[ht.from.toString()];br&&Nr&&mt.setConstantPatternPositions(br,Nr)}var Ri=Y.translatePosMatrix(It.posMatrix,Bt,J.paint.get(\"fill-translate\"),J.paint.get(\"fill-translate-anchor\"));if(!ne)et=Rt.indexBuffer,at=Rt.segments,Ve=ft?cf(Ri,Y,Zt,Bt):qc(Ri);else{et=Rt.indexBuffer2,at=Rt.segments2;var hi=[we.drawingBufferWidth,we.drawingBufferHeight];Ve=qt===\"fillOutlinePattern\"&&ft?Bc(Ri,Y,Zt,Bt,hi):fc(Ri,hi)}Pt.draw(Y.context,hr,K,Y.stencilModeForClipping(It),de,Er.disabled,Ve,J.id,Rt.layoutVertexBuffer,et,at,J.paint,Y.transform.zoom,mt)}}}}function Re(Y,D,J,q){var K=J.paint.get(\"fill-extrusion-opacity\");if(K!==0&&Y.renderPass===\"translucent\"){var de=new wn(Y.context.gl.LEQUAL,wn.ReadWrite,Y.depthRangeFor3D);if(K===1&&!J.paint.get(\"fill-extrusion-pattern\").constantOr(1)){var ne=Y.colorModeForRenderPass();Be(Y,D,J,q,de,kn.disabled,ne)}else Be(Y,D,J,q,de,kn.disabled,_t.disabled),Be(Y,D,J,q,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass())}}function Be(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=J.paint.get(\"fill-extrusion-pattern\"),Zt=ft.constantOr(1),hr=J.getCrossfadeParameters(),qt=J.paint.get(\"fill-extrusion-opacity\"),Ve=0,et=q;Ve<et.length;Ve+=1){var at=et[Ve],kt=D.getTile(at),Ot=kt.getBucket(J);if(Ot){var It=Ot.programConfigurations.get(J.id),Bt=Y.useProgram(Zt?\"fillExtrusionPattern\":\"fillExtrusion\",It);Zt&&(Y.context.activeTexture.set(Ue.TEXTURE0),kt.imageAtlasTexture.bind(Ue.LINEAR,Ue.CLAMP_TO_EDGE),It.updatePaintBuffers(hr));var Rt=ft.constantOr(null);if(Rt&&kt.imageAtlas){var mt=kt.imageAtlas,Pt=mt.patternPositions[Rt.to.toString()],ht=mt.patternPositions[Rt.from.toString()];Pt&&ht&&It.setConstantPatternPositions(Pt,ht)}var cr=Y.translatePosMatrix(at.posMatrix,kt,J.paint.get(\"fill-extrusion-translate\"),J.paint.get(\"fill-extrusion-translate-anchor\")),br=J.paint.get(\"fill-extrusion-vertical-gradient\"),Nr=Zt?Zu(cr,Y,br,qt,at,hr,kt):ah(cr,Y,br,qt);Bt.draw(we,we.gl.TRIANGLES,K,de,ne,Er.backCCW,Nr,J.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,J.paint,Y.transform.zoom,It)}}}function tt(Y,D,J,q){if(!(Y.renderPass!==\"offscreen\"&&Y.renderPass!==\"translucent\")){for(var K=Y.context,de=Y.depthModeForSublayer(0,wn.ReadOnly),ne=Y.colorModeForRenderPass(),we=Y.renderPass===\"translucent\"?Y.stencilConfigForOverlap(q):[{},q],Ue=we[0],ft=we[1],Zt=0,hr=ft;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=D.getTile(qt);Ve.needsHillshadePrepare&&Y.renderPass===\"offscreen\"?it(Y,Ve,J,de,kn.disabled,ne):Y.renderPass===\"translucent\"&&We(Y,Ve,J,de,Ue[qt.overscaledZ],ne)}K.viewport.set([0,0,Y.width,Y.height])}}function We(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl,Ue=D.fbo;if(Ue){var ft=Y.useProgram(\"hillshade\");ne.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,Ue.colorAttachment.get());var Zt=Ra(Y,D,J);ft.draw(ne,we.TRIANGLES,q,K,de,Er.disabled,Zt,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function it(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl,Ue=D.dem;if(Ue&&Ue.data){var ft=Ue.dim,Zt=Ue.stride,hr=Ue.getPixels();if(ne.activeTexture.set(we.TEXTURE1),ne.pixelStoreUnpackPremultiplyAlpha.set(!1),D.demTexture=D.demTexture||Y.getTileTexture(Zt),D.demTexture){var qt=D.demTexture;qt.update(hr,{premultiply:!1}),qt.bind(we.NEAREST,we.CLAMP_TO_EDGE)}else D.demTexture=new i.Texture(ne,hr,we.RGBA,{premultiply:!1}),D.demTexture.bind(we.NEAREST,we.CLAMP_TO_EDGE);ne.activeTexture.set(we.TEXTURE0);var Ve=D.fbo;if(!Ve){var et=new i.Texture(ne,{width:ft,height:ft,data:null},we.RGBA);et.bind(we.LINEAR,we.CLAMP_TO_EDGE),Ve=D.fbo=ne.createFramebuffer(ft,ft,!0),Ve.colorAttachment.set(et.texture)}ne.bindFramebuffer.set(Ve.framebuffer),ne.viewport.set([0,0,ft,ft]),Y.useProgram(\"hillshadePrepare\").draw(ne,we.TRIANGLES,q,K,de,Er.disabled,La(D.tileID,Ue),J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),D.needsHillshadePrepare=!1}}function Dt(Y,D,J,q){if(Y.renderPass===\"translucent\"&&J.paint.get(\"raster-opacity\")!==0&&q.length)for(var K=Y.context,de=K.gl,ne=D.getSource(),we=Y.useProgram(\"raster\"),Ue=Y.colorModeForRenderPass(),ft=ne instanceof ke?[{},q]:Y.stencilConfigForOverlap(q),Zt=ft[0],hr=ft[1],qt=hr[hr.length-1].overscaledZ,Ve=!Y.options.moving,et=0,at=hr;et<at.length;et+=1){var kt=at[et],Ot=Y.depthModeForSublayer(kt.overscaledZ-qt,J.paint.get(\"raster-opacity\")===1?wn.ReadWrite:wn.ReadOnly,de.LESS),It=D.getTile(kt),Bt=Y.transform.calculatePosMatrix(kt.toUnwrapped(),Ve);It.registerFadeDuration(J.paint.get(\"raster-fade-duration\"));var Rt=D.findLoadedParent(kt,0),mt=Ht(It,Rt,D,J,Y.transform),Pt=void 0,ht=void 0,cr=J.paint.get(\"raster-resampling\")===\"nearest\"?de.NEAREST:de.LINEAR;K.activeTexture.set(de.TEXTURE0),It.texture.bind(cr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),K.activeTexture.set(de.TEXTURE1),Rt?(Rt.texture.bind(cr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),Pt=Math.pow(2,Rt.tileID.overscaledZ-It.tileID.overscaledZ),ht=[It.tileID.canonical.x*Pt%1,It.tileID.canonical.y*Pt%1]):It.texture.bind(cr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST);var br=Ps(Bt,ht||[0,0],Pt||1,mt,J);ne instanceof ke?we.draw(K,de.TRIANGLES,Ot,kn.disabled,Ue,Er.disabled,br,J.id,ne.boundsBuffer,Y.quadTriangleIndexBuffer,ne.boundsSegments):we.draw(K,de.TRIANGLES,Ot,Zt[kt.overscaledZ],Ue,Er.disabled,br,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function Ht(Y,D,J,q,K){var de=q.paint.get(\"raster-fade-duration\");if(de>0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Ue=D?(ne-D.timeAdded)/de:-1,ft=J.getSource(),Zt=K.coveringZoomLevel({tileSize:ft.tileSize,roundZoom:ft.roundZoom}),hr=!D||Math.abs(D.tileID.overscaledZ-Zt)>Math.abs(Y.tileID.overscaledZ-Zt),qt=hr&&Y.refreshedUponExpiration?1:i.clamp(hr?we:1-Ue,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function rr(Y,D,J){var q=J.paint.get(\"background-color\"),K=J.paint.get(\"background-opacity\");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Ue=we.tileSize,ft=J.paint.get(\"background-pattern\");if(!Y.isPatternMissing(ft)){var Zt=!ft&&q.a===1&&K===1&&Y.opaquePassEnabledForLayer()?\"opaque\":\"translucent\";if(Y.renderPass===Zt){var hr=kn.disabled,qt=Y.depthModeForSublayer(0,Zt===\"opaque\"?wn.ReadWrite:wn.ReadOnly),Ve=Y.colorModeForRenderPass(),et=Y.useProgram(ft?\"backgroundPattern\":\"background\"),at=we.coveringTiles({tileSize:Ue});ft&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var kt=J.getCrossfadeParameters(),Ot=0,It=at;Ot<It.length;Ot+=1){var Bt=It[Ot],Rt=Y.transform.calculatePosMatrix(Bt.toUnwrapped()),mt=ft?Ua(Rt,K,Y,ft,{tileID:Bt,tileSize:Ue},kt):Ac(Rt,K,q);et.draw(de,ne.TRIANGLES,qt,hr,Ve,Er.disabled,mt,J.id,Y.tileExtentBuffer,Y.quadTriangleIndexBuffer,Y.tileExtentSegments)}}}}}var dr=new i.Color(1,0,0,1),Sr=new i.Color(0,1,0,1),Or=new i.Color(0,0,1,1),jr=new i.Color(1,0,1,1),ii=new i.Color(0,1,1,1);function Li(Y){var D=Y.transform.padding,J=3;sn(Y,Y.transform.height-(D.top||0),J,dr),sn(Y,D.bottom||0,J,Sr),In(Y,D.left||0,J,Or),In(Y,Y.transform.width-(D.right||0),J,jr);var q=Y.transform.centerPoint;un(Y,q.x,Y.transform.height-q.y,ii)}function un(Y,D,J,q){var K=20,de=2;Kn(Y,D-de/2,J-K/2,de,K,q),Kn(Y,D-K/2,J-de/2,K,de,q)}function sn(Y,D,J,q){Kn(Y,0,D+J/2,Y.transform.width,J,q)}function In(Y,D,J,q){Kn(Y,D-J/2,0,J,Y.transform.height,q)}function Kn(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl;we.enable(we.SCISSOR_TEST),we.scissor(D*i.browser.devicePixelRatio,J*i.browser.devicePixelRatio,q*i.browser.devicePixelRatio,K*i.browser.devicePixelRatio),ne.clear({color:de}),we.disable(we.SCISSOR_TEST)}function Aa(Y,D,J){for(var q=0;q<J.length;q++)fa(Y,D,J[q])}function fa(Y,D,J){var q=Y.context,K=q.gl,de=J.posMatrix,ne=Y.useProgram(\"debug\"),we=wn.disabled,Ue=kn.disabled,ft=Y.colorModeForRenderPass(),Zt=\"$debug\";q.activeTexture.set(K.TEXTURE0),Y.emptyTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),ne.draw(q,K.LINE_STRIP,we,Ue,ft,Er.disabled,hn(de,i.Color.red),Zt,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments);var hr=D.getTileByID(J.key).latestRawTileData,qt=hr&&hr.byteLength||0,Ve=Math.floor(qt/1024),et=D.getTile(J).tileSize,at=512/Math.min(et,512)*(J.overscaledZ/Y.transform.zoom)*.5,kt=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(kt+=\" => \"+J.overscaledZ);var Ot=kt+\" \"+Ve+\"kb\";$a(Y,Ot),ne.draw(q,K.TRIANGLES,we,Ue,_t.alphaBlended,Er.disabled,hn(de,i.Color.transparent,at),Zt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,q=Y.context.gl,K=Y.debugOverlayCanvas.getContext(\"2d\");K.clearRect(0,0,J.width,J.height),K.shadowColor=\"white\",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle=\"white\",K.textBaseline=\"top\",K.font=\"bold 36px Open Sans, sans-serif\",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE)}function ko(Y,D,J){var q=Y.context,K=J.implementation;if(Y.renderPass===\"offscreen\"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),de.call(K,q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState())}else if(Y.renderPass===\"translucent\"){Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),q.setStencilMode(kn.disabled);var ne=K.renderingMode===\"3d\"?new wn(Y.context.gl.LEQUAL,wn.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,wn.ReadOnly);q.setDepthMode(ne),K.render(q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState(),q.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ot,heatmap:Tt,line:Pr,fill:ve,\"fill-extrusion\":Re,hillshade:tt,raster:Dt,background:rr,debug:Aa,custom:ko},mo=function(D,J){this.context=new Zr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ri.maxUnderzooming+ri.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Uf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var q=0,K=this.style._order;q<K.length;q+=1){var de=K[q];this.style._layers[de].resize()}},mo.prototype.setup=function(){var D=this.context,J=new i.StructArrayLayout2i4;J.emplaceBack(0,0),J.emplaceBack(i.EXTENT,0),J.emplaceBack(0,i.EXTENT),J.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=D.createVertexBuffer(J,oc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var q=new i.StructArrayLayout2i4;q.emplaceBack(0,0),q.emplaceBack(i.EXTENT,0),q.emplaceBack(0,i.EXTENT),q.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=D.createVertexBuffer(q,oc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var K=new i.StructArrayLayout4i8;K.emplaceBack(0,0,0,0),K.emplaceBack(i.EXTENT,0,i.EXTENT,0),K.emplaceBack(0,i.EXTENT,0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=D.createVertexBuffer(K,Me.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout2i4;de.emplaceBack(0,0),de.emplaceBack(1,0),de.emplaceBack(0,1),de.emplaceBack(1,1),this.viewportBuffer=D.createVertexBuffer(de,oc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ne=new i.StructArrayLayout1ui2;ne.emplaceBack(0),ne.emplaceBack(1),ne.emplaceBack(3),ne.emplaceBack(2),ne.emplaceBack(0),this.tileBorderIndexBuffer=D.createIndexBuffer(ne);var we=new i.StructArrayLayout3ui6;we.emplaceBack(0,1,2),we.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=D.createIndexBuffer(we),this.emptyTexture=new i.Texture(D,{width:1,height:1,data:new Uint8Array([0,0,0,0])},D.gl.RGBA);var Ue=this.context.gl;this.stencilClearMode=new kn({func:Ue.ALWAYS,mask:0},0,255,Ue.ZERO,Ue.ZERO,Ue.ZERO)},mo.prototype.clearStencil=function(){var D=this.context,J=D.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var q=i.create();i.ortho(q,0,this.width,this.height,0,0,1),i.scale(q,q,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram(\"clippingMask\").draw(D,J.TRIANGLES,wn.disabled,this.stencilClearMode,_t.disabled,Er.disabled,Bn(q),\"$clipping\",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},mo.prototype._renderTileClippingMasks=function(D,J){if(!(this.currentStencilSource===D.source||!D.isTileClipped()||!J||!J.length)){this.currentStencilSource=D.source;var q=this.context,K=q.gl;this.nextStencilID+J.length>256&&this.clearStencil(),q.setColorMode(_t.disabled),q.setDepthMode(wn.disabled);var de=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne<we.length;ne+=1){var Ue=we[ne],ft=this._tileClippingMaskIDs[Ue.key]=this.nextStencilID++;de.draw(q,K.TRIANGLES,wn.disabled,new kn({func:K.ALWAYS,mask:0},ft,255,K.KEEP,K.KEEP,K.REPLACE),_t.disabled,Er.disabled,Bn(Ue.posMatrix),\"$clipping\",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},mo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new kn({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new kn({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,q=this.context.gl,K=D.sort(function(ft,Zt){return Zt.overscaledZ-ft.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Ue=0;Ue<ne;Ue++)we[Ue+de]=new kn({func:q.GEQUAL,mask:255},Ue+this.nextStencilID,255,q.KEEP,q.KEEP,q.REPLACE);return this.nextStencilID+=ne,[we,K]}return[(J={},J[de]=kn.disabled,J),K]},mo.prototype.colorModeForRenderPass=function(){var D=this.context.gl;if(this._showOverdrawInspector){var J=8,q=1/J;return new _t([D.CONSTANT_COLOR,D.ONE],new i.Color(q,q,q,0),[!0,!0,!0,!0])}else return this.renderPass===\"opaque\"?_t.unblended:_t.alphaBlended},mo.prototype.depthModeForSublayer=function(D,J,q){if(!this.opaquePassEnabledForLayer())return wn.disabled;var K=1-((1+this.currentLayer)*this.numSublayers+D)*this.depthEpsilon;return new wn(q||this.context.gl.LEQUAL,J,[K,K])},mo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},mo.prototype.render=function(D,J){var q=this;this.style=D,this.options=J,this.lineAtlas=D.lineAtlas,this.imageManager=D.imageManager,this.glyphManager=D.glyphManager,this.symbolFadeChange=D.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var K=this.style._order,de=this.style.sourceCaches;for(var ne in de){var we=de[ne];we.used&&we.prepare(this.context)}var Ue={},ft={},Zt={};for(var hr in de){var qt=de[hr];Ue[hr]=qt.getVisibleCoordinates(),ft[hr]=Ue[hr].slice().reverse(),Zt[hr]=qt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Ve=0;Ve<K.length;Ve++){var et=K[Ve];if(this.style._layers[et].is3D()){this.opaquePassCutoff=Ve;break}}this.renderPass=\"offscreen\";for(var at=0,kt=K;at<kt.length;at+=1){var Ot=kt[at],It=this.style._layers[Ot];if(!(!It.hasOffscreenPass()||It.isHidden(this.transform.zoom))){var Bt=ft[It.source];It.type!==\"custom\"&&!Bt.length||this.renderLayer(this,de[It.source],It,Bt)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:J.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(D._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass=\"opaque\",this.currentLayer=K.length-1;this.currentLayer>=0;this.currentLayer--){var Rt=this.style._layers[K[this.currentLayer]],mt=de[Rt.source],Pt=Ue[Rt.source];this._renderTileClippingMasks(Rt,Pt),this.renderLayer(this,mt,Rt,Pt)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer<K.length;this.currentLayer++){var ht=this.style._layers[K[this.currentLayer]],cr=de[ht.source],br=(ht.type===\"symbol\"?Zt:ft)[ht.source];this._renderTileClippingMasks(ht,Ue[ht.source]),this.renderLayer(this,cr,ht,br)}if(this.options.showTileBoundaries){var Nr,Ri,hi=i.values(this.style._layers);hi.forEach(function(wi){wi.source&&!wi.isHidden(q.transform.zoom)&&(wi.source!==(Ri&&Ri.id)&&(Ri=q.style.sourceCaches[wi.source]),(!Nr||Nr.getSource().maxzoom<Ri.getSource().maxzoom)&&(Nr=Ri))}),Nr&&Qa.debug(this,Nr,Nr.getVisibleCoordinates())}this.options.showPadding&&Li(this),this.context.setDefault()},mo.prototype.renderLayer=function(D,J,q,K){q.isHidden(this.transform.zoom)||q.type!==\"background\"&&q.type!==\"custom\"&&!K.length||(this.id=q.id,this.gpuTimingStart(q),Qa[q.type](D,J,q,K,this.style.placement.variableOffsets),this.gpuTimingEnd())},mo.prototype.gpuTimingStart=function(D){if(this.options.gpuTiming){var J=this.context.extTimerQuery,q=this.gpuTimers[D.id];q||(q=this.gpuTimers[D.id]={calls:0,cpuTime:0,query:J.createQueryEXT()}),q.calls++,J.beginQueryEXT(J.TIME_ELAPSED_EXT,q.query)}},mo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var D=this.context.extTimerQuery;D.endQueryEXT(D.TIME_ELAPSED_EXT)}},mo.prototype.collectGpuTimers=function(){var D=this.gpuTimers;return this.gpuTimers={},D},mo.prototype.queryGpuTimers=function(D){var J={};for(var q in D){var K=D[q],de=this.context.extTimerQuery,ne=de.getQueryObjectEXT(K.query,de.QUERY_RESULT_EXT)/(1e3*1e3);de.deleteQueryEXT(K.query),J[q]=ne}return J},mo.prototype.translatePosMatrix=function(D,J,q,K,de){if(!q[0]&&!q[1])return D;var ne=de?K===\"map\"?this.transform.angle:0:K===\"viewport\"?-this.transform.angle:0;if(ne){var we=Math.sin(ne),Ue=Math.cos(ne);q=[q[0]*Ue-q[1]*we,q[0]*we+q[1]*Ue]}var ft=[de?q[0]:Ss(J,q[0],this.transform.zoom),de?q[1]:Ss(J,q[1],this.transform.zoom),0],Zt=new Float32Array(16);return i.translate(Zt,D,ft),Zt},mo.prototype.saveTileTexture=function(D){var J=this._tileTextures[D.size[0]];J?J.push(D):this._tileTextures[D.size[0]]=[D]},mo.prototype.getTileTexture=function(D){var J=this._tileTextures[D];return J&&J.length>0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),q=this.imageManager.getPattern(D.to.toString());return!J||!q},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var q=\"\"+D+(J?J.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[q]||(this.cache[q]=new If(this.context,D,bf[D],J,oo[D],this._showOverdrawInspector)),this.cache[q]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,q){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,q),ne=K.map(function(ft){return i.transformMat4([],ft,D)}).map(function(ft){return i.scale$1([],ft,1/ft[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ue=we.map(function(ft){var Zt=i.sub([],ne[ft[0]],ne[ft[1]]),hr=i.sub([],ne[ft[2]],ne[ft[1]]),qt=i.normalize([],i.cross([],Zt,hr)),Ve=-i.dot(qt,ne[ft[1]]);return qt.concat(Ve)});return new Bo(ne,Ue)};var Is=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Is.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],q=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de<J.length;de++)q[de]=J[de]?this.min[de]:this.center[de],K[de]=J[de]?this.center[de]:this.max[de];return K[2]=this.max[2],new Is(q,K)},Is.prototype.distanceX=function(D){var J=Math.max(Math.min(this.max[0],D[0]),this.min[0]);return J-D[0]},Is.prototype.distanceY=function(D){var J=Math.max(Math.min(this.max[1],D[1]),this.min[1]);return J-D[1]},Is.prototype.intersects=function(D){for(var J=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],q=!0,K=0;K<D.planes.length;K++){for(var de=D.planes[K],ne=0,we=0;we<J.length;we++)ne+=i.dot$1(de,J[we])>=0;if(ne===0)return 0;ne!==J.length&&(q=!1)}if(q)return 2;for(var Ue=0;Ue<3;Ue++){for(var ft=Number.MAX_VALUE,Zt=-Number.MAX_VALUE,hr=0;hr<D.points.length;hr++){var qt=D.points[hr][Ue]-this.min[Ue];ft=Math.min(ft,qt),Zt=Math.max(Zt,qt)}if(Zt<0||ft>this.max[Ue]-this.min[Ue])return 0}return 1};var As=function(D,J,q,K){if(D===void 0&&(D=0),J===void 0&&(J=0),q===void 0&&(q=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(q)||q<0||isNaN(K)||K<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=D,this.bottom=J,this.left=q,this.right=K};As.prototype.interpolate=function(D,J,q){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,q)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,q)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,q)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,q)),this},As.prototype.getCenter=function(D,J){var q=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(q,K)},As.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},As.prototype.clone=function(){return new As(this.top,this.bottom,this.left,this.right)},As.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,q,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=q==null?0:q,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new As,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,q){this._unmodified=!1,this._edgeInsets.interpolate(D,J,q),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var q=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(q.x,K.x,de.x,ne.x)),Ue=Math.floor(Math.max(q.x,K.x,de.x,ne.x)),ft=1,Zt=we-ft;Zt<=Ue+ft;Zt++)Zt!==0&&J.push(new i.UnwrappedTileID(Zt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),q=J;if(D.minzoom!==void 0&&J<D.minzoom)return[];D.maxzoom!==void 0&&J>D.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Ue=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Ue=J);var ft=3,Zt=function(hi){return{aabb:new Is([hi*de,0,0],[(hi+1)*de,de,0]),zoom:0,x:0,y:0,wrap:hi,fullyVisible:!1}},hr=[],qt=[],Ve=J,et=D.reparseOverscaled?q:J;if(this._renderWorldCopies)for(var at=1;at<=3;at++)hr.push(Zt(-at)),hr.push(Zt(at));for(hr.push(Zt(0));hr.length>0;){var kt=hr.pop(),Ot=kt.x,It=kt.y,Bt=kt.fullyVisible;if(!Bt){var Rt=kt.aabb.intersects(we);if(Rt===0)continue;Bt=Rt===2}var mt=kt.aabb.distanceX(ne),Pt=kt.aabb.distanceY(ne),ht=Math.max(Math.abs(mt),Math.abs(Pt)),cr=ft+(1<<Ve-kt.zoom)-2;if(kt.zoom===Ve||ht>cr&&kt.zoom>=Ue){qt.push({tileID:new i.OverscaledTileID(kt.zoom===Ve?et:kt.zoom,kt.wrap,kt.zoom,Ot,It),distanceSq:i.sqrLen([ne[0]-.5-Ot,ne[1]-.5-It])});continue}for(var br=0;br<4;br++){var Nr=(Ot<<1)+br%2,Ri=(It<<1)+(br>>1);hr.push({aabb:kt.aabb.quadrant(br),zoom:kt.zoom+1,x:Nr,y:Ri,wrap:kt.wrap,fullyVisible:Bt})}}return qt.sort(function(hi,wi){return hi.distanceSq-wi.distanceSq}).map(function(hi){return hi.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var q=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(q.x-K.x),de.y-(q.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,q=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(q,q,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=q[3],ne=K[3],we=q[0]/de,Ue=K[0]/ne,ft=q[1]/de,Zt=K[1]/ne,hr=q[2]/de,qt=K[2]/ne,Ve=hr===qt?0:(J-hr)/(qt-hr);return new i.MercatorCoordinate(i.number(we,Ue,Ve)/this.worldSize,i.number(ft,Zt,Ve)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var q=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[q])return K[q];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Ue=i.identity(new Float64Array(16));return i.translate(Ue,Ue,[we*ne,de.y*ne,0]),i.scale(Ue,Ue,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Ue,J?this.alignedProjMatrix:this.projMatrix,Ue),K[q]=new Float32Array(Ue),K[q]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,q=-180,K=180,de,ne,we,Ue,ft=this.size,Zt=this._unmodified;if(this.latRange){var hr=this.latRange;D=i.mercatorYfromLat(hr[1])*this.worldSize,J=i.mercatorYfromLat(hr[0])*this.worldSize,de=J-D<ft.y?ft.y/(J-D):0}if(this.lngRange){var qt=this.lngRange;q=i.mercatorXfromLng(qt[0])*this.worldSize,K=i.mercatorXfromLng(qt[1])*this.worldSize,ne=K-q<ft.x?ft.x/(K-q):0}var Ve=this.point,et=Math.max(ne||0,de||0);if(et){this.center=this.unproject(new i.Point(ne?(K+q)/2:Ve.x,de?(J+D)/2:Ve.y)),this.zoom+=this.scaleZoom(et),this._unmodified=Zt,this._constraining=!1;return}if(this.latRange){var at=Ve.y,kt=ft.y/2;at-kt<D&&(Ue=D+kt),at+kt>J&&(Ue=J-kt)}if(this.lngRange){var Ot=Ve.x,It=ft.x/2;Ot-It<q&&(we=q+It),Ot+It>K&&(we=K-It)}(we!==void 0||Ue!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ve.x,Ue!==void 0?Ue:Ve.y))),this._unmodified=Zt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var q=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-q-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Ue=ne.y,ft=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Zt=ft*1.01,hr=this.height/50,qt=new Float64Array(16);i.perspective(qt,this._fov,this.width/this.height,hr,Zt),qt[8]=-J.x*2/this.width,qt[9]=J.y*2/this.height,i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),i.rotateX(qt,qt,this._pitch),i.rotateZ(qt,qt,this.angle),i.translate(qt,qt,[-we,-Ue,0]),this.mercatorMatrix=i.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(qt,qt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=i.invert([],this.projMatrix);var Ve=this.width%2/2,et=this.height%2/2,at=Math.cos(this.angle),kt=Math.sin(this.angle),Ot=we-Math.round(we)+at*Ve+kt*et,It=Ue-Math.round(Ue)+at*et+kt*Ve,Bt=new Float64Array(qt);if(i.translate(Bt,Bt,[Ot>.5?Ot-1:Ot,It>.5?It-1:It,0]),this.alignedProjMatrix=Bt,qt=i.create(),i.scale(qt,qt,[this.width/2,-this.height/2,1]),i.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=i.create(),i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[-1,-1,0]),i.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=i.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],q=i.transformMat4(J,J,this.pixelMatrix);return q[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var q=J.x,K=J.y,de=J.x,ne=J.y,we=0,Ue=D;we<Ue.length;we+=1){var ft=Ue[we];q=Math.min(q,ft.x),K=Math.min(K,ft.y),de=Math.max(de,ft.x),ne=Math.max(ne,ft.y)}return[new i.Point(q,K),new i.Point(de,K),new i.Point(de,ne),new i.Point(q,ne),new i.Point(q,K)]},Object.defineProperties(wo.prototype,To);function dl(Y,D){var J=!1,q=null,K=function(){q=null,J&&(Y(),q=setTimeout(K,D),J=!1)};return function(){return J=!0,q||K(),q}}var Ul=function(D){this._hashName=D&&encodeURIComponent(D),i.bindAll([\"_getCurrentHash\",\"_onHashChange\",\"_updateHash\"],this),this._updateHash=dl(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ul.prototype.addTo=function(D){return this._map=D,i.window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Ul.prototype.remove=function(){return i.window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ul.prototype.getHashString=function(D){var J=this._map.getCenter(),q=Math.round(this._map.getZoom()*100)/100,K=Math.ceil((q*Math.LN2+Math.log(512/360/.5))/Math.LN10),de=Math.pow(10,K),ne=Math.round(J.lng*de)/de,we=Math.round(J.lat*de)/de,Ue=this._map.getBearing(),ft=this._map.getPitch(),Zt=\"\";if(D?Zt+=\"/\"+ne+\"/\"+we+\"/\"+q:Zt+=q+\"/\"+we+\"/\"+ne,(Ue||ft)&&(Zt+=\"/\"+Math.round(Ue*10)/10),ft&&(Zt+=\"/\"+Math.round(ft)),this._hashName){var hr=this._hashName,qt=!1,Ve=i.window.location.hash.slice(1).split(\"&\").map(function(et){var at=et.split(\"=\")[0];return at===hr?(qt=!0,at+\"=\"+Zt):et}).filter(function(et){return et});return qt||Ve.push(hr+\"=\"+Zt),\"#\"+Ve.join(\"&\")}return\"#\"+Zt},Ul.prototype._getCurrentHash=function(){var D=this,J=i.window.location.hash.replace(\"#\",\"\");if(this._hashName){var q;return J.split(\"&\").map(function(K){return K.split(\"=\")}).forEach(function(K){K[0]===D._hashName&&(q=K)}),(q&&q[1]||\"\").split(\"/\")}return J.split(\"/\")},Ul.prototype._onHashChange=function(){var D=this._getCurrentHash();if(D.length>=3&&!D.some(function(q){return isNaN(q)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),$s=i.extend({deceleration:20,maxSpeed:1400},Lu),Ql=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Al=function(D){this._map=D,this.clear()};Al.prototype.clear=function(){this._inertiaBuffer=[]},Al.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Al.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),q=160;D.length>0&&J-D[0].time>q;)D.shift()},Al.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},q=0,K=this._inertiaBuffer;q<K.length;q+=1){var de=K[q],ne=de.settings;J.zoom+=ne.zoomDelta||0,J.bearing+=ne.bearingDelta||0,J.pitch+=ne.pitchDelta||0,ne.panDelta&&J.pan._add(ne.panDelta),ne.around&&(J.around=ne.around),ne.pinchAround&&(J.pinchAround=ne.pinchAround)}var we=this._inertiaBuffer[this._inertiaBuffer.length-1],Ue=we.time-this._inertiaBuffer[0].time,ft={};if(J.pan.mag()){var Zt=X(J.pan.mag(),Ue,i.extend({},au,D||{}));ft.offset=J.pan.mult(Zt.amount/J.pan.mag()),ft.center=this._map.transform.center,Sl(ft,Zt)}if(J.zoom){var hr=X(J.zoom,Ue,$s);ft.zoom=this._map.transform.zoom+hr.amount,Sl(ft,hr)}if(J.bearing){var qt=X(J.bearing,Ue,Ql);ft.bearing=this._map.transform.bearing+i.clamp(qt.amount,-179,179),Sl(ft,qt)}if(J.pitch){var Ve=X(J.pitch,Ue,dc);ft.pitch=this._map.transform.pitch+Ve.amount,Sl(ft,Ve)}if(ft.zoom||ft.bearing){var et=J.pinchAround===void 0?J.around:J.pinchAround;ft.around=et?this._map.unproject(et):this._map.getCenter()}return this.clear(),i.extend(ft,{noMoveStart:!0})}};function Sl(Y,D){(!Y.duration||Y.duration<D.duration)&&(Y.duration=D.duration,Y.easing=D.easing)}function X(Y,D,J){var q=J.maxSpeed,K=J.linearity,de=J.deceleration,ne=i.clamp(Y*K/(D/1e3),-q,q),we=Math.abs(ne)/(de*K);return{easing:J.easing,duration:we*1e3,amount:ne*(we/2)}}var se=function(Y){function D(q,K,de,ne){ne===void 0&&(ne={});var we=o.mousePos(K.getCanvasContainer(),de),Ue=K.unproject(we);Y.call(this,q,i.extend({point:we,lngLat:Ue,originalEvent:de},ne)),this._defaultPrevented=!1,this.target=K}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Te=function(Y){function D(q,K,de){var ne=q===\"touchend\"?de.changedTouches:de.touches,we=o.touchPos(K.getCanvasContainer(),ne),Ue=we.map(function(hr){return K.unproject(hr)}),ft=we.reduce(function(hr,qt,Ve,et){return hr.add(qt.div(et.length))},new i.Point(0,0)),Zt=K.unproject(ft);Y.call(this,q,{points:we,point:ft,lngLats:Ue,lngLat:Zt,originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Ne=function(Y){function D(q,K,de){Y.call(this,q,{originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),He=function(D,J){this._map=D,this._clickTolerance=J.clickTolerance};He.prototype.reset=function(){delete this._mousedownPos},He.prototype.wheel=function(D){return this._firePreventable(new Ne(D.type,this._map,D))},He.prototype.mousedown=function(D,J){return this._mousedownPos=J,this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseup=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.click=function(D,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},He.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},He.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},He.prototype.isEnabled=function(){return!0},He.prototype.isActive=function(){return!1},He.prototype.enable=function(){},He.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens(\"contextmenu\")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Ct=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};Ct.prototype.isEnabled=function(){return!!this._enabled},Ct.prototype.isActive=function(){return!!this._active},Ct.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ct.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ct.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},Ct.prototype.mousemoveWindow=function(D,J){if(this._active){var q=J;if(!(this._lastPos.equals(q)||!this._box&&q.dist(this._startPos)<this._clickTolerance)){var K=this._startPos;this._lastPos=q,this._box||(this._box=o.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",D));var de=Math.min(K.x,q.x),ne=Math.max(K.x,q.x),we=Math.min(K.y,q.y),Ue=Math.max(K.y,q.y);o.setTransform(this._box,\"translate(\"+de+\"px,\"+we+\"px)\"),this._box.style.width=ne-de+\"px\",this._box.style.height=Ue-we+\"px\"}}},Ct.prototype.mouseupWindow=function(D,J){var q=this;if(this._active&&D.button===0){var K=this._startPos,de=J;if(this.reset(),o.suppressClick(),K.x===de.x&&K.y===de.y)this._fireEvent(\"boxzoomcancel\",D);else return this._map.fire(new i.Event(\"boxzoomend\",{originalEvent:D})),{cameraAnimation:function(ne){return ne.fitScreenCoordinates(K,de,q._map.getBearing(),{linear:!0})}}}},Ct.prototype.keydown=function(D){this._active&&D.keyCode===27&&(this.reset(),this._fireEvent(\"boxzoomcancel\",D))},Ct.prototype.reset=function(){this._active=!1,this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos},Ct.prototype._fireEvent=function(D,J){return this._map.fire(new i.Event(D,{originalEvent:J}))};function nt(Y,D){for(var J={},q=0;q<Y.length;q++)J[Y[q].identifier]=D[q];return J}function jt(Y){for(var D=new i.Point(0,0),J=0,q=Y;J<q.length;J+=1){var K=q[J];D._add(K)}return D.div(Y.length)}var gr=500,yr=500,Gr=30,qr=function(D){this.reset(),this.numTouches=D.numTouches};qr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},qr.prototype.touchstart=function(D,J,q){(this.centroid||q.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),q.length===this.numTouches&&(this.centroid=jt(J),this.touches=nt(q,J)))},qr.prototype.touchmove=function(D,J,q){if(!(this.aborted||!this.centroid)){var K=nt(q,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Gr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(D,J,q){if((!this.centroid||D.timeStamp-this.startTime>yr)&&(this.aborted=!0),q.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var _i=function(D){this.singleTap=new qr(D),this.numTaps=D.numTaps,this.reset()};_i.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},_i.prototype.touchstart=function(D,J,q){this.singleTap.touchstart(D,J,q)},_i.prototype.touchmove=function(D,J,q){this.singleTap.touchmove(D,J,q)},_i.prototype.touchend=function(D,J,q){var K=this.singleTap.touchend(D,J,q);if(K){var de=D.timeStamp-this.lastTime<gr,ne=!this.lastTap||this.lastTap.dist(K)<Gr;if((!de||!ne)&&this.reset(),this.count++,this.lastTime=D.timeStamp,this.lastTap=K,this.count===this.numTaps)return this.reset(),K}};var bi=function(){this._zoomIn=new _i({numTouches:1,numTaps:2}),this._zoomOut=new _i({numTouches:2,numTaps:1}),this.reset()};bi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},bi.prototype.touchstart=function(D,J,q){this._zoomIn.touchstart(D,J,q),this._zoomOut.touchstart(D,J,q)},bi.prototype.touchmove=function(D,J,q){this._zoomIn.touchmove(D,J,q),this._zoomOut.touchmove(D,J,q)},bi.prototype.touchend=function(D,J,q){var K=this,de=this._zoomIn.touchend(D,J,q),ne=this._zoomOut.touchend(D,J,q);if(de)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()+1,around:we.unproject(de)},{originalEvent:D})}};if(ne)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()-1,around:we.unproject(ne)},{originalEvent:D})}}},bi.prototype.touchcancel=function(){this.reset()},bi.prototype.enable=function(){this._enabled=!0},bi.prototype.disable=function(){this._enabled=!1,this.reset()},bi.prototype.isEnabled=function(){return this._enabled},bi.prototype.isActive=function(){return this._active};var Xr=0,ni=2,gi={};gi[Xr]=1,gi[ni]=2;function Pi(Y,D){var J=gi[D];return Y.buttons===void 0||(Y.buttons&J)!==J}var Ai=function(D){this.reset(),this._clickTolerance=D.clickTolerance||1};Ai.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Ai.prototype._correctButton=function(D,J){return!1},Ai.prototype._move=function(D,J){return{}},Ai.prototype.mousedown=function(D,J){if(!this._lastPoint){var q=o.mouseButton(D);this._correctButton(D,q)&&(this._lastPoint=J,this._eventButton=q)}},Ai.prototype.mousemoveWindow=function(D,J){var q=this._lastPoint;if(q){if(D.preventDefault(),Pi(D,this._eventButton)){this.reset();return}if(!(!this._moved&&J.dist(q)<this._clickTolerance))return this._moved=!0,this._lastPoint=J,this._move(q,J)}},Ai.prototype.mouseupWindow=function(D){if(this._lastPoint){var J=o.mouseButton(D);J===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}},Ai.prototype.enable=function(){this._enabled=!0},Ai.prototype.disable=function(){this._enabled=!1,this.reset()},Ai.prototype.isEnabled=function(){return this._enabled},Ai.prototype.isActive=function(){return this._active};var ti=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.mousedown=function(q,K){Y.prototype.mousedown.call(this,q,K),this._lastPoint&&(this._active=!0)},D.prototype._correctButton=function(q,K){return K===Xr&&!q.ctrlKey},D.prototype._move=function(q,K){return{around:K,panDelta:K.sub(q)}},D}(Ai),Rn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(q,K){return K===Xr&&q.ctrlKey||K===ni},D.prototype._move=function(q,K){var de=.8,ne=(K.x-q.x)*de;if(ne)return this._active=!0,{bearingDelta:ne}},D.prototype.contextmenu=function(q){q.preventDefault()},D}(Ai),Cn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(q,K){return K===Xr&&q.ctrlKey||K===ni},D.prototype._move=function(q,K){var de=-.5,ne=(K.y-q.y)*de;if(ne)return this._active=!0,{pitchDelta:ne}},D.prototype.contextmenu=function(q){q.preventDefault()},D}(Ai),Nn=function(D){this._minTouches=1,this._clickTolerance=D.clickTolerance||1,this.reset()};Nn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Nn.prototype.touchstart=function(D,J,q){return this._calculateTransform(D,J,q)},Nn.prototype.touchmove=function(D,J,q){if(!(!this._active||q.length<this._minTouches))return D.preventDefault(),this._calculateTransform(D,J,q)},Nn.prototype.touchend=function(D,J,q){this._calculateTransform(D,J,q),this._active&&q.length<this._minTouches&&this.reset()},Nn.prototype.touchcancel=function(){this.reset()},Nn.prototype._calculateTransform=function(D,J,q){q.length>0&&(this._active=!0);var K=nt(q,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Ue in K){var ft=K[Ue],Zt=this._touches[Ue];Zt&&(de._add(ft),ne._add(ft.sub(Zt)),we++,K[Ue]=ft)}if(this._touches=K,!(we<this._minTouches||!ne.mag())){var hr=ne.div(we);if(this._sum._add(hr),!(this._sum.mag()<this._clickTolerance)){var qt=de.div(we);return{around:qt,panDelta:hr}}}},Nn.prototype.enable=function(){this._enabled=!0},Nn.prototype.disable=function(){this._enabled=!1,this.reset()},Nn.prototype.isEnabled=function(){return this._enabled},Nn.prototype.isActive=function(){return this._active};var ia=function(){this.reset()};ia.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},ia.prototype._start=function(D){},ia.prototype._move=function(D,J,q){return{}},ia.prototype.touchstart=function(D,J,q){this._firstTwoTouches||q.length<2||(this._firstTwoTouches=[q[0].identifier,q[1].identifier],this._start([J[0],J[1]]))},ia.prototype.touchmove=function(D,J,q){if(this._firstTwoTouches){D.preventDefault();var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(q,J,de),Ue=Ea(q,J,ne);if(!(!we||!Ue)){var ft=this._aroundCenter?null:we.add(Ue).div(2);return this._move([we,Ue],ft,D)}}},ia.prototype.touchend=function(D,J,q){if(this._firstTwoTouches){var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(q,J,de),Ue=Ea(q,J,ne);we&&Ue||(this._active&&o.suppressClick(),this.reset())}},ia.prototype.touchcancel=function(){this.reset()},ia.prototype.enable=function(D){this._enabled=!0,this._aroundCenter=!!D&&D.around===\"center\"},ia.prototype.disable=function(){this._enabled=!1,this.reset()},ia.prototype.isEnabled=function(){return this._enabled},ia.prototype.isActive=function(){return this._active};function Ea(Y,D,J){for(var q=0;q<Y.length;q++)if(Y[q].identifier===J)return D[q]}var Ia=.1;function yo(Y,D){return Math.log(Y/D)/Math.LN2}var Da=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._distance,delete this._startDistance},D.prototype._start=function(q){this._startDistance=this._distance=q[0].dist(q[1])},D.prototype._move=function(q,K){var de=this._distance;if(this._distance=q[0].dist(q[1]),!(!this._active&&Math.abs(yo(this._distance,this._startDistance))<Ia))return this._active=!0,{zoomDelta:yo(this._distance,de),pinchAround:K}},D}(ia),go=25;function Rs(Y,D){return Y.angleWith(D)*180/Math.PI}var Es=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},D.prototype._start=function(q){this._startVector=this._vector=q[0].sub(q[1]),this._minDiameter=q[0].dist(q[1])},D.prototype._move=function(q,K){var de=this._vector;if(this._vector=q[0].sub(q[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Rs(this._vector,de),pinchAround:K}},D.prototype._isBelowThreshold=function(q){this._minDiameter=Math.min(this._minDiameter,q.mag());var K=Math.PI*this._minDiameter,de=go/K*360,ne=Rs(q,this._startVector);return Math.abs(ne)<de},D}(ia);function Zs(Y){return Math.abs(Y.y)>Math.abs(Y.x)}var Gn=100,Ha=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(q){this._lastPoints=q,Zs(q[0].sub(q[1]))&&(this._valid=!1)},D.prototype._move=function(q,K,de){var ne=q[0].sub(this._lastPoints[0]),we=q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=q,this._active=!0;var Ue=(ne.y+we.y)/2,ft=-.5;return{pitchDelta:Ue*ft}}},D.prototype.gestureBeginsVertically=function(q,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=q.mag()>=ne,Ue=K.mag()>=ne;if(!(!we&&!Ue)){if(!we||!Ue)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove<Gn?void 0:!1;var ft=q.y>0==K.y>0;return Zs(q)&&Zs(K)&&ft}},D}(ia),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var q=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:q=1;break;case 189:case 109:case 173:q=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Ue){var ft=Ue.getZoom();Ue.easeTo({duration:300,easeId:\"keyboardHandler\",easing:Qs,zoom:q?Math.round(ft)+q*(D.shiftKey?2:1):ft,bearing:Ue.getBearing()+K*J._bearingStep,pitch:Ue.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Ue.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function Qs(Y){return Y*(2-Y)}var Ml=4.000244140625,bu=1/100,vl=1/450,Sc=2,Ee=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=vl,i.bindAll([\"_onTimeout\"],this)};Ee.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Ee.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Ee.prototype.isEnabled=function(){return!!this._enabled},Ee.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Ee.prototype.isZooming=function(){return!!this._zooming},Ee.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around===\"center\")},Ee.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ee.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,q=i.browser.now(),K=q-(this._lastWheelEventTime||0);this._lastWheelEventTime=q,J!==0&&J%Ml===0?this._type=\"wheel\":J!==0&&Math.abs(J)<4?this._type=\"trackpad\":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Ee.prototype._onTimeout=function(D){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(D)},Ee.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Ee.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var q=this._type===\"wheel\"&&Math.abs(this._delta)>Ml?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom==\"number\"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type===\"wheel\"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom==\"number\"?this._targetZoom:J.zoom,we=this._startZoom,Ue=this._easing,ft=!1,Zt;if(this._type===\"wheel\"&&we&&Ue){var hr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),qt=Ue(hr);Zt=i.number(we,ne,qt),hr<1?this._frameId||(this._frameId=!0):ft=!0}else Zt=ne,ft=!0;return this._active=!0,ft&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ft,zoomDelta:Zt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ee.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var q=this._prevEase,K=(i.browser.now()-q.start)/q.duration,de=q.easing(K+.01)-q.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Ee.prototype.reset=function(){this._active=!1};var xt=function(D,J){this._clickZoom=D,this._tapZoom=J};xt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},xt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},xt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},xt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var zt=function(){this.reset()};zt.prototype.reset=function(){this._active=!1},zt.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(q){q.easeTo({duration:300,zoom:q.getZoom()+(D.shiftKey?-1:1),around:q.unproject(J)},{originalEvent:D})}}},zt.prototype.enable=function(){this._enabled=!0},zt.prototype.disable=function(){this._enabled=!1,this.reset()},zt.prototype.isEnabled=function(){return this._enabled},zt.prototype.isActive=function(){return this._active};var Ir=function(){this._tap=new _i({numTouches:1,numTaps:1}),this.reset()};Ir.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ir.prototype.touchstart=function(D,J,q){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>gr&&this.reset(),this._tapTime?q.length>0&&(this._swipePoint=J[0],this._swipeTouch=q[0].identifier):this._tap.touchstart(D,J,q))},Ir.prototype.touchmove=function(D,J,q){if(!this._tapTime)this._tap.touchmove(D,J,q);else if(this._swipePoint){if(q[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Ir.prototype.touchend=function(D,J,q){if(this._tapTime)this._swipePoint&&q.length===0&&this.reset();else{var K=this._tap.touchend(D,J,q);K&&(this._tapTime=D.timeStamp)}},Ir.prototype.touchcancel=function(){this.reset()},Ir.prototype.enable=function(){this._enabled=!0},Ir.prototype.disable=function(){this._enabled=!1,this.reset()},Ir.prototype.isEnabled=function(){return this._enabled},Ir.prototype.isActive=function(){return this._active};var Hr=function(D,J,q){this._el=D,this._mousePan=J,this._touchPan=q};Hr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},Hr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},Hr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Hr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Br=function(D,J,q){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=q};Br.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Br.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Br.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Br.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Vr=function(D,J,q,K){this._el=D,this._touchZoom=J,this._touchRotate=q,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Vr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},Vr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},Vr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Vr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Vr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Vr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ni=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function Oi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Mi=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Al(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var q=this._el;this._listeners=[[q,\"touchstart\",{passive:!0}],[q,\"touchmove\",{passive:!1}],[q,\"touchend\",void 0],[q,\"touchcancel\",void 0],[q,\"mousedown\",void 0],[q,\"mousemove\",void 0],[q,\"mouseup\",void 0],[i.window.document,\"mousemove\",{capture:!0}],[i.window.document,\"mouseup\",void 0],[q,\"mouseover\",void 0],[q,\"mouseout\",void 0],[q,\"dblclick\",void 0],[q,\"click\",void 0],[q,\"keydown\",{capture:!1}],[q,\"keyup\",void 0],[q,\"wheel\",{passive:!1}],[q,\"contextmenu\",void 0],[i.window,\"blur\",void 0]];for(var K=0,de=this._listeners;K<de.length;K+=1){var ne=de[K],we=ne[0],Ue=ne[1],ft=ne[2];o.addEventListener(we,Ue,we===i.window.document?this.handleWindowEvent:this.handleEvent,ft)}};Mi.prototype.destroy=function(){for(var D=0,J=this._listeners;D<J.length;D+=1){var q=J[D],K=q[0],de=q[1],ne=q[2];o.removeEventListener(K,de,K===i.window.document?this.handleWindowEvent:this.handleEvent,ne)}},Mi.prototype._addDefaultHandlers=function(D){var J=this._map,q=J.getCanvasContainer();this._add(\"mapEvent\",new He(J,D));var K=J.boxZoom=new Ct(J,D);this._add(\"boxZoom\",K);var de=new bi,ne=new zt;J.doubleClickZoom=new xt(ne,de),this._add(\"tapZoom\",de),this._add(\"clickZoom\",ne);var we=new Ir;this._add(\"tapDragZoom\",we);var Ue=J.touchPitch=new Ha;this._add(\"touchPitch\",Ue);var ft=new Rn(D),Zt=new Cn(D);J.dragRotate=new Br(D,ft,Zt),this._add(\"mouseRotate\",ft,[\"mousePitch\"]),this._add(\"mousePitch\",Zt,[\"mouseRotate\"]);var hr=new ti(D),qt=new Nn(D);J.dragPan=new Hr(q,hr,qt),this._add(\"mousePan\",hr),this._add(\"touchPan\",qt,[\"touchZoom\",\"touchRotate\"]);var Ve=new Es,et=new Da;J.touchZoomRotate=new Vr(q,et,Ve,we),this._add(\"touchRotate\",Ve,[\"touchPan\",\"touchZoom\"]),this._add(\"touchZoom\",et,[\"touchPan\",\"touchRotate\"]);var at=J.scrollZoom=new Ee(J,this);this._add(\"scrollZoom\",at,[\"mousePan\"]);var kt=J.keyboard=new Uo;this._add(\"keyboard\",kt),this._add(\"blockableMapEvent\",new Ye(J));for(var Ot=0,It=[\"boxZoom\",\"doubleClickZoom\",\"tapDragZoom\",\"touchPitch\",\"dragRotate\",\"dragPan\",\"touchZoomRotate\",\"scrollZoom\",\"keyboard\"];Ot<It.length;Ot+=1){var Bt=It[Ot];D.interactive&&D[Bt]&&J[Bt].enable(D[Bt])}},Mi.prototype._add=function(D,J,q){this._handlers.push({handlerName:D,handler:J,allowed:q}),this._handlersById[D]=J},Mi.prototype.stop=function(D){if(!this._updatingCamera){for(var J=0,q=this._handlers;J<q.length;J+=1){var K=q[J],de=K.handler;de.reset()}this._inertia.clear(),this._fireEvents({},{},D),this._changes=[]}},Mi.prototype.isActive=function(){for(var D=0,J=this._handlers;D<J.length;D+=1){var q=J[D],K=q.handler;if(K.isActive())return!0}return!1},Mi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Mi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Mi.prototype.isMoving=function(){return!!mi(this._eventsInProgress)||this.isZooming()},Mi.prototype._blockedByActive=function(D,J,q){for(var K in D)if(K!==q&&(!J||J.indexOf(K)<0))return!0;return!1},Mi.prototype.handleWindowEvent=function(D){this.handleEvent(D,D.type+\"Window\")},Mi.prototype._getMapTouches=function(D){for(var J=[],q=0,K=D;q<K.length;q+=1){var de=K[q],ne=de.target;this._el.contains(ne)&&J.push(de)}return J},Mi.prototype.handleEvent=function(D,J){if(D.type===\"blur\"){this.stop(!0);return}this._updatingCamera=!0;for(var q=D.type===\"renderFrame\"?void 0:D,K={needsRenderFrame:!1},de={},ne={},we=D.touches?this._getMapTouches(D.touches):void 0,Ue=we?o.touchPos(this._el,we):o.mousePos(this._el,D),ft=0,Zt=this._handlers;ft<Zt.length;ft+=1){var hr=Zt[ft],qt=hr.handlerName,Ve=hr.handler,et=hr.allowed;if(Ve.isEnabled()){var at=void 0;this._blockedByActive(ne,et,qt)?Ve.reset():Ve[J||D.type]&&(at=Ve[J||D.type](D,Ue,we),this.mergeHandlerResult(K,de,at,qt,q),at&&at.needsRenderFrame&&this._triggerRenderFrame()),(at||Ve.isActive())&&(ne[qt]=Ve)}}var kt={};for(var Ot in this._previousActiveHandlers)ne[Ot]||(kt[Ot]=q);this._previousActiveHandlers=ne,(Object.keys(kt).length||Oi(K))&&(this._changes.push([K,de,kt]),this._triggerRenderFrame()),(Object.keys(ne).length||Oi(K))&&this._map._stop(!0),this._updatingCamera=!1;var It=K.cameraAnimation;It&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],It(this._map))},Mi.prototype.mergeHandlerResult=function(D,J,q,K,de){if(q){i.extend(D,q);var ne={handlerName:K,originalEvent:q.originalEvent||de};q.zoomDelta!==void 0&&(J.zoom=ne),q.panDelta!==void 0&&(J.drag=ne),q.pitchDelta!==void 0&&(J.pitch=ne),q.bearingDelta!==void 0&&(J.rotate=ne)}},Mi.prototype._applyChanges=function(){for(var D={},J={},q={},K=0,de=this._changes;K<de.length;K+=1){var ne=de[K],we=ne[0],Ue=ne[1],ft=ne[2];we.panDelta&&(D.panDelta=(D.panDelta||new i.Point(0,0))._add(we.panDelta)),we.zoomDelta&&(D.zoomDelta=(D.zoomDelta||0)+we.zoomDelta),we.bearingDelta&&(D.bearingDelta=(D.bearingDelta||0)+we.bearingDelta),we.pitchDelta&&(D.pitchDelta=(D.pitchDelta||0)+we.pitchDelta),we.around!==void 0&&(D.around=we.around),we.pinchAround!==void 0&&(D.pinchAround=we.pinchAround),we.noInertia&&(D.noInertia=we.noInertia),i.extend(J,Ue),i.extend(q,ft)}this._updateMapTransform(D,J,q),this._changes=[]},Mi.prototype._updateMapTransform=function(D,J,q){var K=this._map,de=K.transform;if(!Oi(D))return this._fireEvents(J,q,!0);var ne=D.panDelta,we=D.zoomDelta,Ue=D.bearingDelta,ft=D.pitchDelta,Zt=D.around,hr=D.pinchAround;hr!==void 0&&(Zt=hr),K._stop(!0),Zt=Zt||K.transform.centerPoint;var qt=de.pointLocation(ne?Zt.sub(ne):Zt);Ue&&(de.bearing+=Ue),ft&&(de.pitch+=ft),we&&(de.zoom+=we),de.setLocationAtPoint(qt,Zt),this._map._update(),D.noInertia||this._inertia.record(D),this._fireEvents(J,q,!0)},Mi.prototype._fireEvents=function(D,J,q){var K=this,de=mi(this._eventsInProgress),ne=mi(D),we={};for(var Ue in D){var ft=D[Ue],Zt=ft.originalEvent;this._eventsInProgress[Ue]||(we[Ue+\"start\"]=Zt),this._eventsInProgress[Ue]=D[Ue]}!de&&ne&&this._fireEvent(\"movestart\",ne.originalEvent);for(var hr in we)this._fireEvent(hr,we[hr]);ne&&this._fireEvent(\"move\",ne.originalEvent);for(var qt in D){var Ve=D[qt],et=Ve.originalEvent;this._fireEvent(qt,et)}var at={},kt;for(var Ot in this._eventsInProgress){var It=this._eventsInProgress[Ot],Bt=It.handlerName,Rt=It.originalEvent;this._handlersById[Bt].isActive()||(delete this._eventsInProgress[Ot],kt=J[Bt]||Rt,at[Ot+\"end\"]=kt)}for(var mt in at)this._fireEvent(mt,at[mt]);var Pt=mi(this._eventsInProgress);if(q&&(de||ne)&&!Pt){this._updatingCamera=!0;var ht=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),cr=function(br){return br!==0&&-K._bearingSnap<br&&br<K._bearingSnap};ht?(cr(ht.bearing||this._map.getBearing())&&(ht.bearing=0),this._map.easeTo(ht,{originalEvent:kt})):(this._map.fire(new i.Event(\"moveend\",{originalEvent:kt})),cr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Mi.prototype._fireEvent=function(D,J){this._map.fire(new i.Event(D,J?{originalEvent:J}:{}))},Mi.prototype._requestFrame=function(){var D=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(J){delete D._frameId,D.handleEvent(new Ni(\"renderFrame\",{timeStamp:J})),D._applyChanges()})},Mi.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Hn=function(Y){function D(J,q){Y.call(this),this._moving=!1,this._zooming=!1,this.transform=J,this._bearingSnap=q.bearingSnap,i.bindAll([\"_renderFrameCallback\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},D.prototype.setCenter=function(q,K){return this.jumpTo({center:q},K)},D.prototype.panBy=function(q,K,de){return q=i.Point.convert(q).mult(-1),this.panTo(this.transform.center,i.extend({offset:q},K),de)},D.prototype.panTo=function(q,K,de){return this.easeTo(i.extend({center:q},K),de)},D.prototype.getZoom=function(){return this.transform.zoom},D.prototype.setZoom=function(q,K){return this.jumpTo({zoom:q},K),this},D.prototype.zoomTo=function(q,K,de){return this.easeTo(i.extend({zoom:q},K),de)},D.prototype.zoomIn=function(q,K){return this.zoomTo(this.getZoom()+1,q,K),this},D.prototype.zoomOut=function(q,K){return this.zoomTo(this.getZoom()-1,q,K),this},D.prototype.getBearing=function(){return this.transform.bearing},D.prototype.setBearing=function(q,K){return this.jumpTo({bearing:q},K),this},D.prototype.getPadding=function(){return this.transform.padding},D.prototype.setPadding=function(q,K){return this.jumpTo({padding:q},K),this},D.prototype.rotateTo=function(q,K,de){return this.easeTo(i.extend({bearing:q},K),de)},D.prototype.resetNorth=function(q,K){return this.rotateTo(0,i.extend({duration:1e3},q),K),this},D.prototype.resetNorthPitch=function(q,K){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},q),K),this},D.prototype.snapToNorth=function(q,K){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(q,K):this},D.prototype.getPitch=function(){return this.transform.pitch},D.prototype.setPitch=function(q,K){return this.jumpTo({pitch:q},K),this},D.prototype.cameraForBounds=function(q,K){q=i.LngLatBounds.convert(q);var de=K&&K.bearing||0;return this._cameraForBoxAndBearing(q.getNorthWest(),q.getSouthEast(),de,K)},D.prototype._cameraForBoxAndBearing=function(q,K,de,ne){var we={top:0,bottom:0,right:0,left:0};if(ne=i.extend({padding:we,offset:[0,0],maxZoom:this.transform.maxZoom},ne),typeof ne.padding==\"number\"){var Ue=ne.padding;ne.padding={top:Ue,bottom:Ue,right:Ue,left:Ue}}ne.padding=i.extend(we,ne.padding);var ft=this.transform,Zt=ft.padding,hr=ft.project(i.LngLat.convert(q)),qt=ft.project(i.LngLat.convert(K)),Ve=hr.rotate(-de*Math.PI/180),et=qt.rotate(-de*Math.PI/180),at=new i.Point(Math.max(Ve.x,et.x),Math.max(Ve.y,et.y)),kt=new i.Point(Math.min(Ve.x,et.x),Math.min(Ve.y,et.y)),Ot=at.sub(kt),It=(ft.width-(Zt.left+Zt.right+ne.padding.left+ne.padding.right))/Ot.x,Bt=(ft.height-(Zt.top+Zt.bottom+ne.padding.top+ne.padding.bottom))/Ot.y;if(Bt<0||It<0){i.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\");return}var Rt=Math.min(ft.scaleZoom(ft.scale*Math.min(It,Bt)),ne.maxZoom),mt=typeof ne.offset.x==\"number\"?new i.Point(ne.offset.x,ne.offset.y):i.Point.convert(ne.offset),Pt=(ne.padding.left-ne.padding.right)/2,ht=(ne.padding.top-ne.padding.bottom)/2,cr=new i.Point(Pt,ht),br=cr.rotate(de*Math.PI/180),Nr=mt.add(br),Ri=Nr.mult(ft.scale/ft.zoomScale(Rt)),hi=ft.unproject(hr.add(qt).div(2).sub(Ri));return{center:hi,zoom:Rt,bearing:de}},D.prototype.fitBounds=function(q,K,de){return this._fitInternal(this.cameraForBounds(q,K),K,de)},D.prototype.fitScreenCoordinates=function(q,K,de,ne,we){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(q)),this.transform.pointLocation(i.Point.convert(K)),de,ne),ne,we)},D.prototype._fitInternal=function(q,K,de){return q?(K=i.extend(q,K),delete K.padding,K.linear?this.easeTo(K,de):this.flyTo(K,de)):this},D.prototype.jumpTo=function(q,K){this.stop();var de=this.transform,ne=!1,we=!1,Ue=!1;return\"zoom\"in q&&de.zoom!==+q.zoom&&(ne=!0,de.zoom=+q.zoom),q.center!==void 0&&(de.center=i.LngLat.convert(q.center)),\"bearing\"in q&&de.bearing!==+q.bearing&&(we=!0,de.bearing=+q.bearing),\"pitch\"in q&&de.pitch!==+q.pitch&&(Ue=!0,de.pitch=+q.pitch),q.padding!=null&&!de.isPaddingEqual(q.padding)&&(de.padding=q.padding),this.fire(new i.Event(\"movestart\",K)).fire(new i.Event(\"move\",K)),ne&&this.fire(new i.Event(\"zoomstart\",K)).fire(new i.Event(\"zoom\",K)).fire(new i.Event(\"zoomend\",K)),we&&this.fire(new i.Event(\"rotatestart\",K)).fire(new i.Event(\"rotate\",K)).fire(new i.Event(\"rotateend\",K)),Ue&&this.fire(new i.Event(\"pitchstart\",K)).fire(new i.Event(\"pitch\",K)).fire(new i.Event(\"pitchend\",K)),this.fire(new i.Event(\"moveend\",K))},D.prototype.easeTo=function(q,K){var de=this;this._stop(!1,q.easeId),q=i.extend({offset:[0,0],duration:500,easing:i.ease},q),(q.animate===!1||!q.essential&&i.browser.prefersReducedMotion)&&(q.duration=0);var ne=this.transform,we=this.getZoom(),Ue=this.getBearing(),ft=this.getPitch(),Zt=this.getPadding(),hr=\"zoom\"in q?+q.zoom:we,qt=\"bearing\"in q?this._normalizeBearing(q.bearing,Ue):Ue,Ve=\"pitch\"in q?+q.pitch:ft,et=\"padding\"in q?q.padding:ne.padding,at=i.Point.convert(q.offset),kt=ne.centerPoint.add(at),Ot=ne.pointLocation(kt),It=i.LngLat.convert(q.center||Ot);this._normalizeCenter(It);var Bt=ne.project(Ot),Rt=ne.project(It).sub(Bt),mt=ne.zoomScale(hr-we),Pt,ht;q.around&&(Pt=i.LngLat.convert(q.around),ht=ne.locationPoint(Pt));var cr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||hr!==we,this._rotating=this._rotating||Ue!==qt,this._pitching=this._pitching||Ve!==ft,this._padding=!ne.isPaddingEqual(et),this._easeId=q.easeId,this._prepareEase(K,q.noMoveStart,cr),this._ease(function(br){if(de._zooming&&(ne.zoom=i.number(we,hr,br)),de._rotating&&(ne.bearing=i.number(Ue,qt,br)),de._pitching&&(ne.pitch=i.number(ft,Ve,br)),de._padding&&(ne.interpolatePadding(Zt,et,br),kt=ne.centerPoint.add(at)),Pt)ne.setLocationAtPoint(Pt,ht);else{var Nr=ne.zoomScale(ne.zoom-we),Ri=hr>we?Math.min(2,mt):Math.max(.5,mt),hi=Math.pow(Ri,1-br),wi=ne.unproject(Bt.add(Rt.mult(br*hi)).mult(Nr));ne.setLocationAtPoint(ne.renderWorldCopies?wi.wrap():wi,kt)}de._fireMoveEvents(K)},function(br){de._afterEase(K,br)},q),this},D.prototype._prepareEase=function(q,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event(\"movestart\",q)),this._zooming&&!de.zooming&&this.fire(new i.Event(\"zoomstart\",q)),this._rotating&&!de.rotating&&this.fire(new i.Event(\"rotatestart\",q)),this._pitching&&!de.pitching&&this.fire(new i.Event(\"pitchstart\",q))},D.prototype._fireMoveEvents=function(q){this.fire(new i.Event(\"move\",q)),this._zooming&&this.fire(new i.Event(\"zoom\",q)),this._rotating&&this.fire(new i.Event(\"rotate\",q)),this._pitching&&this.fire(new i.Event(\"pitch\",q))},D.prototype._afterEase=function(q,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event(\"zoomend\",q)),ne&&this.fire(new i.Event(\"rotateend\",q)),we&&this.fire(new i.Event(\"pitchend\",q)),this.fire(new i.Event(\"moveend\",q))}},D.prototype.flyTo=function(q,K){var de=this;if(!q.essential&&i.browser.prefersReducedMotion){var ne=i.pick(q,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(ne,K)}this.stop(),q=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},q);var we=this.transform,Ue=this.getZoom(),ft=this.getBearing(),Zt=this.getPitch(),hr=this.getPadding(),qt=\"zoom\"in q?i.clamp(+q.zoom,we.minZoom,we.maxZoom):Ue,Ve=\"bearing\"in q?this._normalizeBearing(q.bearing,ft):ft,et=\"pitch\"in q?+q.pitch:Zt,at=\"padding\"in q?q.padding:we.padding,kt=we.zoomScale(qt-Ue),Ot=i.Point.convert(q.offset),It=we.centerPoint.add(Ot),Bt=we.pointLocation(It),Rt=i.LngLat.convert(q.center||Bt);this._normalizeCenter(Rt);var mt=we.project(Bt),Pt=we.project(Rt).sub(mt),ht=q.curve,cr=Math.max(we.width,we.height),br=cr/kt,Nr=Pt.mag();if(\"minZoom\"in q){var Ri=i.clamp(Math.min(q.minZoom,Ue,qt),we.minZoom,we.maxZoom),hi=cr/we.zoomScale(Ri-Ue);ht=Math.sqrt(hi/Nr*2)}var wi=ht*ht;function gn(so){var Zo=(br*br-cr*cr+(so?-1:1)*wi*wi*Nr*Nr)/(2*(so?br:cr)*wi*Nr);return Math.log(Math.sqrt(Zo*Zo+1)-Zo)}function tn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ci(so){return(Math.exp(so)+Math.exp(-so))/2}function qi(so){return tn(so)/Ci(so)}var Vi=gn(0),on=function(so){return Ci(Vi)/Ci(Vi+ht*so)},On=function(so){return cr*((Ci(Vi)*qi(Vi+ht*so)-tn(Vi))/wi)/Nr},Ja=(gn(1)-Vi)/ht;if(Math.abs(Nr)<1e-6||!isFinite(Ja)){if(Math.abs(cr-br)<1e-6)return this.easeTo(q,K);var co=br<cr?-1:1;Ja=Math.abs(Math.log(br/cr))/ht,On=function(){return 0},on=function(so){return Math.exp(co*ht*so)}}if(\"duration\"in q)q.duration=+q.duration;else{var rs=\"screenSpeed\"in q?+q.screenSpeed/ht:+q.speed;q.duration=1e3*Ja/rs}return q.maxDuration&&q.duration>q.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=ft!==Ve,this._pitching=et!==Zt,this._padding=!we.isPaddingEqual(at),this._prepareEase(K,!1),this._ease(function(so){var Zo=so*Ja,ys=1/on(Zo);we.zoom=so===1?qt:Ue+we.scaleZoom(ys),de._rotating&&(we.bearing=i.number(ft,Ve,so)),de._pitching&&(we.pitch=i.number(Zt,et,so)),de._padding&&(we.interpolatePadding(hr,at,so),It=we.centerPoint.add(Ot));var ou=so===1?Rt:we.unproject(mt.add(Pt.mult(On(Zo))).mult(ys));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,It),de._fireMoveEvents(K)},function(){return de._afterEase(K)},q),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(q,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!q){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(q,K,de){de.animate===!1||de.duration===0?(q(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=q,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var q=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(q)),q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(q,K){q=i.wrap(q,-180,180);var de=Math.abs(q-K);return Math.abs(q-360-K)<de&&(q-=360),Math.abs(q+360-K)<de&&(q+=360),q},D.prototype._normalizeCenter=function(q){var K=this.transform;if(!(!K.renderWorldCopies||K.lngRange)){var de=q.lng-K.center.lng;q.lng+=de>180?-360:de<-180?360:0}},D}(i.Evented),Qi=function(D){D===void 0&&(D={}),this.options=D,i.bindAll([\"_toggleAttribution\",\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};Qi.prototype.getDefaultPosition=function(){return\"bottom-right\"},Qi.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._compactButton=o.create(\"button\",\"mapboxgl-ctrl-attrib-button\",this._container),this._compactButton.addEventListener(\"click\",this._toggleAttribution),this._setElementTitle(this._compactButton,\"ToggleAttribution\"),this._innerContainer=o.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),this._innerContainer.setAttribute(\"role\",\"list\"),J&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"moveend\",this._updateEditLink),J===void 0&&(this._map.on(\"resize\",this._updateCompact),this._updateCompact()),this._container},Qi.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Qi.prototype._setElementTitle=function(D,J){var q=this._map._getUIString(\"AttributionControl.\"+J);D.title=q,D.setAttribute(\"aria-label\",q)},Qi.prototype._toggleAttribution=function(){this._container.classList.contains(\"mapboxgl-compact-show\")?(this._container.classList.remove(\"mapboxgl-compact-show\"),this._compactButton.setAttribute(\"aria-pressed\",\"false\")):(this._container.classList.add(\"mapboxgl-compact-show\"),this._compactButton.setAttribute(\"aria-pressed\",\"true\"))},Qi.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var J=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var q=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+\"=\"+de.value+(ne<J.length-1?\"&\":\"\")),K},\"?\");D.href=i.config.FEEDBACK_URL+\"/\"+q+(this._map._hash?this._map._hash.getHashString(!0):\"\"),D.rel=\"noopener nofollow\",this._setElementTitle(D,\"MapFeedback\")}},Qi.prototype._updateData=function(D){D&&(D.sourceDataType===\"metadata\"||D.sourceDataType===\"visibility\"||D.dataType===\"style\")&&(this._updateAttributions(),this._updateEditLink())},Qi.prototype._updateAttributions=function(){if(this._map.style){var D=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?D=D.concat(this.options.customAttribution.map(function(Ue){return typeof Ue!=\"string\"?\"\":Ue})):typeof this.options.customAttribution==\"string\"&&D.push(this.options.customAttribution)),this._map.style.stylesheet){var J=this._map.style.stylesheet;this.styleOwner=J.owner,this.styleId=J.id}var q=this._map.style.sourceCaches;for(var K in q){var de=q[K];if(de.used){var ne=de.getSource();ne.attribution&&D.indexOf(ne.attribution)<0&&D.push(ne.attribution)}}D.sort(function(Ue,ft){return Ue.length-ft.length}),D=D.filter(function(Ue,ft){for(var Zt=ft+1;Zt<D.length;Zt++)if(D[Zt].indexOf(Ue)>=0)return!1;return!0});var we=D.join(\" | \");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},Qi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\",\"mapboxgl-compact-show\")};var ji=function(){i.bindAll([\"_updateLogo\"],this),i.bindAll([\"_updateCompact\"],this)};ji.prototype.onAdd=function(D){this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl\");var J=o.create(\"a\",\"mapboxgl-ctrl-logo\");return J.target=\"_blank\",J.rel=\"noopener nofollow\",J.href=\"https://www.mapbox.com/\",J.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),J.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(J),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},ji.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},ji.prototype.getDefaultPosition=function(){return\"bottom-left\"},ji.prototype._updateLogo=function(D){(!D||D.sourceDataType===\"metadata\")&&(this._container.style.display=this._logoRequired()?\"block\":\"none\")},ji.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var q=D[J].getSource();if(q.mapbox_logo)return!0}return!1}},ji.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add(\"mapboxgl-compact\"):J.classList.remove(\"mapboxgl-compact\")}};var si=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};si.prototype.add=function(D){var J=++this._id,q=this._queue;return q.push({callback:D,id:J,cancelled:!1}),J},si.prototype.remove=function(D){for(var J=this._currentlyRunning,q=J?this._queue.concat(J):this._queue,K=0,de=q;K<de.length;K+=1){var ne=de[K];if(ne.id===D){ne.cancelled=!0;return}}},si.prototype.run=function(D){D===void 0&&(D=0);var J=this._currentlyRunning=this._queue;this._queue=[];for(var q=0,K=J;q<K.length;q+=1){var de=K[q];if(!de.cancelled&&(de.callback(D),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},si.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Mr={\"AttributionControl.ToggleAttribution\":\"Toggle attribution\",\"AttributionControl.MapFeedback\":\"Map feedback\",\"FullscreenControl.Enter\":\"Enter fullscreen\",\"FullscreenControl.Exit\":\"Exit fullscreen\",\"GeolocateControl.FindMyLocation\":\"Find my location\",\"GeolocateControl.LocationNotAvailable\":\"Location not available\",\"LogoControl.Title\":\"Mapbox logo\",\"NavigationControl.ResetBearing\":\"Reset bearing to north\",\"NavigationControl.ZoomIn\":\"Zoom in\",\"NavigationControl.ZoomOut\":\"Zoom out\",\"ScaleControl.Feet\":\"ft\",\"ScaleControl.Meters\":\"m\",\"ScaleControl.Kilometers\":\"km\",\"ScaleControl.Miles\":\"mi\",\"ScaleControl.NauticalMiles\":\"nm\"},Yr=i.window.HTMLImageElement,xi=i.window.HTMLElement,Ii=i.window.ImageBitmap,ci=-2,nn=22,Xi=0,qn=60,vi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ci,maxZoom:nn,minPitch:Xi,maxPitch:qn,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:\"sans-serif\",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},li=function(Y){function D(q){var K=this;if(q=i.extend({},vi,q),q.minZoom!=null&&q.maxZoom!=null&&q.minZoom>q.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(q.minPitch!=null&&q.minPitch<Xi)throw new Error(\"minPitch must be greater than or equal to \"+Xi);if(q.maxPitch!=null&&q.maxPitch>qn)throw new Error(\"maxPitch must be less than or equal to \"+qn);var de=new wo(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies);if(Y.call(this,de,q),this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=q.preserveDrawingBuffer,this._antialias=q.antialias,this._trackResize=q.trackResize,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=q.collectResourceTiming,this._renderTaskQueue=new si,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Mr,q.locale),this._clickTolerance=q.clickTolerance,this._requestManager=new i.RequestManager(q.transformRequest,q.accessToken),typeof q.container==\"string\"){if(this._container=i.window.document.getElementById(q.container),!this._container)throw new Error(\"Container '\"+q.container+\"' not found.\")}else if(q.container instanceof xi)this._container=q.container;else throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");if(q.maxBounds&&this.setMaxBounds(q.maxBounds),i.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_onMapScroll\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",function(){return K._update(!1)}),this.on(\"moveend\",function(){return K._update(!1)}),this.on(\"zoom\",function(){return K._update(!0)}),typeof i.window!=\"undefined\"&&(i.window.addEventListener(\"online\",this._onWindowOnline,!1),i.window.addEventListener(\"resize\",this._onWindowResize,!1),i.window.addEventListener(\"orientationchange\",this._onWindowResize,!1)),this.handlers=new Mi(this,q);var ne=typeof q.hash==\"string\"&&q.hash||void 0;this._hash=q.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}),q.bounds&&(this.resize(),this.fitBounds(q.bounds,i.extend({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new Qi({customAttribution:q.customAttribution})),this.addControl(new ji,q.logoPosition),this.on(\"style.load\",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on(\"data\",function(we){K._update(we.dataType===\"style\"),K.fire(new i.Event(we.dataType+\"data\",we))}),this.on(\"dataloading\",function(we){K.fire(new i.Event(we.dataType+\"dataloading\",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de=\"top-right\"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf(\"bottom\")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Ue=!this._moving;return Ue&&(this.stop(),this.fire(new i.Event(\"movestart\",K)).fire(new i.Event(\"move\",K))),this.fire(new i.Event(\"resize\",K)),Ue&&this.fire(new i.Event(\"moveend\",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ci:K,K>=ci&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()<K&&this.setZoom(K),this;throw new Error(\"minZoom must be between \"+ci+\" and the current maxZoom, inclusive\")},D.prototype.getMinZoom=function(){return this.transform.minZoom},D.prototype.setMaxZoom=function(K){if(K=K==null?nn:K,K>=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Xi:K,K<Xi)throw new Error(\"minPitch must be greater than or equal to \"+Xi);if(K>=Xi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()<K&&this.setPitch(K),this;throw new Error(\"minPitch must be between \"+Xi+\" and the current maxPitch, inclusive\")},D.prototype.getMinPitch=function(){return this.transform.minPitch},D.prototype.setMaxPitch=function(K){if(K=K==null?qn:K,K>qn)throw new Error(\"maxPitch must be less than or equal to \"+qn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Ue;if(K===\"mouseenter\"||K===\"mouseover\"){var ft=!1,Zt=function(kt){var Ot=we.getLayer(de)?we.queryRenderedFeatures(kt.point,{layers:[de]}):[];Ot.length?ft||(ft=!0,ne.call(we,new se(K,we,kt.originalEvent,{features:Ot}))):ft=!1},hr=function(){ft=!1};return{layer:de,listener:ne,delegates:{mousemove:Zt,mouseout:hr}}}else if(K===\"mouseleave\"||K===\"mouseout\"){var qt=!1,Ve=function(kt){var Ot=we.getLayer(de)?we.queryRenderedFeatures(kt.point,{layers:[de]}):[];Ot.length?qt=!0:qt&&(qt=!1,ne.call(we,new se(K,we,kt.originalEvent)))},et=function(kt){qt&&(qt=!1,ne.call(we,new se(K,we,kt.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ve,mouseout:et}}}else{var at=function(kt){var Ot=we.getLayer(de)?we.queryRenderedFeatures(kt.point,{layers:[de]}):[];Ot.length&&(kt.features=Ot,ne.call(we,kt),delete kt.features)};return{layer:de,listener:ne,delegates:(Ue={},Ue[K]=at,Ue)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Ue in we.delegates)this.on(Ue,we.delegates[Ue]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Ue in we.delegates)this.once(Ue,we.delegates[Ue]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Ue=function(ft){for(var Zt=ft[K],hr=0;hr<Zt.length;hr++){var qt=Zt[hr];if(qt.layer===de&&qt.listener===ne){for(var Ve in qt.delegates)we.off(Ve,qt.delegates[Ve]);return Zt.splice(hr,1),we}}};return this._delegatedListeners&&this._delegatedListeners[K]&&Ue(this._delegatedListeners),this},D.prototype.queryRenderedFeatures=function(K,de){if(!this.style)return[];de===void 0&&K!==void 0&&!(K instanceof i.Point)&&!Array.isArray(K)&&(de=K,K=void 0),de=de||{},K=K||[[0,0],[this.transform.width,this.transform.height]];var ne;if(K instanceof i.Point||typeof K[0]==\"number\")ne=[i.Point.convert(K)];else{var we=i.Point.convert(K[0]),Ue=i.Point.convert(K[1]);ne=[we,new i.Point(Ue.x,we.y),Ue,new i.Point(we.x,Ue.y),we]}return this.style.queryRenderedFeatures(ne,de,this.transform)},D.prototype.querySourceFeatures=function(K,de){return this.style.querySourceFeatures(K,de)},D.prototype.setStyle=function(K,de){return de=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},de),de.diff!==!1&&de.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&K?(this._diffStyle(K,de),this):(this._localIdeographFontFamily=de.localIdeographFontFamily,this._updateStyle(K,de))},D.prototype._getUIString=function(K){var de=this._locale[K];if(de==null)throw new Error(\"Missing UI string '\"+K+\"'\");return de},D.prototype._updateStyle=function(K,de){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),K)this.style=new yu(this,de||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof K==\"string\"?this.style.loadURL(K):this.style.loadJSON(K),this},D.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new yu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},D.prototype._diffStyle=function(K,de){var ne=this;if(typeof K==\"string\"){var we=this._requestManager.normalizeStyleURL(K),Ue=this._requestManager.transformRequest(we,i.ResourceType.Style);i.getJSON(Ue,function(ft,Zt){ft?ne.fire(new i.ErrorEvent(ft)):Zt&&ne._updateDiff(Zt,de)})}else typeof K==\"object\"&&this._updateDiff(K,de)},D.prototype._updateDiff=function(K,de){try{this.style.setState(K)&&this._update(!0)}catch(ne){i.warnOnce(\"Unable to perform style diff: \"+(ne.message||ne.error||ne)+\".  Rebuilding the style from scratch.\"),this._updateStyle(K,de)}},D.prototype.getStyle=function(){if(this.style)return this.style.serialize()},D.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce(\"There is no style added to the map.\")},D.prototype.addSource=function(K,de){return this._lazyInitEmptyStyle(),this.style.addSource(K,de),this._update(!0)},D.prototype.isSourceLoaded=function(K){var de=this.style&&this.style.sourceCaches[K];if(de===void 0){this.fire(new i.ErrorEvent(new Error(\"There is no source with ID '\"+K+\"'\")));return}return de.loaded()},D.prototype.areTilesLoaded=function(){var K=this.style&&this.style.sourceCaches;for(var de in K){var ne=K[de],we=ne._tiles;for(var Ue in we){var ft=we[Ue];if(!(ft.state===\"loaded\"||ft.state===\"errored\"))return!1}}return!0},D.prototype.addSourceType=function(K,de,ne){return this._lazyInitEmptyStyle(),this.style.addSourceType(K,de,ne)},D.prototype.removeSource=function(K){return this.style.removeSource(K),this._update(!0)},D.prototype.getSource=function(K){return this.style.getSource(K)},D.prototype.addImage=function(K,de,ne){ne===void 0&&(ne={});var we=ne.pixelRatio;we===void 0&&(we=1);var Ue=ne.sdf;Ue===void 0&&(Ue=!1);var ft=ne.stretchX,Zt=ne.stretchY,hr=ne.content;this._lazyInitEmptyStyle();var qt=0;if(de instanceof Yr||Ii&&de instanceof Ii){var Ve=i.browser.getImageData(de),et=Ve.width,at=Ve.height,kt=Ve.data;this.style.addImage(K,{data:new i.RGBAImage({width:et,height:at},kt),pixelRatio:we,stretchX:ft,stretchY:Zt,content:hr,sdf:Ue,version:qt})}else{if(de.width===void 0||de.height===void 0)return this.fire(new i.ErrorEvent(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));var Ot=de.width,It=de.height,Bt=de.data,Rt=de;this.style.addImage(K,{data:new i.RGBAImage({width:Ot,height:It},new Uint8Array(Bt)),pixelRatio:we,stretchX:ft,stretchY:Zt,content:hr,sdf:Ue,version:qt,userImage:Rt}),Rt.onAdd&&Rt.onAdd(this,K)}},D.prototype.updateImage=function(K,de){var ne=this.style.getImage(K);if(!ne)return this.fire(new i.ErrorEvent(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));var we=de instanceof Yr||Ii&&de instanceof Ii?i.browser.getImageData(de):de,Ue=we.width,ft=we.height,Zt=we.data;if(Ue===void 0||ft===void 0)return this.fire(new i.ErrorEvent(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));if(Ue!==ne.data.width||ft!==ne.data.height)return this.fire(new i.ErrorEvent(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));var hr=!(de instanceof Yr||Ii&&de instanceof Ii);ne.data.replace(Zt,hr),this.style.updateImage(K,ne)},D.prototype.hasImage=function(K){return K?!!this.style.getImage(K):(this.fire(new i.ErrorEvent(new Error(\"Missing required image id\"))),!1)},D.prototype.removeImage=function(K){this.style.removeImage(K)},D.prototype.loadImage=function(K,de){i.getImage(this._requestManager.transformRequest(K,i.ResourceType.Image),de)},D.prototype.listImages=function(){return this.style.listImages()},D.prototype.addLayer=function(K,de){return this._lazyInitEmptyStyle(),this.style.addLayer(K,de),this._update(!0)},D.prototype.moveLayer=function(K,de){return this.style.moveLayer(K,de),this._update(!0)},D.prototype.removeLayer=function(K){return this.style.removeLayer(K),this._update(!0)},D.prototype.getLayer=function(K){return this.style.getLayer(K)},D.prototype.setLayerZoomRange=function(K,de,ne){return this.style.setLayerZoomRange(K,de,ne),this._update(!0)},D.prototype.setFilter=function(K,de,ne){return ne===void 0&&(ne={}),this.style.setFilter(K,de,ne),this._update(!0)},D.prototype.getFilter=function(K){return this.style.getFilter(K)},D.prototype.setPaintProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setPaintProperty(K,de,ne,we),this._update(!0)},D.prototype.getPaintProperty=function(K,de){return this.style.getPaintProperty(K,de)},D.prototype.setLayoutProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setLayoutProperty(K,de,ne,we),this._update(!0)},D.prototype.getLayoutProperty=function(K,de){return this.style.getLayoutProperty(K,de)},D.prototype.setLight=function(K,de){return de===void 0&&(de={}),this._lazyInitEmptyStyle(),this.style.setLight(K,de),this._update(!0)},D.prototype.getLight=function(){return this.style.getLight()},D.prototype.setFeatureState=function(K,de){return this.style.setFeatureState(K,de),this._update()},D.prototype.removeFeatureState=function(K,de){return this.style.removeFeatureState(K,de),this._update()},D.prototype.getFeatureState=function(K){return this.style.getFeatureState(K)},D.prototype.getContainer=function(){return this._container},D.prototype.getCanvasContainer=function(){return this._canvasContainer},D.prototype.getCanvas=function(){return this._canvas},D.prototype._containerDimensions=function(){var K=0,de=0;return this._container&&(K=this._container.clientWidth||400,de=this._container.clientHeight||300),[K,de]},D.prototype._detectMissingCSS=function(){var K=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue(\"background-color\");K!==\"rgb(250, 128, 114)\"&&i.warnOnce(\"This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.\")},D.prototype._setupContainer=function(){var K=this._container;K.classList.add(\"mapboxgl-map\");var de=this._missingCSSCanary=o.create(\"div\",\"mapboxgl-canary\",K);de.style.visibility=\"hidden\",this._detectMissingCSS();var ne=this._canvasContainer=o.create(\"div\",\"mapboxgl-canvas-container\",K);this._interactive&&ne.classList.add(\"mapboxgl-interactive\"),this._canvas=o.create(\"canvas\",\"mapboxgl-canvas\",ne),this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",\"0\"),this._canvas.setAttribute(\"aria-label\",\"Map\"),this._canvas.setAttribute(\"role\",\"region\");var we=this._containerDimensions();this._resizeCanvas(we[0],we[1]);var Ue=this._controlContainer=o.create(\"div\",\"mapboxgl-control-container\",K),ft=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(Zt){ft[Zt]=o.create(\"div\",\"mapboxgl-ctrl-\"+Zt,Ue)}),this._container.addEventListener(\"scroll\",this._onMapScroll,!1)},D.prototype._resizeCanvas=function(K,de){var ne=i.browser.devicePixelRatio||1;this._canvas.width=ne*K,this._canvas.height=ne*de,this._canvas.style.width=K+\"px\",this._canvas.style.height=de+\"px\"},D.prototype._setupPainter=function(){var K=i.extend({},a.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),de=this._canvas.getContext(\"webgl\",K)||this._canvas.getContext(\"experimental-webgl\",K);if(!de){this.fire(new i.ErrorEvent(new Error(\"Failed to initialize WebGL\")));return}this.painter=new mo(de,this.transform),i.webpSupported.testSupport(de)},D.prototype._contextLost=function(K){K.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event(\"webglcontextlost\",{originalEvent:K}))},D.prototype._contextRestored=function(K){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event(\"webglcontextrestored\",{originalEvent:K}))},D.prototype._onMapScroll=function(K){if(K.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},D.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},D.prototype._update=function(K){return this.style?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this.triggerRepaint(),this):this},D.prototype._requestRenderFrame=function(K){return this._update(),this._renderTaskQueue.add(K)},D.prototype._cancelRenderFrame=function(K){this._renderTaskQueue.remove(K)},D.prototype._render=function(K){var de=this,ne,we=0,Ue=this.painter.context.extTimerQuery;if(this.listens(\"gpu-timing-frame\")&&(ne=Ue.createQueryEXT(),Ue.beginQueryEXT(Ue.TIME_ELAPSED_EXT,ne),we=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(K),!this._removed){var ft=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Zt=this.transform.zoom,hr=i.browser.now();this.style.zoomHistory.update(Zt,hr);var qt=new i.EvaluationParameters(Zt,{now:hr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ve=qt.crossFadingFactor();(Ve!==1||Ve!==this._crossFadingFactor)&&(ft=!0,this._crossFadingFactor=Ve),this.style.update(qt)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens(\"gpu-timing-layer\")}),this.fire(new i.Event(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.Event(\"load\"))),this.style&&(this.style.hasTransitions()||ft)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens(\"gpu-timing-frame\")){var et=i.browser.now()-we;Ue.endQueryEXT(Ue.TIME_ELAPSED_EXT,ne),setTimeout(function(){var Ot=Ue.getQueryObjectEXT(ne,Ue.QUERY_RESULT_EXT)/1e6;Ue.deleteQueryEXT(ne),de.fire(new i.Event(\"gpu-timing-frame\",{cpuTime:et,gpuTime:Ot}))},50)}if(this.listens(\"gpu-timing-layer\")){var at=this.painter.collectGpuTimers();setTimeout(function(){var Ot=de.painter.queryGpuTimers(at);de.fire(new i.Event(\"gpu-timing-layer\",{layerTimes:Ot}))},50)}var kt=this._sourcesDirty||this._styleDirty||this._placementDirty;return kt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.Event(\"idle\")),this._loaded&&!this._fullyLoaded&&!kt&&(this._fullyLoaded=!0),this}},D.prototype.remove=function(){this._hash&&this._hash.remove();for(var K=0,de=this._controls;K<de.length;K+=1){var ne=de[K];ne.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof i.window!=\"undefined\"&&(i.window.removeEventListener(\"resize\",this._onWindowResize,!1),i.window.removeEventListener(\"orientationchange\",this._onWindowResize,!1),i.window.removeEventListener(\"online\",this._onWindowOnline,!1));var we=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");we&&we.loseContext&&we.loseContext(),mn(this._canvasContainer),mn(this._controlContainer),mn(this._missingCSSCanary),this._container.classList.remove(\"mapboxgl-map\"),this._removed=!0,this.fire(new i.Event(\"remove\"))},D.prototype.triggerRepaint=function(){var K=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(de){K._frame=null,K._render(de)}))},D.prototype._onWindowOnline=function(){this._update()},D.prototype._onWindowResize=function(K){this._trackResize&&this.resize({originalEvent:K})._update()},J.showTileBoundaries.get=function(){return!!this._showTileBoundaries},J.showTileBoundaries.set=function(q){this._showTileBoundaries!==q&&(this._showTileBoundaries=q,this._update())},J.showPadding.get=function(){return!!this._showPadding},J.showPadding.set=function(q){this._showPadding!==q&&(this._showPadding=q,this._update())},J.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},J.showCollisionBoxes.set=function(q){this._showCollisionBoxes!==q&&(this._showCollisionBoxes=q,q?this.style._generateCollisionBoxes():this._update())},J.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},J.showOverdrawInspector.set=function(q){this._showOverdrawInspector!==q&&(this._showOverdrawInspector=q,this._update())},J.repaint.get=function(){return!!this._repaint},J.repaint.set=function(q){this._repaint!==q&&(this._repaint=q,this.triggerRepaint())},J.vertices.get=function(){return!!this._vertices},J.vertices.set=function(q){this._vertices=q,this._update()},D.prototype._setCacheLimits=function(K,de){i.setCacheLimits(K,de)},J.version.get=function(){return i.version},Object.defineProperties(D.prototype,J),D}(Hn);function mn(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}var Ki={showCompass:!0,showZoom:!0,visualizePitch:!1},Ui=function(D){var J=this;this.options=i.extend({},Ki,D),this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",function(q){return q.preventDefault()}),this.options.showZoom&&(i.bindAll([\"_setButtonTitle\",\"_updateZoomButtons\"],this),this._zoomInButton=this._createButton(\"mapboxgl-ctrl-zoom-in\",function(q){return J._map.zoomIn({},{originalEvent:q})}),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomInButton).setAttribute(\"aria-hidden\",!0),this._zoomOutButton=this._createButton(\"mapboxgl-ctrl-zoom-out\",function(q){return J._map.zoomOut({},{originalEvent:q})}),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomOutButton).setAttribute(\"aria-hidden\",!0)),this.options.showCompass&&(i.bindAll([\"_rotateCompassArrow\"],this),this._compass=this._createButton(\"mapboxgl-ctrl-compass\",function(q){J.options.visualizePitch?J._map.resetNorthPitch({},{originalEvent:q}):J._map.resetNorth({},{originalEvent:q})}),this._compassIcon=o.create(\"span\",\"mapboxgl-ctrl-icon\",this._compass),this._compassIcon.setAttribute(\"aria-hidden\",!0))};Ui.prototype._updateZoomButtons=function(){var D=this._map.getZoom(),J=D===this._map.getMaxZoom(),q=D===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=q,this._zoomInButton.setAttribute(\"aria-disabled\",J.toString()),this._zoomOutButton.setAttribute(\"aria-disabled\",q.toString())},Ui.prototype._rotateCompassArrow=function(){var D=this.options.visualizePitch?\"scale(\"+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+\") rotateX(\"+this._map.transform.pitch+\"deg) rotateZ(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\":\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassIcon.style.transform=D},Ui.prototype.onAdd=function(D){return this._map=D,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,\"ZoomIn\"),this._setButtonTitle(this._zoomOutButton,\"ZoomOut\"),this._map.on(\"zoom\",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,\"ResetBearing\"),this.options.visualizePitch&&this._map.on(\"pitch\",this._rotateCompassArrow),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Bi(this._map,this._compass,this.options.visualizePitch)),this._container},Ui.prototype.onRemove=function(){o.remove(this._container),this.options.showZoom&&this._map.off(\"zoom\",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(\"pitch\",this._rotateCompassArrow),this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Ui.prototype._createButton=function(D,J){var q=o.create(\"button\",D,this._container);return q.type=\"button\",q.addEventListener(\"click\",J),q},Ui.prototype._setButtonTitle=function(D,J){var q=this._map._getUIString(\"NavigationControl.\"+J);D.title=q,D.setAttribute(\"aria-label\",q)};var Bi=function(D,J,q){q===void 0&&(q=!1),this._clickTolerance=10,this.element=J,this.mouseRotate=new Rn({clickTolerance:D.dragRotate._mouseRotate._clickTolerance}),this.map=D,q&&(this.mousePitch=new Cn({clickTolerance:D.dragRotate._mousePitch._clickTolerance})),i.bindAll([\"mousedown\",\"mousemove\",\"mouseup\",\"touchstart\",\"touchmove\",\"touchend\",\"reset\"],this),o.addEventListener(J,\"mousedown\",this.mousedown),o.addEventListener(J,\"touchstart\",this.touchstart,{passive:!1}),o.addEventListener(J,\"touchmove\",this.touchmove),o.addEventListener(J,\"touchend\",this.touchend),o.addEventListener(J,\"touchcancel\",this.reset)};Bi.prototype.down=function(D,J){this.mouseRotate.mousedown(D,J),this.mousePitch&&this.mousePitch.mousedown(D,J),o.disableDrag()},Bi.prototype.move=function(D,J){var q=this.map,K=this.mouseRotate.mousemoveWindow(D,J);if(K&&K.bearingDelta&&q.setBearing(q.getBearing()+K.bearingDelta),this.mousePitch){var de=this.mousePitch.mousemoveWindow(D,J);de&&de.pitchDelta&&q.setPitch(q.getPitch()+de.pitchDelta)}},Bi.prototype.off=function(){var D=this.element;o.removeEventListener(D,\"mousedown\",this.mousedown),o.removeEventListener(D,\"touchstart\",this.touchstart,{passive:!1}),o.removeEventListener(D,\"touchmove\",this.touchmove),o.removeEventListener(D,\"touchend\",this.touchend),o.removeEventListener(D,\"touchcancel\",this.reset),this.offTemp()},Bi.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(i.window,\"mousemove\",this.mousemove),o.removeEventListener(i.window,\"mouseup\",this.mouseup)},Bi.prototype.mousedown=function(D){this.down(i.extend({},D,{ctrlKey:!0,preventDefault:function(){return D.preventDefault()}}),o.mousePos(this.element,D)),o.addEventListener(i.window,\"mousemove\",this.mousemove),o.addEventListener(i.window,\"mouseup\",this.mouseup)},Bi.prototype.mousemove=function(D){this.move(D,o.mousePos(this.element,D))},Bi.prototype.mouseup=function(D){this.mouseRotate.mouseupWindow(D),this.mousePitch&&this.mousePitch.mouseupWindow(D),this.offTemp()},Bi.prototype.touchstart=function(D){D.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return D.preventDefault()}},this._startPos))},Bi.prototype.touchmove=function(D){D.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.move({preventDefault:function(){return D.preventDefault()}},this._lastPos))},Bi.prototype.touchend=function(D){D.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Bi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function vn(Y,D,J){if(Y=new i.LngLat(Y.lng,Y.lat),D){var q=new i.LngLat(Y.lng-360,Y.lat),K=new i.LngLat(Y.lng+360,Y.lat),de=J.locationPoint(Y).distSqr(D);J.locationPoint(q).distSqr(D)<de?Y=q:J.locationPoint(K).distSqr(D)<de&&(Y=K)}for(;Math.abs(Y.lng-J.center.lng)>180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Un={center:\"translate(-50%,-50%)\",top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"};function na(Y,D,J){var q=Y.classList;for(var K in Un)q.remove(\"mapboxgl-\"+J+\"-anchor-\"+K);q.add(\"mapboxgl-\"+J+\"-anchor-\"+D)}var Yi=function(Y){function D(J,q){if(Y.call(this),(J instanceof i.window.HTMLElement||q)&&(J=i.extend({element:J},q)),i.bindAll([\"_update\",\"_onMove\",\"_onUp\",\"_addDragHandler\",\"_onMapClick\",\"_onKeyPress\"],this),this._anchor=J&&J.anchor||\"center\",this._color=J&&J.color||\"#3FB1CE\",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state=\"inactive\",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||\"auto\",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!==\"auto\"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create(\"div\"),this._element.setAttribute(\"aria-label\",\"Map marker\");var K=o.createNS(\"http://www.w3.org/2000/svg\",\"svg\"),de=41,ne=27;K.setAttributeNS(null,\"display\",\"block\"),K.setAttributeNS(null,\"height\",de+\"px\"),K.setAttributeNS(null,\"width\",ne+\"px\"),K.setAttributeNS(null,\"viewBox\",\"0 0 \"+ne+\" \"+de);var we=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");we.setAttributeNS(null,\"stroke\",\"none\"),we.setAttributeNS(null,\"stroke-width\",\"1\"),we.setAttributeNS(null,\"fill\",\"none\"),we.setAttributeNS(null,\"fill-rule\",\"evenodd\");var Ue=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ue.setAttributeNS(null,\"fill-rule\",\"nonzero\");var ft=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");ft.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),ft.setAttributeNS(null,\"fill\",\"#000000\");for(var Zt=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}],hr=0,qt=Zt;hr<qt.length;hr+=1){var Ve=qt[hr],et=o.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");et.setAttributeNS(null,\"opacity\",\"0.04\"),et.setAttributeNS(null,\"cx\",\"10.5\"),et.setAttributeNS(null,\"cy\",\"5.80029008\"),et.setAttributeNS(null,\"rx\",Ve.rx),et.setAttributeNS(null,\"ry\",Ve.ry),ft.appendChild(et)}var at=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");at.setAttributeNS(null,\"fill\",this._color);var kt=o.createNS(\"http://www.w3.org/2000/svg\",\"path\");kt.setAttributeNS(null,\"d\",\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\"),at.appendChild(kt);var Ot=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ot.setAttributeNS(null,\"opacity\",\"0.25\"),Ot.setAttributeNS(null,\"fill\",\"#000000\");var It=o.createNS(\"http://www.w3.org/2000/svg\",\"path\");It.setAttributeNS(null,\"d\",\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\"),Ot.appendChild(It);var Bt=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Bt.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),Bt.setAttributeNS(null,\"fill\",\"#FFFFFF\");var Rt=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Rt.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");var mt=o.createNS(\"http://www.w3.org/2000/svg\",\"circle\");mt.setAttributeNS(null,\"fill\",\"#000000\"),mt.setAttributeNS(null,\"opacity\",\"0.25\"),mt.setAttributeNS(null,\"cx\",\"5.5\"),mt.setAttributeNS(null,\"cy\",\"5.5\"),mt.setAttributeNS(null,\"r\",\"5.4999962\");var Pt=o.createNS(\"http://www.w3.org/2000/svg\",\"circle\");Pt.setAttributeNS(null,\"fill\",\"#FFFFFF\"),Pt.setAttributeNS(null,\"cx\",\"5.5\"),Pt.setAttributeNS(null,\"cy\",\"5.5\"),Pt.setAttributeNS(null,\"r\",\"5.4999962\"),Rt.appendChild(mt),Rt.appendChild(Pt),Ue.appendChild(ft),Ue.appendChild(at),Ue.appendChild(Ot),Ue.appendChild(Bt),Ue.appendChild(Rt),K.appendChild(Ue),K.setAttributeNS(null,\"height\",de*this._scale+\"px\"),K.setAttributeNS(null,\"width\",ne*this._scale+\"px\"),this._element.appendChild(K),this._offset=i.Point.convert(J&&J.offset||[0,-14])}else this._element=J.element,this._offset=i.Point.convert(J&&J.offset||[0,0]);this._element.classList.add(\"mapboxgl-marker\"),this._element.addEventListener(\"dragstart\",function(ht){ht.preventDefault()}),this._element.addEventListener(\"mousedown\",function(ht){ht.preventDefault()}),na(this._element,this._anchor,\"marker\"),this._popup=null}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this.remove(),this._map=q,q.getCanvasContainer().appendChild(this._element),q.on(\"move\",this._update),q.on(\"moveend\",this._update),this.setDraggable(this._draggable),this._update(),this._map.on(\"click\",this._onMapClick),this},D.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler),this._map.off(\"mouseup\",this._onUp),this._map.off(\"touchend\",this._onUp),this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},D.prototype.getElement=function(){return this._element},D.prototype.setPopup=function(q){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(\"keypress\",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(\"tabindex\")),q){if(!(\"offset\"in q.options)){var K=38.1,de=13.5,ne=Math.sqrt(Math.pow(de,2)/2);q.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-K],\"bottom-left\":[ne,(K-de+ne)*-1],\"bottom-right\":[-ne,(K-de+ne)*-1],left:[de,(K-de)*-1],right:[-de,(K-de)*-1]}:this._offset}this._popup=q,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute(\"tabindex\"),this._originalTabIndex||this._element.setAttribute(\"tabindex\",\"0\"),this._element.addEventListener(\"keypress\",this._onKeyPress)}return this},D.prototype._onKeyPress=function(q){var K=q.code,de=q.charCode||q.keyCode;(K===\"Space\"||K===\"Enter\"||de===32||de===13)&&this.togglePopup()},D.prototype._onMapClick=function(q){var K=q.originalEvent.target,de=this._element;this._popup&&(K===de||de.contains(K))&&this.togglePopup()},D.prototype.getPopup=function(){return this._popup},D.prototype.togglePopup=function(){var q=this._popup;if(q)q.isOpen()?q.remove():q.addTo(this._map);else return this;return this},D.prototype._update=function(q){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=vn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var K=\"\";this._rotationAlignment===\"viewport\"||this._rotationAlignment===\"auto\"?K=\"rotateZ(\"+this._rotation+\"deg)\":this._rotationAlignment===\"map\"&&(K=\"rotateZ(\"+(this._rotation-this._map.getBearing())+\"deg)\");var de=\"\";this._pitchAlignment===\"viewport\"||this._pitchAlignment===\"auto\"?de=\"rotateX(0deg)\":this._pitchAlignment===\"map\"&&(de=\"rotateX(\"+this._map.getPitch()+\"deg)\"),(!q||q.type===\"moveend\")&&(this._pos=this._pos.round()),o.setTransform(this._element,Un[this._anchor]+\" translate(\"+this._pos.x+\"px, \"+this._pos.y+\"px) \"+de+\" \"+K)}},D.prototype.getOffset=function(){return this._offset},D.prototype.setOffset=function(q){return this._offset=i.Point.convert(q),this._update(),this},D.prototype._onMove=function(q){if(!this._isDragging){var K=this._clickTolerance||this._map._clickTolerance;this._isDragging=q.point.dist(this._pointerdownPos)>=K}this._isDragging&&(this._pos=q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=\"none\",this._state===\"pending\"&&(this._state=\"active\",this.fire(new i.Event(\"dragstart\"))),this.fire(new i.Event(\"drag\")))},D.prototype._onUp=function(){this._element.style.pointerEvents=\"auto\",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),this._state===\"active\"&&this.fire(new i.Event(\"dragend\")),this._state=\"inactive\"},D.prototype._addDragHandler=function(q){this._element.contains(q.originalEvent.target)&&(q.preventDefault(),this._positionDelta=q.point.sub(this._pos).add(this._offset),this._pointerdownPos=q.point,this._state=\"pending\",this._map.on(\"mousemove\",this._onMove),this._map.on(\"touchmove\",this._onMove),this._map.once(\"mouseup\",this._onUp),this._map.once(\"touchend\",this._onUp))},D.prototype.setDraggable=function(q){return this._draggable=!!q,this._map&&(q?(this._map.on(\"mousedown\",this._addDragHandler),this._map.on(\"touchstart\",this._addDragHandler)):(this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(q){return this._rotation=q||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(q){return this._rotationAlignment=q||\"auto\",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(q){return this._pitchAlignment=q&&q!==\"auto\"?q:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),Ln={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ra;function oa(Y){ra!==void 0?Y(ra):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:\"geolocation\"}).then(function(D){ra=D.state!==\"denied\",Y(ra)}):(ra=!!i.window.navigator.geolocation,Y(ra))}var wa=0,ns=!1,Ys=function(Y){function D(J){Y.call(this),this.options=i.extend({},Ln,J),i.bindAll([\"_onSuccess\",\"_onError\",\"_onZoom\",\"_finish\",\"_setupUI\",\"_updateCamera\",\"_updateMarker\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){return this._map=q,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),oa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off(\"zoom\",this._onZoom),this._map=void 0,wa=0,ns=!1},D.prototype._isOutOfMapMaxBounds=function(q){var K=this._map.getMaxBounds(),de=q.coords;return K&&(de.longitude<K.getWest()||de.longitude>K.getEast()||de.latitude<K.getSouth()||de.latitude>K.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break}},D.prototype._onSuccess=function(q){if(this._map){if(this._isOutOfMapMaxBounds(q)){this._setErrorState(),this.fire(new i.Event(\"outofmaxbounds\",q)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break}this.options.showUserLocation&&this._watchState!==\"OFF\"&&this._updateMarker(q),(!this.options.trackUserLocation||this._watchState===\"ACTIVE_LOCK\")&&this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove(\"mapboxgl-user-location-dot-stale\"),this.fire(new i.Event(\"geolocate\",q)),this._finish()}},D.prototype._updateCamera=function(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude),de=q.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(q){if(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var q=this._map._container.clientHeight/2,K=this._map.unproject([0,q]),de=this._map.unproject([1,q]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+\"px\",this._circleElement.style.height=we+\"px\"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(q){if(this._map){if(this.options.trackUserLocation)if(q.code===1){this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.disabled=!0;var K=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=K,this._geolocateButton.setAttribute(\"aria-label\",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(q.code===3&&ns)return;this._setErrorState()}this._watchState!==\"OFF\"&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new i.Event(\"error\",q)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(q){var K=this;if(this._container.addEventListener(\"contextmenu\",function(we){return we.preventDefault()}),this._geolocateButton=o.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",q===!1){i.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var de=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute(\"aria-label\",de)}else{var ne=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=ne,this._geolocateButton.setAttribute(\"aria-label\",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=o.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Yi(this._dotElement),this._circleElement=o.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Yi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",function(we){var Ue=we.originalEvent&&we.originalEvent.type===\"resize\";!we.geolocateSource&&K._watchState===\"ACTIVE_LOCK\"&&!Ue&&(K._watchState=\"BACKGROUND\",K._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),K._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),K.fire(new i.Event(\"trackuserlocationend\")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new i.Event(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":wa--,ns=!1,this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this.fire(new i.Event(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event(\"trackuserlocationstart\"));break}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"BACKGROUND\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break;case\"BACKGROUND_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\");break}if(this._watchState===\"OFF\"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),wa++;var q;wa>1?(q={maximumAge:6e5,timeout:0},ns=!0):(q=this.options.positionOptions,ns=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,q)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:\"metric\"},El=function(D){this.options=i.extend({},Va,D),i.bindAll([\"_onMove\",\"setUnit\"],this)};El.prototype.getDefaultPosition=function(){return\"bottom-left\"},El.prototype._onMove=function(){zo(this._map,this._container,this.options)},El.prototype.onAdd=function(D){return this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",D.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},El.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},El.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var q=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([q,K]),we=de.distanceTo(ne);if(J&&J.unit===\"imperial\"){var Ue=3.2808*we;if(Ue>5280){var ft=Ue/5280;el(D,q,ft,Y._getUIString(\"ScaleControl.Miles\"))}else el(D,q,Ue,Y._getUIString(\"ScaleControl.Feet\"))}else if(J&&J.unit===\"nautical\"){var Zt=we/1852;el(D,q,Zt,Y._getUIString(\"ScaleControl.NauticalMiles\"))}else we>=1e3?el(D,q,we/1e3,Y._getUIString(\"ScaleControl.Kilometers\")):el(D,q,we,Y._getUIString(\"ScaleControl.Meters\"))}function el(Y,D,J,q){var K=Vl(J),de=K/J;Y.style.width=D*de+\"px\",Y.innerHTML=K+\"&nbsp;\"+q}function ol(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(\"\"+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:ol(J),D*J}var ls=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce(\"Full screen control 'container' must be a DOM element.\")),i.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in i.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in i.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in i.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in i.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};ls.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",i.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},ls.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ls.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ls.prototype._setupUI=function(){var D=this._fullscreenButton=o.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);o.create(\"span\",\"mapboxgl-ctrl-icon\",D).setAttribute(\"aria-hidden\",!0),D.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ls.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",D),this._fullscreenButton.title=D},ls.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},ls.prototype._isFullscreen=function(){return this._fullscreen},ls.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},ls.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Gs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:\"\",maxWidth:\"240px\"},Ks=[\"a[href]\",\"[tabindex]:not([tabindex='-1'])\",\"[contenteditable]:not([contenteditable='false'])\",\"button:not([disabled])\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].join(\", \"),Ta=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Gs),J),i.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this._map&&this.remove(),this._map=q,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new i.Event(\"open\")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new i.Event(\"close\")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(q){return this.setDOMContent(i.window.document.createTextNode(q))},D.prototype.setHTML=function(q){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement(\"body\"),ne;for(de.innerHTML=q;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(q){return this.options.maxWidth=q,this._update(),this},D.prototype.setDOMContent=function(q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create(\"div\",\"mapboxgl-popup-content\",this._container);return this._content.appendChild(q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(q){this._container&&this._container.classList.add(q)},D.prototype.removeClassName=function(q){this._container&&this._container.classList.remove(q)},D.prototype.setOffset=function(q){return this.options.offset=q,this._update(),this},D.prototype.toggleClassName=function(q){if(this._container)return this._container.classList.toggle(q)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClose))},D.prototype._onMouseUp=function(q){this._update(q.point)},D.prototype._onMouseMove=function(q){this._update(q.point)},D.prototype._onDrag=function(q){this._update(q.point)},D.prototype._update=function(q){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=o.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach(function(Ve){return K._container.classList.add(Ve)}),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=vn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!q))){var ne=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat),we=this.options.anchor,Ue=sl(this.options.offset);if(!we){var ft=this._container.offsetWidth,Zt=this._container.offsetHeight,hr;ne.y+Ue.bottom.y<Zt?hr=[\"top\"]:ne.y>this._map.transform.height-Zt?hr=[\"bottom\"]:hr=[],ne.x<ft/2?hr.push(\"left\"):ne.x>this._map.transform.width-ft/2&&hr.push(\"right\"),hr.length===0?we=\"bottom\":we=hr.join(\"-\")}var qt=ne.add(Ue[we]).round();o.setTransform(this._container,Un[we]+\" translate(\"+qt.x+\"px,\"+qt.y+\"px)\"),na(this._container,we,\"popup\")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var q=this._container.querySelector(Ks);q&&q.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function sl(Y){if(Y)if(typeof Y==\"number\"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),\"top-left\":new i.Point(D,D),\"top-right\":new i.Point(-D,D),bottom:new i.Point(0,-Y),\"bottom-left\":new i.Point(D,-D),\"bottom-right\":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,\"top-left\":J,\"top-right\":J,bottom:J,\"bottom-left\":J,\"bottom-right\":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),\"top-left\":i.Point.convert(Y[\"top-left\"]||[0,0]),\"top-right\":i.Point.convert(Y[\"top-right\"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),\"bottom-left\":i.Point.convert(Y[\"bottom-left\"]||[0,0]),\"bottom-right\":i.Point.convert(Y[\"bottom-right\"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return sl(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:li,NavigationControl:Ui,GeolocateControl:Ys,AttributionControl:Qi,ScaleControl:El,FullscreenControl:ls,Popup:Ta,Marker:Yi,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:la,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return cn.workerCount},set workerCount(Y){cn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:\"\"};return io}),r})});var XVe=ye((b_r,WVe)=>{\"use strict\";var tw=Dr(),ejt=ru().sanitizeHTML,tjt=eJ(),GVe=c1();function HVe(e,t){this.subplot=e,this.uid=e.uid+\"-\"+t,this.index=t,this.idSource=\"source-\"+this.uid,this.idLayer=GVe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ig=HVe.prototype;ig.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=Yz(t)};ig.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType===\"image\"&&e.sourcetype===\"image\"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ig.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ig.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]};ig.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]};ig.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ig.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!Yz(e)){var r=rjt(e);t.addSource(this.idSource,r)}};ig.findFollowingMapboxLayerId=function(e){if(e===\"traces\")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n==\"string\"&&n.indexOf(GVe.traceLayerPrefix)===0){e=n;break}}return e};ig.updateLayer=function(e){var t=this.subplot,r=jVe(e),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),Yz(e)&&t.addLayer({id:this.idLayer,source:this.idSource,\"source-layer\":e.sourcelayer||\"\",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};ig.updateStyle=function(e){if(Yz(e)){var t=jVe(e);this.subplot.setOptions(this.idLayer,\"setLayoutProperty\",t.layout),this.subplot.setOptions(this.idLayer,\"setPaintProperty\",t.paint)}};ig.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ig.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function Yz(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!=\"string\"||t[r].length===0)return!1;return!0}return tw.isPlainObject(t)||typeof t==\"string\"&&t.length>0}function jVe(e){var t={},r={};switch(e.type){case\"circle\":tw.extendFlat(r,{\"circle-radius\":e.circle.radius,\"circle-color\":e.color,\"circle-opacity\":e.opacity});break;case\"line\":tw.extendFlat(r,{\"line-width\":e.line.width,\"line-color\":e.color,\"line-opacity\":e.opacity,\"line-dasharray\":e.line.dash});break;case\"fill\":tw.extendFlat(r,{\"fill-color\":e.color,\"fill-outline-color\":e.fill.outlinecolor,\"fill-opacity\":e.opacity});break;case\"symbol\":var n=e.symbol,i=tjt(n.textposition,n.iconsize);tw.extendFlat(t,{\"icon-image\":n.icon+\"-15\",\"icon-size\":n.iconsize/10,\"text-field\":n.text,\"text-size\":n.textfont.size,\"text-anchor\":i.anchor,\"text-offset\":i.offset,\"symbol-placement\":n.placement}),tw.extendFlat(r,{\"icon-color\":e.color,\"text-color\":n.textfont.color,\"text-opacity\":e.opacity});break;case\"raster\":tw.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":e.opacity});break}return{layout:t,paint:r}}function rjt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t===\"geojson\"?i=\"data\":t===\"vector\"?i=typeof r==\"string\"?\"url\":\"tiles\":t===\"raster\"?(i=\"tiles\",n.tileSize=256):t===\"image\"&&(i=\"url\",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=ejt(e.sourceattribution)),n}WVe.exports=function(t,r,n){var i=new HVe(t,r);return i.update(n),i}});var rGe=ye((w_r,tGe)=>{\"use strict\";var sJ=oJ(),lJ=Dr(),JVe=ix(),ZVe=qa(),ijt=ho(),njt=yv(),Kz=vf(),$Ve=Sg(),ajt=$Ve.drawMode,ojt=$Ve.selectMode,sjt=zf().prepSelect,ljt=zf().clearOutline,ujt=zf().clearSelectionsCache,cjt=zf().selectOnClick,yx=c1(),fjt=XVe();function QVe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+\"-\"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var qh=QVe.prototype;qh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};qh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=eGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new sJ.Map({container:i.div,style:o.style,center:uJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new sJ.AttributionControl({compact:!0}));u._canvas.style.left=\"0px\",u._canvas.style.top=\"0px\",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once(\"load\",f)})),c=c.concat(JVe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};qh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=eGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once(\"styledata\",u)}))),s=s.concat(JVe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};qh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below==\"string\"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===\"\"&&(s=!0),o[\"trace-\"+l.uid]=a||\"\"}for(i=0;i<n.length;i++){var c=n[i];typeof c.below==\"string\"?a=c.below:s?a=\"traces\":a=\"\",o[\"layout-\"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf(\"trace-\")===0?(d=h.split(\"trace-\")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf(\"layout-\")===0&&(d=h.split(\"layout-\")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var YVe={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};qh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return YVe[f[0].trace.type]-YVe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};qh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(uJ(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()};qh.resolveOnRender=function(e){var t=this.map;t.on(\"render\",function r(){t.loaded()&&(t.off(\"render\",r),setTimeout(e,10))})};qh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(yx.mapOnErrorMsg))}t.once(\"error\",r),t.once(\"style.error\",r),t.once(\"source.error\",r),t.once(\"tile.error\",r),t.once(\"layer.error\",r)};qh.createFramework=function(e){var t=this,r=t.div=document.createElement(\"div\");r.id=t.uid,r.style.position=\"absolute\",t.container.appendChild(r),t.xaxis={_id:\"x\",c2p:function(n){return t.project(n).x}},t.yaxis={_id:\"y\",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},ijt.setConvert(t.mockAxis,e)};qh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on(\"moveend\",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];ZVe.call(\"_storeDirectGUIEdit\",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type===\"mouseup\"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l._rehover&&l._rehover()}}),i.on(\"wheel\",function(){r.wheeling=!0}),i.on(\"mousemove\",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&Kz.hover(n,s,r.id)},Kz.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){Kz.loneUnhover(t._hoverlayer)}i.on(\"dragstart\",function(){r.dragging=!0,a()}),i.on(\"zoomstart\",a),i.on(\"mouseout\",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit(\"plotly_relayouting\",r.getViewEditsWithDerived(s))}i.on(\"drag\",o),i.on(\"zoom\",o),i.on(\"dblclick\",function(){var s=n._fullLayout[r.id];ZVe.call(\"_storeDirectGUIEdit\",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(uJ(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit(\"plotly_doubleclick\",null),n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){ujt(r.dragOptions),ljt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf(\"select\")>-1&&cjt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf(\"event\")>-1&&Kz.click(n,l.originalEvent)}}};qh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=lJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off(\"click\",t.onClickInPanHandler),ojt(a)||ajt(a)?(r.dragPan.disable(),r.on(\"zoomstart\",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){sjt(l,u,c,t.dragOptions,a)},njt.init(t.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener(\"touchstart\",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on(\"click\",t.onClickInPanHandler))};qh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+\"px\",n.height=r.h*(t.y[1]-t.y[0])+\"px\",n.left=r.l+t.x[0]*r.w+\"px\",n.top=r.t+(1-t.y[1])*r.h+\"px\",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};qh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push(fjt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};qh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};qh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};qh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};qh.getMapLayers=function(){return this.map.getStyle().layers};qh.addLayer=function(e,t){var r=this.map;if(typeof t==\"string\"){if(t===\"\"){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}lJ.warn([\"Trying to add layer with *below* value\",t,\"referencing a layer that does not exist\",\"or that does not yet exist.\"].join(\" \"))}r.addLayer(e)};qh.project=function(e){return this.map.project(new sJ.LngLat(e[0],e[1]))};qh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};qh.getViewEdits=function(e){for(var t=this.id,r=[\"center\",\"zoom\",\"bearing\",\"pitch\"],n={},i=0;i<r.length;i++){var a=r[i];n[t+\".\"+a]=e[a]}return n};qh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+\"._derived\"]=e._derived,r};function eGe(e,t){var r={};if(lJ.isPlainObject(e))r.id=e.id,r.style=e;else if(typeof e==\"string\")if(r.id=e,yx.styleValuesMapbox.indexOf(e)!==-1)r.style=KVe(e);else if(yx.stylesNonMapbox[e]){r.style=yx.stylesNonMapbox[e];var n=r.style.sources[\"plotly-\"+e],i=n?n.tiles:void 0;i&&i[0]&&i[0].slice(-9)===\"?api_key=\"&&(i[0]+=t._mapboxAccessToken)}else r.style=e;else r.id=yx.styleValueDflt,r.style=KVe(yx.styleValueDflt);return r.transition={duration:0,delay:0},r}function KVe(e){return yx.styleUrlPrefix+e+\"-\"+yx.styleUrlSuffix}function uJ(e){return[e.lon,e.lat]}tGe.exports=QVe});var aGe=ye((T_r,nGe)=>{\"use strict\";var cJ=Dr(),hjt=C_(),djt=Yd(),iGe=BC();nGe.exports=function(t,r,n){hjt(t,r,n,{type:\"mapbox\",attributes:iGe,handleDefaults:vjt,partition:\"y\",accessToken:r._mapboxAccessToken})};function vjt(e,t,r,n){r(\"accesstoken\",n.accessToken),r(\"style\"),r(\"center.lon\"),r(\"center.lat\"),r(\"zoom\"),r(\"bearing\"),r(\"pitch\");var i=r(\"bounds.west\"),a=r(\"bounds.east\"),o=r(\"bounds.south\"),s=r(\"bounds.north\");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,djt(e,t,{name:\"layers\",handleItemDefaults:pjt}),t._input=e}function pjt(e,t){function r(l,u){return cJ.coerce(e,t,iGe.layers,l,u)}var n=r(\"visible\");if(n){var i=r(\"sourcetype\"),a=i===\"raster\"||i===\"image\";r(\"source\"),r(\"sourceattribution\"),i===\"vector\"&&r(\"sourcelayer\"),i===\"image\"&&r(\"coordinates\");var o;a&&(o=\"raster\");var s=r(\"type\",o);a&&s!==\"raster\"&&(s=t.type=\"raster\",cJ.log(\"Source types *raster* and *image* must drawn *raster* layer type.\")),r(\"below\"),r(\"color\"),r(\"opacity\"),r(\"minzoom\"),r(\"maxzoom\"),s===\"circle\"&&r(\"circle.radius\"),s===\"line\"&&(r(\"line.width\"),r(\"line.dash\")),s===\"fill\"&&r(\"fill.outlinecolor\"),s===\"symbol\"&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),cJ.coerceFont(r,\"symbol.textfont\",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r(\"symbol.textposition\"),r(\"symbol.placement\"))}}});var Jz=ye(Bp=>{\"use strict\";var oGe=oJ(),tm=Dr(),fJ=tm.strTranslate,gjt=tm.strScale,mjt=Id().getSubplotCalcData,yjt=Wp(),_jt=Oa(),sGe=So(),xjt=ru(),bjt=rGe(),_x=\"mapbox\",Qm=Bp.constants=c1();Bp.name=_x;Bp.attr=\"subplot\";Bp.idRoot=_x;Bp.idRegex=Bp.attrRegex=tm.counterRegex(_x);var wjt=[\"mapbox subplots and traces are deprecated!\",\"Please consider switching to `map` subplots and traces.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");Bp.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}};Bp.layoutAttributes=BC();Bp.supplyLayoutDefaults=aGe();var lGe=!0;Bp.plot=function(t){lGe&&(lGe=!1,tm.warn(wjt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(oGe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=Tjt(t,i);oGe.accessToken=a;for(var o=0;o<i.length;o++){var s=i[o],l=mjt(n,_x,s),u=r[s],c=u._subplot;c||(c=new bjt(t,s),r[s]._subplot=c),c.viewInitial||(c.viewInitial={center:tm.extendFlat({},u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),c.plot(l,r,t._promises)}};Bp.clean=function(e,t,r,n){for(var i=n._subplots[_x]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};Bp.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:yjt.svg,\"xlink:href\":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"});var c=_jt.select(a._subplot.div),f=c.select(\".mapboxgl-ctrl-logo\").node().offsetParent===null;if(!f){var h=t._glimages.append(\"g\");h.attr(\"transform\",fJ(n.l+n.w*o.x[0]+10,n.t+n.h*(1-o.y[0])-31)),h.append(\"path\").attr(\"d\",Qm.mapboxLogo.path0).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"}),h.append(\"path\").attr(\"d\",Qm.mapboxLogo.path1).style(\"opacity\",.35).style(\"enable-background\",\"new\"),h.append(\"path\").attr(\"d\",Qm.mapboxLogo.path2).style(\"opacity\",.35).style(\"enable-background\",\"new\"),h.append(\"polygon\").attr(\"points\",Qm.mapboxLogo.polygon).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"})}var d=c.select(\".mapboxgl-ctrl-attrib\").text().replace(\"Improve this map\",\"\"),v=t._glimages.append(\"g\"),x=v.append(\"text\");x.text(d).classed(\"static-attribution\",!0).attr({\"font-size\":12,\"font-family\":\"Arial\",color:\"rgba(0, 0, 0, 0.75)\",\"text-anchor\":\"end\",\"data-unformatted\":d});var b=sGe.bBox(x.node()),p=n.w*(o.x[1]-o.x[0]);if(b.width>p/2){var C=d.split(\"|\").join(\"<br>\");x.text(C).attr(\"data-unformatted\",C).call(xjt.convertToTspans,e),b=sGe.bBox(x.node())}x.attr(\"transform\",fJ(-3,-b.height+8)),v.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var E=1;b.width+6>p&&(E=p/(b.width+6));var A=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr(\"transform\",fJ(A[0],A[1])+gjt(E))}};function Tjt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken===\"\")return\"\";for(var i=[],a=[],o=!1,s=!1,l=0;l<t.length;l++){var u=r[t[l]],c=u.accesstoken;uGe(u.style)&&(c?tm.pushUnique(i,c):(uGe(u._input.style)&&(tm.error(\"Uses Mapbox map style, but did not set an access token.\"),o=!0),s=!0)),c&&tm.pushUnique(a,c)}if(s){var f=o?Qm.noAccessTokenErrorMsg:Qm.missingStyleErrorMsg;throw tm.error(f),new Error(f)}return i.length?(i.length>1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}function uGe(e){return typeof e==\"string\"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf(\"mapbox://\")===0||e.indexOf(\"stamen\")===0)}Bp.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var fGe=ye((M_r,cGe)=>{\"use strict\";var S_r=[\"*scattermapbox* trace is deprecated!\",\"Please consider switching to the *scattermap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");cGe.exports={attributes:Gz(),supplyDefaults:wVe(),colorbar:$d(),formatLabels:QK(),calc:hF(),plot:zVe(),hoverPoints:Zz().hoverPoints,eventData:NVe(),selectPoints:VVe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:Jz(),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var dGe=ye((E_r,hGe)=>{\"use strict\";hGe.exports=fGe()});var hJ=ye((C_r,vGe)=>{\"use strict\";var f1=JA(),Ajt=Tu(),Sjt=Qo().hovertemplateAttrs,Mjt=Gl(),xx=Ao().extendFlat;vGe.exports=xx({locations:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:xx({},f1.featureidkey,{}),below:{valType:\"string\",editType:\"plot\"},text:f1.text,hovertext:f1.hovertext,marker:{line:{color:xx({},f1.marker.line.color,{editType:\"plot\"}),width:xx({},f1.marker.line.width,{editType:\"plot\"}),editType:\"calc\"},opacity:xx({},f1.marker.opacity,{editType:\"plot\"}),editType:\"calc\"},selected:{marker:{opacity:xx({},f1.selected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:xx({},f1.unselected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},hoverinfo:f1.hoverinfo,hovertemplate:Sjt({},{keys:[\"properties\"]}),showlegend:xx({},Mjt.showlegend,{dflt:!1})},Ajt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var gGe=ye((k_r,pGe)=>{\"use strict\";var GC=Dr(),Ejt=Jh(),Cjt=hJ();pGe.exports=function(t,r,n,i){function a(c,f){return GC.coerce(t,r,Cjt,c,f)}var o=a(\"locations\"),s=a(\"z\"),l=a(\"geojson\");if(!GC.isArrayOrTypedArray(o)||!o.length||!GC.isArrayOrTypedArray(s)||!s.length||!(typeof l==\"string\"&&l!==\"\"||GC.isPlainObject(l))){r.visible=!1;return}a(\"featureidkey\"),r._length=Math.min(o.length,s.length),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\");var u=a(\"marker.line.width\");u&&a(\"marker.line.color\"),a(\"marker.opacity\"),Ejt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),GC.coerceSelectionMarkerOpacity(r,a)}});var dJ=ye((L_r,_Ge)=>{\"use strict\";var kjt=Eo(),h1=Dr(),Ljt=tc(),Pjt=So(),Ijt=tx().makeBlank,mGe=ix();function Rjt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:\"none\"},paint:{}},i={layout:{visibility:\"none\"},paint:{}},a=t._opts={fill:n,line:i,geojson:Ijt()};if(!r)return a;var o=mGe.extractTraceFeature(e);if(!o)return a;var s=Ljt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;h1.isArrayOrTypedArray(l.opacity)&&(c=function(C){var E=C.mo;return kjt(E)?+h1.constrain(E,0,1):0});var f;h1.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var h;h1.isArrayOrTypedArray(u.width)&&(h=function(C){return C.mlw});for(var d=0;d<e.length;d++){var v=e[d],x=v.fOut;if(x){var b=x.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=mGe.feature2polygons(x)}}var p=c?{type:\"identity\",property:\"mo\"}:l.opacity;return h1.extendFlat(n.paint,{\"fill-color\":{type:\"identity\",property:\"fc\"},\"fill-opacity\":p}),h1.extendFlat(i.paint,{\"line-color\":f?{type:\"identity\",property:\"mlc\"}:u.color,\"line-width\":h?{type:\"identity\",property:\"mlw\"}:u.width,\"line-opacity\":p}),n.layout.visibility=\"visible\",i.layout.visibility=\"visible\",a.geojson={type:\"FeatureCollection\",features:o},yGe(e),a}function yGe(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=Pjt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:\"identity\",property:\"mo2\"}}else n=h1.isArrayOrTypedArray(t.marker.opacity)?{type:\"identity\",property:\"mo\"}:t.marker.opacity;return h1.extendFlat(r.fill.paint,{\"fill-opacity\":n}),h1.extendFlat(r.line.paint,{\"line-opacity\":n}),r}_Ge.exports={convert:Rjt,convertOnSelect:yGe}});var AGe=ye((P_r,TGe)=>{\"use strict\";var bGe=dJ().convert,Djt=dJ().convertOnSelect,xGe=c1().traceLayerPrefix;function wGe(e,t){this.type=\"choroplethmapbox\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"fill\",xGe+t+\"-fill\"],[\"line\",xGe+t+\"-line\"]],this.below=null}var T5=wGe.prototype;T5.update=function(e){this._update(bGe(e)),e[0].trace._glTrace=this};T5.updateOnSelect=function(e){this._update(Djt(e))};T5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,\"setLayoutProperty\",l.layout),l.layout.visibility===\"visible\"&&t.setOptions(s,\"setPaintProperty\",l.paint)}};T5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};T5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};T5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};TGe.exports=function(t,r){var n=r[0].trace,i=new wGe(t,n.uid),a=i.sourceId,o=bGe(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var MGe=ye((R_r,SGe)=>{\"use strict\";var I_r=[\"*choroplethmapbox* trace is deprecated!\",\"Please consider switching to the *choroplethmap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");SGe.exports={attributes:hJ(),supplyDefaults:gGe(),colorbar:S_(),calc:RF(),plot:AGe(),hoverPoints:FF(),eventData:zF(),selectPoints:OF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i==\"string\"&&i.indexOf(\"water\")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i==\"string\"&&i.indexOf(\"plotly-\")===-1)return i}}},moduleType:\"trace\",name:\"choroplethmapbox\",basePlotModule:Jz(),categories:[\"mapbox\",\"gl\",\"noOpacity\",\"showLegend\"],meta:{hr_name:\"choropleth_mapbox\"}}});var CGe=ye((D_r,EGe)=>{\"use strict\";EGe.exports=MGe()});var pJ=ye((F_r,LGe)=>{\"use strict\";var Fjt=Tu(),zjt=Qo().hovertemplateAttrs,kGe=Gl(),$z=Gz(),vJ=Ao().extendFlat;LGe.exports=vJ({lon:$z.lon,lat:$z.lat,z:{valType:\"data_array\",editType:\"calc\"},radius:{valType:\"number\",editType:\"plot\",arrayOk:!0,min:1,dflt:30},below:{valType:\"string\",editType:\"plot\"},text:$z.text,hovertext:$z.hovertext,hoverinfo:vJ({},kGe.hoverinfo,{flags:[\"lon\",\"lat\",\"z\",\"text\",\"name\"]}),hovertemplate:zjt(),showlegend:vJ({},kGe.showlegend,{dflt:!1})},Fjt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var IGe=ye((z_r,PGe)=>{\"use strict\";var Ojt=Dr(),qjt=Jh(),Bjt=pJ();PGe.exports=function(t,r,n,i){function a(u,c){return Ojt.coerce(t,r,Bjt,u,c)}var o=a(\"lon\")||[],s=a(\"lat\")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"z\"),a(\"radius\"),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),qjt(t,r,i,a,{prefix:\"\",cLetter:\"z\"})}});var FGe=ye((O_r,DGe)=>{\"use strict\";var gJ=Eo(),Njt=Dr().isArrayOrTypedArray,mJ=hs().BADNUM,Ujt=gv(),RGe=Dr()._;DGe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=Njt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=gJ(u)&&gJ(c)?[+u,+c]:[mJ,mJ],o){var f=a[s];l.z=gJ(f)?f:mJ}}return Ujt(t,r,{vals:o?a:[0,1],containerStr:\"\",cLetter:\"z\"}),n&&(i[0].t={labels:{lat:RGe(t,\"lat:\")+\" \",lon:RGe(t,\"lon:\")+\" \"}}),i}});var NGe=ye((q_r,BGe)=>{\"use strict\";var Vjt=Eo(),yJ=Dr(),zGe=Ca(),OGe=tc(),qGe=hs().BADNUM,Gjt=tx().makeBlank;BGe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:\"none\"},paint:{}},a=r._opts={heatmap:i,geojson:Gjt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=yJ.isArrayOrTypedArray(l)&&l.length,f=yJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==qGe){var v={};if(c){var x=h.z;v.z=x!==qGe?x:0}f&&(v.r=Vjt(u[s])&&u[s]>0?+u[s]:0),o.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:d},properties:v})}}var b=OGe.extractOpts(r),p=b.reversescale?OGe.flipScale(b.colorscale):b.colorscale,C=p[0][1],E=zGe.opacity(C)<1?C:zGe.addOpacity(C,0),A=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,E];for(s=1;s<p.length;s++)A.push(p[s][0],p[s][1]);var L=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return yJ.extendFlat(a.heatmap.paint,{\"heatmap-weight\":c?L:1/(b.max-b.min),\"heatmap-color\":A,\"heatmap-radius\":f?{type:\"identity\",property:\"r\"}:r.radius,\"heatmap-opacity\":r.opacity}),a.geojson={type:\"FeatureCollection\",features:o},a.heatmap.layout.visibility=\"visible\",a}});var HGe=ye((B_r,GGe)=>{\"use strict\";var UGe=NGe(),Hjt=c1().traceLayerPrefix;function VGe(e,t){this.type=\"densitymapbox\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"heatmap\",Hjt+t+\"-heatmap\"]],this.below=null}var Qz=VGe.prototype;Qz.update=function(e){var t=this.subplot,r=this.layerList,n=UGe(e),i=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,\"setLayoutProperty\",u.layout),u.layout.visibility===\"visible\"&&t.setOptions(l,\"setPaintProperty\",u.paint)}};Qz._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};Qz._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};Qz.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};GGe.exports=function(t,r){var n=r[0].trace,i=new VGe(t,n.uid),a=i.sourceId,o=UGe(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),i}});var WGe=ye((N_r,jGe)=>{\"use strict\";var jjt=ho(),Wjt=Zz().hoverPoints,Xjt=Zz().getExtraText;jGe.exports=function(t,r,n){var i=Wjt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,\"z\"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=jjt.tickText(u,u.c2l(l.z),\"hover\").text}return a.extraText=Xjt(s,l,o[0].t.labels),[a]}}});var ZGe=ye((U_r,XGe)=>{\"use strict\";XGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var KGe=ye((G_r,YGe)=>{\"use strict\";var V_r=[\"*densitymapbox* trace is deprecated!\",\"Please consider switching to the *densitymap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");YGe.exports={attributes:pJ(),supplyDefaults:IGe(),colorbar:S_(),formatLabels:QK(),calc:FGe(),plot:HGe(),hoverPoints:WGe(),eventData:ZGe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type===\"symbol\"&&typeof a==\"string\"&&a.indexOf(\"plotly-\")===-1)return a}},moduleType:\"trace\",name:\"densitymapbox\",basePlotModule:Jz(),categories:[\"mapbox\",\"gl\",\"showLegend\"],meta:{hr_name:\"density_mapbox\"}}});var $Ge=ye((H_r,JGe)=>{\"use strict\";JGe.exports=KGe()});var eHe=ye((j_r,QGe)=>{QGe.exports={version:8,name:\"orto\",metadata:{\"maputnik:renderer\":\"mlgljs\"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:\"viewport\",color:\"white\",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:\"raster\",tiles:[\"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\"],tileSize:256,maxzoom:18,attribution:\"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>\"},ortoInstaMaps:{type:\"raster\",tiles:[\"https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png\"],tileSize:256,maxzoom:13},ortoICGC:{type:\"raster\",tiles:[\"https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg\"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:\"vector\",url:\"https://geoserveis.icgc.cat/contextmaps/basemap.json\"}},sprite:\"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1\",glyphs:\"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf\",layers:[{id:\"background\",type:\"background\",paint:{\"background-color\":\"#F4F9F4\"}},{id:\"ortoEsri\",type:\"raster\",source:\"ortoEsri\",maxzoom:16,layout:{visibility:\"visible\"}},{id:\"ortoICGC\",type:\"raster\",source:\"ortoICGC\",minzoom:13.1,maxzoom:19,layout:{visibility:\"visible\"}},{id:\"ortoInstaMaps\",type:\"raster\",source:\"ortoInstaMaps\",maxzoom:13,layout:{visibility:\"visible\"}},{id:\"waterway_tunnel\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"waterway\",minzoom:14,filter:[\"all\",[\"in\",\"class\",\"river\",\"stream\",\"canal\"],[\"==\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,6]]},\"line-dasharray\":[2,4]}},{id:\"waterway-other\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"!in\",\"class\",\"canal\",\"river\",\"stream\"],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:\"waterway-stream-canal\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"all\",[\"in\",\"class\",\"canal\",\"stream\"],[\"!=\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:\"waterway-river\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"all\",[\"==\",\"class\",\"river\"],[\"!=\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.2,stops:[[10,.8],[20,4]]},\"line-opacity\":.5}},{id:\"water-offset\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",maxzoom:8,filter:[\"==\",\"$type\",\"Polygon\"],layout:{visibility:\"visible\"},paint:{\"fill-opacity\":0,\"fill-color\":\"#a0c8f0\",\"fill-translate\":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:\"water\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",layout:{visibility:\"visible\"},paint:{\"fill-color\":\"hsl(210, 67%, 85%)\",\"fill-opacity\":0}},{id:\"water-pattern\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",layout:{visibility:\"visible\"},paint:{\"fill-translate\":[0,2.5],\"fill-pattern\":\"wave\",\"fill-opacity\":1}},{id:\"landcover-ice-shelf\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"landcover\",filter:[\"==\",\"subclass\",\"ice_shelf\"],layout:{visibility:\"visible\"},paint:{\"fill-color\":\"#fff\",\"fill-opacity\":{base:1,stops:[[0,.9],[10,.3]]}}},{id:\"tunnel-service-track-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"service\",\"track\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-dasharray\":[.5,.25],\"line-width\":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:\"tunnel-minor-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"minor\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-opacity\":{stops:[[12,0],[12.5,1]]},\"line-width\":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:\"tunnel-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:\"tunnel-trunk-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.7}},{id:\"tunnel-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-dasharray\":[.5,.25],\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.5}},{id:\"tunnel-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-dasharray\":[1.5,.75],\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:\"tunnel-service-track\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"service\",\"track\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-width\":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:\"tunnel-minor\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"minor_road\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:\"tunnel-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff4c6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:\"tunnel-trunk-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff4c6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"tunnel-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#ffdaa6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"tunnel-railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},\"line-dasharray\":[2,2]}},{id:\"ferry\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"in\",\"class\",\"ferry\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(108, 159, 182, 1)\",\"line-width\":1.1,\"line-dasharray\":[2,2]}},{id:\"aeroway-taxiway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:12,filter:[\"all\",[\"in\",\"class\",\"taxiway\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(153, 153, 153, 1)\",\"line-width\":{base:1.5,stops:[[11,2],[17,12]]},\"line-opacity\":1}},{id:\"aeroway-runway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:12,filter:[\"all\",[\"in\",\"class\",\"runway\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(153, 153, 153, 1)\",\"line-width\":{base:1.5,stops:[[11,5],[17,55]]},\"line-opacity\":1}},{id:\"aeroway-taxiway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:4,filter:[\"all\",[\"in\",\"class\",\"taxiway\"],[\"==\",\"$type\",\"LineString\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(255, 255, 255, 1)\",\"line-width\":{base:1.5,stops:[[11,1],[17,10]]},\"line-opacity\":{base:1,stops:[[11,0],[12,1]]}}},{id:\"aeroway-runway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:4,filter:[\"all\",[\"in\",\"class\",\"runway\"],[\"==\",\"$type\",\"LineString\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(255, 255, 255, 1)\",\"line-width\":{base:1.5,stops:[[11,4],[17,50]]},\"line-opacity\":{base:1,stops:[[11,0],[12,1]]}}},{id:\"highway-motorway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:12,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"highway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"highway-minor-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!=\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-opacity\":{stops:[[12,0],[12.5,0]]},\"line-width\":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:\"highway-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":.5,\"line-width\":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:\"highway-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":{stops:[[7,0],[8,.6]]},\"line-width\":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:\"highway-trunk-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"trunk\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":{stops:[[5,0],[6,.5]]},\"line-width\":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:\"highway-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:4,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":{stops:[[4,0],[5,.5]]}}},{id:\"highway-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-dasharray\":[1.5,.75],\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:\"highway-motorway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:12,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"highway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"highway-minor\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!=\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-opacity\":.5,\"line-width\":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:\"highway-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},\"line-opacity\":.5}},{id:\"highway-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},\"line-opacity\":0}},{id:\"highway-trunk\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"trunk\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"highway-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"railway-transit\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"transit\"],[\"!in\",\"brunnel\",\"tunnel\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.77)\",\"line-width\":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:\"railway-transit-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"transit\"],[\"!in\",\"brunnel\",\"tunnel\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.68)\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:\"railway-service\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"rail\"],[\"has\",\"service\"]]],paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.77)\",\"line-width\":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:\"railway-service-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"rail\"],[\"has\",\"service\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.68)\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:\"railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!has\",\"service\"],[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"rail\"]]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:\"railway-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!has\",\"service\"],[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"rail\"]]],paint:{\"line-color\":\"#bbb\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:\"bridge-motorway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"bridge-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"bridge-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:\"bridge-trunk-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(28, 76%, 67%)\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:\"bridge-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.5}},{id:\"bridge-path-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#f8f4f0\",\"line-width\":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:\"bridge-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]},\"line-dasharray\":[1.5,.75]}},{id:\"bridge-motorway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"bridge-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"bridge-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:\"bridge-trunk-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:\"bridge-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"bridge-railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:\"bridge-railway-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:\"cablecar\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"==\",\"class\",\"cable_car\"],layout:{visibility:\"visible\",\"line-cap\":\"round\"},paint:{\"line-color\":\"hsl(0, 0%, 70%)\",\"line-width\":{base:1,stops:[[11,1],[19,2.5]]}}},{id:\"cablecar-dash\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"==\",\"class\",\"cable_car\"],layout:{visibility:\"visible\",\"line-cap\":\"round\"},paint:{\"line-color\":\"hsl(0, 0%, 70%)\",\"line-width\":{base:1,stops:[[11,3],[19,5.5]]},\"line-dasharray\":[2,3]}},{id:\"boundary-land-level-4\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\">=\",\"admin_level\",4],[\"<=\",\"admin_level\",8],[\"!=\",\"maritime\",1]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#9e9cab\",\"line-dasharray\":[3,1,1,1],\"line-width\":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},\"line-opacity\":.6}},{id:\"boundary-land-level-2\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"==\",\"admin_level\",2],[\"!=\",\"maritime\",1],[\"!=\",\"disputed\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(248, 7%, 66%)\",\"line-width\":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:\"boundary-land-disputed\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"!=\",\"maritime\",1],[\"==\",\"disputed\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(248, 7%, 70%)\",\"line-dasharray\":[1,3],\"line-width\":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:\"boundary-water\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"in\",\"admin_level\",2,4],[\"==\",\"maritime\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"rgba(154, 189, 214, 1)\",\"line-width\":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},\"line-opacity\":{stops:[[6,0],[10,0]]}}},{id:\"waterway-name\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"waterway\",minzoom:13,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"has\",\"name\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":\"{name:latin} {name:nonlatin}\",\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"line\",\"text-letter-spacing\":.2,\"symbol-spacing\":350},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-lakeline\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"==\",\"$type\",\"LineString\"],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"line\",\"symbol-spacing\":350,\"text-letter-spacing\":.2},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-ocean\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"==\",\"class\",\"ocean\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":\"{name:latin}\",\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"point\",\"symbol-spacing\":350,\"text-letter-spacing\":.2},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-other\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"!in\",\"class\",\"ocean\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":{stops:[[0,10],[6,14]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"point\",\"symbol-spacing\":350,\"text-letter-spacing\":.2,visibility:\"visible\"},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"poi-level-3\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:16,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\">=\",\"rank\",25]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"poi-level-2\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:15,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"<=\",\"rank\",24],[\">=\",\"rank\",15]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"poi-level-1\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:14,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"<=\",\"rank\",14],[\"has\",\"name\"]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":11,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"rgba(191, 228, 172, 1)\",\"text-halo-width\":1,\"text-halo-color\":\"rgba(30, 29, 29, 1)\"}},{id:\"poi-railway\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:13,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"has\",\"name\"],[\"==\",\"class\",\"railway\"],[\"==\",\"subclass\",\"station\"]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9,\"icon-optional\":!1,\"icon-ignore-placement\":!1,\"icon-allow-overlap\":!1,\"text-ignore-placement\":!1,\"text-allow-overlap\":!1,\"text-optional\":!0},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"road_oneway\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:15,filter:[\"all\",[\"==\",\"oneway\",1],[\"in\",\"class\",\"motorway\",\"trunk\",\"primary\",\"secondary\",\"tertiary\",\"minor\",\"service\"]],layout:{\"symbol-placement\":\"line\",\"icon-image\":\"oneway\",\"symbol-spacing\":75,\"icon-padding\":2,\"icon-rotation-alignment\":\"map\",\"icon-rotate\":90,\"icon-size\":{stops:[[15,.5],[19,1]]}},paint:{\"icon-opacity\":.5}},{id:\"road_oneway_opposite\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:15,filter:[\"all\",[\"==\",\"oneway\",-1],[\"in\",\"class\",\"motorway\",\"trunk\",\"primary\",\"secondary\",\"tertiary\",\"minor\",\"service\"]],layout:{\"symbol-placement\":\"line\",\"icon-image\":\"oneway\",\"symbol-spacing\":75,\"icon-padding\":2,\"icon-rotation-alignment\":\"map\",\"icon-rotate\":-90,\"icon-size\":{stops:[[15,.5],[19,1]]}},paint:{\"icon-opacity\":.5}},{id:\"highway-name-path\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:15.5,filter:[\"==\",\"class\",\"path\"],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-color\":\"#f8f4f0\",\"text-color\":\"hsl(30, 23%, 62%)\",\"text-halo-width\":.5}},{id:\"highway-name-minor\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:15,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-blur\":.5,\"text-color\":\"#765\",\"text-halo-width\":1}},{id:\"highway-name-major\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:12.2,filter:[\"in\",\"class\",\"primary\",\"secondary\",\"tertiary\",\"trunk\"],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-blur\":.5,\"text-color\":\"#765\",\"text-halo-width\":1}},{id:\"highway-shield\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:8,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"!in\",\"network\",\"us-interstate\",\"us-highway\",\"us-state\"]],layout:{\"text-size\":10,\"icon-image\":\"road_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[10,\"point\"],[11,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-opacity\":1,\"text-color\":\"rgba(20, 19, 19, 1)\",\"text-halo-color\":\"rgba(230, 221, 221, 0)\",\"text-halo-width\":2,\"icon-color\":\"rgba(183, 18, 18, 1)\",\"icon-opacity\":.3,\"icon-halo-color\":\"rgba(183, 55, 55, 0)\"}},{id:\"highway-shield-us-interstate\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:7,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"in\",\"network\",\"us-interstate\"]],layout:{\"text-size\":10,\"icon-image\":\"{network}_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[7,\"point\"],[7,\"line\"],[8,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\"}},{id:\"highway-shield-us-other\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:9,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"in\",\"network\",\"us-highway\",\"us-state\"]],layout:{\"text-size\":10,\"icon-image\":\"{network}_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[10,\"point\"],[11,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\"}},{id:\"place-other\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",minzoom:12,filter:[\"!in\",\"class\",\"city\",\"town\",\"village\",\"country\",\"continent\"],layout:{\"text-letter-spacing\":.1,\"text-size\":{base:1.2,stops:[[12,10],[15,14]]},\"text-font\":[\"Noto Sans Bold\"],\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-transform\":\"uppercase\",\"text-max-width\":9,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255,255,255,1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(57, 28, 28, 1)\"}},{id:\"place-village\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",minzoom:10,filter:[\"==\",\"class\",\"village\"],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[10,12],[15,16]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255, 255, 255, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(10, 9, 9, 0.8)\"}},{id:\"place-town\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"==\",\"class\",\"town\"],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[10,14],[15,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255, 255, 255, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(22, 22, 22, 0.8)\"}},{id:\"place-city\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"!=\",\"capital\",2],[\"==\",\"class\",\"city\"]],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[7,14],[11,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-city-capital\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"capital\",2],[\"==\",\"class\",\"city\"]],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[7,14],[11,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,\"icon-image\":\"star_11\",\"text-offset\":[.4,0],\"icon-size\":.8,\"text-anchor\":\"left\",visibility:\"visible\"},paint:{\"text-color\":\"#333\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-other\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\">=\",\"rank\",3],[\"!has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[3,11],[7,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-3\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\">=\",\"rank\",3],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[3,11],[7,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-2\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\"==\",\"rank\",2],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[2,11],[5,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-1\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\"==\",\"rank\",1],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[1,11],[4,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-continent\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",maxzoom:1,filter:[\"==\",\"class\",\"continent\"],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":14,\"text-max-width\":6.25,\"text-transform\":\"uppercase\",visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}}],id:\"qebnlkra6\"}});var rHe=ye((W_r,tHe)=>{tHe.exports={version:8,name:\"orto\",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:\"viewport\",color:\"white\",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:\"raster\",tiles:[\"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\"],tileSize:256,maxzoom:18,attribution:\"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>\"},ortoInstaMaps:{type:\"raster\",tiles:[\"https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png\"],tileSize:256,maxzoom:13},ortoICGC:{type:\"raster\",tiles:[\"https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg\"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:\"vector\",url:\"https://geoserveis.icgc.cat/contextmaps/basemap.json\"}},sprite:\"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1\",glyphs:\"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf\",layers:[{id:\"background\",type:\"background\",paint:{\"background-color\":\"#F4F9F4\"}},{id:\"ortoEsri\",type:\"raster\",source:\"ortoEsri\",maxzoom:16,layout:{visibility:\"visible\"}},{id:\"ortoICGC\",type:\"raster\",source:\"ortoICGC\",minzoom:13.1,maxzoom:19,layout:{visibility:\"visible\"}},{id:\"ortoInstaMaps\",type:\"raster\",source:\"ortoInstaMaps\",maxzoom:13,layout:{visibility:\"visible\"}}]}});var bx=ye((X_r,sHe)=>{\"use strict\";var Zjt=Z1(),Yjt=eHe(),Kjt=rHe(),Jjt='\\xA9 <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',iHe=\"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json\",nHe=\"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json\",e7=\"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json\",$jt=\"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json\",Qjt=\"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json\",eWt=\"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json\",oHe={basic:e7,streets:e7,outdoors:e7,light:iHe,dark:nHe,satellite:Kjt,\"satellite-streets\":Yjt,\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:Jjt,tiles:[\"https://tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-positron\":iHe,\"carto-darkmatter\":nHe,\"carto-voyager\":e7,\"carto-positron-nolabels\":$jt,\"carto-darkmatter-nolabels\":Qjt,\"carto-voyager-nolabels\":eWt},aHe=Zjt(oHe);sHe.exports={styleValueDflt:\"basic\",stylesMap:oHe,styleValuesMap:aHe,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",missingStyleErrorMsg:[\"No valid maplibre style found, please set `map.style` to one of:\",aHe.join(\", \"),\"or use a tile service.\"].join(`\n",
       "`),mapOnErrorMsg:\"Map error.\"}});var HC=ye((Z_r,hHe)=>{\"use strict\";var lHe=Dr(),uHe=Ca().defaultLine,tWt=kc().attributes,rWt=ec(),iWt=pf().textposition,nWt=mc().overrideAll,aWt=pl().templatedArray,cHe=bx(),fHe=rWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});fHe.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\";var oWt=hHe.exports=nWt({_arrayAttrRegexps:[lHe.counterRegex(\"map\",\".layers\",!0)],domain:tWt({name:\"map\"}),style:{valType:\"any\",values:cHe.styleValuesMap,dflt:cHe.styleValueDflt},center:{lon:{valType:\"number\",dflt:0},lat:{valType:\"number\",dflt:0}},zoom:{valType:\"number\",dflt:1},bearing:{valType:\"number\",dflt:0},pitch:{valType:\"number\",dflt:0},bounds:{west:{valType:\"number\"},east:{valType:\"number\"},south:{valType:\"number\"},north:{valType:\"number\"}},layers:aWt(\"layer\",{visible:{valType:\"boolean\",dflt:!0},sourcetype:{valType:\"enumerated\",values:[\"geojson\",\"vector\",\"raster\",\"image\"],dflt:\"geojson\"},source:{valType:\"any\"},sourcelayer:{valType:\"string\",dflt:\"\"},sourceattribution:{valType:\"string\"},type:{valType:\"enumerated\",values:[\"circle\",\"line\",\"fill\",\"symbol\",\"raster\"],dflt:\"circle\"},coordinates:{valType:\"any\"},below:{valType:\"string\"},color:{valType:\"color\",dflt:uHe},opacity:{valType:\"number\",min:0,max:1,dflt:1},minzoom:{valType:\"number\",min:0,max:24,dflt:0},maxzoom:{valType:\"number\",min:0,max:24,dflt:24},circle:{radius:{valType:\"number\",dflt:15}},line:{width:{valType:\"number\",dflt:2},dash:{valType:\"data_array\"}},fill:{outlinecolor:{valType:\"color\",dflt:uHe}},symbol:{icon:{valType:\"string\",dflt:\"marker\"},iconsize:{valType:\"number\",dflt:10},text:{valType:\"string\",dflt:\"\"},placement:{valType:\"enumerated\",values:[\"point\",\"line\",\"line-center\"],dflt:\"point\"},textfont:fHe,textposition:lHe.extendFlat({},iWt,{arrayOk:!1})}})},\"plot\",\"from-root\");oWt.uirevision={valType:\"any\",editType:\"none\"}});var t7=ye((Y_r,pHe)=>{\"use strict\";var sWt=Qo().hovertemplateAttrs,lWt=Qo().texttemplateAttrs,uWt=Eg(),jC=G2(),A5=pf(),dHe=HC(),cWt=Gl(),fWt=Tu(),rw=Ao().extendFlat,hWt=mc().overrideAll,dWt=HC(),vHe=jC.line,S5=jC.marker;pHe.exports=hWt({lon:jC.lon,lat:jC.lat,cluster:{enabled:{valType:\"boolean\"},maxzoom:rw({},dWt.layers.maxzoom,{}),step:{valType:\"number\",arrayOk:!0,dflt:-1,min:-1},size:{valType:\"number\",arrayOk:!0,dflt:20,min:0},color:{valType:\"color\",arrayOk:!0},opacity:rw({},S5.opacity,{dflt:1})},mode:rw({},A5.mode,{dflt:\"markers\"}),text:rw({},A5.text,{}),texttemplate:lWt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"text\"]}),hovertext:rw({},A5.hovertext,{}),line:{color:vHe.color,width:vHe.width},connectgaps:A5.connectgaps,marker:rw({symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},angle:{valType:\"number\",dflt:\"auto\",arrayOk:!0},allowoverlap:{valType:\"boolean\",dflt:!1},opacity:S5.opacity,size:S5.size,sizeref:S5.sizeref,sizemin:S5.sizemin,sizemode:S5.sizemode},fWt(\"marker\")),fill:jC.fill,fillcolor:uWt(),textfont:dHe.layers.symbol.textfont,textposition:dHe.layers.symbol.textposition,below:{valType:\"string\"},selected:{marker:A5.selected.marker},unselected:{marker:A5.unselected.marker},hoverinfo:rw({},cWt.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]}),hovertemplate:sWt()},\"calc\",\"nested\")});var _J=ye((K_r,gHe)=>{\"use strict\";var vWt=[\"Metropolis Black Italic\",\"Metropolis Black\",\"Metropolis Bold Italic\",\"Metropolis Bold\",\"Metropolis Extra Bold Italic\",\"Metropolis Extra Bold\",\"Metropolis Extra Light Italic\",\"Metropolis Extra Light\",\"Metropolis Light Italic\",\"Metropolis Light\",\"Metropolis Medium Italic\",\"Metropolis Medium\",\"Metropolis Regular Italic\",\"Metropolis Regular\",\"Metropolis Semi Bold Italic\",\"Metropolis Semi Bold\",\"Metropolis Thin Italic\",\"Metropolis Thin\",\"Open Sans Bold Italic\",\"Open Sans Bold\",\"Open Sans Extrabold Italic\",\"Open Sans Extrabold\",\"Open Sans Italic\",\"Open Sans Light Italic\",\"Open Sans Light\",\"Open Sans Regular\",\"Open Sans Semibold Italic\",\"Open Sans Semibold\",\"Klokantech Noto Sans Bold\",\"Klokantech Noto Sans CJK Bold\",\"Klokantech Noto Sans CJK Regular\",\"Klokantech Noto Sans Italic\",\"Klokantech Noto Sans Regular\"];gHe.exports={isSupportedFont:function(e){return vWt.indexOf(e)!==-1}}});var _He=ye((J_r,yHe)=>{\"use strict\";var WC=Dr(),xJ=Ru(),pWt=$p(),gWt=R0(),mWt=D0(),yWt=Ig(),mHe=t7(),_Wt=_J().isSupportedFont;yHe.exports=function(t,r,n,i){function a(p,C){return WC.coerce(t,r,mHe,p,C)}function o(p,C){return WC.coerce2(t,r,mHe,p,C)}var s=xWt(t,r,a);if(!s){r.visible=!1;return}if(a(\"text\"),a(\"texttemplate\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"mode\"),a(\"below\"),xJ.hasMarkers(r)){pWt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a(\"marker.allowoverlap\"),a(\"marker.angle\");var l=r.marker;l.symbol!==\"circle\"&&(WC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),WC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}xJ.hasLines(r)&&(gWt(t,r,n,i,a,{noDash:!0}),a(\"connectgaps\"));var u=o(\"cluster.maxzoom\"),c=o(\"cluster.step\"),f=o(\"cluster.color\",r.marker&&r.marker.color||n),h=o(\"cluster.size\"),d=o(\"cluster.opacity\"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,x=a(\"cluster.enabled\",v);if(x||xJ.hasText(r)){var b=i.font.family;mWt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:_Wt(b)?b:\"Open Sans Regular\",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a(\"fill\"),r.fill!==\"none\"&&yWt(t,r,n,a),WC.coerceSelectionMarkerOpacity(r,a)};function xWt(e,t,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var bJ=ye(($_r,bHe)=>{\"use strict\";var xHe=ho();bHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=xHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=xHe.tickText(o,o.c2l(s[1]),!0).text,i}});var wJ=ye((Q_r,THe)=>{\"use strict\";var wHe=Dr();THe.exports=function(t,r){var n=t.split(\" \"),i=n[0],a=n[1],o=wHe.isArrayOrTypedArray(r)?wHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=[\"\",\"\"],c=[0,0];switch(i){case\"top\":u[0]=\"top\",c[1]=-l;break;case\"bottom\":u[0]=\"bottom\",c[1]=l;break}switch(a){case\"left\":u[1]=\"right\",c[0]=-s;break;case\"right\":u[1]=\"left\",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join(\"-\"):u[0]?f=u[0]:u[1]?f=u[1]:f=\"center\",{anchor:f,offset:c}}});var kHe=ye((exr,CHe)=>{\"use strict\";var MHe=Eo(),ov=Dr(),bWt=hs().BADNUM,i7=tx(),AHe=tc(),wWt=So(),TWt=S3(),n7=Ru(),AWt=_J().isSupportedFont,SWt=wJ(),MWt=rp().appendArrayPointValue,EWt=ru().NEWLINES,CWt=ru().BR_TAG_ALL;CHe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!==\"none\",o=n7.hasLines(n),s=n7.hasMarkers(n),l=n7.hasText(n),u=s&&n.marker.symbol===\"circle\",c=s&&n.marker.symbol!==\"circle\",f=n.cluster&&n.cluster.enabled,h=r7(\"fill\"),d=r7(\"line\"),v=r7(\"circle\"),x=r7(\"symbol\"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var p;if((a||o)&&(p=i7.calcTraceToLineCoords(r)),a&&(h.geojson=i7.makePolygon(p),h.layout.visibility=\"visible\",ov.extendFlat(h.paint,{\"fill-color\":n.fillcolor})),o&&(d.geojson=i7.makeLine(p),d.layout.visibility=\"visible\",ov.extendFlat(d.paint,{\"line-width\":n.line.width,\"line-color\":n.line.color,\"line-opacity\":n.opacity})),u){var C=kWt(r);v.geojson=C.geojson,v.layout.visibility=\"visible\",f&&(v.filter=[\"!\",[\"has\",\"point_count\"]],b.cluster={type:\"circle\",filter:[\"has\",\"point_count\"],layout:{visibility:\"visible\"},paint:{\"circle-color\":AJ(n.cluster.color,n.cluster.step),\"circle-radius\":AJ(n.cluster.size,n.cluster.step),\"circle-opacity\":AJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:\"symbol\",filter:[\"has\",\"point_count\"],paint:{},layout:{\"text-field\":\"{point_count_abbreviated}\",\"text-font\":SHe(n),\"text-size\":12}}),ov.extendFlat(v.paint,{\"circle-color\":C.mcc,\"circle-radius\":C.mrc,\"circle-opacity\":C.mo})}if(u&&f&&(v.filter=[\"!\",[\"has\",\"point_count\"]]),(c||l)&&(x.geojson=LWt(r,t),ov.extendFlat(x.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),c&&(ov.extendFlat(x.layout,{\"icon-size\":n.marker.size/10}),\"angle\"in n.marker&&n.marker.angle!==\"auto\"&&ov.extendFlat(x.layout,{\"icon-rotate\":{type:\"identity\",property:\"angle\"},\"icon-rotation-alignment\":\"map\"}),x.layout[\"icon-allow-overlap\"]=n.marker.allowoverlap,ov.extendFlat(x.paint,{\"icon-opacity\":n.opacity*n.marker.opacity,\"icon-color\":n.marker.color})),l)){var E=(n.marker||{}).size,A=SWt(n.textposition,E);ov.extendFlat(x.layout,{\"text-size\":n.textfont.size,\"text-anchor\":A.anchor,\"text-offset\":A.offset,\"text-font\":SHe(n)}),ov.extendFlat(x.paint,{\"text-color\":n.textfont.color,\"text-opacity\":n.opacity})}return b};function r7(e){return{type:e,geojson:i7.makeBlank(),layout:{visibility:\"none\"},filter:null,paint:{}}}function kWt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(AHe.hasColorscale(t,\"marker\")?c=AHe.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=TWt(t));var h;o&&(h=function(E){var A=MHe(E)?+ov.constrain(E,0,1):0;return l(A)});var d=[];for(s=0;s<e.length;s++){var v=e[s],x=v.lonlat;if(!EHe(x)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:\"Feature\",id:s+1,geometry:{type:\"Point\",coordinates:x},properties:b})}}var p;if(n)for(p=wWt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var C=d[s].properties;p.selectedOpacityFn&&(C.mo=l(p.selectedOpacityFn(C))),p.selectedColorFn&&(C.mcc=p.selectedColorFn(C)),p.selectedSizeFn&&(C.mrc=p.selectedSizeFn(C))}return{geojson:{type:\"FeatureCollection\",features:d},mcc:i||p&&p.selectedColorFn?{type:\"identity\",property:\"mcc\"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:\"identity\",property:\"mrc\"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:\"identity\",property:\"mo\"}:l(r.opacity)}}function LWt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!==\"circle\"?TJ(a):a7,l=o!==\"auto\"?TJ(o,!0):a7,u=n7.hasText(n)?TJ(n.text):a7,c=[],f=0;f<e.length;f++){var h=e[f];if(!EHe(h.lonlat)){var d=n.texttemplate,v;if(d){var x=Array.isArray(d)?d[f]||\"\":d,b=n._module.formatLabels(h,n,r),p={};MWt(p,n,h.i);var C=n._meta||{};v=ov.texttemplateString(x,b,r._d3locale,p,h,C)}else v=u(f);v&&(v=v.replace(EWt,\"\").replace(CWt,`\n",
       "`)),c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:\"FeatureCollection\",features:c}}function TJ(e,t){return ov.isArrayOrTypedArray(e)?t?function(r){return MHe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:a7}function a7(){return\"\"}function EHe(e){return e[0]===bWt}function AJ(e,t){var r;if(ov.isArrayOrTypedArray(e)&&ov.isArrayOrTypedArray(t)){r=[\"step\",[\"get\",\"point_count\"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function SHe(e){var t=e.textfont,r=t.family,n=t.style,i=t.weight,a=r.split(\" \"),o=a[a.length-1]===\"Italic\";o&&a.pop(),o=o||n===\"italic\";var s=a.join(\" \");i===\"bold\"&&a.indexOf(\"Bold\")===-1?s+=\" Bold\":i<=1e3&&(a[0]===\"Metropolis\"?(s=\"Metropolis\",i>850?s+=\" Black\":i>750?s+=\" Extra Bold\":i>650?s+=\" Bold\":i>550?s+=\" Semi Bold\":i>450?s+=\" Medium\":i>350?s+=\" Regular\":i>250?s+=\" Light\":i>150?s+=\" Extra Light\":s+=\" Thin\"):a.slice(0,2).join(\" \")===\"Open Sans\"?(s=\"Open Sans\",i>750?s+=\" Extrabold\":i>650?s+=\" Bold\":i>550?s+=\" Semibold\":i>350?s+=\" Regular\":s+=\" Light\"):a.slice(0,3).join(\" \")===\"Klokantech Noto Sans\"&&(s=\"Klokantech Noto Sans\",a[3]===\"CJK\"&&(s+=\" CJK\"),s+=i>500?\" Bold\":\" Regular\")),o&&(s+=\" Italic\"),s===\"Open Sans Regular Italic\"?s=\"Open Sans Italic\":s===\"Open Sans Regular Bold\"?s=\"Open Sans Bold\":s===\"Open Sans Regular Bold Italic\"?s=\"Open Sans Bold Italic\":s===\"Klokantech Noto Sans Regular Italic\"&&(s=\"Klokantech Noto Sans Italic\"),AWt(s)||(s=r);var l=s.split(\", \");return l}});var RHe=ye((txr,IHe)=>{\"use strict\";var PWt=Dr(),LHe=kHe(),M5=bx().traceLayerPrefix,ng={cluster:[\"cluster\",\"clusterCount\",\"circle\"],nonCluster:[\"fill\",\"line\",\"circle\",\"symbol\"]};function PHe(e,t,r,n){this.type=\"scattermap\",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:\"source-\"+t+\"-fill\",line:\"source-\"+t+\"-line\",circle:\"source-\"+t+\"-circle\",symbol:\"source-\"+t+\"-symbol\",cluster:\"source-\"+t+\"-circle\",clusterCount:\"source-\"+t+\"-circle\"},this.layerIds={fill:M5+t+\"-fill\",line:M5+t+\"-line\",circle:M5+t+\"-circle\",symbol:M5+t+\"-symbol\",cluster:M5+t+\"-cluster\",clusterCount:M5+t+\"-cluster-count\"},this.below=null}var XC=PHe.prototype;XC.addSource=function(e,t,r){var n={type:\"geojson\",data:t.geojson};r&&r.enabled&&PWt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};XC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};XC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,\"setLayoutProperty\",n.layout),n.layout.visibility===\"visible\"&&this.subplot.setOptions(i,\"setPaintProperty\",n.paint)):this.subplot.addLayer(n,r)};XC.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=LHe(n.gd,t),o=n.belowLookup[\"trace-\"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(E){E||u.addSource(\"circle\",a.circle,r.cluster);for(var A=ng.cluster,L=0;L<A.length;L++){var _=A[L],k=a[_];u.addLayer(_,k,o)}}function f(E){for(var A=ng.cluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(u.layerIds[_])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var A=ng.nonCluster,L=0;L<A.length;L++){var _=A[L],k=a[_];E||u.addSource(_,k),u.addLayer(_,k,o)}}function d(E){for(var A=ng.nonCluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(u.layerIds[_]),E||i.removeSource(u.sourceIds[_])}}function v(E){l?f(E):d(E)}function x(E){s?c(E):h(E)}function b(){for(var E=s?ng.cluster:ng.nonCluster,A=0;A<E.length;A++){var L=E[A],_=a[L];_&&(n.setOptions(u.layerIds[L],\"setLayoutProperty\",_.layout),_.layout.visibility===\"visible\"&&(L!==\"cluster\"&&u.setSourceData(L,_),n.setOptions(u.layerIds[L],\"setPaintProperty\",_.paint)))}}var p=this.isHidden,C=r.visible!==!0;C?p||v():p?C||x():l!==s?(v(),x()):(this.below!==o&&(v(!0),x(!0)),b()),this.clusterEnabled=s,this.isHidden=C,this.below=o,t[0].trace._glTrace=this};XC.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ng.cluster:ng.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};IHe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new PHe(t,n.uid,i,a),s=LHe(t.gd,r),l=o.below=t.belowLookup[\"trace-\"+n.uid],u,c,f;if(i)for(o.addSource(\"circle\",s.circle,n.cluster),u=0;u<ng.cluster.length;u++)c=ng.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<ng.nonCluster.length;u++)c=ng.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var o7=ye((rxr,FHe)=>{\"use strict\";var IWt=vf(),SJ=Dr(),RWt=oT(),DWt=SJ.fillText,FWt=hs().BADNUM,zWt=bx().traceLayerPrefix;function OWt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=zWt+i.uid+\"-circle\",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function x(M){var g=M.lonlat;if(g[0]===FWt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=SJ.modHalf(g[0],360),T=g[1],z=s.project([P,T]),O=z.x-a.c2p([v,T]),V=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+V*V)-G,1-3/G)}if(IWt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],p=b.lonlat,C=[SJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(C),A=o.c2p(C),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var k=i._module.formatLabels(b,i,_);return e.lonLabel=k.lonLabel,e.latLabel=k.latLabel,e.color=RWt(i,b),e.extraText=DHe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function DHe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split(\"+\"),a=i.indexOf(\"all\")!==-1,o=i.indexOf(\"lon\")!==-1,s=i.indexOf(\"lat\")!==-1,l=t.lonlat,u=[];function c(f){return f+\"\\xB0\"}return a||o&&s?u.push(\"(\"+c(l[1])+\", \"+c(l[0])+\")\"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf(\"text\")!==-1)&&DWt(t,e,u),u.join(\"<br>\")}FHe.exports={hoverPoints:OWt,getExtraText:DHe}});var OHe=ye((ixr,zHe)=>{\"use strict\";zHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var BHe=ye((nxr,qHe)=>{\"use strict\";var qWt=Dr(),BWt=Ru(),NWt=hs().BADNUM;qHe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!BWt.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==NWt){var f=[qWt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var UHe=ye((MJ,EJ)=>{(function(e,t){typeof MJ==\"object\"&&typeof EJ!=\"undefined\"?EJ.exports=t():(e=typeof globalThis!=\"undefined\"?globalThis:e||self,e.maplibregl=t())})(MJ,function(){\"use strict\";var e={},t={};function r(i,a,o){if(t[i]=o,i===\"index\"){var s=\"var sharedModule = {}; (\"+t.shared+\")(sharedModule); (\"+t.worker+\")(sharedModule);\",l={};return t.shared(l),t.index(e,l),typeof window!=\"undefined\"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:\"text/javascript\"}))),e}}r(\"shared\",[\"exports\"],function(i){\"use strict\";function a(R,S,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ut){try{Ke(W.next(ut))}catch(Lt){fe(Lt)}}function ze(ut){try{Ke(W.throw(ut))}catch(Lt){fe(Lt)}}function Ke(ut){var Lt;ut.done?te(ut.value):(Lt=ut.value,Lt instanceof F?Lt:new F(function(Qt){Qt(Lt)})).then(pe,ze)}Ke((W=W.apply(R,S||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,\"default\")?R.default:R}typeof SuppressedError==\"function\"&&SuppressedError;var s=l;function l(R,S){this.x=R,this.y=S}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,S){return this.clone()._rotateAround(R,S)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var S=R.x-this.x,F=R.y-this.y;return S*S+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,S){return Math.atan2(this.x*S-this.y*R,this.x*R+this.y*S)},_matMult:function(R){var S=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=S,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var S=Math.cos(R),F=Math.sin(R),W=F*this.x+S*this.y;return this.x=S*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,S){var F=Math.cos(R),W=Math.sin(R),te=S.y+W*(this.x-S.x)+F*(this.y-S.y);return this.x=S.x+F*(this.x-S.x)-W*(this.y-S.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<S)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,ze=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<S));W++)R>te?pe=F:ze=F,F=.5*(ze-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var h=o(c);let d,v;function x(){return d==null&&(d=typeof OffscreenCanvas!=\"undefined\"&&new OffscreenCanvas(1,1).getContext(\"2d\")&&typeof createImageBitmap==\"function\"),d}function b(){if(v==null&&(v=!1,x())){let S=new OffscreenCanvas(5,5).getContext(\"2d\",{willReadFrequently:!0});if(S){for(let W=0;W<5*5;W++){let te=4*W;S.fillStyle=`rgb(${te},${te+1},${te+2})`,S.fillRect(W%5,Math.floor(W/5),1,1)}let F=S.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,S,F,W){let te=new h(R,S,F,W);return fe=>te.solve(fe)}let C=p(.25,.1,.25,1);function E(R,S,F){return Math.min(F,Math.max(S,R))}function A(R,S,F){let W=F-S,te=((R-S)%W+W)%W+S;return te===S?F:te}function L(R,...S){for(let F of S)for(let W in F)R[W]=F[W];return R}let _=1;function k(R,S,F){let W={};for(let te in R)W[te]=S.call(this,R[te],te,R);return W}function M(R,S,F){let W={};for(let te in R)S.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R==\"object\"&&R?k(R,g):R}let P={};function T(R){P[R]||(typeof console!=\"undefined\"&&console.warn(R),P[R]=!0)}function z(R,S,F){return(F.y-R.y)*(S.x-R.x)>(S.y-R.y)*(F.x-R.x)}function O(R){return typeof WorkerGlobalScope!=\"undefined\"&&R!==void 0&&R instanceof WorkerGlobalScope}let V=null;function G(R){return typeof ImageBitmap!=\"undefined\"&&R instanceof ImageBitmap}let Z=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";function H(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame==\"undefined\")throw new Error(\"VideoFrame not supported\");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith(\"BGR\")&&!pe.startsWith(\"RGB\"))throw new Error(`Unrecognized format ${pe}`);let ze=pe.startsWith(\"BGR\"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ut,Lt,Qt,fr,mr){let Lr=4*Math.max(-Lt,0),zr=(Math.max(0,Qt)-Qt)*fr*4+Lr,ui=4*fr,yi=Math.max(0,Lt),dn=Math.max(0,Qt);return{rect:{x:yi,y:dn,width:Math.min(ut.width,Lt+fr)-yi,height:Math.min(ut.height,Qt+mr)-dn},layout:[{offset:zr,stride:ui}]}}(R,S,F,W,te)),ze)for(let ut=0;ut<Ke.length;ut+=4){let Lt=Ke[ut];Ke[ut]=Ke[ut+2],Ke[ut+2]=Lt}return Ke}finally{fe.close()}})}let N,j,re=\"AbortError\";function oe(){return new Error(re)}let _e={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:\"\"};function Me(R){return _e.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf(\"://\"))]}let ke=\"global-dispatcher\";class me extends Error{constructor(S,F,W,te){super(`AJAXError: ${F} (${S}): ${W}`),this.status=S,this.statusText=F,this.url=W,this.body=te}}let ie=()=>O(self)?self.worker&&self.worker.referrer:(window.location.protocol===\"blob:\"?window.parent:window).location.href,Se=function(R,S){if(/:\\/\\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=Me(R.url);if(W)return W(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:\"GR\",data:R,targetMapId:ke},S)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,\"signal\"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||\"GET\",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:te.signal});W.type!==\"json\"||fe.headers.has(\"Accept\")||fe.headers.set(\"Accept\",\"application/json\");let pe=yield fetch(fe);if(!pe.ok){let ut=yield pe.blob();throw new me(pe.status,pe.statusText,W.url,ut)}let ze;ze=W.type===\"arrayBuffer\"||W.type===\"image\"?pe.arrayBuffer():W.type===\"json\"?pe.json():pe.text();let Ke=yield ze;if(te.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get(\"Cache-Control\"),expires:pe.headers.get(\"Expires\")}})}(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:\"GR\",data:R,mustQueue:!0,targetMapId:ke},S)}var F;return function(W,te){return new Promise((fe,pe)=>{var ze;let Ke=new XMLHttpRequest;Ke.open(W.method||\"GET\",W.url,!0),W.type!==\"arrayBuffer\"&&W.type!==\"image\"||(Ke.responseType=\"arraybuffer\");for(let ut in W.headers)Ke.setRequestHeader(ut,W.headers[ut]);W.type===\"json\"&&(Ke.responseType=\"text\",!((ze=W.headers)===null||ze===void 0)&&ze.Accept||Ke.setRequestHeader(\"Accept\",\"application/json\")),Ke.withCredentials=W.credentials===\"include\",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ut=Ke.response;if(W.type===\"json\")try{ut=JSON.parse(Ke.response)}catch(Lt){return void pe(Lt)}fe({data:ut,cacheControl:Ke.getResponseHeader(\"Cache-Control\"),expires:Ke.getResponseHeader(\"Expires\")})}else{let ut=new Blob([Ke.response],{type:Ke.getResponseHeader(\"Content-Type\")});pe(new me(Ke.status,Ke.statusText,W.url,ut))}},te.signal.addEventListener(\"abort\",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,S)};function Le(R){if(!R||R.indexOf(\"://\")<=0||R.indexOf(\"data:image/\")===0||R.indexOf(\"blob:\")===0)return!0;let S=new URL(R),F=window.location;return S.protocol===F.protocol&&S.host===F.host}function Ae(R,S,F){F[R]&&F[R].indexOf(S)!==-1||(F[R]=F[R]||[],F[R].push(S))}function De(R,S,F){if(F&&F[R]){let W=F[R].indexOf(S);W!==-1&&F[R].splice(W,1)}}class Pe{constructor(S,F={}){L(this,F),this.type=S}}class ge extends Pe{constructor(S,F={}){super(\"error\",L({error:S},F))}}class Fe{on(S,F){return this._listeners=this._listeners||{},Ae(S,F,this._listeners),this}off(S,F){return De(S,F,this._listeners),De(S,F,this._oneTimeListeners),this}once(S,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(S,F,this._oneTimeListeners),this):new Promise(W=>this.once(S,W))}fire(S,F){typeof S==\"string\"&&(S=new Pe(S,F||{}));let W=S.type;if(this.listens(W)){S.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let ze of te)ze.call(this,S);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let ze of fe)De(W,ze,this._oneTimeListeners),ze.call(this,S);let pe=this._eventedParent;pe&&(L(S,typeof this._eventedParentData==\"function\"?this._eventedParentData():this._eventedParentData),pe.fire(S))}else S instanceof ge&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,F){return this._eventedParent=S,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:\"enum\",values:[8]},name:{type:\"string\"},metadata:{type:\"*\"},center:{type:\"array\",value:\"number\"},zoom:{type:\"number\"},bearing:{type:\"number\",default:0,period:360,units:\"degrees\"},pitch:{type:\"number\",default:0,units:\"degrees\"},light:{type:\"light\"},sky:{type:\"sky\"},projection:{type:\"projection\"},terrain:{type:\"terrain\"},sources:{required:!0,type:\"sources\"},sprite:{type:\"sprite\"},glyphs:{type:\"string\"},transition:{type:\"transition\"},layers:{required:!0,type:\"array\",value:\"layer\"}},sources:{\"*\":{type:\"source\"}},source:[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],source_vector:{type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_raster:{type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_raster_dem:{type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{},custom:{}},default:\"mapbox\"},redFactor:{type:\"number\",default:1},blueFactor:{type:\"number\",default:1},greenFactor:{type:\"number\",default:1},baseShift:{type:\"number\",default:0},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_geojson:{type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{required:!0,type:\"*\"},maxzoom:{type:\"number\",default:18},attribution:{type:\"string\"},buffer:{type:\"number\",default:128,maximum:512,minimum:0},filter:{type:\"*\"},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},clusterMinPoints:{type:\"number\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},source_video:{type:{required:!0,type:\"enum\",values:{video:{}}},urls:{required:!0,type:\"array\",value:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},source_image:{type:{required:!0,type:\"enum\",values:{image:{}}},url:{required:!0,type:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},layer:{id:{type:\"string\",required:!0},type:{type:\"enum\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},layout:[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],layout_background:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"!\":\"icon-overlap\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-overlap\":{type:\"enum\",values:{never:{},always:{},cooperative:{}},requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"padding\",default:[2],units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},\"viewport-glyph\":{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-variable-anchor-offset\":{type:\"variableAnchorOffsetCollection\",requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\",{\"!\":\"text-overlap\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-overlap\":{type:\"enum\",values:{never:{},always:{},cooperative:{}},requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},function_stop:{type:\"array\",minimum:0,maximum:24,value:[\"number\",\"color\"],length:2},expression:{type:\"array\",value:\"*\",minimum:1},light:{anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},sky:{\"sky-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#88C6FC\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"horizon-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"fog-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"fog-ground-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"horizon-fog-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"sky-horizon-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"atmosphere-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},terrain:{source:{type:\"string\",required:!0},exaggeration:{type:\"number\",minimum:0,default:1}},projection:{type:{type:\"enum\",default:\"mercator\",values:{mercator:{},globe:{}}}},paint:[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],paint_fill:{\"fill-antialias\":{type:\"boolean\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}};let Ze=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"];function ct(R,S){let F={};for(let W in R)W!==\"ref\"&&(F[W]=R[W]);return Ze.forEach(W=>{W in S&&(F[W]=S[W])}),F}function pt(R,S){if(Array.isArray(R)){if(!Array.isArray(S)||R.length!==S.length)return!1;for(let F=0;F<R.length;F++)if(!pt(R[F],S[F]))return!1;return!0}if(typeof R==\"object\"&&R!==null&&S!==null){if(typeof S!=\"object\"||Object.keys(R).length!==Object.keys(S).length)return!1;for(let F in R)if(!pt(R[F],S[F]))return!1;return!0}return R===S}function Wt(R,S){R.push(S)}function st(R,S,F){Wt(F,{command:\"addSource\",args:[R,S[R]]})}function lt(R,S,F){Wt(S,{command:\"removeSource\",args:[R]}),F[R]=!0}function Gt(R,S,F,W){lt(R,F,W),st(R,S,F)}function Nt(R,S,F){let W;for(W in R[F])if(Object.prototype.hasOwnProperty.call(R[F],W)&&W!==\"data\"&&!pt(R[F][W],S[F][W]))return!1;for(W in S[F])if(Object.prototype.hasOwnProperty.call(S[F],W)&&W!==\"data\"&&!pt(R[F][W],S[F][W]))return!1;return!0}function $t(R,S,F,W,te,fe){R=R||{},S=S||{};for(let pe in R)Object.prototype.hasOwnProperty.call(R,pe)&&(pt(R[pe],S[pe])||F.push({command:fe,args:[W,pe,S[pe],te]}));for(let pe in S)Object.prototype.hasOwnProperty.call(S,pe)&&!Object.prototype.hasOwnProperty.call(R,pe)&&(pt(R[pe],S[pe])||F.push({command:fe,args:[W,pe,S[pe],te]}))}function sr(R){return R.id}function wr(R,S){return R[S.id]=S,R}class ur{constructor(S,F,W,te){this.message=(S?`${S}: `:\"\")+W,te&&(this.identifier=te),F!=null&&F.__line__&&(this.line=F.__line__)}}function Qe(R,...S){for(let F of S)for(let W in F)R[W]=F[W];return R}class Et extends Error{constructor(S,F){super(F),this.message=F,this.key=S}}class er{constructor(S,F=[]){this.parent=S,this.bindings={};for(let[W,te]of F)this.bindings[W]=te}concat(S){return new er(this,S)}get(S){if(this.bindings[S])return this.bindings[S];if(this.parent)return this.parent.get(S);throw new Error(`${S} not found in scope.`)}has(S){return!!this.bindings[S]||!!this.parent&&this.parent.has(S)}}let Ut={kind:\"null\"},Ft={kind:\"number\"},bt={kind:\"string\"},yt={kind:\"boolean\"},Yt={kind:\"color\"},lr={kind:\"object\"},Tr={kind:\"value\"},Rr={kind:\"collator\"},ei={kind:\"formatted\"},Wr={kind:\"padding\"},Ur={kind:\"resolvedImage\"},dt={kind:\"variableAnchorOffsetCollection\"};function Ge(R,S){return{kind:\"array\",itemType:R,N:S}}function Je(R){if(R.kind===\"array\"){let S=Je(R.itemType);return typeof R.N==\"number\"?`array<${S}, ${R.N}>`:R.itemType.kind===\"value\"?\"array\":`array<${S}>`}return R.kind}let je=[Ut,Ft,bt,yt,Yt,ei,lr,Ge(Tr),Wr,Ur,dt];function $e(R,S){if(S.kind===\"error\")return null;if(R.kind===\"array\"){if(S.kind===\"array\"&&(S.N===0&&S.itemType.kind===\"value\"||!$e(R.itemType,S.itemType))&&(typeof R.N!=\"number\"||R.N===S.N))return null}else{if(R.kind===S.kind)return null;if(R.kind===\"value\"){for(let F of je)if(!$e(F,S))return null}}return`Expected ${Je(R)} but found ${Je(S)} instead.`}function wt(R,S){return S.some(F=>F.kind===R.kind)}function Ie(R,S){return S.some(F=>F===\"null\"?R===null:F===\"array\"?Array.isArray(R):F===\"object\"?R&&!Array.isArray(R)&&typeof R==\"object\":F===typeof R)}function xe(R,S){return R.kind===\"array\"&&S.kind===\"array\"?R.itemType.kind===S.itemType.kind&&typeof R.N==\"number\":R.kind===S.kind}let Ce=.96422,vt=.82521,nr=4/29,ir=6/29,pr=3*ir*ir,oi=ir*ir*ir,di=Math.PI/180,Jr=180/Math.PI;function fi(R){return(R%=360)<0&&(R+=360),R}function Hi([R,S,F,W]){let te,fe,pe=wn((.2225045*(R=Pn(R))+.7168786*(S=Pn(S))+.0606169*(F=Pn(F)))/1);R===S&&S===F?te=fe=pe:(te=wn((.4360747*R+.3850649*S+.1430804*F)/Ce),fe=wn((.0139322*R+.0971045*S+.7141733*F)/vt));let ze=116*pe-16;return[ze<0?0:ze,500*(te-pe),200*(pe-fe),W]}function Pn(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function wn(R){return R>oi?Math.pow(R,1/3):R/pr+nr}function pn([R,S,F,W]){let te=(R+16)/116,fe=isNaN(S)?te:te+S/500,pe=isNaN(F)?te:te-F/200;return te=1*kn(te),fe=Ce*kn(fe),pe=vt*kn(pe),[Vn(3.1338561*fe-1.6168667*te-.4906146*pe),Vn(-.9787684*fe+1.9161415*te+.033454*pe),Vn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function Vn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function kn(R){return R>ir?R*R*R:pr*(R-nr)}function ea(R){return parseInt(R.padEnd(2,R),16)/255}function ua(R,S){return Vt(S?R/100:R,0,1)}function Vt(R,S,F){return Math.min(Math.max(S,R),F)}function _t(R){return!R.some(Number.isNaN)}let tr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class ar{constructor(S,F,W,te=1,fe=!0){this.r=S,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter(\"rgb\",[S,F,W,te]))}static parse(S){if(S instanceof ar)return S;if(typeof S!=\"string\")return;let F=function(W){if((W=W.toLowerCase().trim())===\"transparent\")return[0,0,0,0];let te=tr[W];if(te){let[pe,ze,Ke]=te;return[pe/255,ze/255,Ke/255,1]}if(W.startsWith(\"#\")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,ze=1;return[ea(W.slice(ze,ze+=pe)),ea(W.slice(ze,ze+=pe)),ea(W.slice(ze,ze+=pe)),ea(W.slice(ze,ze+pe)||\"ff\")]}if(W.startsWith(\"rgb\")){let pe=W.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(pe){let[ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi,dn]=pe,Fi=[Lt||\" \",mr||\" \",ui].join(\"\");if(Fi===\"  \"||Fi===\"  /\"||Fi===\",,\"||Fi===\",,,\"){let ln=[ut,fr,zr].join(\"\"),An=ln===\"%%%\"?100:ln===\"\"?255:0;if(An){let pa=[Vt(+Ke/An,0,1),Vt(+Qt/An,0,1),Vt(+Lr/An,0,1),yi?ua(+yi,dn):1];if(_t(pa))return pa}}return}}let fe=W.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(fe){let[pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr]=fe,zr=[Ke||\" \",Lt||\" \",fr].join(\"\");if(zr===\"  \"||zr===\"  /\"||zr===\",,\"||zr===\",,,\"){let ui=[+ze,Vt(+ut,0,100),Vt(+Qt,0,100),mr?ua(+mr,Lr):1];if(_t(ui))return function([yi,dn,Fi,ln]){function An(pa){let ro=(pa+yi/30)%12,Vo=dn*Math.min(Fi,1-Fi);return Fi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return yi=fi(yi),dn/=100,Fi/=100,[An(0),An(8),An(4),ln]}(ui)}}}(S);return F?new ar(...F,!1):void 0}get rgb(){let{r:S,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter(\"rgb\",[S/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter(\"hcl\",function(S){let[F,W,te,fe]=Hi(S),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?fi(Math.atan2(te,W)*Jr):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter(\"lab\",Hi(this.rgb))}overwriteGetter(S,F){return Object.defineProperty(this,S,{value:F}),F}toString(){let[S,F,W,te]=this.rgb;return`rgba(${[S,F,W].map(fe=>Math.round(255*fe)).join(\",\")},${te})`}}ar.black=new ar(0,0,0,1),ar.white=new ar(1,1,1,1),ar.transparent=new ar(0,0,0,0),ar.red=new ar(1,0,0,1);class Er{constructor(S,F,W){this.sensitivity=S?F?\"variant\":\"case\":F?\"accent\":\"base\",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"})}compare(S,F){return this.collator.compare(S,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Zr{constructor(S,F,W,te,fe){this.text=S,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ri{constructor(S){this.sections=S}static fromString(S){return new ri([new Zr(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof ri?S:ri.fromString(S)}toString(){return this.sections.length===0?\"\":this.sections.map(S=>S.text).join(\"\")}}class $r{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof $r)return S;if(typeof S==\"number\")return new $r([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let F of S)if(typeof F!=\"number\")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new $r(S)}}toString(){return JSON.stringify(this.values)}}let zi=new Set([\"center\",\"left\",\"right\",\"top\",\"bottom\",\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"]);class Ji{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Ji)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let F=0;F<S.length;F+=2){let W=S[F],te=S[F+1];if(typeof W!=\"string\"||!zi.has(W)||!Array.isArray(te)||te.length!==2||typeof te[0]!=\"number\"||typeof te[1]!=\"number\")return}return new Ji(S)}}toString(){return JSON.stringify(this.values)}}class en{constructor(S){this.name=S.name,this.available=S.available}toString(){return this.name}static fromString(S){return S?new en({name:S,available:!1}):null}}function cn(R,S,F,W){return typeof R==\"number\"&&R>=0&&R<=255&&typeof S==\"number\"&&S>=0&&S<=255&&typeof F==\"number\"&&F>=0&&F<=255?W===void 0||typeof W==\"number\"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,S,F,W].join(\", \")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W==\"number\"?[R,S,F,W]:[R,S,F]).join(\", \")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R==\"string\"||typeof R==\"boolean\"||typeof R==\"number\"||R instanceof ar||R instanceof Er||R instanceof ri||R instanceof $r||R instanceof Ji||R instanceof en)return!0;if(Array.isArray(R)){for(let S of R)if(!yn(S))return!1;return!0}if(typeof R==\"object\"){for(let S in R)if(!yn(R[S]))return!1;return!0}return!1}function Mn(R){if(R===null)return Ut;if(typeof R==\"string\")return bt;if(typeof R==\"boolean\")return yt;if(typeof R==\"number\")return Ft;if(R instanceof ar)return Yt;if(R instanceof Er)return Rr;if(R instanceof ri)return ei;if(R instanceof $r)return Wr;if(R instanceof Ji)return dt;if(R instanceof en)return Ur;if(Array.isArray(R)){let S=R.length,F;for(let W of R){let te=Mn(W);if(F){if(F===te)continue;F=Tr;break}F=te}return Ge(F||Tr,S)}return lr}function Ba(R){let S=typeof R;return R===null?\"\":S===\"string\"||S===\"number\"||S===\"boolean\"?String(R):R instanceof ar||R instanceof ri||R instanceof $r||R instanceof Ji||R instanceof en?R.toString():JSON.stringify(R)}class la{constructor(S,F){this.type=S,this.value=F}static parse(S,F){if(S.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!yn(S[1]))return F.error(\"invalid value\");let W=S[1],te=Mn(W),fe=F.expectedType;return te.kind!==\"array\"||te.N!==0||!fe||fe.kind!==\"array\"||typeof fe.N==\"number\"&&fe.N!==0||(te=fe),new la(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(S){this.name=\"ExpressionEvaluationError\",this.message=S}toJSON(){return this.message}}let Wa={string:bt,number:Ft,boolean:yt,object:lr};class Fa{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W,te=1,fe=S[0];if(fe===\"array\"){let ze,Ke;if(S.length>2){let ut=S[1];if(typeof ut!=\"string\"||!(ut in Wa)||ut===\"object\")return F.error('The item type argument of \"array\" must be one of string, number, boolean',1);ze=Wa[ut],te++}else ze=Tr;if(S.length>3){if(S[2]!==null&&(typeof S[2]!=\"number\"||S[2]<0||S[2]!==Math.floor(S[2])))return F.error('The length argument to \"array\" must be a positive integer literal',2);Ke=S[2],te++}W=Ge(ze,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;te<S.length;te++){let ze=F.parse(S[te],te,Tr);if(!ze)return null;pe.push(ze)}return new Fa(W,pe)}evaluate(S){for(let F=0;F<this.args.length;F++){let W=this.args[F].evaluate(S);if(!$e(this.type,Mn(W)))return W;if(F===this.args.length-1)throw new ma(`Expected value to be of type ${Je(this.type)}, but found ${Je(Mn(W))} instead.`)}throw new Error}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Wo={\"to-boolean\":yt,\"to-color\":Yt,\"to-number\":Ft,\"to-string\":bt};class da{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W=S[0];if(!Wo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W===\"to-boolean\"||W===\"to-string\")&&S.length!==2)return F.error(\"Expected one argument.\");let te=Wo[W],fe=[];for(let pe=1;pe<S.length;pe++){let ze=F.parse(S[pe],pe,Tr);if(!ze)return null;fe.push(ze)}return new da(te,fe)}evaluate(S){switch(this.type.kind){case\"boolean\":return!!this.args[0].evaluate(S);case\"color\":{let F,W;for(let te of this.args){if(F=te.evaluate(S),W=null,F instanceof ar)return F;if(typeof F==\"string\"){let fe=S.parseColor(F);if(fe)return fe}else if(Array.isArray(F)&&(W=F.length<3||F.length>4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:cn(F[0],F[1],F[2],F[3]),!W))return new ar(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"padding\":{let F;for(let W of this.args){F=W.evaluate(S);let te=$r.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"variableAnchorOffsetCollection\":{let F;for(let W of this.args){F=W.evaluate(S);let te=Ji.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"number\":{let F=null;for(let W of this.args){if(F=W.evaluate(S),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case\"formatted\":return ri.fromString(Ba(this.args[0].evaluate(S)));case\"resolvedImage\":return en.fromString(Ba(this.args[0].evaluate(S)));default:return Ba(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Wn=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];class Ga{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&\"id\"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type==\"number\"?Wn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&\"geometry\"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(S){let F=this._parseColorCache[S];return F||(F=this._parseColorCache[S]=ar.parse(S)),F}}class vo{constructor(S,F,W=[],te,fe=new er,pe=[]){this.registry=S,this.path=W,this.key=W.map(ze=>`[${ze}]`).join(\"\"),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(S,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(S,fe):this._parse(S,fe)}_parse(S,F){function W(te,fe,pe){return pe===\"assert\"?new Fa(fe,[te]):pe===\"coerce\"?new da(fe,[te]):te}if(S!==null&&typeof S!=\"string\"&&typeof S!=\"boolean\"&&typeof S!=\"number\"||(S=[\"literal\",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');let te=S[0];if(typeof te!=\"string\")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use [\"literal\", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(S,this);if(!pe)return null;if(this.expectedType){let ze=this.expectedType,Ke=pe.type;if(ze.kind!==\"string\"&&ze.kind!==\"number\"&&ze.kind!==\"boolean\"&&ze.kind!==\"object\"&&ze.kind!==\"array\"||Ke.kind!==\"value\")if(ze.kind!==\"color\"&&ze.kind!==\"formatted\"&&ze.kind!==\"resolvedImage\"||Ke.kind!==\"value\"&&Ke.kind!==\"string\")if(ze.kind!==\"padding\"||Ke.kind!==\"value\"&&Ke.kind!==\"number\"&&Ke.kind!==\"array\")if(ze.kind!==\"variableAnchorOffsetCollection\"||Ke.kind!==\"value\"&&Ke.kind!==\"array\"){if(this.checkSubtype(ze,Ke))return null}else pe=W(pe,ze,F.typeAnnotation||\"coerce\");else pe=W(pe,ze,F.typeAnnotation||\"coerce\");else pe=W(pe,ze,F.typeAnnotation||\"coerce\");else pe=W(pe,ze,F.typeAnnotation||\"assert\")}if(!(pe instanceof la)&&pe.type.kind!==\"resolvedImage\"&&this._isConstant(pe)){let ze=new Ga;try{pe=new la(pe.type,pe.evaluate(ze))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression \"${te}\". If you wanted a literal array, use [\"literal\", [...]].`,0)}return this.error(S===void 0?\"'undefined' value invalid. Use null instead.\":typeof S==\"object\"?'Bare objects invalid. Use [\"literal\", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,F,W){let te=typeof S==\"number\"?this.path.concat(S):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(S,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join(\"\")}`;this.errors.push(new Et(W,S))}checkSubtype(S,F){let W=$e(S,F);return W&&this.error(W),W}}class jn{constructor(S,F){this.type=F.type,this.bindings=[].concat(S),this.result=F}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let F of this.bindings)S(F[1]);S(this.result)}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let W=[];for(let fe=1;fe<S.length-1;fe+=2){let pe=S[fe];if(typeof pe!=\"string\")return F.error(`Expected string, but found ${typeof pe} instead.`,fe);if(/[^a-zA-Z0-9_]/.test(pe))return F.error(\"Variable names must contain only alphanumeric characters or '_'.\",fe);let ze=F.parse(S[fe+1],fe+1);if(!ze)return null;W.push([pe,ze])}let te=F.parse(S[S.length-1],S.length-1,F.expectedType,W);return te?new jn(W,te):null}outputDefined(){return this.result.outputDefined()}}class St{constructor(S,F){this.type=F.type,this.name=S,this.boundExpression=F}static parse(S,F){if(S.length!==2||typeof S[1]!=\"string\")return F.error(\"'var' expression requires exactly one string literal argument.\");let W=S[1];return F.scope.has(W)?new St(W,F.scope.get(W)):F.error(`Unknown variable \"${W}\". Make sure \"${W}\" has been bound in an enclosing \"let\" expression before using it.`,1)}evaluate(S){return this.boundExpression.evaluate(S)}eachChild(){}outputDefined(){return!1}}class Cr{constructor(S,F,W){this.type=S,this.index=F,this.input=W}static parse(S,F){if(S.length!==3)return F.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,Ft),te=F.parse(S[2],2,Ge(F.expectedType||Tr));return W&&te?new Cr(te.type.itemType,W,te):null}evaluate(S){let F=this.index.evaluate(S),W=this.input.evaluate(S);if(F<0)throw new ma(`Array index out of bounds: ${F} < 0.`);if(F>=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class Qr{constructor(S,F){this.type=yt,this.needle=S,this.haystack=F}static parse(S,F){if(S.length!==3)return F.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,Tr),te=F.parse(S[2],2,Tr);return W&&te?wt(W.type,[yt,bt,Ft,Ut,Tr])?new Qr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!W)return!1;if(!Ie(F,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);if(!Ie(W,[\"string\",\"array\"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`);return W.indexOf(F)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class pi{constructor(S,F,W){this.type=Ft,this.needle=S,this.haystack=F,this.fromIndex=W}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,Tr),te=F.parse(S[2],2,Tr);if(!W||!te)return null;if(!wt(W.type,[yt,bt,Ft,Ut,Tr]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,Ft);return fe?new pi(W,te,fe):null}return new pi(W,te)}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!Ie(F,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(S)),Ie(W,[\"string\"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(Ie(W,[\"array\"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class fn{constructor(S,F,W,te,fe,pe){this.inputType=S,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(S,F){if(S.length<5)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return F.error(\"Expected an even number of arguments.\");let W,te;F.expectedType&&F.expectedType.kind!==\"value\"&&(te=F.expectedType);let fe={},pe=[];for(let ut=2;ut<S.length-1;ut+=2){let Lt=S[ut],Qt=S[ut+1];Array.isArray(Lt)||(Lt=[Lt]);let fr=F.concat(ut);if(Lt.length===0)return fr.error(\"Expected at least one branch label.\");for(let Lr of Lt){if(typeof Lr!=\"number\"&&typeof Lr!=\"string\")return fr.error(\"Branch labels must be numbers or strings.\");if(typeof Lr==\"number\"&&Math.abs(Lr)>Number.MAX_SAFE_INTEGER)return fr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Lr==\"number\"&&Math.floor(Lr)!==Lr)return fr.error(\"Numeric branch labels must be integer values.\");if(W){if(fr.checkSubtype(W,Mn(Lr)))return null}else W=Mn(Lr);if(fe[String(Lr)]!==void 0)return fr.error(\"Branch labels must be unique.\");fe[String(Lr)]=pe.length}let mr=F.parse(Qt,ut,te);if(!mr)return null;te=te||mr.type,pe.push(mr)}let ze=F.parse(S[1],1,Tr);if(!ze)return null;let Ke=F.parse(S[S.length-1],S.length-1,te);return Ke?ze.type.kind!==\"value\"&&F.concat(1).checkSubtype(W,ze.type)?null:new fn(W,te,ze,fe,pe,Ke):null}evaluate(S){let F=this.input.evaluate(S);return(Mn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class Sn{constructor(S,F,W){this.type=S,this.branches=F,this.otherwise=W}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return F.error(\"Expected an odd number of arguments.\");let W;F.expectedType&&F.expectedType.kind!==\"value\"&&(W=F.expectedType);let te=[];for(let pe=1;pe<S.length-1;pe+=2){let ze=F.parse(S[pe],pe,yt);if(!ze)return null;let Ke=F.parse(S[pe+1],pe+1,W);if(!Ke)return null;te.push([ze,Ke]),W=W||Ke.type}let fe=F.parse(S[S.length-1],S.length-1,W);if(!fe)return null;if(!W)throw new Error(\"Can't infer output type\");return new Sn(W,te,fe)}evaluate(S){for(let[F,W]of this.branches)if(F.evaluate(S))return W.evaluate(S);return this.otherwise.evaluate(S)}eachChild(S){for(let[F,W]of this.branches)S(F),S(W);S(this.otherwise)}outputDefined(){return this.branches.every(([S,F])=>F.outputDefined())&&this.otherwise.outputDefined()}}class En{constructor(S,F,W,te){this.type=S,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,Tr),te=F.parse(S[2],2,Ft);if(!W||!te)return null;if(!wt(W.type,[Ge(Tr),bt,Tr]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,Ft);return fe?new En(W.type,W,te,fe):null}return new En(W.type,W,te)}evaluate(S){let F=this.input.evaluate(S),W=this.beginIndex.evaluate(S),te;if(this.endIndex&&(te=this.endIndex.evaluate(S)),Ie(F,[\"string\"]))return[...F].slice(W,te).join(\"\");if(Ie(F,[\"array\"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Mn(F))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function ki(R,S){let F=R.length-1,W,te,fe=0,pe=F,ze=0;for(;fe<=pe;)if(ze=Math.floor((fe+pe)/2),W=R[ze],te=R[ze+1],W<=S){if(ze===F||S<te)return ze;fe=ze+1}else{if(!(W>S))throw new ma(\"Input is not a number.\");pe=ze-1}return 0}class _n{constructor(S,F,W){this.type=S,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(S,F){if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error(\"Expected an even number of arguments.\");let W=F.parse(S[1],1,Ft);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!==\"value\"&&(fe=F.expectedType);for(let pe=1;pe<S.length;pe+=2){let ze=pe===1?-1/0:S[pe],Ke=S[pe+1],ut=pe,Lt=pe+1;if(typeof ze!=\"number\")return F.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ut);if(te.length&&te[te.length-1][0]>=ze)return F.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',ut);let Qt=F.parse(Ke,Lt,fe);if(!Qt)return null;fe=fe||Qt.type,te.push([ze,Qt])}return new _n(fe,W,te)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(S):W[ki(F,te)].evaluate(S)}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,\"default\")?R.default:R}var Jn=Ma;function Ma(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<S)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,ze=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<S));W++)R>te?pe=F:ze=F,F=.5*(ze-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var _o=ya(Jn);function No(R,S,F){return R+F*(S-R)}function po(R,S,F){return R.map((W,te)=>No(W,S[te],F))}let Lo={number:No,color:function(R,S,F,W=\"rgb\"){switch(W){case\"rgb\":{let[te,fe,pe,ze]=po(R.rgb,S.rgb,F);return new ar(te,fe,pe,ze,!1)}case\"hcl\":{let[te,fe,pe,ze]=R.hcl,[Ke,ut,Lt,Qt]=S.hcl,fr,mr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?fr=NaN:(fr=Ke,pe!==1&&pe!==0||(mr=ut)):(fr=te,Lt!==1&&Lt!==0||(mr=fe));else{let dn=Ke-te;Ke>te&&dn>180?dn-=360:Ke<te&&te-Ke>180&&(dn+=360),fr=te+F*dn}let[Lr,zr,ui,yi]=function([dn,Fi,ln,An]){return dn=isNaN(dn)?0:dn*di,pn([ln,Math.cos(dn)*Fi,Math.sin(dn)*Fi,An])}([fr,mr!=null?mr:No(fe,ut,F),No(pe,Lt,F),No(ze,Qt,F)]);return new ar(Lr,zr,ui,yi,!1)}case\"lab\":{let[te,fe,pe,ze]=pn(po(R.lab,S.lab,F));return new ar(te,fe,pe,ze,!1)}}},array:po,padding:function(R,S,F){return new $r(po(R.values,S.values,F))},variableAnchorOffsetCollection:function(R,S,F){let W=R.values,te=S.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${S.toString()}`);let fe=[];for(let pe=0;pe<W.length;pe+=2){if(W[pe]!==te[pe])throw new ma(`Cannot interpolate values containing mismatched anchors. from[${pe}]: ${W[pe]}, to[${pe}]: ${te[pe]}`);fe.push(W[pe]);let[ze,Ke]=W[pe+1],[ut,Lt]=te[pe+1];fe.push([No(ze,ut,F),No(Ke,Lt,F)])}return new Ji(fe)}};class Co{constructor(S,F,W,te,fe){this.type=S,this.operator=F,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[pe,ze]of fe)this.labels.push(pe),this.outputs.push(ze)}static interpolationFactor(S,F,W,te){let fe=0;if(S.name===\"exponential\")fe=Fs(F,S.base,W,te);else if(S.name===\"linear\")fe=Fs(F,1,W,te);else if(S.name===\"cubic-bezier\"){let pe=S.controlPoints;fe=new _o(pe[0],pe[1],pe[2],pe[3]).solve(Fs(F,1,W,te))}return fe}static parse(S,F){let[W,te,fe,...pe]=S;if(!Array.isArray(te)||te.length===0)return F.error(\"Expected an interpolation type expression.\",1);if(te[0]===\"linear\")te={name:\"linear\"};else if(te[0]===\"exponential\"){let ut=te[1];if(typeof ut!=\"number\")return F.error(\"Exponential interpolation requires a numeric base.\",1,1);te={name:\"exponential\",base:ut}}else{if(te[0]!==\"cubic-bezier\")return F.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let ut=te.slice(1);if(ut.length!==4||ut.some(Lt=>typeof Lt!=\"number\"||Lt<0||Lt>1))return F.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);te={name:\"cubic-bezier\",controlPoints:ut}}}if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error(\"Expected an even number of arguments.\");if(fe=F.parse(fe,2,Ft),!fe)return null;let ze=[],Ke=null;W===\"interpolate-hcl\"||W===\"interpolate-lab\"?Ke=Yt:F.expectedType&&F.expectedType.kind!==\"value\"&&(Ke=F.expectedType);for(let ut=0;ut<pe.length;ut+=2){let Lt=pe[ut],Qt=pe[ut+1],fr=ut+3,mr=ut+4;if(typeof Lt!=\"number\")return F.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',fr);if(ze.length&&ze[ze.length-1][0]>=Lt)return F.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',fr);let Lr=F.parse(Qt,mr,Ke);if(!Lr)return null;Ke=Ke||Lr.type,ze.push([Lt,Lr])}return xe(Ke,Ft)||xe(Ke,Yt)||xe(Ke,Wr)||xe(Ke,dt)||xe(Ke,Ge(Ft))?new Co(Ke,W,te,fe,ze):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(S);let pe=ki(F,te),ze=Co.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(S),ut=W[pe+1].evaluate(S);switch(this.operator){case\"interpolate\":return Lo[this.type.kind](Ke,ut,ze);case\"interpolate-hcl\":return Lo.color(Ke,ut,ze,\"hcl\");case\"interpolate-lab\":return Lo.color(Ke,ut,ze,\"lab\")}}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Fs(R,S,F,W){let te=W-F,fe=R-F;return te===0?0:S===1?fe/te:(Math.pow(S,fe)-1)/(Math.pow(S,te)-1)}class zs{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expectected at least one argument.\");let W=null,te=F.expectedType;te&&te.kind!==\"value\"&&(W=te);let fe=[];for(let ze of S.slice(1)){let Ke=F.parse(ze,1+fe.length,W,void 0,{typeAnnotation:\"omit\"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error(\"No output type\");let pe=te&&fe.some(ze=>$e(te,ze.type));return new zs(pe?Tr:W,fe)}evaluate(S){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(S),W&&W instanceof en&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function ul(R,S){return R===\"==\"||R===\"!=\"?S.kind===\"boolean\"||S.kind===\"string\"||S.kind===\"number\"||S.kind===\"null\"||S.kind===\"value\":S.kind===\"string\"||S.kind===\"number\"||S.kind===\"value\"}function cl(R,S,F,W){return W.compare(S,F)===0}function zl(R,S,F){let W=R!==\"==\"&&R!==\"!=\";return class NHe{constructor(fe,pe,ze){this.type=yt,this.lhs=fe,this.rhs=pe,this.collator=ze,this.hasUntypedArgument=fe.type.kind===\"value\"||pe.type.kind===\"value\"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error(\"Expected two or three arguments.\");let ze=fe[0],Ke=pe.parse(fe[1],1,Tr);if(!Ke)return null;if(!ul(ze,Ke.type))return pe.concat(1).error(`\"${ze}\" comparisons are not supported for type '${Je(Ke.type)}'.`);let ut=pe.parse(fe[2],2,Tr);if(!ut)return null;if(!ul(ze,ut.type))return pe.concat(2).error(`\"${ze}\" comparisons are not supported for type '${Je(ut.type)}'.`);if(Ke.type.kind!==ut.type.kind&&Ke.type.kind!==\"value\"&&ut.type.kind!==\"value\")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ut.type)}'.`);W&&(Ke.type.kind===\"value\"&&ut.type.kind!==\"value\"?Ke=new Fa(ut.type,[Ke]):Ke.type.kind!==\"value\"&&ut.type.kind===\"value\"&&(ut=new Fa(Ke.type,[ut])));let Lt=null;if(fe.length===4){if(Ke.type.kind!==\"string\"&&ut.type.kind!==\"string\"&&Ke.type.kind!==\"value\"&&ut.type.kind!==\"value\")return pe.error(\"Cannot use collator to compare non-string types.\");if(Lt=pe.parse(fe[3],3,Rr),!Lt)return null}return new NHe(Ke,ut,Lt)}evaluate(fe){let pe=this.lhs.evaluate(fe),ze=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Mn(pe),ut=Mn(ze);if(Ke.kind!==ut.kind||Ke.kind!==\"string\"&&Ke.kind!==\"number\")throw new ma(`Expected arguments for \"${R}\" to be (string, string) or (number, number), but found (${Ke.kind}, ${ut.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Mn(pe),ut=Mn(ze);if(Ke.kind!==\"string\"||ut.kind!==\"string\")return S(fe,pe,ze)}return this.collator?F(fe,pe,ze,this.collator.evaluate(fe)):S(fe,pe,ze)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let cs=zl(\"==\",function(R,S,F){return S===F},cl),nl=zl(\"!=\",function(R,S,F){return S!==F},function(R,S,F,W){return!cl(0,S,F,W)}),Ss=zl(\"<\",function(R,S,F){return S<F},function(R,S,F,W){return W.compare(S,F)<0}),fl=zl(\">\",function(R,S,F){return S>F},function(R,S,F,W){return W.compare(S,F)>0}),Js=zl(\"<=\",function(R,S,F){return S<=F},function(R,S,F,W){return W.compare(S,F)<=0}),Os=zl(\">=\",function(R,S,F){return S>=F},function(R,S,F,W){return W.compare(S,F)>=0});class Io{constructor(S,F,W){this.type=Rr,this.locale=W,this.caseSensitive=S,this.diacriticSensitive=F}static parse(S,F){if(S.length!==2)return F.error(\"Expected one argument.\");let W=S[1];if(typeof W!=\"object\"||Array.isArray(W))return F.error(\"Collator options argument must be an object.\");let te=F.parse(W[\"case-sensitive\"]!==void 0&&W[\"case-sensitive\"],1,yt);if(!te)return null;let fe=F.parse(W[\"diacritic-sensitive\"]!==void 0&&W[\"diacritic-sensitive\"],1,yt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,bt),!pe)?null:new Io(te,fe,pe)}evaluate(S){return new Er(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class us{constructor(S,F,W,te,fe){this.type=bt,this.number=S,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(S,F){if(S.length!==3)return F.error(\"Expected two arguments.\");let W=F.parse(S[1],1,Ft);if(!W)return null;let te=S[2];if(typeof te!=\"object\"||Array.isArray(te))return F.error(\"NumberFormat options argument must be an object.\");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,bt),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,bt),!pe))return null;let ze=null;if(te[\"min-fraction-digits\"]&&(ze=F.parse(te[\"min-fraction-digits\"],1,Ft),!ze))return null;let Ke=null;return te[\"max-fraction-digits\"]&&(Ke=F.parse(te[\"max-fraction-digits\"],1,Ft),!Ke)?null:new us(W,fe,pe,ze,Ke)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class Zl{constructor(S){this.type=ei,this.sections=S}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W=S[1];if(!Array.isArray(W)&&typeof W==\"object\")return F.error(\"First argument must be an image or text section.\");let te=[],fe=!1;for(let pe=1;pe<=S.length-1;++pe){let ze=S[pe];if(fe&&typeof ze==\"object\"&&!Array.isArray(ze)){fe=!1;let Ke=null;if(ze[\"font-scale\"]&&(Ke=F.parse(ze[\"font-scale\"],1,Ft),!Ke))return null;let ut=null;if(ze[\"text-font\"]&&(ut=F.parse(ze[\"text-font\"],1,Ge(bt)),!ut))return null;let Lt=null;if(ze[\"text-color\"]&&(Lt=F.parse(ze[\"text-color\"],1,Yt),!Lt))return null;let Qt=te[te.length-1];Qt.scale=Ke,Qt.font=ut,Qt.textColor=Lt}else{let Ke=F.parse(S[pe],1,Tr);if(!Ke)return null;let ut=Ke.type.kind;if(ut!==\"string\"&&ut!==\"value\"&&ut!==\"null\"&&ut!==\"resolvedImage\")return F.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Zl(te)}evaluate(S){return new ri(this.sections.map(F=>{let W=F.content.evaluate(S);return Mn(W)===Ur?new Zr(\"\",W,null,null,null):new Zr(Ba(W),null,F.scale?F.scale.evaluate(S):null,F.font?F.font.evaluate(S).join(\",\"):null,F.textColor?F.textColor.evaluate(S):null)}))}eachChild(S){for(let F of this.sections)S(F.content),F.scale&&S(F.scale),F.font&&S(F.font),F.textColor&&S(F.textColor)}outputDefined(){return!1}}class Su{constructor(S){this.type=Ur,this.input=S}static parse(S,F){if(S.length!==2)return F.error(\"Expected two arguments.\");let W=F.parse(S[1],1,bt);return W?new Su(W):F.error(\"No image name provided.\")}evaluate(S){let F=this.input.evaluate(S),W=en.fromString(F);return W&&S.availableImages&&(W.available=S.availableImages.indexOf(F)>-1),W}eachChild(S){S(this.input)}outputDefined(){return!1}}class nc{constructor(S){this.type=Ft,this.input=S}static parse(S,F){if(S.length!==2)return F.error(`Expected 1 argument, but found ${S.length-1} instead.`);let W=F.parse(S[1],1);return W?W.type.kind!==\"array\"&&W.type.kind!==\"string\"&&W.type.kind!==\"value\"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(S){let F=this.input.evaluate(S);if(typeof F==\"string\")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Mn(F))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let ws=8192;function Fn(R,S){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,S.z);return[Math.round(F*te*ws),Math.round(W*te*ws)]}function _a(R,S){let F=Math.pow(2,S.z);return[(te=(R[0]/ws+S.x)/F,360*te-180),(W=(R[1]/ws+S.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,S){R[0]=Math.min(R[0],S[0]),R[1]=Math.min(R[1],S[1]),R[2]=Math.max(R[2],S[0]),R[3]=Math.max(R[3],S[1])}function Ol(R,S){return!(R[0]<=S[0]||R[2]>=S[2]||R[1]<=S[1]||R[3]>=S[3])}function xo(R,S,F){let W=R[0]-S[0],te=R[1]-S[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Yl(R,S,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[S[0]-R[0],S[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!qo(R,S,F,W)||!qo(F,W,R,S));var te,fe}function Us(R,S,F){for(let W of F)for(let te=0;te<W.length-1;++te)if(Yl(R,S,W[te],W[te+1]))return!0;return!1}function Hl(R,S,F=!1){let W=!1;for(let ze of S)for(let Ke=0;Ke<ze.length-1;Ke++){if(xo(R,ze[Ke],ze[Ke+1]))return F;(fe=ze[Ke])[1]>(te=R)[1]!=(pe=ze[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,S){for(let F of S)if(Hl(R,F))return!0;return!1}function aa(R,S){for(let F of R)if(!Hl(F,S))return!1;for(let F=0;F<R.length-1;++F)if(Us(R[F],R[F+1],S))return!1;return!0}function Oo(R,S){for(let F of S)if(aa(R,F))return!0;return!1}function qo(R,S,F,W){let te=W[0]-F[0],fe=W[1]-F[1],pe=(R[0]-F[0])*fe-te*(R[1]-F[1]),ze=(S[0]-F[0])*fe-te*(S[1]-F[1]);return pe>0&&ze<0||pe<0&&ze>0}function ql(R,S,F){let W=[];for(let te=0;te<R.length;te++){let fe=[];for(let pe=0;pe<R[te].length;pe++){let ze=Fn(R[te][pe],F);Vu(S,ze),fe.push(ze)}W.push(fe)}return W}function Pc(R,S,F){let W=[];for(let te=0;te<R.length;te++){let fe=ql(R[te],S,F);W.push(fe)}return W}function Do(R,S,F,W){if(R[0]<F[0]||R[0]>F[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(S,R)}function rf(R,S,F,W){let te=Math.pow(2,W.z)*ws,fe=[W.x*ws,W.y*ws],pe=[];for(let ze of R)for(let Ke of ze){let ut=[Ke.x+fe[0],Ke.y+fe[1]];Do(ut,S,F,te),pe.push(ut)}return pe}function Uf(R,S,F,W){let te=Math.pow(2,W.z)*ws,fe=[W.x*ws,W.y*ws],pe=[];for(let Ke of R){let ut=[];for(let Lt of Ke){let Qt=[Lt.x+fe[0],Lt.y+fe[1]];Vu(S,Qt),ut.push(Qt)}pe.push(ut)}if(S[2]-S[0]<=te/2){(ze=S)[0]=ze[1]=1/0,ze[2]=ze[3]=-1/0;for(let Ke of pe)for(let ut of Ke)Do(ut,S,F,te)}var ze;return pe}class ml{constructor(S,F){this.type=yt,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type===\"FeatureCollection\"){let te=[];for(let fe of W.features){let{type:pe,coordinates:ze}=fe.geometry;pe===\"Polygon\"&&te.push(ze),pe===\"MultiPolygon\"&&te.push(...ze)}if(te.length)return new ml(W,{type:\"MultiPolygon\",coordinates:te})}else if(W.type===\"Feature\"){let te=W.geometry.type;if(te===\"Polygon\"||te===\"MultiPolygon\")return new ml(W,W.geometry)}else if(W.type===\"Polygon\"||W.type===\"MultiPolygon\")return new ml(W,W)}return F.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()===\"Point\")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type===\"Polygon\"){let ze=ql(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ut of Ke)if(!Hl(ut,ze))return!1}if(W.type===\"MultiPolygon\"){let ze=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ut of Ke)if(!ac(ut,ze))return!1}return!0}(S,this.geometries);if(S.geometryType()===\"LineString\")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type===\"Polygon\"){let ze=ql(W.coordinates,fe,pe),Ke=Uf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ut of Ke)if(!aa(ut,ze))return!1}if(W.type===\"MultiPolygon\"){let ze=Pc(W.coordinates,fe,pe),Ke=Uf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ut of Ke)if(!Oo(ut,ze))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],S=(F,W)=>F<W?-1:F>W?1:0){if(this.data=R,this.length=this.data.length,this.compare=S,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:S,compare:F}=this,W=S[R];for(;R>0;){let te=R-1>>1,fe=S[te];if(F(W,fe)>=0)break;S[R]=fe,R=te}S[R]=W}_down(R){let{data:S,compare:F}=this,W=this.length>>1,te=S[R];for(;R<W;){let fe=1+(R<<1),pe=fe+1;if(pe<this.length&&F(S[pe],S[fe])<0&&(fe=pe),F(S[fe],te)>=0)break;S[R]=S[fe],R=fe}S[R]=te}};function Kl(R,S,F,W,te){qs(R,S,F,W||R.length-1,te||oc)}function qs(R,S,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=S-F+1,ze=Math.log(fe),Ke=.5*Math.exp(2*ze/3),ut=.5*Math.sqrt(ze*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);qs(R,S,Math.max(F,Math.floor(S-pe*Ke/fe+ut)),Math.min(W,Math.floor(S+(fe-pe)*Ke/fe+ut)),te)}var Lt=R[S],Qt=F,fr=W;for(yu(R,F,S),te(R[W],Lt)>0&&yu(R,F,W);Qt<fr;){for(yu(R,Qt,fr),Qt++,fr--;te(R[Qt],Lt)<0;)Qt++;for(;te(R[fr],Lt)>0;)fr--}te(R[F],Lt)===0?yu(R,F,fr):yu(R,++fr,W),fr<=S&&(F=fr+1),S<=fr&&(W=fr-1)}}function yu(R,S,F){var W=R[S];R[S]=R[F],R[F]=W}function oc(R,S){return R<S?-1:R>S?1:0}function Cf(R,S){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=Nh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),S>1)for(let fe=0;fe<F.length;fe++)F[fe].length<=S||(Kl(F[fe],S,1,F[fe].length-1,sc),F[fe]=F[fe].slice(0,S));return F}function sc(R,S){return S.area-R.area}function Nh(R){let S=0;for(let F,W,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)F=R[te],W=R[pe],S+=(W.x-F.x)*(F.y+W.y);return S}let kf=1/298.257223563,fs=kf*(2-kf),nf=Math.PI/180;class Vf{constructor(S){let F=6378.137*nf*1e3,W=Math.cos(S*nf),te=1/(1-fs*(1-W*W)),fe=Math.sqrt(te);this.kx=F*fe*W,this.ky=F*fe*te*(1-fs)}distance(S,F){let W=this.wrap(S[0]-F[0])*this.kx,te=(S[1]-F[1])*this.ky;return Math.sqrt(W*W+te*te)}pointOnLine(S,F){let W,te,fe,pe,ze=1/0;for(let Ke=0;Ke<S.length-1;Ke++){let ut=S[Ke][0],Lt=S[Ke][1],Qt=this.wrap(S[Ke+1][0]-ut)*this.kx,fr=(S[Ke+1][1]-Lt)*this.ky,mr=0;Qt===0&&fr===0||(mr=(this.wrap(F[0]-ut)*this.kx*Qt+(F[1]-Lt)*this.ky*fr)/(Qt*Qt+fr*fr),mr>1?(ut=S[Ke+1][0],Lt=S[Ke+1][1]):mr>0&&(ut+=Qt/this.kx*mr,Lt+=fr/this.ky*mr)),Qt=this.wrap(F[0]-ut)*this.kx,fr=(F[1]-Lt)*this.ky;let Lr=Qt*Qt+fr*fr;Lr<ze&&(ze=Lr,W=ut,te=Lt,fe=Ke,pe=mr)}return{point:[W,te],index:fe,t:Math.max(0,Math.min(1,pe))}}wrap(S){for(;S<-180;)S+=360;for(;S>180;)S-=360;return S}}function Jl(R,S){return S[0]-R[0]}function hl(R){return R[1]-R[0]+1}function lc(R,S){return R[1]>=R[0]&&R[1]<S}function Fu(R,S){if(R[0]>R[1])return[null,null];let F=hl(R);if(S){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Cs(R,S){if(!lc(S,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=S[0];W<=S[1];++W)Vu(F,R[W]);return F}function js(R){let S=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(S,W);return S}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function gs(R,S,F){if(!Go(R)||!Go(S))return NaN;let W=0,te=0;return R[2]<S[0]&&(W=S[0]-R[2]),R[0]>S[2]&&(W=R[0]-S[2]),R[1]>S[3]&&(te=R[1]-S[3]),R[3]<S[1]&&(te=S[1]-R[3]),F.distance([0,0],[W,te])}function uc(R,S,F){let W=F.pointOnLine(S,R);return F.distance(R,W.point)}function bl(R,S,F,W,te){let fe=Math.min(uc(R,[F,W],te),uc(S,[F,W],te)),pe=Math.min(uc(F,[R,S],te),uc(W,[R,S],te));return Math.min(fe,pe)}function Gu(R,S,F,W,te){if(!lc(S,R.length)||!lc(W,F.length))return 1/0;let fe=1/0;for(let pe=S[0];pe<S[1];++pe){let ze=R[pe],Ke=R[pe+1];for(let ut=W[0];ut<W[1];++ut){let Lt=F[ut],Qt=F[ut+1];if(Yl(ze,Ke,Lt,Qt))return 0;fe=Math.min(fe,bl(ze,Ke,Lt,Qt,te))}}return fe}function Bs(R,S,F,W,te){if(!lc(S,R.length)||!lc(W,F.length))return NaN;let fe=1/0;for(let pe=S[0];pe<=S[1];++pe)for(let ze=W[0];ze<=W[1];++ze)if(fe=Math.min(fe,te.distance(R[pe],F[ze])),fe===0)return fe;return fe}function ad(R,S,F){if(Hl(R,S,!0))return 0;let W=1/0;for(let te of S){let fe=te[0],pe=te[te.length-1];if(fe!==pe&&(W=Math.min(W,uc(R,[pe,fe],F)),W===0))return W;let ze=F.pointOnLine(te,R);if(W=Math.min(W,F.distance(R,ze.point)),W===0)return W}return W}function Po(R,S,F,W){if(!lc(S,R.length))return NaN;for(let fe=S[0];fe<=S[1];++fe)if(Hl(R[fe],F,!0))return 0;let te=1/0;for(let fe=S[0];fe<S[1];++fe){let pe=R[fe],ze=R[fe+1];for(let Ke of F)for(let ut=0,Lt=Ke.length,Qt=Lt-1;ut<Lt;Qt=ut++){let fr=Ke[Qt],mr=Ke[ut];if(Yl(pe,ze,fr,mr))return 0;te=Math.min(te,bl(pe,ze,fr,mr,W))}}return te}function od(R,S){for(let F of R)for(let W of F)if(Hl(W,S,!0))return!0;return!1}function Yo(R,S,F,W=1/0){let te=js(R),fe=js(S);if(W!==1/0&&gs(te,fe,F)>=W)return W;if(Ol(te,fe)){if(od(R,S))return 0}else if(od(S,R))return 0;let pe=1/0;for(let ze of R)for(let Ke=0,ut=ze.length,Lt=ut-1;Ke<ut;Lt=Ke++){let Qt=ze[Lt],fr=ze[Ke];for(let mr of S)for(let Lr=0,zr=mr.length,ui=zr-1;Lr<zr;ui=Lr++){let yi=mr[ui],dn=mr[Lr];if(Yl(Qt,fr,yi,dn))return 0;pe=Math.min(pe,bl(Qt,fr,yi,dn,F))}}return pe}function Pa(R,S,F,W,te,fe){if(!fe)return;let pe=gs(Cs(W,fe),te,F);pe<S&&R.push([pe,fe,[0,0]])}function af(R,S,F,W,te,fe,pe){if(!fe||!pe)return;let ze=gs(Cs(W,fe),Cs(te,pe),F);ze<S&&R.push([ze,fe,pe])}function Hu(R,S,F,W,te=1/0){let fe=Math.min(W.distance(R[0],F[0][0]),te);if(fe===0)return fe;let pe=new Zc([[0,[0,R.length-1],[0,0]]],Jl),ze=js(F);for(;pe.length>0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ut=Ke[1],Lt=S?50:100;if(hl(ut)<=Lt){if(!lc(ut,R.length))return NaN;if(S){let Qt=Po(R,ut,F,W);if(isNaN(Qt)||Qt===0)return Qt;fe=Math.min(fe,Qt)}else for(let Qt=ut[0];Qt<=ut[1];++Qt){let fr=ad(R[Qt],F,W);if(fe=Math.min(fe,fr),fe===0)return 0}}else{let Qt=Fu(ut,S);Pa(pe,fe,W,R,ze,Qt[0]),Pa(pe,fe,W,R,ze,Qt[1])}}return fe}function wl(R,S,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let ze=new Zc([[0,[0,R.length-1],[0,F.length-1]]],Jl);for(;ze.length>0;){let Ke=ze.pop();if(Ke[0]>=pe)continue;let ut=Ke[1],Lt=Ke[2],Qt=S?50:100,fr=W?50:100;if(hl(ut)<=Qt&&hl(Lt)<=fr){if(!lc(ut,R.length)&&lc(Lt,F.length))return NaN;let mr;if(S&&W)mr=Gu(R,ut,F,Lt,te),pe=Math.min(pe,mr);else if(S&&!W){let Lr=R.slice(ut[0],ut[1]+1);for(let zr=Lt[0];zr<=Lt[1];++zr)if(mr=uc(F[zr],Lr,te),pe=Math.min(pe,mr),pe===0)return pe}else if(!S&&W){let Lr=F.slice(Lt[0],Lt[1]+1);for(let zr=ut[0];zr<=ut[1];++zr)if(mr=uc(R[zr],Lr,te),pe=Math.min(pe,mr),pe===0)return pe}else mr=Bs(R,ut,F,Lt,te),pe=Math.min(pe,mr)}else{let mr=Fu(ut,S),Lr=Fu(Lt,W);af(ze,pe,te,R,F,mr[0],Lr[0]),af(ze,pe,te,R,F,mr[0],Lr[1]),af(ze,pe,te,R,F,mr[1],Lr[0]),af(ze,pe,te,R,F,mr[1],Lr[1])}}return pe}function Gf(R){return R.type===\"MultiPolygon\"?R.coordinates.map(S=>({type:\"Polygon\",coordinates:S})):R.type===\"MultiLineString\"?R.coordinates.map(S=>({type:\"LineString\",coordinates:S})):R.type===\"MultiPoint\"?R.coordinates.map(S=>({type:\"Point\",coordinates:S})):[R]}class Ic{constructor(S,F){this.type=Ft,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type===\"FeatureCollection\")return new Ic(W,W.features.map(te=>Gf(te.geometry)).flat());if(W.type===\"Feature\")return new Ic(W,Gf(W.geometry));if(\"type\"in W&&\"coordinates\"in W)return new Ic(W,Gf(W))}return F.error(\"'distance' expression requires valid geojson object that contains polygon geometry type.\")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()===\"Point\")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Vf(fe[0][1]),ze=1/0;for(let Ke of W){switch(Ke.type){case\"Point\":ze=Math.min(ze,wl(fe,!1,[Ke.coordinates],!1,pe,ze));break;case\"LineString\":ze=Math.min(ze,wl(fe,!1,Ke.coordinates,!0,pe,ze));break;case\"Polygon\":ze=Math.min(ze,Hu(fe,!1,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(S,this.geometries);if(S.geometryType()===\"LineString\")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Vf(fe[0][1]),ze=1/0;for(let Ke of W){switch(Ke.type){case\"Point\":ze=Math.min(ze,wl(fe,!0,[Ke.coordinates],!1,pe,ze));break;case\"LineString\":ze=Math.min(ze,wl(fe,!0,Ke.coordinates,!0,pe,ze));break;case\"Polygon\":ze=Math.min(ze,Hu(fe,!0,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(S,this.geometries);if(S.geometryType()===\"Polygon\")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ut=>ut.map(Lt=>_a([Lt.x,Lt.y],F.canonical)))),pe=new Vf(fe[0][0][0][1]),ze=1/0;for(let Ke of W)for(let ut of fe){switch(Ke.type){case\"Point\":ze=Math.min(ze,Hu([Ke.coordinates],!1,ut,pe,ze));break;case\"LineString\":ze=Math.min(ze,Hu(Ke.coordinates,!0,ut,pe,ze));break;case\"Polygon\":ze=Math.min(ze,Yo(ut,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let mf={\"==\":cs,\"!=\":nl,\">\":fl,\"<\":Ss,\">=\":Os,\"<=\":Js,array:Fa,at:Cr,boolean:Fa,case:Sn,coalesce:zs,collator:Io,format:Zl,image:Su,in:Qr,\"index-of\":pi,interpolate:Co,\"interpolate-hcl\":Co,\"interpolate-lab\":Co,length:nc,let:jn,literal:la,match:fn,number:Fa,\"number-format\":us,object:Fa,slice:En,step:_n,string:Fa,\"to-boolean\":da,\"to-color\":da,\"to-number\":da,\"to-string\":da,var:St,within:ml,distance:Ic};class Bl{constructor(S,F,W,te){this.name=S,this.type=F,this._evaluate=W,this.args=te}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,F){let W=S[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression \"${W}\". If you wanted a literal array, use [\"literal\", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ze=pe.filter(([ut])=>!Array.isArray(ut)||ut.length===S.length-1),Ke=null;for(let[ut,Lt]of ze){Ke=new vo(F.registry,eh,F.path,null,F.scope);let Qt=[],fr=!1;for(let mr=1;mr<S.length;mr++){let Lr=S[mr],zr=Array.isArray(ut)?ut[mr-1]:ut.type,ui=Ke.parse(Lr,1+Qt.length,zr);if(!ui){fr=!0;break}Qt.push(ui)}if(!fr)if(Array.isArray(ut)&&ut.length!==Qt.length)Ke.error(`Expected ${ut.length} arguments, but found ${Qt.length} instead.`);else{for(let mr=0;mr<Qt.length;mr++){let Lr=Array.isArray(ut)?ut[mr]:ut.type,zr=Qt[mr];Ke.concat(mr+1).checkSubtype(Lr,zr.type)}if(Ke.errors.length===0)return new Bl(W,fe,Lt,Qt)}}if(ze.length===1)F.errors.push(...Ke.errors);else{let ut=(ze.length?ze:pe).map(([Qt])=>{return fr=Qt,Array.isArray(fr)?`(${fr.map(Je).join(\", \")})`:`(${Je(fr.type)}...)`;var fr}).join(\" | \"),Lt=[];for(let Qt=1;Qt<S.length;Qt++){let fr=F.parse(S[Qt],1+Lt.length);if(!fr)return null;Lt.push(Je(fr.type))}F.error(`Expected arguments of type ${ut}, but found (${Lt.join(\", \")}) instead.`)}return null}static register(S,F){Bl.definitions=F;for(let W in F)S[W]=Bl}}function _h(R,[S,F,W,te]){S=S.evaluate(R),F=F.evaluate(R),W=W.evaluate(R);let fe=te?te.evaluate(R):1,pe=cn(S,F,W,fe);if(pe)throw new ma(pe);return new ar(S/255,F/255,W/255,fe,!1)}function Qf(R,S){return R in S}function yf(R,S){let F=S[R];return F===void 0?null:F}function Yc(R){return{type:R}}function eh(R){if(R instanceof St)return eh(R.boundExpression);if(R instanceof Bl&&R.name===\"error\"||R instanceof Io||R instanceof ml||R instanceof Ic)return!1;let S=R instanceof da||R instanceof Fa,F=!0;return R.eachChild(W=>{F=S?F&&eh(W):F&&W instanceof la}),!!F&&th(R)&&Hf(R,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}function th(R){if(R instanceof Bl&&(R.name===\"get\"&&R.args.length===1||R.name===\"feature-state\"||R.name===\"has\"&&R.args.length===1||R.name===\"properties\"||R.name===\"geometry-type\"||R.name===\"id\"||/^filter-/.test(R.name))||R instanceof ml||R instanceof Ic)return!1;let S=!0;return R.eachChild(F=>{S&&!th(F)&&(S=!1)}),S}function ju(R){if(R instanceof Bl&&R.name===\"feature-state\")return!1;let S=!0;return R.eachChild(F=>{S&&!ju(F)&&(S=!1)}),S}function Hf(R,S){if(R instanceof Bl&&S.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!Hf(W,S)&&(F=!1)}),F}function cc(R){return{result:\"success\",value:R}}function of(R){return{result:\"error\",value:R}}function Nl(R){return R[\"property-type\"]===\"data-driven\"||R[\"property-type\"]===\"cross-faded-data-driven\"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf(\"zoom\")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function ms(R){return R instanceof Number?\"number\":R instanceof String?\"string\":R instanceof Boolean?\"boolean\":Array.isArray(R)?\"array\":R===null?\"null\":typeof R}function jf(R){return typeof R==\"object\"&&R!==null&&!Array.isArray(R)}function Uh(R){return R}function rh(R,S){let F=S.type===\"color\",W=R.stops&&typeof R.stops[0][0]==\"object\",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(S)?\"exponential\":\"interval\");if(F||S.type===\"padding\"){let Lt=F?ar.parse:$r.parse;(R=Qe({},R)).stops&&(R.stops=R.stops.map(Qt=>[Qt[0],Lt(Qt[1])])),R.default=Lt(R.default?R.default:S.default)}if(R.colorSpace&&(pe=R.colorSpace)!==\"rgb\"&&pe!==\"hcl\"&&pe!==\"lab\")throw new Error(`Unknown color space: \"${R.colorSpace}\"`);var pe;let ze,Ke,ut;if(fe===\"exponential\")ze=ih;else if(fe===\"interval\")ze=Mu;else if(fe===\"categorical\"){ze=xh,Ke=Object.create(null);for(let Lt of R.stops)Ke[Lt[0]]=Lt[1];ut=typeof R.stops[0][0]}else{if(fe!==\"identity\")throw new Error(`Unknown function type \"${fe}\"`);ze=Ws}if(W){let Lt={},Qt=[];for(let Lr=0;Lr<R.stops.length;Lr++){let zr=R.stops[Lr],ui=zr[0].zoom;Lt[ui]===void 0&&(Lt[ui]={zoom:ui,type:R.type,property:R.property,default:R.default,stops:[]},Qt.push(ui)),Lt[ui].stops.push([zr[0].value,zr[1]])}let fr=[];for(let Lr of Qt)fr.push([Lt[Lr].zoom,rh(Lt[Lr],S)]);let mr={name:\"linear\"};return{kind:\"composite\",interpolationType:mr,interpolationFactor:Co.interpolationFactor.bind(void 0,mr),zoomStops:fr.map(Lr=>Lr[0]),evaluate:({zoom:Lr},zr)=>ih({stops:fr,base:R.base},S,Lr).evaluate(Lr,zr)}}if(te){let Lt=fe===\"exponential\"?{name:\"exponential\",base:R.base!==void 0?R.base:1}:null;return{kind:\"camera\",interpolationType:Lt,interpolationFactor:Co.interpolationFactor.bind(void 0,Lt),zoomStops:R.stops.map(Qt=>Qt[0]),evaluate:({zoom:Qt})=>ze(R,S,Qt,Ke,ut)}}return{kind:\"source\",evaluate(Lt,Qt){let fr=Qt&&Qt.properties?Qt.properties[R.property]:void 0;return fr===void 0?sf(R.default,S.default):ze(R,S,fr,Ke,ut)}}}function sf(R,S,F){return R!==void 0?R:S!==void 0?S:F!==void 0?F:void 0}function xh(R,S,F,W,te){return sf(typeof F===te?W[F]:void 0,R.default,S.default)}function Mu(R,S,F){if(ms(F)!==\"number\")return sf(R.default,S.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=ki(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,S,F){let W=R.base!==void 0?R.base:1;if(ms(F)!==\"number\")return sf(R.default,S.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=ki(R.stops.map(Lt=>Lt[0]),F),pe=function(Lt,Qt,fr,mr){let Lr=mr-fr,zr=Lt-fr;return Lr===0?0:Qt===1?zr/Lr:(Math.pow(Qt,zr)-1)/(Math.pow(Qt,Lr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),ze=R.stops[fe][1],Ke=R.stops[fe+1][1],ut=Lo[S.type]||Uh;return typeof ze.evaluate==\"function\"?{evaluate(...Lt){let Qt=ze.evaluate.apply(void 0,Lt),fr=Ke.evaluate.apply(void 0,Lt);if(Qt!==void 0&&fr!==void 0)return ut(Qt,fr,pe,R.colorSpace)}}:ut(ze,Ke,pe,R.colorSpace)}function Ws(R,S,F){switch(S.type){case\"color\":F=ar.parse(F);break;case\"formatted\":F=ri.fromString(F.toString());break;case\"resolvedImage\":F=en.fromString(F.toString());break;case\"padding\":F=$r.parse(F);break;default:ms(F)===S.type||S.type===\"enum\"&&S.values[F]||(F=void 0)}return sf(F,R.default,S.default)}Bl.register(mf,{error:[{kind:\"error\"},[bt],(R,[S])=>{throw new ma(S.evaluate(R))}],typeof:[bt,[Tr],(R,[S])=>Je(Mn(S.evaluate(R)))],\"to-rgba\":[Ge(Ft,4),[Yt],(R,[S])=>{let[F,W,te,fe]=S.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[Yt,[Ft,Ft,Ft],_h],rgba:[Yt,[Ft,Ft,Ft,Ft],_h],has:{type:yt,overloads:[[[bt],(R,[S])=>Qf(S.evaluate(R),R.properties())],[[bt,lr],(R,[S,F])=>Qf(S.evaluate(R),F.evaluate(R))]]},get:{type:Tr,overloads:[[[bt],(R,[S])=>yf(S.evaluate(R),R.properties())],[[bt,lr],(R,[S,F])=>yf(S.evaluate(R),F.evaluate(R))]]},\"feature-state\":[Tr,[bt],(R,[S])=>yf(S.evaluate(R),R.featureState||{})],properties:[lr,[],R=>R.properties()],\"geometry-type\":[bt,[],R=>R.geometryType()],id:[Tr,[],R=>R.id()],zoom:[Ft,[],R=>R.globals.zoom],\"heatmap-density\":[Ft,[],R=>R.globals.heatmapDensity||0],\"line-progress\":[Ft,[],R=>R.globals.lineProgress||0],accumulated:[Tr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],\"+\":[Ft,Yc(Ft),(R,S)=>{let F=0;for(let W of S)F+=W.evaluate(R);return F}],\"*\":[Ft,Yc(Ft),(R,S)=>{let F=1;for(let W of S)F*=W.evaluate(R);return F}],\"-\":{type:Ft,overloads:[[[Ft,Ft],(R,[S,F])=>S.evaluate(R)-F.evaluate(R)],[[Ft],(R,[S])=>-S.evaluate(R)]]},\"/\":[Ft,[Ft,Ft],(R,[S,F])=>S.evaluate(R)/F.evaluate(R)],\"%\":[Ft,[Ft,Ft],(R,[S,F])=>S.evaluate(R)%F.evaluate(R)],ln2:[Ft,[],()=>Math.LN2],pi:[Ft,[],()=>Math.PI],e:[Ft,[],()=>Math.E],\"^\":[Ft,[Ft,Ft],(R,[S,F])=>Math.pow(S.evaluate(R),F.evaluate(R))],sqrt:[Ft,[Ft],(R,[S])=>Math.sqrt(S.evaluate(R))],log10:[Ft,[Ft],(R,[S])=>Math.log(S.evaluate(R))/Math.LN10],ln:[Ft,[Ft],(R,[S])=>Math.log(S.evaluate(R))],log2:[Ft,[Ft],(R,[S])=>Math.log(S.evaluate(R))/Math.LN2],sin:[Ft,[Ft],(R,[S])=>Math.sin(S.evaluate(R))],cos:[Ft,[Ft],(R,[S])=>Math.cos(S.evaluate(R))],tan:[Ft,[Ft],(R,[S])=>Math.tan(S.evaluate(R))],asin:[Ft,[Ft],(R,[S])=>Math.asin(S.evaluate(R))],acos:[Ft,[Ft],(R,[S])=>Math.acos(S.evaluate(R))],atan:[Ft,[Ft],(R,[S])=>Math.atan(S.evaluate(R))],min:[Ft,Yc(Ft),(R,S)=>Math.min(...S.map(F=>F.evaluate(R)))],max:[Ft,Yc(Ft),(R,S)=>Math.max(...S.map(F=>F.evaluate(R)))],abs:[Ft,[Ft],(R,[S])=>Math.abs(S.evaluate(R))],round:[Ft,[Ft],(R,[S])=>{let F=S.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[Ft,[Ft],(R,[S])=>Math.floor(S.evaluate(R))],ceil:[Ft,[Ft],(R,[S])=>Math.ceil(S.evaluate(R))],\"filter-==\":[yt,[bt,Tr],(R,[S,F])=>R.properties()[S.value]===F.value],\"filter-id-==\":[yt,[Tr],(R,[S])=>R.id()===S.value],\"filter-type-==\":[yt,[bt],(R,[S])=>R.geometryType()===S.value],\"filter-<\":[yt,[bt,Tr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W<te}],\"filter-id-<\":[yt,[Tr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F<W}],\"filter->\":[yt,[bt,Tr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>te}],\"filter-id->\":[yt,[Tr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>W}],\"filter-<=\":[yt,[bt,Tr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W<=te}],\"filter-id-<=\":[yt,[Tr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F<=W}],\"filter->=\":[yt,[bt,Tr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>=te}],\"filter-id->=\":[yt,[Tr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>=W}],\"filter-has\":[yt,[Tr],(R,[S])=>S.value in R.properties()],\"filter-has-id\":[yt,[],R=>R.id()!==null&&R.id()!==void 0],\"filter-type-in\":[yt,[Ge(bt)],(R,[S])=>S.value.indexOf(R.geometryType())>=0],\"filter-id-in\":[yt,[Ge(Tr)],(R,[S])=>S.value.indexOf(R.id())>=0],\"filter-in-small\":[yt,[bt,Ge(Tr)],(R,[S,F])=>F.value.indexOf(R.properties()[S.value])>=0],\"filter-in-large\":[yt,[bt,Ge(Tr)],(R,[S,F])=>function(W,te,fe,pe){for(;fe<=pe;){let ze=fe+pe>>1;if(te[ze]===W)return!0;te[ze]>W?pe=ze-1:fe=ze+1}return!1}(R.properties()[S.value],F.value,0,F.value.length-1)],all:{type:yt,overloads:[[[yt,yt],(R,[S,F])=>S.evaluate(R)&&F.evaluate(R)],[Yc(yt),(R,S)=>{for(let F of S)if(!F.evaluate(R))return!1;return!0}]]},any:{type:yt,overloads:[[[yt,yt],(R,[S,F])=>S.evaluate(R)||F.evaluate(R)],[Yc(yt),(R,S)=>{for(let F of S)if(F.evaluate(R))return!0;return!1}]]},\"!\":[yt,[yt],(R,[S])=>!S.evaluate(R)],\"is-supported-script\":[yt,[bt],(R,[S])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(S.evaluate(R))}],upcase:[bt,[bt],(R,[S])=>S.evaluate(R).toUpperCase()],downcase:[bt,[bt],(R,[S])=>S.evaluate(R).toLowerCase()],concat:[bt,Yc(Tr),(R,S)=>S.map(F=>Ba(F.evaluate(R))).join(\"\")],\"resolved-locale\":[bt,[Rr],(R,[S])=>S.evaluate(R).resolvedLocale()]});class Eu{constructor(S,F){var W;this.expression=S,this._warningHistory={},this._evaluator=new Ga,this._defaultValue=F?(W=F).type===\"color\"&&jf(W.default)?new ar(0,0,0,0):W.type===\"color\"?ar.parse(W.default)||null:W.type===\"padding\"?$r.parse(W.default)||null:W.type===\"variableAnchorOffsetCollection\"?Ji.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type===\"enum\"?F.values:null}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._evaluator.globals=S,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(S,F,W,te,fe,pe){this._evaluator.globals=S,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let ze=this.expression.evaluate(this._evaluator);if(ze==null||typeof ze==\"number\"&&ze!=ze)return this._defaultValue;if(this._enumValues&&!(ze in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(\", \")}, but found ${JSON.stringify(ze)} instead.`);return ze}catch(ze){return this._warningHistory[ze.message]||(this._warningHistory[ze.message]=!0,typeof console!=\"undefined\"&&console.warn(ze.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]==\"string\"&&R[0]in mf}function ks(R,S){let F=new vo(mf,eh,[],S?function(te){let fe={color:Yt,string:bt,number:Ft,enum:bt,boolean:yt,formatted:ei,padding:Wr,resolvedImage:Ur,variableAnchorOffsetCollection:dt};return te.type===\"array\"?Ge(fe[te.value]||Tr,te.length):fe[te.type]}(S):void 0),W=F.parse(R,void 0,void 0,void 0,S&&S.type===\"string\"?{typeAnnotation:\"coerce\"}:void 0);return W?cc(new Eu(W,S)):of(F.errors)}class bc{constructor(S,F){this.kind=S,this._styleExpression=F,this.isStateDependent=S!==\"constant\"&&!ju(F.expression)}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}}class hu{constructor(S,F,W,te){this.kind=S,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=S!==\"camera\"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}interpolationFactor(S,F,W){return this.interpolationType?Co.interpolationFactor(this.interpolationType,S,F,W):0}}function _u(R,S){let F=ks(R,S);if(F.result===\"error\")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(S))return of([new Et(\"\",\"data expressions not supported\")]);let fe=Hf(W,[\"zoom\"]);if(!fe&&!Kc(S))return of([new Et(\"\",\"zoom expressions not supported\")]);let pe=nh(W);return pe||fe?pe instanceof Et?of([pe]):pe instanceof Co&&!Rc(S)?of([new Et(\"\",'\"interpolate\" expressions cannot be used with this property')]):cc(pe?new hu(te?\"camera\":\"composite\",F.value,pe.labels,pe instanceof Co?pe.interpolation:void 0):new bc(te?\"constant\":\"source\",F.value)):of([new Et(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')])}class al{constructor(S,F){this._parameters=S,this._specification=F,Qe(this,rh(this._parameters,this._specification))}static deserialize(S){return new al(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function nh(R){let S=null;if(R instanceof jn)S=nh(R.result);else if(R instanceof zs){for(let F of R.args)if(S=nh(F),S)break}else(R instanceof _n||R instanceof Co)&&R.input instanceof Bl&&R.input.name===\"zoom\"&&(S=R);return S instanceof Et||R.eachChild(F=>{let W=nh(F);W instanceof Et?S=W:!S&&W?S=new Et(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):S&&W&&S!==W&&(S=new Et(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'))}),S}function bh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case\"has\":return R.length>=2&&R[1]!==\"$id\"&&R[1]!==\"$type\";case\"in\":return R.length>=3&&(typeof R[1]!=\"string\"||Array.isArray(R[2]));case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case\"any\":case\"all\":for(let S of R.slice(1))if(!bh(S)&&typeof S!=\"boolean\")return!1;return!0;default:return!0}}let zu={type:\"boolean\",default:!1,transition:!1,\"property-type\":\"data-driven\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};bh(R)||(R=_f(R));let S=ks(R,zu);if(S.result===\"error\")throw new Error(S.value.map(F=>`${F.key}: ${F.message}`).join(\", \"));return{filter:(F,W,te)=>S.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,S){return R<S?-1:R>S?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]===\"within\"||R[0]===\"distance\")return!0;for(let S=1;S<R.length;S++)if(bd(R[S]))return!0;return!1}function _f(R){if(!R)return!0;let S=R[0];return R.length<=1?S!==\"any\":S===\"==\"?Lf(R[1],R[2],\"==\"):S===\"!=\"?jl(Lf(R[1],R[2],\"==\")):S===\"<\"||S===\">\"||S===\"<=\"||S===\">=\"?Lf(R[1],R[2],S):S===\"any\"?(F=R.slice(1),[\"any\"].concat(F.map(_f))):S===\"all\"?[\"all\"].concat(R.slice(1).map(_f)):S===\"none\"?[\"all\"].concat(R.slice(1).map(_f).map(jl)):S===\"in\"?Ou(R[1],R.slice(2)):S===\"!in\"?jl(Ou(R[1],R.slice(2))):S===\"has\"?xf(R[1]):S!==\"!has\"||jl(xf(R[1]));var F}function Lf(R,S,F){switch(R){case\"$type\":return[`filter-type-${F}`,S];case\"$id\":return[`filter-id-${F}`,S];default:return[`filter-${F}`,R,S]}}function Ou(R,S){if(S.length===0)return!1;switch(R){case\"$type\":return[\"filter-type-in\",[\"literal\",S]];case\"$id\":return[\"filter-id-in\",[\"literal\",S]];default:return S.length>200&&!S.some(F=>typeof F!=typeof S[0])?[\"filter-in-large\",R,[\"literal\",S.sort(wc)]]:[\"filter-in-small\",R,[\"literal\",S]]}}function xf(R){switch(R){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",R]}}function jl(R){return[\"!\",R]}function lf(R){let S=typeof R;if(S===\"number\"||S===\"boolean\"||S===\"string\"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te=\"[\";for(let fe of R)te+=`${lf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W=\"{\";for(let te=0;te<F.length;te++)W+=`${JSON.stringify(F[te])}:${lf(R[F[te]])},`;return`${W}}`}function Vh(R){let S=\"\";for(let F of Ze)S+=`/${lf(R[F])}`;return S}function Pf(R){let S=R.value;return S?[new ur(R.key,S,\"constants have been deprecated as of v8\")]:[]}function Ls(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function du(R){if(Array.isArray(R))return R.map(du);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){let S={};for(let F in R)S[F]=du(R[F]);return S}return Ls(R)}function Cu(R){let S=R.key,F=R.value,W=R.valueSpec||{},te=R.objectElementValidators||{},fe=R.style,pe=R.styleSpec,ze=R.validateSpec,Ke=[],ut=ms(F);if(ut!==\"object\")return[new ur(S,F,`object expected, ${ut} found`)];for(let Lt in F){let Qt=Lt.split(\".\")[0],fr=W[Qt]||W[\"*\"],mr;if(te[Qt])mr=te[Qt];else if(W[Qt])mr=ze;else if(te[\"*\"])mr=te[\"*\"];else{if(!W[\"*\"]){Ke.push(new ur(S,F[Lt],`unknown property \"${Lt}\"`));continue}mr=ze}Ke=Ke.concat(mr({key:(S&&`${S}.`)+Lt,value:F[Lt],valueSpec:fr,style:fe,styleSpec:pe,object:F,objectKey:Lt,validateSpec:ze},F))}for(let Lt in W)te[Lt]||W[Lt].required&&W[Lt].default===void 0&&F[Lt]===void 0&&Ke.push(new ur(S,F,`missing required property \"${Lt}\"`));return Ke}function Wf(R){let S=R.value,F=R.valueSpec,W=R.style,te=R.styleSpec,fe=R.key,pe=R.arrayElementValidator||R.validateSpec;if(ms(S)!==\"array\")return[new ur(fe,S,`array expected, ${ms(S)} found`)];if(F.length&&S.length!==F.length)return[new ur(fe,S,`array length ${F.length} expected, length ${S.length} found`)];if(F[\"min-length\"]&&S.length<F[\"min-length\"])return[new ur(fe,S,`array length at least ${F[\"min-length\"]} expected, length ${S.length} found`)];let ze={type:F.value,values:F.values};te.$version<7&&(ze.function=F.function),ms(F.value)===\"object\"&&(ze=F.value);let Ke=[];for(let ut=0;ut<S.length;ut++)Ke=Ke.concat(pe({array:S,arrayIndex:ut,value:S[ut],valueSpec:ze,validateSpec:R.validateSpec,style:W,styleSpec:te,key:`${fe}[${ut}]`}));return Ke}function Vs(R){let S=R.key,F=R.value,W=R.valueSpec,te=ms(F);return te===\"number\"&&F!=F&&(te=\"NaN\"),te!==\"number\"?[new ur(S,F,`number expected, ${te} found`)]:\"minimum\"in W&&F<W.minimum?[new ur(S,F,`${F} is less than the minimum value ${W.minimum}`)]:\"maximum\"in W&&F>W.maximum?[new ur(S,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function bf(R){let S=R.valueSpec,F=Ls(R.value.type),W,te,fe,pe={},ze=F!==\"categorical\"&&R.value.property===void 0,Ke=!ze,ut=ms(R.value.stops)===\"array\"&&ms(R.value.stops[0])===\"array\"&&ms(R.value.stops[0][0])===\"object\",Lt=Cu({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(mr){if(F===\"identity\")return[new ur(mr.key,mr.value,'identity function may not have a \"stops\" property')];let Lr=[],zr=mr.value;return Lr=Lr.concat(Wf({key:mr.key,value:zr,valueSpec:mr.valueSpec,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,arrayElementValidator:Qt})),ms(zr)===\"array\"&&zr.length===0&&Lr.push(new ur(mr.key,zr,\"array must have at least one stop\")),Lr},default:function(mr){return mr.validateSpec({key:mr.key,value:mr.value,valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec})}}});return F===\"identity\"&&ze&&Lt.push(new ur(R.key,R.value,'missing required property \"property\"')),F===\"identity\"||R.value.stops||Lt.push(new ur(R.key,R.value,'missing required property \"stops\"')),F===\"exponential\"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Lt.push(new ur(R.key,R.value,\"exponential functions not supported\")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Lt.push(new ur(R.key,R.value,\"property functions not supported\")):ze&&!Kc(R.valueSpec)&&Lt.push(new ur(R.key,R.value,\"zoom functions not supported\"))),F!==\"categorical\"&&!ut||R.value.property!==void 0||Lt.push(new ur(R.key,R.value,'\"property\" property is required')),Lt;function Qt(mr){let Lr=[],zr=mr.value,ui=mr.key;if(ms(zr)!==\"array\")return[new ur(ui,zr,`array expected, ${ms(zr)} found`)];if(zr.length!==2)return[new ur(ui,zr,`array length 2 expected, length ${zr.length} found`)];if(ut){if(ms(zr[0])!==\"object\")return[new ur(ui,zr,`object expected, ${ms(zr[0])} found`)];if(zr[0].zoom===void 0)return[new ur(ui,zr,\"object stop key must have zoom\")];if(zr[0].value===void 0)return[new ur(ui,zr,\"object stop key must have value\")];if(fe&&fe>Ls(zr[0].zoom))return[new ur(ui,zr[0].zoom,\"stop zoom values must appear in ascending order\")];Ls(zr[0].zoom)!==fe&&(fe=Ls(zr[0].zoom),te=void 0,pe={}),Lr=Lr.concat(Cu({key:`${ui}[0]`,value:zr[0],valueSpec:{zoom:{}},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,objectElementValidators:{zoom:Vs,value:fr}}))}else Lr=Lr.concat(fr({key:`${ui}[0]`,value:zr[0],valueSpec:{},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec},zr));return Dc(du(zr[1]))?Lr.concat([new ur(`${ui}[1]`,zr[1],\"expressions are not allowed in function stops.\")]):Lr.concat(mr.validateSpec({key:`${ui}[1]`,value:zr[1],valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec}))}function fr(mr,Lr){let zr=ms(mr.value),ui=Ls(mr.value),yi=mr.value!==null?mr.value:Lr;if(W){if(zr!==W)return[new ur(mr.key,yi,`${zr} stop domain type must match previous stop domain type ${W}`)]}else W=zr;if(zr!==\"number\"&&zr!==\"string\"&&zr!==\"boolean\")return[new ur(mr.key,yi,\"stop domain value must be a number, string, or boolean\")];if(zr!==\"number\"&&F!==\"categorical\"){let dn=`number expected, ${zr} found`;return Nl(S)&&F===void 0&&(dn+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new ur(mr.key,yi,dn)]}return F!==\"categorical\"||zr!==\"number\"||isFinite(ui)&&Math.floor(ui)===ui?F!==\"categorical\"&&zr===\"number\"&&te!==void 0&&ui<te?[new ur(mr.key,yi,\"stop domain values must appear in ascending order\")]:(te=ui,F===\"categorical\"&&ui in pe?[new ur(mr.key,yi,\"stop domain values must be unique\")]:(pe[ui]=!0,[])):[new ur(mr.key,yi,`integer expected, found ${ui}`)]}}function zc(R){let S=(R.expressionContext===\"property\"?_u:ks)(du(R.value),R.valueSpec);if(S.result===\"error\")return S.value.map(W=>new ur(`${R.key}${W.key}`,R.value,W.message));let F=S.value.expression||S.value._styleExpression.expression;if(R.expressionContext===\"property\"&&R.propertyKey===\"text-font\"&&!F.outputDefined())return[new ur(R.key,R.value,`Invalid data expression for \"${R.propertyKey}\". Output values must be contained as literals within the expression.`)];if(R.expressionContext===\"property\"&&R.propertyType===\"layout\"&&!ju(F))return[new ur(R.key,R.value,'\"feature-state\" data expressions are not supported with layout properties.')];if(R.expressionContext===\"filter\"&&!ju(F))return[new ur(R.key,R.value,'\"feature-state\" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf(\"cluster\")===0){if(!Hf(F,[\"zoom\",\"feature-state\"]))return[new ur(R.key,R.value,'\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];if(R.expressionContext===\"cluster-initial\"&&!th(F))return[new ur(R.key,R.value,\"Feature data expressions are not supported with initial expression part of cluster properties.\")]}return[]}function Wu(R){let S=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Ls(F))===-1&&te.push(new ur(S,F,`expected one of [${W.values.join(\", \")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Ls(F))===-1&&te.push(new ur(S,F,`expected one of [${Object.keys(W.values).join(\", \")}], ${JSON.stringify(F)} found`)),te}function If(R){return bh(du(R.value))?zc(Qe({},R,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):Xu(R)}function Xu(R){let S=R.value,F=R.key;if(ms(S)!==\"array\")return[new ur(F,S,`array expected, ${ms(S)} found`)];let W=R.styleSpec,te,fe=[];if(S.length<1)return[new ur(F,S,\"filter array must have at least 1 element\")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:S[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Ls(S[0])){case\"<\":case\"<=\":case\">\":case\">=\":S.length>=2&&Ls(S[1])===\"$type\"&&fe.push(new ur(F,S,`\"$type\" cannot be use with operator \"${S[0]}\"`));case\"==\":case\"!=\":S.length!==3&&fe.push(new ur(F,S,`filter array for operator \"${S[0]}\" must have 3 elements`));case\"in\":case\"!in\":S.length>=2&&(te=ms(S[1]),te!==\"string\"&&fe.push(new ur(`${F}[1]`,S[1],`string expected, ${te} found`)));for(let pe=2;pe<S.length;pe++)te=ms(S[pe]),Ls(S[1])===\"$type\"?fe=fe.concat(Wu({key:`${F}[${pe}]`,value:S[pe],valueSpec:W.geometry_type,style:R.style,styleSpec:R.styleSpec})):te!==\"string\"&&te!==\"number\"&&te!==\"boolean\"&&fe.push(new ur(`${F}[${pe}]`,S[pe],`string, number, or boolean expected, ${te} found`));break;case\"any\":case\"all\":case\"none\":for(let pe=1;pe<S.length;pe++)fe=fe.concat(Xu({key:`${F}[${pe}]`,value:S[pe],style:R.style,styleSpec:R.styleSpec}));break;case\"has\":case\"!has\":te=ms(S[1]),S.length!==2?fe.push(new ur(F,S,`filter array for \"${S[0]}\" operator must have 2 elements`)):te!==\"string\"&&fe.push(new ur(`${F}[1]`,S[1],`string expected, ${te} found`))}return fe}function uf(R,S){let F=R.key,W=R.validateSpec,te=R.style,fe=R.styleSpec,pe=R.value,ze=R.objectKey,Ke=fe[`${S}_${R.layerType}`];if(!Ke)return[];let ut=ze.match(/^(.*)-transition$/);if(S===\"paint\"&&ut&&Ke[ut[1]]&&Ke[ut[1]].transition)return W({key:F,value:pe,valueSpec:fe.transition,style:te,styleSpec:fe});let Lt=R.valueSpec||Ke[ze];if(!Lt)return[new ur(F,pe,`unknown property \"${ze}\"`)];let Qt;if(ms(pe)===\"string\"&&Nl(Lt)&&!Lt.tokens&&(Qt=/^{([^}]+)}$/.exec(pe)))return[new ur(F,pe,`\"${ze}\" does not support interpolation syntax\n",
       "Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(Qt[1])} }\\`.`)];let fr=[];return R.layerType===\"symbol\"&&(ze===\"text-field\"&&te&&!te.glyphs&&fr.push(new ur(F,pe,'use of \"text-field\" requires a style \"glyphs\" property')),ze===\"text-font\"&&jf(du(pe))&&Ls(pe.type)===\"identity\"&&fr.push(new ur(F,pe,'\"text-font\" does not support identity functions'))),fr.concat(W({key:R.key,value:pe,valueSpec:Lt,style:te,styleSpec:fe,expressionContext:\"property\",propertyType:S,propertyKey:ze}))}function Xf(R){return uf(R,\"paint\")}function Wl(R){return uf(R,\"layout\")}function ah(R){let S=[],F=R.value,W=R.key,te=R.style,fe=R.styleSpec;F.type||F.ref||S.push(new ur(W,F,'either \"type\" or \"ref\" is required'));let pe=Ls(F.type),ze=Ls(F.ref);if(F.id){let Ke=Ls(F.id);for(let ut=0;ut<R.arrayIndex;ut++){let Lt=te.layers[ut];Ls(Lt.id)===Ke&&S.push(new ur(W,F.id,`duplicate layer id \"${F.id}\", previously used at line ${Lt.id.__line__}`))}}if(\"ref\"in F){let Ke;[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(ut=>{ut in F&&S.push(new ur(W,F[ut],`\"${ut}\" is prohibited for ref layers`))}),te.layers.forEach(ut=>{Ls(ut.id)===ze&&(Ke=ut)}),Ke?Ke.ref?S.push(new ur(W,F.ref,\"ref cannot reference another ref layer\")):pe=Ls(Ke.type):S.push(new ur(W,F.ref,`ref layer \"${ze}\" not found`))}else if(pe!==\"background\")if(F.source){let Ke=te.sources&&te.sources[F.source],ut=Ke&&Ls(Ke.type);Ke?ut===\"vector\"&&pe===\"raster\"?S.push(new ur(W,F.source,`layer \"${F.id}\" requires a raster source`)):ut!==\"raster-dem\"&&pe===\"hillshade\"?S.push(new ur(W,F.source,`layer \"${F.id}\" requires a raster-dem source`)):ut===\"raster\"&&pe!==\"raster\"?S.push(new ur(W,F.source,`layer \"${F.id}\" requires a vector source`)):ut!==\"vector\"||F[\"source-layer\"]?ut===\"raster-dem\"&&pe!==\"hillshade\"?S.push(new ur(W,F.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):pe!==\"line\"||!F.paint||!F.paint[\"line-gradient\"]||ut===\"geojson\"&&Ke.lineMetrics||S.push(new ur(W,F,`layer \"${F.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):S.push(new ur(W,F,`layer \"${F.id}\" must specify a \"source-layer\"`)):S.push(new ur(W,F.source,`source \"${F.source}\" not found`))}else S.push(new ur(W,F,'missing required property \"source\"'));return S=S.concat(Cu({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{\"*\":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:\"type\"}),filter:If,layout:Ke=>Cu({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{\"*\":ut=>Wl(Qe({layerType:pe},ut))}}),paint:Ke=>Cu({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{\"*\":ut=>Xf(Qe({layerType:pe},ut))}})}})),S}function Zu(R){let S=R.value,F=R.key,W=ms(S);return W!==\"string\"?[new ur(F,S,`string expected, ${W} found`)]:[]}let Oc={promoteId:function({key:R,value:S}){if(ms(S)===\"string\")return Zu({key:R,value:S});{let F=[];for(let W in S)F.push(...Zu({key:`${R}.${W}`,value:S[W]}));return F}}};function Tc(R){let S=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!S.type)return[new ur(F,S,'\"type\" is required')];let pe=Ls(S.type),ze;switch(pe){case\"vector\":case\"raster\":return ze=Cu({key:F,value:S,valueSpec:W[`source_${pe.replace(\"-\",\"_\")}`],style:R.style,styleSpec:W,objectElementValidators:Oc,validateSpec:fe}),ze;case\"raster-dem\":return ze=function(Ke){var ut;let Lt=(ut=Ke.sourceName)!==null&&ut!==void 0?ut:\"\",Qt=Ke.value,fr=Ke.styleSpec,mr=fr.source_raster_dem,Lr=Ke.style,zr=[],ui=ms(Qt);if(Qt===void 0)return zr;if(ui!==\"object\")return zr.push(new ur(\"source_raster_dem\",Qt,`object expected, ${ui} found`)),zr;let yi=Ls(Qt.encoding)===\"custom\",dn=[\"redFactor\",\"greenFactor\",\"blueFactor\",\"baseShift\"],Fi=Ke.value.encoding?`\"${Ke.value.encoding}\"`:\"Default\";for(let ln in Qt)!yi&&dn.includes(ln)?zr.push(new ur(ln,Qt[ln],`In \"${Lt}\": \"${ln}\" is only valid when \"encoding\" is set to \"custom\". ${Fi} encoding found`)):mr[ln]?zr=zr.concat(Ke.validateSpec({key:ln,value:Qt[ln],valueSpec:mr[ln],validateSpec:Ke.validateSpec,style:Lr,styleSpec:fr})):zr.push(new ur(ln,Qt[ln],`unknown property \"${ln}\"`));return zr}({sourceName:F,value:S,style:R.style,styleSpec:W,validateSpec:fe}),ze;case\"geojson\":if(ze=Cu({key:F,value:S,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:Oc}),S.cluster)for(let Ke in S.clusterProperties){let[ut,Lt]=S.clusterProperties[Ke],Qt=typeof ut==\"string\"?[ut,[\"accumulated\"],[\"get\",Ke]]:ut;ze.push(...zc({key:`${F}.${Ke}.map`,value:Lt,validateSpec:fe,expressionContext:\"cluster-map\"})),ze.push(...zc({key:`${F}.${Ke}.reduce`,value:Qt,validateSpec:fe,expressionContext:\"cluster-reduce\"}))}return ze;case\"video\":return Cu({key:F,value:S,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case\"image\":return Cu({key:F,value:S,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case\"canvas\":return[new ur(F,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")];default:return Wu({key:`${F}.type`,value:S.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:te,validateSpec:fe,styleSpec:W})}}function Tl(R){let S=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=ms(S);if(S===void 0)return fe;if(pe!==\"object\")return fe=fe.concat([new ur(\"light\",S,`object expected, ${pe} found`)]),fe;for(let ze in S){let Ke=ze.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:ze,value:S[ze],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[ze]?R.validateSpec({key:ze,value:S[ze],valueSpec:W[ze],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new ur(ze,S[ze],`unknown property \"${ze}\"`)])}return fe}function vu(R){let S=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=ms(S);if(S===void 0)return[];if(fe!==\"object\")return[new ur(\"sky\",S,`object expected, ${fe} found`)];let pe=[];for(let ze in S)pe=pe.concat(W[ze]?R.validateSpec({key:ze,value:S[ze],valueSpec:W[ze],style:te,styleSpec:F}):[new ur(ze,S[ze],`unknown property \"${ze}\"`)]);return pe}function qc(R){let S=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=ms(S);if(S===void 0)return fe;if(pe!==\"object\")return fe=fe.concat([new ur(\"terrain\",S,`object expected, ${pe} found`)]),fe;for(let ze in S)fe=fe.concat(W[ze]?R.validateSpec({key:ze,value:S[ze],valueSpec:W[ze],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new ur(ze,S[ze],`unknown property \"${ze}\"`)]);return fe}function cf(R){let S=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&S.push(new ur(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&S.push(new ur(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),S=S.concat(Cu({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:\"string\",required:!0},url:{type:\"string\",required:!0}},validateSpec:R.validateSpec}));return S}return Zu({key:W,value:F})}let fc={\"*\":()=>[],array:Wf,boolean:function(R){let S=R.value,F=R.key,W=ms(S);return W!==\"boolean\"?[new ur(F,S,`boolean expected, ${W} found`)]:[]},number:Vs,color:function(R){let S=R.key,F=R.value,W=ms(F);return W!==\"string\"?[new ur(S,F,`color expected, ${W} found`)]:ar.parse(String(F))?[]:[new ur(S,F,`color expected, \"${F}\" found`)]},constants:Pf,enum:Wu,filter:If,function:bf,layer:ah,object:Cu,source:Tc,light:Tl,sky:vu,terrain:qc,projection:function(R){let S=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=ms(S);if(S===void 0)return[];if(fe!==\"object\")return[new ur(\"projection\",S,`object expected, ${fe} found`)];let pe=[];for(let ze in S)pe=pe.concat(W[ze]?R.validateSpec({key:ze,value:S[ze],valueSpec:W[ze],style:te,styleSpec:F}):[new ur(ze,S[ze],`unknown property \"${ze}\"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let S=R.key,F=R.value;if(ms(F)===\"array\"){if(F.length<1||F.length>4)return[new ur(S,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:\"number\"},te=[];for(let fe=0;fe<F.length;fe++)te=te.concat(R.validateSpec({key:`${S}[${fe}]`,value:F[fe],validateSpec:R.validateSpec,valueSpec:W}));return te}return Vs({key:S,value:F,valueSpec:{}})},variableAnchorOffsetCollection:function(R){let S=R.key,F=R.value,W=ms(F),te=R.styleSpec;if(W!==\"array\"||F.length<1||F.length%2!=0)return[new ur(S,F,\"variableAnchorOffsetCollection requires a non-empty array of even length\")];let fe=[];for(let pe=0;pe<F.length;pe+=2)fe=fe.concat(Wu({key:`${S}[${pe}]`,value:F[pe],valueSpec:te.layout_symbol[\"text-anchor\"]})),fe=fe.concat(Wf({key:`${S}[${pe+1}]`,value:F[pe+1],valueSpec:{length:2,value:\"number\"},validateSpec:R.validateSpec,style:R.style,styleSpec:te}));return fe},sprite:cf};function Bc(R){let S=R.value,F=R.valueSpec,W=R.styleSpec;return R.validateSpec=Bc,F.expression&&jf(Ls(S))?bf(R):F.expression&&Dc(du(S))?zc(R):F.type&&fc[F.type]?fc[F.type](R):Cu(Qe({},R,{valueSpec:F.type?W[F.type]:F}))}function At(R){let S=R.value,F=R.key,W=Zu(R);return W.length||(S.indexOf(\"{fontstack}\")===-1&&W.push(new ur(F,S,'\"glyphs\" url must include a \"{fontstack}\" token')),S.indexOf(\"{range}\")===-1&&W.push(new ur(F,S,'\"glyphs\" url must include a \"{range}\" token'))),W}function Xt(R,S=ce){let F=[];return F=F.concat(Bc({key:\"\",value:R,valueSpec:S.$root,styleSpec:S,style:R,validateSpec:Bc,objectElementValidators:{glyphs:At,\"*\":()=>[]}})),R.constants&&(F=F.concat(Pf({key:\"constants\",value:R.constants,style:R,styleSpec:S,validateSpec:Bc}))),Ar(F)}function kr(R){return function(S){return R(lee(see({},S),{validateSpec:Bc}))}}function Ar(R){return[].concat(R).sort((S,F)=>S.line-F.line)}function Kr(R){return function(...S){return Ar(R.apply(this,S))}}Xt.source=Kr(kr(Tc)),Xt.sprite=Kr(kr(cf)),Xt.glyphs=Kr(kr(At)),Xt.light=Kr(kr(Tl)),Xt.sky=Kr(kr(vu)),Xt.terrain=Kr(kr(qc)),Xt.layer=Kr(kr(ah)),Xt.filter=Kr(kr(If)),Xt.paintProperty=Kr(kr(Xf)),Xt.layoutProperty=Kr(kr(Wl));let Ei=Xt,Wi=Ei.light,hn=Ei.sky,Tn=Ei.paintProperty,Bn=Ei.layoutProperty;function Zi(R,S){let F=!1;if(S&&S.length)for(let W of S)R.fire(new ge(new Error(W.message))),F=!0;return F}class $i{constructor(S,F,W){let te=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let pe=new Int32Array(this.arrayBuffer);S=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke<this.d*this.d;Ke++){let ut=pe[3+Ke],Lt=pe[3+Ke+1];te.push(ut===Lt?null:pe.subarray(ut,Lt))}let ze=pe[3+te.length+1];this.keys=pe.subarray(pe[3+te.length],ze),this.bboxes=pe.subarray(ze),this.insert=this._insertReadonly}else{this.d=F+2*W;for(let pe=0;pe<this.d*this.d;pe++)te.push([]);this.keys=[],this.bboxes=[]}this.n=F,this.extent=S,this.padding=W,this.scale=F/S,this.uid=0;let fe=W/F*S;this.min=-fe,this.max=S+fe}insert(S,F,W,te,fe){this._forEachCell(F,W,te,fe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(S),this.bboxes.push(F),this.bboxes.push(W),this.bboxes.push(te),this.bboxes.push(fe)}_insertReadonly(){throw new Error(\"Cannot insert into a GridIndex created from an ArrayBuffer.\")}_insertCell(S,F,W,te,fe,pe){this.cells[fe].push(pe)}query(S,F,W,te,fe){let pe=this.min,ze=this.max;if(S<=pe&&F<=pe&&ze<=W&&ze<=te&&!fe)return Array.prototype.slice.call(this.keys);{let Ke=[];return this._forEachCell(S,F,W,te,this._queryCell,Ke,{},fe),Ke}}_queryCell(S,F,W,te,fe,pe,ze,Ke){let ut=this.cells[fe];if(ut!==null){let Lt=this.keys,Qt=this.bboxes;for(let fr=0;fr<ut.length;fr++){let mr=ut[fr];if(ze[mr]===void 0){let Lr=4*mr;(Ke?Ke(Qt[Lr+0],Qt[Lr+1],Qt[Lr+2],Qt[Lr+3]):S<=Qt[Lr+2]&&F<=Qt[Lr+3]&&W>=Qt[Lr+0]&&te>=Qt[Lr+1])?(ze[mr]=!0,pe.push(Lt[mr])):ze[mr]=!1}}}}_forEachCell(S,F,W,te,fe,pe,ze,Ke){let ut=this._convertToCellCoord(S),Lt=this._convertToCellCoord(F),Qt=this._convertToCellCoord(W),fr=this._convertToCellCoord(te);for(let mr=ut;mr<=Qt;mr++)for(let Lr=Lt;Lr<=fr;Lr++){let zr=this.d*Lr+mr;if((!Ke||Ke(this._convertFromCellCoord(mr),this._convertFromCellCoord(Lr),this._convertFromCellCoord(mr+1),this._convertFromCellCoord(Lr+1)))&&fe.call(this,S,F,W,te,zr,pe,ze,Ke))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe<this.cells.length;pe++)W+=this.cells[pe].length;let te=new Int32Array(F+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let fe=F;for(let pe=0;pe<S.length;pe++){let ze=S[pe];te[3+pe]=fe,te.set(ze,fe),fe+=ze.length}return te[3+S.length]=fe,te.set(this.keys,fe),fe+=this.keys.length,te[3+S.length+1]=fe,te.set(this.bboxes,fe),fe+=this.bboxes.length,te.buffer}static serialize(S,F){let W=S.toArrayBuffer();return F&&F.push(W),{buffer:W}}static deserialize(S){return new $i(S.buffer)}}let an={};function Di(R,S,F={}){if(an[R])throw new Error(`${R} is already registered.`);Object.defineProperty(S,\"_classRegistryKey\",{value:R,writeable:!1}),an[R]={klass:S,omit:F.omit||[],shallow:F.shallow||[]}}Di(\"Object\",Object),Di(\"TransferableGridIndex\",$i),Di(\"Color\",ar),Di(\"Error\",Error),Di(\"AJAXError\",me),Di(\"ResolvedImage\",en),Di(\"StylePropertyFunction\",al),Di(\"StyleExpression\",Eu,{omit:[\"_evaluator\"]}),Di(\"ZoomDependentExpression\",hu),Di(\"ZoomConstantExpression\",bc),Di(\"CompoundExpression\",Bl,{omit:[\"_evaluate\"]});for(let R in mf)mf[R]._classRegistryKey||Di(`Expression_${R}`,mf[R]);function $n(R){return R&&typeof ArrayBuffer!=\"undefined\"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name===\"ArrayBuffer\")}function ka(R){return R.$name||R.constructor._classRegistryKey}function Ra(R){return!function(S){if(S===null||typeof S!=\"object\")return!1;let F=ka(S);return!(!F||F===\"Object\")}(R)&&(R==null||typeof R==\"boolean\"||typeof R==\"number\"||typeof R==\"string\"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||R instanceof Blob||R instanceof Error||$n(R)||G(R)||ArrayBuffer.isView(R)||R instanceof ImageData)}function La(R,S){if(Ra(R))return($n(R)||G(R))&&S&&S.push(R),ArrayBuffer.isView(R)&&S&&S.push(R.buffer),R instanceof ImageData&&S&&S.push(R.data.buffer),R;if(Array.isArray(R)){let fe=[];for(let pe of R)fe.push(La(pe,S));return fe}if(typeof R!=\"object\")throw new Error(\"can't serialize object of type \"+typeof R);let F=ka(R);if(!F)throw new Error(`can't serialize object of unregistered class ${R.constructor.name}`);if(!an[F])throw new Error(`${F} is not registered.`);let{klass:W}=an[F],te=W.serialize?W.serialize(R,S):{};if(W.serialize){if(S&&te===S[S.length-1])throw new Error(\"statically serialized object won't survive transfer of $name property\")}else{for(let fe in R){if(!R.hasOwnProperty(fe)||an[F].omit.indexOf(fe)>=0)continue;let pe=R[fe];te[fe]=an[F].shallow.indexOf(fe)>=0?pe:La(pe,S)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return F!==\"Object\"&&(te.$name=F),te}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!=\"object\")throw new Error(\"can't deserialize object of type \"+typeof R);let S=ka(R)||\"Object\";if(!an[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:F}=an[S];if(!F)throw new Error(`can't deserialize unregistered class ${S}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te===\"$name\")continue;let fe=R[te];W[te]=an[S].shallow.indexOf(te)>=0?fe:Na(fe)}return W}class Yn{constructor(){this.first=!0}update(S,F){let W=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoom<W&&(this.lastIntegerZoom=W,this.lastIntegerZoomTime=F),S!==this.lastZoom&&(this.lastZoom=S,this.lastFloorZoom=W,!0))}}let zn={\"Latin-1 Supplement\":R=>R>=128&&R<=255,\"Hangul Jamo\":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,\"General Punctuation\":R=>R>=8192&&R<=8303,\"Letterlike Symbols\":R=>R>=8448&&R<=8527,\"Number Forms\":R=>R>=8528&&R<=8591,\"Miscellaneous Technical\":R=>R>=8960&&R<=9215,\"Control Pictures\":R=>R>=9216&&R<=9279,\"Optical Character Recognition\":R=>R>=9280&&R<=9311,\"Enclosed Alphanumerics\":R=>R>=9312&&R<=9471,\"Geometric Shapes\":R=>R>=9632&&R<=9727,\"Miscellaneous Symbols\":R=>R>=9728&&R<=9983,\"Miscellaneous Symbols and Arrows\":R=>R>=11008&&R<=11263,\"Ideographic Description Characters\":R=>R>=12272&&R<=12287,\"CJK Symbols and Punctuation\":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,\"CJK Strokes\":R=>R>=12736&&R<=12783,\"Enclosed CJK Letters and Months\":R=>R>=12800&&R<=13055,\"CJK Compatibility\":R=>R>=13056&&R<=13311,\"Yijing Hexagram Symbols\":R=>R>=19904&&R<=19967,\"Private Use Area\":R=>R>=57344&&R<=63743,\"Vertical Forms\":R=>R>=65040&&R<=65055,\"CJK Compatibility Forms\":R=>R>=65072&&R<=65103,\"Small Form Variants\":R=>R>=65104&&R<=65135,\"Halfwidth and Fullwidth Forms\":R=>R>=65280&&R<=65519};function Ka(R){for(let S of R)if(Ho(S.charCodeAt(0)))return!0;return!1}function bo(R){for(let S of R)if(!os(S.charCodeAt(0)))return!1;return!0}function Xo(R){let S=R.map(F=>{try{return new RegExp(`\\\\p{sc=${F}}`,\"u\").source}catch(W){return null}}).filter(F=>F);return new RegExp(S.join(\"|\"),\"u\")}let Ms=Xo([\"Arab\",\"Dupl\",\"Mong\",\"Ougr\",\"Syrc\"]);function os(R){return!Ms.test(String.fromCodePoint(R))}let Ts=Xo([\"Bopo\",\"Hani\",\"Hira\",\"Kana\",\"Kits\",\"Nshu\",\"Tang\",\"Yiii\"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(zn[\"CJK Compatibility Forms\"](R)&&!(R>=65097&&R<=65103)||zn[\"CJK Compatibility\"](R)||zn[\"CJK Strokes\"](R)||!(!zn[\"CJK Symbols and Punctuation\"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||zn[\"Enclosed CJK Letters and Months\"](R)||zn[\"Ideographic Description Characters\"](R)||zn.Kanbun(R)||zn.Katakana(R)&&R!==12540||!(!zn[\"Halfwidth and Fullwidth Forms\"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!zn[\"Small Form Variants\"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||zn[\"Vertical Forms\"](R)||zn[\"Yijing Hexagram Symbols\"](R)||new RegExp(\"\\\\p{sc=Cans}\",\"u\").test(String.fromCodePoint(R))||new RegExp(\"\\\\p{sc=Hang}\",\"u\").test(String.fromCodePoint(R))||Ts.test(String.fromCodePoint(R)))))}function yl(R){return!(Ho(R)||function(S){return!!(zn[\"Latin-1 Supplement\"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||zn[\"General Punctuation\"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||zn[\"Letterlike Symbols\"](S)||zn[\"Number Forms\"](S)||zn[\"Miscellaneous Technical\"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||zn[\"Control Pictures\"](S)&&S!==9251||zn[\"Optical Character Recognition\"](S)||zn[\"Enclosed Alphanumerics\"](S)||zn[\"Geometric Shapes\"](S)||zn[\"Miscellaneous Symbols\"](S)&&!(S>=9754&&S<=9759)||zn[\"Miscellaneous Symbols and Arrows\"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||zn[\"CJK Symbols and Punctuation\"](S)||zn.Katakana(S)||zn[\"Private Use Area\"](S)||zn[\"CJK Compatibility Forms\"](S)||zn[\"Small Form Variants\"](S)||zn[\"Halfwidth and Fullwidth Forms\"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(R))}let Xs=Xo([\"Adlm\",\"Arab\",\"Armi\",\"Avst\",\"Chrs\",\"Cprt\",\"Egyp\",\"Elym\",\"Gara\",\"Hatr\",\"Hebr\",\"Hung\",\"Khar\",\"Lydi\",\"Mand\",\"Mani\",\"Mend\",\"Merc\",\"Mero\",\"Narb\",\"Nbat\",\"Nkoo\",\"Orkh\",\"Palm\",\"Phli\",\"Phlp\",\"Phnx\",\"Prti\",\"Rohg\",\"Samr\",\"Sarb\",\"Sogo\",\"Syrc\",\"Thaa\",\"Todr\",\"Yezi\"]);function Ps(R){return Xs.test(String.fromCodePoint(R))}function va(R,S){return!(!S&&Ps(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||zn.Khmer(R))}function no(R){for(let S of R)if(Ps(S.charCodeAt(0)))return!0;return!1}let _s=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus=\"unavailable\",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class is{constructor(S,F){this.zoom=S,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yn,this.transition={})}isSupportedScript(S){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(S,_s.getRTLTextPluginStatus()===\"loaded\")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,F=S-Math.floor(S),W=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class $l{constructor(S,F){this.property=S,this.value=F,this.expression=function(W,te){if(jf(W))return new al(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result===\"error\")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(\", \"));return fe.value}{let fe=W;return te.type===\"color\"&&typeof W==\"string\"?fe=ar.parse(W):te.type!==\"padding\"||typeof W!=\"number\"&&!Array.isArray(W)?te.type===\"variableAnchorOffsetCollection\"&&Array.isArray(W)&&(fe=Ji.parse(W)):fe=$r.parse(W),{kind:\"constant\",evaluate:()=>fe}}}(F===void 0?S.specification.default:F,S.specification)}isDataDriven(){return this.expression.kind===\"source\"||this.expression.kind===\"composite\"}possiblyEvaluate(S,F,W){return this.property.possiblyEvaluate(this,S,F,W)}}class ku{constructor(S){this.property=S,this.value=new $l(S,void 0)}transitioned(S,F){return new Nc(this.property,this.value,F,L({},S.transition,this.transition),S.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return g(this._values[S].value.value)}setValue(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new ku(this._values[S].property)),this._values[S].value=new $l(this._values[S].property,F===null?void 0:g(F))}getTransition(S){return g(this._values[S].transition)}setTransition(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new ku(this._values[S].property)),this._values[S].transition=g(F)||void 0}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W);let te=this.getTransition(F);te!==void 0&&(S[`${F}-transition`]=te)}return S}transitioned(S,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(S,F._values[te]);return W}untransitioned(){let S=new pu(this._properties);for(let F of Object.keys(this._values))S._values[F]=this._values[F].untransitioned();return S}}class Nc{constructor(S,F,W,te,fe){this.property=S,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,S.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(S,F,W){let te=S.now||0,fe=this.value.possiblyEvaluate(S,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te<this.begin)return pe.possiblyEvaluate(S,F,W);{let ze=(te-this.begin)/(this.end-this.begin);return this.property.interpolate(pe.possiblyEvaluate(S,F,W),fe,function(Ke){if(Ke<=0)return 0;if(Ke>=1)return 1;let ut=Ke*Ke,Lt=ut*Ke;return 4*(Ke<.5?Lt:3*(Ke-ut)+Lt-.75)}(ze))}}return fe}}class pu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class Uc{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return g(this._values[S].value)}setValue(S,F){this._values[S]=new $l(this._values[S].property,F===null?void 0:g(F))}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W)}return S}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}}class xu{constructor(S,F,W){this.property=S,this.value=F,this.parameters=W}isConstant(){return this.value.kind===\"constant\"}constantOr(S){return this.value.kind===\"constant\"?this.value.value:S}evaluate(S,F,W,te){return this.property.evaluate(this.value,this.parameters,S,F,W,te)}}class Ac{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Ua{constructor(S){this.specification=S}possiblyEvaluate(S,F){if(S.isDataDriven())throw new Error(\"Value should not be data driven\");return S.expression.evaluate(F)}interpolate(S,F,W){let te=Lo[this.specification.type];return te?te(S,F,W):S}}class oo{constructor(S,F){this.specification=S,this.overrides=F}possiblyEvaluate(S,F,W,te){return new xu(this,S.expression.kind===\"constant\"||S.expression.kind===\"camera\"?{kind:\"constant\",value:S.expression.evaluate(F,null,{},W,te)}:S.expression,F)}interpolate(S,F,W){if(S.value.kind!==\"constant\"||F.value.kind!==\"constant\")return S;if(S.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:\"constant\",value:void 0},S.parameters);let te=Lo[this.specification.type];if(te){let fe=te(S.value.value,F.value.value,W);return new xu(this,{kind:\"constant\",value:fe},S.parameters)}return S}evaluate(S,F,W,te,fe,pe){return S.kind===\"constant\"?S.value:S.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(S,F,W,te){if(S.value===void 0)return new xu(this,{kind:\"constant\",value:void 0},F);if(S.expression.kind===\"constant\"){let fe=S.expression.evaluate(F,null,{},W,te),pe=S.property.specification.type===\"resolvedImage\"&&typeof fe!=\"string\"?fe.name:fe,ze=this._calculate(pe,pe,pe,F);return new xu(this,{kind:\"constant\",value:ze},F)}if(S.expression.kind===\"camera\"){let fe=this._calculate(S.expression.evaluate({zoom:F.zoom-1}),S.expression.evaluate({zoom:F.zoom}),S.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:\"constant\",value:fe},F)}return new xu(this,S.expression,F)}evaluate(S,F,W,te,fe,pe){if(S.kind===\"source\"){let ze=S.evaluate(F,W,te,fe,pe);return this._calculate(ze,ze,ze,F)}return S.kind===\"composite\"?this._calculate(S.evaluate({zoom:Math.floor(F.zoom)-1},W,te),S.evaluate({zoom:Math.floor(F.zoom)},W,te),S.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):S.value}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class hc{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){if(S.value!==void 0){if(S.expression.kind===\"constant\"){let fe=S.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(S.expression.evaluate(new is(Math.floor(F.zoom-1),F)),S.expression.evaluate(new is(Math.floor(F.zoom),F)),S.expression.evaluate(new is(Math.floor(F.zoom+1),F)),F)}}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class Ku{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){return!!S.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in S){let W=S[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new $l(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new ku(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Di(\"DataDrivenProperty\",oo),Di(\"DataConstantProperty\",Ua),Di(\"CrossFadedDataDrivenProperty\",Vc),Di(\"CrossFadedProperty\",hc),Di(\"ColorRampProperty\",Ku);let w=\"-transition\";class B extends Fe{constructor(S,F){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!==\"custom\"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!==\"background\"&&(this.source=S.source,this.sourceLayer=S[\"source-layer\"],this.filter=S.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in S.paint)this.setPaintProperty(W,S.paint[W],{validate:!1});for(let W in S.layout)this.setLayoutProperty(W,S.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S===\"visibility\"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,F,W={}){F!=null&&this._validate(Bn,`layers.${this.id}.layout.${S}`,S,F,W)||(S!==\"visibility\"?this._unevaluatedLayout.setValue(S,F):this.visibility=F)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,F,W={}){if(F!=null&&this._validate(Tn,`layers.${this.id}.paint.${S}`,S,F,W))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[S],fe=te.property.specification[\"property-type\"]===\"cross-faded-data-driven\",pe=te.value.isDataDriven(),ze=te.value;this._transitionablePaint.setValue(S,F),this._handleSpecialPaintPropertyUpdate(S);let Ke=this._transitionablePaint._values[S].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(S,ze,Ke)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,F,W){return!1}isHidden(S){return!!(this.minzoom&&S<this.minzoom)||!!(this.maxzoom&&S>=this.maxzoom)||this.visibility===\"none\"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,F){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,F)}serialize(){let S={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(F,W)=>!(F===void 0||W===\"layout\"&&!Object.keys(F).length||W===\"paint\"&&!Object.keys(F).length))}_validate(S,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Zi(this,S.call(Ei,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let F=this.paint.get(S);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind===\"source\"||F.value.kind===\"composite\")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(S,F){this._structArray=S,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(S,F){return S._trim(),F&&(S.isTransferred=!0,F.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let F=Object.create(this.prototype);return F.arrayBuffer=S.arrayBuffer,F.length=S.length,F.capacity=S.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")}}function qe(R,S=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Xe(F,Math.max(S,fe)),ze=te.components||1;return W=Math.max(W,fe),F+=fe*ze,{name:te.name,type:te.type,components:ze,offset:pe}}),size:Xe(F,Math.max(W,S)),alignment:S}}function Xe(R,S){return Math.ceil(R/S)*S}class ot extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.int16[te+0]=F,this.int16[te+1]=W,S}}ot.prototype.bytesPerElement=4,Di(\"StructArrayLayout2i4\",ot);class Tt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,S}}Tt.prototype.bytesPerElement=6,Di(\"StructArrayLayout3i6\",Tt);class Kt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,S}}Kt.prototype.bytesPerElement=8,Di(\"StructArrayLayout4i8\",Kt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,ze){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=ze,S}}Jt.prototype.bytesPerElement=12,Di(\"StructArrayLayout2i4i12\",Jt);class xr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,ze){let Ke=4*S,ut=8*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ut+4]=te,this.uint8[ut+5]=fe,this.uint8[ut+6]=pe,this.uint8[ut+7]=ze,S}}xr.prototype.bytesPerElement=8,Di(\"StructArrayLayout2i4ub8\",xr);class Pr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.float32[te+0]=F,this.float32[te+1]=W,S}}Pr.prototype.bytesPerElement=8,Di(\"StructArrayLayout2f8\",Pr);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,ze,Ke,ut,Lt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,S,F,W,te,fe,pe,ze,Ke,ut,Lt)}emplace(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt){let fr=10*S;return this.uint16[fr+0]=F,this.uint16[fr+1]=W,this.uint16[fr+2]=te,this.uint16[fr+3]=fe,this.uint16[fr+4]=pe,this.uint16[fr+5]=ze,this.uint16[fr+6]=Ke,this.uint16[fr+7]=ut,this.uint16[fr+8]=Lt,this.uint16[fr+9]=Qt,S}}ve.prototype.bytesPerElement=20,Di(\"StructArrayLayout10ui20\",ve);class be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr){let mr=this.length;return this.resize(mr+1),this.emplace(mr,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr)}emplace(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr){let Lr=12*S;return this.int16[Lr+0]=F,this.int16[Lr+1]=W,this.int16[Lr+2]=te,this.int16[Lr+3]=fe,this.uint16[Lr+4]=pe,this.uint16[Lr+5]=ze,this.uint16[Lr+6]=Ke,this.uint16[Lr+7]=ut,this.int16[Lr+8]=Lt,this.int16[Lr+9]=Qt,this.int16[Lr+10]=fr,this.int16[Lr+11]=mr,S}}be.prototype.bytesPerElement=24,Di(\"StructArrayLayout4i4ui4i24\",be);class Re extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Re.prototype.bytesPerElement=12,Di(\"StructArrayLayout3f12\",Re);class Be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint32[1*S+0]=F,S}}Be.prototype.bytesPerElement=4,Di(\"StructArrayLayout1ul4\",Be);class tt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,ze,Ke,ut){let Lt=this.length;return this.resize(Lt+1),this.emplace(Lt,S,F,W,te,fe,pe,ze,Ke,ut)}emplace(S,F,W,te,fe,pe,ze,Ke,ut,Lt){let Qt=10*S,fr=5*S;return this.int16[Qt+0]=F,this.int16[Qt+1]=W,this.int16[Qt+2]=te,this.int16[Qt+3]=fe,this.int16[Qt+4]=pe,this.int16[Qt+5]=ze,this.uint32[fr+3]=Ke,this.uint16[Qt+8]=ut,this.uint16[Qt+9]=Lt,S}}tt.prototype.bytesPerElement=20,Di(\"StructArrayLayout6i1ul2ui20\",tt);class We extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,ze){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=ze,S}}We.prototype.bytesPerElement=12,Di(\"StructArrayLayout2i2i2i12\",We);class it extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,F,W,te,fe)}emplace(S,F,W,te,fe,pe){let ze=4*S,Ke=8*S;return this.float32[ze+0]=F,this.float32[ze+1]=W,this.float32[ze+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,S}}it.prototype.bytesPerElement=16,Di(\"StructArrayLayout2f1f2i16\",it);class Dt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,ze){let Ke=16*S,ut=4*S,Lt=8*S;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ut+1]=te,this.float32[ut+2]=fe,this.int16[Lt+6]=pe,this.int16[Lt+7]=ze,S}}Dt.prototype.bytesPerElement=16,Di(\"StructArrayLayout2ub2f2i16\",Dt);class Ht extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,S}}Ht.prototype.bytesPerElement=6,Di(\"StructArrayLayout3ui6\",Ht);class rr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi){let dn=this.length;return this.resize(dn+1),this.emplace(dn,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi)}emplace(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi,dn){let Fi=24*S,ln=12*S,An=48*S;return this.int16[Fi+0]=F,this.int16[Fi+1]=W,this.uint16[Fi+2]=te,this.uint16[Fi+3]=fe,this.uint32[ln+2]=pe,this.uint32[ln+3]=ze,this.uint32[ln+4]=Ke,this.uint16[Fi+10]=ut,this.uint16[Fi+11]=Lt,this.uint16[Fi+12]=Qt,this.float32[ln+7]=fr,this.float32[ln+8]=mr,this.uint8[An+36]=Lr,this.uint8[An+37]=zr,this.uint8[An+38]=ui,this.uint32[ln+10]=yi,this.int16[Fi+22]=dn,S}}rr.prototype.bytesPerElement=48,Di(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",rr);class dr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi,dn,Fi,ln,An,pa,ro,Vo,Xa,sa,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi,dn,Fi,ln,An,pa,ro,Vo,Xa,sa,Mo,fo)}emplace(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr,ui,yi,dn,Fi,ln,An,pa,ro,Vo,Xa,sa,Mo,fo,lo){let Xn=32*S,Ro=16*S;return this.int16[Xn+0]=F,this.int16[Xn+1]=W,this.int16[Xn+2]=te,this.int16[Xn+3]=fe,this.int16[Xn+4]=pe,this.int16[Xn+5]=ze,this.int16[Xn+6]=Ke,this.int16[Xn+7]=ut,this.uint16[Xn+8]=Lt,this.uint16[Xn+9]=Qt,this.uint16[Xn+10]=fr,this.uint16[Xn+11]=mr,this.uint16[Xn+12]=Lr,this.uint16[Xn+13]=zr,this.uint16[Xn+14]=ui,this.uint16[Xn+15]=yi,this.uint16[Xn+16]=dn,this.uint16[Xn+17]=Fi,this.uint16[Xn+18]=ln,this.uint16[Xn+19]=An,this.uint16[Xn+20]=pa,this.uint16[Xn+21]=ro,this.uint16[Xn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=sa,this.float32[Ro+14]=Mo,this.uint16[Xn+30]=fo,this.uint16[Xn+31]=lo,S}}dr.prototype.bytesPerElement=64,Di(\"StructArrayLayout8i15ui1ul2f2ui64\",dr);class Sr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.float32[1*S+0]=F,S}}Sr.prototype.bytesPerElement=4,Di(\"StructArrayLayout1f4\",Sr);class Or extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[6*S+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Or.prototype.bytesPerElement=12,Di(\"StructArrayLayout1ui2f12\",Or);class jr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=4*S;return this.uint32[2*S+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,S}}jr.prototype.bytesPerElement=8,Di(\"StructArrayLayout1ul2ui8\",jr);class ii extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.uint16[te+0]=F,this.uint16[te+1]=W,S}}ii.prototype.bytesPerElement=4,Di(\"StructArrayLayout2ui4\",ii);class Li extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint16[1*S+0]=F,S}}Li.prototype.bytesPerElement=2,Di(\"StructArrayLayout1ui2\",Li);class un extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,S}}un.prototype.bytesPerElement=16,Di(\"StructArrayLayout4f16\",un);class sn extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}sn.prototype.size=20;class In extends tt{get(S){return new sn(this,S)}}Di(\"CollisionBoxArray\",In);class Kn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Kn.prototype.size=48;class Aa extends rr{get(S){return new Kn(this,S)}}Di(\"PlacedSymbolArray\",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(S){this._structArray.uint32[this._pos4+12]=S}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends dr{get(S){return new fa(this,S)}}Di(\"SymbolInstanceArray\",$a);class ko extends Sr{getoffsetX(S){return this.float32[1*S+0]}}Di(\"GlyphOffsetArray\",ko);class Qa extends Tt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}Di(\"SymbolLineVertexArray\",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Or{get(S){return new mo(this,S)}}Di(\"TextAnchorOffsetArray\",Bo);class Is extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Is.prototype.size=8;class As extends jr{get(S){return new Is(this,S)}}Di(\"FeatureIndexArray\",As);class wo extends ot{}class To extends ot{}class dl extends ot{}class Ul extends Jt{}class Lu extends xr{}class au extends Pr{}class $s extends ve{}class Ql extends be{}class dc extends Re{}class Al extends Be{}class Sl extends We{}class X extends Dt{}class se extends Ht{}class Te extends ii{}let Ne=qe([{name:\"a_pos\",components:2,type:\"Int16\"}],4),{members:He}=Ne;class Ye{constructor(S=[]){this.segments=S}prepareSegment(S,F,W,te){let fe=this.segments[this.segments.length-1];return S>Ye.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!fe||fe.vertexLength+S>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let S of this.segments)for(let F in S.vaos)S.vaos[F].destroy()}static simpleSegment(S,F,W,te){return new Ye([{vertexOffset:S,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function Ct(R,S){return 256*(R=E(Math.floor(R),0,255))+E(Math.floor(S),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Di(\"SegmentVector\",Ye);let nt=qe([{name:\"a_pattern_from\",components:4,type:\"Uint16\"},{name:\"a_pattern_to\",components:4,type:\"Uint16\"},{name:\"a_pixel_ratio_from\",components:1,type:\"Uint16\"},{name:\"a_pixel_ratio_to\",components:1,type:\"Uint16\"}]);var jt={exports:{}},gr={exports:{}};gr.exports=function(R,S){var F,W,te,fe,pe,ze,Ke,ut;for(W=R.length-(F=3&R.length),te=S,pe=3432918353,ze=461845907,ut=0;ut<W;)Ke=255&R.charCodeAt(ut)|(255&R.charCodeAt(++ut))<<8|(255&R.charCodeAt(++ut))<<16|(255&R.charCodeAt(++ut))<<24,++ut,te=27492+(65535&(fe=5*(65535&(te=(te^=Ke=(65535&(Ke=(Ke=(65535&Ke)*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*ze+(((Ke>>>16)*ze&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ut+2))<<16;case 2:Ke^=(255&R.charCodeAt(ut+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ut)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*ze+(((Ke>>>16)*ze&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var yr=gr.exports,Gr={exports:{}};Gr.exports=function(R,S){for(var F,W=R.length,te=S^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var qr=yr,_i=Gr.exports;jt.exports=qr,jt.exports.murmur3=qr,jt.exports.murmur2=_i;var bi=o(jt.exports);class Xr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,F,W,te){this.ids.push(ni(S)),this.positions.push(F,W,te)}getPositions(S){if(!this.indexed)throw new Error(\"Trying to get index, but feature positions are not indexed\");let F=ni(S),W=0,te=this.ids.length-1;for(;W<te;){let pe=W+te>>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(S,F){let W=new Float64Array(S.ids),te=new Uint32Array(S.positions);return gi(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(S){let F=new Xr;return F.ids=S.ids,F.positions=S.positions,F.indexed=!0,F}}function ni(R){let S=+R;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:bi(String(R))}function gi(R,S,F,W){for(;F<W;){let te=R[F+W>>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]<te);do pe--;while(R[pe]>te);if(fe>=pe)break;Pi(R,fe,pe),Pi(S,3*fe,3*pe),Pi(S,3*fe+1,3*pe+1),Pi(S,3*fe+2,3*pe+2)}pe-F<W-pe?(gi(R,S,F,pe),F=pe+1):(gi(R,S,pe+1,W),W=pe)}}function Pi(R,S,F){let W=R[S];R[S]=R[F],R[F]=W}Di(\"FeaturePositionMap\",Xr);class Ai{constructor(S,F){this.gl=S.gl,this.location=F}}class ti extends Ai{constructor(S,F){super(S,F),this.current=0}set(S){this.current!==S&&(this.current=S,this.gl.uniform1f(this.location,S))}}class Rn extends Ai{constructor(S,F){super(S,F),this.current=[0,0,0,0]}set(S){S[0]===this.current[0]&&S[1]===this.current[1]&&S[2]===this.current[2]&&S[3]===this.current[3]||(this.current=S,this.gl.uniform4f(this.location,S[0],S[1],S[2],S[3]))}}class Cn extends Ai{constructor(S,F){super(S,F),this.current=ar.transparent}set(S){S.r===this.current.r&&S.g===this.current.g&&S.b===this.current.b&&S.a===this.current.a||(this.current=S,this.gl.uniform4f(this.location,S.r,S.g,S.b,S.a))}}let Nn=new Float32Array(16);function ia(R){return[Ct(255*R.r,255*R.g),Ct(255*R.b,255*R.a)]}class Ea{constructor(S,F,W){this.value=S,this.uniformNames=F.map(te=>`u_${te}`),this.type=W}setUniform(S,F,W){S.set(W.constantOr(this.value))}getBinding(S,F,W){return this.type===\"color\"?new Cn(S,F):new ti(S,F)}}class Ia{constructor(S,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=S.tlbr}setUniform(S,F,W,te){let fe=te===\"u_pattern_to\"?this.patternTo:te===\"u_pattern_from\"?this.patternFrom:te===\"u_pixel_ratio_to\"?this.pixelRatioTo:te===\"u_pixel_ratio_from\"?this.pixelRatioFrom:null;fe&&S.set(fe)}getBinding(S,F,W){return W.substr(0,9)===\"u_pattern\"?new Rn(S,F):new ti(S,F)}}class yo{constructor(S,F,W,te){this.expression=S,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:\"Float32\",components:W===\"color\"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(S,F,W,te,fe){let pe=this.paintVertexArray.length,ze=this.expression.evaluate(new is(0),F,{},te,[],fe);this.paintVertexArray.resize(S),this._setPaintValue(pe,S,ze)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(S,F,fe)}_setPaintValue(S,F,W){if(this.type===\"color\"){let te=ia(W);for(let fe=S;fe<F;fe++)this.paintVertexArray.emplace(fe,te[0],te[1])}else{for(let te=S;te<F;te++)this.paintVertexArray.emplace(te,W);this.maxValue=Math.max(this.maxValue,Math.abs(W))}}upload(S){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=S.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Da{constructor(S,F,W,te,fe,pe){this.expression=S,this.uniformNames=F.map(ze=>`u_${ze}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(ze=>({name:`a_${ze}`,type:\"Float32\",components:W===\"color\"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(S,F,W,te,fe){let pe=this.expression.evaluate(new is(this.zoom),F,{},te,[],fe),ze=this.expression.evaluate(new is(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(Ke,S,pe,ze)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(S,F,fe,pe)}_setPaintValue(S,F,W,te){if(this.type===\"color\"){let fe=ia(W),pe=ia(te);for(let ze=S;ze<F;ze++)this.paintVertexArray.emplace(ze,fe[0],fe[1],pe[0],pe[1])}else{for(let fe=S;fe<F;fe++)this.paintVertexArray.emplace(fe,W,te);this.maxValue=Math.max(this.maxValue,Math.abs(W),Math.abs(te))}}upload(S){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=S.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(S,F){let W=this.useIntegerZoom?Math.floor(F.zoom):F.zoom,te=E(this.expression.interpolationFactor(W,this.zoom,this.zoom+1),0,1);S.set(te)}getBinding(S,F,W){return new ti(S,F)}}class go{constructor(S,F,W,te,fe,pe){this.expression=S,this.type=F,this.useIntegerZoom=W,this.zoom=te,this.layerId=pe,this.zoomInPaintVertexArray=new fe,this.zoomOutPaintVertexArray=new fe}populatePaintArray(S,F,W){let te=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(S),this.zoomOutPaintVertexArray.resize(S),this._setPaintValues(te,S,F.patterns&&F.patterns[this.layerId],W)}updatePaintArray(S,F,W,te,fe){this._setPaintValues(S,F,W.patterns&&W.patterns[this.layerId],fe)}_setPaintValues(S,F,W,te){if(!te||!W)return;let{min:fe,mid:pe,max:ze}=W,Ke=te[fe],ut=te[pe],Lt=te[ze];if(Ke&&ut&&Lt)for(let Qt=S;Qt<F;Qt++)this.zoomInPaintVertexArray.emplace(Qt,ut.tl[0],ut.tl[1],ut.br[0],ut.br[1],Ke.tl[0],Ke.tl[1],Ke.br[0],Ke.br[1],ut.pixelRatio,Ke.pixelRatio),this.zoomOutPaintVertexArray.emplace(Qt,ut.tl[0],ut.tl[1],ut.br[0],ut.br[1],Lt.tl[0],Lt.tl[1],Lt.br[0],Lt.br[1],ut.pixelRatio,Lt.pixelRatio)}upload(S){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=S.createVertexBuffer(this.zoomInPaintVertexArray,nt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=S.createVertexBuffer(this.zoomOutPaintVertexArray,nt.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Rs{constructor(S,F,W){this.binders={},this._buffers=[];let te=[];for(let fe in S.paint._values){if(!W(fe))continue;let pe=S.paint.get(fe);if(!(pe instanceof xu&&Nl(pe.property.specification)))continue;let ze=Zs(fe,S.type),Ke=pe.value,ut=pe.property.specification.type,Lt=pe.property.useIntegerZoom,Qt=pe.property.specification[\"property-type\"],fr=Qt===\"cross-faded\"||Qt===\"cross-faded-data-driven\";if(Ke.kind===\"constant\")this.binders[fe]=fr?new Ia(Ke.value,ze):new Ea(Ke.value,ze,ut),te.push(`/u_${fe}`);else if(Ke.kind===\"source\"||fr){let mr=Gn(fe,ut,\"source\");this.binders[fe]=fr?new go(Ke,ut,Lt,F,mr,S.id):new yo(Ke,ze,ut,mr),te.push(`/a_${fe}`)}else{let mr=Gn(fe,ut,\"composite\");this.binders[fe]=new Da(Ke,ze,ut,Lt,F,mr),te.push(`/z_${fe}`)}}this.cacheKey=te.sort().join(\"\")}getMaxValue(S){let F=this.binders[S];return F instanceof yo||F instanceof Da?F.maxValue:0}populatePaintArrays(S,F,W,te,fe){for(let pe in this.binders){let ze=this.binders[pe];(ze instanceof yo||ze instanceof Da||ze instanceof go)&&ze.populatePaintArray(S,F,W,te,fe)}}setConstantPatternPositions(S,F){for(let W in this.binders){let te=this.binders[W];te instanceof Ia&&te.setConstantPatternPositions(S,F)}}updatePaintArrays(S,F,W,te,fe){let pe=!1;for(let ze in S){let Ke=F.getPositions(ze);for(let ut of Ke){let Lt=W.feature(ut.index);for(let Qt in this.binders){let fr=this.binders[Qt];if((fr instanceof yo||fr instanceof Da||fr instanceof go)&&fr.expression.isStateDependent===!0){let mr=te.paint.get(Qt);fr.expression=mr.value,fr.updatePaintArray(ut.start,ut.end,Lt,S[ze],fe),pe=!0}}}}return pe}defines(){let S=[];for(let F in this.binders){let W=this.binders[F];(W instanceof Ea||W instanceof Ia)&&S.push(...W.uniformNames.map(te=>`#define HAS_UNIFORM_${te}`))}return S}getBinderAttributes(){let S=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te<W.paintVertexAttributes.length;te++)S.push(W.paintVertexAttributes[te].name);else if(W instanceof go)for(let te=0;te<nt.members.length;te++)S.push(nt.members[te].name)}return S}getBinderUniforms(){let S=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof Ea||W instanceof Ia||W instanceof Da)for(let te of W.uniformNames)S.push(te)}return S}getPaintVertexBuffers(){return this._buffers}getUniforms(S,F){let W=[];for(let te in this.binders){let fe=this.binders[te];if(fe instanceof Ea||fe instanceof Ia||fe instanceof Da){for(let pe of fe.uniformNames)if(F[pe]){let ze=fe.getBinding(S,F[pe],pe);W.push({name:pe,property:te,binding:ze})}}}return W}setUniforms(S,F,W,te){for(let{name:fe,property:pe,binding:ze}of F)this.binders[pe].setUniform(ze,te,W.get(pe),fe)}updatePaintBuffers(S){this._buffers=[];for(let F in this.binders){let W=this.binders[F];if(S&&W instanceof go){let te=S.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof yo||W instanceof Da)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(S){for(let F in this.binders){let W=this.binders[F];(W instanceof yo||W instanceof Da||W instanceof go)&&W.upload(S)}this.updatePaintBuffers()}destroy(){for(let S in this.binders){let F=this.binders[S];(F instanceof yo||F instanceof Da||F instanceof go)&&F.destroy()}}}class Es{constructor(S,F,W=()=>!0){this.programConfigurations={};for(let te of S)this.programConfigurations[te.id]=new Rs(te,F,W);this.needsUpload=!1,this._featureMap=new Xr,this._bufferOffset=0}populatePaintArrays(S,F,W,te,fe,pe){for(let ze in this.programConfigurations)this.programConfigurations[ze].populatePaintArrays(S,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(S,this._featureMap,F,fe,te)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Zs(R,S){return{\"text-opacity\":[\"opacity\"],\"icon-opacity\":[\"opacity\"],\"text-color\":[\"fill_color\"],\"icon-color\":[\"fill_color\"],\"text-halo-color\":[\"halo_color\"],\"icon-halo-color\":[\"halo_color\"],\"text-halo-blur\":[\"halo_blur\"],\"icon-halo-blur\":[\"halo_blur\"],\"text-halo-width\":[\"halo_width\"],\"icon-halo-width\":[\"halo_width\"],\"line-gap-width\":[\"gapwidth\"],\"line-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-extrusion-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"]}[R]||[R.replace(`${S}-`,\"\").replace(/-/g,\"_\")]}function Gn(R,S,F){let W={color:{source:Pr,composite:un},number:{source:Sr,composite:Pr}},te=function(fe){return{\"line-pattern\":{source:$s,composite:$s},\"fill-pattern\":{source:$s,composite:$s},\"fill-extrusion-pattern\":{source:$s,composite:$s}}[fe]}(R);return te&&te[F]||W[S][F]}Di(\"ConstantBinder\",Ea),Di(\"CrossFadedConstantBinder\",Ia),Di(\"SourceExpressionBinder\",yo),Di(\"CrossFadedCompositeBinder\",go),Di(\"CompositeExpressionBinder\",Da),Di(\"ProgramConfiguration\",Rs,{omit:[\"_buffers\"]}),Di(\"ProgramConfigurationSet\",Es);let Ha=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function Qs(R){let S=Ha/R.extent,F=R.loadGeometry();for(let W=0;W<F.length;W++){let te=F[W];for(let fe=0;fe<te.length;fe++){let pe=te[fe],ze=Math.round(pe.x*S),Ke=Math.round(pe.y*S);pe.x=E(ze,Uo,Fo),pe.y=E(Ke,Uo,Fo),(ze<pe.x||ze>pe.x+1||Ke<pe.y||Ke>pe.y+1)&&T(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}}return F}function Ml(R,S){return{type:R.type,id:R.id,properties:R.properties,geometry:S?Qs(R):[]}}function bu(R,S,F,W,te){R.emplaceBack(2*S+(W+1)/2,2*F+(te+1)/2)}class vl{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Es(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){let te=this.layers[0],fe=[],pe=null,ze=!1;te.type===\"circle\"&&(pe=te.layout.get(\"circle-sort-key\"),ze=!pe.isConstant());for(let{feature:Ke,id:ut,index:Lt,sourceLayerIndex:Qt}of S){let fr=this.layers[0]._featureFilter.needGeometry,mr=Ml(Ke,fr);if(!this.layers[0]._featureFilter.filter(new is(this.zoom),mr,W))continue;let Lr=ze?pe.evaluate(mr,{},W):void 0,zr={id:ut,properties:Ke.properties,type:Ke.type,sourceLayerIndex:Qt,index:Lt,geometry:fr?mr.geometry:Qs(Ke),patterns:{},sortKey:Lr};fe.push(zr)}ze&&fe.sort((Ke,ut)=>Ke.sortKey-ut.sortKey);for(let Ke of fe){let{geometry:ut,index:Lt,sourceLayerIndex:Qt}=Ke,fr=S[Lt].feature;this.addFeature(Ke,ut,Lt,W),F.featureIndex.insert(fr,ut,Lt,Qt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,He),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,F,W,te){for(let fe of F)for(let pe of fe){let ze=pe.x,Ke=pe.y;if(ze<0||ze>=Ha||Ke<0||Ke>=Ha)continue;let ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Lt=ut.vertexLength;bu(this.layoutVertexArray,ze,Ke,-1,-1),bu(this.layoutVertexArray,ze,Ke,1,-1),bu(this.layoutVertexArray,ze,Ke,1,1),bu(this.layoutVertexArray,ze,Ke,-1,1),this.indexArray.emplaceBack(Lt,Lt+1,Lt+2),this.indexArray.emplaceBack(Lt,Lt+3,Lt+2),ut.vertexLength+=4,ut.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,{},te)}}function Sc(R,S){for(let F=0;F<R.length;F++)if(Ni(S,R[F]))return!0;for(let F=0;F<S.length;F++)if(Ni(R,S[F]))return!0;return!!Ir(R,S)}function Ee(R,S,F){return!!Ni(R,S)||!!Br(S,R,F)}function xt(R,S){if(R.length===1)return mi(S,R[0]);for(let F=0;F<S.length;F++){let W=S[F];for(let te=0;te<W.length;te++)if(Ni(R,W[te]))return!0}for(let F=0;F<R.length;F++)if(mi(S,R[F]))return!0;for(let F=0;F<S.length;F++)if(Ir(R,S[F]))return!0;return!1}function zt(R,S,F){if(R.length>1){if(Ir(R,S))return!0;for(let W=0;W<S.length;W++)if(Br(S[W],R,F))return!0}for(let W=0;W<R.length;W++)if(Br(R[W],S,F))return!0;return!1}function Ir(R,S){if(R.length===0||S.length===0)return!1;for(let F=0;F<R.length-1;F++){let W=R[F],te=R[F+1];for(let fe=0;fe<S.length-1;fe++)if(Hr(W,te,S[fe],S[fe+1]))return!0}return!1}function Hr(R,S,F,W){return z(R,F,W)!==z(S,F,W)&&z(R,S,F)!==z(R,S,W)}function Br(R,S,F){let W=F*F;if(S.length===1)return R.distSqr(S[0])<W;for(let te=1;te<S.length;te++)if(Vr(R,S[te-1],S[te])<W)return!0;return!1}function Vr(R,S,F){let W=S.distSqr(F);if(W===0)return R.distSqr(S);let te=((R.x-S.x)*(F.x-S.x)+(R.y-S.y)*(F.y-S.y))/W;return R.distSqr(te<0?S:te>1?F:F.sub(S)._mult(te)._add(S))}function mi(R,S){let F,W,te,fe=!1;for(let pe=0;pe<R.length;pe++){F=R[pe];for(let ze=0,Ke=F.length-1;ze<F.length;Ke=ze++)W=F[ze],te=F[Ke],W.y>S.y!=te.y>S.y&&S.x<(te.x-W.x)*(S.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ni(R,S){let F=!1;for(let W=0,te=R.length-1;W<R.length;te=W++){let fe=R[W],pe=R[te];fe.y>S.y!=pe.y>S.y&&S.x<(pe.x-fe.x)*(S.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function Oi(R,S,F){let W=F[0],te=F[2];if(R.x<W.x&&S.x<W.x||R.x>te.x&&S.x>te.x||R.y<W.y&&S.y<W.y||R.y>te.y&&S.y>te.y)return!1;let fe=z(R,S,F[0]);return fe!==z(R,S,F[1])||fe!==z(R,S,F[2])||fe!==z(R,S,F[3])}function Mi(R,S,F){let W=S.paint.get(R).value;return W.kind===\"constant\"?W.value:F.programConfigurations.get(S.id).getMaxValue(R)}function Hn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qi(R,S,F,W,te){if(!S[0]&&!S[1])return R;let fe=u.convert(S)._mult(te);F===\"viewport\"&&fe._rotate(-W);let pe=[];for(let ze=0;ze<R.length;ze++)pe.push(R[ze].sub(fe));return pe}let ji,si;Di(\"CircleBucket\",vl,{omit:[\"layers\"]});var Mr={get paint(){return si=si||new ue({\"circle-radius\":new oo(ce.paint_circle[\"circle-radius\"]),\"circle-color\":new oo(ce.paint_circle[\"circle-color\"]),\"circle-blur\":new oo(ce.paint_circle[\"circle-blur\"]),\"circle-opacity\":new oo(ce.paint_circle[\"circle-opacity\"]),\"circle-translate\":new Ua(ce.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new Ua(ce.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new Ua(ce.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new Ua(ce.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new oo(ce.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new oo(ce.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new oo(ce.paint_circle[\"circle-stroke-opacity\"])})},get layout(){return ji=ji||new ue({\"circle-sort-key\":new oo(ce.layout_circle[\"circle-sort-key\"])})}},Yr=1e-6,xi=typeof Float32Array!=\"undefined\"?Float32Array:Array;function Ii(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function ci(R,S,F){var W=S[0],te=S[1],fe=S[2],pe=S[3],ze=S[4],Ke=S[5],ut=S[6],Lt=S[7],Qt=S[8],fr=S[9],mr=S[10],Lr=S[11],zr=S[12],ui=S[13],yi=S[14],dn=S[15],Fi=F[0],ln=F[1],An=F[2],pa=F[3];return R[0]=Fi*W+ln*ze+An*Qt+pa*zr,R[1]=Fi*te+ln*Ke+An*fr+pa*ui,R[2]=Fi*fe+ln*ut+An*mr+pa*yi,R[3]=Fi*pe+ln*Lt+An*Lr+pa*dn,R[4]=(Fi=F[4])*W+(ln=F[5])*ze+(An=F[6])*Qt+(pa=F[7])*zr,R[5]=Fi*te+ln*Ke+An*fr+pa*ui,R[6]=Fi*fe+ln*ut+An*mr+pa*yi,R[7]=Fi*pe+ln*Lt+An*Lr+pa*dn,R[8]=(Fi=F[8])*W+(ln=F[9])*ze+(An=F[10])*Qt+(pa=F[11])*zr,R[9]=Fi*te+ln*Ke+An*fr+pa*ui,R[10]=Fi*fe+ln*ut+An*mr+pa*yi,R[11]=Fi*pe+ln*Lt+An*Lr+pa*dn,R[12]=(Fi=F[12])*W+(ln=F[13])*ze+(An=F[14])*Qt+(pa=F[15])*zr,R[13]=Fi*te+ln*Ke+An*fr+pa*ui,R[14]=Fi*fe+ln*ut+An*mr+pa*yi,R[15]=Fi*pe+ln*Lt+An*Lr+pa*dn,R}Math.hypot||(Math.hypot=function(){for(var R=0,S=arguments.length;S--;)R+=arguments[S]*arguments[S];return Math.sqrt(R)});var nn,Xi=ci;function qn(R,S,F){var W=S[0],te=S[1],fe=S[2],pe=S[3];return R[0]=F[0]*W+F[4]*te+F[8]*fe+F[12]*pe,R[1]=F[1]*W+F[5]*te+F[9]*fe+F[13]*pe,R[2]=F[2]*W+F[6]*te+F[10]*fe+F[14]*pe,R[3]=F[3]*W+F[7]*te+F[11]*fe+F[15]*pe,R}nn=new xi(4),xi!=Float32Array&&(nn[0]=0,nn[1]=0,nn[2]=0,nn[3]=0);class vi extends B{constructor(S){super(S,Mr)}createBucket(S){return new vl(S)}queryRadius(S){let F=S;return Mi(\"circle-radius\",this,F)+Mi(\"circle-stroke-width\",this,F)+Hn(this.paint.get(\"circle-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,ze,Ke){let ut=Qi(S,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),pe.angle,ze),Lt=this.paint.get(\"circle-radius\").evaluate(F,W)+this.paint.get(\"circle-stroke-width\").evaluate(F,W),Qt=this.paint.get(\"circle-pitch-alignment\")===\"map\",fr=Qt?ut:function(Lr,zr){return Lr.map(ui=>li(ui,zr))}(ut,Ke),mr=Qt?Lt*ze:Lt;for(let Lr of te)for(let zr of Lr){let ui=Qt?zr:li(zr,Ke),yi=mr,dn=qn([],[zr.x,zr.y,0,1],Ke);if(this.paint.get(\"circle-pitch-scale\")===\"viewport\"&&this.paint.get(\"circle-pitch-alignment\")===\"map\"?yi*=dn[3]/pe.cameraToCenterDistance:this.paint.get(\"circle-pitch-scale\")===\"map\"&&this.paint.get(\"circle-pitch-alignment\")===\"viewport\"&&(yi*=pe.cameraToCenterDistance/dn[3]),Ee(fr,ui,yi))return!0}return!1}}function li(R,S){let F=qn([],[R.x,R.y,0,1],S);return new u(F[0]/F[3],F[1]/F[3])}class mn extends vl{}let Ki;Di(\"HeatmapBucket\",mn,{omit:[\"layers\"]});var Ui={get paint(){return Ki=Ki||new ue({\"heatmap-radius\":new oo(ce.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new oo(ce.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new Ua(ce.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new Ku(ce.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new Ua(ce.paint_heatmap[\"heatmap-opacity\"])})}};function Bi(R,{width:S,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==S*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${S*F*W}`)}else te=new Uint8Array(S*F*W);return R.width=S,R.height=F,R.data=te,R}function vn(R,{width:S,height:F},W){if(S===R.width&&F===R.height)return;let te=Bi({},{width:S,height:F},W);Un(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,S),height:Math.min(R.height,F)},W),R.width=S,R.height=F,R.data=te.data}function Un(R,S,F,W,te,fe){if(te.width===0||te.height===0)return S;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError(\"out of range source coordinates for image copy\");if(te.width>S.width||te.height>S.height||W.x>S.width-te.width||W.y>S.height-te.height)throw new RangeError(\"out of range destination coordinates for image copy\");let pe=R.data,ze=S.data;if(pe===ze)throw new Error(\"srcData equals dstData, so image is already copied\");for(let Ke=0;Ke<te.height;Ke++){let ut=((F.y+Ke)*R.width+F.x)*fe,Lt=((W.y+Ke)*S.width+W.x)*fe;for(let Qt=0;Qt<te.width*fe;Qt++)ze[Lt+Qt]=pe[ut+Qt]}return S}class na{constructor(S,F){Bi(this,S,1,F)}resize(S){vn(this,S,1)}clone(){return new na({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,F,W,te,fe){Un(S,F,W,te,fe,1)}}class Yi{constructor(S,F){Bi(this,S,4,F)}resize(S){vn(this,S,4)}replace(S,F){F?this.data.set(S):this.data=S instanceof Uint8ClampedArray?new Uint8Array(S.buffer):S}clone(){return new Yi({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,F,W,te,fe){Un(S,F,W,te,fe,4)}}function Ln(R){let S={},F=R.resolution||256,W=R.clips?R.clips.length:1,te=R.image||new Yi({width:F,height:W});if(Math.log(F)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${F}`);let fe=(pe,ze,Ke)=>{S[R.evaluationKey]=Ke;let ut=R.expression.evaluate(S);te.data[pe+ze+0]=Math.floor(255*ut.r/ut.a),te.data[pe+ze+1]=Math.floor(255*ut.g/ut.a),te.data[pe+ze+2]=Math.floor(255*ut.b/ut.a),te.data[pe+ze+3]=Math.floor(255*ut.a)};if(R.clips)for(let pe=0,ze=0;pe<W;++pe,ze+=4*F)for(let Ke=0,ut=0;Ke<F;Ke++,ut+=4){let Lt=Ke/(F-1),{start:Qt,end:fr}=R.clips[pe];fe(ze,ut,Qt*(1-Lt)+fr*Lt)}else for(let pe=0,ze=0;pe<F;pe++,ze+=4)fe(0,ze,pe/(F-1));return te}Di(\"AlphaImage\",na),Di(\"RGBAImage\",Yi);let ra=\"big-fb\";class oa extends B{createBucket(S){return new mn(S)}constructor(S){super(S,Ui),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(S){S===\"heatmap-color\"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ln({expression:this._transitionablePaint._values[\"heatmap-color\"].value.expression,evaluationKey:\"heatmapDensity\",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(ra)&&this.heatmapFbos.delete(ra)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get(\"heatmap-opacity\")!==0&&this.visibility!==\"none\"}}let wa;var ns={get paint(){return wa=wa||new ue({\"hillshade-illumination-direction\":new Ua(ce.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new Ua(ce.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new Ua(ce.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new Ua(ce.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new Ua(ce.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new Ua(ce.paint_hillshade[\"hillshade-accent-color\"])})}};class Ys extends B{constructor(S){super(S,ns)}hasOffscreenPass(){return this.paint.get(\"hillshade-exaggeration\")!==0&&this.visibility!==\"none\"}}let Va=qe([{name:\"a_pos\",components:2,type:\"Int16\"}],4),{members:El}=Va;function zo(R,S,F=2){let W=S&&S.length,te=W?S[0]*F:R.length,fe=el(R,0,te,F,!0),pe=[];if(!fe||fe.next===fe.prev)return pe;let ze,Ke,ut;if(W&&(fe=function(Lt,Qt,fr,mr){let Lr=[];for(let zr=0,ui=Qt.length;zr<ui;zr++){let yi=el(Lt,Qt[zr]*mr,zr<ui-1?Qt[zr+1]*mr:Lt.length,mr,!1);yi===yi.next&&(yi.steiner=!0),Lr.push(J(yi))}Lr.sort(sl);for(let zr=0;zr<Lr.length;zr++)fr=io(Lr[zr],fr);return fr}(R,S,fe,F)),R.length>80*F){ze=1/0,Ke=1/0;let Lt=-1/0,Qt=-1/0;for(let fr=F;fr<te;fr+=F){let mr=R[fr],Lr=R[fr+1];mr<ze&&(ze=mr),Lr<Ke&&(Ke=Lr),mr>Lt&&(Lt=mr),Lr>Qt&&(Qt=Lr)}ut=Math.max(Lt-ze,Qt-Ke),ut=ut!==0?32767/ut:0}return Vl(fe,pe,F,ze,Ke,ut,0),pe}function el(R,S,F,W,te){let fe;if(te===function(pe,ze,Ke,ut){let Lt=0;for(let Qt=ze,fr=Ke-ut;Qt<Ke;Qt+=ut)Lt+=(pe[fr]-pe[Qt])*(pe[Qt+1]+pe[fr+1]),fr=Qt;return Lt}(R,S,F,W)>0)for(let pe=S;pe<F;pe+=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);else for(let pe=F-W;pe>=S;pe-=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ve(fe),fe=fe.next),fe}function ol(R,S){if(!R)return R;S||(S=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ve(W),W=S=W.prev,W===W.next)break;F=!0}while(F||W!==S);return S}function Vl(R,S,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ut,Lt,Qt){let fr=Ke;do fr.z===0&&(fr.z=D(fr.x,fr.y,ut,Lt,Qt)),fr.prevZ=fr.prev,fr.nextZ=fr.next,fr=fr.next;while(fr!==Ke);fr.prevZ.nextZ=null,fr.prevZ=null,function(mr){let Lr,zr=1;do{let ui,yi=mr;mr=null;let dn=null;for(Lr=0;yi;){Lr++;let Fi=yi,ln=0;for(let pa=0;pa<zr&&(ln++,Fi=Fi.nextZ,Fi);pa++);let An=zr;for(;ln>0||An>0&&Fi;)ln!==0&&(An===0||!Fi||yi.z<=Fi.z)?(ui=yi,yi=yi.nextZ,ln--):(ui=Fi,Fi=Fi.nextZ,An--),dn?dn.nextZ=ui:mr=ui,ui.prevZ=dn,dn=ui;yi=Fi}dn.nextZ=null,zr*=2}while(Lr>1)}(fr)}(R,W,te,fe);let ze=R;for(;R.prev!==R.next;){let Ke=R.prev,ut=R.next;if(fe?Gs(R,W,te,fe):ls(R))S.push(Ke.i,R.i,ut.i),Ve(R),R=ut.next,ze=ut.next;else if((R=ut)===ze){pe?pe===1?Vl(R=Ks(ol(R),S),S,F,W,te,fe,2):pe===2&&Ta(R,S,F,W,te,fe):Vl(ol(R),S,F,W,te,fe,1);break}}}function ls(R){let S=R.prev,F=R,W=R.next;if(de(S,F,W)>=0)return!1;let te=S.x,fe=F.x,pe=W.x,ze=S.y,Ke=F.y,ut=W.y,Lt=te<fe?te<pe?te:pe:fe<pe?fe:pe,Qt=ze<Ke?ze<ut?ze:ut:Ke<ut?Ke:ut,fr=te>fe?te>pe?te:pe:fe>pe?fe:pe,mr=ze>Ke?ze>ut?ze:ut:Ke>ut?Ke:ut,Lr=W.next;for(;Lr!==S;){if(Lr.x>=Lt&&Lr.x<=fr&&Lr.y>=Qt&&Lr.y<=mr&&q(te,ze,fe,Ke,pe,ut,Lr.x,Lr.y)&&de(Lr.prev,Lr,Lr.next)>=0)return!1;Lr=Lr.next}return!0}function Gs(R,S,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let ze=te.x,Ke=fe.x,ut=pe.x,Lt=te.y,Qt=fe.y,fr=pe.y,mr=ze<Ke?ze<ut?ze:ut:Ke<ut?Ke:ut,Lr=Lt<Qt?Lt<fr?Lt:fr:Qt<fr?Qt:fr,zr=ze>Ke?ze>ut?ze:ut:Ke>ut?Ke:ut,ui=Lt>Qt?Lt>fr?Lt:fr:Qt>fr?Qt:fr,yi=D(mr,Lr,S,F,W),dn=D(zr,ui,S,F,W),Fi=R.prevZ,ln=R.nextZ;for(;Fi&&Fi.z>=yi&&ln&&ln.z<=dn;){if(Fi.x>=mr&&Fi.x<=zr&&Fi.y>=Lr&&Fi.y<=ui&&Fi!==te&&Fi!==pe&&q(ze,Lt,Ke,Qt,ut,fr,Fi.x,Fi.y)&&de(Fi.prev,Fi,Fi.next)>=0||(Fi=Fi.prevZ,ln.x>=mr&&ln.x<=zr&&ln.y>=Lr&&ln.y<=ui&&ln!==te&&ln!==pe&&q(ze,Lt,Ke,Qt,ut,fr,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0))return!1;ln=ln.nextZ}for(;Fi&&Fi.z>=yi;){if(Fi.x>=mr&&Fi.x<=zr&&Fi.y>=Lr&&Fi.y<=ui&&Fi!==te&&Fi!==pe&&q(ze,Lt,Ke,Qt,ut,fr,Fi.x,Fi.y)&&de(Fi.prev,Fi,Fi.next)>=0)return!1;Fi=Fi.prevZ}for(;ln&&ln.z<=dn;){if(ln.x>=mr&&ln.x<=zr&&ln.y>=Lr&&ln.y<=ui&&ln!==te&&ln!==pe&&q(ze,Lt,Ke,Qt,ut,fr,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0)return!1;ln=ln.nextZ}return!0}function Ks(R,S){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&we(W,F,F.next,te)&&Zt(W,te)&&Zt(te,W)&&(S.push(W.i,F.i,te.i),Ve(F),Ve(F.next),F=R=te),F=F.next}while(F!==R);return ol(F)}function Ta(R,S,F,W,te,fe){let pe=R;do{let ze=pe.next.next;for(;ze!==pe.prev;){if(pe.i!==ze.i&&K(pe,ze)){let Ke=hr(pe,ze);return pe=ol(pe,pe.next),Ke=ol(Ke,Ke.next),Vl(pe,S,F,W,te,fe,0),void Vl(Ke,S,F,W,te,fe,0)}ze=ze.next}pe=pe.next}while(pe!==R)}function sl(R,S){return R.x-S.x}function io(R,S){let F=function(te,fe){let pe=fe,ze=te.x,Ke=te.y,ut,Lt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let zr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(zr<=ze&&zr>Lt&&(Lt=zr,ut=pe.x<pe.next.x?pe:pe.next,zr===ze))return ut}pe=pe.next}while(pe!==fe);if(!ut)return null;let Qt=ut,fr=ut.x,mr=ut.y,Lr=1/0;pe=ut;do{if(ze>=pe.x&&pe.x>=fr&&ze!==pe.x&&q(Ke<mr?ze:Lt,Ke,fr,mr,Ke<mr?Lt:ze,Ke,pe.x,pe.y)){let zr=Math.abs(Ke-pe.y)/(ze-pe.x);Zt(pe,te)&&(zr<Lr||zr===Lr&&(pe.x>ut.x||pe.x===ut.x&&Y(ut,pe)))&&(ut=pe,Lr=zr)}pe=pe.next}while(pe!==Qt);return ut}(R,S);if(!F)return S;let W=hr(F,R);return ol(W,W.next),ol(F,F.next)}function Y(R,S){return de(R.prev,R,S.prev)<0&&de(S.next,R,R.next)<0}function D(R,S,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-W)*te|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function J(R){let S=R,F=R;do(S.x<F.x||S.x===F.x&&S.y<F.y)&&(F=S),S=S.next;while(S!==R);return F}function q(R,S,F,W,te,fe,pe,ze){return(te-pe)*(S-ze)>=(R-pe)*(fe-ze)&&(R-pe)*(W-ze)>=(F-pe)*(S-ze)&&(F-pe)*(fe-ze)>=(te-pe)*(W-ze)}function K(R,S){return R.next.i!==S.i&&R.prev.i!==S.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&we(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,S)&&(Zt(R,S)&&Zt(S,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,ze=(F.y+W.y)/2;do te.y>ze!=te.next.y>ze&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(ze-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,S)&&(de(R.prev,R,S.prev)||de(R,S.prev,S))||ne(R,S)&&de(R.prev,R,R.next)>0&&de(S.prev,S,S.next)>0)}function de(R,S,F){return(S.y-R.y)*(F.x-S.x)-(S.x-R.x)*(F.y-S.y)}function ne(R,S){return R.x===S.x&&R.y===S.y}function we(R,S,F,W){let te=ft(de(R,S,F)),fe=ft(de(R,S,W)),pe=ft(de(F,W,R)),ze=ft(de(F,W,S));return te!==fe&&pe!==ze||!(te!==0||!Ue(R,F,S))||!(fe!==0||!Ue(R,W,S))||!(pe!==0||!Ue(F,R,W))||!(ze!==0||!Ue(F,S,W))}function Ue(R,S,F){return S.x<=Math.max(R.x,F.x)&&S.x>=Math.min(R.x,F.x)&&S.y<=Math.max(R.y,F.y)&&S.y>=Math.min(R.y,F.y)}function ft(R){return R>0?1:R<0?-1:0}function Zt(R,S){return de(R.prev,R,R.next)<0?de(R,S,R.next)>=0&&de(R,R.prev,S)>=0:de(R,S,R.prev)<0||de(R,R.next,S)<0}function hr(R,S){let F=et(R.i,R.x,R.y),W=et(S.i,S.x,S.y),te=R.next,fe=S.prev;return R.next=S,S.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function qt(R,S,F,W){let te=et(R,S,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ve(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function et(R,S,F){return{i:R,x:S,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function at(R,S,F){let W=F.patternDependencies,te=!1;for(let fe of S){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let ze=pe.constantOr(null);ze&&(te=!0,W[ze.to]=!0,W[ze.from]=!0)}return te}function kt(R,S,F,W,te){let fe=te.patternDependencies;for(let pe of S){let ze=pe.paint.get(`${R}-pattern`).value;if(ze.kind!==\"constant\"){let Ke=ze.evaluate({zoom:W-1},F,{},te.availableImages),ut=ze.evaluate({zoom:W},F,{},te.availableImages),Lt=ze.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ut=ut&&ut.name?ut.name:ut,Lt=Lt&&Lt.name?Lt.name:Lt,fe[Ke]=!0,fe[ut]=!0,fe[Lt]=!0,F.patterns[pe.id]={min:Ke,mid:ut,max:Lt}}}return F}class Ot{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new dl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Es(S.layers,S.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at(\"fill\",this.layers,F);let te=this.layers[0].layout.get(\"fill-sort-key\"),fe=!te.isConstant(),pe=[];for(let{feature:ze,id:Ke,index:ut,sourceLayerIndex:Lt}of S){let Qt=this.layers[0]._featureFilter.needGeometry,fr=Ml(ze,Qt);if(!this.layers[0]._featureFilter.filter(new is(this.zoom),fr,W))continue;let mr=fe?te.evaluate(fr,{},W,F.availableImages):void 0,Lr={id:Ke,properties:ze.properties,type:ze.type,sourceLayerIndex:Lt,index:ut,geometry:Qt?fr.geometry:Qs(ze),patterns:{},sortKey:mr};pe.push(Lr)}fe&&pe.sort((ze,Ke)=>ze.sortKey-Ke.sortKey);for(let ze of pe){let{geometry:Ke,index:ut,sourceLayerIndex:Lt}=ze;if(this.hasPattern){let Qt=kt(\"fill\",this.layers,ze,this.zoom,F);this.patternFeatures.push(Qt)}else this.addFeature(ze,Ke,ut,W,{});F.featureIndex.insert(S[ut].feature,Ke,ut,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,El),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let ze=0;for(let mr of pe)ze+=mr.length;let Ke=this.segments.prepareSegment(ze,this.layoutVertexArray,this.indexArray),ut=Ke.vertexLength,Lt=[],Qt=[];for(let mr of pe){if(mr.length===0)continue;mr!==pe[0]&&Qt.push(Lt.length/2);let Lr=this.segments2.prepareSegment(mr.length,this.layoutVertexArray,this.indexArray2),zr=Lr.vertexLength;this.layoutVertexArray.emplaceBack(mr[0].x,mr[0].y),this.indexArray2.emplaceBack(zr+mr.length-1,zr),Lt.push(mr[0].x),Lt.push(mr[0].y);for(let ui=1;ui<mr.length;ui++)this.layoutVertexArray.emplaceBack(mr[ui].x,mr[ui].y),this.indexArray2.emplaceBack(zr+ui-1,zr+ui),Lt.push(mr[ui].x),Lt.push(mr[ui].y);Lr.vertexLength+=mr.length,Lr.primitiveLength+=mr.length}let fr=zo(Lt,Qt);for(let mr=0;mr<fr.length;mr+=3)this.indexArray.emplaceBack(ut+fr[mr],ut+fr[mr+1],ut+fr[mr+2]);Ke.vertexLength+=ze,Ke.primitiveLength+=fr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}}let It,Bt;Di(\"FillBucket\",Ot,{omit:[\"layers\",\"patternFeatures\"]});var Rt={get paint(){return Bt=Bt||new ue({\"fill-antialias\":new Ua(ce.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new oo(ce.paint_fill[\"fill-opacity\"]),\"fill-color\":new oo(ce.paint_fill[\"fill-color\"]),\"fill-outline-color\":new oo(ce.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new Ua(ce.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new Ua(ce.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new Vc(ce.paint_fill[\"fill-pattern\"])})},get layout(){return It=It||new ue({\"fill-sort-key\":new oo(ce.layout_fill[\"fill-sort-key\"])})}};class mt extends B{constructor(S){super(S,Rt)}recalculate(S,F){super.recalculate(S,F);let W=this.paint._values[\"fill-outline-color\"];W.value.kind===\"constant\"&&W.value.value===void 0&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"])}createBucket(S){return new Ot(S)}queryRadius(){return Hn(this.paint.get(\"fill-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,ze){return xt(Qi(S,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),pe.angle,ze),te)}isTileClipped(){return!0}}let Pt=qe([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4),ht=qe([{name:\"a_centroid\",components:2,type:\"Int16\"}],4),{members:cr}=Pt;var br={},Nr=s,Ri=hi;function hi(R,S,F,W,te){this.properties={},this.extent=F,this.type=0,this._pbf=R,this._geometry=-1,this._keys=W,this._values=te,R.readFields(wi,this,S)}function wi(R,S,F){R==1?S.id=F.readVarint():R==2?function(W,te){for(var fe=W.readVarint()+W.pos;W.pos<fe;){var pe=te._keys[W.readVarint()],ze=te._values[W.readVarint()];te.properties[pe]=ze}}(F,S):R==3?S.type=F.readVarint():R==4&&(S._geometry=F.pos)}function gn(R){for(var S,F,W=0,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)W+=((F=R[pe]).x-(S=R[te]).x)*(S.y+F.y);return W}hi.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],hi.prototype.loadGeometry=function(){var R=this._pbf;R.pos=this._geometry;for(var S,F=R.readVarint()+R.pos,W=1,te=0,fe=0,pe=0,ze=[];R.pos<F;){if(te<=0){var Ke=R.readVarint();W=7&Ke,te=Ke>>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(S&&ze.push(S),S=[]),S.push(new Nr(fe,pe));else{if(W!==7)throw new Error(\"unknown command \"+W);S&&S.push(S[0].clone())}}return S&&ze.push(S),ze},hi.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var S=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,ze=-1/0,Ke=1/0,ut=-1/0;R.pos<S;){if(W<=0){var Lt=R.readVarint();F=7&Lt,W=Lt>>3}if(W--,F===1||F===2)(te+=R.readSVarint())<pe&&(pe=te),te>ze&&(ze=te),(fe+=R.readSVarint())<Ke&&(Ke=fe),fe>ut&&(ut=fe);else if(F!==7)throw new Error(\"unknown command \"+F)}return[pe,Ke,ze,ut]},hi.prototype.toGeoJSON=function(R,S,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,ze=this.extent*S,Ke=this.loadGeometry(),ut=hi.types[this.type];function Lt(mr){for(var Lr=0;Lr<mr.length;Lr++){var zr=mr[Lr];mr[Lr]=[360*(zr.x+pe)/fe-180,360/Math.PI*Math.atan(Math.exp((180-360*(zr.y+ze)/fe)*Math.PI/180))-90]}}switch(this.type){case 1:var Qt=[];for(W=0;W<Ke.length;W++)Qt[W]=Ke[W][0];Lt(Ke=Qt);break;case 2:for(W=0;W<Ke.length;W++)Lt(Ke[W]);break;case 3:for(Ke=function(mr){var Lr=mr.length;if(Lr<=1)return[mr];for(var zr,ui,yi=[],dn=0;dn<Lr;dn++){var Fi=gn(mr[dn]);Fi!==0&&(ui===void 0&&(ui=Fi<0),ui===Fi<0?(zr&&yi.push(zr),zr=[mr[dn]]):zr.push(mr[dn]))}return zr&&yi.push(zr),yi}(Ke),W=0;W<Ke.length;W++)for(te=0;te<Ke[W].length;te++)Lt(Ke[W][te])}Ke.length===1?Ke=Ke[0]:ut=\"Multi\"+ut;var fr={type:\"Feature\",geometry:{type:ut,coordinates:Ke},properties:this.properties};return\"id\"in this&&(fr.id=this.id),fr};var tn=Ri,Ci=qi;function qi(R,S){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(Vi,this,S),this.length=this._features.length}function Vi(R,S,F){R===15?S.version=F.readVarint():R===1?S.name=F.readString():R===5?S.extent=F.readVarint():R===2?S._features.push(F.pos):R===3?S._keys.push(F.readString()):R===4&&S._values.push(function(W){for(var te=null,fe=W.readVarint()+W.pos;W.pos<fe;){var pe=W.readVarint()>>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}qi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[R];var S=this._pbf.readVarint()+this._pbf.pos;return new tn(this._pbf,S,this.extent,this._keys,this._values)};var on=Ci;function On(R,S,F){if(R===3){var W=new on(F,F.readVarint()+F.pos);W.length&&(S[W.name]=W)}}br.VectorTile=function(R,S){this.layers=R.readFields(On,{},S)},br.VectorTileFeature=Ri,br.VectorTileLayer=Ci;let Ja=br.VectorTileFeature.types,co=Math.pow(2,13);function rs(R,S,F,W,te,fe,pe,ze){R.emplaceBack(S,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(ze))}class so{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Es(S.layers,S.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.features=[],this.hasPattern=at(\"fill-extrusion\",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:ze}of S){let Ke=this.layers[0]._featureFilter.needGeometry,ut=Ml(te,Ke);if(!this.layers[0]._featureFilter.filter(new is(this.zoom),ut,W))continue;let Lt={id:fe,sourceLayerIndex:ze,index:pe,geometry:Ke?ut.geometry:Qs(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(kt(\"fill-extrusion\",this.layers,Lt,this.zoom,F)):this.addFeature(Lt,Lt.geometry,pe,W,{}),F.featureIndex.insert(te,Lt.geometry,pe,ze,this.index,!0)}}addFeatures(S,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,cr),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,ht.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let ze={x:0,y:0,vertexCount:0},Ke=0;for(let Lr of pe)Ke+=Lr.length;let ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Lr of pe){if(Lr.length===0||ys(Lr))continue;let zr=0;for(let ui=0;ui<Lr.length;ui++){let yi=Lr[ui];if(ui>=1){let dn=Lr[ui-1];if(!Zo(yi,dn)){ut.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Fi=yi.sub(dn)._perp()._unit(),ln=dn.dist(yi);zr+ln>32768&&(zr=0),rs(this.layoutVertexArray,yi.x,yi.y,Fi.x,Fi.y,0,0,zr),rs(this.layoutVertexArray,yi.x,yi.y,Fi.x,Fi.y,0,1,zr),ze.x+=2*yi.x,ze.y+=2*yi.y,ze.vertexCount+=2,zr+=ln,rs(this.layoutVertexArray,dn.x,dn.y,Fi.x,Fi.y,0,0,zr),rs(this.layoutVertexArray,dn.x,dn.y,Fi.x,Fi.y,0,1,zr),ze.x+=2*dn.x,ze.y+=2*dn.y,ze.vertexCount+=2;let An=ut.vertexLength;this.indexArray.emplaceBack(An,An+2,An+1),this.indexArray.emplaceBack(An+1,An+2,An+3),ut.vertexLength+=4,ut.primitiveLength+=2}}}}if(ut.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ut=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[S.type]!==\"Polygon\")continue;let Lt=[],Qt=[],fr=ut.vertexLength;for(let Lr of pe)if(Lr.length!==0){Lr!==pe[0]&&Qt.push(Lt.length/2);for(let zr=0;zr<Lr.length;zr++){let ui=Lr[zr];rs(this.layoutVertexArray,ui.x,ui.y,0,0,1,1,0),ze.x+=ui.x,ze.y+=ui.y,ze.vertexCount+=1,Lt.push(ui.x),Lt.push(ui.y)}}let mr=zo(Lt,Qt);for(let Lr=0;Lr<mr.length;Lr+=3)this.indexArray.emplaceBack(fr+mr[Lr],fr+mr[Lr+2],fr+mr[Lr+1]);ut.primitiveLength+=mr.length/3,ut.vertexLength+=Ke;for(let Lr=0;Lr<ze.vertexCount;Lr++){let zr=Math.floor(ze.x/ze.vertexCount),ui=Math.floor(ze.y/ze.vertexCount);this.centroidVertexArray.emplaceBack(zr,ui)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}}function Zo(R,S){return R.x===S.x&&(R.x<0||R.x>Ha)||R.y===S.y&&(R.y<0||R.y>Ha)}function ys(R){return R.every(S=>S.x<0)||R.every(S=>S.x>Ha)||R.every(S=>S.y<0)||R.every(S=>S.y>Ha)}let ou;Di(\"FillExtrusionBucket\",so,{omit:[\"layers\",\"features\"]});var Cv={get paint(){return ou=ou||new ue({\"fill-extrusion-opacity\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new Vc(ce[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\"fill-extrusion-vertical-gradient\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"])})}};class kv extends B{constructor(S){super(S,Cv)}createBucket(S){return new so(S)}queryRadius(){return Hn(this.paint.get(\"fill-extrusion-translate\"))}is3D(){return!0}queryIntersectsFeature(S,F,W,te,fe,pe,ze,Ke){let ut=Qi(S,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),pe.angle,ze),Lt=this.paint.get(\"fill-extrusion-height\").evaluate(F,W),Qt=this.paint.get(\"fill-extrusion-base\").evaluate(F,W),fr=function(Lr,zr,ui,yi){let dn=[];for(let Fi of Lr){let ln=[Fi.x,Fi.y,0,1];qn(ln,ln,zr),dn.push(new u(ln[0]/ln[3],ln[1]/ln[3]))}return dn}(ut,Ke),mr=function(Lr,zr,ui,yi){let dn=[],Fi=[],ln=yi[8]*zr,An=yi[9]*zr,pa=yi[10]*zr,ro=yi[11]*zr,Vo=yi[8]*ui,Xa=yi[9]*ui,sa=yi[10]*ui,Mo=yi[11]*ui;for(let fo of Lr){let lo=[],Xn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=yi[0]*uo+yi[4]*$o+yi[12],qu=yi[1]*uo+yi[5]*$o+yi[13],Th=yi[2]*uo+yi[6]*$o+yi[14],$v=yi[3]*uo+yi[7]*$o+yi[15],ld=Th+pa,Ah=$v+ro,Gd=Ju+Vo,Hd=qu+Xa,jd=Th+sa,Tf=$v+Mo,Sh=new u((Ju+ln)/Ah,(qu+An)/Ah);Sh.z=ld/Ah,lo.push(Sh);let Ed=new u(Gd/Tf,Hd/Tf);Ed.z=jd/Tf,Xn.push(Ed)}dn.push(lo),Fi.push(Xn)}return[dn,Fi]}(te,Qt,Lt,Ke);return function(Lr,zr,ui){let yi=1/0;xt(ui,zr)&&(yi=Yv(ui,zr[0]));for(let dn=0;dn<zr.length;dn++){let Fi=zr[dn],ln=Lr[dn];for(let An=0;An<Fi.length-1;An++){let pa=Fi[An],ro=[pa,Fi[An+1],ln[An+1],ln[An],pa];Sc(ui,ro)&&(yi=Math.min(yi,Yv(ui,ro)))}}return yi!==1/0&&yi}(mr[0],mr[1],fr)}}function wd(R,S){return R.x*S.x+R.y*S.y}function Yv(R,S){if(R.length===1){let F=0,W=S[F++],te;for(;!te||W.equals(te);)if(te=S[F++],!te)return 1/0;for(;F<S.length;F++){let fe=S[F],pe=R[0],ze=te.sub(W),Ke=fe.sub(W),ut=pe.sub(W),Lt=wd(ze,ze),Qt=wd(ze,Ke),fr=wd(Ke,Ke),mr=wd(ut,ze),Lr=wd(ut,Ke),zr=Lt*fr-Qt*Qt,ui=(fr*mr-Qt*Lr)/zr,yi=(Lt*Lr-Qt*mr)/zr,dn=W.z*(1-ui-yi)+te.z*ui+fe.z*yi;if(isFinite(dn))return dn}return 1/0}{let F=1/0;for(let W of S)F=Math.min(F,W.z);return F}}let cg=qe([{name:\"a_pos_normal\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4),{members:dp}=cg,Td=qe([{name:\"a_uv_x\",components:1,type:\"Float32\"},{name:\"a_split_index\",components:1,type:\"Float32\"}]),{members:vp}=Td,Vd=br.VectorTileFeature.types,Ad=Math.cos(Math.PI/180*37.5),Lv=Math.pow(2,14)/.5;class Kv{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Es(S.layers,S.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at(\"line\",this.layers,F);let te=this.layers[0].layout.get(\"line-sort-key\"),fe=!te.isConstant(),pe=[];for(let{feature:ze,id:Ke,index:ut,sourceLayerIndex:Lt}of S){let Qt=this.layers[0]._featureFilter.needGeometry,fr=Ml(ze,Qt);if(!this.layers[0]._featureFilter.filter(new is(this.zoom),fr,W))continue;let mr=fe?te.evaluate(fr,{},W):void 0,Lr={id:Ke,properties:ze.properties,type:ze.type,sourceLayerIndex:Lt,index:ut,geometry:Qt?fr.geometry:Qs(ze),patterns:{},sortKey:mr};pe.push(Lr)}fe&&pe.sort((ze,Ke)=>ze.sortKey-Ke.sortKey);for(let ze of pe){let{geometry:Ke,index:ut,sourceLayerIndex:Lt}=ze;if(this.hasPattern){let Qt=kt(\"line\",this.layers,ze,this.zoom,F);this.patternFeatures.push(Qt)}else this.addFeature(ze,Ke,ut,W,{});F.featureIndex.insert(S[ut].feature,Ke,ut,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,vp)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,dp),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,\"mapbox_clip_start\")&&Object.prototype.hasOwnProperty.call(S.properties,\"mapbox_clip_end\"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,F,W,te,fe){let pe=this.layers[0].layout,ze=pe.get(\"line-join\").evaluate(S,{}),Ke=pe.get(\"line-cap\"),ut=pe.get(\"line-miter-limit\"),Lt=pe.get(\"line-round-limit\");this.lineClips=this.lineFeatureClips(S);for(let Qt of F)this.addLine(Qt,S,ze,Ke,ut,Lt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}addLine(S,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let yi=0;yi<S.length-1;yi++)this.totalDistance+=S[yi].dist(S[yi+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let ze=Vd[F.type]===\"Polygon\",Ke=S.length;for(;Ke>=2&&S[Ke-1].equals(S[Ke-2]);)Ke--;let ut=0;for(;ut<Ke-1&&S[ut].equals(S[ut+1]);)ut++;if(Ke<(ze?3:2))return;W===\"bevel\"&&(fe=1.05);let Lt=this.overscaling<=16?15*Ha/(512*this.overscaling):0,Qt=this.segments.prepareSegment(10*Ke,this.layoutVertexArray,this.indexArray),fr,mr,Lr,zr,ui;this.e1=this.e2=-1,ze&&(fr=S[Ke-2],ui=S[ut].sub(fr)._unit()._perp());for(let yi=ut;yi<Ke;yi++){if(Lr=yi===Ke-1?ze?S[ut+1]:void 0:S[yi+1],Lr&&S[yi].equals(Lr))continue;ui&&(zr=ui),fr&&(mr=fr),fr=S[yi],ui=Lr?Lr.sub(fr)._unit()._perp():zr,zr=zr||ui;let dn=zr.add(ui);dn.x===0&&dn.y===0||dn._unit();let Fi=zr.x*ui.x+zr.y*ui.y,ln=dn.x*ui.x+dn.y*ui.y,An=ln!==0?1/ln:1/0,pa=2*Math.sqrt(2-2*ln),ro=ln<Ad&&mr&&Lr,Vo=zr.x*ui.y-zr.y*ui.x>0;if(ro&&yi>ut){let Mo=fr.dist(mr);if(Mo>2*Lt){let fo=fr.sub(fr.sub(mr)._mult(Lt/Mo)._round());this.updateDistance(mr,fo),this.addCurrentVertex(fo,zr,0,0,Qt),mr=fo}}let Xa=mr&&Lr,sa=Xa?W:ze?\"butt\":te;if(Xa&&sa===\"round\"&&(An<pe?sa=\"miter\":An<=2&&(sa=\"fakeround\")),sa===\"miter\"&&An>fe&&(sa=\"bevel\"),sa===\"bevel\"&&(An>2&&(sa=\"flipbevel\"),An<fe&&(sa=\"miter\")),mr&&this.updateDistance(mr,fr),sa===\"miter\")dn._mult(An),this.addCurrentVertex(fr,dn,0,0,Qt);else if(sa===\"flipbevel\"){if(An>100)dn=ui.mult(-1);else{let Mo=An*zr.add(ui).mag()/zr.sub(ui).mag();dn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(fr,dn,0,0,Qt),this.addCurrentVertex(fr,dn.mult(-1),0,0,Qt)}else if(sa===\"bevel\"||sa===\"fakeround\"){let Mo=-Math.sqrt(An*An-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(mr&&this.addCurrentVertex(fr,zr,fo,lo,Qt),sa===\"fakeround\"){let Xn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro<Xn;Ro++){let uo=Ro/Xn;if(uo!==.5){let Ju=uo-.5;uo+=uo*Ju*(uo-1)*((1.0904+Fi*(Fi*(3.55645-1.43519*Fi)-3.2452))*Ju*Ju+(.848013+Fi*(.215638*Fi-1.06021)))}let $o=ui.sub(zr)._mult(uo)._add(zr)._unit()._mult(Vo?-1:1);this.addHalfVertex(fr,$o.x,$o.y,!1,Vo,0,Qt)}}Lr&&this.addCurrentVertex(fr,ui,-fo,-lo,Qt)}else if(sa===\"butt\")this.addCurrentVertex(fr,dn,0,0,Qt);else if(sa===\"square\"){let Mo=mr?1:-1;this.addCurrentVertex(fr,dn,Mo,Mo,Qt)}else sa===\"round\"&&(mr&&(this.addCurrentVertex(fr,zr,0,0,Qt),this.addCurrentVertex(fr,zr,1,1,Qt,!0)),Lr&&(this.addCurrentVertex(fr,ui,-1,-1,Qt,!0),this.addCurrentVertex(fr,ui,0,0,Qt)));if(ro&&yi<Ke-1){let Mo=fr.dist(Lr);if(Mo>2*Lt){let fo=fr.add(Lr.sub(fr)._mult(Lt/Mo)._round());this.updateDistance(fr,fo),this.addCurrentVertex(fo,ui,0,0,Qt),fr=fo}}}}addCurrentVertex(S,F,W,te,fe,pe=!1){let ze=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(S,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(S,ze,Ke,pe,!0,-te,fe),this.distance>Lv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,F,W,te,fe,pe))}addHalfVertex({x:S,y:F},W,te,fe,pe,ze,Ke){let ut=.5*(this.lineClips?this.scaledDistance*(Lv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ze===0?0:ze<0?-1:1)|(63&ut)<<2,ut>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Lt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Lt),Ke.primitiveLength++),pe?this.e2=Lt:this.e1=Lt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,F){this.distance+=S.dist(F),this.updateScaledDistance()}}let Pv,ny;Di(\"LineBucket\",Kv,{omit:[\"layers\",\"patternFeatures\"]});var fg={get paint(){return ny=ny||new ue({\"line-opacity\":new oo(ce.paint_line[\"line-opacity\"]),\"line-color\":new oo(ce.paint_line[\"line-color\"]),\"line-translate\":new Ua(ce.paint_line[\"line-translate\"]),\"line-translate-anchor\":new Ua(ce.paint_line[\"line-translate-anchor\"]),\"line-width\":new oo(ce.paint_line[\"line-width\"]),\"line-gap-width\":new oo(ce.paint_line[\"line-gap-width\"]),\"line-offset\":new oo(ce.paint_line[\"line-offset\"]),\"line-blur\":new oo(ce.paint_line[\"line-blur\"]),\"line-dasharray\":new hc(ce.paint_line[\"line-dasharray\"]),\"line-pattern\":new Vc(ce.paint_line[\"line-pattern\"]),\"line-gradient\":new Ku(ce.paint_line[\"line-gradient\"])})},get layout(){return Pv=Pv||new ue({\"line-cap\":new Ua(ce.layout_line[\"line-cap\"]),\"line-join\":new oo(ce.layout_line[\"line-join\"]),\"line-miter-limit\":new Ua(ce.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new Ua(ce.layout_line[\"line-round-limit\"]),\"line-sort-key\":new oo(ce.layout_line[\"line-sort-key\"])})}};class oh extends oo{possiblyEvaluate(S,F){return F=new is(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(S,F)}evaluate(S,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(S,F,W,te)}}let hg;class ay extends B{constructor(S){super(S,fg),this.gradientVersion=0,hg||(hg=new oh(fg.paint.properties[\"line-width\"].specification),hg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S===\"line-gradient\"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values[\"line-gradient\"].value.expression}recalculate(S,F){super.recalculate(S,F),this.paint._values[\"line-floorwidth\"]=hg.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,S)}createBucket(S){return new Kv(S)}queryRadius(S){let F=S,W=Gh(Mi(\"line-width\",this,F),Mi(\"line-gap-width\",this,F)),te=Mi(\"line-offset\",this,F);return W/2+Math.abs(te)+Hn(this.paint.get(\"line-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,ze){let Ke=Qi(S,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),pe.angle,ze),ut=ze/2*Gh(this.paint.get(\"line-width\").evaluate(F,W),this.paint.get(\"line-gap-width\").evaluate(F,W)),Lt=this.paint.get(\"line-offset\").evaluate(F,W);return Lt&&(te=function(Qt,fr){let mr=[];for(let Lr=0;Lr<Qt.length;Lr++){let zr=Qt[Lr],ui=[];for(let yi=0;yi<zr.length;yi++){let dn=zr[yi-1],Fi=zr[yi],ln=zr[yi+1],An=yi===0?new u(0,0):Fi.sub(dn)._unit()._perp(),pa=yi===zr.length-1?new u(0,0):ln.sub(Fi)._unit()._perp(),ro=An._add(pa)._unit(),Vo=ro.x*pa.x+ro.y*pa.y;Vo!==0&&ro._mult(1/Vo),ui.push(ro._mult(fr)._add(Fi))}mr.push(ui)}return mr}(te,Lt*ze)),function(Qt,fr,mr){for(let Lr=0;Lr<fr.length;Lr++){let zr=fr[Lr];if(Qt.length>=3){for(let ui=0;ui<zr.length;ui++)if(Ni(Qt,zr[ui]))return!0}if(zt(Qt,zr,mr))return!0}return!1}(Ke,te,ut)}isTileClipped(){return!0}}function Gh(R,S){return S>0?S+2*R:R}let rm=qe([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),w1=qe([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4);qe([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4);let T1=qe([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"},{name:\"a_box_real\",components:2,type:\"Int16\"}]);qe([{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]);let oy=qe([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4),im=qe([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);function nm(R,S,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let ze=fe.layout.get(\"text-transform\").evaluate(pe,{});return ze===\"uppercase\"?te=te.toLocaleUpperCase():ze===\"lowercase\"&&(te=te.toLocaleLowerCase()),_s.applyArabicShaping&&(te=_s.applyArabicShaping(te)),te}(W.text,S,F)}),R}qe([{name:\"triangle\",components:3,type:\"Uint16\"}]),qe([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),qe([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",name:\"collisionCircleDiameter\"},{type:\"Uint16\",name:\"textAnchorOffsetStartIndex\"},{type:\"Uint16\",name:\"textAnchorOffsetEndIndex\"}]),qe([{type:\"Float32\",name:\"offsetX\"}]),qe([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]),qe([{type:\"Uint16\",name:\"textAnchor\"},{type:\"Float32\",components:2,name:\"textOffset\"}]);let vc={\"!\":\"\\uFE15\",\"#\":\"\\uFF03\",$:\"\\uFF04\",\"%\":\"\\uFF05\",\"&\":\"\\uFF06\",\"(\":\"\\uFE35\",\")\":\"\\uFE36\",\"*\":\"\\uFF0A\",\"+\":\"\\uFF0B\",\",\":\"\\uFE10\",\"-\":\"\\uFE32\",\".\":\"\\u30FB\",\"/\":\"\\uFF0F\",\":\":\"\\uFE13\",\";\":\"\\uFE14\",\"<\":\"\\uFE3F\",\"=\":\"\\uFF1D\",\">\":\"\\uFE40\",\"?\":\"\\uFE16\",\"@\":\"\\uFF20\",\"[\":\"\\uFE47\",\"\\\\\":\"\\uFF3C\",\"]\":\"\\uFE48\",\"^\":\"\\uFF3E\",_:\"\\uFE33\",\"`\":\"\\uFF40\",\"{\":\"\\uFE37\",\"|\":\"\\u2015\",\"}\":\"\\uFE38\",\"~\":\"\\uFF5E\",\"\\xA2\":\"\\uFFE0\",\"\\xA3\":\"\\uFFE1\",\"\\xA5\":\"\\uFFE5\",\"\\xA6\":\"\\uFFE4\",\"\\xAC\":\"\\uFFE2\",\"\\xAF\":\"\\uFFE3\",\"\\u2013\":\"\\uFE32\",\"\\u2014\":\"\\uFE31\",\"\\u2018\":\"\\uFE43\",\"\\u2019\":\"\\uFE44\",\"\\u201C\":\"\\uFE41\",\"\\u201D\":\"\\uFE42\",\"\\u2026\":\"\\uFE19\",\"\\u2027\":\"\\u30FB\",\"\\u20A9\":\"\\uFFE6\",\"\\u3001\":\"\\uFE11\",\"\\u3002\":\"\\uFE12\",\"\\u3008\":\"\\uFE3F\",\"\\u3009\":\"\\uFE40\",\"\\u300A\":\"\\uFE3D\",\"\\u300B\":\"\\uFE3E\",\"\\u300C\":\"\\uFE41\",\"\\u300D\":\"\\uFE42\",\"\\u300E\":\"\\uFE43\",\"\\u300F\":\"\\uFE44\",\"\\u3010\":\"\\uFE3B\",\"\\u3011\":\"\\uFE3C\",\"\\u3014\":\"\\uFE39\",\"\\u3015\":\"\\uFE3A\",\"\\u3016\":\"\\uFE17\",\"\\u3017\":\"\\uFE18\",\"\\uFF01\":\"\\uFE15\",\"\\uFF08\":\"\\uFE35\",\"\\uFF09\":\"\\uFE36\",\"\\uFF0C\":\"\\uFE10\",\"\\uFF0D\":\"\\uFE32\",\"\\uFF0E\":\"\\u30FB\",\"\\uFF1A\":\"\\uFE13\",\"\\uFF1B\":\"\\uFE14\",\"\\uFF1C\":\"\\uFE3F\",\"\\uFF1E\":\"\\uFE40\",\"\\uFF1F\":\"\\uFE16\",\"\\uFF3B\":\"\\uFE47\",\"\\uFF3D\":\"\\uFE48\",\"\\uFF3F\":\"\\uFE33\",\"\\uFF5B\":\"\\uFE37\",\"\\uFF5C\":\"\\u2015\",\"\\uFF5D\":\"\\uFE38\",\"\\uFF5F\":\"\\uFE35\",\"\\uFF60\":\"\\uFE36\",\"\\uFF61\":\"\\uFE12\",\"\\uFF62\":\"\\uFE41\",\"\\uFF63\":\"\\uFE42\"};var eu=24,Sd=wu,sy=function(R,S,F,W,te){var fe,pe,ze=8*te-W-1,Ke=(1<<ze)-1,ut=Ke>>1,Lt=-7,Qt=F?te-1:0,fr=F?-1:1,mr=R[S+Qt];for(Qt+=fr,fe=mr&(1<<-Lt)-1,mr>>=-Lt,Lt+=ze;Lt>0;fe=256*fe+R[S+Qt],Qt+=fr,Lt-=8);for(pe=fe&(1<<-Lt)-1,fe>>=-Lt,Lt+=W;Lt>0;pe=256*pe+R[S+Qt],Qt+=fr,Lt-=8);if(fe===0)fe=1-ut;else{if(fe===Ke)return pe?NaN:1/0*(mr?-1:1);pe+=Math.pow(2,W),fe-=ut}return(mr?-1:1)*pe*Math.pow(2,fe-W)},A1=function(R,S,F,W,te,fe){var pe,ze,Ke,ut=8*fe-te-1,Lt=(1<<ut)-1,Qt=Lt>>1,fr=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,mr=W?0:fe-1,Lr=W?1:-1,zr=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(ze=isNaN(S)?1:0,pe=Lt):(pe=Math.floor(Math.log(S)/Math.LN2),S*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(S+=pe+Qt>=1?fr/Ke:fr*Math.pow(2,1-Qt))*Ke>=2&&(pe++,Ke/=2),pe+Qt>=Lt?(ze=0,pe=Lt):pe+Qt>=1?(ze=(S*Ke-1)*Math.pow(2,te),pe+=Qt):(ze=S*Math.pow(2,Qt-1)*Math.pow(2,te),pe=0));te>=8;R[F+mr]=255&ze,mr+=Lr,ze/=256,te-=8);for(pe=pe<<te|ze,ut+=te;ut>0;R[F+mr]=255&pe,mr+=Lr,pe/=256,ut-=8);R[F+mr-Lr]|=128*zr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Bx=4294967296,am=1/Bx,Mw=typeof TextDecoder==\"undefined\"?null:new TextDecoder(\"utf-8\");function Iv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function om(R,S,F){return F?4294967296*S+(R>>>0):4294967296*(S>>>0)+(R>>>0)}function Ew(R,S,F){var W=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Nx(R,S){for(var F=0;F<R.length;F++)S.writeVarint(R[F])}function F9(R,S){for(var F=0;F<R.length;F++)S.writeSVarint(R[F])}function z9(R,S){for(var F=0;F<R.length;F++)S.writeFloat(R[F])}function O9(R,S){for(var F=0;F<R.length;F++)S.writeDouble(R[F])}function q9(R,S){for(var F=0;F<R.length;F++)S.writeBoolean(R[F])}function EQ(R,S){for(var F=0;F<R.length;F++)S.writeFixed32(R[F])}function B9(R,S){for(var F=0;F<R.length;F++)S.writeSFixed32(R[F])}function N9(R,S){for(var F=0;F<R.length;F++)S.writeFixed64(R[F])}function U9(R,S){for(var F=0;F<R.length;F++)S.writeSFixed64(R[F])}function ly(R,S){return(R[S]|R[S+1]<<8|R[S+2]<<16)+16777216*R[S+3]}function Ux(R,S,F){R[F]=S,R[F+1]=S>>>8,R[F+2]=S>>>16,R[F+3]=S>>>24}function gk(R,S){return(R[S]|R[S+1]<<8|R[S+2]<<16)+(R[S+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,S,F){for(F=F||this.length;this.pos<F;){var W=this.readVarint(),te=W>>3,fe=this.pos;this.type=7&W,R(te,S,this),this.pos===fe&&this.skip(W)}return S},readMessage:function(R,S){return this.readFields(R,S,this.readVarint()+this.pos)},readFixed32:function(){var R=ly(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=gk(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=ly(this.buf,this.pos)+ly(this.buf,this.pos+4)*Bx;return this.pos+=8,R},readSFixed64:function(){var R=ly(this.buf,this.pos)+gk(this.buf,this.pos+4)*Bx;return this.pos+=8,R},readFloat:function(){var R=sy(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=sy(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var S,F,W=this.buf;return S=127&(F=W[this.pos++]),F<128?S:(S|=(127&(F=W[this.pos++]))<<7,F<128?S:(S|=(127&(F=W[this.pos++]))<<14,F<128?S:(S|=(127&(F=W[this.pos++]))<<21,F<128?S:function(te,fe,pe){var ze,Ke,ut=pe.buf;if(ze=(112&(Ke=ut[pe.pos++]))>>4,Ke<128||(ze|=(127&(Ke=ut[pe.pos++]))<<3,Ke<128)||(ze|=(127&(Ke=ut[pe.pos++]))<<10,Ke<128)||(ze|=(127&(Ke=ut[pe.pos++]))<<17,Ke<128)||(ze|=(127&(Ke=ut[pe.pos++]))<<24,Ke<128)||(ze|=(1&(Ke=ut[pe.pos++]))<<31,Ke<128))return om(te,ze,fe);throw new Error(\"Expected varint not more than 10 bytes\")}(S|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,S=this.pos;return this.pos=R,R-S>=12&&Mw?function(F,W,te){return Mw.decode(F.subarray(W,te))}(this.buf,S,R):function(F,W,te){for(var fe=\"\",pe=W;pe<te;){var ze,Ke,ut,Lt=F[pe],Qt=null,fr=Lt>239?4:Lt>223?3:Lt>191?2:1;if(pe+fr>te)break;fr===1?Lt<128&&(Qt=Lt):fr===2?(192&(ze=F[pe+1]))==128&&(Qt=(31&Lt)<<6|63&ze)<=127&&(Qt=null):fr===3?(Ke=F[pe+2],(192&(ze=F[pe+1]))==128&&(192&Ke)==128&&((Qt=(15&Lt)<<12|(63&ze)<<6|63&Ke)<=2047||Qt>=55296&&Qt<=57343)&&(Qt=null)):fr===4&&(Ke=F[pe+2],ut=F[pe+3],(192&(ze=F[pe+1]))==128&&(192&Ke)==128&&(192&ut)==128&&((Qt=(15&Lt)<<18|(63&ze)<<12|(63&Ke)<<6|63&ut)<=65535||Qt>=1114112)&&(Qt=null)),Qt===null?(Qt=65533,fr=1):Qt>65535&&(Qt-=65536,fe+=String.fromCharCode(Qt>>>10&1023|55296),Qt=56320|1023&Qt),fe+=String.fromCharCode(Qt),pe+=fr}return fe}(this.buf,S,R)},readBytes:function(){var R=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,R);return this.pos=R,S},readPackedVarint:function(R,S){if(this.type!==wu.Bytes)return R.push(this.readVarint(S));var F=Iv(this);for(R=R||[];this.pos<F;)R.push(this.readVarint(S));return R},readPackedSVarint:function(R){if(this.type!==wu.Bytes)return R.push(this.readSVarint());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==wu.Bytes)return R.push(this.readBoolean());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==wu.Bytes)return R.push(this.readFloat());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==wu.Bytes)return R.push(this.readDouble());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed32());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed32());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed64());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed64());var S=Iv(this);for(R=R||[];this.pos<S;)R.push(this.readSFixed64());return R},skip:function(R){var S=7&R;if(S===wu.Varint)for(;this.buf[this.pos++]>127;);else if(S===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(S===wu.Fixed32)this.pos+=4;else{if(S!==wu.Fixed64)throw new Error(\"Unimplemented type: \"+S);this.pos+=8}},writeTag:function(R,S){this.writeVarint(R<<3|S)},realloc:function(R){for(var S=this.length||16;S<this.pos+R;)S*=2;if(S!==this.length){var F=new Uint8Array(S);F.set(this.buf),this.buf=F,this.length=S}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),Ux(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),Ux(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),Ux(this.buf,-1&R,this.pos),Ux(this.buf,Math.floor(R*am),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),Ux(this.buf,-1&R,this.pos),Ux(this.buf,Math.floor(R*am),this.pos+4),this.pos+=8},writeVarint:function(R){(R=+R||0)>268435455||R<0?function(S,F){var W,te;if(S>=0?(W=S%4294967296|0,te=S/4294967296|0):(te=~(-S/4294967296),4294967295^(W=~(-S%4294967296))?W=W+1|0:(W=0,te=te+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error(\"Given varint doesn't fit into 10 bytes\");F.realloc(10),function(fe,pe,ze){ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,ze.buf[ze.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var ze=(7&fe)<<4;pe.buf[pe.pos++]|=ze|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var S=this.pos;this.pos=function(W,te,fe){for(var pe,ze,Ke=0;Ke<te.length;Ke++){if((pe=te.charCodeAt(Ke))>55295&&pe<57344){if(!ze){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):ze=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,ze=pe;continue}pe=ze-55296<<10|pe-56320|65536,ze=null}else ze&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,ze=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-S;F>=128&&Ew(S,F,this),this.pos=S-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),A1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),A1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var S=R.length;this.writeVarint(S),this.realloc(S);for(var F=0;F<S;F++)this.buf[this.pos++]=R[F]},writeRawMessage:function(R,S){this.pos++;var F=this.pos;R(S,this);var W=this.pos-F;W>=128&&Ew(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,S,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(S,F)},writePackedVarint:function(R,S){S.length&&this.writeMessage(R,Nx,S)},writePackedSVarint:function(R,S){S.length&&this.writeMessage(R,F9,S)},writePackedBoolean:function(R,S){S.length&&this.writeMessage(R,q9,S)},writePackedFloat:function(R,S){S.length&&this.writeMessage(R,z9,S)},writePackedDouble:function(R,S){S.length&&this.writeMessage(R,O9,S)},writePackedFixed32:function(R,S){S.length&&this.writeMessage(R,EQ,S)},writePackedSFixed32:function(R,S){S.length&&this.writeMessage(R,B9,S)},writePackedFixed64:function(R,S){S.length&&this.writeMessage(R,N9,S)},writePackedSFixed64:function(R,S){S.length&&this.writeMessage(R,U9,S)},writeBytesField:function(R,S){this.writeTag(R,wu.Bytes),this.writeBytes(S)},writeFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeSFixed64(S)},writeVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeVarint(S)},writeSVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeSVarint(S)},writeStringField:function(R,S){this.writeTag(R,wu.Bytes),this.writeString(S)},writeFloatField:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFloat(S)},writeDoubleField:function(R,S){this.writeTag(R,wu.Fixed64),this.writeDouble(S)},writeBooleanField:function(R,S){this.writeVarintField(R,!!S)}};var tS=o(Sd);let rS=3;function CQ(R,S,F){R===1&&F.readMessage(V9,S)}function V9(R,S,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:ze,top:Ke,advance:ut}=F.readMessage(mk,{});S.push({id:W,bitmap:new na({width:fe+2*rS,height:pe+2*rS},te),metrics:{width:fe,height:pe,left:ze,top:Ke,advance:ut}})}}function mk(R,S,F){R===1?S.id=F.readVarint():R===2?S.bitmap=F.readBytes():R===3?S.width=F.readVarint():R===4?S.height=F.readVarint():R===5?S.left=F.readSVarint():R===6?S.top=F.readSVarint():R===7&&(S.advance=F.readVarint())}let yk=rS;function iS(R){let S=0,F=0;for(let pe of R)S+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,ze)=>ze.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let ze=W.length-1;ze>=0;ze--){let Ke=W[ze];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ut=W.pop();ze<W.length&&(W[ze]=ut)}else pe.h===Ke.h?(Ke.x+=pe.w,Ke.w-=pe.w):pe.w===Ke.w?(Ke.y+=pe.h,Ke.h-=pe.h):(W.push({x:Ke.x+pe.w,y:Ke.y,w:Ke.w-pe.w,h:pe.h}),Ke.y+=pe.h,Ke.h-=pe.h);break}}return{w:te,h:fe,fill:S/(te*fe)||0}}let Md=1;class Cw{constructor(S,{pixelRatio:F,version:W,stretchX:te,stretchY:fe,content:pe,textFitWidth:ze,textFitHeight:Ke}){this.paddedRect=S,this.pixelRatio=F,this.stretchX=te,this.stretchY=fe,this.content=pe,this.version=W,this.textFitWidth=ze,this.textFitHeight=Ke}get tl(){return[this.paddedRect.x+Md,this.paddedRect.y+Md]}get br(){return[this.paddedRect.x+this.paddedRect.w-Md,this.paddedRect.y+this.paddedRect.h-Md]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Md)/this.pixelRatio,(this.paddedRect.h-2*Md)/this.pixelRatio]}}class kw{constructor(S,F){let W={},te={};this.haveRenderCallbacks=[];let fe=[];this.addImages(S,W,fe),this.addImages(F,te,fe);let{w:pe,h:ze}=iS(fe),Ke=new Yi({width:pe||1,height:ze||1});for(let ut in S){let Lt=S[ut],Qt=W[ut].paddedRect;Yi.copy(Lt.data,Ke,{x:0,y:0},{x:Qt.x+Md,y:Qt.y+Md},Lt.data)}for(let ut in F){let Lt=F[ut],Qt=te[ut].paddedRect,fr=Qt.x+Md,mr=Qt.y+Md,Lr=Lt.data.width,zr=Lt.data.height;Yi.copy(Lt.data,Ke,{x:0,y:0},{x:fr,y:mr},Lt.data),Yi.copy(Lt.data,Ke,{x:0,y:zr-1},{x:fr,y:mr-1},{width:Lr,height:1}),Yi.copy(Lt.data,Ke,{x:0,y:0},{x:fr,y:mr+zr},{width:Lr,height:1}),Yi.copy(Lt.data,Ke,{x:Lr-1,y:0},{x:fr-1,y:mr},{width:1,height:zr}),Yi.copy(Lt.data,Ke,{x:0,y:0},{x:fr+Lr,y:mr},{width:1,height:zr})}this.image=Ke,this.iconPositions=W,this.patternPositions=te}addImages(S,F,W){for(let te in S){let fe=S[te],pe={x:0,y:0,w:fe.data.width+2*Md,h:fe.data.height+2*Md};W.push(pe),F[te]=new Cw(pe,fe),fe.hasRenderCallback&&this.haveRenderCallbacks.push(te)}}patchUpdatedImages(S,F){S.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let W in S.updatedImages)this.patchUpdatedImage(this.iconPositions[W],S.getImage(W),F),this.patchUpdatedImage(this.patternPositions[W],S.getImage(W),F)}patchUpdatedImage(S,F,W){if(!S||!F||S.version===F.version)return;S.version=F.version;let[te,fe]=S.tl;W.update(F.data,void 0,{x:te,y:fe})}}var Rv;Di(\"ImagePosition\",Cw),Di(\"ImageAtlas\",kw),i.ah=void 0,(Rv=i.ah||(i.ah={}))[Rv.none=0]=\"none\",Rv[Rv.horizontal=1]=\"horizontal\",Rv[Rv.vertical=2]=\"vertical\",Rv[Rv.horizontalOnly=3]=\"horizontalOnly\";let wh=-17;class Vx{constructor(){this.scale=1,this.fontStack=\"\",this.imageName=null}static forText(S,F){let W=new Vx;return W.scale=S||1,W.fontStack=F,W}static forImage(S){let F=new Vx;return F.imageName=S,F}}class S1{constructor(){this.text=\"\",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(S,F){let W=new S1;for(let te=0;te<S.sections.length;te++){let fe=S.sections[te];fe.image?W.addImageSection(fe):W.addTextSection(fe,F)}return W}length(){return this.text.length}getSection(S){return this.sections[this.sectionIndex[S]]}getSectionIndex(S){return this.sectionIndex[S]}getCharCode(S){return this.text.charCodeAt(S)}verticalizePunctuation(){this.text=function(S){let F=\"\";for(let W=0;W<S.length;W++){let te=S.charCodeAt(W+1)||null,fe=S.charCodeAt(W-1)||null;F+=te&&yl(te)&&!vc[S[W+1]]||fe&&yl(fe)&&!vc[S[W-1]]||!vc[S[W]]?S[W]:vc[S[W]]}return F}(this.text)}trim(){let S=0;for(let W=0;W<this.text.length&&Lw[this.text.charCodeAt(W)];W++)S++;let F=this.text.length;for(let W=this.text.length-1;W>=0&&W>=S&&Lw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(S,F),this.sectionIndex=this.sectionIndex.slice(S,F)}substring(S,F){let W=new S1;return W.text=this.text.substring(S,F),W.sectionIndex=this.sectionIndex.slice(S,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,F)=>Math.max(S,this.sections[F].scale),0)}addTextSection(S,F){this.text+=S.text,this.sections.push(Vx.forText(S.scale,S.fontStack||F));let W=this.sections.length-1;for(let te=0;te<S.text.length;++te)this.sectionIndex.push(W)}addImageSection(S){let F=S.image?S.image.name:\"\";if(F.length===0)return void T(\"Can't add FormattedSection with an empty image.\");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push(Vx.forImage(F)),this.sectionIndex.push(this.sections.length-1)):T(\"Reached maximum number of images 6401\")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Gx(R,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr){let zr=S1.fromFeature(R,te),ui;Qt===i.ah.vertical&&zr.verticalizePunctuation();let{processBidirectionalText:yi,processStyledBidirectionalText:dn}=_s;if(yi&&zr.sections.length===1){ui=[];let An=yi(zr.toString(),M1(zr,ut,fe,S,W,mr));for(let pa of An){let ro=new S1;ro.text=pa,ro.sections=zr.sections;for(let Vo=0;Vo<pa.length;Vo++)ro.sectionIndex.push(0);ui.push(ro)}}else if(dn){ui=[];let An=dn(zr.text,zr.sectionIndex,M1(zr,ut,fe,S,W,mr));for(let pa of An){let ro=new S1;ro.text=pa[0],ro.sectionIndex=pa[1],ro.sections=zr.sections,ui.push(ro)}}else ui=function(An,pa){let ro=[],Vo=An.text,Xa=0;for(let sa of pa)ro.push(An.substring(Xa,sa)),Xa=sa;return Xa<Vo.length&&ro.push(An.substring(Xa,Vo.length)),ro}(zr,M1(zr,ut,fe,S,W,mr));let Fi=[],ln={positionedLines:Fi,text:zr.toString(),top:Lt[1],bottom:Lt[1],left:Lt[0],right:Lt[0],writingMode:Qt,iconsInText:!1,verticalizable:!1};return function(An,pa,ro,Vo,Xa,sa,Mo,fo,lo,Xn,Ro,uo){let $o=0,Ju=wh,qu=0,Th=0,$v=fo===\"right\"?1:fo===\"left\"?0:.5,ld=0;for(let Tf of Xa){Tf.trim();let Sh=Tf.getMaxScale(),Ed=(Sh-1)*eu,ud={positionedGlyphs:[],lineOffset:0};An.positionedLines[ld]=ud;let Hh=ud.positionedGlyphs,Rf=0;if(!Tf.length()){Ju+=sa,++ld;continue}for(let lv=0;lv<Tf.length();lv++){let tu=Tf.getSection(lv),pc=Tf.getSectionIndex(lv),$u=Tf.getCharCode(lv),Fv=0,ff=null,I1=null,p0=null,Gp=eu,Qv=!(lo===i.ah.horizontal||!Ro&&!Ho($u)||Ro&&(Lw[$u]||(Ah=$u,new RegExp(\"\\\\p{sc=Arab}\",\"u\").test(String.fromCodePoint(Ah)))));if(tu.imageName){let Gc=Vo[tu.imageName];if(!Gc)continue;p0=tu.imageName,An.iconsInText=An.iconsInText||!0,I1=Gc.paddedRect;let Zf=Gc.displaySize;tu.scale=tu.scale*eu/uo,ff={width:Zf[0],height:Zf[1],left:Md,top:-yk,advance:Qv?Zf[1]:Zf[0]},Fv=Ed+(eu-Zf[1]*tu.scale),Gp=ff.advance;let ep=Qv?Zf[0]*tu.scale-eu*Sh:Zf[1]*tu.scale-eu*Sh;ep>0&&ep>Rf&&(Rf=ep)}else{let Gc=ro[tu.fontStack],Zf=Gc&&Gc[$u];if(Zf&&Zf.rect)I1=Zf.rect,ff=Zf.metrics;else{let ep=pa[tu.fontStack],gg=ep&&ep[$u];if(!gg)continue;ff=gg.metrics}Fv=(Sh-tu.scale)*eu}Qv?(An.verticalizable=!0,Hh.push({glyph:$u,imageName:p0,x:$o,y:Ju+Fv,vertical:Qv,scale:tu.scale,fontStack:tu.fontStack,sectionIndex:pc,metrics:ff,rect:I1}),$o+=Gp*tu.scale+Xn):(Hh.push({glyph:$u,imageName:p0,x:$o,y:Ju+Fv,vertical:Qv,scale:tu.scale,fontStack:tu.fontStack,sectionIndex:pc,metrics:ff,rect:I1}),$o+=ff.advance*tu.scale+Xn)}Hh.length!==0&&(qu=Math.max($o-Xn,qu),sm(Hh,0,Hh.length-1,$v,Rf)),$o=0;let Dv=sa*Sh+Rf;ud.lineOffset=Math.max(Rf,Ed),Ju+=Dv,Th=Math.max(Dv,Th),++ld}var Ah;let Gd=Ju-wh,{horizontalAlign:Hd,verticalAlign:jd}=Iw(Mo);(function(Tf,Sh,Ed,ud,Hh,Rf,Dv,lv,tu){let pc=(Sh-Ed)*Hh,$u=0;$u=Rf!==Dv?-lv*ud-wh:(-ud*tu+.5)*Dv;for(let Fv of Tf)for(let ff of Fv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(An.positionedLines,$v,Hd,jd,qu,Th,sa,Gd,Xa.length),An.top+=-jd*Gd,An.bottom=An.top+Gd,An.left+=-Hd*qu,An.right=An.left+qu}(ln,S,F,W,ui,pe,ze,Ke,Qt,ut,fr,Lr),!function(An){for(let pa of An)if(pa.positionedGlyphs.length!==0)return!1;return!0}(Fi)&&ln}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},G9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},H9={40:!0};function _k(R,S,F,W,te,fe){if(S.imageName){let pe=W[S.imageName];return pe?pe.displaySize[0]*S.scale*eu/fe+te:0}{let pe=F[S.fontStack],ze=pe&&pe[R];return ze?ze.metrics.advance*S.scale+te:0}}function xk(R,S,F,W){let te=Math.pow(R-S,2);return W?R<S?te/2:2*te:te+Math.abs(F)*F}function j9(R,S,F){let W=0;return R===10&&(W-=1e4),F&&(W+=150),R!==40&&R!==65288||(W+=50),S!==41&&S!==65289||(W+=50),W}function Pw(R,S,F,W,te,fe){let pe=null,ze=xk(S,F,te,fe);for(let Ke of W){let ut=xk(S-Ke.x,F,te,fe)+Ke.badness;ut<=ze&&(pe=Ke,ze=ut)}return{index:R,x:S,priorBreak:pe,badness:ze}}function bk(R){return R?bk(R.priorBreak).concat(R.index):[]}function M1(R,S,F,W,te,fe){if(!R)return[];let pe=[],ze=function(Qt,fr,mr,Lr,zr,ui){let yi=0;for(let dn=0;dn<Qt.length();dn++){let Fi=Qt.getSection(dn);yi+=_k(Qt.getCharCode(dn),Fi,Lr,zr,fr,ui)}return yi/Math.max(1,Math.ceil(yi/mr))}(R,S,F,W,te,fe),Ke=R.text.indexOf(\"\\u200B\")>=0,ut=0;for(let Qt=0;Qt<R.length();Qt++){let fr=R.getSection(Qt),mr=R.getCharCode(Qt);if(Lw[mr]||(ut+=_k(mr,fr,W,te,S,fe)),Qt<R.length()-1){let Lr=!((Lt=mr)<11904)&&(!!zn[\"CJK Compatibility Forms\"](Lt)||!!zn[\"CJK Compatibility\"](Lt)||!!zn[\"CJK Strokes\"](Lt)||!!zn[\"CJK Symbols and Punctuation\"](Lt)||!!zn[\"Enclosed CJK Letters and Months\"](Lt)||!!zn[\"Halfwidth and Fullwidth Forms\"](Lt)||!!zn[\"Ideographic Description Characters\"](Lt)||!!zn[\"Vertical Forms\"](Lt)||Ts.test(String.fromCodePoint(Lt)));(G9[mr]||Lr||fr.imageName||Qt!==R.length()-2&&H9[R.getCharCode(Qt+1)])&&pe.push(Pw(Qt+1,ut,ze,pe,j9(mr,R.getCharCode(Qt+1),Lr&&Ke),!1))}}var Lt;return bk(Pw(R.length(),ut,ze,pe,0,!0))}function Iw(R){let S=.5,F=.5;switch(R){case\"right\":case\"top-right\":case\"bottom-right\":S=1;break;case\"left\":case\"top-left\":case\"bottom-left\":S=0}switch(R){case\"bottom\":case\"bottom-right\":case\"bottom-left\":F=1;break;case\"top\":case\"top-right\":case\"top-left\":F=0}return{horizontalAlign:S,verticalAlign:F}}function sm(R,S,F,W,te){if(!W&&!te)return;let fe=R[F],pe=(R[F].x+fe.metrics.advance*fe.scale)*W;for(let ze=S;ze<=F;ze++)R[ze].x-=pe,R[ze].y+=te}function Hx(R,S,F){let{horizontalAlign:W,verticalAlign:te}=Iw(F),fe=S[0]-R.displaySize[0]*W,pe=S[1]-R.displaySize[1]*te;return{image:R,top:pe,bottom:pe+R.displaySize[1],left:fe,right:fe+R.displaySize[0]}}function wk(R){var S,F;let W=R.left,te=R.top,fe=R.right-W,pe=R.bottom-te,ze=(S=R.image.textFitWidth)!==null&&S!==void 0?S:\"stretchOrShrink\",Ke=(F=R.image.textFitHeight)!==null&&F!==void 0?F:\"stretchOrShrink\",ut=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ke===\"proportional\"){if(ze===\"stretchOnly\"&&fe/pe<ut||ze===\"proportional\"){let Lt=Math.ceil(pe*ut);W*=Lt/fe,fe=Lt}}else if(ze===\"proportional\"&&Ke===\"stretchOnly\"&&ut!==0&&fe/pe>ut){let Lt=Math.ceil(fe/ut);te*=Lt/pe,pe=Lt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function Tk(R,S,F,W,te,fe){let pe=R.image,ze;if(pe.content){let ui=pe.content,yi=pe.pixelRatio||1;ze=[ui[0]/yi,ui[1]/yi,pe.displaySize[0]-ui[2]/yi,pe.displaySize[1]-ui[3]/yi]}let Ke=S.left*fe,ut=S.right*fe,Lt,Qt,fr,mr;F===\"width\"||F===\"both\"?(mr=te[0]+Ke-W[3],Qt=te[0]+ut+W[1]):(mr=te[0]+(Ke+ut-pe.displaySize[0])/2,Qt=mr+pe.displaySize[0]);let Lr=S.top*fe,zr=S.bottom*fe;return F===\"height\"||F===\"both\"?(Lt=te[1]+Lr-W[0],fr=te[1]+zr+W[2]):(Lt=te[1]+(Lr+zr-pe.displaySize[1])/2,fr=Lt+pe.displaySize[1]),{image:pe,top:Lt,right:Qt,bottom:fr,left:mr,collisionPadding:ze}}let jx=255,v0=128,lm=jx*v0;function Ak(R,S){let{expression:F}=S;if(F.kind===\"constant\")return{kind:\"constant\",layoutSize:F.evaluate(new is(R+1))};if(F.kind===\"source\")return{kind:\"source\"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fe<W.length&&W[fe]<=R;)fe++;fe=Math.max(0,fe-1);let pe=fe;for(;pe<W.length&&W[pe]<R+1;)pe++;pe=Math.min(W.length-1,pe);let ze=W[fe],Ke=W[pe];return F.kind===\"composite\"?{kind:\"composite\",minZoom:ze,maxZoom:Ke,interpolationType:te}:{kind:\"camera\",minZoom:ze,maxZoom:Ke,minSize:F.evaluate(new is(ze)),maxSize:F.evaluate(new is(Ke)),interpolationType:te}}}function nS(R,S,F){let W=\"never\",te=R.get(S);return te?W=te:R.get(F)&&(W=\"always\"),W}let W9=br.VectorTileFeature.types,X9=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function Rw(R,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr){let mr=ze?Math.min(lm,Math.round(ze[0])):0,Lr=ze?Math.min(lm,Math.round(ze[1])):0;R.emplaceBack(S,F,Math.round(32*W),Math.round(32*te),fe,pe,(mr<<1)+(Ke?1:0),Lr,16*ut,16*Lt,256*Qt,256*fr)}function aS(R,S,F){R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F)}function oS(R){for(let S of R.sections)if(no(S.text))return!0;return!1}class sS{constructor(S){this.layoutVertexArray=new Ql,this.indexArray=new se,this.programConfigurations=S,this.segments=new Ye,this.dynamicLayoutVertexArray=new dc,this.opacityVertexArray=new Al,this.hasVisibleVertices=!1,this.placedSymbolArray=new Aa}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(S,F,W,te){this.isEmpty()||(W&&(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,rm.members),this.indexBuffer=S.createIndexBuffer(this.indexArray,F),this.dynamicLayoutVertexBuffer=S.createVertexBuffer(this.dynamicLayoutVertexArray,w1.members,!0),this.opacityVertexBuffer=S.createVertexBuffer(this.opacityVertexArray,X9,!0),this.opacityVertexBuffer.itemSize=1),(W||te)&&this.programConfigurations.upload(S))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Di(\"SymbolBuffers\",sS);class um{constructor(S,F,W){this.layoutVertexArray=new S,this.layoutAttributes=F,this.indexArray=new W,this.segments=new Ye,this.collisionVertexArray=new X}upload(S){this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=S.createVertexBuffer(this.collisionVertexArray,T1.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Di(\"CollisionBuffers\",um);class E1{constructor(S){this.collisionBoxArray=S.collisionBoxArray,this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(pe=>pe.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ii([]),this.placementViewportMatrix=Ii([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ak(this.zoom,F[\"text-size\"]),this.iconSizeData=Ak(this.zoom,F[\"icon-size\"]);let W=this.layers[0].layout,te=W.get(\"symbol-sort-key\"),fe=W.get(\"symbol-z-order\");this.canOverlap=nS(W,\"text-overlap\",\"text-allow-overlap\")!==\"never\"||nS(W,\"icon-overlap\",\"icon-allow-overlap\")!==\"never\"||W.get(\"text-ignore-placement\")||W.get(\"icon-ignore-placement\"),this.sortFeaturesByKey=fe!==\"viewport-y\"&&!te.isConstant(),this.sortFeaturesByY=(fe===\"viewport-y\"||fe===\"auto\"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get(\"symbol-placement\")===\"point\"&&(this.writingModes=W.get(\"text-writing-mode\").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=S.sourceID}createArrays(){this.text=new sS(new Es(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new sS(new Es(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new ko,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(S,F,W,te,fe){for(let pe=0;pe<S.length;pe++)if(F[S.charCodeAt(pe)]=!0,(W||te)&&fe){let ze=vc[S.charAt(pe)];ze&&(F[ze.charCodeAt(0)]=!0)}}populate(S,F,W){let te=this.layers[0],fe=te.layout,pe=fe.get(\"text-font\"),ze=fe.get(\"text-field\"),Ke=fe.get(\"icon-image\"),ut=(ze.value.kind!==\"constant\"||ze.value.value instanceof ri&&!ze.value.value.isEmpty()||ze.value.value.toString().length>0)&&(pe.value.kind!==\"constant\"||pe.value.value.length>0),Lt=Ke.value.kind!==\"constant\"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,Qt=fe.get(\"symbol-sort-key\");if(this.features=[],!ut&&!Lt)return;let fr=F.iconDependencies,mr=F.glyphDependencies,Lr=F.availableImages,zr=new is(this.zoom);for(let{feature:ui,id:yi,index:dn,sourceLayerIndex:Fi}of S){let ln=te._featureFilter.needGeometry,An=Ml(ui,ln);if(!te._featureFilter.filter(zr,An,W))continue;let pa,ro;if(ln||(An.geometry=Qs(ui)),ut){let Xa=te.getValueAndResolveTokens(\"text-field\",An,W,Lr),sa=ri.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||oS(sa);(!Mo||_s.getRTLTextPluginStatus()===\"unavailable\"||Mo&&_s.isParsed())&&(pa=nm(sa,te,An))}if(Lt){let Xa=te.getValueAndResolveTokens(\"icon-image\",An,W,Lr);ro=Xa instanceof en?Xa:en.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?Qt.evaluate(An,{},W):void 0;if(this.features.push({id:yi,text:pa,icon:ro,index:dn,sourceLayerIndex:Fi,geometry:An.geometry,properties:ui.properties,type:W9[ui.type],sortKey:Vo}),ro&&(fr[ro.name]=!0),pa){let Xa=pe.evaluate(An,{},W).join(\",\"),sa=fe.get(\"text-rotation-alignment\")!==\"viewport\"&&fe.get(\"symbol-placement\")!==\"point\";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)fr[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Xn=mr[lo]=mr[lo]||{};this.calculateGlyphDependencies(Mo.text,Xn,sa,this.allowVerticalPlacement,fo)}}}fe.get(\"symbol-placement\")===\"line\"&&(this.features=function(ui){let yi={},dn={},Fi=[],ln=0;function An(Xa){Fi.push(ui[Xa]),ln++}function pa(Xa,sa,Mo){let fo=dn[Xa];return delete dn[Xa],dn[sa]=fo,Fi[fo].geometry[0].pop(),Fi[fo].geometry[0]=Fi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,sa,Mo){let fo=yi[sa];return delete yi[sa],yi[Xa]=fo,Fi[fo].geometry[0].shift(),Fi[fo].geometry[0]=Mo[0].concat(Fi[fo].geometry[0]),fo}function Vo(Xa,sa,Mo){let fo=Mo?sa[0][sa[0].length-1]:sa[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;Xa<ui.length;Xa++){let sa=ui[Xa],Mo=sa.geometry,fo=sa.text?sa.text.toString():null;if(!fo){An(Xa);continue}let lo=Vo(fo,Mo),Xn=Vo(fo,Mo,!0);if(lo in dn&&Xn in yi&&dn[lo]!==yi[Xn]){let Ro=ro(lo,Xn,Mo),uo=pa(lo,Xn,Fi[Ro].geometry);delete yi[lo],delete dn[Xn],dn[Vo(fo,Fi[uo].geometry,!0)]=uo,Fi[Ro].geometry=null}else lo in dn?pa(lo,Xn,Mo):Xn in yi?ro(lo,Xn,Mo):(An(Xa),yi[lo]=ln-1,dn[Xn]=ln-1)}return Fi.filter(Xa=>Xa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ui,yi)=>ui.sortKey-yi.sortKey)}update(S,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(S,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(S,F){let W=this.lineVertexArray.length;if(S.segment!==void 0){let te=S.dist(F[S.segment+1]),fe=S.dist(F[S.segment]),pe={};for(let ze=S.segment+1;ze<F.length;ze++)pe[ze]={x:F[ze].x,y:F[ze].y,tileUnitDistanceFromAnchor:te},ze<F.length-1&&(te+=F[ze+1].dist(F[ze]));for(let ze=S.segment||0;ze>=0;ze--)pe[ze]={x:F[ze].x,y:F[ze].y,tileUnitDistanceFromAnchor:fe},ze>0&&(fe+=F[ze-1].dist(F[ze]));for(let ze=0;ze<F.length;ze++){let Ke=pe[ze];this.lineVertexArray.emplaceBack(Ke.x,Ke.y,Ke.tileUnitDistanceFromAnchor)}}return{lineStartIndex:W,lineLength:this.lineVertexArray.length-W}}addSymbols(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr){let mr=S.indexArray,Lr=S.layoutVertexArray,zr=S.segments.prepareSegment(4*F.length,Lr,mr,this.canOverlap?pe.sortKey:void 0),ui=this.glyphOffsetArray.length,yi=zr.vertexLength,dn=this.allowVerticalPlacement&&ze===i.ah.vertical?Math.PI/2:0,Fi=pe.text&&pe.text.sections;for(let ln=0;ln<F.length;ln++){let{tl:An,tr:pa,bl:ro,br:Vo,tex:Xa,pixelOffsetTL:sa,pixelOffsetBR:Mo,minFontScaleX:fo,minFontScaleY:lo,glyphOffset:Xn,isSDF:Ro,sectionIndex:uo}=F[ln],$o=zr.vertexLength,Ju=Xn[1];Rw(Lr,Ke.x,Ke.y,An.x,Ju+An.y,Xa.x,Xa.y,W,Ro,sa.x,sa.y,fo,lo),Rw(Lr,Ke.x,Ke.y,pa.x,Ju+pa.y,Xa.x+Xa.w,Xa.y,W,Ro,Mo.x,sa.y,fo,lo),Rw(Lr,Ke.x,Ke.y,ro.x,Ju+ro.y,Xa.x,Xa.y+Xa.h,W,Ro,sa.x,Mo.y,fo,lo),Rw(Lr,Ke.x,Ke.y,Vo.x,Ju+Vo.y,Xa.x+Xa.w,Xa.y+Xa.h,W,Ro,Mo.x,Mo.y,fo,lo),aS(S.dynamicLayoutVertexArray,Ke,dn),mr.emplaceBack($o,$o+1,$o+2),mr.emplaceBack($o+1,$o+2,$o+3),zr.vertexLength+=4,zr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Xn[0]),ln!==F.length-1&&uo===F[ln+1].sectionIndex||S.programConfigurations.populatePaintArrays(Lr.length,pe,pe.index,{},fr,Fi&&Fi[uo])}S.placedSymbolArray.emplaceBack(Ke.x,Ke.y,ui,this.glyphOffsetArray.length-ui,yi,ut,Lt,Ke.segment,W?W[0]:0,W?W[1]:0,te[0],te[1],ze,0,!1,0,Qt)}_addCollisionDebugVertex(S,F,W,te,fe,pe){return F.emplaceBack(0,0),S.emplaceBack(W.x,W.y,te,fe,Math.round(pe.x),Math.round(pe.y))}addCollisionDebugVertices(S,F,W,te,fe,pe,ze){let Ke=fe.segments.prepareSegment(4,fe.layoutVertexArray,fe.indexArray),ut=Ke.vertexLength,Lt=fe.layoutVertexArray,Qt=fe.collisionVertexArray,fr=ze.anchorX,mr=ze.anchorY;this._addCollisionDebugVertex(Lt,Qt,pe,fr,mr,new u(S,F)),this._addCollisionDebugVertex(Lt,Qt,pe,fr,mr,new u(W,F)),this._addCollisionDebugVertex(Lt,Qt,pe,fr,mr,new u(W,te)),this._addCollisionDebugVertex(Lt,Qt,pe,fr,mr,new u(S,te)),Ke.vertexLength+=4;let Lr=fe.indexArray;Lr.emplaceBack(ut,ut+1),Lr.emplaceBack(ut+1,ut+2),Lr.emplaceBack(ut+2,ut+3),Lr.emplaceBack(ut+3,ut),Ke.primitiveLength+=4}addDebugCollisionBoxes(S,F,W,te){for(let fe=S;fe<F;fe++){let pe=this.collisionBoxArray.get(fe);this.addCollisionDebugVertices(pe.x1,pe.y1,pe.x2,pe.y2,te?this.textCollisionBox:this.iconCollisionBox,pe.anchorPoint,W)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new um(Sl,oy.members,Te),this.iconCollisionBox=new um(Sl,oy.members,Te);for(let S=0;S<this.symbolInstances.length;S++){let F=this.symbolInstances.get(S);this.addDebugCollisionBoxes(F.textBoxStartIndex,F.textBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.verticalTextBoxStartIndex,F.verticalTextBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.iconBoxStartIndex,F.iconBoxEndIndex,F,!1),this.addDebugCollisionBoxes(F.verticalIconBoxStartIndex,F.verticalIconBoxEndIndex,F,!1)}}_deserializeCollisionBoxesForSymbol(S,F,W,te,fe,pe,ze,Ke,ut){let Lt={};for(let Qt=F;Qt<W;Qt++){let fr=S.get(Qt);Lt.textBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},Lt.textFeatureIndex=fr.featureIndex;break}for(let Qt=te;Qt<fe;Qt++){let fr=S.get(Qt);Lt.verticalTextBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},Lt.verticalTextFeatureIndex=fr.featureIndex;break}for(let Qt=pe;Qt<ze;Qt++){let fr=S.get(Qt);Lt.iconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},Lt.iconFeatureIndex=fr.featureIndex;break}for(let Qt=Ke;Qt<ut;Qt++){let fr=S.get(Qt);Lt.verticalIconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},Lt.verticalIconFeatureIndex=fr.featureIndex;break}return Lt}deserializeCollisionBoxes(S){this.collisionArrays=[];for(let F=0;F<this.symbolInstances.length;F++){let W=this.symbolInstances.get(F);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(S,W.textBoxStartIndex,W.textBoxEndIndex,W.verticalTextBoxStartIndex,W.verticalTextBoxEndIndex,W.iconBoxStartIndex,W.iconBoxEndIndex,W.verticalIconBoxStartIndex,W.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(S,F){let W=S.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fe<te;fe+=4)S.indexArray.emplaceBack(fe,fe+1,fe+2),S.indexArray.emplaceBack(fe+1,fe+2,fe+3)}getSortedSymbolIndexes(S){if(this.sortedAngle===S&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let F=Math.sin(S),W=Math.cos(S),te=[],fe=[],pe=[];for(let ze=0;ze<this.symbolInstances.length;++ze){pe.push(ze);let Ke=this.symbolInstances.get(ze);te.push(0|Math.round(F*Ke.anchorX+W*Ke.anchorY)),fe.push(Ke.featureIndex)}return pe.sort((ze,Ke)=>te[ze]-te[Ke]||fe[Ke]-fe[ze]),pe}addToSortKeyRanges(S,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let wf,Wx;Di(\"SymbolBucket\",E1,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aS;var Dw={get paint(){return Wx=Wx||new ue({\"icon-opacity\":new oo(ce.paint_symbol[\"icon-opacity\"]),\"icon-color\":new oo(ce.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new oo(ce.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new oo(ce.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new oo(ce.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new Ua(ce.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new Ua(ce.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new oo(ce.paint_symbol[\"text-opacity\"]),\"text-color\":new oo(ce.paint_symbol[\"text-color\"],{runtimeType:Yt,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),\"text-halo-color\":new oo(ce.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new oo(ce.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new oo(ce.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new Ua(ce.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new Ua(ce.paint_symbol[\"text-translate-anchor\"])})},get layout(){return wf=wf||new ue({\"symbol-placement\":new Ua(ce.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new Ua(ce.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new Ua(ce.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new oo(ce.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new Ua(ce.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new Ua(ce.layout_symbol[\"icon-allow-overlap\"]),\"icon-overlap\":new Ua(ce.layout_symbol[\"icon-overlap\"]),\"icon-ignore-placement\":new Ua(ce.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new Ua(ce.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new Ua(ce.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new oo(ce.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new Ua(ce.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new Ua(ce.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new oo(ce.layout_symbol[\"icon-image\"]),\"icon-rotate\":new oo(ce.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new oo(ce.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new Ua(ce.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new oo(ce.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new oo(ce.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new Ua(ce.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new Ua(ce.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new Ua(ce.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new oo(ce.layout_symbol[\"text-field\"]),\"text-font\":new oo(ce.layout_symbol[\"text-font\"]),\"text-size\":new oo(ce.layout_symbol[\"text-size\"]),\"text-max-width\":new oo(ce.layout_symbol[\"text-max-width\"]),\"text-line-height\":new Ua(ce.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new oo(ce.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new oo(ce.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new oo(ce.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new Ua(ce.layout_symbol[\"text-variable-anchor\"]),\"text-variable-anchor-offset\":new oo(ce.layout_symbol[\"text-variable-anchor-offset\"]),\"text-anchor\":new oo(ce.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new Ua(ce.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new Ua(ce.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new oo(ce.layout_symbol[\"text-rotate\"]),\"text-padding\":new Ua(ce.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new Ua(ce.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new oo(ce.layout_symbol[\"text-transform\"]),\"text-offset\":new oo(ce.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new Ua(ce.layout_symbol[\"text-allow-overlap\"]),\"text-overlap\":new Ua(ce.layout_symbol[\"text-overlap\"]),\"text-ignore-placement\":new Ua(ce.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new Ua(ce.layout_symbol[\"text-optional\"])})}};class Xx{constructor(S){if(S.property.overrides===void 0)throw new Error(\"overrides must be provided to instantiate FormatSectionOverride class\");this.type=S.property.overrides?S.property.overrides.runtimeType:Ut,this.defaultValue=S}evaluate(S){if(S.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(S.formattedSection))return F.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Di(\"FormatSectionOverride\",Xx,{omit:[\"defaultValue\"]});class uy extends B{constructor(S){super(S,Dw)}recalculate(S,F){if(super.recalculate(S,F),this.layout.get(\"icon-rotation-alignment\")===\"auto\"&&(this.layout._values[\"icon-rotation-alignment\"]=this.layout.get(\"symbol-placement\")!==\"point\"?\"map\":\"viewport\"),this.layout.get(\"text-rotation-alignment\")===\"auto\"&&(this.layout._values[\"text-rotation-alignment\"]=this.layout.get(\"symbol-placement\")!==\"point\"?\"map\":\"viewport\"),this.layout.get(\"text-pitch-alignment\")===\"auto\"&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")===\"map\"?\"map\":\"viewport\"),this.layout.get(\"icon-pitch-alignment\")===\"auto\"&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\")),this.layout.get(\"symbol-placement\")===\"point\"){let W=this.layout.get(\"text-writing-mode\");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values[\"text-writing-mode\"]=te}else this.layout._values[\"text-writing-mode\"]=[\"horizontal\"]}this._setPaintOverrides()}getValueAndResolveTokens(S,F,W,te){let fe=this.layout.get(S).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[S];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(ze,Ke){return Ke.replace(/{([^{}]+)}/g,(ut,Lt)=>ze&&Lt in ze?String(ze[Lt]):\"\")}(F.properties,fe)}createBucket(S){return new E1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error(\"Should take a different path in FeatureIndex\")}_setPaintOverrides(){for(let S of Dw.paint.overridableProperties){if(!uy.hasPaintOverride(this.layout,S))continue;let F=this.paint.get(S),W=new Xx(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind===\"constant\"||F.value.kind===\"source\"?new bc(\"source\",te):new hu(\"composite\",te,F.value.zoomStops),this.paint._values[S]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(S,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&uy.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,F){let W=S.get(\"text-field\"),te=Dw.paint.properties[F],fe=!1,pe=ze=>{for(let Ke of ze)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind===\"constant\"&&W.value.value instanceof ri)pe(W.value.value.sections);else if(W.value.kind===\"source\"){let ze=ut=>{fe||(ut instanceof la&&Mn(ut.value)===ei?pe(ut.value.sections):ut instanceof Zl?pe(ut.sections):ut.eachChild(ze))},Ke=W.value;Ke._styleExpression&&ze(Ke._styleExpression.expression)}return fe}}let Sk;var Zx={get paint(){return Sk=Sk||new ue({\"background-color\":new Ua(ce.paint_background[\"background-color\"]),\"background-pattern\":new hc(ce.paint_background[\"background-pattern\"]),\"background-opacity\":new Ua(ce.paint_background[\"background-opacity\"])})}};class Z9 extends B{constructor(S){super(S,Zx)}}let lS;var Mk={get paint(){return lS=lS||new ue({\"raster-opacity\":new Ua(ce.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new Ua(ce.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new Ua(ce.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new Ua(ce.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new Ua(ce.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new Ua(ce.paint_raster[\"raster-contrast\"]),\"raster-resampling\":new Ua(ce.paint_raster[\"raster-resampling\"]),\"raster-fade-duration\":new Ua(ce.paint_raster[\"raster-fade-duration\"])})}};class Yx extends B{constructor(S){super(S,Mk)}}class uS extends B{constructor(S){super(S,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=S}is3D(){return this.implementation.renderingMode===\"3d\"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error(\"Custom layers cannot be serialized\")}}class cS{constructor(S){this._methodToThrottle=S,this._triggered=!1,typeof MessageChannel!=\"undefined\"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let fS=63710088e-1;class dg{constructor(S,F){if(isNaN(S)||isNaN(F))throw new Error(`Invalid LngLat object: (${S}, ${F})`);if(this.lng=+S,this.lat=+F,this.lat>90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")}wrap(){return new dg(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let F=Math.PI/180,W=this.lat*F,te=S.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((S.lng-this.lng)*F);return fS*Math.acos(Math.min(fe,1))}static convert(S){if(S instanceof dg)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new dg(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S==\"object\"&&S!==null)return new dg(Number(\"lng\"in S?S.lng:S.lon),Number(S.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")}}let C1=2*Math.PI*fS;function Ek(R){return C1*Math.cos(R*Math.PI/180)}function Fw(R){return(180+R)/360}function Ck(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function zw(R,S){return R/Ek(S)}function Kx(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class Jx{constructor(S,F,W=0){this.x=+S,this.y=+F,this.z=+W}static fromLngLat(S,F=0){let W=dg.convert(S);return new Jx(Fw(W.lng),Ck(W.lat),zw(F,W.lat))}toLngLat(){return new dg(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*Ek(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/C1*(S=Kx(this.y),1/Math.cos(S*Math.PI/180));var S}}function pp(R,S,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,S*W-2*Math.PI*6378137/2]}class hS{constructor(S,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(S,F,W))throw new Error(`x=${F}, y=${W}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=F,this.y=W,this.key=$x(0,S,S,F,W)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,F,W){let te=(pe=this.y,ze=this.z,Ke=pp(256*(fe=this.x),256*(pe=Math.pow(2,ze)-pe-1),ze),ut=pp(256*(fe+1),256*(pe+1),ze),Ke[0]+\",\"+Ke[1]+\",\"+ut[0]+\",\"+ut[1]);var fe,pe,ze,Ke,ut;let Lt=function(Qt,fr,mr){let Lr,zr=\"\";for(let ui=Qt;ui>0;ui--)Lr=1<<ui-1,zr+=(fr&Lr?1:0)+(mr&Lr?2:0);return zr}(this.z,this.x,this.y);return S[(this.x+this.y)%S.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(W===\"tms\"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,F>1?\"@2x\":\"\").replace(/{quadkey}/g,Lt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(S){let F=this.z-S.z;return F>0&&S.x===this.x>>F&&S.y===this.y>>F}getTilePoint(S){let F=Math.pow(2,this.z);return new u((S.x*F-this.x)*Ha,(S.y*F-this.y)*Ha)}toString(){return`${this.z}/${this.x}/${this.y}`}}class kk{constructor(S,F){this.wrap=S,this.canonical=F,this.key=$x(S,F.z,F.z,F.x,F.y)}}class Jv{constructor(S,F,W,te,fe){if(S<W)throw new Error(`overscaledZ should be >= z; overscaledZ = ${S}; z = ${W}`);this.overscaledZ=S,this.wrap=F,this.canonical=new hS(W,+te,+fe),this.key=$x(F,S,W,te,fe)}clone(){return new Jv(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-S;return S>this.canonical.z?new Jv(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jv(S,this.wrap,S,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(S,F){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-S;return S>this.canonical.z?$x(this.wrap*+F,S,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+F,S,S,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let F=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ<this.overscaledZ&&S.canonical.x===this.canonical.x>>F&&S.canonical.y===this.canonical.y>>F}children(S){if(this.overscaledZ>=S)return[new Jv(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Jv(F,this.wrap,F,W,te),new Jv(F,this.wrap,F,W+1,te),new Jv(F,this.wrap,F,W,te+1),new Jv(F,this.wrap,F,W+1,te+1)]}isLessThan(S){return this.wrap<S.wrap||!(this.wrap>S.wrap)&&(this.overscaledZ<S.overscaledZ||!(this.overscaledZ>S.overscaledZ)&&(this.canonical.x<S.canonical.x||!(this.canonical.x>S.canonical.x)&&this.canonical.y<S.canonical.y))}wrapped(){return new Jv(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(S){return new Jv(this.overscaledZ,S,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new kk(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(S){return this.canonical.getTilePoint(new Jx(S.x-this.wrap,S.y))}}function $x(R,S,F,W,te){(R*=2)<0&&(R=-1*R-1);let fe=1<<F;return(fe*fe*R+fe*te+W).toString(36)+F.toString(36)+S.toString(36)}Di(\"CanonicalTileID\",hS),Di(\"OverscaledTileID\",Jv,{omit:[\"posMatrix\"]});class Lk{constructor(S,F,W,te=1,fe=1,pe=1,ze=0){if(this.uid=S,F.height!==F.width)throw new RangeError(\"DEM tiles must be square\");if(W&&![\"mapbox\",\"terrarium\",\"custom\"].includes(W))return void T(`\"${W}\" is not a valid encoding type. Valid types include \"mapbox\", \"terrarium\" and \"custom\".`);this.stride=F.height;let Ke=this.dim=F.height-2;switch(this.data=new Uint32Array(F.data.buffer),W){case\"terrarium\":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case\"custom\":this.redFactor=te,this.greenFactor=fe,this.blueFactor=pe,this.baseShift=ze;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ut=0;ut<Ke;ut++)this.data[this._idx(-1,ut)]=this.data[this._idx(0,ut)],this.data[this._idx(Ke,ut)]=this.data[this._idx(Ke-1,ut)],this.data[this._idx(ut,-1)]=this.data[this._idx(ut,0)],this.data[this._idx(ut,Ke)]=this.data[this._idx(ut,Ke-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Ke,-1)]=this.data[this._idx(Ke-1,0)],this.data[this._idx(-1,Ke)]=this.data[this._idx(0,Ke-1)],this.data[this._idx(Ke,Ke)]=this.data[this._idx(Ke-1,Ke-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ut=0;ut<Ke;ut++)for(let Lt=0;Lt<Ke;Lt++){let Qt=this.get(ut,Lt);Qt>this.max&&(this.max=Qt),Qt<this.min&&(this.min=Qt)}}get(S,F){let W=new Uint8Array(this.data.buffer),te=4*this._idx(S,F);return this.unpack(W[te],W[te+1],W[te+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(S,F){if(S<-1||S>=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(F+1)*this.stride+(S+1)}unpack(S,F,W){return S*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Yi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,F,W){if(this.dim!==S.dim)throw new Error(\"dem dimension mismatch\");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,ze=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=ze-1;break;case 1:ze=pe+1}let Ke=-F*this.dim,ut=-W*this.dim;for(let Lt=pe;Lt<ze;Lt++)for(let Qt=te;Qt<fe;Qt++)this.data[this._idx(Qt,Lt)]=S.data[this._idx(Qt+Ke,Lt+ut)]}}Di(\"DEMData\",Lk);class Pk{constructor(S){this._stringToNumber={},this._numberToString=[];for(let F=0;F<S.length;F++){let W=S[F];this._stringToNumber[W]=F,this._numberToString[F]=W}}encode(S){return this._stringToNumber[S]}decode(S){if(S>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class dS{constructor(S,F,W,te,fe){this.type=\"Feature\",this._vectorTileFeature=S,S._z=F,S._x=W,S._y=te,this.properties=S.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let F in this)F!==\"_geometry\"&&F!==\"_vectorTileFeature\"&&(S[F]=this[F]);return S}}class cy{constructor(S,F){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new $i(Ha,16,0),this.grid3D=new $i(Ha,16,0),this.featureIndexArray=new As,this.promoteId=F}insert(S,F,W,te,fe,pe){let ze=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ut=0;ut<F.length;ut++){let Lt=F[ut],Qt=[1/0,1/0,-1/0,-1/0];for(let fr=0;fr<Lt.length;fr++){let mr=Lt[fr];Qt[0]=Math.min(Qt[0],mr.x),Qt[1]=Math.min(Qt[1],mr.y),Qt[2]=Math.max(Qt[2],mr.x),Qt[3]=Math.max(Qt[3],mr.y)}Qt[0]<Ha&&Qt[1]<Ha&&Qt[2]>=0&&Qt[3]>=0&&Ke.insert(ze,Qt[0],Qt[1],Qt[2],Qt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new br.VectorTile(new tS(this.rawTileData)).layers,this.sourceLayerCoder=new Pk(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers}query(S,F,W,te){this.loadVTLayers();let fe=S.params||{},pe=Ha/S.tileSize/S.scale,ze=Fc(fe.filter),Ke=S.queryGeometry,ut=S.queryPadding*pe,Lt=Rk(Ke),Qt=this.grid.query(Lt.minX-ut,Lt.minY-ut,Lt.maxX+ut,Lt.maxY+ut),fr=Rk(S.cameraQueryGeometry),mr=this.grid3D.query(fr.minX-ut,fr.minY-ut,fr.maxX+ut,fr.maxY+ut,(ui,yi,dn,Fi)=>function(ln,An,pa,ro,Vo){for(let sa of ln)if(An<=sa.x&&pa<=sa.y&&ro>=sa.x&&Vo>=sa.y)return!0;let Xa=[new u(An,pa),new u(An,Vo),new u(ro,Vo),new u(ro,pa)];if(ln.length>2){for(let sa of Xa)if(Ni(ln,sa))return!0}for(let sa=0;sa<ln.length-1;sa++)if(Oi(ln[sa],ln[sa+1],Xa))return!0;return!1}(S.cameraQueryGeometry,ui-ut,yi-ut,dn+ut,Fi+ut));for(let ui of mr)Qt.push(ui);Qt.sort(Y9);let Lr={},zr;for(let ui=0;ui<Qt.length;ui++){let yi=Qt[ui];if(yi===zr)continue;zr=yi;let dn=this.featureIndexArray.get(yi),Fi=null;this.loadMatchingFeature(Lr,dn.bucketIndex,dn.sourceLayerIndex,dn.featureIndex,ze,fe.layers,fe.availableImages,F,W,te,(ln,An,pa)=>(Fi||(Fi=Qs(ln)),An.queryIntersectsFeature(Ke,ln,pa,Fi,this.z,S.transform,pe,S.pixelPosMatrix)))}return Lr}loadMatchingFeature(S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt){let fr=this.bucketLayerIDs[F];if(pe&&!function(ui,yi){for(let dn=0;dn<ui.length;dn++)if(yi.indexOf(ui[dn])>=0)return!0;return!1}(pe,fr))return;let mr=this.sourceLayerCoder.decode(W),Lr=this.vtLayers[mr].feature(te);if(fe.needGeometry){let ui=Ml(Lr,!0);if(!fe.filter(new is(this.tileID.overscaledZ),ui,this.tileID.canonical))return}else if(!fe.filter(new is(this.tileID.overscaledZ),Lr))return;let zr=this.getId(Lr,mr);for(let ui=0;ui<fr.length;ui++){let yi=fr[ui];if(pe&&pe.indexOf(yi)<0)continue;let dn=Ke[yi];if(!dn)continue;let Fi={};zr&&Lt&&(Fi=Lt.getState(dn.sourceLayer||\"_geojsonTileLayer\",zr));let ln=L({},ut[yi]);ln.paint=Ik(ln.paint,dn.paint,Lr,Fi,ze),ln.layout=Ik(ln.layout,dn.layout,Lr,Fi,ze);let An=!Qt||Qt(Lr,dn,Fi);if(!An)continue;let pa=new dS(Lr,this.z,this.x,this.y,zr);pa.layer=ln;let ro=S[yi];ro===void 0&&(ro=S[yi]=[]),ro.push({featureIndex:te,feature:pa,intersectionZ:An})}}lookupSymbolFeatures(S,F,W,te,fe,pe,ze,Ke){let ut={};this.loadVTLayers();let Lt=Fc(fe);for(let Qt of S)this.loadMatchingFeature(ut,W,te,Qt,Lt,pe,ze,Ke,F);return ut}hasLayer(S){for(let F of this.bucketLayerIDs)for(let W of F)if(S===W)return!0;return!1}getId(S,F){let W=S.id;return this.promoteId&&(W=S.properties[typeof this.promoteId==\"string\"?this.promoteId:this.promoteId[F]],typeof W==\"boolean\"&&(W=Number(W))),W}}function Ik(R,S,F,W,te){return k(R,(fe,pe)=>{let ze=S instanceof Ac?S.get(pe):null;return ze&&ze.evaluate?ze.evaluate(F,W,te):ze})}function Rk(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:S,minY:F,maxX:W,maxY:te}}function Y9(R,S){return S-R}function Dk(R,S,F,W,te){let fe=[];for(let pe=0;pe<R.length;pe++){let ze=R[pe],Ke;for(let ut=0;ut<ze.length-1;ut++){let Lt=ze[ut],Qt=ze[ut+1];Lt.x<S&&Qt.x<S||(Lt.x<S?Lt=new u(S,Lt.y+(S-Lt.x)/(Qt.x-Lt.x)*(Qt.y-Lt.y))._round():Qt.x<S&&(Qt=new u(S,Lt.y+(S-Lt.x)/(Qt.x-Lt.x)*(Qt.y-Lt.y))._round()),Lt.y<F&&Qt.y<F||(Lt.y<F?Lt=new u(Lt.x+(F-Lt.y)/(Qt.y-Lt.y)*(Qt.x-Lt.x),F)._round():Qt.y<F&&(Qt=new u(Lt.x+(F-Lt.y)/(Qt.y-Lt.y)*(Qt.x-Lt.x),F)._round()),Lt.x>=W&&Qt.x>=W||(Lt.x>=W?Lt=new u(W,Lt.y+(W-Lt.x)/(Qt.x-Lt.x)*(Qt.y-Lt.y))._round():Qt.x>=W&&(Qt=new u(W,Lt.y+(W-Lt.x)/(Qt.x-Lt.x)*(Qt.y-Lt.y))._round()),Lt.y>=te&&Qt.y>=te||(Lt.y>=te?Lt=new u(Lt.x+(te-Lt.y)/(Qt.y-Lt.y)*(Qt.x-Lt.x),te)._round():Qt.y>=te&&(Qt=new u(Lt.x+(te-Lt.y)/(Qt.y-Lt.y)*(Qt.x-Lt.x),te)._round()),Ke&&Lt.equals(Ke[Ke.length-1])||(Ke=[Lt],fe.push(Ke)),Ke.push(Qt)))))}}return fe}Di(\"FeatureIndex\",cy,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});class vg extends u{constructor(S,F,W,te){super(S,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new vg(this.x,this.y,this.angle,this.segment)}}function vS(R,S,F,W,te){if(S.segment===void 0||F===0)return!0;let fe=S,pe=S.segment+1,ze=0;for(;ze>-F/2;){if(pe--,pe<0)return!1;ze-=R[pe].dist(fe),fe=R[pe]}ze+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ut=0;for(;ze<F/2;){let Lt=R[pe],Qt=R[pe+1];if(!Qt)return!1;let fr=R[pe-1].angleTo(Lt)-Lt.angleTo(Qt);for(fr=Math.abs((fr+3*Math.PI)%(2*Math.PI)-Math.PI),Ke.push({distance:ze,angleDelta:fr}),ut+=fr;ze-Ke[0].distance>W;)ut-=Ke.shift().angleDelta;if(ut>te)return!1;pe++,ze+=Lt.dist(Qt)}return!0}function Fk(R){let S=0;for(let F=0;F<R.length-1;F++)S+=R[F].dist(R[F+1]);return S}function zk(R,S,F){return R?.6*S*F:0}function Ok(R,S){return Math.max(R?R.right-R.left:0,S?S.right-S.left:0)}function K9(R,S,F,W,te,fe){let pe=zk(F,te,fe),ze=Ok(F,W)*fe,Ke=0,ut=Fk(R)/2;for(let Lt=0;Lt<R.length-1;Lt++){let Qt=R[Lt],fr=R[Lt+1],mr=Qt.dist(fr);if(Ke+mr>ut){let Lr=(ut-Ke)/mr,zr=Lo.number(Qt.x,fr.x,Lr),ui=Lo.number(Qt.y,fr.y,Lr),yi=new vg(zr,ui,fr.angleTo(Qt),Lt);return yi._round(),!pe||vS(R,yi,ze,pe,S)?yi:void 0}Ke+=mr}}function J9(R,S,F,W,te,fe,pe,ze,Ke){let ut=zk(W,fe,pe),Lt=Ok(W,te),Qt=Lt*pe,fr=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return S-Qt<S/4&&(S=Qt+S/4),qk(R,fr?S/2*ze%S:(Lt/2+2*fe)*pe*ze%S,S,ut,F,Qt,fr,!1,Ke)}function qk(R,S,F,W,te,fe,pe,ze,Ke){let ut=fe/2,Lt=Fk(R),Qt=0,fr=S-F,mr=[];for(let Lr=0;Lr<R.length-1;Lr++){let zr=R[Lr],ui=R[Lr+1],yi=zr.dist(ui),dn=ui.angleTo(zr);for(;fr+F<Qt+yi;){fr+=F;let Fi=(fr-Qt)/yi,ln=Lo.number(zr.x,ui.x,Fi),An=Lo.number(zr.y,ui.y,Fi);if(ln>=0&&ln<Ke&&An>=0&&An<Ke&&fr-ut>=0&&fr+ut<=Lt){let pa=new vg(ln,An,dn,Lr);pa._round(),W&&!vS(R,pa,fe,W,te)||mr.push(pa)}}Qt+=yi}return ze||mr.length||pe||(mr=qk(R,Qt/2,F,W,te,fe,pe,!0,Ke)),mr}Di(\"Anchor\",vg);let k1=Md;function Bk(R,S,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,ze=fe.paddedRect.w-2*k1,Ke=fe.paddedRect.h-2*k1,ut={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Lt=fe.stretchX||[[0,ze]],Qt=fe.stretchY||[[0,Ke]],fr=(Xn,Ro)=>Xn+Ro[1]-Ro[0],mr=Lt.reduce(fr,0),Lr=Qt.reduce(fr,0),zr=ze-mr,ui=Ke-Lr,yi=0,dn=mr,Fi=0,ln=Lr,An=0,pa=zr,ro=0,Vo=ui;if(fe.content&&W){let Xn=fe.content,Ro=Xn[2]-Xn[0],uo=Xn[3]-Xn[1];(fe.textFitWidth||fe.textFitHeight)&&(ut=wk(R)),yi=pg(Lt,0,Xn[0]),Fi=pg(Qt,0,Xn[1]),dn=pg(Lt,Xn[0],Xn[2]),ln=pg(Qt,Xn[1],Xn[3]),An=Xn[0]-yi,ro=Xn[1]-Fi,pa=Ro-dn,Vo=uo-ln}let Xa=ut.x1,sa=ut.y1,Mo=ut.x2-Xa,fo=ut.y2-sa,lo=(Xn,Ro,uo,$o)=>{let Ju=Ow(Xn.stretch-yi,dn,Mo,Xa),qu=L1(Xn.fixed-An,pa,Xn.stretch,mr),Th=Ow(Ro.stretch-Fi,ln,fo,sa),$v=L1(Ro.fixed-ro,Vo,Ro.stretch,Lr),ld=Ow(uo.stretch-yi,dn,Mo,Xa),Ah=L1(uo.fixed-An,pa,uo.stretch,mr),Gd=Ow($o.stretch-Fi,ln,fo,sa),Hd=L1($o.fixed-ro,Vo,$o.stretch,Lr),jd=new u(Ju,Th),Tf=new u(ld,Th),Sh=new u(ld,Gd),Ed=new u(Ju,Gd),ud=new u(qu/pe,$v/pe),Hh=new u(Ah/pe,Hd/pe),Rf=S*Math.PI/180;if(Rf){let tu=Math.sin(Rf),pc=Math.cos(Rf),$u=[pc,-tu,tu,pc];jd._matMult($u),Tf._matMult($u),Ed._matMult($u),Sh._matMult($u)}let Dv=Xn.stretch+Xn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:jd,tr:Tf,bl:Ed,br:Sh,tex:{x:fe.paddedRect.x+k1+Dv,y:fe.paddedRect.y+k1+lv,w:uo.stretch+uo.fixed-Dv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ud,pixelOffsetBR:Hh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Xn=Nk(Lt,zr,mr),Ro=Nk(Qt,ui,Lr);for(let uo=0;uo<Xn.length-1;uo++){let $o=Xn[uo],Ju=Xn[uo+1];for(let qu=0;qu<Ro.length-1;qu++)te.push(lo($o,Ro[qu],Ju,Ro[qu+1]))}}else te.push(lo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ze+1},{fixed:0,stretch:Ke+1}));return te}function pg(R,S,F){let W=0;for(let te of R)W+=Math.max(S,Math.min(F,te[1]))-Math.max(S,Math.min(F,te[0]));return W}function Nk(R,S,F){let W=[{fixed:-k1,stretch:0}];for(let[te,fe]of R){let pe=W[W.length-1];W.push({fixed:te-pe.stretch,stretch:pe.stretch}),W.push({fixed:te-pe.stretch,stretch:pe.stretch+(fe-te)})}return W.push({fixed:S+k1,stretch:F}),W}function Ow(R,S,F,W){return R/S*F+W}function L1(R,S,F,W){return R-S*F/W}class cm{constructor(S,F,W,te,fe,pe,ze,Ke,ut,Lt){var Qt;if(this.boxStartIndex=S.length,ut){let fr=pe.top,mr=pe.bottom,Lr=pe.collisionPadding;Lr&&(fr-=Lr[1],mr+=Lr[3]);let zr=mr-fr;zr>0&&(zr=Math.max(10,zr),this.circleDiameter=zr)}else{let fr=!((Qt=pe.image)===null||Qt===void 0)&&Qt.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?wk(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};fr.y1=fr.y1*ze-Ke[0],fr.y2=fr.y2*ze+Ke[2],fr.x1=fr.x1*ze-Ke[3],fr.x2=fr.x2*ze+Ke[1];let mr=pe.collisionPadding;if(mr&&(fr.x1-=mr[0]*ze,fr.y1-=mr[1]*ze,fr.x2+=mr[2]*ze,fr.y2+=mr[3]*ze),Lt){let Lr=new u(fr.x1,fr.y1),zr=new u(fr.x2,fr.y1),ui=new u(fr.x1,fr.y2),yi=new u(fr.x2,fr.y2),dn=Lt*Math.PI/180;Lr._rotate(dn),zr._rotate(dn),ui._rotate(dn),yi._rotate(dn),fr.x1=Math.min(Lr.x,zr.x,ui.x,yi.x),fr.x2=Math.max(Lr.x,zr.x,ui.x,yi.x),fr.y1=Math.min(Lr.y,zr.y,ui.y,yi.y),fr.y2=Math.max(Lr.y,zr.y,ui.y,yi.y)}S.emplaceBack(F.x,F.y,fr.x1,fr.y1,fr.x2,fr.y2,W,te,fe)}this.boxEndIndex=S.length}}class Vp{constructor(S=[],F=(W,te)=>W<te?-1:W>te?1:0){if(this.data=S,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:F,compare:W}=this,te=F[S];for(;S>0;){let fe=S-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[S]=pe,S=fe}F[S]=te}_down(S){let{data:F,compare:W}=this,te=this.length>>1,fe=F[S];for(;S<te;){let pe=1+(S<<1),ze=pe+1;if(ze<this.length&&W(F[ze],F[pe])<0&&(pe=ze),W(F[pe],fe)>=0)break;F[S]=F[pe],S=pe}F[S]=fe}}function $9(R,S=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,ze=R[0];for(let mr=0;mr<ze.length;mr++){let Lr=ze[mr];(!mr||Lr.x<W)&&(W=Lr.x),(!mr||Lr.y<te)&&(te=Lr.y),(!mr||Lr.x>fe)&&(fe=Lr.x),(!mr||Lr.y>pe)&&(pe=Lr.y)}let Ke=Math.min(fe-W,pe-te),ut=Ke/2,Lt=new Vp([],Q9);if(Ke===0)return new u(W,te);for(let mr=W;mr<fe;mr+=Ke)for(let Lr=te;Lr<pe;Lr+=Ke)Lt.push(new P1(mr+ut,Lr+ut,ut,R));let Qt=function(mr){let Lr=0,zr=0,ui=0,yi=mr[0];for(let dn=0,Fi=yi.length,ln=Fi-1;dn<Fi;ln=dn++){let An=yi[dn],pa=yi[ln],ro=An.x*pa.y-pa.x*An.y;zr+=(An.x+pa.x)*ro,ui+=(An.y+pa.y)*ro,Lr+=3*ro}return new P1(zr/Lr,ui/Lr,0,mr)}(R),fr=Lt.length;for(;Lt.length;){let mr=Lt.pop();(mr.d>Qt.d||!Qt.d)&&(Qt=mr,F&&console.log(\"found best %d after %d probes\",Math.round(1e4*mr.d)/1e4,fr)),mr.max-Qt.d<=S||(ut=mr.h/2,Lt.push(new P1(mr.p.x-ut,mr.p.y-ut,ut,R)),Lt.push(new P1(mr.p.x+ut,mr.p.y-ut,ut,R)),Lt.push(new P1(mr.p.x-ut,mr.p.y+ut,ut,R)),Lt.push(new P1(mr.p.x+ut,mr.p.y+ut,ut,R)),fr+=4)}return F&&(console.log(`num probes: ${fr}`),console.log(`best distance: ${Qt.d}`)),Qt.p}function Q9(R,S){return S.max-R.max}function P1(R,S,F,W){this.p=new u(R,S),this.h=F,this.d=function(te,fe){let pe=!1,ze=1/0;for(let Ke=0;Ke<fe.length;Ke++){let ut=fe[Ke];for(let Lt=0,Qt=ut.length,fr=Qt-1;Lt<Qt;fr=Lt++){let mr=ut[Lt],Lr=ut[fr];mr.y>te.y!=Lr.y>te.y&&te.x<(Lr.x-mr.x)*(te.y-mr.y)/(Lr.y-mr.y)+mr.x&&(pe=!pe),ze=Math.min(ze,Vr(te,mr,Lr))}}return(pe?1:-1)*Math.sqrt(ze)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var sd;i.aq=void 0,(sd=i.aq||(i.aq={}))[sd.center=1]=\"center\",sd[sd.left=2]=\"left\",sd[sd.right=3]=\"right\",sd[sd.top=4]=\"top\",sd[sd.bottom=5]=\"bottom\",sd[sd[\"top-left\"]=6]=\"top-left\",sd[sd[\"top-right\"]=7]=\"top-right\",sd[sd[\"bottom-left\"]=8]=\"bottom-left\",sd[sd[\"bottom-right\"]=9]=\"bottom-right\";let fm=7,fy=Number.POSITIVE_INFINITY;function pS(R,S){return S[1]!==fy?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case\"top-right\":case\"top-left\":case\"top\":pe=te-fm;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":pe=-te+fm}switch(F){case\"top-right\":case\"bottom-right\":case\"right\":fe=-W;break;case\"top-left\":case\"bottom-left\":case\"left\":fe=W}return[fe,pe]}(R,S[0],S[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case\"top-right\":case\"top-left\":fe=pe-fm;break;case\"bottom-right\":case\"bottom-left\":fe=-pe+fm;break;case\"bottom\":fe=-W+fm;break;case\"top\":fe=W-fm}switch(F){case\"top-right\":case\"bottom-right\":te=-pe;break;case\"top-left\":case\"bottom-left\":te=pe;break;case\"left\":te=W;break;case\"right\":te=-W}return[te,fe]}(R,S[0])}function Uk(R,S,F){var W;let te=R.layout,fe=(W=te.get(\"text-variable-anchor-offset\"))===null||W===void 0?void 0:W.evaluate(S,{},F);if(fe){let ze=fe.values,Ke=[];for(let ut=0;ut<ze.length;ut+=2){let Lt=Ke[ut]=ze[ut],Qt=ze[ut+1].map(fr=>fr*eu);Lt.startsWith(\"top\")?Qt[1]-=fm:Lt.startsWith(\"bottom\")&&(Qt[1]+=fm),Ke[ut+1]=Qt}return new Ji(Ke)}let pe=te.get(\"text-variable-anchor\");if(pe){let ze;ze=R._unevaluatedLayout.getValue(\"text-radial-offset\")!==void 0?[te.get(\"text-radial-offset\").evaluate(S,{},F)*eu,fy]:te.get(\"text-offset\").evaluate(S,{},F).map(ut=>ut*eu);let Ke=[];for(let ut of pe)Ke.push(ut,pS(ut,ze));return new Ji(Ke)}return null}function gS(R){switch(R){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function eO(R,S,F,W,te,fe,pe,ze,Ke,ut,Lt){let Qt=fe.textMaxSize.evaluate(S,{});Qt===void 0&&(Qt=pe);let fr=R.layers[0].layout,mr=fr.get(\"icon-offset\").evaluate(S,{},Lt),Lr=Gk(F.horizontal),zr=pe/24,ui=R.tilePixelRatio*zr,yi=R.tilePixelRatio*Qt/24,dn=R.tilePixelRatio*ze,Fi=R.tilePixelRatio*fr.get(\"symbol-spacing\"),ln=fr.get(\"text-padding\")*R.tilePixelRatio,An=function(Xn,Ro,uo,$o=1){let Ju=Xn.get(\"icon-padding\").evaluate(Ro,{},uo),qu=Ju&&Ju.values;return[qu[0]*$o,qu[1]*$o,qu[2]*$o,qu[3]*$o]}(fr,S,Lt,R.tilePixelRatio),pa=fr.get(\"text-max-angle\")/180*Math.PI,ro=fr.get(\"text-rotation-alignment\")!==\"viewport\"&&fr.get(\"symbol-placement\")!==\"point\",Vo=fr.get(\"icon-rotation-alignment\")===\"map\"&&fr.get(\"symbol-placement\")!==\"point\",Xa=fr.get(\"symbol-placement\"),sa=Fi/2,Mo=fr.get(\"icon-text-fit\"),fo;W&&Mo!==\"none\"&&(R.allowVerticalPlacement&&F.vertical&&(fo=Tk(W,F.vertical,Mo,fr.get(\"icon-text-fit-padding\"),mr,zr)),Lr&&(W=Tk(W,Lr,Mo,fr.get(\"icon-text-fit-padding\"),mr,zr)));let lo=(Xn,Ro)=>{Ro.x<0||Ro.x>=Ha||Ro.y<0||Ro.y>=Ha||function(uo,$o,Ju,qu,Th,$v,ld,Ah,Gd,Hd,jd,Tf,Sh,Ed,ud,Hh,Rf,Dv,lv,tu,pc,$u,Fv,ff,I1){let p0=uo.addToLineVertexArray($o,Ju),Gp,Qv,Gc,Zf,ep=0,gg=0,uv=0,R1=0,bS=-1,Uw=-1,g0={},hy=bi(\"\");if(uo.allowVerticalPlacement&&qu.vertical){let Cd=Ah.layout.get(\"text-rotate\").evaluate(pc,{},ff)+90;Gc=new cm(Gd,$o,Hd,jd,Tf,qu.vertical,Sh,Ed,ud,Cd),ld&&(Zf=new cm(Gd,$o,Hd,jd,Tf,ld,Rf,Dv,ud,Cd))}if(Th){let Cd=Ah.layout.get(\"icon-rotate\").evaluate(pc,{}),tp=Ah.layout.get(\"icon-text-fit\")!==\"none\",hm=Bk(Th,Cd,Fv,tp),Wd=ld?Bk(ld,Cd,Fv,tp):void 0;Qv=new cm(Gd,$o,Hd,jd,Tf,Th,Rf,Dv,!1,Cd),ep=4*hm.length;let kd=uo.iconSizeData,mp=null;kd.kind===\"source\"?(mp=[v0*Ah.layout.get(\"icon-size\").evaluate(pc,{})],mp[0]>lm&&T(`${uo.layerIds[0]}: Value for \"icon-size\" is >= ${jx}. Reduce your \"icon-size\".`)):kd.kind===\"composite\"&&(mp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},ff),v0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(mp[0]>lm||mp[1]>lm)&&T(`${uo.layerIds[0]}: Value for \"icon-size\" is >= ${jx}. Reduce your \"icon-size\".`)),uo.addSymbols(uo.icon,hm,mp,tu,lv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,ff),bS=uo.icon.placedSymbolArray.length-1,Wd&&(gg=4*Wd.length,uo.addSymbols(uo.icon,Wd,mp,tu,lv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,ff),Uw=uo.icon.placedSymbolArray.length-1)}let jh=Object.keys(qu.horizontal);for(let Cd of jh){let tp=qu.horizontal[Cd];if(!Gp){hy=bi(tp.text);let Wd=Ah.layout.get(\"text-rotate\").evaluate(pc,{},ff);Gp=new cm(Gd,$o,Hd,jd,Tf,tp,Sh,Ed,ud,Wd)}let hm=tp.positionedLines.length===1;if(uv+=Vk(uo,$o,tp,$v,Ah,ud,pc,Hh,p0,qu.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?jh:[Cd],g0,bS,$u,ff),hm)break}qu.vertical&&(R1+=Vk(uo,$o,qu.vertical,$v,Ah,ud,pc,Hh,p0,i.ah.vertical,[\"vertical\"],g0,Uw,$u,ff));let iO=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,Vw=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,Xk=Qv?Qv.boxStartIndex:uo.collisionBoxArray.length,nO=Qv?Qv.boxEndIndex:uo.collisionBoxArray.length,Zk=Zf?Zf.boxStartIndex:uo.collisionBoxArray.length,aO=Zf?Zf.boxEndIndex:uo.collisionBoxArray.length,gp=-1,tb=(Cd,tp)=>Cd&&Cd.circleDiameter?Math.max(Cd.circleDiameter,tp):tp;gp=tb(Gp,gp),gp=tb(Gc,gp),gp=tb(Qv,gp),gp=tb(Zf,gp);let Gw=gp>-1?1:0;Gw&&(gp*=I1/eu),uo.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let wS=Uk(Ah,pc,ff),[oO,sO]=function(Cd,tp){let hm=Cd.length,Wd=tp==null?void 0:tp.values;if((Wd==null?void 0:Wd.length)>0)for(let kd=0;kd<Wd.length;kd+=2){let mp=Wd[kd+1];Cd.emplaceBack(i.aq[Wd[kd]],mp[0],mp[1])}return[hm,Cd.length]}(uo.textAnchorOffsets,wS);uo.symbolInstances.emplaceBack($o.x,$o.y,g0.right>=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,bS,Uw,hy,iO,Vw,m0,cv,Xk,nO,Zk,aO,Hd,uv,R1,ep,gg,Gw,0,Sh,gp,oO,sO)}(R,Ro,Xn,F,W,te,fo,R.layers[0],R.collisionBoxArray,S.index,S.sourceLayerIndex,R.index,ui,[ln,ln,ln,ln],ro,Ke,dn,An,Vo,mr,S,fe,ut,Lt,pe)};if(Xa===\"line\")for(let Xn of Dk(S.geometry,0,0,Ha,Ha)){let Ro=J9(Xn,Fi,pa,F.vertical||Lr,W,24,yi,R.overscaling,Ha);for(let uo of Ro)Lr&&tO(R,Lr.text,sa,uo)||lo(Xn,uo)}else if(Xa===\"line-center\"){for(let Xn of S.geometry)if(Xn.length>1){let Ro=K9(Xn,pa,F.vertical||Lr,W,24,yi);Ro&&lo(Xn,Ro)}}else if(S.type===\"Polygon\")for(let Xn of Cf(S.geometry,0)){let Ro=$9(Xn,16);lo(Xn[0],new vg(Ro.x,Ro.y,0))}else if(S.type===\"LineString\")for(let Xn of S.geometry)lo(Xn,new vg(Xn[0].x,Xn[0].y,0));else if(S.type===\"Point\")for(let Xn of S.geometry)for(let Ro of Xn)lo([Ro],new vg(Ro.x,Ro.y,0))}function Vk(R,S,F,W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr){let zr=function(dn,Fi,ln,An,pa,ro,Vo,Xa){let sa=An.layout.get(\"text-rotate\").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of Fi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Xn=lo.rect||{},Ro=yk+1,uo=!0,$o=1,Ju=0,qu=(pa||Xa)&&lo.vertical,Th=lo.metrics.advance*lo.scale/2;if(Xa&&Fi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(eu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*eu)),lo.imageName){let tu=Vo[lo.imageName];uo=tu.sdf,$o=tu.pixelRatio,Ro=Md/$o}let $v=pa?[lo.x+Th,lo.y]:[0,0],ld=pa?[0,0]:[lo.x+Th+ln[0],lo.y+ln[1]-Ju],Ah=[0,0];qu&&(Ah=ld,ld=[0,0]);let Gd=lo.metrics.isDoubleResolution?2:1,Hd=(lo.metrics.left-Ro)*lo.scale-Th+ld[0],jd=(-lo.metrics.top-Ro)*lo.scale+ld[1],Tf=Hd+Xn.w/Gd*lo.scale/$o,Sh=jd+Xn.h/Gd*lo.scale/$o,Ed=new u(Hd,jd),ud=new u(Tf,jd),Hh=new u(Hd,Sh),Rf=new u(Tf,Sh);if(qu){let tu=new u(-Th,Th-wh),pc=-Math.PI/2,$u=eu/2-Th,Fv=new u(5-wh-$u,-(lo.imageName?$u:0)),ff=new u(...Ah);Ed._rotateAround(pc,tu)._add(Fv)._add(ff),ud._rotateAround(pc,tu)._add(Fv)._add(ff),Hh._rotateAround(pc,tu)._add(Fv)._add(ff),Rf._rotateAround(pc,tu)._add(Fv)._add(ff)}if(sa){let tu=Math.sin(sa),pc=Math.cos(sa),$u=[pc,-tu,tu,pc];Ed._matMult($u),ud._matMult($u),Hh._matMult($u),Rf._matMult($u)}let Dv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:ud,bl:Hh,br:Rf,tex:Xn,writingMode:Fi.writingMode,glyphOffset:$v,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Dv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,ze,te,fe,pe,W,R.allowVerticalPlacement),ui=R.textSizeData,yi=null;ui.kind===\"source\"?(yi=[v0*te.layout.get(\"text-size\").evaluate(pe,{})],yi[0]>lm&&T(`${R.layerIds[0]}: Value for \"text-size\" is >= ${jx}. Reduce your \"text-size\".`)):ui.kind===\"composite\"&&(yi=[v0*mr.compositeTextSizes[0].evaluate(pe,{},Lr),v0*mr.compositeTextSizes[1].evaluate(pe,{},Lr)],(yi[0]>lm||yi[1]>lm)&&T(`${R.layerIds[0]}: Value for \"text-size\" is >= ${jx}. Reduce your \"text-size\".`)),R.addSymbols(R.text,zr,yi,ze,fe,pe,ut,S,Ke.lineStartIndex,Ke.lineLength,fr,Lr);for(let dn of Lt)Qt[dn]=R.text.placedSymbolArray.length-1;return 4*zr.length}function Gk(R){for(let S in R)return R[S];return null}function tO(R,S,F,W){let te=R.compareText;if(S in te){let fe=te[S];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])<F)return!0}else te[S]=[];return te[S].push(W),!1}let Hk=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class mS{static from(S){if(!(S instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");let[F,W]=new Uint8Array(S,0,2);if(F!==219)throw new Error(\"Data does not appear to be in a KDBush format.\");let te=W>>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=Hk[15&W];if(!fe)throw new Error(\"Unrecognized array type.\");let[pe]=new Uint16Array(S,2,1),[ze]=new Uint32Array(S,4,1);return new mS(ze,pe,fe,S)}constructor(S,F=64,W=Float64Array,te){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let fe=Hk.indexOf(this.ArrayType),pe=2*S*this.ArrayType.BYTES_PER_ELEMENT,ze=S*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-ze%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+ze+Ke,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+pe+ze+Ke),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+ze+Ke,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=S)}add(S,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=S,this.coords[this._pos++]=F,W}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return qw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,F,W,te){if(!this._finished)throw new Error(\"Data not yet indexed - call index.finish().\");let{ids:fe,coords:pe,nodeSize:ze}=this,Ke=[0,fe.length-1,0],ut=[];for(;Ke.length;){let Lt=Ke.pop()||0,Qt=Ke.pop()||0,fr=Ke.pop()||0;if(Qt-fr<=ze){for(let ui=fr;ui<=Qt;ui++){let yi=pe[2*ui],dn=pe[2*ui+1];yi>=S&&yi<=W&&dn>=F&&dn<=te&&ut.push(fe[ui])}continue}let mr=fr+Qt>>1,Lr=pe[2*mr],zr=pe[2*mr+1];Lr>=S&&Lr<=W&&zr>=F&&zr<=te&&ut.push(fe[mr]),(Lt===0?S<=Lr:F<=zr)&&(Ke.push(fr),Ke.push(mr-1),Ke.push(1-Lt)),(Lt===0?W>=Lr:te>=zr)&&(Ke.push(mr+1),Ke.push(Qt),Ke.push(1-Lt))}return ut}within(S,F,W){if(!this._finished)throw new Error(\"Data not yet indexed - call index.finish().\");let{ids:te,coords:fe,nodeSize:pe}=this,ze=[0,te.length-1,0],Ke=[],ut=W*W;for(;ze.length;){let Lt=ze.pop()||0,Qt=ze.pop()||0,fr=ze.pop()||0;if(Qt-fr<=pe){for(let ui=fr;ui<=Qt;ui++)Wk(fe[2*ui],fe[2*ui+1],S,F)<=ut&&Ke.push(te[ui]);continue}let mr=fr+Qt>>1,Lr=fe[2*mr],zr=fe[2*mr+1];Wk(Lr,zr,S,F)<=ut&&Ke.push(te[mr]),(Lt===0?S-W<=Lr:F-W<=zr)&&(ze.push(fr),ze.push(mr-1),ze.push(1-Lt)),(Lt===0?S+W>=Lr:F+W>=zr)&&(ze.push(mr+1),ze.push(Qt),ze.push(1-Lt))}return Ke}}function qw(R,S,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;jk(R,S,pe,W,te,fe),qw(R,S,F,W,pe-1,1-fe),qw(R,S,F,pe+1,te,1-fe)}function jk(R,S,F,W,te,fe){for(;te>W;){if(te-W>600){let ut=te-W+1,Lt=F-W+1,Qt=Math.log(ut),fr=.5*Math.exp(2*Qt/3),mr=.5*Math.sqrt(Qt*fr*(ut-fr)/ut)*(Lt-ut/2<0?-1:1);jk(R,S,F,Math.max(W,Math.floor(F-Lt*fr/ut+mr)),Math.min(te,Math.floor(F+(ut-Lt)*fr/ut+mr)),fe)}let pe=S[2*F+fe],ze=W,Ke=te;for(Qx(R,S,W,F),S[2*te+fe]>pe&&Qx(R,S,W,te);ze<Ke;){for(Qx(R,S,ze,Ke),ze++,Ke--;S[2*ze+fe]<pe;)ze++;for(;S[2*Ke+fe]>pe;)Ke--}S[2*W+fe]===pe?Qx(R,S,W,Ke):(Ke++,Qx(R,S,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function Qx(R,S,F,W){yS(R,F,W),yS(S,2*F,2*W),yS(S,2*F+1,2*W+1)}function yS(R,S,F){let W=R[S];R[S]=R[F],R[F]=W}function Wk(R,S,F,W){let te=R-F,fe=S-W;return te*te+fe*fe}var Bw;i.bg=void 0,(Bw=i.bg||(i.bg={})).create=\"create\",Bw.load=\"load\",Bw.fullLoad=\"fullLoad\";let eb=null,sh=[],_S=1e3/60,xS=\"loadTime\",Nw=\"fullLoadTime\",rO={mark(R){performance.mark(R)},frame(R){let S=R;eb!=null&&sh.push(S-eb),eb=S},clearMetrics(){eb=null,sh=[],performance.clearMeasures(xS),performance.clearMeasures(Nw);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(xS,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(xS)[0].duration,S=performance.getEntriesByName(Nw)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>_S).reduce((fe,pe)=>fe+(pe-_S)/_S,0);return{loadTime:R,fullLoadTime:S,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Kt{},i.A=xi,i.B=hn,i.C=function(R){if(V==null){let S=R.navigator?R.navigator.userAgent:null;V=!!R.safari||!(!S||!(/\\b(iPad|iPhone|iPod)\\b/.test(S)||S.match(\"Safari\")&&!S.match(\"Chrome\")))}return V},i.D=Ua,i.E=Fe,i.F=class{constructor(R,S){this.target=R,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,\"message\",F=>this.receive(F)),this.globalScope=O(self)?R:window}registerMessageHandler(R,S){this.messageHandlers[R]=S}sendAsync(R,S){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},S&&S.signal.addEventListener(\"abort\",()=>{delete this.resolveRejects[te];let ze={id:te,type:\"<cancel>\",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ze)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let S=R.data,F=S.id;if(!(S.origin!==\"file://\"&&location.origin!==\"file://\"&&S.origin!==\"resource://android\"&&location.origin!==\"resource://android\"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===\"<cancel>\"){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(O(self)||S.mustQueue)return this.tasks[F]=S,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,S)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),S=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(R,S)}processTask(R,S){return a(this,void 0,void 0,function*(){if(S.type===\"<response>\"){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(S.error?te.reject(Na(S.error)):te.resolve(Na(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(\", \")}`));let F=Na(S.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[S.type](S.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,S,F){let W=[];delete this.abortControllers[R];let te={id:R,type:\"<response>\",sourceMapId:this.mapId,origin:location.origin,error:S?La(S):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=ke,i.H=function(){var R=new xi(16);return xi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Cw,i.J=function(R,S,F){var W,te,fe,pe,ze,Ke,ut,Lt,Qt,fr,mr,Lr,zr=F[0],ui=F[1],yi=F[2];return S===R?(R[12]=S[0]*zr+S[4]*ui+S[8]*yi+S[12],R[13]=S[1]*zr+S[5]*ui+S[9]*yi+S[13],R[14]=S[2]*zr+S[6]*ui+S[10]*yi+S[14],R[15]=S[3]*zr+S[7]*ui+S[11]*yi+S[15]):(te=S[1],fe=S[2],pe=S[3],ze=S[4],Ke=S[5],ut=S[6],Lt=S[7],Qt=S[8],fr=S[9],mr=S[10],Lr=S[11],R[0]=W=S[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=ze,R[5]=Ke,R[6]=ut,R[7]=Lt,R[8]=Qt,R[9]=fr,R[10]=mr,R[11]=Lr,R[12]=W*zr+ze*ui+Qt*yi+S[12],R[13]=te*zr+Ke*ui+fr*yi+S[13],R[14]=fe*zr+ut*ui+mr*yi+S[14],R[15]=pe*zr+Lt*ui+Lr*yi+S[15]),R},i.K=function(R,S,F){var W=F[0],te=F[1],fe=F[2];return R[0]=S[0]*W,R[1]=S[1]*W,R[2]=S[2]*W,R[3]=S[3]*W,R[4]=S[4]*te,R[5]=S[5]*te,R[6]=S[6]*te,R[7]=S[7]*te,R[8]=S[8]*fe,R[9]=S[9]*fe,R[10]=S[10]*fe,R[11]=S[11]*fe,R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15],R},i.L=ci,i.M=function(R,S){let F={};for(let W=0;W<S.length;W++){let te=S[W];te in R&&(F[te]=R[te])}return F},i.N=dg,i.O=Fw,i.P=u,i.Q=Ck,i.R=Yi,i.S=Jv,i.T=Yu,i.U=x,i.V=b,i.W=H,i.X=Ha,i.Y=qe,i.Z=Jx,i._=a,i.a=_e,i.a$=function(R,S){var F=R[0],W=R[1],te=R[2],fe=R[3],pe=R[4],ze=R[5],Ke=R[6],ut=R[7],Lt=R[8],Qt=R[9],fr=R[10],mr=R[11],Lr=R[12],zr=R[13],ui=R[14],yi=R[15],dn=S[0],Fi=S[1],ln=S[2],An=S[3],pa=S[4],ro=S[5],Vo=S[6],Xa=S[7],sa=S[8],Mo=S[9],fo=S[10],lo=S[11],Xn=S[12],Ro=S[13],uo=S[14],$o=S[15];return Math.abs(F-dn)<=Yr*Math.max(1,Math.abs(F),Math.abs(dn))&&Math.abs(W-Fi)<=Yr*Math.max(1,Math.abs(W),Math.abs(Fi))&&Math.abs(te-ln)<=Yr*Math.max(1,Math.abs(te),Math.abs(ln))&&Math.abs(fe-An)<=Yr*Math.max(1,Math.abs(fe),Math.abs(An))&&Math.abs(pe-pa)<=Yr*Math.max(1,Math.abs(pe),Math.abs(pa))&&Math.abs(ze-ro)<=Yr*Math.max(1,Math.abs(ze),Math.abs(ro))&&Math.abs(Ke-Vo)<=Yr*Math.max(1,Math.abs(Ke),Math.abs(Vo))&&Math.abs(ut-Xa)<=Yr*Math.max(1,Math.abs(ut),Math.abs(Xa))&&Math.abs(Lt-sa)<=Yr*Math.max(1,Math.abs(Lt),Math.abs(sa))&&Math.abs(Qt-Mo)<=Yr*Math.max(1,Math.abs(Qt),Math.abs(Mo))&&Math.abs(fr-fo)<=Yr*Math.max(1,Math.abs(fr),Math.abs(fo))&&Math.abs(mr-lo)<=Yr*Math.max(1,Math.abs(mr),Math.abs(lo))&&Math.abs(Lr-Xn)<=Yr*Math.max(1,Math.abs(Lr),Math.abs(Xn))&&Math.abs(zr-Ro)<=Yr*Math.max(1,Math.abs(zr),Math.abs(Ro))&&Math.abs(ui-uo)<=Yr*Math.max(1,Math.abs(ui),Math.abs(uo))&&Math.abs(yi-$o)<=Yr*Math.max(1,Math.abs(yi),Math.abs($o))},i.a0=Ye,i.a1=hS,i.a2=ur,i.a3=R=>{let S=window.document.createElement(\"video\");return S.muted=!0,new Promise(F=>{S.onloadstart=()=>{F(S)};for(let W of R){let te=window.document.createElement(\"source\");Le(W)||(S.crossOrigin=\"Anonymous\"),te.src=W,S.appendChild(te)}})},i.a4=function(){return _++},i.a5=In,i.a6=E1,i.a7=Fc,i.a8=Ml,i.a9=dS,i.aA=function(R){if(R.type===\"custom\")return new uS(R);switch(R.type){case\"background\":return new Z9(R);case\"circle\":return new vi(R);case\"fill\":return new mt(R);case\"fill-extrusion\":return new kv(R);case\"heatmap\":return new oa(R);case\"hillshade\":return new Ys(R);case\"line\":return new ay(R);case\"raster\":return new Yx(R);case\"symbol\":return new uy(R)}},i.aB=g,i.aC=function(R,S){if(!R)return[{command:\"setStyle\",args:[S]}];let F=[];try{if(!pt(R.version,S.version))return[{command:\"setStyle\",args:[S]}];pt(R.center,S.center)||F.push({command:\"setCenter\",args:[S.center]}),pt(R.zoom,S.zoom)||F.push({command:\"setZoom\",args:[S.zoom]}),pt(R.bearing,S.bearing)||F.push({command:\"setBearing\",args:[S.bearing]}),pt(R.pitch,S.pitch)||F.push({command:\"setPitch\",args:[S.pitch]}),pt(R.sprite,S.sprite)||F.push({command:\"setSprite\",args:[S.sprite]}),pt(R.glyphs,S.glyphs)||F.push({command:\"setGlyphs\",args:[S.glyphs]}),pt(R.transition,S.transition)||F.push({command:\"setTransition\",args:[S.transition]}),pt(R.light,S.light)||F.push({command:\"setLight\",args:[S.light]}),pt(R.terrain,S.terrain)||F.push({command:\"setTerrain\",args:[S.terrain]}),pt(R.sky,S.sky)||F.push({command:\"setSky\",args:[S.sky]}),pt(R.projection,S.projection)||F.push({command:\"setProjection\",args:[S.projection]});let W={},te=[];(function(pe,ze,Ke,ut){let Lt;for(Lt in ze=ze||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Lt)&&(Object.prototype.hasOwnProperty.call(ze,Lt)||lt(Lt,Ke,ut));for(Lt in ze)Object.prototype.hasOwnProperty.call(ze,Lt)&&(Object.prototype.hasOwnProperty.call(pe,Lt)?pt(pe[Lt],ze[Lt])||(pe[Lt].type===\"geojson\"&&ze[Lt].type===\"geojson\"&&Nt(pe,ze,Lt)?Wt(Ke,{command:\"setGeoJSONSourceData\",args:[Lt,ze[Lt].data]}):Gt(Lt,ze,Ke,ut)):st(Lt,ze,Ke))})(R.sources,S.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{\"source\"in pe&&W[pe.source]?F.push({command:\"removeLayer\",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,ze,Ke){ze=ze||[];let ut=(pe=pe||[]).map(sr),Lt=ze.map(sr),Qt=pe.reduce(wr,{}),fr=ze.reduce(wr,{}),mr=ut.slice(),Lr=Object.create(null),zr,ui,yi,dn,Fi;for(let ln=0,An=0;ln<ut.length;ln++)zr=ut[ln],Object.prototype.hasOwnProperty.call(fr,zr)?An++:(Wt(Ke,{command:\"removeLayer\",args:[zr]}),mr.splice(mr.indexOf(zr,An),1));for(let ln=0,An=0;ln<Lt.length;ln++)zr=Lt[Lt.length-1-ln],mr[mr.length-1-ln]!==zr&&(Object.prototype.hasOwnProperty.call(Qt,zr)?(Wt(Ke,{command:\"removeLayer\",args:[zr]}),mr.splice(mr.lastIndexOf(zr,mr.length-An),1)):An++,dn=mr[mr.length-ln],Wt(Ke,{command:\"addLayer\",args:[fr[zr],dn]}),mr.splice(mr.length-ln,0,zr),Lr[zr]=!0);for(let ln=0;ln<Lt.length;ln++)if(zr=Lt[ln],ui=Qt[zr],yi=fr[zr],!Lr[zr]&&!pt(ui,yi))if(pt(ui.source,yi.source)&&pt(ui[\"source-layer\"],yi[\"source-layer\"])&&pt(ui.type,yi.type)){for(Fi in $t(ui.layout,yi.layout,Ke,zr,null,\"setLayoutProperty\"),$t(ui.paint,yi.paint,Ke,zr,null,\"setPaintProperty\"),pt(ui.filter,yi.filter)||Wt(Ke,{command:\"setFilter\",args:[zr,yi.filter]}),pt(ui.minzoom,yi.minzoom)&&pt(ui.maxzoom,yi.maxzoom)||Wt(Ke,{command:\"setLayerZoomRange\",args:[zr,yi.minzoom,yi.maxzoom]}),ui)Object.prototype.hasOwnProperty.call(ui,Fi)&&Fi!==\"layout\"&&Fi!==\"paint\"&&Fi!==\"filter\"&&Fi!==\"metadata\"&&Fi!==\"minzoom\"&&Fi!==\"maxzoom\"&&(Fi.indexOf(\"paint.\")===0?$t(ui[Fi],yi[Fi],Ke,zr,Fi.slice(6),\"setPaintProperty\"):pt(ui[Fi],yi[Fi])||Wt(Ke,{command:\"setLayerProperty\",args:[zr,Fi,yi[Fi]]}));for(Fi in yi)Object.prototype.hasOwnProperty.call(yi,Fi)&&!Object.prototype.hasOwnProperty.call(ui,Fi)&&Fi!==\"layout\"&&Fi!==\"paint\"&&Fi!==\"filter\"&&Fi!==\"metadata\"&&Fi!==\"minzoom\"&&Fi!==\"maxzoom\"&&(Fi.indexOf(\"paint.\")===0?$t(ui[Fi],yi[Fi],Ke,zr,Fi.slice(6),\"setPaintProperty\"):pt(ui[Fi],yi[Fi])||Wt(Ke,{command:\"setLayerProperty\",args:[zr,Fi,yi[Fi]]}))}else Wt(Ke,{command:\"removeLayer\",args:[zr]}),dn=mr[mr.lastIndexOf(zr)+1],Wt(Ke,{command:\"addLayer\",args:[yi,dn]})}(fe,S.layers,F)}catch(W){console.warn(\"Unable to compute style diff:\",W),F=[{command:\"setStyle\",args:[S]}]}return F},i.aD=function(R){let S=[],F=R.id;return F===void 0&&S.push({message:`layers.${F}: missing required property \"id\"`}),R.render===void 0&&S.push({message:`layers.${F}: missing required method \"render\"`}),R.renderingMode&&R.renderingMode!==\"2d\"&&R.renderingMode!==\"3d\"&&S.push({message:`layers.${F}: property \"renderingMode\" must be either \"2d\" or \"3d\"`}),S},i.aE=function R(S,F){if(Array.isArray(S)){if(!Array.isArray(F)||S.length!==F.length)return!1;for(let W=0;W<S.length;W++)if(!R(S[W],F[W]))return!1;return!0}if(typeof S==\"object\"&&S!==null&&F!==null){if(typeof F!=\"object\"||Object.keys(S).length!==Object.keys(F).length)return!1;for(let W in S)if(!R(S[W],F[W]))return!1;return!0}return S===F},i.aF=k,i.aG=M,i.aH=class extends Ai{constructor(R,S){super(R,S),this.current=0}set(R){this.current!==R&&(this.current=R,this.gl.uniform1i(this.location,R))}},i.aI=ti,i.aJ=class extends Ai{constructor(R,S){super(R,S),this.current=Nn}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let S=1;S<16;S++)if(R[S]!==this.current[S]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},i.aK=Rn,i.aL=Cn,i.aM=ar,i.aN=class extends Ai{constructor(R,S){super(R,S),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},i.aO=class extends Ai{constructor(R,S){super(R,S),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},i.aP=function(R,S,F,W,te,fe,pe){var ze=1/(S-F),Ke=1/(W-te),ut=1/(fe-pe);return R[0]=-2*ze,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ke,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*ut,R[11]=0,R[12]=(S+F)*ze,R[13]=(te+W)*Ke,R[14]=(pe+fe)*ut,R[15]=1,R},i.aQ=Xi,i.aR=class extends it{},i.aS=im,i.aT=class extends Ht{},i.aU=ra,i.aV=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},i.aW=Ln,i.aX=wo,i.aY=se,i.aZ=class extends Li{},i.a_=function(R,S){return R[0]===S[0]&&R[1]===S[1]&&R[2]===S[2]&&R[3]===S[3]&&R[4]===S[4]&&R[5]===S[5]&&R[6]===S[6]&&R[7]===S[7]&&R[8]===S[8]&&R[9]===S[9]&&R[10]===S[10]&&R[11]===S[11]&&R[12]===S[12]&&R[13]===S[13]&&R[14]===S[14]&&R[15]===S[15]},i.aa=function(R){let S={};if(R.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return S[W]=!pe||pe.toLowerCase(),\"\"}),S[\"max-age\"]){let F=parseInt(S[\"max-age\"],10);isNaN(F)?delete S[\"max-age\"]:S[\"max-age\"]=F}return S},i.ab=function(R,S){let F=[];for(let W in R)W in S||F.push(W);return F},i.ac=E,i.ad=function(R,S,F){var W=Math.sin(F),te=Math.cos(F),fe=S[0],pe=S[1],ze=S[2],Ke=S[3],ut=S[4],Lt=S[5],Qt=S[6],fr=S[7];return S!==R&&(R[8]=S[8],R[9]=S[9],R[10]=S[10],R[11]=S[11],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15]),R[0]=fe*te+ut*W,R[1]=pe*te+Lt*W,R[2]=ze*te+Qt*W,R[3]=Ke*te+fr*W,R[4]=ut*te-fe*W,R[5]=Lt*te-pe*W,R[6]=Qt*te-ze*W,R[7]=fr*te-Ke*W,R},i.ae=function(R){var S=new xi(16);return S[0]=R[0],S[1]=R[1],S[2]=R[2],S[3]=R[3],S[4]=R[4],S[5]=R[5],S[6]=R[6],S[7]=R[7],S[8]=R[8],S[9]=R[9],S[10]=R[10],S[11]=R[11],S[12]=R[12],S[13]=R[13],S[14]=R[14],S[15]=R[15],S},i.af=qn,i.ag=function(R,S){let F=0,W=0;if(R.kind===\"constant\")W=R.layoutSize;else if(R.kind!==\"source\"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,ze=te?E(Co.interpolationFactor(te,S,fe,pe),0,1):0;R.kind===\"camera\"?W=Lo.number(R.minSize,R.maxSize,ze):F=ze}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:S,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind===\"source\"?W/v0:R.kind===\"composite\"?Lo.number(W/v0,te/v0,F):S},i.aj=aS,i.ak=function(R,S,F,W){let te=S.y-R.y,fe=S.x-R.x,pe=W.y-F.y,ze=W.x-F.x,Ke=pe*fe-ze*te;if(Ke===0)return null;let ut=(ze*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ut*fe,R.y+ut*te)},i.al=Dk,i.am=Sc,i.an=Ii,i.ao=function(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[S,F,W,te]},i.ap=eu,i.ar=nS,i.as=function(R,S){var F=S[0],W=S[1],te=S[2],fe=S[3],pe=S[4],ze=S[5],Ke=S[6],ut=S[7],Lt=S[8],Qt=S[9],fr=S[10],mr=S[11],Lr=S[12],zr=S[13],ui=S[14],yi=S[15],dn=F*ze-W*pe,Fi=F*Ke-te*pe,ln=F*ut-fe*pe,An=W*Ke-te*ze,pa=W*ut-fe*ze,ro=te*ut-fe*Ke,Vo=Lt*zr-Qt*Lr,Xa=Lt*ui-fr*Lr,sa=Lt*yi-mr*Lr,Mo=Qt*ui-fr*zr,fo=Qt*yi-mr*zr,lo=fr*yi-mr*ui,Xn=dn*lo-Fi*fo+ln*Mo+An*sa-pa*Xa+ro*Vo;return Xn?(R[0]=(ze*lo-Ke*fo+ut*Mo)*(Xn=1/Xn),R[1]=(te*fo-W*lo-fe*Mo)*Xn,R[2]=(zr*ro-ui*pa+yi*An)*Xn,R[3]=(fr*pa-Qt*ro-mr*An)*Xn,R[4]=(Ke*sa-pe*lo-ut*Xa)*Xn,R[5]=(F*lo-te*sa+fe*Xa)*Xn,R[6]=(ui*ln-Lr*ro-yi*Fi)*Xn,R[7]=(Lt*ro-fr*ln+mr*Fi)*Xn,R[8]=(pe*fo-ze*sa+ut*Vo)*Xn,R[9]=(W*sa-F*fo-fe*Vo)*Xn,R[10]=(Lr*pa-zr*ln+yi*dn)*Xn,R[11]=(Qt*ln-Lt*pa-mr*dn)*Xn,R[12]=(ze*Xa-pe*Mo-Ke*Vo)*Xn,R[13]=(F*Mo-W*Xa+te*Vo)*Xn,R[14]=(zr*Fi-Lr*An-ui*dn)*Xn,R[15]=(Lt*An-Qt*Fi+fr*dn)*Xn,R):null},i.at=gS,i.au=Iw,i.av=mS,i.aw=function(){let R={},S=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F===\"version\"?S:W.type===\"array\"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Yn,i.ay=ie,i.az=function(R){R=R.slice();let S=Object.create(null);for(let F=0;F<R.length;F++)S[R[F].id]=R[F];for(let F=0;F<R.length;F++)\"ref\"in R[F]&&(R[F]=ct(R[F],S[R[F].ref]));return R},i.b=G,i.b0=function(R,S){return R[0]=S[0],R[1]=S[1],R[2]=S[2],R[3]=S[3],R[4]=S[4],R[5]=S[5],R[6]=S[6],R[7]=S[7],R[8]=S[8],R[9]=S[9],R[10]=S[10],R[11]=S[11],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15],R},i.b1=function(R,S,F){return R[0]=S[0]*F[0],R[1]=S[1]*F[1],R[2]=S[2]*F[2],R[3]=S[3]*F[3],R},i.b2=function(R,S){return R[0]*S[0]+R[1]*S[1]+R[2]*S[2]+R[3]*S[3]},i.b3=A,i.b4=kk,i.b5=zw,i.b6=function(R,S,F,W,te){var fe,pe=1/Math.tan(S/2);return R[0]=pe/F,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=pe,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,te!=null&&te!==1/0?(R[10]=(te+W)*(fe=1/(W-te)),R[14]=2*te*W*fe):(R[10]=-1,R[14]=-2*W),R},i.b7=function(R,S,F){var W=Math.sin(F),te=Math.cos(F),fe=S[4],pe=S[5],ze=S[6],Ke=S[7],ut=S[8],Lt=S[9],Qt=S[10],fr=S[11];return S!==R&&(R[0]=S[0],R[1]=S[1],R[2]=S[2],R[3]=S[3],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15]),R[4]=fe*te+ut*W,R[5]=pe*te+Lt*W,R[6]=ze*te+Qt*W,R[7]=Ke*te+fr*W,R[8]=ut*te-fe*W,R[9]=Lt*te-pe*W,R[10]=Qt*te-ze*W,R[11]=fr*te-Ke*W,R},i.b8=p,i.b9=C,i.bA=Sd,i.bB=function(R){return R.message===re},i.bC=ks,i.bD=_s,i.ba=function(R){return R*Math.PI/180},i.bb=function(R,S){let{x:F,y:W}=Jx.fromLngLat(S);return!(R<0||R>25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,S){return R[0]=S[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=S[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=S[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Tt{},i.be=fS,i.bf=rO,i.bh=me,i.bi=function(R,S){_e.REGISTERED_PROTOCOLS[R]=S},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,S){let F={};for(let te=0;te<R.length;te++){let fe=S&&S[R[te].id]||Vh(R[te]);S&&(S[R[te].id]=fe);let pe=F[fe];pe||(pe=F[fe]=[]),pe.push(R[te])}let W=[];for(let te in F)W.push(F[te]);return W},i.bl=Di,i.bm=Pk,i.bn=cy,i.bo=kw,i.bp=function(R){R.bucket.createArrays(),R.bucket.tilePixelRatio=Ha/(512*R.bucket.overscaling),R.bucket.compareText={},R.bucket.iconsNeedLinear=!1;let S=R.bucket.layers[0],F=S.layout,W=S._unevaluatedLayout._values,te={layoutIconSize:W[\"icon-size\"].possiblyEvaluate(new is(R.bucket.zoom+1),R.canonical),layoutTextSize:W[\"text-size\"].possiblyEvaluate(new is(R.bucket.zoom+1),R.canonical),textMaxSize:W[\"text-size\"].possiblyEvaluate(new is(18))};if(R.bucket.textSizeData.kind===\"composite\"){let{minZoom:ut,maxZoom:Lt}=R.bucket.textSizeData;te.compositeTextSizes=[W[\"text-size\"].possiblyEvaluate(new is(ut),R.canonical),W[\"text-size\"].possiblyEvaluate(new is(Lt),R.canonical)]}if(R.bucket.iconSizeData.kind===\"composite\"){let{minZoom:ut,maxZoom:Lt}=R.bucket.iconSizeData;te.compositeIconSizes=[W[\"icon-size\"].possiblyEvaluate(new is(ut),R.canonical),W[\"icon-size\"].possiblyEvaluate(new is(Lt),R.canonical)]}let fe=F.get(\"text-line-height\")*eu,pe=F.get(\"text-rotation-alignment\")!==\"viewport\"&&F.get(\"symbol-placement\")!==\"point\",ze=F.get(\"text-keep-upright\"),Ke=F.get(\"text-size\");for(let ut of R.bucket.features){let Lt=F.get(\"text-font\").evaluate(ut,{},R.canonical).join(\",\"),Qt=Ke.evaluate(ut,{},R.canonical),fr=te.layoutTextSize.evaluate(ut,{},R.canonical),mr=te.layoutIconSize.evaluate(ut,{},R.canonical),Lr={horizontal:{},vertical:void 0},zr=ut.text,ui,yi=[0,0];if(zr){let ln=zr.toString(),An=F.get(\"text-letter-spacing\").evaluate(ut,{},R.canonical)*eu,pa=bo(ln)?An:0,ro=F.get(\"text-anchor\").evaluate(ut,{},R.canonical),Vo=Uk(S,ut,R.canonical);if(!Vo){let fo=F.get(\"text-radial-offset\").evaluate(ut,{},R.canonical);yi=fo?pS(ro,[fo*eu,fy]):F.get(\"text-offset\").evaluate(ut,{},R.canonical).map(lo=>lo*eu)}let Xa=pe?\"center\":F.get(\"text-justify\").evaluate(ut,{},R.canonical),sa=F.get(\"symbol-placement\")===\"point\"?F.get(\"text-max-width\").evaluate(ut,{},R.canonical)*eu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(ln)&&(Lr.vertical=Gx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,\"left\",pa,yi,i.ah.vertical,!0,fr,Qt))};if(!pe&&Vo){let fo=new Set;if(Xa===\"auto\")for(let Xn=0;Xn<Vo.values.length;Xn+=2)fo.add(gS(Vo.values[Xn]));else fo.add(Xa);let lo=!1;for(let Xn of fo)if(!Lr.horizontal[Xn])if(lo)Lr.horizontal[Xn]=Lr.horizontal[0];else{let Ro=Gx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,\"center\",Xn,pa,yi,i.ah.horizontal,!1,fr,Qt);Ro&&(Lr.horizontal[Xn]=Ro,lo=Ro.positionedLines.length===1)}Mo()}else{Xa===\"auto\"&&(Xa=gS(ro));let fo=Gx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,Xa,pa,yi,i.ah.horizontal,!1,fr,Qt);fo&&(Lr.horizontal[Xa]=fo),Mo(),Ka(ln)&&pe&&ze&&(Lr.vertical=Gx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,Xa,pa,yi,i.ah.vertical,!1,fr,Qt))}}let dn=!1;if(ut.icon&&ut.icon.name){let ln=R.imageMap[ut.icon.name];ln&&(ui=Hx(R.imagePositions[ut.icon.name],F.get(\"icon-offset\").evaluate(ut,{},R.canonical),F.get(\"icon-anchor\").evaluate(ut,{},R.canonical)),dn=!!ln.sdf,R.bucket.sdfIcons===void 0?R.bucket.sdfIcons=dn:R.bucket.sdfIcons!==dn&&T(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),(ln.pixelRatio!==R.bucket.pixelRatio||F.get(\"icon-rotate\").constantOr(1)!==0)&&(R.bucket.iconsNeedLinear=!0))}let Fi=Gk(Lr.horizontal)||Lr.vertical;R.bucket.iconsInText=!!Fi&&Fi.iconsInText,(Fi||ui)&&eO(R.bucket,ut,Lr,ui,R.imageMap,te,fr,mr,yi,dn,R.canonical)}R.showCollisionBoxes&&R.bucket.generateCollisionDebugBuffers()},i.bq=Kv,i.br=Ot,i.bs=so,i.bt=br,i.bu=tS,i.bv=class{constructor(R){this._marks={start:[R.url,\"start\"].join(\"#\"),end:[R.url,\"end\"].join(\"#\"),measure:R.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let R=performance.getEntriesByName(this._marks.measure);return R.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),R=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),R}},i.bw=function(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(b())try{return yield H(R,S,F,W,te)}catch(fe){}return function(fe,pe,ze,Ke,ut){let Lt=fe.width,Qt=fe.height;N&&j||(N=new OffscreenCanvas(Lt,Qt),j=N.getContext(\"2d\",{willReadFrequently:!0})),N.width=Lt,N.height=Qt,j.drawImage(fe,0,0,Lt,Qt);let fr=j.getImageData(pe,ze,Ke,ut);return j.clearRect(0,0,Lt,Qt),fr.data}(R,S,F,W,te)})},i.bx=Lk,i.by=o,i.bz=s,i.c=oe,i.d=R=>a(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(R)],{type:\"image/png\"});try{return createImageBitmap(S)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((S,F)=>{let W=new Image;W.onload=()=>{S(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"));let te=new Blob([new Uint8Array(R)],{type:\"image/png\"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=Me,i.h=(R,S)=>Se(L(R,{type:\"json\"}),S),i.i=O,i.j=ge,i.k=Pe,i.l=(R,S)=>Se(L(R,{type:\"arrayBuffer\"}),S),i.m=Se,i.n=function(R){return new tS(R).readFields(CQ,[])},i.o=na,i.p=iS,i.q=ue,i.r=Wi,i.s=Le,i.t=Zi,i.u=Ei,i.v=ce,i.w=T,i.x=function([R,S,F]){return S+=90,S*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(S)*Math.sin(F),y:R*Math.sin(S)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=is}),r(\"worker\",[\"./shared\"],function(i){\"use strict\";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let $e of Ge){this._layerConfigs[$e.id]=$e;let wt=this._layers[$e.id]=i.aA($e);wt._featureFilter=i.a7(wt.filter),this.keyCache[$e.id]&&delete this.keyCache[$e.id]}for(let $e of Je)delete this.keyCache[$e],delete this._layerConfigs[$e],delete this._layers[$e];this.familiesBySource={};let je=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let $e of je){let wt=$e.map(ir=>this._layers[ir.id]),Ie=wt[0];if(Ie.visibility===\"none\")continue;let xe=Ie.source||\"\",Ce=this.familiesBySource[xe];Ce||(Ce=this.familiesBySource[xe]={});let vt=Ie.sourceLayer||\"_geojsonTileLayer\",nr=Ce[vt];nr||(nr=Ce[vt]=[]),nr.push(wt)}}}class o{constructor(Ge){let Je={},je=[];for(let xe in Ge){let Ce=Ge[xe],vt=Je[xe]={};for(let nr in Ce){let ir=Ce[+nr];if(!ir||ir.bitmap.width===0||ir.bitmap.height===0)continue;let pr={x:0,y:0,w:ir.bitmap.width+2,h:ir.bitmap.height+2};je.push(pr),vt[nr]={rect:pr,metrics:ir.metrics}}}let{w:$e,h:wt}=i.p(je),Ie=new i.o({width:$e||1,height:wt||1});for(let xe in Ge){let Ce=Ge[xe];for(let vt in Ce){let nr=Ce[+vt];if(!nr||nr.bitmap.width===0||nr.bitmap.height===0)continue;let ir=Je[xe][vt].rect;i.o.copy(nr.bitmap,Ie,{x:0,y:0},{x:ir.x+1,y:ir.y+1},nr.bitmap)}}this.image=Ie,this.positions=Je}}i.bl(\"GlyphAtlas\",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,je,$e){return i._(this,void 0,void 0,function*(){this.status=\"parsing\",this.data=Ge,this.collisionBoxArray=new i.a5;let wt=new i.bm(Object.keys(Ge.layers).sort()),Ie=new i.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];let xe={},Ce={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:je},vt=Je.familiesBySource[this.source];for(let Vn in vt){let kn=Ge.layers[Vn];if(!kn)continue;kn.version===1&&i.w(`Vector tile source \"${this.source}\" layer \"${Vn}\" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ea=wt.encode(Vn),ua=[];for(let Vt=0;Vt<kn.length;Vt++){let _t=kn.feature(Vt),tr=Ie.getId(_t,Vn);ua.push({feature:_t,id:tr,index:Vt,sourceLayerIndex:ea})}for(let Vt of vt[Vn]){let _t=Vt[0];_t.source!==this.source&&i.w(`layer.source = ${_t.source} does not equal this.source = ${this.source}`),_t.minzoom&&this.zoom<Math.floor(_t.minzoom)||_t.maxzoom&&this.zoom>=_t.maxzoom||_t.visibility!==\"none\"&&(l(Vt,this.zoom,je),(xe[_t.id]=_t.createBucket({index:Ie.bucketLayerIDs.length,layers:Vt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ea,sourceID:this.source})).populate(ua,Ce,this.tileID.canonical),Ie.bucketLayerIDs.push(Vt.map(tr=>tr.id)))}}let nr=i.aF(Ce.glyphDependencies,Vn=>Object.keys(Vn).map(Number));this.inFlightDependencies.forEach(Vn=>Vn==null?void 0:Vn.abort()),this.inFlightDependencies=[];let ir=Promise.resolve({});if(Object.keys(nr).length){let Vn=new AbortController;this.inFlightDependencies.push(Vn),ir=$e.sendAsync({type:\"GG\",data:{stacks:nr,source:this.source,tileID:this.tileID,type:\"glyphs\"}},Vn)}let pr=Object.keys(Ce.iconDependencies),oi=Promise.resolve({});if(pr.length){let Vn=new AbortController;this.inFlightDependencies.push(Vn),oi=$e.sendAsync({type:\"GI\",data:{icons:pr,source:this.source,tileID:this.tileID,type:\"icons\"}},Vn)}let di=Object.keys(Ce.patternDependencies),Jr=Promise.resolve({});if(di.length){let Vn=new AbortController;this.inFlightDependencies.push(Vn),Jr=$e.sendAsync({type:\"GI\",data:{icons:di,source:this.source,tileID:this.tileID,type:\"patterns\"}},Vn)}let[fi,Hi,Pn]=yield Promise.all([ir,oi,Jr]),wn=new o(fi),pn=new i.bo(Hi,Pn);for(let Vn in xe){let kn=xe[Vn];kn instanceof i.a6?(l(kn.layers,this.zoom,je),i.bp({bucket:kn,glyphMap:fi,glyphPositions:wn.positions,imageMap:Hi,imagePositions:pn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):kn.hasPattern&&(kn instanceof i.bq||kn instanceof i.br||kn instanceof i.bs)&&(l(kn.layers,this.zoom,je),kn.addFeatures(Ce,this.tileID.canonical,pn.patternPositions))}return this.status=\"done\",{buckets:Object.values(xe).filter(Vn=>!Vn.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:wn.image,imageAtlas:pn,glyphMap:this.returnDependencies?fi:null,iconMap:this.returnDependencies?Hi:null,glyphPositions:this.returnDependencies?wn.positions:null}})}}function l(dt,Ge,Je){let je=new i.z(Ge);for(let $e of dt)$e.recalculate(je,Je)}class u{constructor(Ge,Je,je){this.actor=Ge,this.layerIndex=Je,this.availableImages=je,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let je=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(je.data)),rawData:je.data,cacheControl:je.cacheControl,expires:je.expires}}catch($e){let wt=new Uint8Array(je.data),Ie=`Unable to parse the tile at ${Ge.request.url}, `;throw Ie+=wt[0]===31&&wt[1]===139?\"please make sure the data is not gzipped and that you have configured the relevant header in the server\":`got error: ${$e.message}`,new Error(Ie)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,je=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),$e=new s(Ge);this.loading[Je]=$e;let wt=new AbortController;$e.abort=wt;try{let Ie=yield this.loadVectorTile(Ge,wt);if(delete this.loading[Je],!Ie)return null;let xe=Ie.rawData,Ce={};Ie.expires&&(Ce.expires=Ie.expires),Ie.cacheControl&&(Ce.cacheControl=Ie.cacheControl);let vt={};if(je){let ir=je.finish();ir&&(vt.resourceTiming=JSON.parse(JSON.stringify(ir)))}$e.vectorTile=Ie.vectorTile;let nr=$e.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=$e,this.fetching[Je]={rawTileData:xe,cacheControl:Ce,resourceTiming:vt};try{let ir=yield nr;return i.e({rawTileData:xe.slice(0)},ir,Ce,vt)}finally{delete this.fetching[Je]}}catch(Ie){throw delete this.loading[Je],$e.status=\"done\",this.loaded[Je]=$e,Ie}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error(\"Should not be trying to reload a tile that was never loaded or has been removed\");let je=this.loaded[Je];if(je.showCollisionBoxes=Ge.showCollisionBoxes,je.status===\"parsing\"){let $e=yield je.parse(je.vectorTile,this.layerIndex,this.availableImages,this.actor),wt;if(this.fetching[Je]){let{rawTileData:Ie,cacheControl:xe,resourceTiming:Ce}=this.fetching[Je];delete this.fetching[Je],wt=i.e({rawTileData:Ie.slice(0)},$e,xe,Ce)}else wt=$e;return wt}if(je.status===\"done\"&&je.vectorTile)return je.parse(je.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,je=Ge.uid;Je&&Je[je]&&Je[je].abort&&(Je[je].abort.abort(),delete Je[je])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:je,rawImageData:$e,redFactor:wt,greenFactor:Ie,blueFactor:xe,baseShift:Ce}=Ge,vt=$e.width+2,nr=$e.height+2,ir=i.b($e)?new i.R({width:vt,height:nr},yield i.bw($e,-1,-1,vt,nr)):$e,pr=new i.bx(Je,ir,je,wt,Ie,xe,Ce);return this.loaded=this.loaded||{},this.loaded[Je]=pr,pr})}removeTile(Ge){let Je=this.loaded,je=Ge.uid;Je&&Je[je]&&delete Je[je]}}function f(dt,Ge){if(dt.length!==0){h(dt[0],Ge);for(var Je=1;Je<dt.length;Je++)h(dt[Je],!Ge)}}function h(dt,Ge){for(var Je=0,je=0,$e=0,wt=dt.length,Ie=wt-1;$e<wt;Ie=$e++){var xe=(dt[$e][0]-dt[Ie][0])*(dt[Ie][1]+dt[$e][1]),Ce=Je+xe;je+=Math.abs(Je)>=Math.abs(xe)?Je-Ce+xe:xe-Ce+Je,Je=Ce}Je+je>=0!=!!Ge&&dt.reverse()}var d=i.by(function dt(Ge,Je){var je,$e=Ge&&Ge.type;if($e===\"FeatureCollection\")for(je=0;je<Ge.features.length;je++)dt(Ge.features[je],Je);else if($e===\"GeometryCollection\")for(je=0;je<Ge.geometries.length;je++)dt(Ge.geometries[je],Je);else if($e===\"Feature\")dt(Ge.geometry,Je);else if($e===\"Polygon\")f(Ge.coordinates,Je);else if($e===\"MultiPolygon\")for(je=0;je<Ge.coordinates.length;je++)f(Ge.coordinates[je],Je);return Ge});let v=i.bt.VectorTileFeature.prototype.toGeoJSON;var x={exports:{}},b=i.bz,p=i.bt.VectorTileFeature,C=E;function E(dt,Ge){this.options=Ge||{},this.features=dt,this.length=dt.length}function A(dt,Ge){this.id=typeof dt.id==\"number\"?dt.id:void 0,this.type=dt.type,this.rawGeometry=dt.type===1?[dt.geometry]:dt.geometry,this.properties=dt.tags,this.extent=Ge||4096}E.prototype.feature=function(dt){return new A(this.features[dt],this.options.extent)},A.prototype.loadGeometry=function(){var dt=this.rawGeometry;this.geometry=[];for(var Ge=0;Ge<dt.length;Ge++){for(var Je=dt[Ge],je=[],$e=0;$e<Je.length;$e++)je.push(new b(Je[$e][0],Je[$e][1]));this.geometry.push(je)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var dt=this.geometry,Ge=1/0,Je=-1/0,je=1/0,$e=-1/0,wt=0;wt<dt.length;wt++)for(var Ie=dt[wt],xe=0;xe<Ie.length;xe++){var Ce=Ie[xe];Ge=Math.min(Ge,Ce.x),Je=Math.max(Je,Ce.x),je=Math.min(je,Ce.y),$e=Math.max($e,Ce.y)}return[Ge,je,Je,$e]},A.prototype.toGeoJSON=p.prototype.toGeoJSON;var L=i.bA,_=C;function k(dt){var Ge=new L;return function(Je,je){for(var $e in Je.layers)je.writeMessage(3,M,Je.layers[$e])}(dt,Ge),Ge.finish()}function M(dt,Ge){var Je;Ge.writeVarintField(15,dt.version||1),Ge.writeStringField(1,dt.name||\"\"),Ge.writeVarintField(5,dt.extent||4096);var je={keys:[],values:[],keycache:{},valuecache:{}};for(Je=0;Je<dt.length;Je++)je.feature=dt.feature(Je),Ge.writeMessage(2,g,je);var $e=je.keys;for(Je=0;Je<$e.length;Je++)Ge.writeStringField(3,$e[Je]);var wt=je.values;for(Je=0;Je<wt.length;Je++)Ge.writeMessage(4,V,wt[Je])}function g(dt,Ge){var Je=dt.feature;Je.id!==void 0&&Ge.writeVarintField(1,Je.id),Ge.writeMessage(2,P,dt),Ge.writeVarintField(3,Je.type),Ge.writeMessage(4,O,Je)}function P(dt,Ge){var Je=dt.feature,je=dt.keys,$e=dt.values,wt=dt.keycache,Ie=dt.valuecache;for(var xe in Je.properties){var Ce=Je.properties[xe],vt=wt[xe];if(Ce!==null){vt===void 0&&(je.push(xe),wt[xe]=vt=je.length-1),Ge.writeVarint(vt);var nr=typeof Ce;nr!==\"string\"&&nr!==\"boolean\"&&nr!==\"number\"&&(Ce=JSON.stringify(Ce));var ir=nr+\":\"+Ce,pr=Ie[ir];pr===void 0&&($e.push(Ce),Ie[ir]=pr=$e.length-1),Ge.writeVarint(pr)}}}function T(dt,Ge){return(Ge<<3)+(7&dt)}function z(dt){return dt<<1^dt>>31}function O(dt,Ge){for(var Je=dt.loadGeometry(),je=dt.type,$e=0,wt=0,Ie=Je.length,xe=0;xe<Ie;xe++){var Ce=Je[xe],vt=1;je===1&&(vt=Ce.length),Ge.writeVarint(T(1,vt));for(var nr=je===3?Ce.length-1:Ce.length,ir=0;ir<nr;ir++){ir===1&&je!==1&&Ge.writeVarint(T(2,nr-1));var pr=Ce[ir].x-$e,oi=Ce[ir].y-wt;Ge.writeVarint(z(pr)),Ge.writeVarint(z(oi)),$e+=pr,wt+=oi}je===3&&Ge.writeVarint(T(7,1))}}function V(dt,Ge){var Je=typeof dt;Je===\"string\"?Ge.writeStringField(1,dt):Je===\"boolean\"?Ge.writeBooleanField(7,dt):Je===\"number\"&&(dt%1!=0?Ge.writeDoubleField(3,dt):dt<0?Ge.writeSVarintField(6,dt):Ge.writeVarintField(5,dt))}x.exports=k,x.exports.fromVectorTileJs=k,x.exports.fromGeojsonVt=function(dt,Ge){Ge=Ge||{};var Je={};for(var je in dt)Je[je]=new _(dt[je].features,Ge),Je[je].name=je,Je[je].version=Ge.version,Je[je].extent=Ge.extent;return k({layers:Je})},x.exports.GeoJSONWrapper=_;var G=i.by(x.exports);let Z={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:dt=>dt},H=Math.fround||(N=new Float32Array(1),dt=>(N[0]=+dt,N[0]));var N;let j=3,re=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:je,maxZoom:$e}=this.options;Je&&console.time(\"total time\");let wt=`prepare ${Ge.length} points`;Je&&console.time(wt),this.points=Ge;let Ie=[];for(let Ce=0;Ce<Ge.length;Ce++){let vt=Ge[Ce];if(!vt.geometry)continue;let[nr,ir]=vt.geometry.coordinates,pr=H(me(nr)),oi=H(ie(ir));Ie.push(pr,oi,1/0,Ce,-1,1),this.options.reduce&&Ie.push(0)}let xe=this.trees[$e+1]=this._createTree(Ie);Je&&console.timeEnd(wt);for(let Ce=$e;Ce>=je;Ce--){let vt=+Date.now();xe=this.trees[Ce]=this._createTree(this._cluster(xe,Ce)),Je&&console.log(\"z%d: %d clusters in %dms\",Ce,xe.numItems,+Date.now()-vt)}return Je&&console.timeEnd(\"total time\"),this}getClusters(Ge,Je){let je=((Ge[0]+180)%360+360)%360-180,$e=Math.max(-90,Math.min(90,Ge[1])),wt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)je=-180,wt=180;else if(je>wt){let ir=this.getClusters([je,$e,180,Ie],Je),pr=this.getClusters([-180,$e,wt,Ie],Je);return ir.concat(pr)}let xe=this.trees[this._limitZoom(Je)],Ce=xe.range(me(je),ie(Ie),me(wt),ie($e)),vt=xe.data,nr=[];for(let ir of Ce){let pr=this.stride*ir;nr.push(vt[pr+re]>1?Me(vt,pr,this.clusterProps):this.points[vt[pr+j]])}return nr}getChildren(Ge){let Je=this._getOriginId(Ge),je=this._getOriginZoom(Ge),$e=\"No cluster with the specified id.\",wt=this.trees[je];if(!wt)throw new Error($e);let Ie=wt.data;if(Je*this.stride>=Ie.length)throw new Error($e);let xe=this.options.radius/(this.options.extent*Math.pow(2,je-1)),Ce=wt.within(Ie[Je*this.stride],Ie[Je*this.stride+1],xe),vt=[];for(let nr of Ce){let ir=nr*this.stride;Ie[ir+4]===Ge&&vt.push(Ie[ir+re]>1?Me(Ie,ir,this.clusterProps):this.points[Ie[ir+j]])}if(vt.length===0)throw new Error($e);return vt}getLeaves(Ge,Je,je){let $e=[];return this._appendLeaves($e,Ge,Je=Je||10,je=je||0,0),$e}getTile(Ge,Je,je){let $e=this.trees[this._limitZoom(Ge)],wt=Math.pow(2,Ge),{extent:Ie,radius:xe}=this.options,Ce=xe/Ie,vt=(je-Ce)/wt,nr=(je+1+Ce)/wt,ir={features:[]};return this._addTileFeatures($e.range((Je-Ce)/wt,vt,(Je+1+Ce)/wt,nr),$e.data,Je,je,wt,ir),Je===0&&this._addTileFeatures($e.range(1-Ce/wt,vt,1,nr),$e.data,wt,je,wt,ir),Je===wt-1&&this._addTileFeatures($e.range(0,vt,Ce/wt,nr),$e.data,-1,je,wt,ir),ir.features.length?ir:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let je=this.getChildren(Ge);if(Je++,je.length!==1)break;Ge=je[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,je,$e,wt){let Ie=this.getChildren(Je);for(let xe of Ie){let Ce=xe.properties;if(Ce&&Ce.cluster?wt+Ce.point_count<=$e?wt+=Ce.point_count:wt=this._appendLeaves(Ge,Ce.cluster_id,je,$e,wt):wt<$e?wt++:Ge.push(xe),Ge.length===je)break}return wt}_createTree(Ge){let Je=new i.av(Ge.length/this.stride|0,this.options.nodeSize,Float32Array);for(let je=0;je<Ge.length;je+=this.stride)Je.add(Ge[je],Ge[je+1]);return Je.finish(),Je.data=Ge,Je}_addTileFeatures(Ge,Je,je,$e,wt,Ie){for(let xe of Ge){let Ce=xe*this.stride,vt=Je[Ce+re]>1,nr,ir,pr;if(vt)nr=ke(Je,Ce,this.clusterProps),ir=Je[Ce],pr=Je[Ce+1];else{let Jr=this.points[Je[Ce+j]];nr=Jr.properties;let[fi,Hi]=Jr.geometry.coordinates;ir=me(fi),pr=ie(Hi)}let oi={type:1,geometry:[[Math.round(this.options.extent*(ir*wt-je)),Math.round(this.options.extent*(pr*wt-$e))]],tags:nr},di;di=vt||this.options.generateId?Je[Ce+j]:this.points[Je[Ce+j]].id,di!==void 0&&(oi.id=di),Ie.features.push(oi)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:je,extent:$e,reduce:wt,minPoints:Ie}=this.options,xe=je/($e*Math.pow(2,Je)),Ce=Ge.data,vt=[],nr=this.stride;for(let ir=0;ir<Ce.length;ir+=nr){if(Ce[ir+2]<=Je)continue;Ce[ir+2]=Je;let pr=Ce[ir],oi=Ce[ir+1],di=Ge.within(Ce[ir],Ce[ir+1],xe),Jr=Ce[ir+re],fi=Jr;for(let Hi of di){let Pn=Hi*nr;Ce[Pn+2]>Je&&(fi+=Ce[Pn+re])}if(fi>Jr&&fi>=Ie){let Hi,Pn=pr*Jr,wn=oi*Jr,pn=-1,Vn=((ir/nr|0)<<5)+(Je+1)+this.points.length;for(let kn of di){let ea=kn*nr;if(Ce[ea+2]<=Je)continue;Ce[ea+2]=Je;let ua=Ce[ea+re];Pn+=Ce[ea]*ua,wn+=Ce[ea+1]*ua,Ce[ea+4]=Vn,wt&&(Hi||(Hi=this._map(Ce,ir,!0),pn=this.clusterProps.length,this.clusterProps.push(Hi)),wt(Hi,this._map(Ce,ea)))}Ce[ir+4]=Vn,vt.push(Pn/fi,wn/fi,1/0,Vn,-1,fi),wt&&vt.push(pn)}else{for(let Hi=0;Hi<nr;Hi++)vt.push(Ce[ir+Hi]);if(fi>1)for(let Hi of di){let Pn=Hi*nr;if(!(Ce[Pn+2]<=Je)){Ce[Pn+2]=Je;for(let wn=0;wn<nr;wn++)vt.push(Ce[Pn+wn])}}}}return vt}_getOriginId(Ge){return Ge-this.points.length>>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,je){if(Ge[Je+re]>1){let Ie=this.clusterProps[Ge[Je+oe]];return je?Object.assign({},Ie):Ie}let $e=this.points[Ge[Je+j]].properties,wt=this.options.map($e);return je&&wt===$e?Object.assign({},wt):wt}}function Me(dt,Ge,Je){return{type:\"Feature\",id:dt[Ge+j],properties:ke(dt,Ge,Je),geometry:{type:\"Point\",coordinates:[(je=dt[Ge],360*(je-.5)),Se(dt[Ge+1])]}};var je}function ke(dt,Ge,Je){let je=dt[Ge+re],$e=je>=1e4?`${Math.round(je/1e3)}k`:je>=1e3?Math.round(je/100)/10+\"k\":je,wt=dt[Ge+oe],Ie=wt===-1?{}:Object.assign({},Je[wt]);return Object.assign(Ie,{cluster:!0,cluster_id:dt[Ge+j],point_count:je,point_count_abbreviated:$e})}function me(dt){return dt/360+.5}function ie(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(dt){let Ge=(180-360*dt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Le(dt,Ge,Je,je){let $e=je,wt=Ge+(Je-Ge>>1),Ie,xe=Je-Ge,Ce=dt[Ge],vt=dt[Ge+1],nr=dt[Je],ir=dt[Je+1];for(let pr=Ge+3;pr<Je;pr+=3){let oi=Ae(dt[pr],dt[pr+1],Ce,vt,nr,ir);if(oi>$e)Ie=pr,$e=oi;else if(oi===$e){let di=Math.abs(pr-wt);di<xe&&(Ie=pr,xe=di)}}$e>je&&(Ie-Ge>3&&Le(dt,Ge,Ie,je),dt[Ie+2]=$e,Je-Ie>3&&Le(dt,Ie,Je,je))}function Ae(dt,Ge,Je,je,$e,wt){let Ie=$e-Je,xe=wt-je;if(Ie!==0||xe!==0){let Ce=((dt-Je)*Ie+(Ge-je)*xe)/(Ie*Ie+xe*xe);Ce>1?(Je=$e,je=wt):Ce>0&&(Je+=Ie*Ce,je+=xe*Ce)}return Ie=dt-Je,xe=Ge-je,Ie*Ie+xe*xe}function De(dt,Ge,Je,je){let $e={id:dt==null?null:dt,type:Ge,geometry:Je,tags:je,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge===\"Point\"||Ge===\"MultiPoint\"||Ge===\"LineString\")Pe($e,Je);else if(Ge===\"Polygon\")Pe($e,Je[0]);else if(Ge===\"MultiLineString\")for(let wt of Je)Pe($e,wt);else if(Ge===\"MultiPolygon\")for(let wt of Je)Pe($e,wt[0]);return $e}function Pe(dt,Ge){for(let Je=0;Je<Ge.length;Je+=3)dt.minX=Math.min(dt.minX,Ge[Je]),dt.minY=Math.min(dt.minY,Ge[Je+1]),dt.maxX=Math.max(dt.maxX,Ge[Je]),dt.maxY=Math.max(dt.maxY,Ge[Je+1])}function ge(dt,Ge,Je,je){if(!Ge.geometry)return;let $e=Ge.geometry.coordinates;if($e&&$e.length===0)return;let wt=Ge.geometry.type,Ie=Math.pow(Je.tolerance/((1<<Je.maxZoom)*Je.extent),2),xe=[],Ce=Ge.id;if(Je.promoteId?Ce=Ge.properties[Je.promoteId]:Je.generateId&&(Ce=je||0),wt===\"Point\")Fe($e,xe);else if(wt===\"MultiPoint\")for(let vt of $e)Fe(vt,xe);else if(wt===\"LineString\")ce($e,xe,Ie,!1);else if(wt===\"MultiLineString\"){if(Je.lineMetrics){for(let vt of $e)xe=[],ce(vt,xe,Ie,!1),dt.push(De(Ce,\"LineString\",xe,Ge.properties));return}Ze($e,xe,Ie,!1)}else if(wt===\"Polygon\")Ze($e,xe,Ie,!0);else{if(wt!==\"MultiPolygon\"){if(wt===\"GeometryCollection\"){for(let vt of Ge.geometry.geometries)ge(dt,{id:Ce,geometry:vt,properties:Ge.properties},Je,je);return}throw new Error(\"Input data is not a valid GeoJSON object.\")}for(let vt of $e){let nr=[];Ze(vt,nr,Ie,!0),xe.push(nr)}}dt.push(De(Ce,wt,xe,Ge.properties))}function Fe(dt,Ge){Ge.push(ct(dt[0]),pt(dt[1]),0)}function ce(dt,Ge,Je,je){let $e,wt,Ie=0;for(let Ce=0;Ce<dt.length;Ce++){let vt=ct(dt[Ce][0]),nr=pt(dt[Ce][1]);Ge.push(vt,nr,0),Ce>0&&(Ie+=je?($e*nr-vt*wt)/2:Math.sqrt(Math.pow(vt-$e,2)+Math.pow(nr-wt,2))),$e=vt,wt=nr}let xe=Ge.length-3;Ge[2]=1,Le(Ge,0,xe,Je),Ge[xe+2]=1,Ge.size=Math.abs(Ie),Ge.start=0,Ge.end=Ge.size}function Ze(dt,Ge,Je,je){for(let $e=0;$e<dt.length;$e++){let wt=[];ce(dt[$e],wt,Je,je),Ge.push(wt)}}function ct(dt){return dt/360+.5}function pt(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Wt(dt,Ge,Je,je,$e,wt,Ie,xe){if(je/=Ge,wt>=(Je/=Ge)&&Ie<je)return dt;if(Ie<Je||wt>=je)return null;let Ce=[];for(let vt of dt){let nr=vt.geometry,ir=vt.type,pr=$e===0?vt.minX:vt.minY,oi=$e===0?vt.maxX:vt.maxY;if(pr>=Je&&oi<je){Ce.push(vt);continue}if(oi<Je||pr>=je)continue;let di=[];if(ir===\"Point\"||ir===\"MultiPoint\")st(nr,di,Je,je,$e);else if(ir===\"LineString\")lt(nr,di,Je,je,$e,!1,xe.lineMetrics);else if(ir===\"MultiLineString\")Nt(nr,di,Je,je,$e,!1);else if(ir===\"Polygon\")Nt(nr,di,Je,je,$e,!0);else if(ir===\"MultiPolygon\")for(let Jr of nr){let fi=[];Nt(Jr,fi,Je,je,$e,!0),fi.length&&di.push(fi)}if(di.length){if(xe.lineMetrics&&ir===\"LineString\"){for(let Jr of di)Ce.push(De(vt.id,ir,Jr,vt.tags));continue}ir!==\"LineString\"&&ir!==\"MultiLineString\"||(di.length===1?(ir=\"LineString\",di=di[0]):ir=\"MultiLineString\"),ir!==\"Point\"&&ir!==\"MultiPoint\"||(ir=di.length===3?\"Point\":\"MultiPoint\"),Ce.push(De(vt.id,ir,di,vt.tags))}}return Ce.length?Ce:null}function st(dt,Ge,Je,je,$e){for(let wt=0;wt<dt.length;wt+=3){let Ie=dt[wt+$e];Ie>=Je&&Ie<=je&&$t(Ge,dt[wt],dt[wt+1],dt[wt+2])}}function lt(dt,Ge,Je,je,$e,wt,Ie){let xe=Gt(dt),Ce=$e===0?sr:wr,vt,nr,ir=dt.start;for(let fi=0;fi<dt.length-3;fi+=3){let Hi=dt[fi],Pn=dt[fi+1],wn=dt[fi+2],pn=dt[fi+3],Vn=dt[fi+4],kn=$e===0?Hi:Pn,ea=$e===0?pn:Vn,ua=!1;Ie&&(vt=Math.sqrt(Math.pow(Hi-pn,2)+Math.pow(Pn-Vn,2))),kn<Je?ea>Je&&(nr=Ce(xe,Hi,Pn,pn,Vn,Je),Ie&&(xe.start=ir+vt*nr)):kn>je?ea<je&&(nr=Ce(xe,Hi,Pn,pn,Vn,je),Ie&&(xe.start=ir+vt*nr)):$t(xe,Hi,Pn,wn),ea<Je&&kn>=Je&&(nr=Ce(xe,Hi,Pn,pn,Vn,Je),ua=!0),ea>je&&kn<=je&&(nr=Ce(xe,Hi,Pn,pn,Vn,je),ua=!0),!wt&&ua&&(Ie&&(xe.end=ir+vt*nr),Ge.push(xe),xe=Gt(dt)),Ie&&(ir+=vt)}let pr=dt.length-3,oi=dt[pr],di=dt[pr+1],Jr=$e===0?oi:di;Jr>=Je&&Jr<=je&&$t(xe,oi,di,dt[pr+2]),pr=xe.length-3,wt&&pr>=3&&(xe[pr]!==xe[0]||xe[pr+1]!==xe[1])&&$t(xe,xe[0],xe[1],xe[2]),xe.length&&Ge.push(xe)}function Gt(dt){let Ge=[];return Ge.size=dt.size,Ge.start=dt.start,Ge.end=dt.end,Ge}function Nt(dt,Ge,Je,je,$e,wt){for(let Ie of dt)lt(Ie,Ge,Je,je,$e,wt,!1)}function $t(dt,Ge,Je,je){dt.push(Ge,Je,je)}function sr(dt,Ge,Je,je,$e,wt){let Ie=(wt-Ge)/(je-Ge);return $t(dt,wt,Je+($e-Je)*Ie,1),Ie}function wr(dt,Ge,Je,je,$e,wt){let Ie=(wt-Je)/($e-Je);return $t(dt,Ge+(je-Ge)*Ie,wt,1),Ie}function ur(dt,Ge){let Je=[];for(let je=0;je<dt.length;je++){let $e=dt[je],wt=$e.type,Ie;if(wt===\"Point\"||wt===\"MultiPoint\"||wt===\"LineString\")Ie=Qe($e.geometry,Ge);else if(wt===\"MultiLineString\"||wt===\"Polygon\"){Ie=[];for(let xe of $e.geometry)Ie.push(Qe(xe,Ge))}else if(wt===\"MultiPolygon\"){Ie=[];for(let xe of $e.geometry){let Ce=[];for(let vt of xe)Ce.push(Qe(vt,Ge));Ie.push(Ce)}}Je.push(De($e.id,wt,Ie,$e.tags))}return Je}function Qe(dt,Ge){let Je=[];Je.size=dt.size,dt.start!==void 0&&(Je.start=dt.start,Je.end=dt.end);for(let je=0;je<dt.length;je+=3)Je.push(dt[je]+Ge,dt[je+1],dt[je+2]);return Je}function Et(dt,Ge){if(dt.transformed)return dt;let Je=1<<dt.z,je=dt.x,$e=dt.y;for(let wt of dt.features){let Ie=wt.geometry,xe=wt.type;if(wt.geometry=[],xe===1)for(let Ce=0;Ce<Ie.length;Ce+=2)wt.geometry.push(er(Ie[Ce],Ie[Ce+1],Ge,Je,je,$e));else for(let Ce=0;Ce<Ie.length;Ce++){let vt=[];for(let nr=0;nr<Ie[Ce].length;nr+=2)vt.push(er(Ie[Ce][nr],Ie[Ce][nr+1],Ge,Je,je,$e));wt.geometry.push(vt)}}return dt.transformed=!0,dt}function er(dt,Ge,Je,je,$e,wt){return[Math.round(Je*(dt*je-$e)),Math.round(Je*(Ge*je-wt))]}function Ut(dt,Ge,Je,je,$e){let wt=Ge===$e.maxZoom?0:$e.tolerance/((1<<Ge)*$e.extent),Ie={features:[],numPoints:0,numSimplified:0,numFeatures:dt.length,source:null,x:Je,y:je,z:Ge,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let xe of dt)Ft(Ie,xe,wt,$e);return Ie}function Ft(dt,Ge,Je,je){let $e=Ge.geometry,wt=Ge.type,Ie=[];if(dt.minX=Math.min(dt.minX,Ge.minX),dt.minY=Math.min(dt.minY,Ge.minY),dt.maxX=Math.max(dt.maxX,Ge.maxX),dt.maxY=Math.max(dt.maxY,Ge.maxY),wt===\"Point\"||wt===\"MultiPoint\")for(let xe=0;xe<$e.length;xe+=3)Ie.push($e[xe],$e[xe+1]),dt.numPoints++,dt.numSimplified++;else if(wt===\"LineString\")bt(Ie,$e,dt,Je,!1,!1);else if(wt===\"MultiLineString\"||wt===\"Polygon\")for(let xe=0;xe<$e.length;xe++)bt(Ie,$e[xe],dt,Je,wt===\"Polygon\",xe===0);else if(wt===\"MultiPolygon\")for(let xe=0;xe<$e.length;xe++){let Ce=$e[xe];for(let vt=0;vt<Ce.length;vt++)bt(Ie,Ce[vt],dt,Je,!0,vt===0)}if(Ie.length){let xe=Ge.tags||null;if(wt===\"LineString\"&&je.lineMetrics){xe={};for(let vt in Ge.tags)xe[vt]=Ge.tags[vt];xe.mapbox_clip_start=$e.start/$e.size,xe.mapbox_clip_end=$e.end/$e.size}let Ce={geometry:Ie,type:wt===\"Polygon\"||wt===\"MultiPolygon\"?3:wt===\"LineString\"||wt===\"MultiLineString\"?2:1,tags:xe};Ge.id!==null&&(Ce.id=Ge.id),dt.features.push(Ce)}}function bt(dt,Ge,Je,je,$e,wt){let Ie=je*je;if(je>0&&Ge.size<($e?Ie:je))return void(Je.numPoints+=Ge.length/3);let xe=[];for(let Ce=0;Ce<Ge.length;Ce+=3)(je===0||Ge[Ce+2]>Ie)&&(Je.numSimplified++,xe.push(Ge[Ce],Ge[Ce+1])),Je.numPoints++;$e&&function(Ce,vt){let nr=0;for(let ir=0,pr=Ce.length,oi=pr-2;ir<pr;oi=ir,ir+=2)nr+=(Ce[ir]-Ce[oi])*(Ce[ir+1]+Ce[oi+1]);if(nr>0===vt)for(let ir=0,pr=Ce.length;ir<pr/2;ir+=2){let oi=Ce[ir],di=Ce[ir+1];Ce[ir]=Ce[pr-2-ir],Ce[ir+1]=Ce[pr-1-ir],Ce[pr-2-ir]=oi,Ce[pr-1-ir]=di}}(xe,wt),dt.push(xe)}let yt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Yt{constructor(Ge,Je){let je=(Je=this.options=function(wt,Ie){for(let xe in Ie)wt[xe]=Ie[xe];return wt}(Object.create(yt),Je)).debug;if(je&&console.time(\"preprocess data\"),Je.maxZoom<0||Je.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");if(Je.promoteId&&Je.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");let $e=function(wt,Ie){let xe=[];if(wt.type===\"FeatureCollection\")for(let Ce=0;Ce<wt.features.length;Ce++)ge(xe,wt.features[Ce],Ie,Ce);else ge(xe,wt.type===\"Feature\"?wt:{geometry:wt},Ie);return xe}(Ge,Je);this.tiles={},this.tileCoords=[],je&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",Je.indexMaxZoom,Je.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),$e=function(wt,Ie){let xe=Ie.buffer/Ie.extent,Ce=wt,vt=Wt(wt,1,-1-xe,xe,0,-1,2,Ie),nr=Wt(wt,1,1-xe,2+xe,0,-1,2,Ie);return(vt||nr)&&(Ce=Wt(wt,1,-xe,1+xe,0,-1,2,Ie)||[],vt&&(Ce=ur(vt,1).concat(Ce)),nr&&(Ce=Ce.concat(ur(nr,-1)))),Ce}($e,Je),$e.length&&this.splitTile($e,0,0,0),je&&($e.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}splitTile(Ge,Je,je,$e,wt,Ie,xe){let Ce=[Ge,Je,je,$e],vt=this.options,nr=vt.debug;for(;Ce.length;){$e=Ce.pop(),je=Ce.pop(),Je=Ce.pop(),Ge=Ce.pop();let ir=1<<Je,pr=lr(Je,je,$e),oi=this.tiles[pr];if(!oi&&(nr>1&&console.time(\"creation\"),oi=this.tiles[pr]=Ut(Ge,Je,je,$e,vt),this.tileCoords.push({z:Je,x:je,y:$e}),nr)){nr>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",Je,je,$e,oi.numFeatures,oi.numPoints,oi.numSimplified),console.timeEnd(\"creation\"));let ua=`z${Je}`;this.stats[ua]=(this.stats[ua]||0)+1,this.total++}if(oi.source=Ge,wt==null){if(Je===vt.indexMaxZoom||oi.numPoints<=vt.indexMaxPoints)continue}else{if(Je===vt.maxZoom||Je===wt)continue;if(wt!=null){let ua=wt-Je;if(je!==Ie>>ua||$e!==xe>>ua)continue}}if(oi.source=null,Ge.length===0)continue;nr>1&&console.time(\"clipping\");let di=.5*vt.buffer/vt.extent,Jr=.5-di,fi=.5+di,Hi=1+di,Pn=null,wn=null,pn=null,Vn=null,kn=Wt(Ge,ir,je-di,je+fi,0,oi.minX,oi.maxX,vt),ea=Wt(Ge,ir,je+Jr,je+Hi,0,oi.minX,oi.maxX,vt);Ge=null,kn&&(Pn=Wt(kn,ir,$e-di,$e+fi,1,oi.minY,oi.maxY,vt),wn=Wt(kn,ir,$e+Jr,$e+Hi,1,oi.minY,oi.maxY,vt),kn=null),ea&&(pn=Wt(ea,ir,$e-di,$e+fi,1,oi.minY,oi.maxY,vt),Vn=Wt(ea,ir,$e+Jr,$e+Hi,1,oi.minY,oi.maxY,vt),ea=null),nr>1&&console.timeEnd(\"clipping\"),Ce.push(Pn||[],Je+1,2*je,2*$e),Ce.push(wn||[],Je+1,2*je,2*$e+1),Ce.push(pn||[],Je+1,2*je+1,2*$e),Ce.push(Vn||[],Je+1,2*je+1,2*$e+1)}}getTile(Ge,Je,je){Ge=+Ge,Je=+Je,je=+je;let $e=this.options,{extent:wt,debug:Ie}=$e;if(Ge<0||Ge>24)return null;let xe=1<<Ge,Ce=lr(Ge,Je=Je+xe&xe-1,je);if(this.tiles[Ce])return Et(this.tiles[Ce],wt);Ie>1&&console.log(\"drilling down to z%d-%d-%d\",Ge,Je,je);let vt,nr=Ge,ir=Je,pr=je;for(;!vt&&nr>0;)nr--,ir>>=1,pr>>=1,vt=this.tiles[lr(nr,ir,pr)];return vt&&vt.source?(Ie>1&&(console.log(\"found parent tile z%d-%d-%d\",nr,ir,pr),console.time(\"drilling down\")),this.splitTile(vt.source,nr,ir,pr,Ge,Je,je),Ie>1&&console.timeEnd(\"drilling down\"),this.tiles[Ce]?Et(this.tiles[Ce],wt):null):null}}function lr(dt,Ge,Je){return 32*((1<<dt)*Je+Ge)+dt}function Tr(dt,Ge){return Ge?dt.properties[Ge]:dt.id}function Rr(dt,Ge){if(dt==null)return!0;if(dt.type===\"Feature\")return Tr(dt,Ge)!=null;if(dt.type===\"FeatureCollection\"){let Je=new Set;for(let je of dt.features){let $e=Tr(je,Ge);if($e==null||Je.has($e))return!1;Je.add($e)}return!0}return!1}function ei(dt,Ge){let Je=new Map;if(dt!=null)if(dt.type===\"Feature\")Je.set(Tr(dt,Ge),dt);else for(let je of dt.features)Je.set(Tr(je,Ge),je);return Je}class Wr extends u{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let je=Ge.tileID.canonical;if(!this._geoJSONIndex)throw new Error(\"Unable to parse the data into a cluster or geojson\");let $e=this._geoJSONIndex.getTile(je.z,je.x,je.y);if(!$e)return null;let wt=new class{constructor(xe){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=i.X,this.length=xe.length,this._features=xe}feature(xe){return new class{constructor(Ce){this._feature=Ce,this.extent=i.X,this.type=Ce.type,this.properties=Ce.tags,\"id\"in Ce&&!isNaN(Ce.id)&&(this.id=parseInt(Ce.id,10))}loadGeometry(){if(this._feature.type===1){let Ce=[];for(let vt of this._feature.geometry)Ce.push([new i.P(vt[0],vt[1])]);return Ce}{let Ce=[];for(let vt of this._feature.geometry){let nr=[];for(let ir of vt)nr.push(new i.P(ir[0],ir[1]));Ce.push(nr)}return Ce}}toGeoJSON(Ce,vt,nr){return v.call(this,Ce,vt,nr)}}(this._features[xe])}}($e.features),Ie=G(wt);return Ie.byteOffset===0&&Ie.byteLength===Ie.buffer.byteLength||(Ie=new Uint8Array(Ie)),{vectorTile:wt,rawData:Ie.buffer}})}loadData(Ge){return i._(this,void 0,void 0,function*(){var Je;(Je=this._pendingRequest)===null||Je===void 0||Je.abort();let je=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Ge,this._pendingRequest),this._geoJSONIndex=Ge.cluster?new _e(function({superclusterOptions:Ie,clusterProperties:xe}){if(!xe||!Ie)return Ie;let Ce={},vt={},nr={accumulated:null,zoom:0},ir={properties:null},pr=Object.keys(xe);for(let oi of pr){let[di,Jr]=xe[oi],fi=i.bC(Jr),Hi=i.bC(typeof di==\"string\"?[di,[\"accumulated\"],[\"get\",oi]]:di);Ce[oi]=fi.value,vt[oi]=Hi.value}return Ie.map=oi=>{ir.properties=oi;let di={};for(let Jr of pr)di[Jr]=Ce[Jr].evaluate(nr,ir);return di},Ie.reduce=(oi,di)=>{ir.properties=di;for(let Jr of pr)nr.accumulated=oi[Jr],oi[Jr]=vt[Jr].evaluate(nr,ir)},Ie}(Ge)).load((yield this._pendingData).features):($e=yield this._pendingData,new Yt($e,Ge.geojsonVtOptions)),this.loaded={};let wt={};if(je){let Ie=je.finish();Ie&&(wt.resourceTiming={},wt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(Ie)))}return wt}catch(wt){if(delete this._pendingRequest,i.bB(wt))return{abandoned:!0};throw wt}var $e})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let je=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof je!=\"object\")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(je,!0),Ge.filter){let $e=i.bC(Ge.filter,{type:\"boolean\",\"property-type\":\"data-driven\",overridable:!1,transition:!1});if($e.result===\"error\")throw new Error($e.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(\", \"));je={type:\"FeatureCollection\",features:je.features.filter(Ie=>$e.value.evaluate({zoom:0},Ie))}}return je})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:je}=Ge;if(Ge.request){let $e=yield i.h(Ge.request,Je);return this._dataUpdateable=Rr($e.data,je)?ei($e.data,je):void 0,$e.data}if(typeof Ge.data==\"string\")try{let $e=JSON.parse(Ge.data);return this._dataUpdateable=Rr($e,je)?ei($e,je):void 0,$e}catch($e){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function($e,wt,Ie){var xe,Ce,vt,nr;if(wt.removeAll&&$e.clear(),wt.remove)for(let ir of wt.remove)$e.delete(ir);if(wt.add)for(let ir of wt.add){let pr=Tr(ir,Ie);pr!=null&&$e.set(pr,ir)}if(wt.update)for(let ir of wt.update){let pr=$e.get(ir.id);if(pr==null)continue;let oi=!ir.removeAllProperties&&(((xe=ir.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((Ce=ir.addOrUpdateProperties)===null||Ce===void 0?void 0:Ce.length)>0);if((ir.newGeometry||ir.removeAllProperties||oi)&&(pr=Object.assign({},pr),$e.set(ir.id,pr),oi&&(pr.properties=Object.assign({},pr.properties))),ir.newGeometry&&(pr.geometry=ir.newGeometry),ir.removeAllProperties)pr.properties={};else if(((vt=ir.removeProperties)===null||vt===void 0?void 0:vt.length)>0)for(let di of ir.removeProperties)Object.prototype.hasOwnProperty.call(pr.properties,di)&&delete pr.properties[di];if(((nr=ir.addOrUpdateProperties)===null||nr===void 0?void 0:nr.length)>0)for(let{key:di,value:Jr}of ir.addOrUpdateProperties)pr.properties[di]=Jr}}(this._dataUpdateable,Ge.dataDiff,je),{type:\"FeatureCollection\",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class Ur{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,je)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name \"${Je}\" already registered.`);this.externalWorkerSourceTypes[Je]=je},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error(\"RTL text plugin already registered.\");i.bD.setMethods(Je)},this.actor.registerMessageHandler(\"LDT\",(Je,je)=>this._getDEMWorkerSource(Je,je.source).loadTile(je)),this.actor.registerMessageHandler(\"RDT\",(Je,je)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,je.source).removeTile(je)})),this.actor.registerMessageHandler(\"GCEZ\",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterExpansionZoom(je)})),this.actor.registerMessageHandler(\"GCC\",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterChildren(je)})),this.actor.registerMessageHandler(\"GCL\",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterLeaves(je)})),this.actor.registerMessageHandler(\"LD\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).loadData(je)),this.actor.registerMessageHandler(\"GD\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).getData()),this.actor.registerMessageHandler(\"LT\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).loadTile(je)),this.actor.registerMessageHandler(\"RT\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).reloadTile(je)),this.actor.registerMessageHandler(\"AT\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).abortTile(je)),this.actor.registerMessageHandler(\"RMT\",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).removeTile(je)),this.actor.registerMessageHandler(\"RS\",(Je,je)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][je.type]||!this.workerSources[Je][je.type][je.source])return;let $e=this.workerSources[Je][je.type][je.source];delete this.workerSources[Je][je.type][je.source],$e.removeSource!==void 0&&$e.removeSource(je)})),this.actor.registerMessageHandler(\"RM\",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler(\"SR\",(Je,je)=>i._(this,void 0,void 0,function*(){this.referrer=je})),this.actor.registerMessageHandler(\"SRPS\",(Je,je)=>this._syncRTLPluginState(Je,je)),this.actor.registerMessageHandler(\"IS\",(Je,je)=>i._(this,void 0,void 0,function*(){this.self.importScripts(je)})),this.actor.registerMessageHandler(\"SI\",(Je,je)=>this._setImages(Je,je)),this.actor.registerMessageHandler(\"UL\",(Je,je)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(je.layers,je.removedIds)})),this.actor.registerMessageHandler(\"SL\",(Je,je)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(je)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let je in this.workerSources[Ge]){let $e=this.workerSources[Ge][je];for(let wt in $e)$e[wt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!==\"loading\")return i.bD.setState(Je),Je;let je=Je.pluginURL;if(this.self.importScripts(je),i.bD.isParsed()){let $e={pluginStatus:\"loaded\",pluginURL:je};return i.bD.setState($e),$e}throw i.bD.setState({pluginStatus:\"error\",pluginURL:\"\"}),new Error(`RTL Text Plugin failed to import scripts from ${je}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,je){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][je]){let $e={sendAsync:(wt,Ie)=>(wt.targetMapId=Ge,this.actor.sendAsync(wt,Ie))};switch(Je){case\"vector\":this.workerSources[Ge][Je][je]=new u($e,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case\"geojson\":this.workerSources[Ge][Je][je]=new Wr($e,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][je]=new this.externalWorkerSourceTypes[Je]($e,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][je]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new Ur(self)),Ur}),r(\"index\",[\"exports\",\"./shared\"],function(i,a){\"use strict\";var o=\"4.7.1\";let s,l,u={now:typeof performance!=\"undefined\"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener(\"abort\",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement(\"canvas\"),B=w.getContext(\"2d\",{willReadFrequently:!0});if(!B)throw new Error(\"failed to create canvas 2d context\");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement(\"a\")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!=\"undefined\"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia(\"(prefers-reduced-motion: reduce)\")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B<w.length;B++)if(w[B]in c.docStyle)return w[B];return w[0]}static create(w,B,Q){let ee=window.document.createElement(w);return B!==void 0&&(ee.className=B),Q&&Q.appendChild(ee),ee}static createNS(w,B){return window.document.createElementNS(w,B)}static disableDrag(){c.docStyle&&c.selectProp&&(c.userSelect=c.docStyle[c.selectProp],c.docStyle[c.selectProp]=\"none\")}static enableDrag(){c.docStyle&&c.selectProp&&(c.docStyle[c.selectProp]=c.userSelect)}static setTransform(w,B){w.style[c.transformProp]=B}static addEventListener(w,B,Q,ee={}){w.addEventListener(B,Q,\"passive\"in ee?ee:ee.capture)}static removeEventListener(w,B,Q,ee={}){w.removeEventListener(B,Q,\"passive\"in ee?ee:ee.capture)}static suppressClickInternal(w){w.preventDefault(),w.stopPropagation(),window.removeEventListener(\"click\",c.suppressClickInternal,!0)}static suppressClick(){window.addEventListener(\"click\",c.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener(\"click\",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le<B.length;le++)Q.push(c.getPoint(w,ee,B[le]));return Q}static mouseButton(w){return w.button}static remove(w){w.parentNode&&w.parentNode.removeChild(w)}}c.docStyle=typeof window!=\"undefined\"&&window.document&&window.document.documentElement.style,c.selectProp=c.testProp([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]),c.transformProp=c.testProp([\"transform\",\"WebkitTransform\"]);let f={supported:!1,testSupport:function(ue){!v&&d&&(x?b(ue):h=ue)}},h,d,v=!1,x=!1;function b(ue){let w=ue.createTexture();ue.bindTexture(ue.TEXTURE_2D,w);try{if(ue.texImage2D(ue.TEXTURE_2D,0,ue.RGBA,ue.RGBA,ue.UNSIGNED_BYTE,d),ue.isContextLost())return;f.supported=!0}catch(B){}ue.deleteTexture(w),v=!0}var p;typeof document!=\"undefined\"&&(d=document.createElement(\"img\"),d.onload=()=>{h&&b(h),h=null,x=!0},d.onerror=()=>{v=!0,h=null},d.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\"),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=ot=>{let Tt=Q++;return ee[Tt]=ot,Tt},ue.removeThrottleControl=ot=>{delete ee[ot],qe()},ue.getImage=(ot,Tt,Kt=!0)=>new Promise((Jt,xr)=>{f.supported&&(ot.headers||(ot.headers={}),ot.headers.accept=\"image/webp,*/*\"),a.e(ot,{type:\"image\"}),w.push({abortController:Tt,requestParameters:ot,supportImageRefresh:Kt,state:\"queued\",onError:Pr=>{xr(Pr)},onSuccess:Pr=>{Jt(Pr)}}),qe()});let le=ot=>a._(this,void 0,void 0,function*(){ot.state=\"running\";let{requestParameters:Tt,supportImageRefresh:Kt,onError:Jt,onSuccess:xr,abortController:Pr}=ot,ve=Kt===!1&&!a.i(self)&&!a.g(Tt.url)&&(!Tt.headers||Object.keys(Tt.headers).reduce((Be,tt)=>Be&&tt===\"accept\",!0));B++;let be=ve?Xe(Tt,Pr):a.m(Tt,Pr);try{let Be=yield be;delete ot.abortController,ot.state=\"completed\",Be.data instanceof HTMLImageElement||a.b(Be.data)?xr(Be):Be.data&&xr({data:yield(Re=Be.data,typeof createImageBitmap==\"function\"?a.d(Re):a.f(Re)),cacheControl:Be.cacheControl,expires:Be.expires})}catch(Be){delete ot.abortController,Jt(Be)}finally{B--,qe()}var Re}),qe=()=>{let ot=(()=>{for(let Tt of Object.keys(ee))if(ee[Tt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tt=B;Tt<ot&&w.length>0;Tt++){let Kt=w.shift();Kt.abortController.signal.aborted?Tt--:le(Kt)}},Xe=(ot,Tt)=>new Promise((Kt,Jt)=>{let xr=new Image,Pr=ot.url,ve=ot.credentials;ve&&ve===\"include\"?xr.crossOrigin=\"use-credentials\":(ve&&ve===\"same-origin\"||!a.s(Pr))&&(xr.crossOrigin=\"anonymous\"),Tt.signal.addEventListener(\"abort\",()=>{xr.src=\"\",Jt(a.c())}),xr.fetchPriority=\"high\",xr.onload=()=>{xr.onerror=xr.onload=null,Kt({data:xr})},xr.onerror=()=>{xr.onerror=xr.onload=null,Tt.signal.aborted||Jt(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))},xr.src=Pr})}(p||(p={})),p.resetRequestQueue();class C{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function E(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var A,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};A=new a.A(3),a.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var _=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function k(ue){let w=[];if(typeof ue==\"string\")w.push({id:\"default\",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(ue,w,B){let Q=ue.split(\"?\");return Q[0]+=`${w}${B}`,Q.join(\"?\")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,qe=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Xe}=this,{gl:ot}=Xe;if(this.useMipmap=!!(B&&B.useMipmap),ot.bindTexture(ot.TEXTURE_2D,this.texture),Xe.pixelStoreUnpackFlipY.set(!1),Xe.pixelStoreUnpack.set(1),Xe.pixelStoreUnpackPremultiplyAlpha.set(this.format===ot.RGBA&&(!B||B.premultiply!==!1)),qe)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ot.texImage2D(ot.TEXTURE_2D,0,this.format,this.format,ot.UNSIGNED_BYTE,w):ot.texImage2D(ot.TEXTURE_2D,0,this.format,ee,le,0,this.format,ot.UNSIGNED_BYTE,w.data);else{let{x:Tt,y:Kt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ot.texSubImage2D(ot.TEXTURE_2D,0,Tt,Kt,ot.RGBA,ot.UNSIGNED_BYTE,w):ot.texSubImage2D(ot.TEXTURE_2D,0,Tt,Kt,ee,le,ot.RGBA,ot.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ot.generateMipmap(ot.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class T extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"stretchX\" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"stretchY\" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"content\" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]<Q||ee[1]<ee[0]||B<ee[1])return!1;Q=ee[1]}return!0}_validateContent(w,B){if(!w)return!0;if(w.length!==4)return!1;let Q=B.spriteData,ee=Q&&Q.width||B.data.width,le=Q&&Q.height||B.data.height;return!(w[0]<0||ee<w[0]||w[1]<0||le<w[1]||w[2]<0||ee<w[2]||w[3]<0||le<w[3]||w[2]<w[0]||w[3]<w[1])}updateImage(w,B,Q=!0){let ee=this.getImage(w);if(Q&&(ee.data.width!==B.data.width||ee.data.height!==B.data.height))throw new Error(`size mismatch between old image (${ee.data.width}x${ee.data.height}) and new image (${B.data.width}x${B.data.height}).`);B.version=ee.version+1,this.images[w]=B,this.updatedImages[w]=!0}removeImage(w){let B=this.images[w];delete this.images[w],delete this.patterns[w],B.userImage&&B.userImage.onRemove&&B.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(w){return new Promise((B,Q)=>{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k(\"styleimagemissing\",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image \"${Q}\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:qe}=this.patterns[le],Xe=qe.x+1,ot=qe.y+1,Tt=this.getImage(le).data,Kt=Tt.width,Jt=Tt.height;a.R.copy(Tt,ee,{x:0,y:0},{x:Xe,y:ot},{width:Kt,height:Jt}),a.R.copy(Tt,ee,{x:0,y:Jt-1},{x:Xe,y:ot-1},{width:Kt,height:1}),a.R.copy(Tt,ee,{x:0,y:0},{x:Xe,y:ot+Jt},{width:Kt,height:1}),a.R.copy(Tt,ee,{x:Kt-1,y:0},{x:Xe-1,y:ot},{width:1,height:Jt}),a.R.copy(Tt,ee,{x:0,y:0},{x:Xe+Kt,y:ot},{width:1,height:Jt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: \"${B}\" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function O(ue,w,B,Q,ee,le,qe,Xe,ot){for(let Tt=w;Tt<w+Q;Tt++)V(ue,B*le+Tt,le,ee,qe,Xe,ot);for(let Tt=B;Tt<B+ee;Tt++)V(ue,Tt*le+w,1,Q,qe,Xe,ot)}function V(ue,w,B,Q,ee,le,qe){le[0]=0,qe[0]=-z,qe[1]=z,ee[0]=ue[w];for(let Xe=1,ot=0,Tt=0;Xe<Q;Xe++){ee[Xe]=ue[w+Xe*B];let Kt=Xe*Xe;do{let Jt=le[ot];Tt=(ee[Xe]-ee[Jt]+Kt-Jt*Jt)/(Xe-Jt)/2}while(Tt<=qe[ot]&&--ot>-1);ot++,le[ot]=Xe,qe[ot]=Tt,qe[ot+1]=z}for(let Xe=0,ot=0;Xe<Q;Xe++){for(;qe[ot+1]<Xe;)ot++;let Tt=le[ot],Kt=Xe-Tt;ue[w+Xe*B]=ee[Tt]+Kt*Kt}}class G{constructor(w,B){this.requestManager=w,this.localIdeographFontFamily=B,this.entries={}}setURL(w){this.url=w}getGlyphs(w){return a._(this,void 0,void 0,function*(){let B=[];for(let le in w)for(let qe of w[le])B.push(this._getAndCacheGlyphsPromise(le,qe));let Q=yield Promise.all(B),ee={};for(let{stack:le,id:qe,glyph:Xe}of Q)ee[le]||(ee[le]={}),ee[le][qe]=Xe&&{id:Xe.id,bitmap:Xe.bitmap.clone(),metrics:Xe.metrics};return ee})}_getAndCacheGlyphsPromise(w,B){return a._(this,void 0,void 0,function*(){let Q=this.entries[w];Q||(Q=this.entries[w]={glyphs:{},requests:{},ranges:{}});let ee=Q.glyphs[B];if(ee!==void 0)return{stack:w,id:B,glyph:ee};if(ee=this._tinySDF(Q,w,B),ee)return Q.glyphs[B]=ee,{stack:w,id:B,glyph:ee};let le=Math.floor(B/256);if(256*le>65535)throw new Error(\"glyphs > 65535 not supported\");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error(\"glyphsUrl is not set\");if(!Q.requests[le]){let Xe=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Xe}let qe=yield Q.requests[le];for(let Xe in qe)this._doesCharSupportLocalGlyph(+Xe)||(Q.glyphs[+Xe]=qe[+Xe]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:qe[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp(\"\\\\p{Ideo}|\\\\p{sc=Hang}|\\\\p{sc=Hira}|\\\\p{sc=Kana}\",\"u\").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Xe=\"400\";/bold/i.test(B)?Xe=\"900\":/medium/i.test(B)?Xe=\"500\":/light/i.test(B)&&(Xe=\"200\"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Xe})}let qe=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:qe.width||60,height:qe.height||60},qe.data),metrics:{width:qe.glyphWidth/2||24,height:qe.glyphHeight/2||24,left:qe.glyphLeft/2+.5||0,top:qe.glyphTop/2-27.5||-8,advance:qe.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,qe=Q.transformRequest(B.replace(\"{fontstack}\",ue).replace(\"{range}\",`${ee}-${le}`),\"Glyphs\"),Xe=yield a.l(qe,new AbortController);if(!Xe||!Xe.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let ot={};for(let Tt of a.n(Xe.data))ot[Tt.id]=Tt;return ot})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee=\"sans-serif\",fontWeight:le=\"normal\",fontStyle:qe=\"normal\"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Xe=this.size=ue+4*w,ot=this._createCanvas(Xe),Tt=this.ctx=ot.getContext(\"2d\",{willReadFrequently:!0});Tt.font=`${qe} ${le} ${ue}px ${ee}`,Tt.textBaseline=\"alphabetic\",Tt.textAlign=\"left\",Tt.fillStyle=\"black\",this.gridOuter=new Float64Array(Xe*Xe),this.gridInner=new Float64Array(Xe*Xe),this.f=new Float64Array(Xe),this.z=new Float64Array(Xe+1),this.v=new Uint16Array(Xe)}_createCanvas(ue){let w=document.createElement(\"canvas\");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),qe=Math.ceil(B),Xe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),ot=Math.min(this.size-this.buffer,qe+Math.ceil(Q)),Tt=Xe+2*this.buffer,Kt=ot+2*this.buffer,Jt=Math.max(Tt*Kt,0),xr=new Uint8ClampedArray(Jt),Pr={data:xr,width:Tt,height:Kt,glyphWidth:Xe,glyphHeight:ot,glyphTop:qe,glyphLeft:0,glyphAdvance:w};if(Xe===0||ot===0)return Pr;let{ctx:ve,buffer:be,gridInner:Re,gridOuter:Be}=this;ve.clearRect(be,be,Xe,ot),ve.fillText(ue,be,be+qe);let tt=ve.getImageData(be,be,Xe,ot);Be.fill(z,0,Jt),Re.fill(0,0,Jt);for(let We=0;We<ot;We++)for(let it=0;it<Xe;it++){let Dt=tt.data[4*(We*Xe+it)+3]/255;if(Dt===0)continue;let Ht=(We+be)*Tt+it+be;if(Dt===1)Be[Ht]=0,Re[Ht]=z;else{let rr=.5-Dt;Be[Ht]=rr>0?rr*rr:0,Re[Ht]=rr<0?rr*rr:0}}O(Be,0,0,Tt,Kt,Tt,this.f,this.v,this.z),O(Re,be,be,Xe,ot,Tt,this.f,this.v,this.z);for(let We=0;We<Jt;We++){let it=Math.sqrt(Be[We])-Math.sqrt(Re[We]);xr[We]=Math.round(255-255*(it/this.radius+this.cutoff))}return Pr}};class Z{constructor(){this.specification=a.v.light.position}possiblyEvaluate(w,B){return a.x(w.expression.evaluate(B))}interpolate(w,B,Q){return{x:a.y.number(w.x,B.x,Q),y:a.y.number(w.y,B.y,Q),z:a.y.number(w.z,B.z,Q)}}}let H;class N extends a.E{constructor(w){super(),H=H||new a.q({anchor:new a.D(a.v.light.anchor),position:new Z,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(H),this.setLight(w),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(w,B={}){if(!this._validate(a.r,w,B))for(let Q in w){let ee=w[Q];Q.endsWith(\"-transition\")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q){return(!Q||Q.validate!==!1)&&a.t(this,w.call(a.u,{value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let j=new a.q({\"sky-color\":new a.D(a.v.sky[\"sky-color\"]),\"horizon-color\":new a.D(a.v.sky[\"horizon-color\"]),\"fog-color\":new a.D(a.v.sky[\"fog-color\"]),\"fog-ground-blend\":new a.D(a.v.sky[\"fog-ground-blend\"]),\"horizon-fog-blend\":new a.D(a.v.sky[\"horizon-fog-blend\"]),\"sky-horizon-blend\":new a.D(a.v.sky[\"sky-horizon-blend\"]),\"atmosphere-blend\":new a.D(a.v.sky[\"atmosphere-blend\"])});class re extends a.E{constructor(w){super(),this._transitionable=new a.T(j),this.setSky(w),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(w,B={}){if(!this._validate(a.B,w,B)){w||(w={\"sky-color\":\"transparent\",\"horizon-color\":\"transparent\",\"fog-color\":\"transparent\",\"fog-ground-blend\":1,\"atmosphere-blend\":0});for(let Q in w){let ee=w[Q];Q.endsWith(\"-transition\")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}}getSky(){return this._transitionable.serialize()}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q={}){return(Q==null?void 0:Q.validate)!==!1&&a.t(this,w.call(a.u,a.e({value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(w){return w<60?0:w<70?(w-60)/10:1}}class oe{constructor(w,B){this.width=w,this.height=B,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(w,B){let Q=w.join(\",\")+String(B);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(w,B)),this.dashEntry[Q]}getDashRanges(w,B,Q){let ee=[],le=w.length%2==1?-w[w.length-1]*Q:0,qe=w[0]*Q,Xe=!0;ee.push({left:le,right:qe,isDash:Xe,zeroLength:w[0]===0});let ot=w[0];for(let Tt=1;Tt<w.length;Tt++){Xe=!Xe;let Kt=w[Tt];le=ot*Q,ot+=Kt,qe=ot*Q,ee.push({left:le,right:qe,isDash:Xe,zeroLength:Kt===0})}return ee}addRoundDash(w,B,Q){let ee=B/2;for(let le=-Q;le<=Q;le++){let qe=this.width*(this.nextRow+Q+le),Xe=0,ot=w[Xe];for(let Tt=0;Tt<this.width;Tt++){Tt/ot.right>1&&(ot=w[++Xe]);let Kt=Math.abs(Tt-ot.left),Jt=Math.abs(Tt-ot.right),xr=Math.min(Kt,Jt),Pr,ve=le/Q*(ee+1);if(ot.isDash){let be=ee-Math.abs(ve);Pr=Math.sqrt(xr*xr+be*be)}else Pr=ee-Math.sqrt(xr*xr+ve*ve);this.data[qe+Tt]=Math.max(0,Math.min(255,Pr+128))}}}addRegularDash(w){for(let Xe=w.length-1;Xe>=0;--Xe){let ot=w[Xe],Tt=w[Xe+1];ot.zeroLength?w.splice(Xe,1):Tt&&Tt.isDash===ot.isDash&&(Tt.left=ot.left,w.splice(Xe,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,qe=w[le];for(let Xe=0;Xe<this.width;Xe++){Xe/qe.right>1&&(qe=w[++le]);let ot=Math.abs(Xe-qe.left),Tt=Math.abs(Xe-qe.right),Kt=Math.min(ot,Tt);this.data[ee+Xe]=Math.max(0,Math.min(255,(qe.isDash?Kt:-Kt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w(\"LineAtlas out of space\"),null;let le=0;for(let Xe=0;Xe<w.length;Xe++)le+=w[Xe];if(le!==0){let Xe=this.width/le,ot=this.getDashRanges(w,this.width,Xe);B?this.addRoundDash(ot,Xe,Q):this.addRegularDash(ot)}let qe={y:(this.nextRow+Q+.5)/this.height,height:2*Q/this.height,width:le};return this.nextRow+=ee,this.dirty=!0,qe}bind(w){let B=w.gl;this.texture?(B.bindTexture(B.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,B.texSubImage2D(B.TEXTURE_2D,0,0,0,this.width,this.height,B.ALPHA,B.UNSIGNED_BYTE,this.data))):(this.texture=B.createTexture(),B.bindTexture(B.TEXTURE_2D,this.texture),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.LINEAR),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.LINEAR),B.texImage2D(B.TEXTURE_2D,0,B.ALPHA,this.width,this.height,0,B.ALPHA,B.UNSIGNED_BYTE,this.data))}}let _e=\"maplibre_preloaded_worker_pool\";class Me{constructor(){this.active={}}acquire(w){if(!this.workers)for(this.workers=[];this.workers.length<Me.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[w]=!0,this.workers.slice()}release(w){delete this.active[w],this.numActive()===0&&(this.workers.forEach(B=>{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let ke=Math.floor(u.hardwareConcurrency/2),me,ie;function Se(){return me||(me=new Me),me}Me.workerCount=a.C(globalThis)?Math.max(Math.min(ke,3),1):1;class Le{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee<Q.length;ee++){let le=new a.F(Q[ee],B);le.name=`Worker ${ee}`,this.actors.push(le)}if(!this.actors.length)throw new Error(\"No actors found\")}broadcast(w,B){let Q=[];for(let ee of this.actors)Q.push(ee.sendAsync({type:w,data:B}));return Promise.all(Q)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(w=!0){this.actors.forEach(B=>{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Ae(){return ie||(ie=new Le(Se(),a.G),ie.registerMessageHandler(\"GR\",(ue,w,B)=>a.m(w,B))),ie}function De(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Pe(ue,w,B,Q,ee,le){let qe=function(Jt,xr,Pr){if(Jt)for(let ve of Jt){let be=xr[ve];if(be&&be.source===Pr&&be.type===\"fill-extrusion\")return!0}else for(let ve in xr){let be=xr[ve];if(be.source===Pr&&be.type===\"fill-extrusion\")return!0}return!1}(ee&&ee.layers,w,ue.id),Xe=le.maxPitchScaleFactor(),ot=ue.tilesIn(Q,Xe,qe);ot.sort(ge);let Tt=[];for(let Jt of ot)Tt.push({wrappedTileID:Jt.tileID.wrapped().key,queryResults:Jt.tile.queryRenderedFeatures(w,B,ue._state,Jt.queryGeometry,Jt.cameraQueryGeometry,Jt.scale,ee,le,Xe,De(ue.transform,Jt.tileID))});let Kt=function(Jt){let xr={},Pr={};for(let ve of Jt){let be=ve.queryResults,Re=ve.wrappedTileID,Be=Pr[Re]=Pr[Re]||{};for(let tt in be){let We=be[tt],it=Be[tt]=Be[tt]||{},Dt=xr[tt]=xr[tt]||[];for(let Ht of We)it[Ht.featureIndex]||(it[Ht.featureIndex]=!0,Dt.push(Ht))}}return xr}(Tt);for(let Jt in Kt)Kt[Jt].forEach(xr=>{let Pr=xr.feature,ve=ue.getFeatureState(Pr.layer[\"source-layer\"],Pr.id);Pr.source=Pr.layer.source,Pr.layer[\"source-layer\"]&&(Pr.sourceLayer=Pr.layer[\"source-layer\"]),Pr.state=ve});return Kt}function ge(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function Fe(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,\"Source\"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"bounds\",\"scheme\",\"tileSize\",\"encoding\"]);return\"vector_layers\"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&(\"lng\"in w||\"lon\"in w)&&\"lat\"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class Ze{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),qe=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x<le&&w.y>=ee&&w.y<qe}}class ct extends a.E{constructor(w,B,Q,ee){if(super(),this.id=w,this.dispatcher=Q,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.M(B,[\"url\",\"scheme\",\"tileSize\",\"promoteId\"])),this._options=a.e({type:\"vector\"},B),this._collectResourceTiming=B.collectResourceTiming,this.tileSize!==512)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(ee)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=new AbortController;try{let w=yield Fe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ze(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}onAdd(w){this.map=w,this.load()}setSourceProperty(w){this._tileJSONRequest&&this._tileJSONRequest.abort(),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,\"Tile\"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee=\"RT\";if(w.actor&&w.state!==\"expired\"){if(w.state===\"loading\")return new Promise((le,qe)=>{w.reloadPromise={resolve:le,reject:qe}})}else w.actor=this.dispatcher.getActor(),ee=\"LT\";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:\"AT\",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:\"RMT\",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class pt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=a.e({type:\"raster\"},B),a.e(this,a.M(B,[\"url\",\"scheme\",\"tileSize\"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=new AbortController;try{let w=yield Fe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ze(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,\"Tile\"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state=\"unloaded\");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,qe=Q.data;w.texture=this.map.painter.getTileTexture(qe.width),w.texture?w.texture.update(qe,{useMipmap:!0}):(w.texture=new g(ee,qe,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state=\"loaded\"}}catch(Q){if(delete w.abortController,w.aborted)w.state=\"unloaded\";else if(Q)throw w.state=\"errored\",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Wt extends pt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type=\"raster-dem\",this.maxzoom=22,this._options=a.e({type:\"raster-dem\"},B),this.encoding=B.encoding||\"mapbox\",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,\"Tile\");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state=\"unloaded\");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let qe=a.b(le)&&a.U()?le:yield this.readImageNow(le),Xe={type:this.type,uid:w.uid,source:this.id,rawImageData:qe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state===\"expired\"){w.actor=this.dispatcher.getActor();let ot=yield w.actor.sendAsync({type:\"LDT\",data:Xe});w.dem=ot,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state=\"loaded\"}}}catch(ee){if(delete w.abortController,w.aborted)w.state=\"unloaded\";else if(ee)throw w.state=\"errored\",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!=\"undefined\"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,qe=(B.x+1+Q)%Q,Xe=B.x+1===Q?w.wrap+1:w.wrap,ot={};return ot[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},ot[new a.S(w.overscaledZ,Xe,B.z,qe,B.y).key]={backfilled:!1},B.y>0&&(ot[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,Xe,B.z,qe,B.y-1).key]={backfilled:!1}),B.y+1<Q&&(ot[new a.S(w.overscaledZ,le,B.z,ee,B.y+1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y+1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,Xe,B.z,qe,B.y+1).key]={backfilled:!1}),ot}unloadTile(w){return a._(this,void 0,void 0,function*(){w.demTexture&&this.map.painter.saveTileTexture(w.demTexture),w.fbo&&(w.fbo.destroy(),delete w.fbo),w.dem&&delete w.dem,delete w.neighboringTiles,w.state=\"unloaded\",w.actor&&(yield w.actor.sendAsync({type:\"RDT\",data:{type:this.type,uid:w.uid,source:this.id}}))})}}class st extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Q.getActor(),this.setEventedParent(ee),this._data=B.data,this._options=a.e({},B),this._collectResourceTiming=B.collectResourceTiming,B.maxzoom!==void 0&&(this.maxzoom=B.maxzoom),B.type&&(this.type=B.type),B.attribution&&(this.attribution=B.attribution),this.promoteId=B.promoteId;let le=a.X/this.tileSize;B.clusterMaxZoom!==void 0&&this.maxzoom<=B.clusterMaxZoom&&a.w(`The maxzoom value \"${this.maxzoom}\" is expected to be greater than the clusterMaxZoom value \"${B.clusterMaxZoom}\".`),this.workerOptions=a.e({source:this.id,cluster:B.cluster||!1,geojsonVtOptions:{buffer:(B.buffer!==void 0?B.buffer:128)*le,tolerance:(B.tolerance!==void 0?B.tolerance:.375)*le,extent:a.X,maxZoom:this.maxzoom,lineMetrics:B.lineMetrics||!1,generateId:B.generateId||!1},superclusterOptions:{maxZoom:B.clusterMaxZoom!==void 0?B.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,B.clusterMinPoints||2),extent:a.X,radius:(B.clusterRadius||50)*le,log:!1,generateId:B.generateId||!1},clusterProperties:B.clusterProperties,filter:B.filter},B.workerOptions),typeof this.promoteId==\"string\"&&(this.workerOptions.promoteId=this.promoteId)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(w){this.map=w,this.load()}setData(w){return this._data=w,this._updateWorkerData(),this}updateData(w){return this._updateWorkerData(w),this}getData(){return a._(this,void 0,void 0,function*(){let w=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:\"GD\",data:w})})}setClusterOptions(w){return this.workerOptions.cluster=w.cluster,w&&(w.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=w.clusterRadius),w.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=w.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(w){return this.actor.sendAsync({type:\"GCEZ\",data:{type:this.type,clusterId:w,source:this.id}})}getClusterChildren(w){return this.actor.sendAsync({type:\"GCC\",data:{type:this.type,clusterId:w,source:this.id}})}getClusterLeaves(w,B,Q){return this.actor.sendAsync({type:\"GCL\",data:{type:this.type,source:this.id,clusterId:w,limit:B,offset:Q}})}_updateWorkerData(w){return a._(this,void 0,void 0,function*(){let B=a.e({type:this.type},this.workerOptions);w?B.dataDiff=w:typeof this._data==\"string\"?(B.request=this.map._requestManager.transformRequest(u.resolveURL(this._data),\"Source\"),B.request.collectResourceTiming=this._collectResourceTiming):B.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.k(\"dataloading\",{dataType:\"source\"}));try{let Q=yield this.actor.sendAsync({type:\"LD\",data:B});if(this._pendingLoads--,this._removed||Q.abandoned)return void this.fire(new a.k(\"dataabort\",{dataType:\"source\"}));let ee=null;Q.resourceTiming&&Q.resourceTiming[this.id]&&(ee=Q.resourceTiming[this.id].slice(0));let le={dataType:\"source\"};this._collectResourceTiming&&ee&&ee.length>0&&a.e(le,{resourceTiming:ee}),this.fire(new a.k(\"data\",Object.assign(Object.assign({},le),{sourceDataType:\"metadata\"}))),this.fire(new a.k(\"data\",Object.assign(Object.assign({},le),{sourceDataType:\"content\"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k(\"dataabort\",{dataType:\"source\"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?\"RT\":\"LT\";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B===\"RT\")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:\"RMT\",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:\"RS\",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var lt=a.Y([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]);class Gt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,\"Image\"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,qe=1/0,Xe=-1/0,ot=-1/0;for(let xr of ee)le=Math.min(le,xr.x),qe=Math.min(qe,xr.y),Xe=Math.max(Xe,xr.x),ot=Math.max(ot,xr.y);let Tt=Math.max(Xe-le,ot-qe),Kt=Math.max(0,Math.floor(-Math.log(Tt)/Math.LN2)),Jt=Math.pow(2,Kt);return new a.a1(Kt,Math.floor((le+Xe)/2*Jt),Math.floor((qe+ot)/2*Jt))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!==\"loaded\"&&(le.state=\"loaded\",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state=\"errored\"})}serialize(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Nt extends Gt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type=\"video\",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,\"Source\").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener(\"playing\",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;w<B.start(0)||w>B.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!==\"loaded\"&&(le.state=\"loaded\",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}serialize(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class $t extends Gt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(qe=>typeof qe!=\"number\"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property \"coordinates\"'))),B.animate&&typeof B.animate!=\"boolean\"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional \"animate\" property must be a boolean value'))),B.canvas?typeof B.canvas==\"string\"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property \"canvas\"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error(\"Canvas dimensions cannot be less than or equal to zero.\"))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let qe=this.tiles[le];qe.state!==\"loaded\"&&(qe.state=\"loaded\",qe.texture=this.texture,ee=!0)}ee&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}serialize(){return{type:\"canvas\",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let sr={},wr=ue=>{switch(ue){case\"geojson\":return st;case\"image\":return Gt;case\"raster\":return pt;case\"raster-dem\":return Wt;case\"vector\":return ct;case\"video\":return Nt;case\"canvas\":return $t}return sr[ue]},ur=\"RTLPluginLoaded\";class Qe extends a.E{constructor(){super(...arguments),this.status=\"unavailable\",this.url=null,this.dispatcher=Ae()}_syncState(w){return this.status=w,this.dispatcher.broadcast(\"SRPS\",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status=\"error\",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status=\"unavailable\",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status===\"unavailable\"){if(!Q)return this._requestImport();this.status=\"deferred\",this._syncState(this.status)}else if(this.status===\"requested\")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState(\"loading\"),this.status=\"loaded\",this.fire(new a.k(ur))})}lazyLoad(){this.status===\"unavailable\"?this.status=\"requested\":this.status===\"deferred\"&&this._requestImport()}}let Et=null;function er(){return Et||(Et=new Qe),Et}class Ut{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state=\"loading\"}registerFadeDuration(w){let B=w+this.timeAdded;B<this.fadeEndTime||(this.fadeEndTime=B)}wasRequested(){return this.state===\"errored\"||this.state===\"loaded\"||this.state===\"reloading\"}clearTextures(w){this.demTexture&&w.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(w,B,Q){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",w){w.featureIndex&&(this.latestFeatureIndex=w.featureIndex,w.rawTileData?(this.latestRawTileData=w.rawTileData,this.latestFeatureIndex.rawTileData=w.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=w.collisionBoxArray,this.buckets=function(ee,le){let qe={};if(!le)return qe;for(let Xe of ee){let ot=Xe.layerIds.map(Tt=>le.getLayer(Tt)).filter(Boolean);if(ot.length!==0){Xe.layers=ot,Xe.stateDependentLayerIds&&(Xe.stateDependentLayers=Xe.stateDependentLayerIds.map(Tt=>ot.filter(Kt=>Kt.id===Tt)[0]));for(let Tt of ot)qe[Tt.id]=Xe}}return qe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,er().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:qe,tileSize:this.tileSize,pixelPosMatrix:Kt,transform:ot,params:Xe,queryPadding:this.queryPadding*Tt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:\"\",qe=ee._geojsonTileLayer||ee[le];if(!qe)return;let Xe=a.a7(B&&B.filter),{z:ot,x:Tt,y:Kt}=this.tileID.canonical,Jt={z:ot,x:Tt,y:Kt};for(let xr=0;xr<qe.length;xr++){let Pr=qe.feature(xr);if(Xe.needGeometry){let Re=a.a8(Pr,!0);if(!Xe.filter(new a.z(this.tileID.overscaledZ),Re,this.tileID.canonical))continue}else if(!Xe.filter(new a.z(this.tileID.overscaledZ),Pr))continue;let ve=Q.getId(Pr,le),be=new a.a9(Pr,ot,Tt,Kt,ve);be.tile=Jt,w.push(be)}}hasData(){return this.state===\"loaded\"||this.state===\"reloading\"||this.state===\"expired\"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(w){let B=this.expirationTime;if(w.cacheControl){let Q=a.aa(w.cacheControl);Q[\"max-age\"]&&(this.expirationTime=Date.now()+1e3*Q[\"max-age\"])}else w.expires&&(this.expirationTime=new Date(w.expires).getTime());if(this.expirationTime){let Q=Date.now(),ee=!1;if(this.expirationTime>Q)ee=!1;else if(B)if(this.expirationTime<B)ee=!0;else{let le=this.expirationTime-B;le?this.expirationTime=Q+Math.max(le,3e4):ee=!0}else ee=!0;ee?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(w,B){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(w).length===0)return;let Q=this.latestFeatureIndex.loadVTLayers();for(let ee in this.buckets){if(!B.style.hasLayer(ee))continue;let le=this.buckets[ee],qe=le.layers[0].sourceLayer||\"_geojsonTileLayer\",Xe=Q[qe],ot=w[qe];if(!Xe||!ot||Object.keys(ot).length===0)continue;le.update(ot,Xe,this.imageAtlas&&this.imageAtlas.patternPositions||{});let Tt=B&&B.style&&B.style.getLayer(ee);Tt&&(this.queryPadding=Math.max(this.queryPadding,Tt.queryRadius(le)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<u.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(w){this.symbolFadeHoldUntil=u.now()+w}setDependencies(w,B){let Q={};for(let ee of B)Q[ee]=!0;this.dependencies[w]=Q}hasDependency(w,B){for(let Q of w){let ee=this.dependencies[Q];if(ee){for(let le of B)if(ee[le])return!0}}return!1}}class Ft{constructor(w,B){this.max=w,this.onRemove=B,this.reset()}reset(){for(let w in this.data)for(let B of this.data[w])B.timeout&&clearTimeout(B.timeout),this.onRemove(B.value);return this.data={},this.order=[],this}add(w,B,Q){let ee=w.wrapped().key;this.data[ee]===void 0&&(this.data[ee]=[]);let le={value:B,timeout:void 0};if(Q!==void 0&&(le.timeout=setTimeout(()=>{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let qe=this._getAndRemoveByKey(this.order[0]);qe&&this.onRemove(qe)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class bt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let qe in le)delete ee[qe]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let qe in this.stateChanges[ee])this.state[ee][qe]||(this.state[ee][qe]={}),a.e(this.state[ee][qe],this.stateChanges[ee][qe]),le[qe]=this.state[ee][qe];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let qe in this.state[ee])le[qe]={},this.state[ee][qe]={};else for(let qe in this.deletedStates[ee]){if(this.deletedStates[ee][qe]===null)this.state[ee][qe]={};else for(let Xe of Object.keys(this.deletedStates[ee][qe]))delete this.state[ee][qe][Xe];le[qe]=this.state[ee][qe]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class yt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on(\"data\",ee=>this._dataHandler(ee)),this.on(\"dataloading\",()=>{this._sourceErrored=!1}),this.on(\"error\",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,qe,Xe)=>{let ot=new(wr(le.type))(ee,le,qe,Xe);if(ot.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${ot.id}`);return ot})(w,B,Q,this),this._tiles={},this._cache=new Ft(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new bt,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!==\"loaded\"&&B.state!==\"errored\")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state=\"errored\",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k(\"dataabort\",{tile:w,coord:w.tileID,dataType:\"source\"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(Yt).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,qe=ee.tileID,Xe=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),ot=new a.P(qe.canonical.x,qe.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-qe.overscaledZ||ot.y-Xe.y||ot.x-Xe.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Yt).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!==\"errored\"&&this._reloadTile(w,\"reloading\")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!==\"loading\"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q===\"expired\"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type===\"raster-dem\"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k(\"data\",{dataType:\"source\",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee<B.length;ee++){let le=B[ee];if(w.neighboringTiles&&w.neighboringTiles[le]){let qe=this.getTileByID(le);Q(w,qe),Q(qe,w)}}function Q(ee,le){ee.needsHillshadePrepare=!0,ee.needsTerrainPrepare=!0;let qe=le.tileID.canonical.x-ee.tileID.canonical.x,Xe=le.tileID.canonical.y-ee.tileID.canonical.y,ot=Math.pow(2,ee.tileID.canonical.z),Tt=le.tileID.key;qe===0&&Xe===0||Math.abs(Xe)>1||(Math.abs(qe)>1&&(Math.abs(qe+ot)===1?qe+=ot:Math.abs(qe-ot)===1&&(qe-=ot)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,qe,Xe),ee.neighboringTiles&&ee.neighboringTiles[Tt]&&(ee.neighboringTiles[Tt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let qe=this._tiles[le];if(ee[le]||!qe.hasData()||qe.tileID.overscaledZ<=B||qe.tileID.overscaledZ>Q)continue;let Xe=qe.tileID;for(;qe&&qe.tileID.overscaledZ>B+1;){let Tt=qe.tileID.scaledTo(qe.tileID.overscaledZ-1);qe=this._tiles[Tt.key],qe&&qe.hasData()&&(Xe=Tt)}let ot=Xe;for(;ot.overscaledZ>B;)if(ot=ot.scaledTo(ot.overscaledZ-1),w[ot.key]){ee[Xe.key]=Xe;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize==\"number\"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,qe){let Xe={},ot={},Tt=Object.keys(w),Kt=u.now();for(let Jt of Tt){let xr=w[Jt],Pr=this._tiles[Jt];if(!Pr||Pr.fadeEndTime!==0&&Pr.fadeEndTime<=Kt)continue;let ve=this.findLoadedParent(xr,B),be=this.findLoadedSibling(xr),Re=ve||be||null;Re&&(this._addTile(Re.tileID),Xe[Re.tileID.key]=Re.tileID),ot[Jt]=xr}this._retainLoadedChildren(ot,ee,Q,w);for(let Jt in Xe)w[Jt]||(this._coveredTiles[Jt]=!0,w[Jt]=Xe[Jt]);if(qe){let Jt={},xr={};for(let Pr of le)this._tiles[Pr.key].hasData()?Jt[Pr.key]=Pr:xr[Pr.key]=Pr;for(let Pr in xr){let ve=xr[Pr].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&(Jt[ve[0].key]=w[ve[0].key]=ve[0],Jt[ve[1].key]=w[ve[1].key]=ve[1],Jt[ve[2].key]=w[ve[2].key]=ve[2],Jt[ve[3].key]=w[ve[3].key]=ve[3],delete xr[Pr])}for(let Pr in xr){let ve=xr[Pr],be=this.findLoadedParent(ve,this._source.minzoom),Re=this.findLoadedSibling(ve),Be=be||Re||null;if(Be){Jt[Be.tileID.key]=w[Be.tileID.key]=Be.tileID;for(let tt in Jt)Jt[tt].isChildOf(Be.tileID)&&delete Jt[tt]}}for(let Pr in this._tiles)Jt[Pr]||(this._coveredTiles[Pr]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Kt=>new a.S(Kt.canonical.z,Kt.wrap,Kt.canonical.z,Kt.canonical.x,Kt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Kt=>this._source.hasTile(Kt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-yt.maxOverzooming,this._source.minzoom),qe=Math.max(ee+yt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Kt={};for(let Jt of Q)if(Jt.canonical.z>this._source.minzoom){let xr=Jt.scaledTo(Jt.canonical.z-1);Kt[xr.key]=xr;let Pr=Jt.scaledTo(Math.max(this._source.minzoom,Math.min(Jt.canonical.z,5)));Kt[Pr.key]=Pr}Q=Q.concat(Object.values(Kt))}let Xe=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Xe&&this.fire(new a.k(\"data\",{sourceDataType:\"idle\",dataType:\"source\",sourceId:this.id}));let ot=this._updateRetainedTiles(Q,ee);lr(this._source.type)&&this._updateCoveredAndRetainedTiles(ot,le,qe,ee,Q,B);for(let Kt in ot)this._tiles[Kt].clearFadeHold();let Tt=a.ab(this._tiles,ot);for(let Kt of Tt){let Jt=this._tiles[Kt];Jt.hasSymbolBuckets&&!Jt.holdingForFade()?Jt.setHoldDuration(this.map._fadeDuration):Jt.hasSymbolBuckets&&!Jt.symbolFadeFinished()||this._removeTile(Kt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},qe=Math.max(B-yt.maxOverzooming,this._source.minzoom),Xe=Math.max(B+yt.maxUnderzooming,this._source.minzoom),ot={};for(let Tt of w){let Kt=this._addTile(Tt);ee[Tt.key]=Tt,Kt.hasData()||B<this._source.maxzoom&&(ot[Tt.key]=Tt)}this._retainLoadedChildren(ot,B,Xe,ee);for(let Tt of w){let Kt=this._tiles[Tt.key];if(Kt.hasData())continue;if(B+1>this._source.maxzoom){let xr=Tt.children(this._source.maxzoom)[0],Pr=this.getTile(xr);if(Pr&&Pr.hasData()){ee[xr.key]=xr;continue}}else{let xr=Tt.children(this._source.maxzoom);if(ee[xr[0].key]&&ee[xr[1].key]&&ee[xr[2].key]&&ee[xr[3].key])continue}let Jt=Kt.wasRequested();for(let xr=Tt.overscaledZ-1;xr>=qe;--xr){let Pr=Tt.scaledTo(xr);if(le[Pr.key])break;if(le[Pr.key]=!0,Kt=this.getTile(Pr),!Kt&&Jt&&(Kt=this._addTile(Pr)),Kt){let ve=Kt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Jt)&&(ee[Pr.key]=Pr),Jt=Kt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Ut(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k(\"dataloading\",{tile:B,coord:B.tileID,dataType:\"source\"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,\"expired\"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!==\"reloading\"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType===\"source\"&&B===\"metadata\"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType===\"source\"&&B===\"content\"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let qe=Q?le.getCameraQueryGeometry(w):w,Xe=w.map(ve=>le.pointCoordinate(ve,this.terrain)),ot=qe.map(ve=>le.pointCoordinate(ve,this.terrain)),Tt=this.getIds(),Kt=1/0,Jt=1/0,xr=-1/0,Pr=-1/0;for(let ve of ot)Kt=Math.min(Kt,ve.x),Jt=Math.min(Jt,ve.y),xr=Math.max(xr,ve.x),Pr=Math.max(Pr,ve.y);for(let ve=0;ve<Tt.length;ve++){let be=this._tiles[Tt[ve]];if(be.holdingForFade())continue;let Re=be.tileID,Be=Math.pow(2,le.zoom-be.tileID.overscaledZ),tt=B*be.queryPadding*a.X/be.tileSize/Be,We=[Re.getTilePoint(new a.Z(Kt,Jt)),Re.getTilePoint(new a.Z(xr,Pr))];if(We[0].x-tt<a.X&&We[0].y-tt<a.X&&We[1].x+tt>=0&&We[1].y+tt>=0){let it=Xe.map(Ht=>Re.getTilePoint(Ht)),Dt=ot.map(Ht=>Re.getTilePoint(Ht));ee.push({tile:be,tileID:Re,queryGeometry:it,cameraQueryGeometry:Dt,scale:Be})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(lr(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||\"_geojsonTileLayer\",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||\"_geojsonTileLayer\",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||\"_geojsonTileLayer\",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,\"reloading\");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function Yt(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function lr(ue){return ue===\"raster\"||ue===\"image\"||ue===\"video\"}yt.maxOverzooming=10,yt.maxUnderzooming=3;class Tr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q<this.points.length;Q++)this._distances[Q]=this._distances[Q-1]+this.points[Q].dist(this.points[Q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(B||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(w){if(this.points.length===1)return this.points[0];w=a.ac(w,0,1);let B=1,Q=this._distances[B],ee=w*this.paddedLength+this.padding;for(;Q<ee&&B<this._distances.length;)Q=this._distances[++B];let le=B-1,qe=this._distances[le],Xe=Q-qe,ot=Xe>0?(ee-qe)/Xe:0;return this.points[le].mult(1-ot).add(this.points[B].mult(ot))}}function Rr(ue,w){let B=!0;return ue===\"always\"||ue!==\"never\"&&w!==\"never\"||(B=!1),B}class ei{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let qe=0;qe<this.xCellCount*this.yCellCount;qe++)ee.push([]),le.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=w,this.height=B,this.xScale=this.xCellCount/w,this.yScale=this.yCellCount/B,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(w,B,Q,ee,le){this._forEachCell(B,Q,ee,le,this._insertBoxCell,this.boxUid++),this.boxKeys.push(w),this.bboxes.push(B),this.bboxes.push(Q),this.bboxes.push(ee),this.bboxes.push(le)}insertCircle(w,B,Q,ee){this._forEachCell(B-ee,Q-ee,B+ee,Q+ee,this._insertCircleCell,this.circleUid++),this.circleKeys.push(w),this.circles.push(B),this.circles.push(Q),this.circles.push(ee)}_insertBoxCell(w,B,Q,ee,le,qe){this.boxCells[le].push(qe)}_insertCircleCell(w,B,Q,ee,le,qe){this.circleCells[le].push(qe)}_query(w,B,Q,ee,le,qe,Xe){if(Q<0||w>this.width||ee<0||B>this.height)return[];let ot=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Tt=0;Tt<this.boxKeys.length;Tt++)ot.push({key:this.boxKeys[Tt],x1:this.bboxes[4*Tt],y1:this.bboxes[4*Tt+1],x2:this.bboxes[4*Tt+2],y2:this.bboxes[4*Tt+3]});for(let Tt=0;Tt<this.circleKeys.length;Tt++){let Kt=this.circles[3*Tt],Jt=this.circles[3*Tt+1],xr=this.circles[3*Tt+2];ot.push({key:this.circleKeys[Tt],x1:Kt-xr,y1:Jt-xr,x2:Kt+xr,y2:Jt+xr})}}else this._forEachCell(w,B,Q,ee,this._queryCell,ot,{hitTest:le,overlapMode:qe,seenUids:{box:{},circle:{}}},Xe);return ot}query(w,B,Q,ee){return this._query(w,B,Q,ee,!1,null)}hitTest(w,B,Q,ee,le,qe){return this._query(w,B,Q,ee,!0,le,qe).length>0}hitTestCircle(w,B,Q,ee,le){let qe=w-Q,Xe=w+Q,ot=B-Q,Tt=B+Q;if(Xe<0||qe>this.width||Tt<0||ot>this.height)return!1;let Kt=[];return this._forEachCell(qe,ot,Xe,Tt,this._queryCellCircle,Kt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Kt.length>0}_queryCell(w,B,Q,ee,le,qe,Xe,ot){let{seenUids:Tt,hitTest:Kt,overlapMode:Jt}=Xe,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Tt.box[be]){Tt.box[be]=!0;let Re=4*be,Be=this.boxKeys[be];if(w<=ve[Re+2]&&B<=ve[Re+3]&&Q>=ve[Re+0]&&ee>=ve[Re+1]&&(!ot||ot(Be))&&(!Kt||!Rr(Jt,Be.overlapMode))&&(qe.push({key:Be,x1:ve[Re],y1:ve[Re+1],x2:ve[Re+2],y2:ve[Re+3]}),Kt))return!0}}let Pr=this.circleCells[le];if(Pr!==null){let ve=this.circles;for(let be of Pr)if(!Tt.circle[be]){Tt.circle[be]=!0;let Re=3*be,Be=this.circleKeys[be];if(this._circleAndRectCollide(ve[Re],ve[Re+1],ve[Re+2],w,B,Q,ee)&&(!ot||ot(Be))&&(!Kt||!Rr(Jt,Be.overlapMode))){let tt=ve[Re],We=ve[Re+1],it=ve[Re+2];if(qe.push({key:Be,x1:tt-it,y1:We-it,x2:tt+it,y2:We+it}),Kt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,qe,Xe,ot){let{circle:Tt,seenUids:Kt,overlapMode:Jt}=Xe,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Kt.box[be]){Kt.box[be]=!0;let Re=4*be,Be=this.boxKeys[be];if(this._circleAndRectCollide(Tt.x,Tt.y,Tt.radius,ve[Re+0],ve[Re+1],ve[Re+2],ve[Re+3])&&(!ot||ot(Be))&&!Rr(Jt,Be.overlapMode))return qe.push(!0),!0}}let Pr=this.circleCells[le];if(Pr!==null){let ve=this.circles;for(let be of Pr)if(!Kt.circle[be]){Kt.circle[be]=!0;let Re=3*be,Be=this.circleKeys[be];if(this._circlesCollide(ve[Re],ve[Re+1],ve[Re+2],Tt.x,Tt.y,Tt.radius)&&(!ot||ot(Be))&&!Rr(Jt,Be.overlapMode))return qe.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,qe,Xe,ot){let Tt=this._convertToXCellCoord(w),Kt=this._convertToYCellCoord(B),Jt=this._convertToXCellCoord(Q),xr=this._convertToYCellCoord(ee);for(let Pr=Tt;Pr<=Jt;Pr++)for(let ve=Kt;ve<=xr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Pr,qe,Xe,ot))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,qe){let Xe=ee-w,ot=le-B,Tt=Q+qe;return Tt*Tt>Xe*Xe+ot*ot}_circleAndRectCollide(w,B,Q,ee,le,qe,Xe){let ot=(qe-ee)/2,Tt=Math.abs(w-(ee+ot));if(Tt>ot+Q)return!1;let Kt=(Xe-le)/2,Jt=Math.abs(B-(le+Kt));if(Jt>Kt+Q)return!1;if(Tt<=ot||Jt<=Kt)return!0;let xr=Tt-ot,Pr=Jt-Kt;return xr*xr+Pr*Pr<=Q*Q}}function Wr(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function Ur(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function dt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],Jr(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function je(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr,ve){let be=Q?ue.textSizeData:ue.iconSizeData,Re=a.ag(be,B.transform.zoom),Be=[256/B.width*2+1,256/B.height*2+1],tt=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;tt.clear();let We=ue.lineVertexArray,it=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,Dt=B.transform.width/B.transform.height,Ht=!1;for(let rr=0;rr<it.length;rr++){let dr=it.get(rr);if(dr.hidden||dr.writingMode===a.ah.vertical&&!Ht){di(dr.numGlyphs,tt);continue}Ht=!1;let Sr=dt(dr.anchorX,dr.anchorY,w,ve);if(!Je(Sr.point,Be)){di(dr.numGlyphs,tt);continue}let Or=Ge(B.transform.cameraToCenterDistance,Sr.signedDistanceFromCamera),jr=a.ai(be,Re,dr),ii=qe?jr/Or:jr*Or,Li={getElevation:ve,labelPlaneMatrix:ee,lineVertexArray:We,pitchWithMap:qe,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:Tt,tileAnchorPoint:new a.P(dr.anchorX,dr.anchorY),unwrappedTileID:Kt,width:Jt,height:xr,translation:Pr},un=Ie(Li,dr,ii,!1,Xe,w,le,ue.glyphOffsetArray,tt,Dt,ot);Ht=un.useVertical,(un.notEnoughRoom||Ht||un.needsFlipping&&Ie(Li,dr,ii,!0,Xe,w,le,ue.glyphOffsetArray,tt,Dt,ot).notEnoughRoom)&&di(dr.numGlyphs,tt)}Q?ue.text.dynamicLayoutVertexBuffer.updateData(tt):ue.icon.dynamicLayoutVertexBuffer.updateData(tt)}function $e(ue,w,B,Q,ee,le,qe,Xe){let ot=le.glyphStartIndex+le.numGlyphs,Tt=le.lineStartIndex,Kt=le.lineStartIndex+le.lineLength,Jt=w.getoffsetX(le.glyphStartIndex),xr=w.getoffsetX(ot-1),Pr=pr(ue*Jt,B,Q,ee,le.segment,Tt,Kt,Xe,qe);if(!Pr)return null;let ve=pr(ue*xr,B,Q,ee,le.segment,Tt,Kt,Xe,qe);return ve?Xe.projectionCache.anyProjectionOccluded?null:{first:Pr,last:ve}:null}function wt(ue,w,B,Q){return ue===a.ah.horizontal&&Math.abs(B.y-w.y)>Math.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.y<B.y:w.x>B.x)?{needsFlipping:!0}:null}function Ie(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt){let Jt=B/24,xr=w.lineOffsetX*Jt,Pr=w.lineOffsetY*Jt,ve;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,Re=w.lineStartIndex,Be=w.lineStartIndex+w.lineLength,tt=$e(Jt,Xe,xr,Pr,Q,w,Kt,ue);if(!tt)return{notEnoughRoom:!0};let We=dt(tt.first.point.x,tt.first.point.y,qe,ue.getElevation).point,it=dt(tt.last.point.x,tt.last.point.y,qe,ue.getElevation).point;if(ee&&!Q){let Dt=wt(w.writingMode,We,it,Tt);if(Dt)return Dt}ve=[tt.first];for(let Dt=w.glyphStartIndex+1;Dt<be-1;Dt++)ve.push(pr(Jt*Xe.getoffsetX(Dt),xr,Pr,Q,w.segment,Re,Be,ue,Kt));ve.push(tt.last)}else{if(ee&&!Q){let Re=dt(ue.tileAnchorPoint.x,ue.tileAnchorPoint.y,le,ue.getElevation).point,Be=w.lineStartIndex+w.segment+1,tt=new a.P(ue.lineVertexArray.getx(Be),ue.lineVertexArray.gety(Be)),We=dt(tt.x,tt.y,le,ue.getElevation),it=We.signedDistanceFromCamera>0?We.point:function(Ht,rr,dr,Sr,Or,jr){return xe(Ht,rr,dr,1,Or,jr)}(ue.tileAnchorPoint,tt,Re,0,le,ue),Dt=wt(w.writingMode,Re,it,Tt);if(Dt)return Dt}let be=pr(Jt*Xe.getoffsetX(w.glyphStartIndex),xr,Pr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Kt);if(!be||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[be]}for(let be of ve)a.aj(ot,be.point,be.angle);return{}}function xe(ue,w,B,Q,ee,le){let qe=ue.add(ue.sub(w)._unit()),Xe=ee!==void 0?dt(qe.x,qe.y,ee,le.getElevation).point:vt(qe.x,qe.y,le).point,ot=B.sub(Xe);return B.add(ot._mult(Q/ot.mag()))}function Ce(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=vt(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let qe=ue-B.direction;return function(Xe,ot,Tt,Kt,Jt){return xe(Xe,ot,Tt,Kt,void 0,Jt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(qe),w.lineVertexArray.gety(qe)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function vt(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=dt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function nr(ue,w,B){return ue._unit()._perp()._mult(w*B)}function ir(ue,w,B,Q,ee,le,qe,Xe,ot){if(Xe.projectionCache.offsets[ue])return Xe.projectionCache.offsets[ue];let Tt=B.add(w);if(ue+ot.direction<Q||ue+ot.direction>=ee)return Xe.projectionCache.offsets[ue]=Tt,Tt;let Kt=Ce(ue+ot.direction,Xe,ot),Jt=nr(Kt.sub(B),qe,ot.direction),xr=B.add(Jt),Pr=Kt.add(Jt);return Xe.projectionCache.offsets[ue]=a.ak(le,Tt,xr,Pr)||Tt,Xe.projectionCache.offsets[ue]}function pr(ue,w,B,Q,ee,le,qe,Xe,ot){let Tt=Q?ue-w:ue+w,Kt=Tt>0?1:-1,Jt=0;Q&&(Kt*=-1,Jt=Math.PI),Kt<0&&(Jt+=Math.PI);let xr,Pr=Kt>0?le+ee:le+ee+1;Xe.projectionCache.cachedAnchorPoint?xr=Xe.projectionCache.cachedAnchorPoint:(xr=vt(Xe.tileAnchorPoint.x,Xe.tileAnchorPoint.y,Xe).point,Xe.projectionCache.cachedAnchorPoint=xr);let ve,be,Re=xr,Be=xr,tt=0,We=0,it=Math.abs(Tt),Dt=[],Ht;for(;tt+We<=it;){if(Pr+=Kt,Pr<le||Pr>=qe)return null;tt+=We,Be=Re,be=ve;let Sr={absOffsetX:it,direction:Kt,distanceFromAnchor:tt,previousVertex:Be};if(Re=Ce(Pr,Xe,Sr),B===0)Dt.push(Be),Ht=Re.sub(Be);else{let Or,jr=Re.sub(Be);Or=jr.mag()===0?nr(Ce(Pr+Kt,Xe,Sr).sub(Re),B,Kt):nr(jr,B,Kt),be||(be=Be.add(Or)),ve=ir(Pr,Or,Re,le,qe,be,B,Xe,Sr),Dt.push(be),Ht=ve.sub(be)}We=Ht.mag()}let rr=Ht._mult((it-tt)/We)._add(be||Be),dr=Jt+Math.atan2(Re.y-Be.y,Re.x-Be.x);return Dt.push(rr),{point:rr,angle:ot?dr:0,path:Dt}}let oi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function di(ue,w){for(let B=0;B<ue;B++){let Q=w.length;w.resize(Q+4),w.float32.set(oi,3*Q)}}function Jr(ue,w,B){let Q=w[0],ee=w[1];return ue[0]=B[0]*Q+B[4]*ee+B[12],ue[1]=B[1]*Q+B[5]*ee+B[13],ue[3]=B[3]*Q+B[7]*ee+B[15],ue}let fi=100;class Hi{constructor(w,B,Q=new ei(w.width+200,w.height+200,25),ee=new ei(w.width+200,w.height+200,25)){this.transform=w,this.mapProjection=B,this.grid=Q,this.ignoredGrid=ee,this.pitchFactor=Math.cos(w._pitch)*w.cameraToCenterDistance,this.screenRightBoundary=w.width+fi,this.screenBottomBoundary=w.height+fi,this.gridRightBoundary=w.width+200,this.gridBottomBoundary=w.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt){let xr=w.anchorPointX+ot[0],Pr=w.anchorPointY+ot[1],ve=this.projectAndGetPerspectiveRatio(ee,xr,Pr,le,Kt),be=Q*ve.perspectiveRatio,Re;if(qe||Xe)Re=this._projectCollisionBox(w,be,ee,le,qe,Xe,ot,ve,Kt,Jt);else{let Dt=ve.point.x+(Jt?Jt.x*be:0),Ht=ve.point.y+(Jt?Jt.y*be:0);Re={allPointsOccluded:!1,box:[Dt+w.x1*be,Ht+w.y1*be,Dt+w.x2*be,Ht+w.y2*be]}}let[Be,tt,We,it]=Re.box;return this.mapProjection.useSpecialProjectionForSymbols&&(qe?Re.allPointsOccluded:this.mapProjection.isOccluded(xr,Pr,le))||ve.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(Be,tt,We,it)||B!==\"always\"&&this.grid.hitTest(Be,tt,We,it,B,Tt)?{box:[Be,tt,We,it],placeable:!1,offscreen:!1}:{box:[Be,tt,We,it],placeable:!0,offscreen:this.isOffscreen(Be,tt,We,it)}}placeCollisionCircles(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr,ve,be,Re){let Be=[],tt=new a.P(B.anchorX,B.anchorY),We=this.getPerspectiveRatio(qe,tt.x,tt.y,Xe,Re),it=(Jt?le/We:le*We)/a.ap,Dt={getElevation:Re,labelPlaneMatrix:ot,lineVertexArray:Q,pitchWithMap:Jt,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:tt,unwrappedTileID:Xe,width:this.transform.width,height:this.transform.height,translation:be},Ht=$e(it,ee,B.lineOffsetX*it,B.lineOffsetY*it,!1,B,!1,Dt),rr=!1,dr=!1,Sr=!0;if(Ht){let Or=.5*Pr*We+ve,jr=new a.P(-100,-100),ii=new a.P(this.screenRightBoundary,this.screenBottomBoundary),Li=new Tr,un=Ht.first,sn=Ht.last,In=[];for(let fa=un.path.length-1;fa>=1;fa--)In.push(un.path[fa]);for(let fa=1;fa<sn.path.length;fa++)In.push(sn.path[fa]);let Kn=2.5*Or;if(Tt){let fa=this.projectPathToScreenSpace(In,Dt,Tt);In=fa.some($a=>$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(In.length>0){let fa=In[0].clone(),$a=In[0].clone();for(let ko=1;ko<In.length;ko++)fa.x=Math.min(fa.x,In[ko].x),fa.y=Math.min(fa.y,In[ko].y),$a.x=Math.max($a.x,In[ko].x),$a.y=Math.max($a.y,In[ko].y);Aa=fa.x>=jr.x&&$a.x<=ii.x&&fa.y>=jr.y&&$a.y<=ii.y?[In]:$a.x<jr.x||fa.x>ii.x||$a.y<jr.y||fa.y>ii.y?[]:a.al([In],jr.x,jr.y,ii.x,ii.y)}for(let fa of Aa){Li.reset(fa,.25*Or);let $a=0;$a=Li.length<=.5*Or?1:Math.ceil(Li.paddedLength/Kn)+1;for(let ko=0;ko<$a;ko++){let Qa=ko/Math.max($a-1,1),mo=Li.lerp(Qa),Bo=mo.x+fi,Is=mo.y+fi;Be.push(Bo,Is,Or,0);let As=Bo-Or,wo=Is-Or,To=Bo+Or,dl=Is+Or;if(Sr=Sr&&this.isOffscreen(As,wo,To,dl),dr=dr||this.isInsideGrid(As,wo,To,dl),w!==\"always\"&&this.grid.hitTestCircle(Bo,Is,Or,w,xr)&&(rr=!0,!Kt))return{circles:[],offscreen:!1,collisionDetected:rr}}}}return{circles:!Kt&&rr||!dr||We<this.perspectiveRatioCutoff?[]:Be,offscreen:Sr,collisionDetected:rr}}projectPathToScreenSpace(w,B,Q){return w.map(ee=>dt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,qe=-1/0;for(let Kt of w){let Jt=new a.P(Kt.x+fi,Kt.y+fi);Q=Math.min(Q,Jt.x),ee=Math.min(ee,Jt.y),le=Math.max(le,Jt.x),qe=Math.max(qe,Jt.y),B.push(Jt)}let Xe=this.grid.query(Q,ee,le,qe).concat(this.ignoredGrid.query(Q,ee,le,qe)),ot={},Tt={};for(let Kt of Xe){let Jt=Kt.key;if(ot[Jt.bucketInstanceId]===void 0&&(ot[Jt.bucketInstanceId]={}),ot[Jt.bucketInstanceId][Jt.featureIndex])continue;let xr=[new a.P(Kt.x1,Kt.y1),new a.P(Kt.x2,Kt.y1),new a.P(Kt.x2,Kt.y2),new a.P(Kt.x1,Kt.y2)];a.am(B,xr)&&(ot[Jt.bucketInstanceId][Jt.featureIndex]=!0,Tt[Jt.bucketInstanceId]===void 0&&(Tt[Jt.bucketInstanceId]=[]),Tt[Jt.bucketInstanceId].push(Jt.featureIndex))}return Tt}insertCollisionBox(w,B,Q,ee,le,qe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:qe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,qe){let Xe=Q?this.ignoredGrid:this.grid,ot={bucketInstanceId:ee,featureIndex:le,collisionGroupID:qe,overlapMode:B};for(let Tt=0;Tt<w.length;Tt+=4)Xe.insertCircle(ot,w[Tt],w[Tt+1],w[Tt+2])}projectAndGetPerspectiveRatio(w,B,Q,ee,le){let qe;le?(qe=[B,Q,le(B,Q),1],a.af(qe,qe,w)):(qe=[B,Q,0,1],Jr(qe,qe,w));let Xe=qe[3];return{point:new a.P((qe[0]/Xe+1)/2*this.transform.width+fi,(-qe[1]/Xe+1)/2*this.transform.height+fi),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Xe*.5,isOccluded:!1,signedDistanceFromCamera:Xe}}getPerspectiveRatio(w,B,Q,ee,le){let qe=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(B,Q,ee,le):dt(B,Q,w,le);return .5+this.transform.cameraToCenterDistance/qe.signedDistanceFromCamera*.5}isOffscreen(w,B,Q,ee){return Q<fi||w>=this.screenRightBoundary||ee<fi||B>this.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w<this.gridRightBoundary&&ee>=0&&B<this.gridBottomBoundary}getViewportMatrix(){let w=a.an([]);return a.J(w,w,[-100,-100,0]),w}_projectCollisionBox(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt){let Jt=new a.P(1,0),xr=new a.P(0,1),Pr=new a.P(w.anchorPointX+Xe[0],w.anchorPointY+Xe[1]);if(qe&&!le){let Sr=this.projectAndGetPerspectiveRatio(Q,Pr.x+1,Pr.y,ee,Tt).point.sub(ot.point).unit(),Or=Math.atan(Sr.y/Sr.x)+(Sr.x<0?Math.PI:0),jr=Math.sin(Or),ii=Math.cos(Or);Jt=new a.P(ii,jr),xr=new a.P(-jr,ii)}else if(!qe&&le){let Sr=-this.transform.angle,Or=Math.sin(Sr),jr=Math.cos(Sr);Jt=new a.P(jr,Or),xr=new a.P(-Or,jr)}let ve=ot.point,be=B;if(le){ve=Pr;let Sr=this.transform.zoom-Math.floor(this.transform.zoom);be=Math.pow(2,-Sr),be*=this.mapProjection.getPitchedTextCorrection(this.transform,Pr,ee),Kt||(be*=a.ac(.5+ot.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Kt&&(ve=ve.add(Jt.mult(Kt.x*be)).add(xr.mult(Kt.y*be)));let Re=w.x1*be,Be=w.x2*be,tt=(Re+Be)/2,We=w.y1*be,it=w.y2*be,Dt=(We+it)/2,Ht=[{offsetX:Re,offsetY:We},{offsetX:tt,offsetY:We},{offsetX:Be,offsetY:We},{offsetX:Be,offsetY:Dt},{offsetX:Be,offsetY:it},{offsetX:tt,offsetY:it},{offsetX:Re,offsetY:it},{offsetX:Re,offsetY:Dt}],rr=[];for(let{offsetX:Sr,offsetY:Or}of Ht)rr.push(new a.P(ve.x+Jt.x*Sr+xr.x*Or,ve.y+Jt.y*Sr+xr.y*Or));let dr=!1;if(le){let Sr=rr.map(Or=>this.projectAndGetPerspectiveRatio(Q,Or.x,Or.y,ee,Tt));dr=Sr.some(Or=>!Or.isOccluded),rr=Sr.map(Or=>Or.point)}else dr=!0;return{box:a.ao(rr),allPointsOccluded:!dr}}}function Pn(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class wn{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class pn{constructor(w,B,Q,ee,le){this.text=new wn(w?w.text:null,B,Q,le),this.icon=new wn(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Vn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class kn{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ea{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class ua{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Vt(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:qe}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(qe-.5)*B+Q[1]*ee)}class _t{constructor(w,B,Q,ee,le,qe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new Hi(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new ua(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=qe,qe&&(qe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),qe=Q.latestFeatureIndex;if(!le||!qe||B.id!==le.layerIds[0])return;let Xe=Q.collisionBoxArray,ot=le.layers[0].layout,Tt=le.layers[0].paint,Kt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Jt=Q.tileSize/a.X,xr=Q.tileID.toUnwrapped(),Pr=this.transform.calculatePosMatrix(xr),ve=ot.get(\"text-pitch-alignment\")===\"map\",be=ot.get(\"text-rotation-alignment\")===\"map\",Re=Pn(Q,1,this.transform.zoom),Be=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get(\"text-translate\"),Tt.get(\"text-translate-anchor\")),tt=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get(\"icon-translate\"),Tt.get(\"icon-translate-anchor\")),We=Wr(Pr,ve,be,this.transform,Re),it=null;if(ve){let Ht=Ur(Pr,ve,be,this.transform,Re);it=a.L([],this.transform.labelPlaneMatrix,Ht)}this.retainedQueryData[le.bucketInstanceId]=new ea(le.bucketInstanceId,qe,le.sourceLayerIndex,le.index,Q.tileID);let Dt={bucket:le,layout:ot,translationText:Be,translationIcon:tt,posMatrix:Pr,unwrappedTileID:xr,textLabelPlaneMatrix:We,labelToScreenMatrix:it,scale:Kt,textPixelRatio:Jt,holdingForFade:Q.holdingForFade(),collisionBoxArray:Xe,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Ht of le.sortKeyRanges){let{sortKey:rr,symbolInstanceStart:dr,symbolInstanceEnd:Sr}=Ht;w.push({sortKey:rr,symbolInstanceStart:dr,symbolInstanceEnd:Sr,parameters:Dt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:Dt})}attemptAnchorPlacement(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr,ve,be,Re,Be,tt,We){let it=a.aq[w.textAnchor],Dt=[w.textOffset0,w.textOffset1],Ht=Vt(it,Q,ee,Dt,le),rr=this.collisionIndex.placeCollisionBox(B,xr,ot,Tt,Kt,Xe,qe,Re,Jt.predicate,We,Ht);if((!tt||this.collisionIndex.placeCollisionBox(tt,xr,ot,Tt,Kt,Xe,qe,Be,Jt.predicate,We,Ht).placeable)&&rr.placeable){let dr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Pr.crossTileID]&&this.prevPlacement.placements[Pr.crossTileID]&&this.prevPlacement.placements[Pr.crossTileID].text&&(dr=this.prevPlacement.variableOffsets[Pr.crossTileID].anchor),Pr.crossTileID===0)throw new Error(\"symbolInstance.crossTileID can't be 0\");return this.variableOffsets[Pr.crossTileID]={textOffset:Dt,width:Q,height:ee,anchor:it,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ve,it,Pr,be),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,be,Pr),this.placedOrientations[Pr.crossTileID]=be),{shift:Ht,placedGlyphBoxes:rr}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:qe,translationIcon:Xe,posMatrix:ot,unwrappedTileID:Tt,textLabelPlaneMatrix:Kt,labelToScreenMatrix:Jt,textPixelRatio:xr,holdingForFade:Pr,collisionBoxArray:ve,partiallyEvaluatedTextSize:be,collisionGroup:Re}=w.parameters,Be=le.get(\"text-optional\"),tt=le.get(\"icon-optional\"),We=a.ar(le,\"text-overlap\",\"text-allow-overlap\"),it=We===\"always\",Dt=a.ar(le,\"icon-overlap\",\"icon-allow-overlap\"),Ht=Dt===\"always\",rr=le.get(\"text-rotation-alignment\")===\"map\",dr=le.get(\"text-pitch-alignment\")===\"map\",Sr=le.get(\"icon-text-fit\")!==\"none\",Or=le.get(\"symbol-z-order\")===\"viewport-y\",jr=it&&(Ht||!ee.hasIconData()||tt),ii=Ht&&(it||!ee.hasTextData()||Be);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Li=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),un=(sn,In,Kn)=>{var Aa,fa;if(B[sn.crossTileID])return;if(Pr)return void(this.placements[sn.crossTileID]=new Vn(!1,!1,!1));let $a=!1,ko=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Is={box:null,placeable:!1,offscreen:null},As=null,wo=null,To=null,dl=0,Ul=0,Lu=0;In.textFeatureIndex?dl=In.textFeatureIndex:sn.useRuntimeCollisionCircles&&(dl=sn.featureIndex),In.verticalTextFeatureIndex&&(Ul=In.verticalTextFeatureIndex);let au=In.textBox;if(au){let Al=Te=>{let Ne=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let He=this.prevPlacement.placedOrientations[sn.crossTileID];He&&(this.placedOrientations[sn.crossTileID]=He,Ne=He,this.markUsedOrientation(ee,Ne,sn))}return Ne},Sl=(Te,Ne)=>{if(ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&In.verticalTextBox){for(let He of ee.writingModes)if(He===a.ah.vertical?(Bo=Ne(),Is=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=sn.textAnchorOffsetStartIndex,se=sn.textAnchorOffsetEndIndex;if(se===X){let Te=(Ne,He)=>{let Ye=this.collisionIndex.placeCollisionBox(Ne,We,xr,ot,Tt,dr,rr,qe,Re.predicate,Li);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,He,sn),this.placedOrientations[sn.crossTileID]=He),Ye};Sl(()=>Te(au,a.ah.horizontal),()=>{let Ne=In.verticalTextBox;return ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Ne?Te(Ne,a.ah.vertical):{box:null,offscreen:null}}),Al(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[sn.crossTileID])===null||fa===void 0?void 0:fa.anchor],Ne=(Ye,Ct,nt)=>{let jt=Ye.x2-Ye.x1,gr=Ye.y2-Ye.y1,yr=sn.textBoxScale,Gr=Sr&&Dt===\"never\"?Ct:null,qr=null,_i=We===\"never\"?1:2,bi=\"never\";Te&&_i++;for(let Xr=0;Xr<_i;Xr++){for(let ni=X;ni<se;ni++){let gi=ee.textAnchorOffsets.get(ni);if(Te&&gi.textAnchor!==Te)continue;let Pi=this.attemptAnchorPlacement(gi,Ye,jt,gr,yr,rr,dr,xr,ot,Tt,Re,bi,sn,ee,nt,qe,Xe,Gr,Li);if(Pi&&(qr=Pi.placedGlyphBoxes,qr&&qr.placeable))return $a=!0,mo=Pi.shift,qr}Te?Te=null:bi=We}return Q&&!qr&&(qr={box:this.collisionIndex.placeCollisionBox(au,\"always\",xr,ot,Tt,dr,rr,qe,Re.predicate,Li,new a.P(0,0)).box,offscreen:!1,placeable:!1}),qr};Sl(()=>Ne(au,In.iconBox,a.ah.horizontal),()=>{let Ye=In.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&sn.numVerticalGlyphVertices>0&&Ye?Ne(Ye,In.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let He=Al(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[sn.crossTileID];Ye&&(this.variableOffsets[sn.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,sn,He))}}}if(As=Bo,$a=As&&As.placeable,Qa=As&&As.offscreen,sn.useRuntimeCollisionCircles){let Al=ee.text.placedSymbolArray.get(sn.centerJustifiedTextSymbolIndex),Sl=a.ai(ee.textSizeData,be,Al),X=le.get(\"text-padding\");wo=this.collisionIndex.placeCollisionCircles(We,Al,ee.lineVertexArray,ee.glyphOffsetArray,Sl,ot,Tt,Kt,Jt,Q,dr,Re.predicate,sn.collisionCircleDiameter,X,qe,Li),wo.circles.length&&wo.collisionDetected&&!Q&&a.w(\"Collisions detected, but collision boxes are not shown\"),$a=it||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(In.iconFeatureIndex&&(Lu=In.iconFeatureIndex),In.iconBox){let Al=Sl=>this.collisionIndex.placeCollisionBox(Sl,Dt,xr,ot,Tt,dr,rr,Xe,Re.predicate,Li,Sr&&mo?mo:void 0);Is&&Is.placeable&&In.verticalIconBox?(To=Al(In.verticalIconBox),ko=To.placeable):(To=Al(In.iconBox),ko=To.placeable),Qa=Qa&&To.offscreen}let $s=Be||sn.numHorizontalGlyphVertices===0&&sn.numVerticalGlyphVertices===0,Ql=tt||sn.numIconVertices===0;$s||Ql?Ql?$s||(ko=ko&&$a):$a=ko&&$a:ko=$a=ko&&$a;let dc=ko&&To.placeable;if($a&&As.placeable&&this.collisionIndex.insertCollisionBox(As.box,We,le.get(\"text-ignore-placement\"),ee.bucketInstanceId,Is&&Is.placeable&&Ul?Ul:dl,Re.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,Dt,le.get(\"icon-ignore-placement\"),ee.bucketInstanceId,Lu,Re.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,We,le.get(\"text-ignore-placement\"),ee.bucketInstanceId,dl,Re.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Kn,In,As,To,wo),sn.crossTileID===0)throw new Error(\"symbolInstance.crossTileID can't be 0\");if(ee.bucketInstanceId===0)throw new Error(\"bucket.bucketInstanceId can't be 0\");this.placements[sn.crossTileID]=new Vn($a||jr,ko||ii,Qa||ee.justReloaded),B[sn.crossTileID]=!0};if(Or){if(w.symbolInstanceStart!==0)throw new Error(\"bucket.bucketInstanceId should be 0\");let sn=ee.getSortedSymbolIndexes(this.transform.angle);for(let In=sn.length-1;In>=0;--In){let Kn=sn[In];un(ee.symbolInstances.get(Kn),ee.collisionArrays[Kn],Kn)}}else for(let sn=w.symbolInstanceStart;sn<w.symbolInstanceEnd;sn++)un(ee.symbolInstances.get(sn),ee.collisionArrays[sn],sn);if(Q&&ee.bucketInstanceId in this.collisionCircleArrays){let sn=this.collisionCircleArrays[ee.bucketInstanceId];a.as(sn.invProjMatrix,ot),sn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ee.justReloaded=!1}storeCollisionData(w,B,Q,ee,le,qe){if(Q.textBox||Q.iconBox){let Xe,ot;this.collisionBoxArrays.has(w)?Xe=this.collisionBoxArrays.get(w):(Xe=new Map,this.collisionBoxArrays.set(w,Xe)),Xe.has(B)?ot=Xe.get(B):(ot={text:null,icon:null},Xe.set(B,ot)),Q.textBox&&(ot.text=ee.box),Q.iconBox&&(ot.icon=le.box)}if(qe){let Xe=this.collisionCircleArrays[w];Xe===void 0&&(Xe=this.collisionCircleArrays[w]=new kn);for(let ot=0;ot<qe.circles.length;ot+=4)Xe.circles.push(qe.circles[ot+0]),Xe.circles.push(qe.circles[ot+1]),Xe.circles.push(qe.circles[ot+2]),Xe.circles.push(qe.collisionDetected?1:0)}}markUsedJustification(w,B,Q,ee){let le;le=ee===a.ah.vertical?Q.verticalPlacedTextSymbolIndex:{left:Q.leftJustifiedTextSymbolIndex,center:Q.centerJustifiedTextSymbolIndex,right:Q.rightJustifiedTextSymbolIndex}[a.at(B)];let qe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex,Q.verticalPlacedTextSymbolIndex];for(let Xe of qe)Xe>=0&&(w.text.placedSymbolArray.get(Xe).crossTileID=le>=0&&Xe!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,qe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Xe of qe)w.text.placedSymbolArray.get(Xe).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},qe=B?B.variableOffsets:{},Xe=B?B.placedOrientations:{};for(let ot in this.placements){let Tt=this.placements[ot],Kt=le[ot];Kt?(this.opacities[ot]=new pn(Kt,ee,Tt.text,Tt.icon),Q=Q||Tt.text!==Kt.text.placed||Tt.icon!==Kt.icon.placed):(this.opacities[ot]=new pn(null,ee,Tt.text,Tt.icon,Tt.skipFade),Q=Q||Tt.text||Tt.icon)}for(let ot in le){let Tt=le[ot];if(!this.opacities[ot]){let Kt=new pn(Tt,ee,!1,!1);Kt.isHidden()||(this.opacities[ot]=Kt,Q=Q||Tt.text.placed||Tt.icon.placed)}}for(let ot in qe)this.variableOffsets[ot]||!this.opacities[ot]||this.opacities[ot].isHidden()||(this.variableOffsets[ot]=qe[ot]);for(let ot in Xe)this.placedOrientations[ot]||!this.opacities[ot]||this.opacities[ot].isHidden()||(this.placedOrientations[ot]=Xe[ot]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error(\"Last placement time for previous placement is not defined\");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!=\"number\"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],qe=le.layout,Xe=new pn(null,0,!1,!1,!0),ot=qe.get(\"text-allow-overlap\"),Tt=qe.get(\"icon-allow-overlap\"),Kt=le._unevaluatedLayout.hasValue(\"text-variable-anchor\")||le._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"),Jt=qe.get(\"text-rotation-alignment\")===\"map\",xr=qe.get(\"text-pitch-alignment\")===\"map\",Pr=qe.get(\"icon-text-fit\")!==\"none\",ve=new pn(null,0,ot&&(Tt||!w.hasIconData()||qe.get(\"icon-optional\")),Tt&&(ot||!w.hasTextData()||qe.get(\"text-optional\")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(Be,tt,We)=>{for(let it=0;it<tt/4;it++)Be.opacityVertexArray.emplaceBack(We);Be.hasVisibleVertices=Be.hasVisibleVertices||We!==cn},Re=this.collisionBoxArrays.get(w.bucketInstanceId);for(let Be=0;Be<w.symbolInstances.length;Be++){let tt=w.symbolInstances.get(Be),{numHorizontalGlyphVertices:We,numVerticalGlyphVertices:it,crossTileID:Dt}=tt,Ht=this.opacities[Dt];Q[Dt]?Ht=Xe:Ht||(Ht=ve,this.opacities[Dt]=Ht),Q[Dt]=!0;let rr=tt.numIconVertices>0,dr=this.placedOrientations[tt.crossTileID],Sr=dr===a.ah.vertical,Or=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(We>0||it>0){let ii=en(Ht.text);be(w.text,We,Sr?cn:ii),be(w.text,it,Or?cn:ii);let Li=Ht.text.isHidden();[tt.rightJustifiedTextSymbolIndex,tt.centerJustifiedTextSymbolIndex,tt.leftJustifiedTextSymbolIndex].forEach(In=>{In>=0&&(w.text.placedSymbolArray.get(In).hidden=Li||Sr?1:0)}),tt.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(tt.verticalPlacedTextSymbolIndex).hidden=Li||Or?1:0);let un=this.variableOffsets[tt.crossTileID];un&&this.markUsedJustification(w,un.anchor,tt,dr);let sn=this.placedOrientations[tt.crossTileID];sn&&(this.markUsedJustification(w,\"left\",tt,sn),this.markUsedOrientation(w,sn,tt))}if(rr){let ii=en(Ht.icon),Li=!(Pr&&tt.verticalPlacedIconSymbolIndex&&Sr);tt.placedIconSymbolIndex>=0&&(be(w.icon,tt.numIconVertices,Li?ii:cn),w.icon.placedSymbolArray.get(tt.placedIconSymbolIndex).hidden=Ht.icon.isHidden()),tt.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,tt.numVerticalIconVertices,Li?cn:ii),w.icon.placedSymbolArray.get(tt.verticalPlacedIconSymbolIndex).hidden=Ht.icon.isHidden())}let jr=Re&&Re.has(Be)?Re.get(Be):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ii=w.collisionArrays[Be];if(ii){let Li=new a.P(0,0);if(ii.textBox||ii.verticalTextBox){let un=!0;if(Kt){let sn=this.variableOffsets[Dt];sn?(Li=Vt(sn.anchor,sn.width,sn.height,sn.textOffset,sn.textBoxScale),Jt&&Li._rotate(xr?this.transform.angle:-this.transform.angle)):un=!1}if(ii.textBox||ii.verticalTextBox){let sn;ii.textBox&&(sn=Sr),ii.verticalTextBox&&(sn=Or),tr(w.textCollisionBox.collisionVertexArray,Ht.text.placed,!un||sn,jr.text,Li.x,Li.y)}}if(ii.iconBox||ii.verticalIconBox){let un=!!(!Or&&ii.verticalIconBox),sn;ii.iconBox&&(sn=un),ii.verticalIconBox&&(sn=!un),tr(w.iconCollisionBox.collisionVertexArray,Ht.icon.placed,sn,jr.icon,Pr?Li.x:0,Pr?Li.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let Be=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Be.invProjMatrix,w.placementViewportMatrix=Be.viewportMatrix,w.collisionCircleArray=Be.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(w,B){let Q=this.zoomAtLastRecencyCheck===B?1-this.zoomAdjustment(B):1;return this.zoomAtLastRecencyCheck=B,this.commitTime+this.fadeDuration*Q>w}setStale(){this.stale=!0}}function tr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let qe=Q[0]-fi,Xe=Q[1]-fi,ot=Q[2]-fi,Tt=Q[3]-fi;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,qe,Xe),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ot,Xe),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ot,Tt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,qe,Tt)}let ar=Math.pow(2,25),Er=Math.pow(2,24),Zr=Math.pow(2,17),ri=Math.pow(2,16),$r=Math.pow(2,9),zi=Math.pow(2,8),Ji=Math.pow(2,1);function en(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*ar+w*Er+B*Zr+w*ri+B*$r+w*zi+B*Ji+w}let cn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error(\"Not implemented.\")},translatePosition:(ue,w,B,Q)=>function(ee,le,qe,Xe,ot=!1){if(!qe[0]&&!qe[1])return[0,0];let Tt=ot?Xe===\"map\"?ee.angle:0:Xe===\"viewport\"?-ee.angle:0;if(Tt){let Kt=Math.sin(Tt),Jt=Math.cos(Tt);qe=[qe[0]*Jt-qe[1]*Kt,qe[0]*Kt+qe[1]*Jt]}return[ot?qe[0]:Pn(le,qe[0],ee.zoom),ot?qe[1]:Pn(le,qe[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Mn{constructor(w){this._sortAcrossTiles=w.layout.get(\"symbol-z-order\")!==\"viewport-y\"&&!w.layout.get(\"symbol-sort-key\").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let qe=this._bucketParts;for(;this._currentTileIndex<w.length;)if(B.getBucketParts(qe,ee,w[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,le())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,qe.sort((Xe,ot)=>Xe.sortKey-ot.sortKey));this._currentPartIndex<qe.length;)if(B.placeLayerBucketPart(qe[this._currentPartIndex],this._seenCrossTileIDs,Q),this._currentPartIndex++,le())return!0;return!1}}class Ba{constructor(w,B,Q,ee,le,qe,Xe,ot){this.placement=new _t(w,yn(),B,qe,Xe,ot),this._currentPlacementIndex=Q.length-1,this._forceFullPlacement=ee,this._showCollisionBoxes=le,this._done=!1}isDone(){return this._done}continuePlacement(w,B,Q){let ee=u.now(),le=()=>!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let qe=B[w[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(qe.type===\"symbol\"&&(!qe.minzoom||qe.minzoom<=Xe)&&(!qe.maxzoom||qe.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new Mn(qe)),this._inProgressLayer.continuePlacement(Q[qe.source],this.placement,this._showCollisionBoxes,qe,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let la=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le<B.length;le++){let qe=B.get(le),Xe=qe.key,ot=ee.get(Xe);ot?ot.push(qe):ee.set(Xe,[qe])}for(let[le,qe]of ee){let Xe={positions:qe.map(ot=>({x:Math.floor(ot.anchorX*la),y:Math.floor(ot.anchorY*la)})),crossTileIDs:qe.map(ot=>ot.crossTileID)};if(Xe.positions.length>128){let ot=new a.av(Xe.positions.length,16,Uint16Array);for(let{x:Tt,y:Kt}of Xe.positions)ot.add(Tt,Kt);ot.finish(),delete Xe.positions,Xe.index=ot}this._symbolsByKey[le]=Xe}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:qe,y:Xe,z:ot}=B.canonical,Tt=la/Math.pow(2,ot-le),Kt=(Xe*a.X+w.anchorY)*Tt,Jt=ee*a.X*la;return{x:Math.floor((qe*a.X+w.anchorX)*Tt-Q*a.X*la),y:Math.floor(Kt-Jt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.z<B.canonical.z?1:Math.pow(2,this.tileID.canonical.z-B.canonical.z);for(let le=0;le<w.length;le++){let qe=w.get(le);if(qe.crossTileID)continue;let Xe=this._symbolsByKey[qe.key];if(!Xe)continue;let ot=this.getScaledCoordinates(qe,B);if(Xe.index){let Tt=Xe.index.range(ot.x-ee,ot.y-ee,ot.x+ee,ot.y+ee).sort();for(let Kt of Tt){let Jt=Xe.crossTileIDs[Kt];if(!Q[Jt]){Q[Jt]=!0,qe.crossTileID=Jt;break}}}else if(Xe.positions)for(let Tt=0;Tt<Xe.positions.length;Tt++){let Kt=Xe.positions[Tt],Jt=Xe.crossTileIDs[Tt];if(Math.abs(Kt.x-ot.x)<=ee&&Math.abs(Kt.y-ot.y)<=ee&&!Q[Jt]){Q[Jt]=!0,qe.crossTileID=Jt;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:w})=>w)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let qe in ee){let Xe=ee[qe];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+B),le[Xe.tileID.key]=Xe}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;le<B.symbolInstances.length;le++)B.symbolInstances.get(le).crossTileID=0;this.usedCrossTileIDs[w.overscaledZ]||(this.usedCrossTileIDs[w.overscaledZ]={});let ee=this.usedCrossTileIDs[w.overscaledZ];for(let le in this.indexes){let qe=this.indexes[le];if(Number(le)>w.overscaledZ)for(let Xe in qe){let ot=qe[Xe];ot.tileID.isChildOf(w)&&ot.findMatches(B.symbolInstances,w,ee)}else{let Xe=qe[w.scaledTo(Number(le)).key];Xe&&Xe.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le<B.symbolInstances.length;le++){let qe=B.symbolInstances.get(le);qe.crossTileID||(qe.crossTileID=Q.generate(),ee[qe.crossTileID]=!0)}return this.indexes[w.overscaledZ]===void 0&&(this.indexes[w.overscaledZ]={}),this.indexes[w.overscaledZ][w.key]=new ma(w,B.symbolInstances,B.bucketInstanceId),!0}removeBucketCrossTileIDs(w,B){for(let Q of B.getCrossTileIDsLists())for(let ee of Q)delete this.usedCrossTileIDs[w][ee]}removeStaleBuckets(w){let B=!1;for(let Q in this.indexes){let ee=this.indexes[Q];for(let le in ee)w[ee[le].bucketInstanceId]||(this.removeBucketCrossTileIDs(Q,ee[le]),delete ee[le],B=!0)}return B}}class Wo{constructor(){this.layerIndexes={},this.crossTileIDs=new Wa,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(w,B,Q){let ee=this.layerIndexes[w.id];ee===void 0&&(ee=this.layerIndexes[w.id]=new Fa);let le=!1,qe={};ee.handleWrapJump(Q);for(let Xe of B){let ot=Xe.getBucket(w);ot&&w.id===ot.layerIds[0]&&(ot.bucketInstanceId||(ot.bucketInstanceId=++this.maxBucketInstanceId),ee.addBucket(Xe.tileID,ot,this.crossTileIDs)&&(le=!0),qe[ot.bucketInstanceId]=!0)}return ee.removeStaleBuckets(qe)&&(le=!0),le}pruneUnusedLayers(w){let B={};w.forEach(Q=>{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!==\"source.canvas\")),Wn=a.aw();class Ga extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!==\"vector\"&&ee!==\"geojson\"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Le(Se(),w._getMapId()),this.dispatcher.registerMessageHandler(\"GG\",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler(\"GI\",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Wo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast(\"SR\",a.ay()),er().on(ur,this._rtlPluginLoaded),this.on(\"data\",Q=>{if(Q.dataType!==\"source\"||Q.sourceDataType!==\"metadata\")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let qe in this._layers){let Xe=this._layers[qe];Xe.source===le.id&&this._validateLayer(Xe)}})}loadURL(w,B={},Q){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),B.validate=typeof B.validate!=\"boolean\"||B.validate;let ee=this.map._requestManager.transformRequest(w,\"Style\");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(qe=>{this._loadStyleRequest=null,this._load(qe.data,B,Q)}).catch(qe=>{this._loadStyleRequest=null,qe&&!le.signal.aborted&&this.fire(new a.j(qe))})}loadJSON(w,B={},Q){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),this._load(Wn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let qe in le.sources)this.addSource(qe,le.sources[qe],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k(\"data\",{dataType:\"style\"})),this.fire(new a.k(\"style.load\"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast(\"SL\",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,qe,Xe,ot){return a._(this,void 0,void 0,function*(){let Tt=k(le),Kt=Xe>1?\"@2x\":\"\",Jt={},xr={};for(let{id:Pr,url:ve}of Tt){let be=qe.transformRequest(M(ve,Kt,\".json\"),\"SpriteJSON\");Jt[Pr]=a.h(be,ot);let Re=qe.transformRequest(M(ve,Kt,\".png\"),\"SpriteImage\");xr[Pr]=p.getImage(Re,ot)}return yield Promise.all([...Object.values(Jt),...Object.values(xr)]),function(Pr,ve){return a._(this,void 0,void 0,function*(){let be={};for(let Re in Pr){be[Re]={};let Be=u.getImageCanvasContext((yield ve[Re]).data),tt=(yield Pr[Re]).data;for(let We in tt){let{width:it,height:Dt,x:Ht,y:rr,sdf:dr,pixelRatio:Sr,stretchX:Or,stretchY:jr,content:ii,textFitWidth:Li,textFitHeight:un}=tt[We];be[Re][We]={data:null,pixelRatio:Sr,sdf:dr,stretchX:Or,stretchY:jr,content:ii,textFitWidth:Li,textFitHeight:un,spriteData:{width:it,height:Dt,x:Ht,y:rr,context:Be}}}}return be})}(Jt,xr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let qe in le){this._spritesImagesIds[qe]=[];let Xe=this._spritesImagesIds[qe]?this._spritesImagesIds[qe].filter(ot=>!(ot in le)):[];for(let ot of Xe)this.imageManager.removeImage(ot),this._changedImages[ot]=!0;for(let ot in le[qe]){let Tt=qe===\"default\"?ot:`${qe}:${ot}`;this._spritesImagesIds[qe].push(Tt),Tt in this.imageManager.images?this.imageManager.updateImage(Tt,le[qe][ot],!1):this.imageManager.addImage(Tt,le[qe][ot]),B&&(this._changedImages[Tt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type===\"geojson\"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer \"${Q}\" does not exist on source \"${ee.id}\" as specified by style layer \"${w.id}\".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let qe=B?a.aB(Q[le]):Q[le];ee.push(qe)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!==\"custom\"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error(\"Style is not done loading.\")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let qe in this._updatedSources){let Xe=this._updatedSources[qe];if(Xe===\"reload\")this._reloadSource(qe);else{if(Xe!==\"clear\")throw new Error(`Invalid action ${Xe}`);this._clearSource(qe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let qe in this._updatedPaintProps)this._layers[qe].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k(\"data\",{sourceDataType:\"visibility\",dataType:\"source\",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k(\"data\",{dataType:\"style\"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies([\"icons\",\"patterns\"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies([\"glyphs\"],[\"\"]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast(\"UL\",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),qe=this._getOperationsToPerform(le);if(qe.unimplemented.length>0)throw new Error(`Unimplemented: ${qe.unimplemented.join(\", \")}.`);if(qe.operations.length===0)return!1;for(let Xe of qe.operations)Xe();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case\"setCenter\":case\"setZoom\":case\"setBearing\":case\"setPitch\":continue;case\"addLayer\":B.push(()=>this.addLayer.apply(this,ee.args));break;case\"removeLayer\":B.push(()=>this.removeLayer.apply(this,ee.args));break;case\"setPaintProperty\":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case\"setLayoutProperty\":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case\"setFilter\":B.push(()=>this.setFilter.apply(this,ee.args));break;case\"addSource\":B.push(()=>this.addSource.apply(this,ee.args));break;case\"removeSource\":B.push(()=>this.removeSource.apply(this,ee.args));break;case\"setLayerZoomRange\":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case\"setLight\":B.push(()=>this.setLight.apply(this,ee.args));break;case\"setGeoJSONSourceData\":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case\"setGlyphs\":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case\"setSprite\":B.push(()=>this.setSprite.apply(this,ee.args));break;case\"setSky\":B.push(()=>this.setSky.apply(this,ee.args));break;case\"setTerrain\":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case\"setTransition\":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named \"${w}\" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named \"${w}\" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source \"${w}\" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(\", \")}.`);if([\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new yt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(\"There is no source with this ID\");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source \"${w}\" cannot be removed while layer \"${Q}\" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!==\"geojson\")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer \"${ee}\" already exists on this map.`)));let le;if(w.type===\"custom\"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if(\"source\"in w&&typeof w.source==\"object\"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let qe=B?this._order.indexOf(B):this._order.length;if(B&&qe===-1)this.fire(new a.j(new Error(`Cannot add layer \"${ee}\" before non-existing layer \"${B}\".`)));else{if(this._order.splice(qe,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!==\"custom\"){let Xe=this._removedLayers[ee];delete this._removedLayers[ee],Xe.type!==le.type?this._updatedSources[le.source]=\"clear\":(this._updatedSources[le.source]=\"reload\",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer \"${w}\" before non-existing layer \"${B}\".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer \"${w}\".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer \"${w}\".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer \"${w}\".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer \"${w}\".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer \"${w}\".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer \"${w}\".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let qe=le.getSource().type;qe===\"geojson\"&&ee?this.fire(new a.j(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):qe!==\"vector\"||ee?(w.id===void 0&&this.fire(new a.j(new Error(\"The feature id parameter must be provided.\"))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,qe=le===\"vector\"?w.sourceLayer:void 0;le!==\"vector\"||qe?B&&typeof w.id!=\"string\"&&typeof w.id!=\"number\"?this.fire(new a.j(new Error(\"A feature id is required to remove its specific state property.\"))):ee.removeFeatureState(qe,w.id,B):this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!==\"vector\"||Q?(w.id===void 0&&this.fire(new a.j(new Error(\"The feature id parameter must be provided.\"))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!==\"raster\"&&(this._updatedSources[w.source]=\"reload\",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=qe=>this._layers[qe].type===\"fill-extrusion\",Q={},ee=[];for(let qe=this._order.length-1;qe>=0;qe--){let Xe=this._order[qe];if(B(Xe)){Q[Xe]=qe;for(let ot of w){let Tt=ot[Xe];if(Tt)for(let Kt of Tt)ee.push(Kt)}}}ee.sort((qe,Xe)=>Xe.intersectionZ-qe.intersectionZ);let le=[];for(let qe=this._order.length-1;qe>=0;qe--){let Xe=this._order[qe];if(B(Xe))for(let ot=ee.length-1;ot>=0;ot--){let Tt=ee[ot].feature;if(Q[Tt.layer.id]<qe)break;le.push(Tt),ee.pop()}else for(let ot of w){let Tt=ot[Xe];if(Tt)for(let Kt of Tt)le.push(Kt.feature)}}return le}queryRenderedFeatures(w,B,Q){B&&B.filter&&this._validate(a.u.filter,\"queryRenderedFeatures.filter\",B.filter,null,B);let ee={};if(B&&B.layers){if(!Array.isArray(B.layers))return this.fire(new a.j(new Error(\"parameters.layers must be an Array.\"))),[];for(let Xe of B.layers){let ot=this._layers[Xe];if(!ot)return this.fire(new a.j(new Error(`The layer '${Xe}' does not exist in the map's style and cannot be queried for features.`))),[];ee[ot.source]=!0}}let le=[];B.availableImages=this._availableImages;let qe=this._serializedAllLayers();for(let Xe in this.sourceCaches)B.layers&&!ee[Xe]||le.push(Pe(this.sourceCaches[Xe],this._layers,qe,w,B,Q));return this.placement&&le.push(function(Xe,ot,Tt,Kt,Jt,xr,Pr){let ve={},be=xr.queryRenderedSymbols(Kt),Re=[];for(let Be of Object.keys(be).map(Number))Re.push(Pr[Be]);Re.sort(ge);for(let Be of Re){let tt=Be.featureIndex.lookupSymbolFeatures(be[Be.bucketInstanceId],ot,Be.bucketIndex,Be.sourceLayerIndex,Jt.filter,Jt.layers,Jt.availableImages,Xe);for(let We in tt){let it=ve[We]=ve[We]||[],Dt=tt[We];Dt.sort((Ht,rr)=>{let dr=Be.featureSortOrder;if(dr){let Sr=dr.indexOf(Ht.featureIndex);return dr.indexOf(rr.featureIndex)-Sr}return rr.featureIndex-Ht.featureIndex});for(let Ht of Dt)it.push(Ht)}}for(let Be in ve)ve[Be].forEach(tt=>{let We=tt.feature,it=Tt[Xe[Be].source].getFeatureState(We.layer[\"source-layer\"],We.id);We.source=We.layer.source,We.layer[\"source-layer\"]&&(We.sourceLayer=We.layer[\"source-layer\"]),We.state=it});return ve}(this._layers,qe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,\"querySourceFeatures.filter\",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let qe=ee.getRenderableIds().map(Tt=>ee.getTileByID(Tt)),Xe=[],ot={};for(let Tt=0;Tt<qe.length;Tt++){let Kt=qe[Tt],Jt=Kt.tileID.canonical.key;ot[Jt]||(ot[Jt]=!0,Kt.querySourceFeatures(Xe,le))}return Xe}(Q,B):[]}getLight(){return this.light.getLight()}setLight(w,B={}){this._checkLoaded();let Q=this.light.getLight(),ee=!1;for(let qe in w)if(!a.aE(w[qe],Q[qe])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(w,B),this.light.updateTransitions(le)}getSky(){var w;return(w=this.stylesheet)===null||w===void 0?void 0:w.sky}setSky(w,B={}){let Q=this.getSky(),ee=!1;if(!w&&!Q)return;if(w&&!Q)ee=!0;else if(!w&&Q)ee=!0;else for(let qe in w)if(!a.aE(w[qe],Q[qe])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=w,this.sky.setSky(w,B),this.sky.updateTransitions(le)}_validate(w,B,Q,ee,le={}){return(!le||le.validate!==!1)&&da(this,w.call(a.u,a.e({key:B,style:this.serialize(),value:Q,styleSpec:a.v},ee)))}_remove(w=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),er().off(ur,this._rtlPluginLoaded);for(let B in this._layers)this._layers[B].setEventedParent(null);for(let B in this.sourceCaches){let Q=this.sourceCaches[B];Q.setEventedParent(null),Q.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),w&&this.dispatcher.broadcast(\"RM\",void 0),this.dispatcher.remove(w)}_clearSource(w){this.sourceCaches[w].clearTiles()}_reloadSource(w){this.sourceCaches[w].resume(),this.sourceCaches[w].reload()}_updateSources(w){for(let B in this.sourceCaches)this.sourceCaches[B].update(w,this.map.terrain)}_generateCollisionBoxes(){for(let w in this.sourceCaches)this._reloadSource(w)}_updatePlacement(w,B,Q,ee,le=!1){let qe=!1,Xe=!1,ot={};for(let Tt of this._order){let Kt=this._layers[Tt];if(Kt.type!==\"symbol\")continue;if(!ot[Kt.source]){let xr=this.sourceCaches[Kt.source];ot[Kt.source]=xr.getRenderableIds(!0).map(Pr=>xr.getTileByID(Pr)).sort((Pr,ve)=>ve.tileID.overscaledZ-Pr.tileID.overscaledZ||(Pr.tileID.isLessThan(ve.tileID)?-1:1))}let Jt=this.crossTileSymbolIndex.addLayer(Kt,ot[Kt.source],w.center.lng);qe=qe||Jt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Xe=!0),qe&&this.pauseablePlacement.placement.setStale()),Xe||qe)for(let Tt of this._order){let Kt=this._layers[Tt];Kt.type===\"symbol\"&&this.placement.updateLayerOpacities(Kt,ot[Kt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[\"\"]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,\"glyphs\",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],qe=[...k(this.stylesheet.sprite),...le];this._validate(a.u.sprite,\"sprite\",qe,null,Q)||(this.stylesheet.sprite=qe,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=k(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}else this.fire(new a.j(new Error(`Sprite \"${w}\" doesn't exists on this map.`)))}getSprite(){return k(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,\"sprite\",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:\"a_pos\",type:\"Int16\",components:2}]);let jn={prelude:St(`#ifdef GL_ES\n",
       "precision mediump float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "`,`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n",
       ");}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n",
       "#ifdef TERRAIN3D\n",
       "uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n",
       "#endif\n",
       "const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n",
       "#ifdef TERRAIN3D\n",
       "highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n",
       "#else\n",
       "return 1.0;\n",
       "#endif\n",
       "}float calculate_visibility(vec4 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n",
       "#else\n",
       "return 1.0;\n",
       "#endif\n",
       "}float ele(vec2 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n",
       "#else\n",
       "return 0.0;\n",
       "#endif\n",
       "}float get_elevation(vec2 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n",
       "#else\n",
       "return 0.0;\n",
       "#endif\n",
       "}`),background:St(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),backgroundPattern:St(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}\"),circle:St(`varying vec3 v_data;varying float v_visibility;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define mediump float radius\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define highp vec4 stroke_color\n",
       "#pragma mapbox: define mediump float stroke_width\n",
       "#pragma mapbox: define lowp float stroke_opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize highp vec4 stroke_color\n",
       "#pragma mapbox: initialize mediump float stroke_width\n",
       "#pragma mapbox: initialize lowp float stroke_opacity\n",
       "vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define mediump float radius\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define highp vec4 stroke_color\n",
       "#pragma mapbox: define mediump float stroke_width\n",
       "#pragma mapbox: define lowp float stroke_opacity\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize highp vec4 stroke_color\n",
       "#pragma mapbox: initialize mediump float stroke_width\n",
       "#pragma mapbox: initialize lowp float stroke_opacity\n",
       "vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:St(\"void main() {gl_FragColor=vec4(1.0);}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),heatmap:St(`uniform highp float u_intensity;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#pragma mapbox: define mediump float radius\n",
       "const highp float ZERO=1.0/255.0/16.0;\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:St(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(0.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\"),collisionBox:St(\"varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),collisionCircle:St(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),debug:St(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}\"),fill:St(`#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_FragColor=color*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec2 a_pos;uniform mat4 u_matrix;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:St(`varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:St(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:St(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:St(`varying vec4 v_color;void main() {gl_FragColor=v_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n",
       "#ifdef TERRAIN3D\n",
       "attribute vec2 a_centroid;\n",
       "#endif\n",
       "varying vec4 v_color;\n",
       "#pragma mapbox: define highp float base\n",
       "#pragma mapbox: define highp float height\n",
       "#pragma mapbox: define highp vec4 color\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float base\n",
       "#pragma mapbox: initialize highp float height\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "vec3 normal=a_normal_ed.xyz;\n",
       "#ifdef TERRAIN3D\n",
       "float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n",
       "#else\n",
       "float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n",
       "#endif\n",
       "base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:St(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n",
       "#ifdef TERRAIN3D\n",
       "attribute vec2 a_centroid;\n",
       "#endif\n",
       "varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n",
       "#ifdef TERRAIN3D\n",
       "float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n",
       "#else\n",
       "float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n",
       "#endif\n",
       "base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n",
       "? a_pos\n",
       ": vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:St(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),hillshade:St(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n",
       "#define PI 3.141592653589793\n",
       "void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),line:St(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_width2=vec2(outset,inset);}`),lineGradient:St(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_width2=vec2(outset,inset);}`),linePattern:St(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:St(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define mediump float gapwidth\n",
       "#pragma mapbox: define lowp float offset\n",
       "#pragma mapbox: define mediump float width\n",
       "#pragma mapbox: define lowp float floorwidth\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump float gapwidth\n",
       "#pragma mapbox: initialize lowp float offset\n",
       "#pragma mapbox: initialize mediump float width\n",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:St(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),symbolIcon:St(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:St(`#define SDF_PX 8.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:St(`#define SDF_PX 8.0\n",
       "#define SDF 1.0\n",
       "#define ICON 0.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n",
       "#pragma mapbox: define highp vec4 fill_color\n",
       "#pragma mapbox: define highp vec4 halo_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp float halo_width\n",
       "#pragma mapbox: define lowp float halo_blur\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 fill_color\n",
       "#pragma mapbox: initialize highp vec4 halo_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize lowp float halo_width\n",
       "#pragma mapbox: initialize lowp float halo_blur\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\n",
       "camera_to_anchor_distance/u_camera_to_center_distance :\n",
       "u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:St(\"uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}\"),terrainDepth:St(\"varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}\"),terrainCoords:St(\"precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}\"),sky:St(\"uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}\",\"attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}\")};function St(ue,w){let B=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,Q=w.match(/attribute ([\\w]+) ([\\w]+)/g),ee=ue.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),le=w.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),qe=le?le.concat(ee):ee,Xe={};return{fragmentSource:ue=ue.replace(B,(ot,Tt,Kt,Jt,xr)=>(Xe[xr]=!0,Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "varying ${Kt} ${Jt} ${xr};\n",
       "#else\n",
       "uniform ${Kt} ${Jt} u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifdef HAS_UNIFORM_u_${xr}\n",
       "    ${Kt} ${Jt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`)),vertexSource:w=w.replace(B,(ot,Tt,Kt,Jt,xr)=>{let Pr=Jt===\"float\"?\"vec2\":\"vec4\",ve=xr.match(/color/)?\"color\":Pr;return Xe[xr]?Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "uniform lowp float u_${xr}_t;\n",
       "attribute ${Kt} ${Pr} a_${xr};\n",
       "varying ${Kt} ${Jt} ${xr};\n",
       "#else\n",
       "uniform ${Kt} ${Jt} u_${xr};\n",
       "#endif\n",
       "`:ve===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${xr} = a_${xr};\n",
       "#else\n",
       "    ${Kt} ${Jt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t);\n",
       "#else\n",
       "    ${Kt} ${Jt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "uniform lowp float u_${xr}_t;\n",
       "attribute ${Kt} ${Pr} a_${xr};\n",
       "#else\n",
       "uniform ${Kt} ${Jt} u_${xr};\n",
       "#endif\n",
       "`:ve===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${Kt} ${Jt} ${xr} = a_${xr};\n",
       "#else\n",
       "    ${Kt} ${Jt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${Kt} ${Jt} ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t);\n",
       "#else\n",
       "    ${Kt} ${Jt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`}),staticAttributes:Q,staticUniforms:qe}}class Cr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,qe,Xe,ot,Tt){this.context=w;let Kt=this.boundPaintVertexBuffers.length!==ee.length;for(let Jt=0;!Kt&&Jt<ee.length;Jt++)this.boundPaintVertexBuffers[Jt]!==ee[Jt]&&(Kt=!0);!this.vao||this.boundProgram!==B||this.boundLayoutVertexBuffer!==Q||Kt||this.boundIndexBuffer!==le||this.boundVertexOffset!==qe||this.boundDynamicVertexBuffer!==Xe||this.boundDynamicVertexBuffer2!==ot||this.boundDynamicVertexBuffer3!==Tt?this.freshBind(B,Q,ee,le,qe,Xe,ot,Tt):(w.bindVertexArray.set(this.vao),Xe&&Xe.bind(),le&&le.dynamicDraw&&le.bind(),ot&&ot.bind(),Tt&&Tt.bind())}freshBind(w,B,Q,ee,le,qe,Xe,ot){let Tt=w.numAttributes,Kt=this.context,Jt=Kt.gl;this.vao&&this.destroy(),this.vao=Kt.createVertexArray(),Kt.bindVertexArray.set(this.vao),this.boundProgram=w,this.boundLayoutVertexBuffer=B,this.boundPaintVertexBuffers=Q,this.boundIndexBuffer=ee,this.boundVertexOffset=le,this.boundDynamicVertexBuffer=qe,this.boundDynamicVertexBuffer2=Xe,this.boundDynamicVertexBuffer3=ot,B.enableAttributes(Jt,w);for(let xr of Q)xr.enableAttributes(Jt,w);qe&&qe.enableAttributes(Jt,w),Xe&&Xe.enableAttributes(Jt,w),ot&&ot.enableAttributes(Jt,w),B.bind(),B.setVertexAttribPointers(Jt,w,le);for(let xr of Q)xr.bind(),xr.setVertexAttribPointers(Jt,w,le);qe&&(qe.bind(),qe.setVertexAttribPointers(Jt,w,le)),ee&&ee.bind(),Xe&&(Xe.bind(),Xe.setVertexAttribPointers(Jt,w,le)),ot&&(ot.bind(),ot.setVertexAttribPointers(Jt,w,le)),Kt.currentNumAttributes=Tt}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let Qr=(ue,w,B,Q,ee)=>({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get(\"fog-color\"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get(\"fog-ground-blend\"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get(\"horizon-color\"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get(\"horizon-fog-blend\"):1});function pi(ue){let w=[];for(let B=0;B<ue.length;B++){if(ue[B]===null)continue;let Q=ue[B].split(\" \");w.push(Q.pop())}return w}class fn{constructor(w,B,Q,ee,le,qe){let Xe=w.gl;this.program=Xe.createProgram();let ot=pi(B.staticAttributes),Tt=Q?Q.getBinderAttributes():[],Kt=ot.concat(Tt),Jt=jn.prelude.staticUniforms?pi(jn.prelude.staticUniforms):[],xr=B.staticUniforms?pi(B.staticUniforms):[],Pr=Q?Q.getBinderUniforms():[],ve=Jt.concat(xr).concat(Pr),be=[];for(let Ht of ve)be.indexOf(Ht)<0&&be.push(Ht);let Re=Q?Q.defines():[];le&&Re.push(\"#define OVERDRAW_INSPECTOR;\"),qe&&Re.push(\"#define TERRAIN3D;\");let Be=Re.concat(jn.prelude.fragmentSource,B.fragmentSource).join(`\n",
       "`),tt=Re.concat(jn.prelude.vertexSource,B.vertexSource).join(`\n",
       "`),We=Xe.createShader(Xe.FRAGMENT_SHADER);if(Xe.isContextLost())return void(this.failedToCreate=!0);if(Xe.shaderSource(We,Be),Xe.compileShader(We),!Xe.getShaderParameter(We,Xe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Xe.getShaderInfoLog(We)}`);Xe.attachShader(this.program,We);let it=Xe.createShader(Xe.VERTEX_SHADER);if(Xe.isContextLost())return void(this.failedToCreate=!0);if(Xe.shaderSource(it,tt),Xe.compileShader(it),!Xe.getShaderParameter(it,Xe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Xe.getShaderInfoLog(it)}`);Xe.attachShader(this.program,it),this.attributes={};let Dt={};this.numAttributes=Kt.length;for(let Ht=0;Ht<this.numAttributes;Ht++)Kt[Ht]&&(Xe.bindAttribLocation(this.program,Ht,Kt[Ht]),this.attributes[Kt[Ht]]=Ht);if(Xe.linkProgram(this.program),!Xe.getProgramParameter(this.program,Xe.LINK_STATUS))throw new Error(`Program failed to link: ${Xe.getProgramInfoLog(this.program)}`);Xe.deleteShader(it),Xe.deleteShader(We);for(let Ht=0;Ht<be.length;Ht++){let rr=be[Ht];if(rr&&!Dt[rr]){let dr=Xe.getUniformLocation(this.program,rr);dr&&(Dt[rr]=dr)}}this.fixedUniforms=ee(w,Dt),this.terrainUniforms=((Ht,rr)=>({u_depth:new a.aH(Ht,rr.u_depth),u_terrain:new a.aH(Ht,rr.u_terrain),u_terrain_dim:new a.aI(Ht,rr.u_terrain_dim),u_terrain_matrix:new a.aJ(Ht,rr.u_terrain_matrix),u_terrain_unpack:new a.aK(Ht,rr.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Ht,rr.u_terrain_exaggeration)}))(w,Dt),this.binderUniforms=Q?Q.getUniforms(w,Dt):[]}draw(w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr,ve,be,Re,Be,tt){let We=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(qe),ot){w.activeTexture.set(We.TEXTURE2),We.bindTexture(We.TEXTURE_2D,ot.depthTexture),w.activeTexture.set(We.TEXTURE3),We.bindTexture(We.TEXTURE_2D,ot.texture);for(let Dt in this.terrainUniforms)this.terrainUniforms[Dt].set(ot[Dt])}for(let Dt in this.fixedUniforms)this.fixedUniforms[Dt].set(Xe[Dt]);be&&be.setUniforms(w,this.binderUniforms,Pr,{zoom:ve});let it=0;switch(B){case We.LINES:it=2;break;case We.TRIANGLES:it=3;break;case We.LINE_STRIP:it=1}for(let Dt of xr.get()){let Ht=Dt.vaos||(Dt.vaos={});(Ht[Tt]||(Ht[Tt]=new Cr)).bind(w,this,Kt,be?be.getPaintVertexBuffers():[],Jt,Dt.vertexOffset,Re,Be,tt),We.drawElements(B,Dt.primitiveLength*it,We.UNSIGNED_SHORT,Dt.primitiveOffset*it*2)}}}function Sn(ue,w,B){let Q=1/Pn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,qe=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Xe=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[qe>>16,Xe>>16],u_pixel_coord_lower:[65535&qe,65535&Xe]}}let En=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get(\"position\"),qe=[le.x,le.y,le.z],Xe=function(){var Tt=new a.A(9);return a.A!=Float32Array&&(Tt[1]=0,Tt[2]=0,Tt[3]=0,Tt[5]=0,Tt[6]=0,Tt[7]=0),Tt[0]=1,Tt[4]=1,Tt[8]=1,Tt}();ee.properties.get(\"anchor\")===\"viewport\"&&function(Tt,Kt){var Jt=Math.sin(Kt),xr=Math.cos(Kt);Tt[0]=xr,Tt[1]=Jt,Tt[2]=0,Tt[3]=-Jt,Tt[4]=xr,Tt[5]=0,Tt[6]=0,Tt[7]=0,Tt[8]=1}(Xe,-w.transform.angle),function(Tt,Kt,Jt){var xr=Kt[0],Pr=Kt[1],ve=Kt[2];Tt[0]=xr*Jt[0]+Pr*Jt[3]+ve*Jt[6],Tt[1]=xr*Jt[1]+Pr*Jt[4]+ve*Jt[7],Tt[2]=xr*Jt[2]+Pr*Jt[5]+ve*Jt[8]}(qe,qe,Xe);let ot=ee.properties.get(\"color\");return{u_matrix:ue,u_lightpos:qe,u_lightintensity:ee.properties.get(\"intensity\"),u_lightcolor:[ot.r,ot.g,ot.b],u_vertical_gradient:+B,u_opacity:Q}},ki=(ue,w,B,Q,ee,le,qe)=>a.e(En(ue,w,B,Q),Sn(le,w,qe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/qe.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),Sn(B,w,Q)),Jn=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,qe;if(Q.paint.get(\"circle-pitch-alignment\")===\"map\"){let Xe=Pn(B,1,ee.zoom);le=!0,qe=[Xe,Xe]}else le=!1,qe=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get(\"circle-pitch-scale\")===\"map\"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get(\"circle-translate\"),Q.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:qe}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),Co=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:Pn(w,1,B),u_intensity:Q}),Fs=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get(\"heatmap-opacity\")}};function zs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ul=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:Ss(ue,w,B,Q),u_ratio:1/Pn(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},cl=(ue,w,B,Q,ee)=>a.e(ul(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,qe=nl(w,le);return{u_matrix:Ss(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Pn(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[qe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},cs=(ue,w,B,Q,ee,le)=>{let qe=ue.lineAtlas,Xe=nl(w,ue.transform),ot=B.layout.get(\"line-cap\")===\"round\",Tt=qe.getDash(Q.from,ot),Kt=qe.getDash(Q.to,ot),Jt=Tt.width*ee.fromScale,xr=Kt.width*ee.toScale;return a.e(ul(ue,w,B,le),{u_patternscale_a:[Xe/Jt,-Tt.height/2],u_patternscale_b:[Xe/xr,-Kt.height/2],u_sdfgamma:qe.width/(256*Math.min(Jt,xr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Tt.y,u_tex_y_b:Kt.y,u_mix:ee.t})};function nl(ue,w){return 1/Pn(ue,1,w.tileZoom)}function Ss(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get(\"line-translate\"),B.paint.get(\"line-translate-anchor\"))}let fl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get(\"raster-brightness-min\"),u_brightness_high:ee.paint.get(\"raster-brightness-max\"),u_saturation_factor:(qe=ee.paint.get(\"raster-saturation\"),qe>0?1-1/(1.001-qe):-qe),u_contrast_factor:(le=ee.paint.get(\"raster-contrast\"),le>0?1/(1-le):1+le),u_spin_weights:Js(ee.paint.get(\"raster-hue-rotate\"))};var le,qe};function Js(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Os=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr)=>{let ve=qe.transform;return{u_is_size_zoom_constant:+(ue===\"constant\"||ue===\"source\"),u_is_size_feature_constant:+(ue===\"constant\"||ue===\"camera\"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:qe.options.fadeDuration?qe.symbolFadeChange:1,u_matrix:Xe,u_label_plane_matrix:ot,u_coord_matrix:Tt,u_is_text:+Jt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:xr,u_texture:0,u_translation:Kt,u_pitched_scale:Pr}},Io=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr,ve)=>{let be=qe.transform;return a.e(Os(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,ve),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:qe.pixelRatio,u_is_halo:+Pr})},us=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr)=>a.e(Io(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,!0,Jt,!0,Pr),{u_texsize_icon:xr,u_texture_icon:1}),Zl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(qe,Xe,ot,Tt){let Kt=ot.imageManager.getPattern(qe.from.toString()),Jt=ot.imageManager.getPattern(qe.to.toString()),{width:xr,height:Pr}=ot.imageManager.getPixelSize(),ve=Math.pow(2,Tt.tileID.overscaledZ),be=Tt.tileSize*Math.pow(2,ot.transform.tileZoom)/ve,Re=be*(Tt.tileID.canonical.x+Tt.tileID.wrap*ve),Be=be*Tt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Kt.tl,u_pattern_br_a:Kt.br,u_pattern_tl_b:Jt.tl,u_pattern_br_b:Jt.br,u_texsize:[xr,Pr],u_mix:Xe.t,u_pattern_size_a:Kt.displaySize,u_pattern_size_b:Jt.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/Pn(Tt,1,ot.transform.tileZoom),u_pixel_coord_upper:[Re>>16,Be>>16],u_pixel_coord_lower:[65535&Re,65535&Be]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class ws{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error(\"Attempted to update data while not in dynamic mode.\");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Fn={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q<this.attributes.length;Q++){let ee=B.attributes[this.attributes[Q].name];ee!==void 0&&w.enableVertexAttribArray(ee)}}setVertexAttribPointers(w,B,Q){for(let ee=0;ee<this.attributes.length;ee++){let le=this.attributes[ee],qe=B.attributes[le.name];qe!==void 0&&w.vertexAttribPointer(qe,le.components,w[Fn[le.type]],!1,this.itemSize,le.offset+this.itemSize*(Q||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Vu=new WeakMap;function Ol(ue){var w;if(Vu.has(ue))return Vu.get(ue);{let B=(w=ue.getParameter(ue.VERSION))===null||w===void 0?void 0:w.startsWith(\"WebGL 2.0\");return Vu.set(ue,B),B}}class xo{constructor(w){this.gl=w.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(w){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Yl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.clearColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class Us extends xo{getDefault(){return 1}set(w){(w!==this.current||this.dirty)&&(this.gl.clearDepth(w),this.current=w,this.dirty=!1)}}class Hl extends xo{getDefault(){return 0}set(w){(w!==this.current||this.dirty)&&(this.gl.clearStencil(w),this.current=w,this.dirty=!1)}}class ac extends xo{getDefault(){return[!0,!0,!0,!0]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.colorMask(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class aa extends xo{getDefault(){return!0}set(w){(w!==this.current||this.dirty)&&(this.gl.depthMask(w),this.current=w,this.dirty=!1)}}class Oo extends xo{getDefault(){return 255}set(w){(w!==this.current||this.dirty)&&(this.gl.stencilMask(w),this.current=w,this.dirty=!1)}}class qo extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(w){let B=this.current;(w.func!==B.func||w.ref!==B.ref||w.mask!==B.mask||this.dirty)&&(this.gl.stencilFunc(w.func,w.ref,w.mask),this.current=w,this.dirty=!1)}}class ql extends xo{getDefault(){let w=this.gl;return[w.KEEP,w.KEEP,w.KEEP]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||this.dirty)&&(this.gl.stencilOp(w[0],w[1],w[2]),this.current=w,this.dirty=!1)}}class Pc extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.STENCIL_TEST):B.disable(B.STENCIL_TEST),this.current=w,this.dirty=!1}}class Do extends xo{getDefault(){return[0,1]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.depthRange(w[0],w[1]),this.current=w,this.dirty=!1)}}class rf extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.DEPTH_TEST):B.disable(B.DEPTH_TEST),this.current=w,this.dirty=!1}}class Uf extends xo{getDefault(){return this.gl.LESS}set(w){(w!==this.current||this.dirty)&&(this.gl.depthFunc(w),this.current=w,this.dirty=!1)}}class ml extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.BLEND):B.disable(B.BLEND),this.current=w,this.dirty=!1}}class Zc extends xo{getDefault(){let w=this.gl;return[w.ONE,w.ZERO]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.blendFunc(w[0],w[1]),this.current=w,this.dirty=!1)}}class Kl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.blendColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class qs extends xo{getDefault(){return this.gl.FUNC_ADD}set(w){(w!==this.current||this.dirty)&&(this.gl.blendEquation(w),this.current=w,this.dirty=!1)}}class yu extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.CULL_FACE):B.disable(B.CULL_FACE),this.current=w,this.dirty=!1}}class oc extends xo{getDefault(){return this.gl.BACK}set(w){(w!==this.current||this.dirty)&&(this.gl.cullFace(w),this.current=w,this.dirty=!1)}}class Cf extends xo{getDefault(){return this.gl.CCW}set(w){(w!==this.current||this.dirty)&&(this.gl.frontFace(w),this.current=w,this.dirty=!1)}}class sc extends xo{getDefault(){return null}set(w){(w!==this.current||this.dirty)&&(this.gl.useProgram(w),this.current=w,this.dirty=!1)}}class Nh extends xo{getDefault(){return this.gl.TEXTURE0}set(w){(w!==this.current||this.dirty)&&(this.gl.activeTexture(w),this.current=w,this.dirty=!1)}}class kf extends xo{getDefault(){let w=this.gl;return[0,0,w.drawingBufferWidth,w.drawingBufferHeight]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.viewport(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class fs extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindFramebuffer(B.FRAMEBUFFER,w),this.current=w,this.dirty=!1}}class nf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindRenderbuffer(B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Vf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindTexture(B.TEXTURE_2D,w),this.current=w,this.dirty=!1}}class Jl extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindBuffer(B.ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class hl extends xo{getDefault(){return null}set(w){let B=this.gl;B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class lc extends xo{getDefault(){return null}set(w){var B;if(w===this.current&&!this.dirty)return;let Q=this.gl;Ol(Q)?Q.bindVertexArray(w):(B=Q.getExtension(\"OES_vertex_array_object\"))===null||B===void 0||B.bindVertexArrayOES(w),this.current=w,this.dirty=!1}}class Fu extends xo{getDefault(){return 4}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_ALIGNMENT,w),this.current=w,this.dirty=!1}}class Cs extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w),this.current=w,this.dirty=!1}}class js extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,w),this.current=w,this.dirty=!1}}class Go extends xo{constructor(w,B){super(w),this.context=w,this.parent=B}getDefault(){return null}}class gs extends Go{setDirty(){this.dirty=!0}set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,w,0),this.current=w,this.dirty=!1}}class uc extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class bl extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_STENCIL_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Gu{constructor(w,B,Q,ee,le){this.context=w,this.width=B,this.height=Q;let qe=w.gl,Xe=this.framebuffer=qe.createFramebuffer();if(this.colorAttachment=new gs(w,Xe),ee)this.depthAttachment=le?new bl(w,Xe):new uc(w,Xe);else if(le)throw new Error(\"Stencil cannot be set without depth\");if(qe.checkFramebufferStatus(qe.FRAMEBUFFER)!==qe.FRAMEBUFFER_COMPLETE)throw new Error(\"Framebuffer is not complete\")}destroy(){let w=this.context.gl,B=this.colorAttachment.get();if(B&&w.deleteTexture(B),this.depthAttachment){let Q=this.depthAttachment.get();Q&&w.deleteRenderbuffer(Q)}w.deleteFramebuffer(this.framebuffer)}}class Bs{constructor(w,B,Q){this.blendFunction=w,this.blendColor=B,this.mask=Q}}Bs.Replace=[1,0],Bs.disabled=new Bs(Bs.Replace,a.aM.transparent,[!1,!1,!1,!1]),Bs.unblended=new Bs(Bs.Replace,a.aM.transparent,[!0,!0,!0,!0]),Bs.alphaBlended=new Bs([1,771],a.aM.transparent,[!0,!0,!0,!0]);class ad{constructor(w){var B,Q;if(this.gl=w,this.clearColor=new Yl(this),this.clearDepth=new Us(this),this.clearStencil=new Hl(this),this.colorMask=new ac(this),this.depthMask=new aa(this),this.stencilMask=new Oo(this),this.stencilFunc=new qo(this),this.stencilOp=new ql(this),this.stencilTest=new Pc(this),this.depthRange=new Do(this),this.depthTest=new rf(this),this.depthFunc=new Uf(this),this.blend=new ml(this),this.blendFunc=new Zc(this),this.blendColor=new Kl(this),this.blendEquation=new qs(this),this.cullFace=new yu(this),this.cullFaceSide=new oc(this),this.frontFace=new Cf(this),this.program=new sc(this),this.activeTexture=new Nh(this),this.viewport=new kf(this),this.bindFramebuffer=new fs(this),this.bindRenderbuffer=new nf(this),this.bindTexture=new Vf(this),this.bindVertexBuffer=new Jl(this),this.bindElementBuffer=new hl(this),this.bindVertexArray=new lc(this),this.pixelStoreUnpack=new Fu(this),this.pixelStoreUnpackPremultiplyAlpha=new Cs(this),this.pixelStoreUnpackFlipY=new js(this),this.extTextureFilterAnisotropic=w.getExtension(\"EXT_texture_filter_anisotropic\")||w.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||w.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=w.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=w.getParameter(w.MAX_TEXTURE_SIZE),Ol(w)){this.HALF_FLOAT=w.HALF_FLOAT;let ee=w.getExtension(\"EXT_color_buffer_half_float\");this.RGBA16F=(B=w.RGBA16F)!==null&&B!==void 0?B:ee==null?void 0:ee.RGBA16F_EXT,this.RGB16F=(Q=w.RGB16F)!==null&&Q!==void 0?Q:ee==null?void 0:ee.RGB16F_EXT,w.getExtension(\"EXT_color_buffer_float\")}else{w.getExtension(\"EXT_color_buffer_half_float\"),w.getExtension(\"OES_texture_half_float_linear\");let ee=w.getExtension(\"OES_texture_half_float\");this.HALF_FLOAT=ee==null?void 0:ee.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(w,B){return new ws(this,w,B)}createVertexBuffer(w,B,Q){return new _a(this,w,B,Q)}createRenderbuffer(w,B,Q){let ee=this.gl,le=ee.createRenderbuffer();return this.bindRenderbuffer.set(le),ee.renderbufferStorage(ee.RENDERBUFFER,w,B,Q),this.bindRenderbuffer.set(null),le}createFramebuffer(w,B,Q,ee){return new Gu(this,w,B,Q,ee)}clear({color:w,depth:B,stencil:Q}){let ee=this.gl,le=0;w&&(le|=ee.COLOR_BUFFER_BIT,this.clearColor.set(w),this.colorMask.set([!0,!0,!0,!0])),B!==void 0&&(le|=ee.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(B),this.depthMask.set(!0)),Q!==void 0&&(le|=ee.STENCIL_BUFFER_BIT,this.clearStencil.set(Q),this.stencilMask.set(255)),ee.clear(le)}setCullFace(w){w.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(w.mode),this.frontFace.set(w.frontFace))}setDepthMode(w){w.func!==this.gl.ALWAYS||w.mask?(this.depthTest.set(!0),this.depthFunc.set(w.func),this.depthMask.set(w.mask),this.depthRange.set(w.range)):this.depthTest.set(!1)}setStencilMode(w){w.test.func!==this.gl.ALWAYS||w.mask?(this.stencilTest.set(!0),this.stencilMask.set(w.mask),this.stencilOp.set([w.fail,w.depthFail,w.pass]),this.stencilFunc.set({func:w.test.func,ref:w.ref,mask:w.test.mask})):this.stencilTest.set(!1)}setColorMode(w){a.aE(w.blendFunction,Bs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(w.blendFunction),this.blendColor.set(w.blendColor)),this.colorMask.set(w.mask)}createVertexArray(){var w;return Ol(this.gl)?this.gl.createVertexArray():(w=this.gl.getExtension(\"OES_vertex_array_object\"))===null||w===void 0?void 0:w.createVertexArrayOES()}deleteVertexArray(w){var B;return Ol(this.gl)?this.gl.deleteVertexArray(w):(B=this.gl.getExtension(\"OES_vertex_array_object\"))===null||B===void 0?void 0:B.deleteVertexArrayOES(w)}unbindVAO(){this.bindVertexArray.set(null)}}class Po{constructor(w,B,Q){this.func=w,this.mask=B,this.range=Q}}Po.ReadOnly=!1,Po.ReadWrite=!0,Po.disabled=new Po(519,Po.ReadOnly,[0,1]);let od=7680;class Yo{constructor(w,B,Q,ee,le,qe){this.test=w,this.ref=B,this.mask=Q,this.fail=ee,this.depthFail=le,this.pass=qe}}Yo.disabled=new Yo({func:519,mask:0},0,0,od,od,od);class Pa{constructor(w,B,Q){this.enable=w,this.mode=B,this.frontFace=Q}}let af;function Hu(ue,w,B,Q,ee){let le=ue.context,qe=le.gl,Xe=ue.useProgram(\"collisionBox\"),ot=[],Tt=0,Kt=0;for(let Be=0;Be<Q.length;Be++){let tt=Q[Be],We=w.getTile(tt).getBucket(B);if(!We)continue;let it=ee?We.textCollisionBox:We.iconCollisionBox,Dt=We.collisionCircleArray;if(Dt.length>0){let Ht=a.H();a.aQ(Ht,We.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(Ht,Ht,We.placementViewportMatrix),ot.push({circleArray:Dt,circleOffset:Kt,transform:tt.posMatrix,invTransform:Ht,coord:tt}),Tt+=Dt.length/4,Kt=Tt}it&&Xe.draw(le,qe.LINES,Po.disabled,Yo.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:tt.posMatrix,u_pixel_extrude_scale:[1/(Jt=ue.transform).width,1/Jt.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(tt),B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,null,ue.transform.zoom,null,null,it.collisionVertexBuffer)}var Jt;if(!ee||!ot.length)return;let xr=ue.useProgram(\"collisionCircle\"),Pr=new a.aR;Pr.resize(4*Tt),Pr._trim();let ve=0;for(let Be of ot)for(let tt=0;tt<Be.circleArray.length/4;tt++){let We=4*tt,it=Be.circleArray[We+0],Dt=Be.circleArray[We+1],Ht=Be.circleArray[We+2],rr=Be.circleArray[We+3];Pr.emplace(ve++,it,Dt,Ht,rr,0),Pr.emplace(ve++,it,Dt,Ht,rr,1),Pr.emplace(ve++,it,Dt,Ht,rr,2),Pr.emplace(ve++,it,Dt,Ht,rr,3)}(!af||af.length<2*Tt)&&(af=function(Be){let tt=2*Be,We=new a.aT;We.resize(tt),We._trim();for(let it=0;it<tt;it++){let Dt=6*it;We.uint16[Dt+0]=4*it+0,We.uint16[Dt+1]=4*it+1,We.uint16[Dt+2]=4*it+2,We.uint16[Dt+3]=4*it+2,We.uint16[Dt+4]=4*it+3,We.uint16[Dt+5]=4*it+0}return We}(Tt));let be=le.createIndexBuffer(af,!0),Re=le.createVertexBuffer(Pr,a.aS.members,!0);for(let Be of ot){let tt=No(Be.transform,Be.invTransform,ue.transform);xr.draw(le,qe.TRIANGLES,Po.disabled,Yo.disabled,ue.colorModeForRenderPass(),Pa.disabled,tt,ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Be.coord),B.id,Re,be,a.a0.simpleSegment(0,2*Be.circleOffset,Be.circleArray.length,Be.circleArray.length/2),null,ue.transform.zoom,null,null,null)}Re.destroy(),be.destroy()}Pa.disabled=new Pa(!1,1029,2305),Pa.backCCW=new Pa(!0,1029,2305);let wl=a.an(new Float32Array(16));function Gf(ue,w,B,Q,ee,le){let{horizontalAlign:qe,verticalAlign:Xe}=a.au(ue);return new a.P((-(qe-.5)*w/ee+Q[0])*le,(-(Xe-.5)*B/ee+Q[1])*le)}function Ic(ue,w,B,Q,ee,le){let qe=w.tileAnchorPoint.add(new a.P(w.translation[0],w.translation[1]));if(w.pitchWithMap){let Xe=Q.mult(le);B||(Xe=Xe.rotate(-ee));let ot=qe.add(Xe);return dt(ot.x,ot.y,w.labelPlaneMatrix,w.getElevation).point}if(B){let Xe=vt(w.tileAnchorPoint.x+1,w.tileAnchorPoint.y,w).point.sub(ue),ot=Math.atan(Xe.y/Xe.x)+(Xe.x<0?Math.PI:0);return ue.add(Q.rotate(ot))}return ue.add(Q)}function mf(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt,xr,Pr){let ve=ue.text.placedSymbolArray,be=ue.text.dynamicLayoutVertexArray,Re=ue.icon.dynamicLayoutVertexArray,Be={};be.clear();for(let tt=0;tt<ve.length;tt++){let We=ve.get(tt),it=We.hidden||!We.crossTileID||ue.allowVerticalPlacement&&!We.placedOrientation?null:Q[We.crossTileID];if(it){let Dt=new a.P(We.anchorX,We.anchorY),Ht={getElevation:Pr,width:ee.width,height:ee.height,labelPlaneMatrix:le,lineVertexArray:null,pitchWithMap:B,projection:Kt,projectionCache:null,tileAnchorPoint:Dt,translation:Jt,unwrappedTileID:xr},rr=B?dt(Dt.x,Dt.y,qe,Pr):vt(Dt.x,Dt.y,Ht),dr=Ge(ee.cameraToCenterDistance,rr.signedDistanceFromCamera),Sr=a.ai(ue.textSizeData,ot,We)*dr/a.ap;B&&(Sr*=ue.tilePixelRatio/Xe);let{width:Or,height:jr,anchor:ii,textOffset:Li,textBoxScale:un}=it,sn=Gf(ii,Or,jr,Li,un,Sr),In=Kt.getPitchedTextCorrection(ee,Dt.add(new a.P(Jt[0],Jt[1])),xr),Kn=Ic(rr.point,Ht,w,sn,ee.angle,In),Aa=ue.allowVerticalPlacement&&We.placedOrientation===a.ah.vertical?Math.PI/2:0;for(let fa=0;fa<We.numGlyphs;fa++)a.aj(be,Kn,Aa);Tt&&We.associatedIconIndex>=0&&(Be[We.associatedIconIndex]={shiftedAnchor:Kn,angle:Aa})}else di(We.numGlyphs,be)}if(Tt){Re.clear();let tt=ue.icon.placedSymbolArray;for(let We=0;We<tt.length;We++){let it=tt.get(We);if(it.hidden)di(it.numGlyphs,Re);else{let Dt=Be[We];if(Dt)for(let Ht=0;Ht<it.numGlyphs;Ht++)a.aj(Re,Dt.shiftedAnchor,Dt.angle);else di(it.numGlyphs,Re)}}ue.icon.dynamicLayoutVertexBuffer.updateData(Re)}ue.text.dynamicLayoutVertexBuffer.updateData(be)}function Bl(ue,w,B){return B.iconsInText&&w?\"symbolTextAndIcon\":ue?\"symbolSDF\":\"symbolIcon\"}function _h(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Kt,Jt){let xr=ue.context,Pr=xr.gl,ve=ue.transform,be=yn(),Re=Xe===\"map\",Be=ot===\"map\",tt=Xe!==\"viewport\"&&B.layout.get(\"symbol-placement\")!==\"point\",We=Re&&!Be&&!tt,it=!Be&&tt,Dt=!B.layout.get(\"symbol-sort-key\").isConstant(),Ht=!1,rr=ue.depthModeForSublayer(0,Po.ReadOnly),dr=B._unevaluatedLayout.hasValue(\"text-variable-anchor\")||B._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"),Sr=[],Or=be.getCircleRadiusCorrection(ve);for(let jr of Q){let ii=w.getTile(jr),Li=ii.getBucket(B);if(!Li)continue;let un=ee?Li.text:Li.icon;if(!un||!un.segments.get().length||!un.hasVisibleVertices)continue;let sn=un.programConfigurations.get(B.id),In=ee||Li.sdfIcons,Kn=ee?Li.textSizeData:Li.iconSizeData,Aa=Be||ve.pitch!==0,fa=ue.useProgram(Bl(In,ee,Li),sn),$a=a.ag(Kn,ve.zoom),ko=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(jr),Qa,mo,Bo,Is,As=[0,0],wo=null;if(ee)mo=ii.glyphAtlasTexture,Bo=Pr.LINEAR,Qa=ii.glyphAtlasTexture.size,Li.iconsInText&&(As=ii.imageAtlasTexture.size,wo=ii.imageAtlasTexture,Is=Aa||ue.options.rotating||ue.options.zooming||Kn.kind===\"composite\"||Kn.kind===\"camera\"?Pr.LINEAR:Pr.NEAREST);else{let Ye=B.layout.get(\"icon-size\").constantOr(0)!==1||Li.iconsNeedLinear;mo=ii.imageAtlasTexture,Bo=In||ue.options.rotating||ue.options.zooming||Ye||Aa?Pr.LINEAR:Pr.NEAREST,Qa=ii.imageAtlasTexture.size}let To=Pn(ii,1,ue.transform.zoom),dl=it?jr.posMatrix:wl,Ul=Wr(dl,Be,Re,ue.transform,To),Lu=Ur(dl,Be,Re,ue.transform,To),au=Ur(jr.posMatrix,Be,Re,ue.transform,To),$s=be.translatePosition(ue.transform,ii,le,qe),Ql=dr&&Li.hasTextData(),dc=B.layout.get(\"icon-text-fit\")!==\"none\"&&Ql&&Li.hasIconData();if(tt){let Ye=ue.style.map.terrain?(nt,jt)=>ue.style.map.terrain.getElevation(jr,nt,jt):null,Ct=B.layout.get(\"text-rotation-alignment\")===\"map\";je(Li,jr.posMatrix,ue,ee,Ul,au,Be,Tt,Ct,be,jr.toUnwrapped(),ve.width,ve.height,$s,Ye)}let Al=jr.posMatrix,Sl=ee&&dr||dc,X=tt||Sl?wl:Ul,se=Lu,Te=In&&B.paint.get(ee?\"text-halo-width\":\"icon-halo-width\").constantOr(1)!==0,Ne;Ne=In?Li.iconsInText?us(Kn.kind,$a,We,Be,tt,Sl,ue,Al,X,se,$s,Qa,As,Or):Io(Kn.kind,$a,We,Be,tt,Sl,ue,Al,X,se,$s,ee,Qa,!0,Or):Os(Kn.kind,$a,We,Be,tt,Sl,ue,Al,X,se,$s,ee,Qa,Or);let He={program:fa,buffers:un,uniformValues:Ne,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Is,isSDF:In,hasHalo:Te};if(Dt&&Li.canOverlap){Ht=!0;let Ye=un.segments.get();for(let Ct of Ye)Sr.push({segments:new a.a0([Ct]),sortKey:Ct.sortKey,state:He,terrainData:ko})}else Sr.push({segments:un.segments,sortKey:0,state:He,terrainData:ko})}Ht&&Sr.sort((jr,ii)=>jr.sortKey-ii.sortKey);for(let jr of Sr){let ii=jr.state;if(xr.activeTexture.set(Pr.TEXTURE0),ii.atlasTexture.bind(ii.atlasInterpolation,Pr.CLAMP_TO_EDGE),ii.atlasTextureIcon&&(xr.activeTexture.set(Pr.TEXTURE1),ii.atlasTextureIcon&&ii.atlasTextureIcon.bind(ii.atlasInterpolationIcon,Pr.CLAMP_TO_EDGE)),ii.isSDF){let Li=ii.uniformValues;ii.hasHalo&&(Li.u_is_halo=1,Qf(ii.buffers,jr.segments,B,ue,ii.program,rr,Kt,Jt,Li,jr.terrainData)),Li.u_is_halo=0}Qf(ii.buffers,jr.segments,B,ue,ii.program,rr,Kt,Jt,ii.uniformValues,jr.terrainData)}}function Qf(ue,w,B,Q,ee,le,qe,Xe,ot,Tt){let Kt=Q.context;ee.draw(Kt,Kt.gl.TRIANGLES,le,qe,Xe,Pa.disabled,ot,Tt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function yf(ue,w,B,Q){let ee=ue.context,le=ee.gl,qe=Yo.disabled,Xe=new Bs([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),ot=w.getBucket(B);if(!ot)return;let Tt=Q.key,Kt=B.heatmapFbos.get(Tt);Kt||(Kt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Tt,Kt)),ee.bindFramebuffer.set(Kt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Jt=ot.programConfigurations.get(B.id),xr=ue.useProgram(\"heatmap\",Jt),Pr=ue.style.map.terrain.getTerrainData(Q);xr.draw(ee,le.TRIANGLES,Po.disabled,qe,Xe,Pa.disabled,Co(Q.posMatrix,w,ue.transform.zoom,B.paint.get(\"heatmap-intensity\")),Pr,B.id,ot.layoutVertexBuffer,ot.indexBuffer,ot.segments,B.paint,ue.transform.zoom,Jt)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),qe=B.key,Xe=w.heatmapFbos.get(qe);Xe&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Xe.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram(\"heatmapTexture\").draw(Q,ee.TRIANGLES,Po.disabled,Yo.disabled,ue.colorModeForRenderPass(),Pa.disabled,Fs(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Xe.destroy(),w.heatmapFbos.delete(qe))}function eh(ue,w,B){var Q,ee;let le=ue.gl,qe=le.createTexture();le.bindTexture(le.TEXTURE_2D,qe),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Xe=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,ot=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,ot,w,B,0,le.RGBA,Xe,null);let Tt=ue.createFramebuffer(w,B,!1,!1);return Tt.colorAttachment.set(qe),Tt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,qe=le[B.to.toString()],Xe=le[B.from.toString()];if(!qe&&Xe&&(qe=Xe),!Xe&&qe&&(Xe=qe),!qe||!Xe){let ot=ee.getPaintProperty(w);qe=le[ot],Xe=le[ot]}qe&&Xe&&ue.setConstantPatternPositions(qe,Xe)}function Hf(ue,w,B,Q,ee,le,qe){let Xe=ue.context.gl,ot=\"fill-pattern\",Tt=B.paint.get(ot),Kt=Tt&&Tt.constantOr(1),Jt=B.getCrossfadeParameters(),xr,Pr,ve,be,Re;qe?(Pr=Kt&&!B.getPaintProperty(\"fill-outline-color\")?\"fillOutlinePattern\":\"fillOutline\",xr=Xe.LINES):(Pr=Kt?\"fillPattern\":\"fill\",xr=Xe.TRIANGLES);let Be=Tt.constantOr(null);for(let tt of Q){let We=w.getTile(tt);if(Kt&&!We.patternsLoaded())continue;let it=We.getBucket(B);if(!it)continue;let Dt=it.programConfigurations.get(B.id),Ht=ue.useProgram(Pr,Dt),rr=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(tt);Kt&&(ue.context.activeTexture.set(Xe.TEXTURE0),We.imageAtlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE),Dt.updatePaintBuffers(Jt)),ju(Dt,ot,Be,We,B);let dr=rr?tt:null,Sr=ue.translatePosMatrix(dr?dr.posMatrix:tt.posMatrix,We,B.paint.get(\"fill-translate\"),B.paint.get(\"fill-translate-anchor\"));if(qe){be=it.indexBuffer2,Re=it.segments2;let Or=[Xe.drawingBufferWidth,Xe.drawingBufferHeight];ve=Pr===\"fillOutlinePattern\"&&Kt?Ma(Sr,ue,Jt,We,Or):Jn(Sr,Or)}else be=it.indexBuffer,Re=it.segments,ve=Kt?ya(Sr,ue,Jt,We):_n(Sr);Ht.draw(ue.context,xr,ee,ue.stencilModeForClipping(tt),le,Pa.disabled,ve,rr,B.id,it.layoutVertexBuffer,be,Re,B.paint,ue.transform.zoom,Dt)}}function cc(ue,w,B,Q,ee,le,qe){let Xe=ue.context,ot=Xe.gl,Tt=\"fill-extrusion-pattern\",Kt=B.paint.get(Tt),Jt=Kt.constantOr(1),xr=B.getCrossfadeParameters(),Pr=B.paint.get(\"fill-extrusion-opacity\"),ve=Kt.constantOr(null);for(let be of Q){let Re=w.getTile(be),Be=Re.getBucket(B);if(!Be)continue;let tt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(be),We=Be.programConfigurations.get(B.id),it=ue.useProgram(Jt?\"fillExtrusionPattern\":\"fillExtrusion\",We);Jt&&(ue.context.activeTexture.set(ot.TEXTURE0),Re.imageAtlasTexture.bind(ot.LINEAR,ot.CLAMP_TO_EDGE),We.updatePaintBuffers(xr)),ju(We,Tt,ve,Re,B);let Dt=ue.translatePosMatrix(be.posMatrix,Re,B.paint.get(\"fill-extrusion-translate\"),B.paint.get(\"fill-extrusion-translate-anchor\")),Ht=B.paint.get(\"fill-extrusion-vertical-gradient\"),rr=Jt?ki(Dt,ue,Ht,Pr,be,xr,Re):En(Dt,ue,Ht,Pr);it.draw(Xe,Xe.gl.TRIANGLES,ee,le,qe,Pa.backCCW,rr,tt,B.id,Be.layoutVertexBuffer,Be.indexBuffer,Be.segments,B.paint,ue.transform.zoom,We,ue.style.map.terrain&&Be.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,qe){let Xe=ue.context,ot=Xe.gl,Tt=B.fbo;if(!Tt)return;let Kt=ue.useProgram(\"hillshade\"),Jt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Xe.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,Tt.colorAttachment.get()),Kt.draw(Xe,ot.TRIANGLES,ee,le,qe,Pa.disabled,((xr,Pr,ve,be)=>{let Re=ve.paint.get(\"hillshade-shadow-color\"),Be=ve.paint.get(\"hillshade-highlight-color\"),tt=ve.paint.get(\"hillshade-accent-color\"),We=ve.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);ve.paint.get(\"hillshade-illumination-anchor\")===\"viewport\"&&(We-=xr.transform.angle);let it=!xr.options.moving;return{u_matrix:be?be.posMatrix:xr.transform.calculatePosMatrix(Pr.tileID.toUnwrapped(),it),u_image:0,u_latrange:zs(0,Pr.tileID),u_light:[ve.paint.get(\"hillshade-exaggeration\"),We],u_shadow:Re,u_highlight:Be,u_accent:tt}})(ue,B,Q,Jt?w:null),Jt,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let qe=ue.context,Xe=qe.gl,ot=w.dem;if(ot&&ot.data){let Tt=ot.dim,Kt=ot.stride,Jt=ot.getPixels();if(qe.activeTexture.set(Xe.TEXTURE1),qe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Kt),w.demTexture){let Pr=w.demTexture;Pr.update(Jt,{premultiply:!1}),Pr.bind(Xe.NEAREST,Xe.CLAMP_TO_EDGE)}else w.demTexture=new g(qe,Jt,Xe.RGBA,{premultiply:!1}),w.demTexture.bind(Xe.NEAREST,Xe.CLAMP_TO_EDGE);qe.activeTexture.set(Xe.TEXTURE0);let xr=w.fbo;if(!xr){let Pr=new g(qe,{width:Tt,height:Tt,data:null},Xe.RGBA);Pr.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE),xr=w.fbo=qe.createFramebuffer(Tt,Tt,!0,!1),xr.colorAttachment.set(Pr.texture)}qe.bindFramebuffer.set(xr.framebuffer),qe.viewport.set([0,0,Tt,Tt]),ue.useProgram(\"hillshadePrepare\").draw(qe,Xe.TRIANGLES,Q,ee,le,Pa.disabled,((Pr,ve)=>{let be=ve.stride,Re=a.H();return a.aP(Re,0,a.X,-a.X,0,0,1),a.J(Re,Re,[0,-a.X,0]),{u_matrix:Re,u_image:1,u_dimension:[be,be],u_zoom:Pr.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,ot),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let qe=Q.paint.get(\"raster-fade-duration\");if(!le&&qe>0){let Xe=u.now(),ot=(Xe-ue.timeAdded)/qe,Tt=w?(Xe-w.timeAdded)/qe:-1,Kt=B.getSource(),Jt=ee.coveringZoomLevel({tileSize:Kt.tileSize,roundZoom:Kt.roundZoom}),xr=!w||Math.abs(w.tileID.overscaledZ-Jt)>Math.abs(ue.tileID.overscaledZ-Jt),Pr=xr&&ue.refreshedUponExpiration?1:a.ac(xr?ot:1-Tt,0,1);return ue.refreshedUponExpiration&&ot>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Pr}:{opacity:Pr,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),ms=new a.aM(0,1,0,1),jf=new a.aM(0,0,1,1),Uh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function xh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let qe=ue.context,Xe=qe.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),qe.clear({color:le}),Xe.disable(Xe.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,qe=ue.useProgram(\"debug\"),Xe=Po.disabled,ot=Yo.disabled,Tt=ue.colorModeForRenderPass(),Kt=\"$debug\",Jt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let xr=w.getTileByID(B.key).latestRawTileData,Pr=Math.floor((xr&&xr.byteLength||0)/1024),ve=w.getTile(B).tileSize,be=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Re=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Re+=` => ${B.overscaledZ}`),function(Be,tt){Be.initDebugOverlayCanvas();let We=Be.debugOverlayCanvas,it=Be.context.gl,Dt=Be.debugOverlayCanvas.getContext(\"2d\");Dt.clearRect(0,0,We.width,We.height),Dt.shadowColor=\"white\",Dt.shadowBlur=2,Dt.lineWidth=1.5,Dt.strokeStyle=\"white\",Dt.textBaseline=\"top\",Dt.font=\"bold 36px Open Sans, sans-serif\",Dt.fillText(tt,5,5),Dt.strokeText(tt,5,5),Be.debugOverlayTexture.update(We),Be.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(ue,`${Re} ${Pr}kB`),qe.draw(Q,ee.TRIANGLES,Xe,ot,Bs.alphaBlended,Pa.disabled,po(le,a.aM.transparent,be),null,Kt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),qe.draw(Q,ee.LINE_STRIP,Xe,ot,Tt,Pa.disabled,po(le,a.aM.red),Jt,Kt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function Ws(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),qe=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Xe=ue.useProgram(\"terrain\"),ot=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Tt of B){let Kt=ue.renderToTexture.getTexture(Tt),Jt=w.getTerrainData(Tt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Kt.texture);let xr=ue.transform.calculatePosMatrix(Tt.tileID.toUnwrapped()),Pr=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Tt.tileID.toUnwrapped()),be=Qr(xr,Pr,ve,ue.style.sky,ue.transform.pitch);Xe.draw(Q,ee.TRIANGLES,qe,Yo.disabled,le,Pa.backCCW,be,Jt,\"terrain\",ot.vertexBuffer,ot.indexBuffer,ot.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new ad(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=yt.maxUnderzooming+yt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Wo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,lt.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let qe=new a.aZ;qe.emplaceBack(0),qe.emplaceBack(1),qe.emplaceBack(3),qe.emplaceBack(2),qe.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(qe);let Xe=new a.aY;Xe.emplaceBack(0,1,2),Xe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Xe);let ot=this.context.gl;this.stencilClearMode=new Yo({func:ot.ALWAYS,mask:0},0,255,ot.ZERO,ot.ZERO,ot.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram(\"clippingMask\").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,Bs.disabled,Pa.disabled,Lo(Q),null,\"$clipping\",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(Bs.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(let qe of B){let Xe=this._tileClippingMaskIDs[qe.key]=this.nextStencilID++,ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(qe);le.draw(Q,ee.TRIANGLES,Po.disabled,new Yo({func:ee.ALWAYS,mask:0},Xe,255,ee.KEEP,ee.KEEP,ee.REPLACE),Bs.disabled,Pa.disabled,Lo(qe.posMatrix),ot,\"$clipping\",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Yo({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Yo({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((qe,Xe)=>Xe.overscaledZ-qe.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let qe={};for(let Xe=0;Xe<le;Xe++)qe[Xe+ee]=new Yo({func:B.GEQUAL,mask:255},Xe+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=le,[qe,Q]}return[{[ee]:Yo.disabled},Q]}colorModeForRenderPass(){let w=this.context.gl;return this._showOverdrawInspector?new Bs([w.CONSTANT_COLOR,w.ONE],new a.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass===\"opaque\"?Bs.unblended:Bs.alphaBlended}depthModeForSublayer(w,B,Q){if(!this.opaquePassEnabledForLayer())return Po.disabled;let ee=1-((1+this.currentLayer)*this.numSublayers+w)*this.depthEpsilon;return new Po(Q||this.context.gl.LEQUAL,B,[ee,ee])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(w,B){this.style=w,this.options=B,this.lineAtlas=w.lineAtlas,this.imageManager=w.imageManager,this.glyphManager=w.glyphManager,this.symbolFadeChange=w.placement.symbolFadeChange(u.now()),this.imageManager.beginFrame();let Q=this.style._order,ee=this.style.sourceCaches,le={},qe={},Xe={};for(let ot in ee){let Tt=ee[ot];Tt.used&&Tt.prepare(this.context),le[ot]=Tt.getVisibleCoordinates(),qe[ot]=le[ot].slice().reverse(),Xe[ot]=Tt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let ot=0;ot<Q.length;ot++)if(this.style._layers[Q[ot]].is3D()){this.opaquePassCutoff=ot;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass=\"offscreen\";for(let ot of Q){let Tt=this.style._layers[ot];if(!Tt.hasOffscreenPass()||Tt.isHidden(this.transform.zoom))continue;let Kt=qe[Tt.source];(Tt.type===\"custom\"||Kt.length)&&this.renderLayer(this,ee[Tt.source],Tt,Kt)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:B.showOverdrawInspector?a.aM.black:a.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(ot,Tt){let Kt=ot.context,Jt=Kt.gl,xr=((Be,tt,We)=>({u_sky_color:Be.properties.get(\"sky-color\"),u_horizon_color:Be.properties.get(\"horizon-color\"),u_horizon:(tt.height/2+tt.getHorizon())*We,u_sky_horizon_blend:Be.properties.get(\"sky-horizon-blend\")*tt.height/2*We}))(Tt,ot.style.map.transform,ot.pixelRatio),Pr=new Po(Jt.LEQUAL,Po.ReadWrite,[0,1]),ve=Yo.disabled,be=ot.colorModeForRenderPass(),Re=ot.useProgram(\"sky\");if(!Tt.mesh){let Be=new a.aX;Be.emplaceBack(-1,-1),Be.emplaceBack(1,-1),Be.emplaceBack(1,1),Be.emplaceBack(-1,1);let tt=new a.aY;tt.emplaceBack(0,1,2),tt.emplaceBack(0,2,3),Tt.mesh=new Eu(Kt.createVertexBuffer(Be,vo.members),Kt.createIndexBuffer(tt),a.a0.simpleSegment(0,0,Be.length,tt.length))}Re.draw(Kt,Jt.TRIANGLES,Pr,ve,be,Pa.disabled,xr,void 0,\"sky\",Tt.mesh.vertexBuffer,Tt.mesh.indexBuffer,Tt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass=\"opaque\",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let ot=this.style._layers[Q[this.currentLayer]],Tt=ee[ot.source],Kt=le[ot.source];this._renderTileClippingMasks(ot,Kt),this.renderLayer(this,Tt,ot,Kt)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer<Q.length;this.currentLayer++){let ot=this.style._layers[Q[this.currentLayer]],Tt=ee[ot.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(ot))continue;let Kt=(ot.type===\"symbol\"?Xe:qe)[ot.source];this._renderTileClippingMasks(ot,le[ot.source]),this.renderLayer(this,Tt,ot,Kt)}if(this.options.showTileBoundaries){let ot=function(Tt,Kt){let Jt=null,xr=Object.values(Tt._layers).flatMap(Re=>Re.source&&!Re.isHidden(Kt)?[Tt.sourceCaches[Re.source]]:[]),Pr=xr.filter(Re=>Re.getSource().type===\"vector\"),ve=xr.filter(Re=>Re.getSource().type!==\"vector\"),be=Re=>{(!Jt||Jt.getSource().maxzoom<Re.getSource().maxzoom)&&(Jt=Re)};return Pr.forEach(Re=>be(Re)),Jt||ve.forEach(Re=>be(Re)),Jt}(this.style,this.transform.zoom);ot&&function(Tt,Kt,Jt){for(let xr=0;xr<Jt.length;xr++)ih(Tt,Kt,Jt[xr])}(this,ot,ot.getVisibleCoordinates())}this.options.showPadding&&function(ot){let Tt=ot.transform.padding;sf(ot,ot.transform.height-(Tt.top||0),3,Rc),sf(ot,Tt.bottom||0,3,ms),xh(ot,Tt.left||0,3,jf),xh(ot,ot.transform.width-(Tt.right||0),3,Uh);let Kt=ot.transform.centerPoint;(function(Jt,xr,Pr,ve){Mu(Jt,xr-1,Pr-10,2,20,ve),Mu(Jt,xr-10,Pr-1,20,2,ve)})(ot,Kt.x,ot.transform.height-Kt.y,rh)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(w){if(!this.style||!this.style.map||!this.style.map.terrain)return;let B=this.terrainFacilitator.matrix,Q=this.transform.modelViewProjectionMatrix,ee=this.terrainFacilitator.dirty;ee||(ee=w?!a.a_(B,Q):!a.a$(B,Q)),ee||(ee=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,qe){let Xe=le.context,ot=Xe.gl,Tt=Bs.unblended,Kt=new Po(ot.LEQUAL,Po.ReadWrite,[0,1]),Jt=qe.getTerrainMesh(),xr=qe.sourceCache.getRenderableTiles(),Pr=le.useProgram(\"terrainDepth\");Xe.bindFramebuffer.set(qe.getFramebuffer(\"depth\").framebuffer),Xe.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Xe.clear({color:a.aM.transparent,depth:1});for(let ve of xr){let be=qe.getTerrainData(ve.tileID),Re={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:qe.getMeshFrameDelta(le.transform.zoom)};Pr.draw(Xe,ot.TRIANGLES,Kt,Yo.disabled,Tt,Pa.backCCW,Re,be,\"terrain\",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments)}Xe.bindFramebuffer.set(null),Xe.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,qe){let Xe=le.context,ot=Xe.gl,Tt=Bs.unblended,Kt=new Po(ot.LEQUAL,Po.ReadWrite,[0,1]),Jt=qe.getTerrainMesh(),xr=qe.getCoordsTexture(),Pr=qe.sourceCache.getRenderableTiles(),ve=le.useProgram(\"terrainCoords\");Xe.bindFramebuffer.set(qe.getFramebuffer(\"coords\").framebuffer),Xe.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Xe.clear({color:a.aM.transparent,depth:1}),qe.coordsIndex=[];for(let be of Pr){let Re=qe.getTerrainData(be.tileID);Xe.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,xr.texture);let Be={u_matrix:le.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-qe.coordsIndex.length)/255,u_texture:0,u_ele_delta:qe.getMeshFrameDelta(le.transform.zoom)};ve.draw(Xe,ot.TRIANGLES,Kt,Yo.disabled,Tt,Pa.backCCW,Be,Re,\"terrain\",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments),qe.coordsIndex.push(be.tileID.key)}Xe.bindFramebuffer.set(null),Xe.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type===\"background\"||Q.type===\"custom\"||(ee||[]).length))switch(this.id=Q.id,Q.type){case\"symbol\":(function(le,qe,Xe,ot,Tt){if(le.renderPass!==\"translucent\")return;let Kt=Yo.disabled,Jt=le.colorModeForRenderPass();(Xe._unevaluatedLayout.hasValue(\"text-variable-anchor\")||Xe._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"))&&function(xr,Pr,ve,be,Re,Be,tt,We,it){let Dt=Pr.transform,Ht=yn(),rr=Re===\"map\",dr=Be===\"map\";for(let Sr of xr){let Or=be.getTile(Sr),jr=Or.getBucket(ve);if(!jr||!jr.text||!jr.text.segments.get().length)continue;let ii=a.ag(jr.textSizeData,Dt.zoom),Li=Pn(Or,1,Pr.transform.zoom),un=Wr(Sr.posMatrix,dr,rr,Pr.transform,Li),sn=ve.layout.get(\"icon-text-fit\")!==\"none\"&&jr.hasIconData();if(ii){let In=Math.pow(2,Dt.zoom-Or.tileID.overscaledZ),Kn=Pr.style.map.terrain?(fa,$a)=>Pr.style.map.terrain.getElevation(Sr,fa,$a):null,Aa=Ht.translatePosition(Dt,Or,tt,We);mf(jr,rr,dr,it,Dt,un,Sr.posMatrix,In,ii,sn,Ht,Aa,Sr.toUnwrapped(),Kn)}}}(ot,le,Xe,qe,Xe.layout.get(\"text-rotation-alignment\"),Xe.layout.get(\"text-pitch-alignment\"),Xe.paint.get(\"text-translate\"),Xe.paint.get(\"text-translate-anchor\"),Tt),Xe.paint.get(\"icon-opacity\").constantOr(1)!==0&&_h(le,qe,Xe,ot,!1,Xe.paint.get(\"icon-translate\"),Xe.paint.get(\"icon-translate-anchor\"),Xe.layout.get(\"icon-rotation-alignment\"),Xe.layout.get(\"icon-pitch-alignment\"),Xe.layout.get(\"icon-keep-upright\"),Kt,Jt),Xe.paint.get(\"text-opacity\").constantOr(1)!==0&&_h(le,qe,Xe,ot,!0,Xe.paint.get(\"text-translate\"),Xe.paint.get(\"text-translate-anchor\"),Xe.layout.get(\"text-rotation-alignment\"),Xe.layout.get(\"text-pitch-alignment\"),Xe.layout.get(\"text-keep-upright\"),Kt,Jt),qe.map.showCollisionBoxes&&(Hu(le,qe,Xe,ot,!0),Hu(le,qe,Xe,ot,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case\"circle\":(function(le,qe,Xe,ot){if(le.renderPass!==\"translucent\")return;let Tt=Xe.paint.get(\"circle-opacity\"),Kt=Xe.paint.get(\"circle-stroke-width\"),Jt=Xe.paint.get(\"circle-stroke-opacity\"),xr=!Xe.layout.get(\"circle-sort-key\").isConstant();if(Tt.constantOr(1)===0&&(Kt.constantOr(1)===0||Jt.constantOr(1)===0))return;let Pr=le.context,ve=Pr.gl,be=le.depthModeForSublayer(0,Po.ReadOnly),Re=Yo.disabled,Be=le.colorModeForRenderPass(),tt=[];for(let We=0;We<ot.length;We++){let it=ot[We],Dt=qe.getTile(it),Ht=Dt.getBucket(Xe);if(!Ht)continue;let rr=Ht.programConfigurations.get(Xe.id),dr=le.useProgram(\"circle\",rr),Sr=Ht.layoutVertexBuffer,Or=Ht.indexBuffer,jr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(it),ii={programConfiguration:rr,program:dr,layoutVertexBuffer:Sr,indexBuffer:Or,uniformValues:_o(le,it,Dt,Xe),terrainData:jr};if(xr){let Li=Ht.segments.get();for(let un of Li)tt.push({segments:new a.a0([un]),sortKey:un.sortKey,state:ii})}else tt.push({segments:Ht.segments,sortKey:0,state:ii})}xr&&tt.sort((We,it)=>We.sortKey-it.sortKey);for(let We of tt){let{programConfiguration:it,program:Dt,layoutVertexBuffer:Ht,indexBuffer:rr,uniformValues:dr,terrainData:Sr}=We.state;Dt.draw(Pr,ve.TRIANGLES,be,Re,Be,Pa.disabled,dr,Sr,Xe.id,Ht,rr,We.segments,Xe.paint,le.transform.zoom,it)}})(w,B,Q,ee);break;case\"heatmap\":(function(le,qe,Xe,ot){if(Xe.paint.get(\"heatmap-opacity\")===0)return;let Tt=le.context;if(le.style.map.terrain){for(let Kt of ot){let Jt=qe.getTile(Kt);qe.hasRenderableParent(Kt)||(le.renderPass===\"offscreen\"?yf(le,Jt,Xe,Kt):le.renderPass===\"translucent\"&&Yc(le,Xe,Kt))}Tt.viewport.set([0,0,le.width,le.height])}else le.renderPass===\"offscreen\"?function(Kt,Jt,xr,Pr){let ve=Kt.context,be=ve.gl,Re=Yo.disabled,Be=new Bs([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(tt,We,it){let Dt=tt.gl;tt.activeTexture.set(Dt.TEXTURE1),tt.viewport.set([0,0,We.width/4,We.height/4]);let Ht=it.heatmapFbos.get(a.aU);Ht?(Dt.bindTexture(Dt.TEXTURE_2D,Ht.colorAttachment.get()),tt.bindFramebuffer.set(Ht.framebuffer)):(Ht=eh(tt,We.width/4,We.height/4),it.heatmapFbos.set(a.aU,Ht))})(ve,Kt,xr),ve.clear({color:a.aM.transparent});for(let tt=0;tt<Pr.length;tt++){let We=Pr[tt];if(Jt.hasRenderableParent(We))continue;let it=Jt.getTile(We),Dt=it.getBucket(xr);if(!Dt)continue;let Ht=Dt.programConfigurations.get(xr.id),rr=Kt.useProgram(\"heatmap\",Ht),{zoom:dr}=Kt.transform;rr.draw(ve,be.TRIANGLES,Po.disabled,Re,Be,Pa.disabled,Co(We.posMatrix,it,dr,xr.paint.get(\"heatmap-intensity\")),null,xr.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,xr.paint,Kt.transform.zoom,Ht)}ve.viewport.set([0,0,Kt.width,Kt.height])}(le,qe,Xe,ot):le.renderPass===\"translucent\"&&function(Kt,Jt){let xr=Kt.context,Pr=xr.gl;xr.setColorMode(Kt.colorModeForRenderPass());let ve=Jt.heatmapFbos.get(a.aU);ve&&(xr.activeTexture.set(Pr.TEXTURE0),Pr.bindTexture(Pr.TEXTURE_2D,ve.colorAttachment.get()),xr.activeTexture.set(Pr.TEXTURE1),th(xr,Jt).bind(Pr.LINEAR,Pr.CLAMP_TO_EDGE),Kt.useProgram(\"heatmapTexture\").draw(xr,Pr.TRIANGLES,Po.disabled,Yo.disabled,Kt.colorModeForRenderPass(),Pa.disabled,Fs(Kt,Jt,0,1),null,Jt.id,Kt.viewportBuffer,Kt.quadTriangleIndexBuffer,Kt.viewportSegments,Jt.paint,Kt.transform.zoom))}(le,Xe)})(w,B,Q,ee);break;case\"line\":(function(le,qe,Xe,ot){if(le.renderPass!==\"translucent\")return;let Tt=Xe.paint.get(\"line-opacity\"),Kt=Xe.paint.get(\"line-width\");if(Tt.constantOr(1)===0||Kt.constantOr(1)===0)return;let Jt=le.depthModeForSublayer(0,Po.ReadOnly),xr=le.colorModeForRenderPass(),Pr=Xe.paint.get(\"line-dasharray\"),ve=Xe.paint.get(\"line-pattern\"),be=ve.constantOr(1),Re=Xe.paint.get(\"line-gradient\"),Be=Xe.getCrossfadeParameters(),tt=be?\"linePattern\":Pr?\"lineSDF\":Re?\"lineGradient\":\"line\",We=le.context,it=We.gl,Dt=!0;for(let Ht of ot){let rr=qe.getTile(Ht);if(be&&!rr.patternsLoaded())continue;let dr=rr.getBucket(Xe);if(!dr)continue;let Sr=dr.programConfigurations.get(Xe.id),Or=le.context.program.get(),jr=le.useProgram(tt,Sr),ii=Dt||jr.program!==Or,Li=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Ht),un=ve.constantOr(null);if(un&&rr.imageAtlas){let Kn=rr.imageAtlas,Aa=Kn.patternPositions[un.to.toString()],fa=Kn.patternPositions[un.from.toString()];Aa&&fa&&Sr.setConstantPatternPositions(Aa,fa)}let sn=Li?Ht:null,In=be?zl(le,rr,Xe,Be,sn):Pr?cs(le,rr,Xe,Pr,Be,sn):Re?cl(le,rr,Xe,dr.lineClipsArray.length,sn):ul(le,rr,Xe,sn);if(be)We.activeTexture.set(it.TEXTURE0),rr.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),Sr.updatePaintBuffers(Be);else if(Pr&&(ii||le.lineAtlas.dirty))We.activeTexture.set(it.TEXTURE0),le.lineAtlas.bind(We);else if(Re){let Kn=dr.gradients[Xe.id],Aa=Kn.texture;if(Xe.gradientVersion!==Kn.version){let fa=256;if(Xe.stepInterpolant){let $a=qe.getSource().maxzoom,ko=Ht.canonical.z===$a?Math.ceil(1<<le.transform.maxZoom-Ht.canonical.z):1;fa=a.ac(a.aV(dr.maxLineLength/a.X*1024*ko),256,We.maxTextureSize)}Kn.gradient=a.aW({expression:Xe.gradientExpression(),evaluationKey:\"lineProgress\",resolution:fa,image:Kn.gradient||void 0,clips:dr.lineClipsArray}),Kn.texture?Kn.texture.update(Kn.gradient):Kn.texture=new g(We,Kn.gradient,it.RGBA),Kn.version=Xe.gradientVersion,Aa=Kn.texture}We.activeTexture.set(it.TEXTURE0),Aa.bind(Xe.stepInterpolant?it.NEAREST:it.LINEAR,it.CLAMP_TO_EDGE)}jr.draw(We,it.TRIANGLES,Jt,le.stencilModeForClipping(Ht),xr,Pa.disabled,In,Li,Xe.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,Xe.paint,le.transform.zoom,Sr,dr.layoutVertexBuffer2),Dt=!1}})(w,B,Q,ee);break;case\"fill\":(function(le,qe,Xe,ot){let Tt=Xe.paint.get(\"fill-color\"),Kt=Xe.paint.get(\"fill-opacity\");if(Kt.constantOr(1)===0)return;let Jt=le.colorModeForRenderPass(),xr=Xe.paint.get(\"fill-pattern\"),Pr=le.opaquePassEnabledForLayer()&&!xr.constantOr(1)&&Tt.constantOr(a.aM.transparent).a===1&&Kt.constantOr(0)===1?\"opaque\":\"translucent\";if(le.renderPass===Pr){let ve=le.depthModeForSublayer(1,le.renderPass===\"opaque\"?Po.ReadWrite:Po.ReadOnly);Hf(le,qe,Xe,ot,ve,Jt,!1)}if(le.renderPass===\"translucent\"&&Xe.paint.get(\"fill-antialias\")){let ve=le.depthModeForSublayer(Xe.getPaintProperty(\"fill-outline-color\")?2:0,Po.ReadOnly);Hf(le,qe,Xe,ot,ve,Jt,!0)}})(w,B,Q,ee);break;case\"fill-extrusion\":(function(le,qe,Xe,ot){let Tt=Xe.paint.get(\"fill-extrusion-opacity\");if(Tt!==0&&le.renderPass===\"translucent\"){let Kt=new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D);if(Tt!==1||Xe.paint.get(\"fill-extrusion-pattern\").constantOr(1))cc(le,qe,Xe,ot,Kt,Yo.disabled,Bs.disabled),cc(le,qe,Xe,ot,Kt,le.stencilModeFor3D(),le.colorModeForRenderPass());else{let Jt=le.colorModeForRenderPass();cc(le,qe,Xe,ot,Kt,Yo.disabled,Jt)}}})(w,B,Q,ee);break;case\"hillshade\":(function(le,qe,Xe,ot){if(le.renderPass!==\"offscreen\"&&le.renderPass!==\"translucent\")return;let Tt=le.context,Kt=le.depthModeForSublayer(0,Po.ReadOnly),Jt=le.colorModeForRenderPass(),[xr,Pr]=le.renderPass===\"translucent\"?le.stencilConfigForOverlap(ot):[{},ot];for(let ve of Pr){let be=qe.getTile(ve);be.needsHillshadePrepare!==void 0&&be.needsHillshadePrepare&&le.renderPass===\"offscreen\"?Nl(le,be,Xe,Kt,Yo.disabled,Jt):le.renderPass===\"translucent\"&&of(le,ve,be,Xe,Kt,xr[ve.overscaledZ],Jt)}Tt.viewport.set([0,0,le.width,le.height])})(w,B,Q,ee);break;case\"raster\":(function(le,qe,Xe,ot){if(le.renderPass!==\"translucent\"||Xe.paint.get(\"raster-opacity\")===0||!ot.length)return;let Tt=le.context,Kt=Tt.gl,Jt=qe.getSource(),xr=le.useProgram(\"raster\"),Pr=le.colorModeForRenderPass(),[ve,be]=Jt instanceof Gt?[{},ot]:le.stencilConfigForOverlap(ot),Re=be[be.length-1].overscaledZ,Be=!le.options.moving;for(let tt of be){let We=le.depthModeForSublayer(tt.overscaledZ-Re,Xe.paint.get(\"raster-opacity\")===1?Po.ReadWrite:Po.ReadOnly,Kt.LESS),it=qe.getTile(tt);it.registerFadeDuration(Xe.paint.get(\"raster-fade-duration\"));let Dt=qe.findLoadedParent(tt,0),Ht=qe.findLoadedSibling(tt),rr=Kc(it,Dt||Ht||null,qe,Xe,le.transform,le.style.map.terrain),dr,Sr,Or=Xe.paint.get(\"raster-resampling\")===\"nearest\"?Kt.NEAREST:Kt.LINEAR;Tt.activeTexture.set(Kt.TEXTURE0),it.texture.bind(Or,Kt.CLAMP_TO_EDGE,Kt.LINEAR_MIPMAP_NEAREST),Tt.activeTexture.set(Kt.TEXTURE1),Dt?(Dt.texture.bind(Or,Kt.CLAMP_TO_EDGE,Kt.LINEAR_MIPMAP_NEAREST),dr=Math.pow(2,Dt.tileID.overscaledZ-it.tileID.overscaledZ),Sr=[it.tileID.canonical.x*dr%1,it.tileID.canonical.y*dr%1]):it.texture.bind(Or,Kt.CLAMP_TO_EDGE,Kt.LINEAR_MIPMAP_NEAREST),it.texture.useMipmap&&Tt.extTextureFilterAnisotropic&&le.transform.pitch>20&&Kt.texParameterf(Kt.TEXTURE_2D,Tt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tt.extTextureFilterAnisotropicMax);let jr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(tt),ii=jr?tt:null,Li=ii?ii.posMatrix:le.transform.calculatePosMatrix(tt.toUnwrapped(),Be),un=fl(Li,Sr||[0,0],dr||1,rr,Xe);Jt instanceof Gt?xr.draw(Tt,Kt.TRIANGLES,We,Yo.disabled,Pr,Pa.disabled,un,jr,Xe.id,Jt.boundsBuffer,le.quadTriangleIndexBuffer,Jt.boundsSegments):xr.draw(Tt,Kt.TRIANGLES,We,ve[tt.overscaledZ],Pr,Pa.disabled,un,jr,Xe.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case\"background\":(function(le,qe,Xe,ot){let Tt=Xe.paint.get(\"background-color\"),Kt=Xe.paint.get(\"background-opacity\");if(Kt===0)return;let Jt=le.context,xr=Jt.gl,Pr=le.transform,ve=Pr.tileSize,be=Xe.paint.get(\"background-pattern\");if(le.isPatternMissing(be))return;let Re=!be&&Tt.a===1&&Kt===1&&le.opaquePassEnabledForLayer()?\"opaque\":\"translucent\";if(le.renderPass!==Re)return;let Be=Yo.disabled,tt=le.depthModeForSublayer(0,Re===\"opaque\"?Po.ReadWrite:Po.ReadOnly),We=le.colorModeForRenderPass(),it=le.useProgram(be?\"backgroundPattern\":\"background\"),Dt=ot||Pr.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});be&&(Jt.activeTexture.set(xr.TEXTURE0),le.imageManager.bind(le.context));let Ht=Xe.getCrossfadeParameters();for(let rr of Dt){let dr=ot?rr.posMatrix:le.transform.calculatePosMatrix(rr.toUnwrapped()),Sr=be?Su(dr,Kt,le,be,{tileID:rr,tileSize:ve},Ht):Zl(dr,Kt,Tt),Or=le.style.map.terrain&&le.style.map.terrain.getTerrainData(rr);it.draw(Jt,xr.TRIANGLES,tt,Be,We,Pa.disabled,Sr,Or,Xe.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case\"custom\":(function(le,qe,Xe){let ot=le.context,Tt=Xe.implementation;if(le.renderPass===\"offscreen\"){let Kt=Tt.prerender;Kt&&(le.setCustomLayerDefaults(),ot.setColorMode(le.colorModeForRenderPass()),Kt.call(Tt,ot.gl,le.transform.customLayerMatrix()),ot.setDirty(),le.setBaseState())}else if(le.renderPass===\"translucent\"){le.setCustomLayerDefaults(),ot.setColorMode(le.colorModeForRenderPass()),ot.setStencilMode(Yo.disabled);let Kt=Tt.renderingMode===\"3d\"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);ot.setDepthMode(Kt),Tt.render(ot.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),ot.setDirty(),le.setBaseState(),ot.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let qe=le?ee===\"map\"?this.transform.angle:0:ee===\"viewport\"?-this.transform.angle:0;if(qe){let Tt=Math.sin(qe),Kt=Math.cos(qe);Q=[Q[0]*Kt-Q[1]*Tt,Q[0]*Tt+Q[1]*Kt]}let Xe=[le?Q[0]:Pn(B,Q[0],this.transform.zoom),le?Q[1]:Pn(B,Q[1],this.transform.zoom),0],ot=new Float32Array(16);return a.J(ot,w,Xe),ot}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\")+(this.style.map.terrain?\"/terrain\":\"\");return this.cache[Q]||(this.cache[Q]=new fn(this.context,jn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Xe=>{let ot=1/(Xe=a.af([],Xe,w))[3]/B*ee;return a.b1(Xe,Xe,[ot,ot,1/Xe[3],ot])}),qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Xe=>{let ot=function(xr,Pr){var ve=Pr[0],be=Pr[1],Re=Pr[2],Be=ve*ve+be*be+Re*Re;return Be>0&&(Be=1/Math.sqrt(Be)),xr[0]=Pr[0]*Be,xr[1]=Pr[1]*Be,xr[2]=Pr[2]*Be,xr}([],function(xr,Pr,ve){var be=Pr[0],Re=Pr[1],Be=Pr[2],tt=ve[0],We=ve[1],it=ve[2];return xr[0]=Re*it-Be*We,xr[1]=Be*tt-be*it,xr[2]=be*We-Re*tt,xr}([],L([],le[Xe[0]],le[Xe[1]]),L([],le[Xe[2]],le[Xe[1]]))),Tt=-((Kt=ot)[0]*(Jt=le[Xe[1]])[0]+Kt[1]*Jt[1]+Kt[2]*Jt[2]);var Kt,Jt;return ot.concat(Tt)});return new ks(le,qe)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=E(this.min),ee=E(this.max);for(let le=0;le<B.length;le++)Q[le]=B[le]?this.min[le]:this.center[le],ee[le]=B[le]?this.center[le]:this.max[le];return ee[2]=this.max[2],new bc(Q,ee)}distanceX(w){return Math.max(Math.min(this.max[0],w[0]),this.min[0])-w[0]}distanceY(w){return Math.max(Math.min(this.max[1],w[1]),this.min[1])-w[1]}intersects(w){let B=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]],Q=!0;for(let ee=0;ee<w.planes.length;ee++){let le=w.planes[ee],qe=0;for(let Xe=0;Xe<B.length;Xe++)a.b2(le,B[Xe])>=0&&qe++;if(qe===0)return 0;qe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,qe=-Number.MAX_VALUE;for(let Xe=0;Xe<w.points.length;Xe++){let ot=w.points[Xe][ee]-this.min[ee];le=Math.min(le,ot),qe=Math.max(qe,ot)}if(qe<0||le>this.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class al{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new al(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var qe=ee[0],Xe=ee[1],ot=ee[2],Tt=ee[3],Kt=Math.sin(le),Jt=Math.cos(le);Q[0]=qe*Jt+ot*Kt,Q[1]=Xe*Jt+Tt*Kt,Q[2]=qe*-Kt+ot*Jt,Q[3]=Xe*-Kt+Tt*Jt}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),qe=this.pointCoordinate(new a.P(0,this.height)),Xe=Math.floor(Math.min(Q.x,ee.x,le.x,qe.x)),ot=Math.floor(Math.max(Q.x,ee.x,le.x,qe.x)),Tt=1;for(let Kt=Xe-Tt;Kt<=ot+Tt;Kt++)Kt!==0&&B.push(new a.b4(Kt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&ee<w.minzoom)return[];w.maxzoom!==void 0&&ee>w.maxzoom&&(ee=w.maxzoom);let qe=this.pointCoordinate(this.getCameraPoint()),Xe=a.Z.fromLngLat(this.center),ot=Math.pow(2,ee),Tt=[ot*qe.x,ot*qe.y,0],Kt=[ot*Xe.x,ot*Xe.y,0],Jt=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),xr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(xr=ee);let Pr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=We=>({aabb:new bc([We*ot,0,0],[(We+1)*ot,ot,0]),zoom:0,x:0,y:0,wrap:We,fullyVisible:!1}),be=[],Re=[],Be=ee,tt=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let We=1;We<=3;We++)be.push(ve(-We)),be.push(ve(We));for(be.push(ve(0));be.length>0;){let We=be.pop(),it=We.x,Dt=We.y,Ht=We.fullyVisible;if(!Ht){let jr=We.aabb.intersects(Jt);if(jr===0)continue;Ht=jr===2}let rr=w.terrain?Tt:Kt,dr=We.aabb.distanceX(rr),Sr=We.aabb.distanceY(rr),Or=Math.max(Math.abs(dr),Math.abs(Sr));if(We.zoom===Be||Or>Pr+(1<<Be-We.zoom)-2&&We.zoom>=xr){let jr=Be-We.zoom,ii=Tt[0]-.5-(it<<jr),Li=Tt[1]-.5-(Dt<<jr);Re.push({tileID:new a.S(We.zoom===Be?tt:We.zoom,We.wrap,We.zoom,it,Dt),distanceSq:_([Kt[0]-.5-it,Kt[1]-.5-Dt]),tileDistanceToCamera:Math.sqrt(ii*ii+Li*Li)})}else for(let jr=0;jr<4;jr++){let ii=(it<<1)+jr%2,Li=(Dt<<1)+(jr>>1),un=We.zoom+1,sn=We.aabb.quadrant(jr);if(w.terrain){let In=new a.S(un,We.wrap,un,ii,Li),Kn=w.terrain.getMinMaxElevation(In),Aa=(B=Kn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Kn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;sn=new bc([sn.min[0],sn.min[1],Aa],[sn.max[0],sn.max[1],fa])}be.push({aabb:sn,zoom:un,x:ii,y:Li,wrap:We.wrap,fullyVisible:Ht})}}return Re.sort((We,it)=>We.distanceSq-it.distanceSq).map(We=>We.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let qe=Q+B-le,Xe=Math.cos(this._pitch)*this.cameraToCenterDistance/qe/a.b5(1,ee.lat),ot=this.scaleZoom(Xe/this.tileSize);this._elevation=le,this._center=ee,this.zoom=ot}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),qe=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(qe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let xr=B.pointCoordinate(w);if(xr!=null)return xr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],qe=ee[3],Xe=Q[1]/le,ot=ee[1]/qe,Tt=Q[2]/le,Kt=ee[2]/qe,Jt=Tt===Kt?0:(0-Tt)/(Kt-Tt);return new a.Z(a.y.number(Q[0]/le,ee[0]/qe,Jt)/this.worldSize,a.y.number(Xe,ot,Jt)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let We=179.9999999999;ee=[-We,We]}let le=this.tileSize*this.zoomScale(Q.zoom),qe=0,Xe=le,ot=0,Tt=le,Kt=0,Jt=0,{x:xr,y:Pr}=this.size;if(this.latRange){let We=this.latRange;qe=a.Q(We[1])*le,Xe=a.Q(We[0])*le,Xe-qe<Pr&&(Kt=Pr/(Xe-qe))}ee&&(ot=a.b3(a.O(ee[0])*le,0,le),Tt=a.b3(a.O(ee[1])*le,0,le),Tt<ot&&(Tt+=le),Tt-ot<xr&&(Jt=xr/(Tt-ot)));let{x:ve,y:be}=this.project.call({worldSize:le},w),Re,Be,tt=Math.max(Jt||0,Kt||0);if(tt){let We=new a.P(Jt?(Tt+ot)/2:ve,Kt?(Xe+qe)/2:be);return Q.center=this.unproject.call({worldSize:le},We).wrap(),Q.zoom+=this.scaleZoom(tt),Q}if(this.latRange){let We=Pr/2;be-We<qe&&(Be=qe+We),be+We>Xe&&(Be=Xe-We)}if(ee){let We=(ot+Tt)/2,it=ve;this._renderWorldCopies&&(it=a.b3(ve,We-le/2,We+le/2));let Dt=xr/2;it-Dt<ot&&(Re=ot+Dt),it+Dt>Tt&&(Re=Tt-Dt)}if(Re!==void 0||Be!==void 0){let We=new a.P(Re!=null?Re:ve,Be!=null?Be:be);Q.center=this.unproject.call({worldSize:le},We).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),qe=Math.min(this.elevation,this.minElevationForCurrentTile),Xe=le-qe*this._pixelPerMeter/Math.cos(this._pitch),ot=qe<0?Xe:le,Tt=Math.PI/2+this._pitch,Kt=this._fov*(.5+w.y/this.height),Jt=Math.sin(Kt)*ot/Math.sin(a.ac(Math.PI-Tt-Kt,.01,Math.PI-.01)),xr=this.getHorizon(),Pr=2*Math.atan(xr/this.cameraToCenterDistance)*(.5+w.y/(2*xr)),ve=Math.sin(Pr)*ot/Math.sin(a.ac(Math.PI-Tt-Pr,.01,Math.PI-.01)),be=Math.min(Jt,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+ot),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let Re=this.width%2/2,Be=this.height%2/2,tt=Math.cos(this.angle),We=Math.sin(this.angle),it=B-Math.round(B)+tt*Re+We*Be,Dt=Q-Math.round(Q)+tt*Be+We*Re,Ht=new Float64Array(ee);if(a.J(Ht,Ht,[it>.5?it-1:it,Dt>.5?Dt-1:Dt,0]),this.alignedModelViewProjectionMatrix=Ht,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,qe=B.y;for(let Xe of w)Q=Math.min(Q,Xe.x),ee=Math.min(ee,Xe.y),le=Math.max(le,Xe.x),qe=Math.max(qe,Xe.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,qe),new a.P(Q,qe),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,qe=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(qe,w),Q=!1)};return(...Xe)=>(Q=!0,le=this,B=Xe,ee||qe(),ee)}class bh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace(\"#\",\"\");if(this._hashName){let Q;return B.split(\"&\").map(ee=>ee.split(\"=\")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||\"\").split(\"/\")}return B.split(\"/\")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join(\"/\"),ee=Q;ee.split(\"&\").length>0&&(ee=ee.split(\"&\")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,\"\");le.startsWith(\"#&\")?le=le.slice(0,1)+le.slice(2):le===\"#\"&&(le=\"\");let qe=window.location.href.replace(/(#.+)?$/,le);qe=qe.replace(\"&&\",\"&\"),window.history.replaceState(window.history.state,null,qe)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this}remove(){return removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),qe=Math.round(B.lng*le)/le,Xe=Math.round(B.lat*le)/le,ot=this._map.getBearing(),Tt=this._map.getPitch(),Kt=\"\";if(Kt+=w?`/${qe}/${Xe}/${Q}`:`${Q}/${Xe}/${qe}`,(ot||Tt)&&(Kt+=\"/\"+Math.round(10*ot)/10),Tt&&(Kt+=`/${Math.round(Tt)}`),this._hashName){let Jt=this._hashName,xr=!1,Pr=window.location.hash.slice(1).split(\"&\").map(ve=>{let be=ve.split(\"=\")[0];return be===Jt?(xr=!0,`${be}=${Kt}`):ve}).filter(ve=>ve);return xr||Pr.push(`${Jt}=${Kt}`),`#${Pr.join(\"&\")}`}return`#${Kt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),_f=a.e({deceleration:1e3,maxSpeed:90},zu);class Lf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=xf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,Ou(ee,le)}if(B.zoom){let le=xf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,Ou(ee,le)}if(B.bearing){let le=xf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),Ou(ee,le)}if(B.pitch){let le=xf(B.pitch,Q,_f);ee.pitch=this._map.transform.pitch+le.amount,Ou(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Ou(ue,w){(!ue.duration||ue.duration<w.duration)&&(ue.duration=w.duration,ue.easing=w.easing)}function xf(ue,w,B){let{maxSpeed:Q,linearity:ee,deceleration:le}=B,qe=a.ac(ue*ee/(w/1e3),-Q,Q),Xe=Math.abs(qe)/(le*ee);return{easing:B.easing,duration:1e3*Xe,amount:qe*(Xe/2)}}class jl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q,ee={}){let le=c.mousePos(B.getCanvas(),Q),qe=B.unproject(le);super(w,a.e({point:le,lngLat:qe,originalEvent:Q},ee)),this._defaultPrevented=!1,this.target=B}}class lf extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){let ee=w===\"touchend\"?Q.changedTouches:Q.touches,le=c.touchPos(B.getCanvasContainer(),ee),qe=le.map(ot=>B.unproject(ot)),Xe=le.reduce((ot,Tt,Kt,Jt)=>ot.add(Tt.div(Jt.length)),new a.P(0,0));super(w,{points:le,point:Xe,lngLats:qe,lngLat:B.unproject(Xe),originalEvent:Q}),this._defaultPrevented=!1}}class Vh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class Pf{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Vh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ls{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens(\"contextmenu\")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class Cu{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)<this._clickTolerance)return;let ee=this._startPos;this._lastPos=Q,this._box||(this._box=c.create(\"div\",\"maplibregl-boxzoom\",this._container),this._container.classList.add(\"maplibregl-crosshair\"),this._fireEvent(\"boxzoomstart\",w));let le=Math.min(ee.x,Q.x),qe=Math.max(ee.x,Q.x),Xe=Math.min(ee.y,Q.y),ot=Math.max(ee.y,Q.y);c.setTransform(this._box,`translate(${le}px,${Xe}px)`),this._box.style.width=qe-le+\"px\",this._box.style.height=ot-Xe+\"px\"}mouseupWindow(w,B){if(!this._active||w.button!==0)return;let Q=this._startPos,ee=B;if(this.reset(),c.suppressClick(),Q.x!==ee.x||Q.y!==ee.y)return this._map.fire(new a.k(\"boxzoomend\",{originalEvent:w})),{cameraAnimation:le=>le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent(\"boxzoomcancel\",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent(\"boxzoomcancel\",w))}reset(){this._active=!1,this._container.classList.remove(\"maplibregl-crosshair\"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Wf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Q<ue.length;Q++)B[ue[Q].identifier]=w[Q];return B}class Vs{constructor(w){this.reset(),this.numTouches=w.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(w,B,Q){(this.centroid||Q.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let qe of ee)le._add(qe);return le.div(ee.length)}(B),this.touches=Wf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Wf(Q,B);for(let le in this.touches){let qe=ee[le];(!qe||qe.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class bf{constructor(w){this.singleTap=new Vs(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,qe=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&qe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new bf({numTouches:1,numTaps:2}),this._zoomOut=new bf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),qe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:qe.zoom+1,around:qe.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:qe.zoom-1,around:qe.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=ee,this._move(Q,ee))}dragEnd(w){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(w)&&(this._moved&&c.suppressClick(),this.reset(w))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let If={0:1,2:2};class Xu{constructor(w){this._correctEvent=w.checkCorrectEvent}startMove(w){let B=c.mouseButton(w);this._eventButton=B}endMove(w){delete this._eventButton}isValidStartEvent(w){return this._correctEvent(w)}isValidMoveEvent(w){return!function(B,Q){let ee=If[Q];return B.buttons===void 0||(B.buttons&ee)!==ee}(w,this._eventButton)}isValidEndEvent(w){return c.mouseButton(w)===this._eventButton}}class uf{constructor(){this._firstTouch=void 0}_isOneFingerTouch(w){return w.targetTouches.length===1}_isSameTouchEvent(w){return w.targetTouches[0].identifier===this._firstTouch}startMove(w){this._firstTouch=w.targetTouches[0].identifier}endMove(w){delete this._firstTouch}isValidStartEvent(w){return this._isOneFingerTouch(w)}isValidMoveEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}isValidEndEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}}let Xf=ue=>{ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Xf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Xf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked(\"touch_pan\",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Wf(Q,B),le=new a.P(0,0),qe=new a.P(0,0),Xe=0;for(let Tt in ee){let Kt=ee[Tt],Jt=this._touches[Tt];Jt&&(le._add(Kt),qe._add(Kt.sub(Jt)),Xe++,ee[Tt]=Kt)}if(this._touches=ee,this._shouldBePrevented(Xe)||!qe.mag())return;let ot=qe.div(Xe);return this._sum._add(ot),this._sum.mag()<this._clickTolerance?void 0:{around:le.div(Xe),panDelta:ot}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Oc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(w,B,Q){this._firstTwoTouches||Q.length<2||(this._firstTwoTouches=[Q[0].identifier,Q[1].identifier],this._start([B[0],B[1]]))}touchmove(w,B,Q){if(!this._firstTwoTouches)return;w.preventDefault();let[ee,le]=this._firstTwoTouches,qe=Tc(Q,B,ee),Xe=Tc(Q,B,le);if(!qe||!Xe)return;let ot=this._aroundCenter?null:qe.add(Xe).div(2);return this._move([qe,Xe],ot,w)}touchend(w,B,Q){if(!this._firstTwoTouches)return;let[ee,le]=this._firstTwoTouches,qe=Tc(Q,B,ee),Xe=Tc(Q,B,le);qe&&Xe||(this._active&&c.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(w){this._enabled=!0,this._aroundCenter=!!w&&w.around===\"center\"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Tc(ue,w,B){for(let Q=0;Q<ue.length;Q++)if(ue[Q].identifier===B)return w[Q]}function Tl(ue,w){return Math.log(ue/w)/Math.LN2}class vu extends Oc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(w){this._startDistance=this._distance=w[0].dist(w[1])}_move(w,B){let Q=this._distance;if(this._distance=w[0].dist(w[1]),this._active||!(Math.abs(Tl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Tl(this._distance,Q),pinchAround:B}}}function qc(ue,w){return 180*ue.angleWith(w)/Math.PI}class cf extends Oc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(w){this._startVector=this._vector=w[0].sub(w[1]),this._minDiameter=w[0].dist(w[1])}_move(w,B,Q){let ee=this._vector;if(this._vector=w[0].sub(w[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:qc(this._vector,ee),pinchAround:B}}_isBelowThreshold(w){this._minDiameter=Math.min(this._minDiameter,w.mag());let B=25/(Math.PI*this._minDiameter)*360,Q=qc(w,this._startVector);return Math.abs(Q)<B}}function fc(ue){return Math.abs(ue.y)>Math.abs(ue.x)}class Bc extends Oc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let qe=w.y>0==B.y>0;return fc(w)&&fc(B)&&qe}}let At={panStep:100,bearingStep:15,pitchStep:10};class Xt{constructor(w){this._tr=new du(w);let B=At;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,qe=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),qe=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),qe=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Xe=>{let ot=this._tr;Xe.easeTo({duration:300,easeId:\"keyboardHandler\",easing:kr,zoom:B?Math.round(ot.zoom)+B*(w.shiftKey?2:1):ot.zoom,bearing:ot.bearing+Q*this._bearingStep,pitch:ot.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-qe*this._panStep],center:ot.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function kr(ue){return ue*(2-ue)}let Ar=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around===\"center\")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked(\"wheel_zoom\",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%Ar==0?this._type=\"wheel\":B!==0&&Math.abs(B)<4?this._type=\"trackpad\":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let ot=this._type===\"wheel\"&&Math.abs(this._delta)>Ar?this._wheelZoomRate:this._defaultZoomRate,Tt=2/(1+Math.exp(-Math.abs(this._delta*ot)));this._delta<0&&Tt!==0&&(Tt=1/Tt);let Kt=typeof this._targetZoom==\"number\"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Kt*Tt))),this._type===\"wheel\"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom==\"number\"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,qe=!1,Xe=u.now()-this._lastWheelEventTime;if(this._type===\"wheel\"&&Q&&ee&&Xe){let ot=Math.min(Xe/200,1),Tt=ee(ot);le=a.y.number(Q,B,Tt),ot<1?this._frameId||(this._frameId=!0):qe=!0}else le=B,qe=!0;return this._active=!0,qe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qe,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),qe=.27/Math.sqrt(le*le+1e-4)*.01,Xe=Math.sqrt(.0729-qe*qe);B=a.b8(qe,Xe,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ei{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Wi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hn{constructor(){this._tap=new bf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,qe=this._tapPoint.dist(ee)<30;le&&qe?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Tn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"maplibregl-touch-drag-pan\")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"maplibregl-touch-drag-pan\")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Bn{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Zi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add(\"maplibregl-touch-zoom-rotate\")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"maplibregl-touch-zoom-rotate\")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $i{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf(\"Mac\")!==-1?\"metaKey\":\"ctrlKey\",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add(\"maplibregl-cooperative-gestures\"),this._container=c.create(\"div\",\"maplibregl-cooperative-gesture-screen\",w);let B=this._map._getUIString(\"CooperativeGesturesHandler.WindowsHelpText\");this._bypassKey===\"metaKey\"&&(B=this._map._getUIString(\"CooperativeGesturesHandler.MacHelpText\"));let Q=this._map._getUIString(\"CooperativeGesturesHandler.MobileHelpText\"),ee=document.createElement(\"div\");ee.className=\"maplibregl-desktop-message\",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement(\"div\");le.className=\"maplibregl-mobile-message\",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute(\"aria-hidden\",\"true\")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove(\"maplibregl-cooperative-gestures\")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k(\"cooperativegestureprevented\",{gestureType:w,originalEvent:B})),this._container.classList.add(\"maplibregl-show\"),setTimeout(()=>{this._container.classList.remove(\"maplibregl-show\")},100))}}let an=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Di extends a.k{}function $n(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class ka{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type===\"blur\")return void this.stop(!0);this._updatingCamera=!0;let qe=ee.type===\"renderFrame\"?void 0:ee,Xe={needsRenderFrame:!1},ot={},Tt={},Kt=ee.touches,Jt=Kt?this._getMapTouches(Kt):void 0,xr=Jt?c.touchPos(this._map.getCanvas(),Jt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:Re,allowed:Be}of this._handlers){if(!Re.isEnabled())continue;let tt;this._blockedByActive(Tt,Be,be)?Re.reset():Re[le||ee.type]&&(tt=Re[le||ee.type](ee,xr,Jt),this.mergeHandlerResult(Xe,ot,tt,be,qe),tt&&tt.needsRenderFrame&&this._triggerRenderFrame()),(tt||Re.isActive())&&(Tt[be]=Re)}let Pr={};for(let be in this._previousActiveHandlers)Tt[be]||(Pr[be]=qe);this._previousActiveHandlers=Tt,(Object.keys(Pr).length||$n(Xe))&&(this._changes.push([Xe,ot,Pr]),this._triggerRenderFrame()),(Object.keys(Tt).length||$n(Xe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Xe;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Lf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,\"touchstart\",{passive:!0}],[Q,\"touchmove\",{passive:!1}],[Q,\"touchend\",void 0],[Q,\"touchcancel\",void 0],[Q,\"mousedown\",void 0],[Q,\"mousemove\",void 0],[Q,\"mouseup\",void 0],[document,\"mousemove\",{capture:!0}],[document,\"mouseup\",void 0],[Q,\"mouseover\",void 0],[Q,\"mouseout\",void 0],[Q,\"dblclick\",void 0],[Q,\"click\",void 0],[Q,\"keydown\",{capture:!1}],[Q,\"keyup\",void 0],[Q,\"wheel\",{passive:!1}],[Q,\"contextmenu\",void 0],[window,\"blur\",void 0]];for(let[ee,le,qe]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,qe)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add(\"mapEvent\",new Pf(B,w));let ee=B.boxZoom=new Cu(B,w);this._add(\"boxZoom\",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new $i(B,w.cooperativeGestures);this._add(\"cooperativeGestures\",le),w.cooperativeGestures&&le.enable();let qe=new zc(B),Xe=new Wi(B);B.doubleClickZoom=new Ei(Xe,qe),this._add(\"tapZoom\",qe),this._add(\"clickZoom\",Xe),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let ot=new hn;this._add(\"tapDragZoom\",ot);let Tt=B.touchPitch=new Bc(B);this._add(\"touchPitch\",Tt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Kt=Wl(w),Jt=ah(w);B.dragRotate=new Bn(w,Kt,Jt),this._add(\"mouseRotate\",Kt,[\"mousePitch\"]),this._add(\"mousePitch\",Jt,[\"mouseRotate\"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let xr=(({enable:tt,clickTolerance:We})=>{let it=new Xu({checkCorrectEvent:Dt=>c.mouseButton(Dt)===0&&!Dt.ctrlKey});return new Wu({clickTolerance:We,move:(Dt,Ht)=>({around:Ht,panDelta:Ht.sub(Dt)}),activateOnStart:!0,moveStateManager:it,enable:tt,assignEvents:Xf})})(w),Pr=new Zu(w,B);B.dragPan=new Tn(Q,xr,Pr),this._add(\"mousePan\",xr),this._add(\"touchPan\",Pr,[\"touchZoom\",\"touchRotate\"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,be=new vu;B.touchZoomRotate=new Zi(Q,be,ve,ot),this._add(\"touchRotate\",ve,[\"touchPan\",\"touchZoom\"]),this._add(\"touchZoom\",be,[\"touchPan\",\"touchRotate\"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Re=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add(\"scrollZoom\",Re,[\"mousePan\"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Be=B.keyboard=new Xt(B);this._add(\"keyboard\",Be),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add(\"blockableMapEvent\",new Ls(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!an(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let qe={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=qe),Q.panDelta!==void 0&&(B.drag=qe),Q.pitchDelta!==void 0&&(B.pitch=qe),Q.bearingDelta!==void 0&&(B.rotate=qe)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,qe]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,qe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),qe=ee.terrain;if(!($n(w)||qe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Xe,zoomDelta:ot,bearingDelta:Tt,pitchDelta:Kt,around:Jt,pinchAround:xr}=w;xr!==void 0&&(Jt=xr),ee._stop(!0),Jt=Jt||ee.transform.centerPoint;let Pr=le.pointLocation(Xe?Jt.sub(Xe):Jt);Tt&&(le.bearing+=Tt),Kt&&(le.pitch+=Kt),ot&&(le.zoom+=ot),qe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Xe)):le.setLocationAtPoint(Pr,Jt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Pr,Jt)):le.setLocationAtPoint(Pr,Jt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=an(this._eventsInProgress),le=an(w),qe={};for(let Jt in w){let{originalEvent:xr}=w[Jt];this._eventsInProgress[Jt]||(qe[`${Jt}start`]=xr),this._eventsInProgress[Jt]=w[Jt]}!ee&&le&&this._fireEvent(\"movestart\",le.originalEvent);for(let Jt in qe)this._fireEvent(Jt,qe[Jt]);le&&this._fireEvent(\"move\",le.originalEvent);for(let Jt in w){let{originalEvent:xr}=w[Jt];this._fireEvent(Jt,xr)}let Xe={},ot;for(let Jt in this._eventsInProgress){let{handlerName:xr,originalEvent:Pr}=this._eventsInProgress[Jt];this._handlersById[xr].isActive()||(delete this._eventsInProgress[Jt],ot=B[xr]||Pr,Xe[`${Jt}end`]=ot)}for(let Jt in Xe)this._fireEvent(Jt,Xe[Jt]);let Tt=an(this._eventsInProgress),Kt=(ee||le)&&!Tt;if(Kt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Jt=this._map._getTransformForUpdate();Jt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Jt)}if(Q&&Kt){this._updatingCamera=!0;let Jt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),xr=Pr=>Pr!==0&&-this._bearingSnap<Pr&&Pr<this._bearingSnap;!Jt||!Jt.essential&&u.prefersReducedMotion?(this._map.fire(new a.k(\"moveend\",{originalEvent:ot})),xr(this._map.getBearing())&&this._map.resetNorth()):(xr(Jt.bearing||this._map.getBearing())&&(Jt.bearing=0),Jt.freezeElevation=!0,this._map.easeTo(Jt,{originalEvent:ot})),this._updatingCamera=!1}}_fireEvent(w,B){this._map.fire(new a.k(w,B?{originalEvent:B}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(w=>{delete this._frameId,this.handleEvent(new Di(\"renderFrame\",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on(\"moveend\",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(w,B):this}getPitch(){return this.transform.pitch}setPitch(w,B){return this.jumpTo({pitch:w},B),this}cameraForBounds(w,B){w=ce.convert(w).adjustAntiMeridian();let Q=B&&B.bearing||0;return this._cameraForBoxAndBearing(w.getNorthWest(),w.getSouthEast(),Q,B)}_cameraForBoxAndBearing(w,B,Q,ee){let le={top:0,bottom:0,right:0,left:0};if(typeof(ee=a.e({padding:le,offset:[0,0],maxZoom:this.transform.maxZoom},ee)).padding==\"number\"){let jr=ee.padding;ee.padding={top:jr,bottom:jr,right:jr,left:jr}}ee.padding=a.e(le,ee.padding);let qe=this.transform,Xe=qe.padding,ot=new ce(w,B),Tt=qe.project(ot.getNorthWest()),Kt=qe.project(ot.getNorthEast()),Jt=qe.project(ot.getSouthEast()),xr=qe.project(ot.getSouthWest()),Pr=a.ba(-Q),ve=Tt.rotate(Pr),be=Kt.rotate(Pr),Re=Jt.rotate(Pr),Be=xr.rotate(Pr),tt=new a.P(Math.max(ve.x,be.x,Be.x,Re.x),Math.max(ve.y,be.y,Be.y,Re.y)),We=new a.P(Math.min(ve.x,be.x,Be.x,Re.x),Math.min(ve.y,be.y,Be.y,Re.y)),it=tt.sub(We),Dt=(qe.width-(Xe.left+Xe.right+ee.padding.left+ee.padding.right))/it.x,Ht=(qe.height-(Xe.top+Xe.bottom+ee.padding.top+ee.padding.bottom))/it.y;if(Ht<0||Dt<0)return void a.w(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\");let rr=Math.min(qe.scaleZoom(qe.scale*Math.min(Dt,Ht)),ee.maxZoom),dr=a.P.convert(ee.offset),Sr=new a.P((ee.padding.left-ee.padding.right)/2,(ee.padding.top-ee.padding.bottom)/2).rotate(a.ba(Q)),Or=dr.add(Sr).mult(qe.scale/qe.zoomScale(rr));return{center:qe.unproject(Tt.add(Jt).div(2).sub(Or)),zoom:rr,bearing:Q}}fitBounds(w,B,Q){return this._fitInternal(this.cameraForBounds(w,B),B,Q)}fitScreenCoordinates(w,B,Q,ee,le){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.P.convert(w)),this.transform.pointLocation(a.P.convert(B)),Q,ee),ee,le)}_fitInternal(w,B,Q){return w?(delete(B=a.e(w,B)).padding,B.linear?this.easeTo(B,Q):this.flyTo(B,Q)):this}jumpTo(w,B){this.stop();let Q=this._getTransformForUpdate(),ee=!1,le=!1,qe=!1;return\"zoom\"in w&&Q.zoom!==+w.zoom&&(ee=!0,Q.zoom=+w.zoom),w.center!==void 0&&(Q.center=a.N.convert(w.center)),\"bearing\"in w&&Q.bearing!==+w.bearing&&(le=!0,Q.bearing=+w.bearing),\"pitch\"in w&&Q.pitch!==+w.pitch&&(qe=!0,Q.pitch=+w.pitch),w.padding==null||Q.isPaddingEqual(w.padding)||(Q.padding=w.padding),this._applyUpdatedTransform(Q),this.fire(new a.k(\"movestart\",B)).fire(new a.k(\"move\",B)),ee&&this.fire(new a.k(\"zoomstart\",B)).fire(new a.k(\"zoom\",B)).fire(new a.k(\"zoomend\",B)),le&&this.fire(new a.k(\"rotatestart\",B)).fire(new a.k(\"rotate\",B)).fire(new a.k(\"rotateend\",B)),qe&&this.fire(new a.k(\"pitchstart\",B)).fire(new a.k(\"pitch\",B)).fire(new a.k(\"pitchend\",B)),this.fire(new a.k(\"moveend\",B))}calculateCameraOptionsFromTo(w,B,Q,ee=0){let le=a.Z.fromLngLat(w,B),qe=a.Z.fromLngLat(Q,ee),Xe=qe.x-le.x,ot=qe.y-le.y,Tt=qe.z-le.z,Kt=Math.hypot(Xe,ot,Tt);if(Kt===0)throw new Error(\"Can't calculate camera options with same From and To\");let Jt=Math.hypot(Xe,ot),xr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Kt/this.transform.tileSize),Pr=180*Math.atan2(Xe,-ot)/Math.PI,ve=180*Math.acos(Jt/Kt)/Math.PI;return ve=Tt<0?90-ve:90+ve,{center:qe.toLngLat(),zoom:xr,pitch:ve,bearing:Pr}}easeTo(w,B){var Q;this._stop(!1,w.easeId),((w=a.e({offset:[0,0],duration:500,easing:a.b9},w)).animate===!1||!w.essential&&u.prefersReducedMotion)&&(w.duration=0);let ee=this._getTransformForUpdate(),le=ee.zoom,qe=ee.bearing,Xe=ee.pitch,ot=ee.padding,Tt=\"bearing\"in w?this._normalizeBearing(w.bearing,qe):qe,Kt=\"pitch\"in w?+w.pitch:Xe,Jt=\"padding\"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Pr=ee.centerPoint.add(xr),ve=ee.pointLocation(Pr),{center:be,zoom:Re}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let Be=ee.project(ve),tt=ee.project(be).sub(Be),We=ee.zoomScale(Re-le),it,Dt;w.around&&(it=a.N.convert(w.around),Dt=ee.locationPoint(it));let Ht={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Re!==le,this._rotating=this._rotating||qe!==Tt,this._pitching=this._pitching||Kt!==Xe,this._padding=!ee.isPaddingEqual(Jt),this._easeId=w.easeId,this._prepareEase(B,w.noMoveStart,Ht),this.terrain&&this._prepareElevation(be),this._ease(rr=>{if(this._zooming&&(ee.zoom=a.y.number(le,Re,rr)),this._rotating&&(ee.bearing=a.y.number(qe,Tt,rr)),this._pitching&&(ee.pitch=a.y.number(Xe,Kt,rr)),this._padding&&(ee.interpolatePadding(ot,Jt,rr),Pr=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(rr),it)ee.setLocationAtPoint(it,Dt);else{let dr=ee.zoomScale(ee.zoom-le),Sr=Re>le?Math.min(2,We):Math.max(.5,We),Or=Math.pow(Sr,1-rr),jr=ee.unproject(Be.add(tt.mult(rr*Or)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?jr.wrap():jr,Pr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},rr=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,rr)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k(\"movestart\",w)),this._zooming&&!Q.zooming&&this.fire(new a.k(\"zoomstart\",w)),this._rotating&&!Q.rotating&&this.fire(new a.k(\"rotatestart\",w)),this._pitching&&!Q.pitching&&this.fire(new a.k(\"pitchstart\",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitude<Q){let ee=this.calculateCameraOptionsFromTo(B.lngLat,Q,w.center,w.elevation);return{pitch:ee.pitch,zoom:ee.zoom}}return{}}_applyUpdatedTransform(w){let B=[];if(this.terrain&&B.push(ee=>this._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:qe,zoom:Xe,pitch:ot,bearing:Tt,elevation:Kt}=ee(le);qe&&(le.center=qe),Xe!==void 0&&(le.zoom=Xe),ot!==void 0&&(le.pitch=ot),Tt!==void 0&&(le.bearing=Tt),Kt!==void 0&&(le.elevation=Kt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k(\"move\",w)),this._zooming&&this.fire(new a.k(\"zoom\",w)),this._rotating&&this.fire(new a.k(\"rotate\",w)),this._pitching&&this.fire(new a.k(\"pitch\",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k(\"zoomend\",w)),ee&&this.fire(new a.k(\"rotateend\",w)),le&&this.fire(new a.k(\"pitchend\",w)),this.fire(new a.k(\"moveend\",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let In=a.M(w,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(In,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,qe=ee.bearing,Xe=ee.pitch,ot=ee.padding,Tt=\"bearing\"in w?this._normalizeBearing(w.bearing,qe):qe,Kt=\"pitch\"in w?+w.pitch:Xe,Jt=\"padding\"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Pr=ee.centerPoint.add(xr),ve=ee.pointLocation(Pr),{center:be,zoom:Re}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let Be=ee.zoomScale(Re-le),tt=ee.project(ve),We=ee.project(be).sub(tt),it=w.curve,Dt=Math.max(ee.width,ee.height),Ht=Dt/Be,rr=We.mag();if(\"minZoom\"in w){let In=a.ac(Math.min(w.minZoom,le,Re),ee.minZoom,ee.maxZoom),Kn=Dt/ee.zoomScale(In-le);it=Math.sqrt(Kn/rr*2)}let dr=it*it;function Sr(In){let Kn=(Ht*Ht-Dt*Dt+(In?-1:1)*dr*dr*rr*rr)/(2*(In?Ht:Dt)*dr*rr);return Math.log(Math.sqrt(Kn*Kn+1)-Kn)}function Or(In){return(Math.exp(In)-Math.exp(-In))/2}function jr(In){return(Math.exp(In)+Math.exp(-In))/2}let ii=Sr(!1),Li=function(In){return jr(ii)/jr(ii+it*In)},un=function(In){return Dt*((jr(ii)*(Or(Kn=ii+it*In)/jr(Kn))-Or(ii))/dr)/rr;var Kn},sn=(Sr(!0)-ii)/it;if(Math.abs(rr)<1e-6||!isFinite(sn)){if(Math.abs(Dt-Ht)<1e-6)return this.easeTo(w,B);let In=Ht<Dt?-1:1;sn=Math.abs(Math.log(Ht/Dt))/it,un=()=>0,Li=Kn=>Math.exp(In*it*Kn)}return w.duration=\"duration\"in w?+w.duration:1e3*sn/(\"screenSpeed\"in w?+w.screenSpeed/it:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=qe!==Tt,this._pitching=Kt!==Xe,this._padding=!ee.isPaddingEqual(Jt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(In=>{let Kn=In*sn,Aa=1/Li(Kn);ee.zoom=In===1?Re:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(qe,Tt,In)),this._pitching&&(ee.pitch=a.y.number(Xe,Kt,In)),this._padding&&(ee.interpolatePadding(ot,Jt,In),Pr=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(In);let fa=In===1?be:ee.unproject(tt.add(We.mult(un(Kn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Pr),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)<Q&&(w-=360),Math.abs(w+360-B)<Q&&(w+=360),w}_normalizeCenter(w,B){if(!B.renderWorldCopies||B.lngRange)return;let Q=w.lng-B.center.lng;w.lng+=Q>180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'<a href=\"https://maplibre.org/\" target=\"_blank\">MapLibre</a>'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains(\"maplibregl-compact\")&&(this._container.classList.contains(\"maplibregl-compact-show\")?(this._container.setAttribute(\"open\",\"\"),this._container.classList.remove(\"maplibregl-compact-show\")):(this._container.classList.add(\"maplibregl-compact-show\"),this._container.removeAttribute(\"open\")))},this._updateData=B=>{!B||B.sourceDataType!==\"metadata\"&&B.sourceDataType!==\"visibility\"&&B.dataType!==\"style\"&&B.type!==\"terrain\"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute(\"open\",\"\"):this._container.classList.contains(\"maplibregl-compact\")||this._container.classList.contains(\"maplibregl-attrib-empty\")||(this._container.setAttribute(\"open\",\"\"),this._container.classList.add(\"maplibregl-compact\",\"maplibregl-compact-show\")):(this._container.setAttribute(\"open\",\"\"),this._container.classList.contains(\"maplibregl-compact\")&&this._container.classList.remove(\"maplibregl-compact\",\"maplibregl-compact-show\"))},this._updateCompactMinimize=()=>{this._container.classList.contains(\"maplibregl-compact\")&&this._container.classList.contains(\"maplibregl-compact-show\")&&this._container.classList.remove(\"maplibregl-compact-show\")},this.options=w}getDefaultPosition(){return\"bottom-right\"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create(\"details\",\"maplibregl-ctrl maplibregl-ctrl-attrib\"),this._compactButton=c.create(\"summary\",\"maplibregl-ctrl-attrib-button\",this._container),this._compactButton.addEventListener(\"click\",this._toggleAttribution),this._setElementTitle(this._compactButton,\"ToggleAttribution\"),this._innerContainer=c.create(\"div\",\"maplibregl-ctrl-attrib-inner\",this._container),this._updateAttributions(),this._updateCompact(),this._map.on(\"styledata\",this._updateData),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"terrain\",this._updateData),this._map.on(\"resize\",this._updateCompact),this._map.on(\"drag\",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"terrain\",this._updateData),this._map.off(\"resize\",this._updateCompact),this._map.off(\"drag\",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute(\"aria-label\",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!=\"string\"?\"\":ee)):typeof this.options.customAttribution==\"string\"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let qe=le.getSource();qe.attribution&&w.indexOf(qe.attribution)<0&&w.push(qe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let qe=le+1;qe<w.length;qe++)if(w[qe].indexOf(ee)>=0)return!1;return!0});let Q=w.join(\" | \");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove(\"maplibregl-attrib-empty\")):this._container.classList.add(\"maplibregl-attrib-empty\"),this._updateCompact(),this._editLink=null)}}class Yn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add(\"maplibregl-compact\"):Q.classList.remove(\"maplibregl-compact\")}},this.options=w}getDefaultPosition(){return\"bottom-left\"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create(\"div\",\"maplibregl-ctrl\");let B=c.create(\"a\",\"maplibregl-ctrl-logo\");return B.target=\"_blank\",B.rel=\"noopener nofollow\",B.href=\"https://maplibre.org/\",B.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),B.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(B),this._container.style.display=\"block\",this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._compact=void 0}}class zn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error(\"Attempting to run(), but is already running.\");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:\"a_pos3d\",type:\"Int16\",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Ut(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let qe=ee.canonical.z-w.canonical.z,Xe=ee.canonical.x-(ee.canonical.x>>qe<<qe),ot=ee.canonical.y-(ee.canonical.y>>qe<<qe),Tt=a.X>>qe;a.aP(le.posMatrix,0,Tt,0,Tt,0,1),a.J(le.posMatrix,le.posMatrix,[-Xe*Tt,-ot*Tt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let qe=w.canonical.z-ee.canonical.z,Xe=w.canonical.x-(w.canonical.x>>qe<<qe),ot=w.canonical.y-(w.canonical.y>>qe<<qe),Tt=a.X>>qe;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Xe*Tt,ot*Tt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**qe,1/2**qe,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee<Q.minzoom)return null;this._sourceTileCache[w.key]||(this._sourceTileCache[w.key]=w.scaledTo(ee).key);let le=this.sourceCache.getTileByID(this._sourceTileCache[w.key]);if((!le||!le.dem)&&B)for(;ee>=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Xo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration==\"number\"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B<ee&&Q>=0&&Q<ee))return 0;let qe=this.getTerrainData(w),Xe=(le=qe.tile)===null||le===void 0?void 0:le.dem;if(!Xe)return 0;let ot=function(ve,be,Re){var Be=be[0],tt=be[1];return ve[0]=Re[0]*Be+Re[4]*tt+Re[12],ve[1]=Re[1]*Be+Re[5]*tt+Re[13],ve}([],[B/ee*a.X,Q/ee*a.X],qe.u_terrain_matrix),Tt=[ot[0]*Xe.dim,ot[1]*Xe.dim],Kt=Math.floor(Tt[0]),Jt=Math.floor(Tt[1]),xr=Tt[0]-Kt,Pr=Tt[1]-Jt;return Xe.get(Kt,Jt)*(1-xr)*(1-Pr)+Xe.get(Kt+1,Jt)*xr*(1-Pr)+Xe.get(Kt,Jt+1)*(1-xr)*Pr+Xe.get(Kt+1,Jt+1)*xr*Pr}getElevationForLngLatZoom(w,B){if(!a.bb(B,w.wrap()))return 0;let{tileID:Q,mercatorX:ee,mercatorY:le}=this._getOverscaledTileIDFromLngLatZoom(w,B);return this.getElevation(Q,ee%a.X,le%a.X,a.X)}getElevation(w,B,Q,ee=a.X){return this.getDEMElevation(w,B,Q,ee)*this.exaggeration}getTerrainData(w){if(!this._emptyDemTexture){let ee=this.painter.context,le=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new g(ee,le,ee.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new g(ee,new a.R({width:1,height:1}),ee.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.an([])}let B=this.sourceCache.getSourceTile(w,!0);if(B&&B.dem&&(!B.demTexture||B.needsTerrainPrepare)){let ee=this.painter.context;B.demTexture=this.painter.getTileTexture(B.dem.stride),B.demTexture?B.demTexture.update(B.dem.getPixels(),{premultiply:!1}):B.demTexture=new g(ee,B.dem.getPixels(),ee.gl.RGBA,{premultiply:!1}),B.demTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),B.needsTerrainPrepare=!1}let Q=B&&B+B.tileID.key+w.key;if(Q&&!this._demMatrixCache[Q]){let ee=this.sourceCache.sourceCache._source.maxzoom,le=w.canonical.z-B.tileID.canonical.z;w.overscaledZ>w.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w(\"cannot calculate elevation if elevation maxzoom > source.maxzoom\"));let qe=w.canonical.x-(w.canonical.x>>le<<le),Xe=w.canonical.y-(w.canonical.y>>le<<le),ot=a.bc(new Float64Array(16),[1/(a.X<<le),1/(a.X<<le),0]);a.J(ot,ot,[qe*a.X,Xe*a.X,0]),this._demMatrixCache[w.key]={matrix:ot,coord:w}}return{u_depth:2,u_terrain:3,u_terrain_dim:B&&B.dem&&B.dem.dim||1,u_terrain_matrix:Q?this._demMatrixCache[w.key].matrix:this._emptyDemMatrix,u_terrain_unpack:B&&B.dem&&B.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(B&&B.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:B}}getFramebuffer(w){let B=this.painter,Q=B.width/devicePixelRatio,ee=B.height/devicePixelRatio;return!this._fbo||this._fbo.width===Q&&this._fbo.height===ee||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=B.context.createFramebuffer(Q,ee,!0,!1),this._fbo.depthAttachment.set(B.context.createRenderbuffer(B.context.gl.DEPTH_COMPONENT16,Q,ee))),this._fbo.colorAttachment.set(w===\"coords\"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let w=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let B=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let le=0,qe=0;le<this._coordsTextureSize;le++)for(let Xe=0;Xe<this._coordsTextureSize;Xe++,qe+=4)B[qe+0]=255&Xe,B[qe+1]=255&le,B[qe+2]=Xe>>8<<4|le>>8,B[qe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),qe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Xe=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer(\"coords\").framebuffer),ee.readPixels(le,Xe-qe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let ot=B[0]+(B[2]>>4<<8),Tt=B[1]+((15&B[2])<<8),Kt=this.coordsIndex[255-B[3]],Jt=Kt&&this.sourceCache.getTileByID(Kt);if(!Jt)return null;let xr=this._coordsTextureSize,Pr=(1<<Jt.tileID.canonical.z)*xr;return new a.Z((Jt.tileID.canonical.x*xr+ot)/Pr+Jt.tileID.wrap,(Jt.tileID.canonical.y*xr+Tt)/Pr,this.getElevation(Jt.tileID,ot,Tt,xr))}depthAtPoint(w){let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl;return Q.bindFramebuffer.set(this.getFramebuffer(\"depth\").framebuffer),ee.readPixels(w.x,this.painter.height/devicePixelRatio-w.y-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null),(B[0]/16777216+B[1]/65536+B[2]/256+B[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let w=this.painter.context,B=new a.bd,Q=new a.aY,ee=this.meshSize,le=a.X/ee,qe=ee*ee;for(let Jt=0;Jt<=ee;Jt++)for(let xr=0;xr<=ee;xr++)B.emplaceBack(xr*le,Jt*le,0);for(let Jt=0;Jt<qe;Jt+=ee+1)for(let xr=0;xr<ee;xr++)Q.emplaceBack(xr+Jt,ee+xr+Jt+1,ee+xr+Jt+2),Q.emplaceBack(xr+Jt,ee+xr+Jt+2,xr+Jt+1);let Xe=B.length,ot=Xe+2*(ee+1);for(let Jt of[0,1])for(let xr=0;xr<=ee;xr++)for(let Pr of[0,1])B.emplaceBack(xr*le,Jt*a.X,Pr);for(let Jt=0;Jt<2*ee;Jt+=2)Q.emplaceBack(ot+Jt,ot+Jt+1,ot+Jt+3),Q.emplaceBack(ot+Jt,ot+Jt+3,ot+Jt+2),Q.emplaceBack(Xe+Jt,Xe+Jt+3,Xe+Jt+1),Q.emplaceBack(Xe+Jt,Xe+Jt+2,Xe+Jt+3);let Tt=B.length,Kt=Tt+2*(ee+1);for(let Jt of[0,1])for(let xr=0;xr<=ee;xr++)for(let Pr of[0,1])B.emplaceBack(Jt*a.X,xr*le,Pr);for(let Jt=0;Jt<2*ee;Jt+=2)Q.emplaceBack(Tt+Jt,Tt+Jt+1,Tt+Jt+3),Q.emplaceBack(Tt+Jt,Tt+Jt+3,Tt+Jt+2),Q.emplaceBack(Kt+Jt,Kt+Jt+3,Kt+Jt+1),Q.emplaceBack(Kt+Jt,Kt+Jt+2,Kt+Jt+3);return this._mesh=new Eu(w.createVertexBuffer(B,Ka.members),w.createIndexBuffer(Q),a.a0.simpleSegment(0,0,B.length,Q.length)),this._mesh}getMeshFrameDelta(w){return 2*Math.PI*a.be/Math.pow(2,w)/5}getMinTileElevationForLngLatZoom(w,B){var Q;let{tileID:ee}=this._getOverscaledTileIDFromLngLatZoom(w,B);return(Q=this.getMinMaxElevation(ee).minElevation)!==null&&Q!==void 0?Q:0}getMinMaxElevation(w){let B=this.getTerrainData(w).tile,Q={minElevation:null,maxElevation:null};return B&&B.dem&&(Q.minElevation=B.dem.min*this.exaggeration,Q.maxElevation=B.dem.max*this.exaggeration),Q}_getOverscaledTileIDFromLngLatZoom(w,B){let Q=a.Z.fromLngLat(w.wrap()),ee=(1<<B)*a.X,le=Q.x*ee,qe=Q.y*ee,Xe=Math.floor(le/a.X),ot=Math.floor(qe/a.X);return{tileID:new a.S(B,0,B,Xe,ot),mercatorX:le,mercatorY:qe}}}class Ms{constructor(w,B,Q){this._context=w,this._size=B,this._tileSize=Q,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let w of this._objects)w.texture.destroy(),w.fbo.destroy()}_createObject(w){let B=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Q=new g(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Q.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),B.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),B.colorAttachment.set(Q.texture),{id:w,fbo:B,texture:Q,stamp:-1,inUse:!1}}getObjectForId(w){return this._objects[w]}useObject(w){w.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(B=>w.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error(\"No free RenderPool available, call freeAllObjects() required!\");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(w=>!w.inUse)===!1}}let os={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ts{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ms(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let qe=this.terrain.sourceCache.getTerrainCoords(le);for(let Xe in qe)this._coordsDescendingInv[Q][Xe]||(this._coordsDescendingInv[Q][Xe]=[]),this._coordsDescendingInv[Q][Xe].push(qe[Xe])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(os[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let qe in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][qe]=this._coordsDescendingInv[le][qe].map(Xe=>Xe.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(os[B]&&(this._prevType&&os[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(os[this._prevType]||os[B]&&ee){this._prevType=B;let le=this._stacks.length-1,qe=this._stacks[le]||[];for(let Xe of this._renderableTiles){if(this.pool.isFull()&&(Ws(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Xe),Xe.rtt[le]){let Tt=this.pool.getObjectForId(Xe.rtt[le].id);if(Tt.stamp===Xe.rtt[le].stamp){this.pool.useObject(Tt);continue}}let ot=this.pool.getOrCreateFreeObject();this.pool.useObject(ot),this.pool.stampObject(ot),Xe.rtt[le]={id:ot.id,stamp:ot.stamp},Q.context.bindFramebuffer.set(ot.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Tt=0;Tt<qe.length;Tt++){let Kt=Q.style._layers[qe[Tt]],Jt=Kt.source?this._coordsDescendingInv[Kt.source][Xe.tileID.key]:[Xe.tileID];Q.context.viewport.set([0,0,ot.fbo.width,ot.fbo.height]),Q._renderTileClippingMasks(Kt,Jt),Q.renderLayer(Q,Q.style.sourceCaches[Kt.source],Kt,Jt),Kt.source&&(Xe.rttCoords[Kt.source]=this._coordsDescendingInvStr[Kt.source][Xe.tileID.key])}}return Ws(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),os[B]}return!1}}let Ho={\"AttributionControl.ToggleAttribution\":\"Toggle attribution\",\"AttributionControl.MapFeedback\":\"Map feedback\",\"FullscreenControl.Enter\":\"Enter fullscreen\",\"FullscreenControl.Exit\":\"Exit fullscreen\",\"GeolocateControl.FindMyLocation\":\"Find my location\",\"GeolocateControl.LocationNotAvailable\":\"Location not available\",\"LogoControl.Title\":\"MapLibre logo\",\"Map.Title\":\"Map\",\"Marker.Title\":\"Map marker\",\"NavigationControl.ResetBearing\":\"Reset bearing to north\",\"NavigationControl.ZoomIn\":\"Zoom in\",\"NavigationControl.ZoomOut\":\"Zoom out\",\"Popup.Close\":\"Close popup\",\"ScaleControl.Feet\":\"ft\",\"ScaleControl.Meters\":\"m\",\"ScaleControl.Kilometers\":\"km\",\"ScaleControl.Miles\":\"mi\",\"ScaleControl.NauticalMiles\":\"nm\",\"TerrainControl.Enable\":\"Enable terrain\",\"TerrainControl.Disable\":\"Disable terrain\",\"CooperativeGesturesHandler.WindowsHelpText\":\"Use Ctrl + scroll to zoom the map\",\"CooperativeGesturesHandler.MacHelpText\":\"Use \\u2318 + scroll to zoom the map\",\"CooperativeGesturesHandler.MobileHelpText\":\"Use two fingers to move the map\"},yl=o,Xs={hash:!1,interactive:!0,bearingSnap:7,attributionControl:La,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:\"sans-serif\",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ps=ue=>{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=qe=>{this.startMouse(a.e({},qe,{ctrlKey:!0,preventDefault:()=>qe.preventDefault()}),c.mousePos(this.element,qe)),c.addEventListener(window,\"mousemove\",this.mousemove),c.addEventListener(window,\"mouseup\",this.mouseup)},this.mousemove=qe=>{this.moveMouse(qe,c.mousePos(this.element,qe))},this.mouseup=qe=>{this.mouseRotate.dragEnd(qe),this.mousePitch&&this.mousePitch.dragEnd(qe),this.offTemp()},this.touchstart=qe=>{qe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,qe.targetTouches)[0],this.startTouch(qe,this._startPos),c.addEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.addEventListener(window,\"touchend\",this.touchend))},this.touchmove=qe=>{qe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,qe.targetTouches)[0],this.moveTouch(qe,this._lastPos))},this.touchend=qe=>{qe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:qe,clickTolerance:Xe,bearingDegreesPerPixelMoved:ot=.8})=>{let Tt=new uf;return new Wu({clickTolerance:Xe,move:(Kt,Jt)=>({bearingDelta:(Jt.x-Kt.x)*ot}),moveStateManager:Tt,enable:qe,assignEvents:Ps})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:qe,clickTolerance:Xe,pitchDegreesPerPixelMoved:ot=-.5})=>{let Tt=new uf;return new Wu({clickTolerance:Xe,move:(Kt,Jt)=>({pitchDelta:(Jt.y-Kt.y)*ot}),moveStateManager:Tt,enable:qe,assignEvents:Ps})})({clickTolerance:le,enable:!0})),c.addEventListener(B,\"mousedown\",this.mousedown),c.addEventListener(B,\"touchstart\",this.touchstart,{passive:!1}),c.addEventListener(B,\"touchcancel\",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,\"mousedown\",this.mousedown),c.removeEventListener(w,\"touchstart\",this.touchstart,{passive:!1}),c.removeEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.removeEventListener(window,\"touchend\",this.touchend),c.removeEventListener(w,\"touchcancel\",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,\"mousemove\",this.mousemove),c.removeEventListener(window,\"mouseup\",this.mouseup),c.removeEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.removeEventListener(window,\"touchend\",this.touchend)}}let _s;function is(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),qe=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)<qe?ue=ee:B.locationPoint(le).distSqr(w)<qe&&(ue=le)}for(;Math.abs(ue.lng-B.center.lng)>180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let $l={center:\"translate(-50%,-50%)\",top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"};function ku(ue,w,B){let Q=ue.classList;for(let ee in $l)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!==\"Space\"&&Q!==\"Enter\"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)===\"terrain\"||(B==null?void 0:B.type)===\"render\"&&!ee)&&this._map.once(\"render\",this._update),this._lngLat=this._map.transform.renderWorldCopies?is(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le=\"\";this._rotationAlignment===\"viewport\"||this._rotationAlignment===\"auto\"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment===\"map\"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let qe=\"\";this._pitchAlignment===\"viewport\"||this._pitchAlignment===\"auto\"?qe=\"rotateX(0deg)\":this._pitchAlignment===\"map\"&&(qe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!==\"moveend\"||(this._pos=this._pos.round()),c.setTransform(this._element,`${$l[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${qe} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type===\"moveend\")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=\"none\",this._state===\"pending\"&&(this._state=\"active\",this.fire(new a.k(\"dragstart\"))),this.fire(new a.k(\"drag\")))},this._onUp=()=>{this._element.style.pointerEvents=\"auto\",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),this._state===\"active\"&&this.fire(new a.k(\"dragend\")),this._state=\"inactive\"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state=\"pending\",this._map.on(\"mousemove\",this._onMove),this._map.on(\"touchmove\",this._onMove),this._map.once(\"mouseup\",this._onUp),this._map.once(\"touchend\",this._onUp))},this._anchor=w&&w.anchor||\"center\",this._color=w&&w.color||\"#3FB1CE\",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state=\"inactive\",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||\"auto\",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!==\"auto\"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create(\"div\");let B=c.createNS(\"http://www.w3.org/2000/svg\",\"svg\"),Q=41,ee=27;B.setAttributeNS(null,\"display\",\"block\"),B.setAttributeNS(null,\"height\",`${Q}px`),B.setAttributeNS(null,\"width\",`${ee}px`),B.setAttributeNS(null,\"viewBox\",`0 0 ${ee} ${Q}`);let le=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");le.setAttributeNS(null,\"stroke\",\"none\"),le.setAttributeNS(null,\"stroke-width\",\"1\"),le.setAttributeNS(null,\"fill\",\"none\"),le.setAttributeNS(null,\"fill-rule\",\"evenodd\");let qe=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");qe.setAttributeNS(null,\"fill-rule\",\"nonzero\");let Xe=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Xe.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),Xe.setAttributeNS(null,\"fill\",\"#000000\");let ot=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}];for(let Be of ot){let tt=c.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");tt.setAttributeNS(null,\"opacity\",\"0.04\"),tt.setAttributeNS(null,\"cx\",\"10.5\"),tt.setAttributeNS(null,\"cy\",\"5.80029008\"),tt.setAttributeNS(null,\"rx\",Be.rx),tt.setAttributeNS(null,\"ry\",Be.ry),Xe.appendChild(tt)}let Tt=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Tt.setAttributeNS(null,\"fill\",this._color);let Kt=c.createNS(\"http://www.w3.org/2000/svg\",\"path\");Kt.setAttributeNS(null,\"d\",\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\"),Tt.appendChild(Kt);let Jt=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Jt.setAttributeNS(null,\"opacity\",\"0.25\"),Jt.setAttributeNS(null,\"fill\",\"#000000\");let xr=c.createNS(\"http://www.w3.org/2000/svg\",\"path\");xr.setAttributeNS(null,\"d\",\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\"),Jt.appendChild(xr);let Pr=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Pr.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),Pr.setAttributeNS(null,\"fill\",\"#FFFFFF\");let ve=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");ve.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");let be=c.createNS(\"http://www.w3.org/2000/svg\",\"circle\");be.setAttributeNS(null,\"fill\",\"#000000\"),be.setAttributeNS(null,\"opacity\",\"0.25\"),be.setAttributeNS(null,\"cx\",\"5.5\"),be.setAttributeNS(null,\"cy\",\"5.5\"),be.setAttributeNS(null,\"r\",\"5.4999962\");let Re=c.createNS(\"http://www.w3.org/2000/svg\",\"circle\");Re.setAttributeNS(null,\"fill\",\"#FFFFFF\"),Re.setAttributeNS(null,\"cx\",\"5.5\"),Re.setAttributeNS(null,\"cy\",\"5.5\"),Re.setAttributeNS(null,\"r\",\"5.4999962\"),ve.appendChild(be),ve.appendChild(Re),qe.appendChild(Xe),qe.appendChild(Tt),qe.appendChild(Jt),qe.appendChild(Pr),qe.appendChild(ve),B.appendChild(qe),B.setAttributeNS(null,\"height\",Q*this._scale+\"px\"),B.setAttributeNS(null,\"width\",ee*this._scale+\"px\"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add(\"maplibregl-marker\"),this._element.addEventListener(\"dragstart\",B=>{B.preventDefault()}),this._element.addEventListener(\"mousedown\",B=>{B.preventDefault()}),ku(this._element,this._anchor,\"marker\"),w&&w.className)for(let B of w.className.split(\" \"))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute(\"aria-label\",w._getUIString(\"Marker.Title\")),w.getCanvasContainer().appendChild(this._element),w.on(\"move\",this._update),w.on(\"moveend\",this._update),w.on(\"terrain\",this._update),this.setDraggable(this._draggable),this._update(),this._map.on(\"click\",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map.off(\"terrain\",this._update),this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler),this._map.off(\"mouseup\",this._onUp),this._map.off(\"touchend\",this._onUp),this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(\"keypress\",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(\"tabindex\")),w){if(!(\"offset\"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-38.1],\"bottom-left\":[ee,-1*(38.1-13.5+ee)],\"bottom-right\":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute(\"tabindex\"),this._originalTabIndex||this._element.setAttribute(\"tabindex\",\"0\"),this._element.addEventListener(\"keypress\",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),qe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,qe)-le<.006)return void(this._element.style.opacity=this._opacity);let Xe=-this._offset.y/ee.transform._pixelPerMeter,ot=Math.sin(ee.getPitch()*Math.PI/180)*Xe,Tt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Kt=ee.transform.lngLatToCameraDepth(this._lngLat,qe+ot)-Tt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Kt&&this._popup.remove(),this._element.style.opacity=Kt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on(\"mousedown\",this._addDragHandler),this._map.on(\"touchstart\",this._addDragHandler)):(this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||\"auto\",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!==\"auto\"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity=\"1\",this._opacityWhenCovered=\"0.2\"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:\"metric\"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),qe=ue.unproject([Q,ee]),Xe=le.distanceTo(qe);if(B&&B.unit===\"imperial\"){let ot=3.2808*Xe;ot>5280?Ua(w,Q,ot/5280,ue._getUIString(\"ScaleControl.Miles\")):Ua(w,Q,ot,ue._getUIString(\"ScaleControl.Feet\"))}else B&&B.unit===\"nautical\"?Ua(w,Q,Xe/1852,ue._getUIString(\"ScaleControl.NauticalMiles\")):Xe>=1e3?Ua(w,Q,Xe/1e3,ue._getUIString(\"ScaleControl.Kilometers\")):Ua(w,Q,Xe,ue._getUIString(\"ScaleControl.Meters\"))}function Ua(ue,w,B,Q){let ee=function(le){let qe=Math.pow(10,`${Math.floor(le)}`.length-1),Xe=le/qe;return Xe=Xe>=10?10:Xe>=5?5:Xe>=3?3:Xe>=2?2:Xe>=1?1:function(ot){let Tt=Math.pow(10,Math.ceil(-Math.log(ot)/Math.LN10));return Math.round(ot*Tt)/Tt}(Xe),qe*Xe}(B);ue.style.width=w*(ee/B)+\"px\",ue.innerHTML=`${ee}&nbsp;${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:\"\",maxWidth:\"240px\",subpixelPositioning:!1},Vc=[\"a[href]\",\"[tabindex]:not([tabindex='-1'])\",\"[contenteditable]:not([contenteditable='false'])\",\"button:not([disabled])\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].join(\", \");function hc(ue){if(ue){if(typeof ue==\"number\"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),\"top-left\":new a.P(w,w),\"top-right\":new a.P(-w,w),bottom:new a.P(0,-ue),\"bottom-left\":new a.P(w,-w),\"bottom-right\":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,\"top-left\":w,\"top-right\":w,bottom:w,\"bottom-left\":w,\"bottom-right\":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),\"top-left\":a.P.convert(ue[\"top-left\"]||[0,0]),\"top-right\":a.P.convert(ue[\"top-right\"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),\"bottom-left\":a.P.convert(ue[\"bottom-left\"]||[0,0]),\"bottom-right\":a.P.convert(ue[\"bottom-right\"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=Cu,i.CanvasSource=$t,i.CooperativeGesturesHandler=$i,i.DoubleClickZoomHandler=Ei,i.DragPanHandler=Tn,i.DragRotateHandler=Bn,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w(\"Full screen control 'container' must be a DOM element.\")),\"onfullscreenchange\"in document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in document&&(this._fullscreenchange=\"MSFullscreenChange\")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create(\"button\",\"maplibregl-ctrl-fullscreen\",this._controlContainer);c.create(\"span\",\"maplibregl-ctrl-icon\",ue).setAttribute(\"aria-hidden\",\"true\"),ue.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-fullscreen\"),this._updateTitle(),this._fullscreen?(this.fire(new a.k(\"fullscreenstart\")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k(\"fullscreenend\")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle(\"maplibregl-pseudo-fullscreen\"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=st,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k(\"outofmaxbounds\",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!==\"OFF\"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!==\"ACTIVE_LOCK\"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove(\"maplibregl-user-location-dot-stale\"),this.fire(new a.k(\"geolocate\",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),qe=ce.fromLngLat(B,Q);this._map.fitBounds(qe,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.disabled=!0;let B=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!==\"OFF\"&&this.options.showUserLocation&&this._dotElement.classList.add(\"maplibregl-user-location-dot-stale\"),this.fire(new a.k(\"error\",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener(\"contextmenu\",w=>w.preventDefault()),this._geolocateButton=c.create(\"button\",\"maplibregl-ctrl-geolocate\",this._container),c.create(\"span\",\"maplibregl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",\"true\"),this._geolocateButton.type=\"button\",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w(\"Geolocation support is not available so the GeolocateControl will be disabled.\");let B=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B)}else{let B=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=c.create(\"div\",\"maplibregl-user-location-dot\"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create(\"div\",\"maplibregl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",B=>{B.geolocateSource||this._watchState!==\"ACTIVE_LOCK\"||B.originalEvent&&B.originalEvent.type===\"resize\"||(this._watchState=\"BACKGROUND\",this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this.fire(new a.k(\"trackuserlocationend\")),this.fire(new a.k(\"userlocationlostfocus\")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(_s!==void 0&&!w)return _s;if(window.navigator.permissions===void 0)return _s=!!window.navigator.geolocation,_s;try{_s=(yield window.navigator.permissions.query({name:\"geolocation\"})).state!==\"denied\"}catch(B){_s=!!window.navigator.geolocation}return _s})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off(\"zoom\",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitude<w.getWest()||B.longitude>w.getEast()||B.latitude<w.getSouth()||B.latitude>w.getNorth())}_setErrorState(){switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");break;case\"ACTIVE_ERROR\":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new a.k(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":pu--,Uc=!1,this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this.fire(new a.k(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k(\"trackuserlocationstart\")),this.fire(new a.k(\"userlocationfocus\"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"OFF\":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState===\"OFF\"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=bh,i.ImageSource=Gt,i.KeyboardHandler=Xt,i.LngLatBounds=ce,i.LogoControl=Yn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Xs),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(w.minPitch!=null&&w.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error(\"maxPitch must be less than or equal to 85\");if(super(new al(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new zn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k(\"webglcontextlost\",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k(\"webglcontextrestored\",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new C(w.transformRequest),typeof w.container==\"string\"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on(\"move\",()=>this._update(!1)).on(\"moveend\",()=>this._update(!1)).on(\"zoom\",()=>this._update(!0)).on(\"terrain\",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once(\"idle\",()=>{this._idleTriggered=!0}),typeof window!=\"undefined\"){addEventListener(\"online\",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ka(this,w),this._hash=w.hash&&new bh(typeof w.hash==\"string\"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl==\"boolean\"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Yn,w.logoPosition),this.on(\"style.load\",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on(\"data\",B=>{this._update(B.dataType===\"style\"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on(\"dataloading\",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on(\"dataabort\",B=>{this.fire(new a.k(\"sourcedataabort\",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():\"top-right\"),!ue||!ue.onAdd)return this.fire(new a.j(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf(\"bottom\")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Xe=this.painter.context.gl;this._maxCanvasSize=[Xe.drawingBufferWidth,Xe.drawingBufferHeight];let ot=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,ot),this.painter.resize(Q,ee,ot)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let qe=!this._moving;return qe&&(this.stop(),this.fire(new a.k(\"movestart\",ue)).fire(new a.k(\"move\",ue))),this.fire(new a.k(\"resize\",ue)),qe&&this.fire(new a.k(\"moveend\",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,qe=w*ee;return Math.min(le>B?B/le:1,qe>Q?Q/qe:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()<ue&&this.setZoom(ue),this;throw new Error(\"minZoom must be between -2 and the current maxZoom, inclusive\")}getMinZoom(){return this.transform.minZoom}setMaxZoom(ue){if((ue=ue==null?22:ue)>=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error(\"maxZoom must be greater than the current minZoom\")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()<ue&&this.setPitch(ue),this;throw new Error(\"minPitch must be between 0 and the current maxPitch, inclusive\")}getMinPitch(){return this.transform.minPitch}setMaxPitch(ue){if((ue=ue==null?60:ue)>85)throw new Error(\"maxPitch must be less than or equal to 85\");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error(\"maxPitch must be greater than the current minPitch\")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue===\"mouseenter\"||ue===\"mouseover\"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let qe=w.filter(ot=>this.getLayer(ot)),Xe=qe.length!==0?this.queryRenderedFeatures(le.point,{layers:qe}):[];Xe.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Xe}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue===\"mouseleave\"||ue===\"mouseout\"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:qe=>{let Xe=w.filter(ot=>this.getLayer(ot));(Xe.length!==0?this.queryRenderedFeatures(qe.point,{layers:Xe}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,qe.originalEvent)))},mouseout:qe=>{Q&&(Q=!1,B.call(this,new jl(ue,this,qe.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Xe=>this.getLayer(Xe)),qe=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];qe.length&&(ee.features=qe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;ee<Q.length;ee++){let le=Q[ee];if(le.listener===B&&le.layers.length===w.length&&le.layers.every(qe=>w.includes(qe))){for(let qe in le.delegates)this.off(qe,le.delegates[qe]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w==\"string\"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w==\"string\"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let qe=ee.delegates[le];ee.delegates[le]=(...Xe)=>{this._removeDelegatedListener(ue,Q,B),qe(...Xe)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w==\"string\"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]==\"number\")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),qe=a.P.convert(ee[1]);B=[le,new a.P(qe.x,le.y),qe,new a.P(le.x,qe.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once(\"style.load\",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ga(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue==\"string\"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ga(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue==\"string\"){let B=this._requestManager.transformRequest(ue,\"Style\");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue==\"object\"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}.  Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w(\"There is no style added to the map.\")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off(\"data\",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type===\"hillshade\"&&Q.source===ue.source&&a.w(\"You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.\")}this.terrain=new Xo(this.painter,w,ue),this.painter.renderToTexture=new Ts(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType===\"style\"?this.terrain.sourceCache.freeRtt():B.dataType===\"source\"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on(\"data\",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k(\"terrain\",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!==\"loaded\"&&ee.state!==\"errored\")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));{let{width:Kt,height:Jt,data:xr}=w,Pr=w;return this.style.addImage(ue,{data:new a.R({width:Kt,height:Jt},new Uint8Array(xr)),pixelRatio:Q,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt,sdf:ee,version:0,userImage:Pr}),Pr.onAdd&&Pr.onAdd(this,ue),this}}{let{width:Kt,height:Jt,data:xr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Kt,height:Jt},xr),pixelRatio:Q,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:qe}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));let Xe=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(qe,Xe),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error(\"Missing required image id\"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,\"Image\"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add(\"maplibregl-map\");let w=this._canvasContainer=c.create(\"div\",\"maplibregl-canvas-container\",ue);this._interactive&&w.classList.add(\"maplibregl-interactive\"),this._canvas=c.create(\"canvas\",\"maplibregl-canvas\",w),this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",this._interactive?\"0\":\"-1\"),this._canvas.setAttribute(\"aria-label\",this._getUIString(\"Map.Title\")),this._canvas.setAttribute(\"role\",\"region\");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create(\"div\",\"maplibregl-control-container\",ue),le=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(qe=>{le[qe]=c.create(\"div\",`maplibregl-ctrl-${qe} `,ee)}),this._container.addEventListener(\"scroll\",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener(\"webglcontextcreationerror\",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext(\"webgl2\",ue)||this._canvas.getContext(\"webgl\",ue);if(!B){let Q=\"Failed to initialize WebGL\";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let qe=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=qe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Xe),this.style.update(qe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k(\"load\"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k(\"idle\")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!=\"undefined\"&&removeEventListener(\"online\",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.removeEventListener(\"webglcontextlost\",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove(\"maplibregl-map\"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k(\"remove\"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return yl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Vh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute(\"aria-disabled\",B.toString()),this._zoomOutButton.setAttribute(\"aria-disabled\",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute(\"aria-label\",Q)},this.options=a.e({},va,ue),this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton(\"maplibregl-ctrl-zoom-in\",w=>this._map.zoomIn({},{originalEvent:w})),c.create(\"span\",\"maplibregl-ctrl-icon\",this._zoomInButton).setAttribute(\"aria-hidden\",\"true\"),this._zoomOutButton=this._createButton(\"maplibregl-ctrl-zoom-out\",w=>this._map.zoomOut({},{originalEvent:w})),c.create(\"span\",\"maplibregl-ctrl-icon\",this._zoomOutButton).setAttribute(\"aria-hidden\",\"true\")),this.options.showCompass&&(this._compass=this._createButton(\"maplibregl-ctrl-compass\",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create(\"span\",\"maplibregl-ctrl-icon\",this._compass),this._compassIcon.setAttribute(\"aria-hidden\",\"true\"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,\"ZoomIn\"),this._setButtonTitle(this._zoomOutButton,\"ZoomOut\"),this._map.on(\"zoom\",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,\"ResetBearing\"),this.options.visualizePitch&&this._map.on(\"pitch\",this._rotateCompassArrow),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off(\"zoom\",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(\"pitch\",this._rotateCompassArrow),this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create(\"button\",ue,this._container);return B.type=\"button\",B.addEventListener(\"click\",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\"),delete this._map,this.fire(new a.k(\"close\"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create(\"div\",\"maplibregl-popup\",this._map.getContainer()),this._tip=c.create(\"div\",\"maplibregl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className)for(let Xe of this.options.className.split(\" \"))this._container.classList.add(Xe);this._closeButton&&this._closeButton.setAttribute(\"aria-label\",this._map._getUIString(\"Popup.Close\")),this._trackPointer&&this._container.classList.add(\"maplibregl-popup-track-pointer\")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?is(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Xe=this._container.offsetWidth,ot=this._container.offsetHeight,Tt;Tt=Q.y+le.bottom.y<ot?[\"top\"]:Q.y>this._map.transform.height-ot?[\"bottom\"]:[],Q.x<Xe/2?Tt.push(\"left\"):Q.x>this._map.transform.width-Xe/2&&Tt.push(\"right\"),ee=Tt.length===0?\"bottom\":Tt.join(\"-\")}let qe=Q.add(le[ee]);this.options.subpixelPositioning||(qe=qe.round()),c.setTransform(this._container,`${$l[ee]} translate(${qe.x}px,${qe.y}px)`),ku(this._container,ee,\"popup\")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new a.k(\"open\")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement(\"body\"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create(\"div\",\"maplibregl-popup-content\",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create(\"button\",\"maplibregl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Wt,i.RasterTileSource=pt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return\"bottom-left\"}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-scale\",ue.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ga,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain\"),this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain-enabled\"),this._map.terrain?(this._terrainButton.classList.add(\"maplibregl-ctrl-terrain-enabled\"),this._terrainButton.title=this._map._getUIString(\"TerrainControl.Disable\")):(this._terrainButton.classList.add(\"maplibregl-ctrl-terrain\"),this._terrainButton.title=this._map._getUIString(\"TerrainControl.Enable\"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._terrainButton=c.create(\"button\",\"maplibregl-ctrl-terrain\",this._container),c.create(\"span\",\"maplibregl-ctrl-icon\",this._terrainButton).setAttribute(\"aria-hidden\",\"true\"),this._terrainButton.type=\"button\",this._terrainButton.addEventListener(\"click\",this._toggleTerrain),this._updateTerrainIcon(),this._map.on(\"terrain\",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off(\"terrain\",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Zi,i.VectorTileSource=ct,i.VideoSource=Nt,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(wr(ue))throw new Error(`A source type called \"${ue}\" already exists.`);((B,Q)=>{sr[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=me;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),me=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return er().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return Me.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return Ae().broadcast(\"IS\",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return er().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){Me.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var WHe=ye((kxr,jHe)=>{\"use strict\";var iw=Dr(),UWt=ru().sanitizeHTML,VWt=wJ(),VHe=bx();function GHe(e,t){this.subplot=e,this.uid=e.uid+\"-\"+t,this.index=t,this.idSource=\"source-\"+this.uid,this.idLayer=VHe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=GHe.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=s7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType===\"image\"&&e.sourcetype===\"image\"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!s7(e)){var r=GWt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapLayerId=function(e){if(e===\"traces\")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n==\"string\"&&n.indexOf(VHe.traceLayerPrefix)===0){e=n;break}}return e};ag.updateLayer=function(e){var t=this.subplot,r=HHe(e),n=this.lookupBelow(),i=this.findFollowingMapLayerId(n);this.removeLayer(),s7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,\"source-layer\":e.sourcelayer||\"\",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};ag.updateStyle=function(e){if(s7(e)){var t=HHe(e);this.subplot.setOptions(this.idLayer,\"setLayoutProperty\",t.layout),this.subplot.setOptions(this.idLayer,\"setPaintProperty\",t.paint)}};ag.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ag.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function s7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!=\"string\"||t[r].length===0)return!1;return!0}return iw.isPlainObject(t)||typeof t==\"string\"&&t.length>0}function HHe(e){var t={},r={};switch(e.type){case\"circle\":iw.extendFlat(r,{\"circle-radius\":e.circle.radius,\"circle-color\":e.color,\"circle-opacity\":e.opacity});break;case\"line\":iw.extendFlat(r,{\"line-width\":e.line.width,\"line-color\":e.color,\"line-opacity\":e.opacity,\"line-dasharray\":e.line.dash});break;case\"fill\":iw.extendFlat(r,{\"fill-color\":e.color,\"fill-outline-color\":e.fill.outlinecolor,\"fill-opacity\":e.opacity});break;case\"symbol\":var n=e.symbol,i=VWt(n.textposition,n.iconsize);iw.extendFlat(t,{\"icon-image\":n.icon+\"-15\",\"icon-size\":n.iconsize/10,\"text-field\":n.text,\"text-size\":n.textfont.size,\"text-anchor\":i.anchor,\"text-offset\":i.offset,\"symbol-placement\":n.placement}),iw.extendFlat(r,{\"icon-color\":e.color,\"text-color\":n.textfont.color,\"text-opacity\":e.opacity});break;case\"raster\":iw.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":e.opacity});break}return{layout:t,paint:r}}function GWt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t===\"geojson\"?i=\"data\":t===\"vector\"?i=typeof r==\"string\"?\"url\":\"tiles\":t===\"raster\"?(i=\"tiles\",n.tileSize=256):t===\"image\"&&(i=\"url\",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=UWt(e.sourceattribution)),n}jHe.exports=function(t,r,n){var i=new GHe(t,r);return i.update(n),i}});var eje=ye((Lxr,QHe)=>{\"use strict\";var CJ=UHe(),kJ=Dr(),YHe=ix(),XHe=qa(),HWt=ho(),jWt=yv(),l7=vf(),KHe=Sg(),WWt=KHe.drawMode,XWt=KHe.selectMode,ZWt=zf().prepSelect,YWt=zf().clearOutline,KWt=zf().clearSelectionsCache,JWt=zf().selectOnClick,nw=bx(),$Wt=WHe();function JHe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+\"-\"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Bh=JHe.prototype;Bh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Bh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=$He(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new CJ.Map({container:i.div,style:o.style,center:LJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new CJ.AttributionControl({compact:!0})),c={};u.on(\"styleimagemissing\",function(h){var d=h.id;if(!c[d]&&d.includes(\"-15\")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin=\"Anonymous\",v.src=\"https://unpkg.com/maki@2.1.0/icons/\"+d+\".svg\"}}),u.setTransformRequest(function(h){return h=h.replace(\"https://fonts.openmaptiles.org/Open Sans Extrabold\",\"https://fonts.openmaptiles.org/Open Sans Extra Bold\"),h=h.replace(\"https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold\",\"https://fonts.openmaptiles.org/Open Sans Extra Bold\"),h=h.replace(\"https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular\",\"https://fonts.openmaptiles.org/Klokantech Noto Sans Regular\"),{url:h}}),u._canvas.style.left=\"0px\",u._canvas.style.top=\"0px\",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once(\"load\",h)})),f=f.concat(YHe.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Bh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=$He(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once(\"styledata\",u)}))),s=s.concat(YHe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Bh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below==\"string\"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===\"\"&&(s=!0),o[\"trace-\"+l.uid]=a||\"\"}for(i=0;i<n.length;i++){var c=n[i];typeof c.below==\"string\"?a=c.below:s?a=\"traces\":a=\"\",o[\"layout-\"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf(\"trace-\")===0?(d=h.split(\"trace-\")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf(\"layout-\")===0&&(d=h.split(\"layout-\")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var ZHe={choroplethmap:0,densitymap:1,scattermap:2};Bh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return ZHe[f[0].trace.type]-ZHe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Bh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(LJ(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.map?t.scrollZoom.enable():t.scrollZoom.disable()};Bh.resolveOnRender=function(e){var t=this.map;t.on(\"render\",function r(){t.loaded()&&(t.off(\"render\",r),setTimeout(e,10))})};Bh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(nw.mapOnErrorMsg))}t.once(\"error\",r),t.once(\"style.error\",r),t.once(\"source.error\",r),t.once(\"tile.error\",r),t.once(\"layer.error\",r)};Bh.createFramework=function(e){var t=this,r=t.div=document.createElement(\"div\");r.id=t.uid,r.style.position=\"absolute\",t.container.appendChild(r),t.xaxis={_id:\"x\",c2p:function(n){return t.project(n).x}},t.yaxis={_id:\"y\",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},HWt.setConvert(t.mockAxis,e)};Bh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on(\"moveend\",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];XHe.call(\"_storeDirectGUIEdit\",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type===\"mouseup\"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),i.on(\"wheel\",function(){r.wheeling=!0}),i.on(\"mousemove\",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&l7.hover(n,s,r.id)},l7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){l7.loneUnhover(t._hoverlayer)}i.on(\"dragstart\",function(){r.dragging=!0,a()}),i.on(\"zoomstart\",a),i.on(\"mouseout\",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit(\"plotly_relayouting\",r.getViewEditsWithDerived(s))}i.on(\"drag\",o),i.on(\"zoom\",o),i.on(\"dblclick\",function(){var s=n._fullLayout[r.id];XHe.call(\"_storeDirectGUIEdit\",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(LJ(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit(\"plotly_doubleclick\",null),n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){KWt(r.dragOptions),YWt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf(\"select\")>-1&&JWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf(\"event\")>-1&&l7.click(n,l.originalEvent)}}};Bh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=kJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off(\"click\",t.onClickInPanHandler),XWt(a)||WWt(a)?(r.dragPan.disable(),r.on(\"zoomstart\",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){ZWt(l,u,c,t.dragOptions,a)},jWt.init(t.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener(\"touchstart\",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on(\"click\",t.onClickInPanHandler))};Bh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+\"px\",n.height=r.h*(t.y[1]-t.y[0])+\"px\",n.left=r.l+t.x[0]*r.w+\"px\",n.top=r.t+(1-t.y[1])*r.h+\"px\",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Bh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push($Wt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Bh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Bh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Bh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Bh.getMapLayers=function(){return this.map.getStyle().layers};Bh.addLayer=function(e,t){var r=this.map;if(typeof t==\"string\"){if(t===\"\"){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}kJ.warn([\"Trying to add layer with *below* value\",t,\"referencing a layer that does not exist\",\"or that does not yet exist.\"].join(\" \"))}r.addLayer(e)};Bh.project=function(e){return this.map.project(new CJ.LngLat(e[0],e[1]))};Bh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Bh.getViewEdits=function(e){for(var t=this.id,r=[\"center\",\"zoom\",\"bearing\",\"pitch\"],n={},i=0;i<r.length;i++){var a=r[i];n[t+\".\"+a]=e[a]}return n};Bh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+\"._derived\"]=e._derived,r};function $He(e){var t={};return kJ.isPlainObject(e)?(t.id=e.id,t.style=e):typeof e==\"string\"?(t.id=e,nw.stylesMap[e]?t.style=nw.stylesMap[e]:t.style=e):(t.id=nw.styleValueDflt,t.style=QWt(nw.styleValueDflt)),t.transition={duration:0,delay:0},t}function QWt(e){return nw.styleUrlPrefix+e+\"-\"+nw.styleUrlSuffix}function LJ(e){return[e.lon,e.lat]}QHe.exports=JHe});var ije=ye((Pxr,rje)=>{\"use strict\";var PJ=Dr(),eXt=C_(),tXt=Yd(),tje=HC();rje.exports=function(t,r,n){eXt(t,r,n,{type:\"map\",attributes:tje,handleDefaults:rXt,partition:\"y\"})};function rXt(e,t,r){r(\"style\"),r(\"center.lon\"),r(\"center.lat\"),r(\"zoom\"),r(\"bearing\"),r(\"pitch\");var n=r(\"bounds.west\"),i=r(\"bounds.east\"),a=r(\"bounds.south\"),o=r(\"bounds.north\");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,tXt(e,t,{name:\"layers\",handleItemDefaults:iXt}),t._input=e}function iXt(e,t){function r(l,u){return PJ.coerce(e,t,tje.layers,l,u)}var n=r(\"visible\");if(n){var i=r(\"sourcetype\"),a=i===\"raster\"||i===\"image\";r(\"source\"),r(\"sourceattribution\"),i===\"vector\"&&r(\"sourcelayer\"),i===\"image\"&&r(\"coordinates\");var o;a&&(o=\"raster\");var s=r(\"type\",o);a&&s!==\"raster\"&&(s=t.type=\"raster\",PJ.log(\"Source types *raster* and *image* must drawn *raster* layer type.\")),r(\"below\"),r(\"color\"),r(\"opacity\"),r(\"minzoom\"),r(\"maxzoom\"),s===\"circle\"&&r(\"circle.radius\"),s===\"line\"&&(r(\"line.width\"),r(\"line.dash\")),s===\"fill\"&&r(\"fill.outlinecolor\"),s===\"symbol\"&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),PJ.coerceFont(r,\"symbol.textfont\",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r(\"symbol.textposition\"),r(\"symbol.placement\"))}}});var c7=ye(l0=>{\"use strict\";var u7=Dr(),nje=u7.strTranslate,nXt=u7.strScale,aXt=Id().getSubplotCalcData,oXt=Wp(),sXt=Oa(),aje=So(),lXt=ru(),uXt=eje(),wx=\"map\";l0.name=wx;l0.attr=\"subplot\";l0.idRoot=wx;l0.idRegex=l0.attrRegex=u7.counterRegex(wx);l0.attributes={subplot:{valType:\"subplotid\",dflt:\"map\",editType:\"calc\"}};l0.layoutAttributes=HC();l0.supplyLayoutDefaults=ije();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;a<i.length;a++){var o=i[a],s=aXt(n,wx,o),l=r[o],u=l._subplot;u||(u=new uXt(t,o),r[o]._subplot=u),u.viewInitial||(u.viewInitial={center:u7.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),u.plot(s,r,t._promises)}};l0.clean=function(e,t,r,n){for(var i=n._subplots[wx]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};l0.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:oXt.svg,\"xlink:href\":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"});var c=sXt.select(a._subplot.div),f=c.select(\".maplibregl-ctrl-attrib\").text().replace(\"Improve this map\",\"\"),h=t._glimages.append(\"g\"),d=h.append(\"text\");d.text(f).classed(\"static-attribution\",!0).attr({\"font-size\":12,\"font-family\":\"Arial\",color:\"rgba(0, 0, 0, 0.75)\",\"text-anchor\":\"end\",\"data-unformatted\":f});var v=aje.bBox(d.node()),x=n.w*(o.x[1]-o.x[0]);if(v.width>x/2){var b=f.split(\"|\").join(\"<br>\");d.text(b).attr(\"data-unformatted\",b).call(lXt.convertToTspans,e),v=aje.bBox(d.node())}d.attr(\"transform\",nje(-3,-v.height+8)),h.insert(\"rect\",\".static-attribution\").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var p=1;v.width+6>x&&(p=x/(v.width+6));var C=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr(\"transform\",nje(C[0],C[1])+nXt(p))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var sje=ye((Rxr,oje)=>{\"use strict\";oje.exports={attributes:t7(),supplyDefaults:_He(),colorbar:$d(),formatLabels:bJ(),calc:hF(),plot:RHe(),hoverPoints:o7().hoverPoints,eventData:OHe(),selectPoints:BHe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:\"trace\",name:\"scattermap\",basePlotModule:c7(),categories:[\"map\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var uje=ye((Dxr,lje)=>{\"use strict\";lje.exports=sje()});var IJ=ye((Fxr,cje)=>{\"use strict\";var d1=JA(),cXt=Tu(),fXt=Qo().hovertemplateAttrs,hXt=Gl(),Tx=Ao().extendFlat;cje.exports=Tx({locations:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:\"string\",editType:\"plot\"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:\"plot\"}),width:Tx({},d1.marker.line.width,{editType:\"plot\"}),editType:\"calc\"},opacity:Tx({},d1.marker.opacity,{editType:\"plot\"}),editType:\"calc\"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},hoverinfo:d1.hoverinfo,hovertemplate:fXt({},{keys:[\"properties\"]}),showlegend:Tx({},hXt.showlegend,{dflt:!1})},cXt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var hje=ye((zxr,fje)=>{\"use strict\";var ZC=Dr(),dXt=Jh(),vXt=IJ();fje.exports=function(t,r,n,i){function a(c,f){return ZC.coerce(t,r,vXt,c,f)}var o=a(\"locations\"),s=a(\"z\"),l=a(\"geojson\");if(!ZC.isArrayOrTypedArray(o)||!o.length||!ZC.isArrayOrTypedArray(s)||!s.length||!(typeof l==\"string\"&&l!==\"\"||ZC.isPlainObject(l))){r.visible=!1;return}a(\"featureidkey\"),r._length=Math.min(o.length,s.length),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\");var u=a(\"marker.line.width\");u&&a(\"marker.line.color\"),a(\"marker.opacity\"),dXt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),ZC.coerceSelectionMarkerOpacity(r,a)}});var RJ=ye((Oxr,pje)=>{\"use strict\";var pXt=Eo(),v1=Dr(),gXt=tc(),mXt=So(),yXt=tx().makeBlank,dje=ix();function _Xt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:\"none\"},paint:{}},i={layout:{visibility:\"none\"},paint:{}},a=t._opts={fill:n,line:i,geojson:yXt()};if(!r)return a;var o=dje.extractTraceFeature(e);if(!o)return a;var s=gXt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;v1.isArrayOrTypedArray(l.opacity)&&(c=function(C){var E=C.mo;return pXt(E)?+v1.constrain(E,0,1):0});var f;v1.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var h;v1.isArrayOrTypedArray(u.width)&&(h=function(C){return C.mlw});for(var d=0;d<e.length;d++){var v=e[d],x=v.fOut;if(x){var b=x.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=dje.feature2polygons(x)}}var p=c?{type:\"identity\",property:\"mo\"}:l.opacity;return v1.extendFlat(n.paint,{\"fill-color\":{type:\"identity\",property:\"fc\"},\"fill-opacity\":p}),v1.extendFlat(i.paint,{\"line-color\":f?{type:\"identity\",property:\"mlc\"}:u.color,\"line-width\":h?{type:\"identity\",property:\"mlw\"}:u.width,\"line-opacity\":p}),n.layout.visibility=\"visible\",i.layout.visibility=\"visible\",a.geojson={type:\"FeatureCollection\",features:o},vje(e),a}function vje(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=mXt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:\"identity\",property:\"mo2\"}}else n=v1.isArrayOrTypedArray(t.marker.opacity)?{type:\"identity\",property:\"mo\"}:t.marker.opacity;return v1.extendFlat(r.fill.paint,{\"fill-opacity\":n}),v1.extendFlat(r.line.paint,{\"line-opacity\":n}),r}pje.exports={convert:_Xt,convertOnSelect:vje}});var xje=ye((qxr,_je)=>{\"use strict\";var mje=RJ().convert,xXt=RJ().convertOnSelect,gje=bx().traceLayerPrefix;function yje(e,t){this.type=\"choroplethmap\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"fill\",gje+t+\"-fill\"],[\"line\",gje+t+\"-line\"]],this.below=null}var E5=yje.prototype;E5.update=function(e){this._update(mje(e)),e[0].trace._glTrace=this};E5.updateOnSelect=function(e){this._update(xXt(e))};E5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,\"setLayoutProperty\",l.layout),l.layout.visibility===\"visible\"&&t.setOptions(s,\"setPaintProperty\",l.paint)}};E5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};E5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};E5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};_je.exports=function(t,r){var n=r[0].trace,i=new yje(t,n.uid),a=i.sourceId,o=mje(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var wje=ye((Bxr,bje)=>{\"use strict\";bje.exports={attributes:IJ(),supplyDefaults:hje(),colorbar:S_(),calc:RF(),plot:xje(),hoverPoints:FF(),eventData:zF(),selectPoints:OF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i==\"string\"&&i.indexOf(\"water\")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i==\"string\"&&i.indexOf(\"plotly-\")===-1)return i}}},moduleType:\"trace\",name:\"choroplethmap\",basePlotModule:c7(),categories:[\"map\",\"gl\",\"noOpacity\",\"showLegend\"],meta:{hr_name:\"choropleth_map\"}}});var Aje=ye((Nxr,Tje)=>{\"use strict\";Tje.exports=wje()});var FJ=ye((Uxr,Mje)=>{\"use strict\";var bXt=Tu(),wXt=Qo().hovertemplateAttrs,Sje=Gl(),f7=t7(),DJ=Ao().extendFlat;Mje.exports=DJ({lon:f7.lon,lat:f7.lat,z:{valType:\"data_array\",editType:\"calc\"},radius:{valType:\"number\",editType:\"plot\",arrayOk:!0,min:1,dflt:30},below:{valType:\"string\",editType:\"plot\"},text:f7.text,hovertext:f7.hovertext,hoverinfo:DJ({},Sje.hoverinfo,{flags:[\"lon\",\"lat\",\"z\",\"text\",\"name\"]}),hovertemplate:wXt(),showlegend:DJ({},Sje.showlegend,{dflt:!1})},bXt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var Cje=ye((Vxr,Eje)=>{\"use strict\";var TXt=Dr(),AXt=Jh(),SXt=FJ();Eje.exports=function(t,r,n,i){function a(u,c){return TXt.coerce(t,r,SXt,u,c)}var o=a(\"lon\")||[],s=a(\"lat\")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"z\"),a(\"radius\"),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),AXt(t,r,i,a,{prefix:\"\",cLetter:\"z\"})}});var Pje=ye((Gxr,Lje)=>{\"use strict\";var zJ=Eo(),MXt=Dr().isArrayOrTypedArray,OJ=hs().BADNUM,EXt=gv(),kje=Dr()._;Lje.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=MXt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=zJ(u)&&zJ(c)?[+u,+c]:[OJ,OJ],o){var f=a[s];l.z=zJ(f)?f:OJ}}return EXt(t,r,{vals:o?a:[0,1],containerStr:\"\",cLetter:\"z\"}),n&&(i[0].t={labels:{lat:kje(t,\"lat:\")+\" \",lon:kje(t,\"lon:\")+\" \"}}),i}});var zje=ye((Hxr,Fje)=>{\"use strict\";var CXt=Eo(),qJ=Dr(),Ije=Ca(),Rje=tc(),Dje=hs().BADNUM,kXt=tx().makeBlank;Fje.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:\"none\"},paint:{}},a=r._opts={heatmap:i,geojson:kXt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=qJ.isArrayOrTypedArray(l)&&l.length,f=qJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==Dje){var v={};if(c){var x=h.z;v.z=x!==Dje?x:0}f&&(v.r=CXt(u[s])&&u[s]>0?+u[s]:0),o.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:d},properties:v})}}var b=Rje.extractOpts(r),p=b.reversescale?Rje.flipScale(b.colorscale):b.colorscale,C=p[0][1],E=Ije.opacity(C)<1?C:Ije.addOpacity(C,0),A=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,E];for(s=1;s<p.length;s++)A.push(p[s][0],p[s][1]);var L=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return qJ.extendFlat(a.heatmap.paint,{\"heatmap-weight\":c?L:1/(b.max-b.min),\"heatmap-color\":A,\"heatmap-radius\":f?{type:\"identity\",property:\"r\"}:r.radius,\"heatmap-opacity\":r.opacity}),a.geojson={type:\"FeatureCollection\",features:o},a.heatmap.layout.visibility=\"visible\",a}});var Nje=ye((jxr,Bje)=>{\"use strict\";var Oje=zje(),LXt=bx().traceLayerPrefix;function qje(e,t){this.type=\"densitymap\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"heatmap\",LXt+t+\"-heatmap\"]],this.below=null}var h7=qje.prototype;h7.update=function(e){var t=this.subplot,r=this.layerList,n=Oje(e),i=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,\"setLayoutProperty\",u.layout),u.layout.visibility===\"visible\"&&t.setOptions(l,\"setPaintProperty\",u.paint)}};h7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};h7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};h7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Bje.exports=function(t,r){var n=r[0].trace,i=new qje(t,n.uid),a=i.sourceId,o=Oje(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),i}});var Vje=ye((Wxr,Uje)=>{\"use strict\";var PXt=ho(),IXt=o7().hoverPoints,RXt=o7().getExtraText;Uje.exports=function(t,r,n){var i=IXt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,\"z\"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=PXt.tickText(u,u.c2l(l.z),\"hover\").text}return a.extraText=RXt(s,l,o[0].t.labels),[a]}}});var Hje=ye((Xxr,Gje)=>{\"use strict\";Gje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var Wje=ye((Zxr,jje)=>{\"use strict\";jje.exports={attributes:FJ(),supplyDefaults:Cje(),colorbar:S_(),formatLabels:bJ(),calc:Pje(),plot:Nje(),hoverPoints:Vje(),eventData:Hje(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type===\"symbol\"&&typeof a==\"string\"&&a.indexOf(\"plotly-\")===-1)return a}},moduleType:\"trace\",name:\"densitymap\",basePlotModule:c7(),categories:[\"map\",\"gl\",\"showLegend\"],meta:{hr_name:\"density_map\"}}});var Zje=ye((Yxr,Xje)=>{\"use strict\";Xje.exports=Wje()});var NJ=ye((Jxr,$je)=>{\"use strict\";var DXt=ec(),FXt=Gl(),Yje=Eh(),BJ=i3(),zXt=kc().attributes,Kje=Qo().hovertemplateAttrs,OXt=Tu(),qXt=pl().templatedArray,BXt=df().descriptionOnlyNumbers,Jje=Ao().extendFlat,NXt=mc().overrideAll,Kxr=$je.exports=NXt({hoverinfo:Jje({},FXt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:BJ.hoverlabel,domain:zXt({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\",description:BXt(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:DXt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:Yje.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:BJ.hoverlabel,hovertemplate:Kje({},{keys:[\"value\",\"label\"]}),align:{valType:\"enumerated\",values:[\"justify\",\"left\",\"right\",\"center\"],dflt:\"justify\"}},link:{arrowlen:{valType:\"number\",min:0,dflt:0},label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},hovercolor:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:Yje.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:BJ.hoverlabel,hovertemplate:Kje({},{keys:[\"value\",\"label\"]}),colorscales:qXt(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:Jje(OXt().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")});var iWe=ye(($xr,rWe)=>{\"use strict\";var C5=Dr(),d7=NJ(),UXt=Ca(),Qje=cd(),VXt=kc().defaults,eWe=cM(),tWe=pl(),GXt=Yd();rWe.exports=function(t,r,n,i){function a(A,L){return C5.coerce(t,r,d7,A,L)}var o=C5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=tWe.newContainer(r,\"node\");function u(A,L){return C5.coerce(s,l,d7.node,A,L)}u(\"label\"),u(\"groups\"),u(\"x\"),u(\"y\"),u(\"pad\"),u(\"thickness\"),u(\"line.color\"),u(\"line.width\"),u(\"hoverinfo\",t.hoverinfo),eWe(s,l,u,o),u(\"hovertemplate\"),u(\"align\");var c=i.colorway,f=function(A){return c[A%c.length]};u(\"color\",l.label.map(function(A,L){return UXt.addOpacity(f(L),.8)})),u(\"customdata\");var h=t.link||{},d=tWe.newContainer(r,\"link\");function v(A,L){return C5.coerce(h,d,d7.link,A,L)}v(\"label\"),v(\"arrowlen\"),v(\"source\"),v(\"target\"),v(\"value\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),eWe(h,d,v,o),v(\"hovertemplate\");var x=Qje(i.paper_bgcolor).getLuminance()<.333,b=x?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\",p=v(\"color\",b);function C(A){var L=Qje(A);if(!L.isValid())return A;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}v(\"hovercolor\",Array.isArray(p)?p.map(C):C(p)),v(\"customdata\"),GXt(h,d,{name:\"colorscales\",handleItemDefaults:HXt}),VXt(r,i,a),a(\"orientation\"),a(\"valueformat\"),a(\"valuesuffix\");var E;l.x.length&&l.y.length&&(E=\"freeform\"),a(\"arrangement\",E),C5.coerceFont(a,\"textfont\",i.font,{autoShadowDflt:!0}),r._length=null};function HXt(e,t){function r(n,i){return C5.coerce(e,t,d7.link.colorscales,n,i)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}});var UJ=ye((Qxr,nWe)=>{\"use strict\";nWe.exports=jXt;function jXt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l<t;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var u=0,c=[],f=[];function h(b){var p=[b],C=[b];for(r[b]=n[b]=u,i[b]=!0,u+=1;C.length>0;){b=C[C.length-1];var E=e[b];if(a[b]<E.length){for(var A=a[b];A<E.length;++A){var L=E[A];if(r[L]<0){r[L]=n[L]=u,i[L]=!0,u+=1,p.push(L),C.push(L);break}else i[L]&&(n[b]=Math.min(n[b],n[L])|0);o[L]>=0&&s[b].push(o[L])}a[b]=A}else{if(n[b]===r[b]){for(var _=[],k=[],M=0,A=p.length-1;A>=0;--A){var g=p[A];if(i[g]=!1,_.push(g),k.push(s[g]),M+=s[g].length,o[g]=c.length,g===b){p.length=A;break}}c.push(_);for(var P=new Array(M),A=0;A<k.length;A++)for(var T=0;T<k[A].length;T++)P[--M]=k[A][T];f.push(P)}C.pop()}}}for(var l=0;l<t;++l)r[l]<0&&h(l);for(var d,l=0;l<f.length;l++){var v=f[l];if(v.length!==0){v.sort(function(p,C){return p-C}),d=[v[0]];for(var x=1;x<v.length;x++)v[x]!==v[x-1]&&d.push(v[x]);f[l]=d}}return{components:c,adjacencyList:f}}});var lWe=ye((ebr,sWe)=>{\"use strict\";var WXt=UJ(),k5=Dr(),XXt=Km().wrap,YC=k5.isArrayOrTypedArray,aWe=k5.isIndex,oWe=tc();function ZXt(e){var t=e.node,r=e.link,n=[],i=YC(r.color),a=YC(r.hovercolor),o=YC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;c<u;c++){var f=r.colorscales[c],h=oWe.extractScale(f,{cLetter:\"c\"}),d=oWe.makeColorScaleFunc(h);l[f.label]=d}var v=0;for(c=0;c<r.value.length;c++)r.source[c]>v&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var x=v+1;e.node._count=x;var b,p=e.node.groups,C={};for(c=0;c<p.length;c++){var E=p[c];for(b=0;b<E.length;b++){var A=E[b],L=x+c;C.hasOwnProperty(A)?k5.warn(\"Node \"+A+\" is already part of a group.\"):C[A]=L}}var _={source:[],target:[]};for(c=0;c<r.value.length;c++){var k=r.value[c],M=r.source[c],g=r.target[c];if(k>0&&aWe(M,x)&&aWe(g,x)&&!(C.hasOwnProperty(M)&&C.hasOwnProperty(g)&&C[M]===C[g])){C.hasOwnProperty(g)&&(g=C[g]),C.hasOwnProperty(M)&&(M=C[M]),M=+M,g=+g,s[M]=s[g]=!0;var P=\"\";r.label&&r.label[c]&&(P=r.label[c]);var T=null;P&&l.hasOwnProperty(P)&&(T=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:T,source:M,target:g,value:+k}),_.source.push(M),_.target.push(g)}}var z=x+p.length,O=YC(t.color),V=YC(t.customdata),G=[];for(c=0;c<z;c++)if(s[c]){var Z=t.label[c];G.push({group:c>x-1,childrenNodes:[],pointNumber:c,label:Z,color:O?t.color[c]:t.color,customdata:V?t.customdata[c]:t.customdata})}var H=!1;return YXt(z,_.source,_.target)&&(H=!0),{circular:H,links:n,nodes:G,groups:p,groupLookup:C}}function YXt(e,t,r){for(var n=k5.init2dArray(e,0),i=0;i<Math.min(t.length,r.length);i++)if(k5.isIndex(t[i],e)&&k5.isIndex(r[i],e)){if(t[i]===r[i])return!0;n[t[i]].push(r[i])}var a=WXt(n);return a.components.some(function(o){return o.length>1})}sWe.exports=function(t,r){var n=ZXt(r);return XXt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var cWe=ye((v7,uWe)=>{(function(e,t){typeof v7==\"object\"&&typeof uWe!=\"undefined\"?t(v7):(e=e||self,t(e.d3=e.d3||{}))})(v7,function(e){\"use strict\";function t(k){var M=+this._x.call(null,k),g=+this._y.call(null,k);return r(this.cover(M,g),M,g,k)}function r(k,M,g,P){if(isNaN(M)||isNaN(g))return k;var T,z=k._root,O={data:P},V=k._x0,G=k._y0,Z=k._x1,H=k._y1,N,j,re,oe,_e,Me,ke,me;if(!z)return k._root=O,k;for(;z.length;)if((_e=M>=(N=(V+Z)/2))?V=N:Z=N,(Me=g>=(j=(G+H)/2))?G=j:H=j,T=z,!(z=z[ke=Me<<1|_e]))return T[ke]=O,k;if(re=+k._x.call(null,z.data),oe=+k._y.call(null,z.data),M===re&&g===oe)return O.next=z,T?T[ke]=O:k._root=O,k;do T=T?T[ke]=new Array(4):k._root=new Array(4),(_e=M>=(N=(V+Z)/2))?V=N:Z=N,(Me=g>=(j=(G+H)/2))?G=j:H=j;while((ke=Me<<1|_e)===(me=(oe>=j)<<1|re>=N));return T[me]=z,T[ke]=O,k}function n(k){var M,g,P=k.length,T,z,O=new Array(P),V=new Array(P),G=1/0,Z=1/0,H=-1/0,N=-1/0;for(g=0;g<P;++g)isNaN(T=+this._x.call(null,M=k[g]))||isNaN(z=+this._y.call(null,M))||(O[g]=T,V[g]=z,T<G&&(G=T),T>H&&(H=T),z<Z&&(Z=z),z>N&&(N=z));if(G>H||Z>N)return this;for(this.cover(G,Z).cover(H,N),g=0;g<P;++g)r(this,O[g],V[g],k[g]);return this}function i(k,M){if(isNaN(k=+k)||isNaN(M=+M))return this;var g=this._x0,P=this._y0,T=this._x1,z=this._y1;if(isNaN(g))T=(g=Math.floor(k))+1,z=(P=Math.floor(M))+1;else{for(var O=T-g,V=this._root,G,Z;g>k||k>=T||P>M||M>=z;)switch(Z=(M<P)<<1|k<g,G=new Array(4),G[Z]=V,V=G,O*=2,Z){case 0:T=g+O,z=P+O;break;case 1:g=T-O,z=P+O;break;case 2:T=g+O,P=z-O;break;case 3:g=T-O,P=z-O;break}this._root&&this._root.length&&(this._root=V)}return this._x0=g,this._y0=P,this._x1=T,this._y1=z,this}function a(){var k=[];return this.visit(function(M){if(!M.length)do k.push(M.data);while(M=M.next)}),k}function o(k){return arguments.length?this.cover(+k[0][0],+k[0][1]).cover(+k[1][0],+k[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function s(k,M,g,P,T){this.node=k,this.x0=M,this.y0=g,this.x1=P,this.y1=T}function l(k,M,g){var P,T=this._x0,z=this._y0,O,V,G,Z,H=this._x1,N=this._y1,j=[],re=this._root,oe,_e;for(re&&j.push(new s(re,T,z,H,N)),g==null?g=1/0:(T=k-g,z=M-g,H=k+g,N=M+g,g*=g);oe=j.pop();)if(!(!(re=oe.node)||(O=oe.x0)>H||(V=oe.y0)>N||(G=oe.x1)<T||(Z=oe.y1)<z))if(re.length){var Me=(O+G)/2,ke=(V+Z)/2;j.push(new s(re[3],Me,ke,G,Z),new s(re[2],O,ke,Me,Z),new s(re[1],Me,V,G,ke),new s(re[0],O,V,Me,ke)),(_e=(M>=ke)<<1|k>=Me)&&(oe=j[j.length-1],j[j.length-1]=j[j.length-1-_e],j[j.length-1-_e]=oe)}else{var me=k-+this._x.call(null,re.data),ie=M-+this._y.call(null,re.data),Se=me*me+ie*ie;if(Se<g){var Le=Math.sqrt(g=Se);T=k-Le,z=M-Le,H=k+Le,N=M+Le,P=re.data}}return P}function u(k){if(isNaN(H=+this._x.call(null,k))||isNaN(N=+this._y.call(null,k)))return this;var M,g=this._root,P,T,z,O=this._x0,V=this._y0,G=this._x1,Z=this._y1,H,N,j,re,oe,_e,Me,ke;if(!g)return this;if(g.length)for(;;){if((oe=H>=(j=(O+G)/2))?O=j:G=j,(_e=N>=(re=(V+Z)/2))?V=re:Z=re,M=g,!(g=g[Me=_e<<1|oe]))return this;if(!g.length)break;(M[Me+1&3]||M[Me+2&3]||M[Me+3&3])&&(P=M,ke=Me)}for(;g.data!==k;)if(T=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,T?(z?T.next=z:delete T.next,this):M?(z?M[Me]=z:delete M[Me],(g=M[0]||M[1]||M[2]||M[3])&&g===(M[3]||M[2]||M[1]||M[0])&&!g.length&&(P?P[ke]=g:this._root=g),this):(this._root=z,this)}function c(k){for(var M=0,g=k.length;M<g;++M)this.remove(k[M]);return this}function f(){return this._root}function h(){var k=0;return this.visit(function(M){if(!M.length)do++k;while(M=M.next)}),k}function d(k){var M=[],g,P=this._root,T,z,O,V,G;for(P&&M.push(new s(P,this._x0,this._y0,this._x1,this._y1));g=M.pop();)if(!k(P=g.node,z=g.x0,O=g.y0,V=g.x1,G=g.y1)&&P.length){var Z=(z+V)/2,H=(O+G)/2;(T=P[3])&&M.push(new s(T,Z,H,V,G)),(T=P[2])&&M.push(new s(T,z,H,Z,G)),(T=P[1])&&M.push(new s(T,Z,O,V,H)),(T=P[0])&&M.push(new s(T,z,O,Z,H))}return this}function v(k){var M=[],g=[],P;for(this._root&&M.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));P=M.pop();){var T=P.node;if(T.length){var z,O=P.x0,V=P.y0,G=P.x1,Z=P.y1,H=(O+G)/2,N=(V+Z)/2;(z=T[0])&&M.push(new s(z,O,V,H,N)),(z=T[1])&&M.push(new s(z,H,V,G,N)),(z=T[2])&&M.push(new s(z,O,N,H,Z)),(z=T[3])&&M.push(new s(z,H,N,G,Z))}g.push(P)}for(;P=g.pop();)k(P.node,P.x0,P.y0,P.x1,P.y1);return this}function x(k){return k[0]}function b(k){return arguments.length?(this._x=k,this):this._x}function p(k){return k[1]}function C(k){return arguments.length?(this._y=k,this):this._y}function E(k,M,g){var P=new A(M==null?x:M,g==null?p:g,NaN,NaN,NaN,NaN);return k==null?P:P.addAll(k)}function A(k,M,g,P,T,z){this._x=k,this._y=M,this._x0=g,this._y0=P,this._x1=T,this._y1=z,this._root=void 0}function L(k){for(var M={data:k.data},g=M;k=k.next;)g=g.next={data:k.data};return M}var _=E.prototype=A.prototype;_.copy=function(){var k=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),M=this._root,g,P;if(!M)return k;if(!M.length)return k._root=L(M),k;for(g=[{source:M,target:k._root=new Array(4)}];M=g.pop();)for(var T=0;T<4;++T)(P=M.source[T])&&(P.length?g.push({source:P,target:M.target[T]=new Array(4)}):M.target[T]=L(P));return k},_.add=t,_.addAll=n,_.cover=i,_.data=a,_.extent=o,_.find=l,_.remove=u,_.removeAll=c,_.root=f,_.size=h,_.visit=d,_.visitAfter=v,_.x=b,_.y=C,e.quadtree=E,Object.defineProperty(e,\"__esModule\",{value:!0})})});var g7=ye((p7,fWe)=>{(function(e,t){t(typeof p7==\"object\"&&typeof fWe!=\"undefined\"?p7:e.d3=e.d3||{})})(p7,function(e){\"use strict\";var t=\"$\";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var p=new r;if(x instanceof r)x.each(function(_,k){p.set(k,_)});else if(Array.isArray(x)){var C=-1,E=x.length,A;if(b==null)for(;++C<E;)p.set(C,x[C]);else for(;++C<E;)p.set(b(A=x[C],C,x),A)}else if(x)for(var L in x)p.set(L,x[L]);return p}function i(){var x=[],b=[],p,C,E;function A(_,k,M,g){if(k>=x.length)return p!=null&&_.sort(p),C!=null?C(_):_;for(var P=-1,T=_.length,z=x[k++],O,V,G=n(),Z,H=M();++P<T;)(Z=G.get(O=z(V=_[P])+\"\"))?Z.push(V):G.set(O,[V]);return G.each(function(N,j){g(H,j,A(N,k,M,g))}),H}function L(_,k){if(++k>x.length)return _;var M,g=b[k-1];return C!=null&&k>=x.length?M=_.entries():(M=[],_.each(function(P,T){M.push({key:T,values:L(P,k)})})),g!=null?M.sort(function(P,T){return g(P.key,T.key)}):M}return E={object:function(_){return A(_,0,a,o)},map:function(_){return A(_,0,s,l)},entries:function(_){return L(A(_,0,s,l),0)},key:function(_){return x.push(_),E},sortKeys:function(_){return b[x.length-1]=_,E},sortValues:function(_){return p=_,E},rollup:function(_){return C=_,E}}}function a(){return{}}function o(x,b,p){x[b]=p}function s(){return n()}function l(x,b,p){x.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+=\"\",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,b){var p=new u;if(x instanceof u)x.each(function(A){p.add(A)});else if(x){var C=-1,E=x.length;if(b==null)for(;++C<E;)p.add(x[C]);else for(;++C<E;)p.add(b(x[C],C,x))}return p}function h(x){var b=[];for(var p in x)b.push(p);return b}function d(x){var b=[];for(var p in x)b.push(x[p]);return b}function v(x){var b=[];for(var p in x)b.push({key:p,value:x[p]});return b}e.nest=i,e.set=f,e.map=n,e.keys=h,e.values=d,e.entries=v,Object.defineProperty(e,\"__esModule\",{value:!0})})});var dWe=ye((m7,hWe)=>{(function(e,t){typeof m7==\"object\"&&typeof hWe!=\"undefined\"?t(m7):(e=e||self,t(e.d3=e.d3||{}))})(m7,function(e){\"use strict\";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s<l;++s){if(!(c=arguments[s]+\"\")||c in u||/[\\s.]/.test(c))throw new Error(\"illegal type: \"+c);u[c]=[]}return new n(u)}function n(s){this._=s}function i(s,l){return s.trim().split(/^|\\s+/).map(function(u){var c=\"\",f=u.indexOf(\".\");if(f>=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error(\"unknown type: \"+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+\"\",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h<d;)if((f=(s=c[h]).type)&&(f=a(u[f],s.name)))return f;return}if(l!=null&&typeof l!=\"function\")throw new Error(\"invalid callback: \"+l);for(;++h<d;)if(f=(s=c[h]).type)u[f]=o(u[f],s.name,l);else if(l==null)for(f in u)u[f]=o(u[f],s.name,null);return this},copy:function(){var s={},l=this._;for(var u in l)s[u]=l[u].slice();return new n(s)},call:function(s,l){if((f=arguments.length-2)>0)for(var u=new Array(f),c=0,f,h;c<f;++c)u[c]=arguments[c+2];if(!this._.hasOwnProperty(s))throw new Error(\"unknown type: \"+s);for(h=this._[s],c=0,f=h.length;c<f;++c)h[c].value.apply(l,u)},apply:function(s,l,u){if(!this._.hasOwnProperty(s))throw new Error(\"unknown type: \"+s);for(var c=this._[s],f=0,h=c.length;f<h;++f)c[f].value.apply(l,u)}};function a(s,l){for(var u=0,c=s.length,f;u<c;++u)if((f=s[u]).name===l)return f.value}function o(s,l,u){for(var c=0,f=s.length;c<f;++c)if(s[c].name===l){s[c]=t,s=s.slice(0,c).concat(s.slice(c+1));break}return u!=null&&s.push({name:l,value:u}),s}e.dispatch=r,Object.defineProperty(e,\"__esModule\",{value:!0})})});var pWe=ye((y7,vWe)=>{(function(e,t){typeof y7==\"object\"&&typeof vWe!=\"undefined\"?t(y7):(e=e||self,t(e.d3=e.d3||{}))})(y7,function(e){\"use strict\";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance==\"object\"&&performance.now?performance:Date,f=typeof window==\"object\"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(k){setTimeout(k,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=x.prototype={constructor:v,restart:function(k,M,g){if(typeof k!=\"function\")throw new TypeError(\"callback is not a function\");g=(g==null?h():+g)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=k,this._time=g,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function x(k,M,g){var P=new v;return P.restart(k,M,g),P}function b(){h(),++t;for(var k=a,M;k;)(M=l-k._time)>=0&&k._call.call(null,M),k=k._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,E(),l=0}}function C(){var k=c.now(),M=k-s;M>i&&(u-=M,s=k)}function E(){for(var k,M=a,g,P=1/0;M;)M._call?(P>M._time&&(P=M._time),k=M,M=M._next):(g=M._next,M._next=null,M=k?k._next=g:a=g);o=k,A(P)}function A(k){if(!t){r&&(r=clearTimeout(r));var M=k-l;M>24?(k<1/0&&(r=setTimeout(p,k-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(C,i)),t=1,f(p))}}function L(k,M,g){var P=new v;return M=M==null?0:+M,P.restart(function(T){P.stop(),k(T+M)},M,g),P}function _(k,M,g){var P=new v,T=M;return M==null?(P.restart(k,M,g),P):(M=+M,g=g==null?h():+g,P.restart(function z(O){O+=T,P.restart(z,T+=M,g),k(O)},M,g),P)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,\"__esModule\",{value:!0})})});var mWe=ye((_7,gWe)=>{(function(e,t){typeof _7==\"object\"&&typeof gWe!=\"undefined\"?t(_7,cWe(),g7(),dWe(),pWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(_7,function(e,t,r,n,i){\"use strict\";function a(k,M){var g;k==null&&(k=0),M==null&&(M=0);function P(){var T,z=g.length,O,V=0,G=0;for(T=0;T<z;++T)O=g[T],V+=O.x,G+=O.y;for(V=V/z-k,G=G/z-M,T=0;T<z;++T)O=g[T],O.x-=V,O.y-=G}return P.initialize=function(T){g=T},P.x=function(T){return arguments.length?(k=+T,P):k},P.y=function(T){return arguments.length?(M=+T,P):M},P}function o(k){return function(){return k}}function s(){return(Math.random()-.5)*1e-6}function l(k){return k.x+k.vx}function u(k){return k.y+k.vy}function c(k){var M,g,P=1,T=1;typeof k!=\"function\"&&(k=o(k==null?1:+k));function z(){for(var G,Z=M.length,H,N,j,re,oe,_e,Me=0;Me<T;++Me)for(H=t.quadtree(M,l,u).visitAfter(O),G=0;G<Z;++G)N=M[G],oe=g[N.index],_e=oe*oe,j=N.x+N.vx,re=N.y+N.vy,H.visit(ke);function ke(me,ie,Se,Le,Ae){var De=me.data,Pe=me.r,ge=oe+Pe;if(De){if(De.index>N.index){var Fe=j-De.x-De.vx,ce=re-De.y-De.vy,Ze=Fe*Fe+ce*ce;Ze<ge*ge&&(Fe===0&&(Fe=s(),Ze+=Fe*Fe),ce===0&&(ce=s(),Ze+=ce*ce),Ze=(ge-(Ze=Math.sqrt(Ze)))/Ze*P,N.vx+=(Fe*=Ze)*(ge=(Pe*=Pe)/(_e+Pe)),N.vy+=(ce*=Ze)*ge,De.vx-=Fe*(ge=1-ge),De.vy-=ce*ge)}return}return ie>j+ge||Le<j-ge||Se>re+ge||Ae<re-ge}}function O(G){if(G.data)return G.r=g[G.data.index];for(var Z=G.r=0;Z<4;++Z)G[Z]&&G[Z].r>G.r&&(G.r=G[Z].r)}function V(){if(M){var G,Z=M.length,H;for(g=new Array(Z),G=0;G<Z;++G)H=M[G],g[H.index]=+k(H,G,M)}}return z.initialize=function(G){M=G,V()},z.iterations=function(G){return arguments.length?(T=+G,z):T},z.strength=function(G){return arguments.length?(P=+G,z):P},z.radius=function(G){return arguments.length?(k=typeof G==\"function\"?G:o(+G),V(),z):k},z}function f(k){return k.index}function h(k,M){var g=k.get(M);if(!g)throw new Error(\"missing: \"+M);return g}function d(k){var M=f,g=H,P,T=o(30),z,O,V,G,Z=1;k==null&&(k=[]);function H(_e){return 1/Math.min(V[_e.source.index],V[_e.target.index])}function N(_e){for(var Me=0,ke=k.length;Me<Z;++Me)for(var me=0,ie,Se,Le,Ae,De,Pe,ge;me<ke;++me)ie=k[me],Se=ie.source,Le=ie.target,Ae=Le.x+Le.vx-Se.x-Se.vx||s(),De=Le.y+Le.vy-Se.y-Se.vy||s(),Pe=Math.sqrt(Ae*Ae+De*De),Pe=(Pe-z[me])/Pe*_e*P[me],Ae*=Pe,De*=Pe,Le.vx-=Ae*(ge=G[me]),Le.vy-=De*ge,Se.vx+=Ae*(ge=1-ge),Se.vy+=De*ge}function j(){if(O){var _e,Me=O.length,ke=k.length,me=r.map(O,M),ie;for(_e=0,V=new Array(Me);_e<ke;++_e)ie=k[_e],ie.index=_e,typeof ie.source!=\"object\"&&(ie.source=h(me,ie.source)),typeof ie.target!=\"object\"&&(ie.target=h(me,ie.target)),V[ie.source.index]=(V[ie.source.index]||0)+1,V[ie.target.index]=(V[ie.target.index]||0)+1;for(_e=0,G=new Array(ke);_e<ke;++_e)ie=k[_e],G[_e]=V[ie.source.index]/(V[ie.source.index]+V[ie.target.index]);P=new Array(ke),re(),z=new Array(ke),oe()}}function re(){if(O)for(var _e=0,Me=k.length;_e<Me;++_e)P[_e]=+g(k[_e],_e,k)}function oe(){if(O)for(var _e=0,Me=k.length;_e<Me;++_e)z[_e]=+T(k[_e],_e,k)}return N.initialize=function(_e){O=_e,j()},N.links=function(_e){return arguments.length?(k=_e,j(),N):k},N.id=function(_e){return arguments.length?(M=_e,N):M},N.iterations=function(_e){return arguments.length?(Z=+_e,N):Z},N.strength=function(_e){return arguments.length?(g=typeof _e==\"function\"?_e:o(+_e),re(),N):g},N.distance=function(_e){return arguments.length?(T=typeof _e==\"function\"?_e:o(+_e),oe(),N):T},N}function v(k){return k.x}function x(k){return k.y}var b=10,p=Math.PI*(3-Math.sqrt(5));function C(k){var M,g=1,P=.001,T=1-Math.pow(P,1/300),z=0,O=.6,V=r.map(),G=i.timer(H),Z=n.dispatch(\"tick\",\"end\");k==null&&(k=[]);function H(){N(),Z.call(\"tick\",M),g<P&&(G.stop(),Z.call(\"end\",M))}function N(oe){var _e,Me=k.length,ke;oe===void 0&&(oe=1);for(var me=0;me<oe;++me)for(g+=(z-g)*T,V.each(function(ie){ie(g)}),_e=0;_e<Me;++_e)ke=k[_e],ke.fx==null?ke.x+=ke.vx*=O:(ke.x=ke.fx,ke.vx=0),ke.fy==null?ke.y+=ke.vy*=O:(ke.y=ke.fy,ke.vy=0);return M}function j(){for(var oe=0,_e=k.length,Me;oe<_e;++oe){if(Me=k[oe],Me.index=oe,Me.fx!=null&&(Me.x=Me.fx),Me.fy!=null&&(Me.y=Me.fy),isNaN(Me.x)||isNaN(Me.y)){var ke=b*Math.sqrt(oe),me=oe*p;Me.x=ke*Math.cos(me),Me.y=ke*Math.sin(me)}(isNaN(Me.vx)||isNaN(Me.vy))&&(Me.vx=Me.vy=0)}}function re(oe){return oe.initialize&&oe.initialize(k),oe}return j(),M={tick:N,restart:function(){return G.restart(H),M},stop:function(){return G.stop(),M},nodes:function(oe){return arguments.length?(k=oe,j(),V.each(re),M):k},alpha:function(oe){return arguments.length?(g=+oe,M):g},alphaMin:function(oe){return arguments.length?(P=+oe,M):P},alphaDecay:function(oe){return arguments.length?(T=+oe,M):+T},alphaTarget:function(oe){return arguments.length?(z=+oe,M):z},velocityDecay:function(oe){return arguments.length?(O=1-oe,M):1-O},force:function(oe,_e){return arguments.length>1?(_e==null?V.remove(oe):V.set(oe,re(_e)),M):V.get(oe)},find:function(oe,_e,Me){var ke=0,me=k.length,ie,Se,Le,Ae,De;for(Me==null?Me=1/0:Me*=Me,ke=0;ke<me;++ke)Ae=k[ke],ie=oe-Ae.x,Se=_e-Ae.y,Le=ie*ie+Se*Se,Le<Me&&(De=Ae,Me=Le);return De},on:function(oe,_e){return arguments.length>1?(Z.on(oe,_e),M):Z.on(oe)}}}function E(){var k,M,g,P=o(-30),T,z=1,O=1/0,V=.81;function G(j){var re,oe=k.length,_e=t.quadtree(k,v,x).visitAfter(H);for(g=j,re=0;re<oe;++re)M=k[re],_e.visit(N)}function Z(){if(k){var j,re=k.length,oe;for(T=new Array(re),j=0;j<re;++j)oe=k[j],T[oe.index]=+P(oe,j,k)}}function H(j){var re=0,oe,_e,Me=0,ke,me,ie;if(j.length){for(ke=me=ie=0;ie<4;++ie)(oe=j[ie])&&(_e=Math.abs(oe.value))&&(re+=oe.value,Me+=_e,ke+=_e*oe.x,me+=_e*oe.y);j.x=ke/Me,j.y=me/Me}else{oe=j,oe.x=oe.data.x,oe.y=oe.data.y;do re+=T[oe.data.index];while(oe=oe.next)}j.value=re}function N(j,re,oe,_e){if(!j.value)return!0;var Me=j.x-M.x,ke=j.y-M.y,me=_e-re,ie=Me*Me+ke*ke;if(me*me/V<ie)return ie<O&&(Me===0&&(Me=s(),ie+=Me*Me),ke===0&&(ke=s(),ie+=ke*ke),ie<z&&(ie=Math.sqrt(z*ie)),M.vx+=Me*j.value*g/ie,M.vy+=ke*j.value*g/ie),!0;if(j.length||ie>=O)return;(j.data!==M||j.next)&&(Me===0&&(Me=s(),ie+=Me*Me),ke===0&&(ke=s(),ie+=ke*ke),ie<z&&(ie=Math.sqrt(z*ie)));do j.data!==M&&(me=T[j.data.index]*g/ie,M.vx+=Me*me,M.vy+=ke*me);while(j=j.next)}return G.initialize=function(j){k=j,Z()},G.strength=function(j){return arguments.length?(P=typeof j==\"function\"?j:o(+j),Z(),G):P},G.distanceMin=function(j){return arguments.length?(z=j*j,G):Math.sqrt(z)},G.distanceMax=function(j){return arguments.length?(O=j*j,G):Math.sqrt(O)},G.theta=function(j){return arguments.length?(V=j*j,G):Math.sqrt(V)},G}function A(k,M,g){var P,T=o(.1),z,O;typeof k!=\"function\"&&(k=o(+k)),M==null&&(M=0),g==null&&(g=0);function V(Z){for(var H=0,N=P.length;H<N;++H){var j=P[H],re=j.x-M||1e-6,oe=j.y-g||1e-6,_e=Math.sqrt(re*re+oe*oe),Me=(O[H]-_e)*z[H]*Z/_e;j.vx+=re*Me,j.vy+=oe*Me}}function G(){if(P){var Z,H=P.length;for(z=new Array(H),O=new Array(H),Z=0;Z<H;++Z)O[Z]=+k(P[Z],Z,P),z[Z]=isNaN(O[Z])?0:+T(P[Z],Z,P)}}return V.initialize=function(Z){P=Z,G()},V.strength=function(Z){return arguments.length?(T=typeof Z==\"function\"?Z:o(+Z),G(),V):T},V.radius=function(Z){return arguments.length?(k=typeof Z==\"function\"?Z:o(+Z),G(),V):k},V.x=function(Z){return arguments.length?(M=+Z,V):M},V.y=function(Z){return arguments.length?(g=+Z,V):g},V}function L(k){var M=o(.1),g,P,T;typeof k!=\"function\"&&(k=o(k==null?0:+k));function z(V){for(var G=0,Z=g.length,H;G<Z;++G)H=g[G],H.vx+=(T[G]-H.x)*P[G]*V}function O(){if(g){var V,G=g.length;for(P=new Array(G),T=new Array(G),V=0;V<G;++V)P[V]=isNaN(T[V]=+k(g[V],V,g))?0:+M(g[V],V,g)}}return z.initialize=function(V){g=V,O()},z.strength=function(V){return arguments.length?(M=typeof V==\"function\"?V:o(+V),O(),z):M},z.x=function(V){return arguments.length?(k=typeof V==\"function\"?V:o(+V),O(),z):k},z}function _(k){var M=o(.1),g,P,T;typeof k!=\"function\"&&(k=o(k==null?0:+k));function z(V){for(var G=0,Z=g.length,H;G<Z;++G)H=g[G],H.vy+=(T[G]-H.y)*P[G]*V}function O(){if(g){var V,G=g.length;for(P=new Array(G),T=new Array(G),V=0;V<G;++V)P[V]=isNaN(T[V]=+k(g[V],V,g))?0:+M(g[V],V,g)}}return z.initialize=function(V){g=V,O()},z.strength=function(V){return arguments.length?(M=typeof V==\"function\"?V:o(+V),O(),z):M},z.y=function(V){return arguments.length?(k=typeof V==\"function\"?V:o(+V),O(),z):k},z}e.forceCenter=a,e.forceCollide=c,e.forceLink=d,e.forceManyBody=E,e.forceRadial=A,e.forceSimulation=C,e.forceX=L,e.forceY=_,Object.defineProperty(e,\"__esModule\",{value:!0})})});var _We=ye((x7,yWe)=>{(function(e,t){typeof x7==\"object\"&&typeof yWe!=\"undefined\"?t(x7):(e=e||self,t(e.d3=e.d3||{}))})(x7,function(e){\"use strict\";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\"}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+=\"M\"+(this._x0=this._x1=+s)+\",\"+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\")},lineTo:function(s,l){this._+=\"L\"+(this._x1=+s)+\",\"+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+=\"Q\"+ +s+\",\"+ +l+\",\"+(this._x1=+u)+\",\"+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+=\"C\"+ +s+\",\"+ +l+\",\"+ +u+\",\"+ +c+\",\"+(this._x1=+f)+\",\"+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,x=c-l,b=h-s,p=d-l,C=b*b+p*p;if(f<0)throw new Error(\"negative radius: \"+f);if(this._x1===null)this._+=\"M\"+(this._x1=s)+\",\"+(this._y1=l);else if(C>n)if(!(Math.abs(p*v-x*b)>n)||!f)this._+=\"L\"+(this._x1=s)+\",\"+(this._y1=l);else{var E=u-h,A=c-d,L=v*v+x*x,_=E*E+A*A,k=Math.sqrt(L),M=Math.sqrt(C),g=f*Math.tan((t-Math.acos((L+C-_)/(2*k*M)))/2),P=g/M,T=g/k;Math.abs(P-1)>n&&(this._+=\"L\"+(s+P*b)+\",\"+(l+P*p)),this._+=\"A\"+f+\",\"+f+\",0,0,\"+ +(p*E>b*A)+\",\"+(this._x1=s+T*v)+\",\"+(this._y1=l+T*x)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),x=s+d,b=l+v,p=1^h,C=h?c-f:f-c;if(u<0)throw new Error(\"negative radius: \"+u);this._x1===null?this._+=\"M\"+x+\",\"+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+=\"L\"+x+\",\"+b),u&&(C<0&&(C=C%r+r),C>i?this._+=\"A\"+u+\",\"+u+\",0,1,\"+p+\",\"+(s-d)+\",\"+(l-v)+\"A\"+u+\",\"+u+\",0,1,\"+p+\",\"+(this._x1=x)+\",\"+(this._y1=b):C>n&&(this._+=\"A\"+u+\",\"+u+\",0,\"+ +(C>=t)+\",\"+p+\",\"+(this._x1=s+u*Math.cos(f))+\",\"+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+=\"M\"+(this._x0=this._x1=+s)+\",\"+(this._y0=this._y1=+l)+\"h\"+ +u+\"v\"+ +c+\"h\"+-u+\"Z\"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,\"__esModule\",{value:!0})})});var VJ=ye((b7,xWe)=>{(function(e,t){typeof b7==\"object\"&&typeof xWe!=\"undefined\"?t(b7,_We()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(b7,function(e,t){\"use strict\";function r(St){return function(){return St}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(St){return St>1?0:St<-1?f:Math.acos(St)}function x(St){return St>=1?h:St<=-1?-h:Math.asin(St)}function b(St){return St.innerRadius}function p(St){return St.outerRadius}function C(St){return St.startAngle}function E(St){return St.endAngle}function A(St){return St&&St.padAngle}function L(St,Cr,Qr,pi,fn,Sn,En,ki){var _n=Qr-St,ya=pi-Cr,Jn=En-fn,Ma=ki-Sn,_o=Ma*_n-Jn*ya;if(!(_o*_o<c))return _o=(Jn*(Cr-Sn)-Ma*(St-fn))/_o,[St+_o*_n,Cr+_o*ya]}function _(St,Cr,Qr,pi,fn,Sn,En){var ki=St-Qr,_n=Cr-pi,ya=(En?Sn:-Sn)/u(ki*ki+_n*_n),Jn=ya*_n,Ma=-ya*ki,_o=St+Jn,No=Cr+Ma,po=Qr+Jn,Lo=pi+Ma,Co=(_o+po)/2,Fs=(No+Lo)/2,zs=po-_o,ul=Lo-No,cl=zs*zs+ul*ul,zl=fn-Sn,cs=_o*Lo-po*No,nl=(ul<0?-1:1)*u(o(0,zl*zl*cl-cs*cs)),Ss=(cs*ul-zs*nl)/cl,fl=(-cs*zs-ul*nl)/cl,Js=(cs*ul+zs*nl)/cl,Os=(-cs*zs+ul*nl)/cl,Io=Ss-Co,us=fl-Fs,Zl=Js-Co,Su=Os-Fs;return Io*Io+us*us>Zl*Zl+Su*Su&&(Ss=Js,fl=Os),{cx:Ss,cy:fl,x01:-Jn,y01:-Ma,x11:Ss*(fn/zl-1),y11:fl*(fn/zl-1)}}function k(){var St=b,Cr=p,Qr=r(0),pi=null,fn=C,Sn=E,En=A,ki=null;function _n(){var ya,Jn,Ma=+St.apply(this,arguments),_o=+Cr.apply(this,arguments),No=fn.apply(this,arguments)-h,po=Sn.apply(this,arguments)-h,Lo=n(po-No),Co=po>No;if(ki||(ki=ya=t.path()),_o<Ma&&(Jn=_o,_o=Ma,Ma=Jn),!(_o>c))ki.moveTo(0,0);else if(Lo>d-c)ki.moveTo(_o*a(No),_o*l(No)),ki.arc(0,0,_o,No,po,!Co),Ma>c&&(ki.moveTo(Ma*a(po),Ma*l(po)),ki.arc(0,0,Ma,po,No,Co));else{var Fs=No,zs=po,ul=No,cl=po,zl=Lo,cs=Lo,nl=En.apply(this,arguments)/2,Ss=nl>c&&(pi?+pi.apply(this,arguments):u(Ma*Ma+_o*_o)),fl=s(n(_o-Ma)/2,+Qr.apply(this,arguments)),Js=fl,Os=fl,Io,us;if(Ss>c){var Zl=x(Ss/Ma*l(nl)),Su=x(Ss/_o*l(nl));(zl-=Zl*2)>c?(Zl*=Co?1:-1,ul+=Zl,cl-=Zl):(zl=0,ul=cl=(No+po)/2),(cs-=Su*2)>c?(Su*=Co?1:-1,Fs+=Su,zs-=Su):(cs=0,Fs=zs=(No+po)/2)}var nc=_o*a(Fs),ws=_o*l(Fs),Fn=Ma*a(cl),_a=Ma*l(cl);if(fl>c){var Vu=_o*a(zs),Ol=_o*l(zs),xo=Ma*a(ul),Yl=Ma*l(ul),Us;if(Lo<f&&(Us=L(nc,ws,xo,Yl,Vu,Ol,Fn,_a))){var Hl=nc-Us[0],ac=ws-Us[1],aa=Vu-Us[0],Oo=Ol-Us[1],qo=1/l(v((Hl*aa+ac*Oo)/(u(Hl*Hl+ac*ac)*u(aa*aa+Oo*Oo)))/2),ql=u(Us[0]*Us[0]+Us[1]*Us[1]);Js=s(fl,(Ma-ql)/(qo-1)),Os=s(fl,(_o-ql)/(qo+1))}}cs>c?Os>c?(Io=_(xo,Yl,nc,ws,_o,Os,Co),us=_(Vu,Ol,Fn,_a,_o,Os,Co),ki.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),Os<fl?ki.arc(Io.cx,Io.cy,Os,i(Io.y01,Io.x01),i(us.y01,us.x01),!Co):(ki.arc(Io.cx,Io.cy,Os,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!Co),ki.arc(0,0,_o,i(Io.cy+Io.y11,Io.cx+Io.x11),i(us.cy+us.y11,us.cx+us.x11),!Co),ki.arc(us.cx,us.cy,Os,i(us.y11,us.x11),i(us.y01,us.x01),!Co))):(ki.moveTo(nc,ws),ki.arc(0,0,_o,Fs,zs,!Co)):ki.moveTo(nc,ws),!(Ma>c)||!(zl>c)?ki.lineTo(Fn,_a):Js>c?(Io=_(Fn,_a,Vu,Ol,Ma,-Js,Co),us=_(nc,ws,xo,Yl,Ma,-Js,Co),ki.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Js<fl?ki.arc(Io.cx,Io.cy,Js,i(Io.y01,Io.x01),i(us.y01,us.x01),!Co):(ki.arc(Io.cx,Io.cy,Js,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!Co),ki.arc(0,0,Ma,i(Io.cy+Io.y11,Io.cx+Io.x11),i(us.cy+us.y11,us.cx+us.x11),Co),ki.arc(us.cx,us.cy,Js,i(us.y11,us.x11),i(us.y01,us.x01),!Co))):ki.arc(0,0,Ma,cl,ul,Co)}if(ki.closePath(),ya)return ki=null,ya+\"\"||null}return _n.centroid=function(){var ya=(+St.apply(this,arguments)+ +Cr.apply(this,arguments))/2,Jn=(+fn.apply(this,arguments)+ +Sn.apply(this,arguments))/2-f/2;return[a(Jn)*ya,l(Jn)*ya]},_n.innerRadius=function(ya){return arguments.length?(St=typeof ya==\"function\"?ya:r(+ya),_n):St},_n.outerRadius=function(ya){return arguments.length?(Cr=typeof ya==\"function\"?ya:r(+ya),_n):Cr},_n.cornerRadius=function(ya){return arguments.length?(Qr=typeof ya==\"function\"?ya:r(+ya),_n):Qr},_n.padRadius=function(ya){return arguments.length?(pi=ya==null?null:typeof ya==\"function\"?ya:r(+ya),_n):pi},_n.startAngle=function(ya){return arguments.length?(fn=typeof ya==\"function\"?ya:r(+ya),_n):fn},_n.endAngle=function(ya){return arguments.length?(Sn=typeof ya==\"function\"?ya:r(+ya),_n):Sn},_n.padAngle=function(ya){return arguments.length?(En=typeof ya==\"function\"?ya:r(+ya),_n):En},_n.context=function(ya){return arguments.length?(ki=ya==null?null:ya,_n):ki},_n}function M(St){this._context=St}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2;default:this._context.lineTo(St,Cr);break}}};function g(St){return new M(St)}function P(St){return St[0]}function T(St){return St[1]}function z(){var St=P,Cr=T,Qr=r(!0),pi=null,fn=g,Sn=null;function En(ki){var _n,ya=ki.length,Jn,Ma=!1,_o;for(pi==null&&(Sn=fn(_o=t.path())),_n=0;_n<=ya;++_n)!(_n<ya&&Qr(Jn=ki[_n],_n,ki))===Ma&&((Ma=!Ma)?Sn.lineStart():Sn.lineEnd()),Ma&&Sn.point(+St(Jn,_n,ki),+Cr(Jn,_n,ki));if(_o)return Sn=null,_o+\"\"||null}return En.x=function(ki){return arguments.length?(St=typeof ki==\"function\"?ki:r(+ki),En):St},En.y=function(ki){return arguments.length?(Cr=typeof ki==\"function\"?ki:r(+ki),En):Cr},En.defined=function(ki){return arguments.length?(Qr=typeof ki==\"function\"?ki:r(!!ki),En):Qr},En.curve=function(ki){return arguments.length?(fn=ki,pi!=null&&(Sn=fn(pi)),En):fn},En.context=function(ki){return arguments.length?(ki==null?pi=Sn=null:Sn=fn(pi=ki),En):pi},En}function O(){var St=P,Cr=null,Qr=r(0),pi=T,fn=r(!0),Sn=null,En=g,ki=null;function _n(Jn){var Ma,_o,No,po=Jn.length,Lo,Co=!1,Fs,zs=new Array(po),ul=new Array(po);for(Sn==null&&(ki=En(Fs=t.path())),Ma=0;Ma<=po;++Ma){if(!(Ma<po&&fn(Lo=Jn[Ma],Ma,Jn))===Co)if(Co=!Co)_o=Ma,ki.areaStart(),ki.lineStart();else{for(ki.lineEnd(),ki.lineStart(),No=Ma-1;No>=_o;--No)ki.point(zs[No],ul[No]);ki.lineEnd(),ki.areaEnd()}Co&&(zs[Ma]=+St(Lo,Ma,Jn),ul[Ma]=+Qr(Lo,Ma,Jn),ki.point(Cr?+Cr(Lo,Ma,Jn):zs[Ma],pi?+pi(Lo,Ma,Jn):ul[Ma]))}if(Fs)return ki=null,Fs+\"\"||null}function ya(){return z().defined(fn).curve(En).context(Sn)}return _n.x=function(Jn){return arguments.length?(St=typeof Jn==\"function\"?Jn:r(+Jn),Cr=null,_n):St},_n.x0=function(Jn){return arguments.length?(St=typeof Jn==\"function\"?Jn:r(+Jn),_n):St},_n.x1=function(Jn){return arguments.length?(Cr=Jn==null?null:typeof Jn==\"function\"?Jn:r(+Jn),_n):Cr},_n.y=function(Jn){return arguments.length?(Qr=typeof Jn==\"function\"?Jn:r(+Jn),pi=null,_n):Qr},_n.y0=function(Jn){return arguments.length?(Qr=typeof Jn==\"function\"?Jn:r(+Jn),_n):Qr},_n.y1=function(Jn){return arguments.length?(pi=Jn==null?null:typeof Jn==\"function\"?Jn:r(+Jn),_n):pi},_n.lineX0=_n.lineY0=function(){return ya().x(St).y(Qr)},_n.lineY1=function(){return ya().x(St).y(pi)},_n.lineX1=function(){return ya().x(Cr).y(Qr)},_n.defined=function(Jn){return arguments.length?(fn=typeof Jn==\"function\"?Jn:r(!!Jn),_n):fn},_n.curve=function(Jn){return arguments.length?(En=Jn,Sn!=null&&(ki=En(Sn)),_n):En},_n.context=function(Jn){return arguments.length?(Jn==null?Sn=ki=null:ki=En(Sn=Jn),_n):Sn},_n}function V(St,Cr){return Cr<St?-1:Cr>St?1:Cr>=St?0:NaN}function G(St){return St}function Z(){var St=G,Cr=V,Qr=null,pi=r(0),fn=r(d),Sn=r(0);function En(ki){var _n,ya=ki.length,Jn,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+pi.apply(this,arguments),Co=Math.min(d,Math.max(-d,fn.apply(this,arguments)-Lo)),Fs,zs=Math.min(Math.abs(Co)/ya,Sn.apply(this,arguments)),ul=zs*(Co<0?-1:1),cl;for(_n=0;_n<ya;++_n)(cl=po[No[_n]=_n]=+St(ki[_n],_n,ki))>0&&(_o+=cl);for(Cr!=null?No.sort(function(zl,cs){return Cr(po[zl],po[cs])}):Qr!=null&&No.sort(function(zl,cs){return Qr(ki[zl],ki[cs])}),_n=0,Ma=_o?(Co-ya*ul)/_o:0;_n<ya;++_n,Lo=Fs)Jn=No[_n],cl=po[Jn],Fs=Lo+(cl>0?cl*Ma:0)+ul,po[Jn]={data:ki[Jn],index:_n,value:cl,startAngle:Lo,endAngle:Fs,padAngle:zs};return po}return En.value=function(ki){return arguments.length?(St=typeof ki==\"function\"?ki:r(+ki),En):St},En.sortValues=function(ki){return arguments.length?(Cr=ki,Qr=null,En):Cr},En.sort=function(ki){return arguments.length?(Qr=ki,Cr=null,En):Qr},En.startAngle=function(ki){return arguments.length?(pi=typeof ki==\"function\"?ki:r(+ki),En):pi},En.endAngle=function(ki){return arguments.length?(fn=typeof ki==\"function\"?ki:r(+ki),En):fn},En.padAngle=function(ki){return arguments.length?(Sn=typeof ki==\"function\"?ki:r(+ki),En):Sn},En}var H=j(g);function N(St){this._curve=St}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(St,Cr){this._curve.point(Cr*Math.sin(St),Cr*-Math.cos(St))}};function j(St){function Cr(Qr){return new N(St(Qr))}return Cr._curve=St,Cr}function re(St){var Cr=St.curve;return St.angle=St.x,delete St.x,St.radius=St.y,delete St.y,St.curve=function(Qr){return arguments.length?Cr(j(Qr)):Cr()._curve},St}function oe(){return re(z().curve(H))}function _e(){var St=O().curve(H),Cr=St.curve,Qr=St.lineX0,pi=St.lineX1,fn=St.lineY0,Sn=St.lineY1;return St.angle=St.x,delete St.x,St.startAngle=St.x0,delete St.x0,St.endAngle=St.x1,delete St.x1,St.radius=St.y,delete St.y,St.innerRadius=St.y0,delete St.y0,St.outerRadius=St.y1,delete St.y1,St.lineStartAngle=function(){return re(Qr())},delete St.lineX0,St.lineEndAngle=function(){return re(pi())},delete St.lineX1,St.lineInnerRadius=function(){return re(fn())},delete St.lineY0,St.lineOuterRadius=function(){return re(Sn())},delete St.lineY1,St.curve=function(En){return arguments.length?Cr(j(En)):Cr()._curve},St}function Me(St,Cr){return[(Cr=+Cr)*Math.cos(St-=Math.PI/2),Cr*Math.sin(St)]}var ke=Array.prototype.slice;function me(St){return St.source}function ie(St){return St.target}function Se(St){var Cr=me,Qr=ie,pi=P,fn=T,Sn=null;function En(){var ki,_n=ke.call(arguments),ya=Cr.apply(this,_n),Jn=Qr.apply(this,_n);if(Sn||(Sn=ki=t.path()),St(Sn,+pi.apply(this,(_n[0]=ya,_n)),+fn.apply(this,_n),+pi.apply(this,(_n[0]=Jn,_n)),+fn.apply(this,_n)),ki)return Sn=null,ki+\"\"||null}return En.source=function(ki){return arguments.length?(Cr=ki,En):Cr},En.target=function(ki){return arguments.length?(Qr=ki,En):Qr},En.x=function(ki){return arguments.length?(pi=typeof ki==\"function\"?ki:r(+ki),En):pi},En.y=function(ki){return arguments.length?(fn=typeof ki==\"function\"?ki:r(+ki),En):fn},En.context=function(ki){return arguments.length?(Sn=ki==null?null:ki,En):Sn},En}function Le(St,Cr,Qr,pi,fn){St.moveTo(Cr,Qr),St.bezierCurveTo(Cr=(Cr+pi)/2,Qr,Cr,fn,pi,fn)}function Ae(St,Cr,Qr,pi,fn){St.moveTo(Cr,Qr),St.bezierCurveTo(Cr,Qr=(Qr+fn)/2,pi,Qr,pi,fn)}function De(St,Cr,Qr,pi,fn){var Sn=Me(Cr,Qr),En=Me(Cr,Qr=(Qr+fn)/2),ki=Me(pi,Qr),_n=Me(pi,fn);St.moveTo(Sn[0],Sn[1]),St.bezierCurveTo(En[0],En[1],ki[0],ki[1],_n[0],_n[1])}function Pe(){return Se(Le)}function ge(){return Se(Ae)}function Fe(){var St=Se(De);return St.angle=St.x,delete St.x,St.radius=St.y,delete St.y,St}var ce={draw:function(St,Cr){var Qr=Math.sqrt(Cr/f);St.moveTo(Qr,0),St.arc(0,0,Qr,0,d)}},Ze={draw:function(St,Cr){var Qr=Math.sqrt(Cr/5)/2;St.moveTo(-3*Qr,-Qr),St.lineTo(-Qr,-Qr),St.lineTo(-Qr,-3*Qr),St.lineTo(Qr,-3*Qr),St.lineTo(Qr,-Qr),St.lineTo(3*Qr,-Qr),St.lineTo(3*Qr,Qr),St.lineTo(Qr,Qr),St.lineTo(Qr,3*Qr),St.lineTo(-Qr,3*Qr),St.lineTo(-Qr,Qr),St.lineTo(-3*Qr,Qr),St.closePath()}},ct=Math.sqrt(1/3),pt=ct*2,Wt={draw:function(St,Cr){var Qr=Math.sqrt(Cr/pt),pi=Qr*ct;St.moveTo(0,-Qr),St.lineTo(pi,0),St.lineTo(0,Qr),St.lineTo(-pi,0),St.closePath()}},st=.8908130915292852,lt=Math.sin(f/10)/Math.sin(7*f/10),Gt=Math.sin(d/10)*lt,Nt=-Math.cos(d/10)*lt,$t={draw:function(St,Cr){var Qr=Math.sqrt(Cr*st),pi=Gt*Qr,fn=Nt*Qr;St.moveTo(0,-Qr),St.lineTo(pi,fn);for(var Sn=1;Sn<5;++Sn){var En=d*Sn/5,ki=Math.cos(En),_n=Math.sin(En);St.lineTo(_n*Qr,-ki*Qr),St.lineTo(ki*pi-_n*fn,_n*pi+ki*fn)}St.closePath()}},sr={draw:function(St,Cr){var Qr=Math.sqrt(Cr),pi=-Qr/2;St.rect(pi,pi,Qr,Qr)}},wr=Math.sqrt(3),ur={draw:function(St,Cr){var Qr=-Math.sqrt(Cr/(wr*3));St.moveTo(0,Qr*2),St.lineTo(-wr*Qr,-Qr),St.lineTo(wr*Qr,-Qr),St.closePath()}},Qe=-.5,Et=Math.sqrt(3)/2,er=1/Math.sqrt(12),Ut=(er/2+1)*3,Ft={draw:function(St,Cr){var Qr=Math.sqrt(Cr/Ut),pi=Qr/2,fn=Qr*er,Sn=pi,En=Qr*er+Qr,ki=-Sn,_n=En;St.moveTo(pi,fn),St.lineTo(Sn,En),St.lineTo(ki,_n),St.lineTo(Qe*pi-Et*fn,Et*pi+Qe*fn),St.lineTo(Qe*Sn-Et*En,Et*Sn+Qe*En),St.lineTo(Qe*ki-Et*_n,Et*ki+Qe*_n),St.lineTo(Qe*pi+Et*fn,Qe*fn-Et*pi),St.lineTo(Qe*Sn+Et*En,Qe*En-Et*Sn),St.lineTo(Qe*ki+Et*_n,Qe*_n-Et*ki),St.closePath()}},bt=[ce,Ze,Wt,sr,$t,ur,Ft];function yt(){var St=r(ce),Cr=r(64),Qr=null;function pi(){var fn;if(Qr||(Qr=fn=t.path()),St.apply(this,arguments).draw(Qr,+Cr.apply(this,arguments)),fn)return Qr=null,fn+\"\"||null}return pi.type=function(fn){return arguments.length?(St=typeof fn==\"function\"?fn:r(fn),pi):St},pi.size=function(fn){return arguments.length?(Cr=typeof fn==\"function\"?fn:r(+fn),pi):Cr},pi.context=function(fn){return arguments.length?(Qr=fn==null?null:fn,pi):Qr},pi}function Yt(){}function lr(St,Cr,Qr){St._context.bezierCurveTo((2*St._x0+St._x1)/3,(2*St._y0+St._y1)/3,(St._x0+2*St._x1)/3,(St._y0+2*St._y1)/3,(St._x0+4*St._x1+Cr)/6,(St._y0+4*St._y1+Qr)/6)}function Tr(St){this._context=St}Tr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lr(this,St,Cr);break}this._x0=this._x1,this._x1=St,this._y0=this._y1,this._y1=Cr}};function Rr(St){return new Tr(St)}function ei(St){this._context=St}ei.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._x2=St,this._y2=Cr;break;case 1:this._point=2,this._x3=St,this._y3=Cr;break;case 2:this._point=3,this._x4=St,this._y4=Cr,this._context.moveTo((this._x0+4*this._x1+St)/6,(this._y0+4*this._y1+Cr)/6);break;default:lr(this,St,Cr);break}this._x0=this._x1,this._x1=St,this._y0=this._y1,this._y1=Cr}};function Wr(St){return new ei(St)}function Ur(St){this._context=St}Ur.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Qr=(this._x0+4*this._x1+St)/6,pi=(this._y0+4*this._y1+Cr)/6;this._line?this._context.lineTo(Qr,pi):this._context.moveTo(Qr,pi);break;case 3:this._point=4;default:lr(this,St,Cr);break}this._x0=this._x1,this._x1=St,this._y0=this._y1,this._y1=Cr}};function dt(St){return new Ur(St)}function Ge(St,Cr){this._basis=new Tr(St),this._beta=Cr}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var St=this._x,Cr=this._y,Qr=St.length-1;if(Qr>0)for(var pi=St[0],fn=Cr[0],Sn=St[Qr]-pi,En=Cr[Qr]-fn,ki=-1,_n;++ki<=Qr;)_n=ki/Qr,this._basis.point(this._beta*St[ki]+(1-this._beta)*(pi+_n*Sn),this._beta*Cr[ki]+(1-this._beta)*(fn+_n*En));this._x=this._y=null,this._basis.lineEnd()},point:function(St,Cr){this._x.push(+St),this._y.push(+Cr)}};var Je=function St(Cr){function Qr(pi){return Cr===1?new Tr(pi):new Ge(pi,Cr)}return Qr.beta=function(pi){return St(+pi)},Qr}(.85);function je(St,Cr,Qr){St._context.bezierCurveTo(St._x1+St._k*(St._x2-St._x0),St._y1+St._k*(St._y2-St._y0),St._x2+St._k*(St._x1-Cr),St._y2+St._k*(St._y1-Qr),St._x2,St._y2)}function $e(St,Cr){this._context=St,this._k=(1-Cr)/6}$e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:je(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2,this._x1=St,this._y1=Cr;break;case 2:this._point=3;default:je(this,St,Cr);break}this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var wt=function St(Cr){function Qr(pi){return new $e(pi,Cr)}return Qr.tension=function(pi){return St(+pi)},Qr}(0);function Ie(St,Cr){this._context=St,this._k=(1-Cr)/6}Ie.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._x3=St,this._y3=Cr;break;case 1:this._point=2,this._context.moveTo(this._x4=St,this._y4=Cr);break;case 2:this._point=3,this._x5=St,this._y5=Cr;break;default:je(this,St,Cr);break}this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var xe=function St(Cr){function Qr(pi){return new Ie(pi,Cr)}return Qr.tension=function(pi){return St(+pi)},Qr}(0);function Ce(St,Cr){this._context=St,this._k=(1-Cr)/6}Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:je(this,St,Cr);break}this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var vt=function St(Cr){function Qr(pi){return new Ce(pi,Cr)}return Qr.tension=function(pi){return St(+pi)},Qr}(0);function nr(St,Cr,Qr){var pi=St._x1,fn=St._y1,Sn=St._x2,En=St._y2;if(St._l01_a>c){var ki=2*St._l01_2a+3*St._l01_a*St._l12_a+St._l12_2a,_n=3*St._l01_a*(St._l01_a+St._l12_a);pi=(pi*ki-St._x0*St._l12_2a+St._x2*St._l01_2a)/_n,fn=(fn*ki-St._y0*St._l12_2a+St._y2*St._l01_2a)/_n}if(St._l23_a>c){var ya=2*St._l23_2a+3*St._l23_a*St._l12_a+St._l12_2a,Jn=3*St._l23_a*(St._l23_a+St._l12_a);Sn=(Sn*ya+St._x1*St._l23_2a-Cr*St._l12_2a)/Jn,En=(En*ya+St._y1*St._l23_2a-Qr*St._l12_2a)/Jn}St._context.bezierCurveTo(pi,fn,Sn,En,St._x2,St._y2)}function ir(St,Cr){this._context=St,this._alpha=Cr}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){if(St=+St,Cr=+Cr,this._point){var Qr=this._x2-St,pi=this._y2-Cr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Qr*Qr+pi*pi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2;break;case 2:this._point=3;default:nr(this,St,Cr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var pr=function St(Cr){function Qr(pi){return Cr?new ir(pi,Cr):new $e(pi,0)}return Qr.alpha=function(pi){return St(+pi)},Qr}(.5);function oi(St,Cr){this._context=St,this._alpha=Cr}oi.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(St,Cr){if(St=+St,Cr=+Cr,this._point){var Qr=this._x2-St,pi=this._y2-Cr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Qr*Qr+pi*pi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=St,this._y3=Cr;break;case 1:this._point=2,this._context.moveTo(this._x4=St,this._y4=Cr);break;case 2:this._point=3,this._x5=St,this._y5=Cr;break;default:nr(this,St,Cr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var di=function St(Cr){function Qr(pi){return Cr?new oi(pi,Cr):new Ie(pi,0)}return Qr.alpha=function(pi){return St(+pi)},Qr}(.5);function Jr(St,Cr){this._context=St,this._alpha=Cr}Jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){if(St=+St,Cr=+Cr,this._point){var Qr=this._x2-St,pi=this._y2-Cr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Qr*Qr+pi*pi,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:nr(this,St,Cr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=St,this._y0=this._y1,this._y1=this._y2,this._y2=Cr}};var fi=function St(Cr){function Qr(pi){return Cr?new Jr(pi,Cr):new Ce(pi,0)}return Qr.alpha=function(pi){return St(+pi)},Qr}(.5);function Hi(St){this._context=St}Hi.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(St,Cr){St=+St,Cr=+Cr,this._point?this._context.lineTo(St,Cr):(this._point=1,this._context.moveTo(St,Cr))}};function Pn(St){return new Hi(St)}function wn(St){return St<0?-1:1}function pn(St,Cr,Qr){var pi=St._x1-St._x0,fn=Cr-St._x1,Sn=(St._y1-St._y0)/(pi||fn<0&&-0),En=(Qr-St._y1)/(fn||pi<0&&-0),ki=(Sn*fn+En*pi)/(pi+fn);return(wn(Sn)+wn(En))*Math.min(Math.abs(Sn),Math.abs(En),.5*Math.abs(ki))||0}function Vn(St,Cr){var Qr=St._x1-St._x0;return Qr?(3*(St._y1-St._y0)/Qr-Cr)/2:Cr}function kn(St,Cr,Qr){var pi=St._x0,fn=St._y0,Sn=St._x1,En=St._y1,ki=(Sn-pi)/3;St._context.bezierCurveTo(pi+ki,fn+ki*Cr,Sn-ki,En-ki*Qr,Sn,En)}function ea(St){this._context=St}ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:kn(this,this._t0,Vn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(St,Cr){var Qr=NaN;if(St=+St,Cr=+Cr,!(St===this._x1&&Cr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2;break;case 2:this._point=3,kn(this,Vn(this,Qr=pn(this,St,Cr)),Qr);break;default:kn(this,this._t0,Qr=pn(this,St,Cr));break}this._x0=this._x1,this._x1=St,this._y0=this._y1,this._y1=Cr,this._t0=Qr}}};function ua(St){this._context=new Vt(St)}(ua.prototype=Object.create(ea.prototype)).point=function(St,Cr){ea.prototype.point.call(this,Cr,St)};function Vt(St){this._context=St}Vt.prototype={moveTo:function(St,Cr){this._context.moveTo(Cr,St)},closePath:function(){this._context.closePath()},lineTo:function(St,Cr){this._context.lineTo(Cr,St)},bezierCurveTo:function(St,Cr,Qr,pi,fn,Sn){this._context.bezierCurveTo(Cr,St,pi,Qr,Sn,fn)}};function _t(St){return new ea(St)}function tr(St){return new ua(St)}function ar(St){this._context=St}ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var St=this._x,Cr=this._y,Qr=St.length;if(Qr)if(this._line?this._context.lineTo(St[0],Cr[0]):this._context.moveTo(St[0],Cr[0]),Qr===2)this._context.lineTo(St[1],Cr[1]);else for(var pi=Er(St),fn=Er(Cr),Sn=0,En=1;En<Qr;++Sn,++En)this._context.bezierCurveTo(pi[0][Sn],fn[0][Sn],pi[1][Sn],fn[1][Sn],St[En],Cr[En]);(this._line||this._line!==0&&Qr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(St,Cr){this._x.push(+St),this._y.push(+Cr)}};function Er(St){var Cr,Qr=St.length-1,pi,fn=new Array(Qr),Sn=new Array(Qr),En=new Array(Qr);for(fn[0]=0,Sn[0]=2,En[0]=St[0]+2*St[1],Cr=1;Cr<Qr-1;++Cr)fn[Cr]=1,Sn[Cr]=4,En[Cr]=4*St[Cr]+2*St[Cr+1];for(fn[Qr-1]=2,Sn[Qr-1]=7,En[Qr-1]=8*St[Qr-1]+St[Qr],Cr=1;Cr<Qr;++Cr)pi=fn[Cr]/Sn[Cr-1],Sn[Cr]-=pi,En[Cr]-=pi*En[Cr-1];for(fn[Qr-1]=En[Qr-1]/Sn[Qr-1],Cr=Qr-2;Cr>=0;--Cr)fn[Cr]=(En[Cr]-fn[Cr+1])/Sn[Cr];for(Sn[Qr-1]=(St[Qr]+fn[Qr-1])/2,Cr=0;Cr<Qr-1;++Cr)Sn[Cr]=2*St[Cr+1]-fn[Cr+1];return[fn,Sn]}function Zr(St){return new ar(St)}function ri(St,Cr){this._context=St,this._t=Cr}ri.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(St,Cr){switch(St=+St,Cr=+Cr,this._point){case 0:this._point=1,this._line?this._context.lineTo(St,Cr):this._context.moveTo(St,Cr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Cr),this._context.lineTo(St,Cr);else{var Qr=this._x*(1-this._t)+St*this._t;this._context.lineTo(Qr,this._y),this._context.lineTo(Qr,Cr)}break}}this._x=St,this._y=Cr}};function $r(St){return new ri(St,.5)}function zi(St){return new ri(St,0)}function Ji(St){return new ri(St,1)}function en(St,Cr){if((En=St.length)>1)for(var Qr=1,pi,fn,Sn=St[Cr[0]],En,ki=Sn.length;Qr<En;++Qr)for(fn=Sn,Sn=St[Cr[Qr]],pi=0;pi<ki;++pi)Sn[pi][1]+=Sn[pi][0]=isNaN(fn[pi][1])?fn[pi][0]:fn[pi][1]}function cn(St){for(var Cr=St.length,Qr=new Array(Cr);--Cr>=0;)Qr[Cr]=Cr;return Qr}function yn(St,Cr){return St[Cr]}function Mn(){var St=r([]),Cr=cn,Qr=en,pi=yn;function fn(Sn){var En=St.apply(this,arguments),ki,_n=Sn.length,ya=En.length,Jn=new Array(ya),Ma;for(ki=0;ki<ya;++ki){for(var _o=En[ki],No=Jn[ki]=new Array(_n),po=0,Lo;po<_n;++po)No[po]=Lo=[0,+pi(Sn[po],_o,po,Sn)],Lo.data=Sn[po];No.key=_o}for(ki=0,Ma=Cr(Jn);ki<ya;++ki)Jn[Ma[ki]].index=ki;return Qr(Jn,Ma),Jn}return fn.keys=function(Sn){return arguments.length?(St=typeof Sn==\"function\"?Sn:r(ke.call(Sn)),fn):St},fn.value=function(Sn){return arguments.length?(pi=typeof Sn==\"function\"?Sn:r(+Sn),fn):pi},fn.order=function(Sn){return arguments.length?(Cr=Sn==null?cn:typeof Sn==\"function\"?Sn:r(ke.call(Sn)),fn):Cr},fn.offset=function(Sn){return arguments.length?(Qr=Sn==null?en:Sn,fn):Qr},fn}function Ba(St,Cr){if((pi=St.length)>0){for(var Qr,pi,fn=0,Sn=St[0].length,En;fn<Sn;++fn){for(En=Qr=0;Qr<pi;++Qr)En+=St[Qr][fn][1]||0;if(En)for(Qr=0;Qr<pi;++Qr)St[Qr][fn][1]/=En}en(St,Cr)}}function la(St,Cr){if((_n=St.length)>0)for(var Qr,pi=0,fn,Sn,En,ki,_n,ya=St[Cr[0]].length;pi<ya;++pi)for(En=ki=0,Qr=0;Qr<_n;++Qr)(Sn=(fn=St[Cr[Qr]][pi])[1]-fn[0])>0?(fn[0]=En,fn[1]=En+=Sn):Sn<0?(fn[1]=ki,fn[0]=ki+=Sn):(fn[0]=0,fn[1]=Sn)}function ma(St,Cr){if((fn=St.length)>0){for(var Qr=0,pi=St[Cr[0]],fn,Sn=pi.length;Qr<Sn;++Qr){for(var En=0,ki=0;En<fn;++En)ki+=St[En][Qr][1]||0;pi[Qr][1]+=pi[Qr][0]=-ki/2}en(St,Cr)}}function Wa(St,Cr){if(!(!((En=St.length)>0)||!((Sn=(fn=St[Cr[0]]).length)>0))){for(var Qr=0,pi=1,fn,Sn,En;pi<Sn;++pi){for(var ki=0,_n=0,ya=0;ki<En;++ki){for(var Jn=St[Cr[ki]],Ma=Jn[pi][1]||0,_o=Jn[pi-1][1]||0,No=(Ma-_o)/2,po=0;po<ki;++po){var Lo=St[Cr[po]],Co=Lo[pi][1]||0,Fs=Lo[pi-1][1]||0;No+=Co-Fs}_n+=Ma,ya+=No*Ma}fn[pi-1][1]+=fn[pi-1][0]=Qr,_n&&(Qr-=ya/_n)}fn[pi-1][1]+=fn[pi-1][0]=Qr,en(St,Cr)}}function Fa(St){var Cr=St.map(Wo);return cn(St).sort(function(Qr,pi){return Cr[Qr]-Cr[pi]})}function Wo(St){for(var Cr=-1,Qr=0,pi=St.length,fn,Sn=-1/0;++Cr<pi;)(fn=+St[Cr][1])>Sn&&(Sn=fn,Qr=Cr);return Qr}function da(St){var Cr=St.map(Wn);return cn(St).sort(function(Qr,pi){return Cr[Qr]-Cr[pi]})}function Wn(St){for(var Cr=0,Qr=-1,pi=St.length,fn;++Qr<pi;)(fn=+St[Qr][1])&&(Cr+=fn);return Cr}function Ga(St){return da(St).reverse()}function vo(St){var Cr=St.length,Qr,pi,fn=St.map(Wn),Sn=Fa(St),En=0,ki=0,_n=[],ya=[];for(Qr=0;Qr<Cr;++Qr)pi=Sn[Qr],En<ki?(En+=fn[pi],_n.push(pi)):(ki+=fn[pi],ya.push(pi));return ya.reverse().concat(_n)}function jn(St){return cn(St).reverse()}e.arc=k,e.area=O,e.areaRadial=_e,e.curveBasis=Rr,e.curveBasisClosed=Wr,e.curveBasisOpen=dt,e.curveBundle=Je,e.curveCardinal=wt,e.curveCardinalClosed=xe,e.curveCardinalOpen=vt,e.curveCatmullRom=pr,e.curveCatmullRomClosed=di,e.curveCatmullRomOpen=fi,e.curveLinear=g,e.curveLinearClosed=Pn,e.curveMonotoneX=_t,e.curveMonotoneY=tr,e.curveNatural=Zr,e.curveStep=$r,e.curveStepAfter=Ji,e.curveStepBefore=zi,e.line=z,e.lineRadial=oe,e.linkHorizontal=Pe,e.linkRadial=Fe,e.linkVertical=ge,e.pie=Z,e.pointRadial=Me,e.radialArea=_e,e.radialLine=oe,e.stack=Mn,e.stackOffsetDiverging=la,e.stackOffsetExpand=Ba,e.stackOffsetNone=en,e.stackOffsetSilhouette=ma,e.stackOffsetWiggle=Wa,e.stackOrderAppearance=Fa,e.stackOrderAscending=da,e.stackOrderDescending=Ga,e.stackOrderInsideOut=vo,e.stackOrderNone=cn,e.stackOrderReverse=jn,e.symbol=yt,e.symbolCircle=ce,e.symbolCross=Ze,e.symbolDiamond=Wt,e.symbolSquare=sr,e.symbolStar=$t,e.symbolTriangle=ur,e.symbolWye=Ft,e.symbols=bt,Object.defineProperty(e,\"__esModule\",{value:!0})})});var wWe=ye((w7,bWe)=>{(function(e,t){typeof w7==\"object\"&&typeof bWe!=\"undefined\"?t(w7,iC(),g7(),VJ()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(w7,function(e,t,r,n){\"use strict\";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function x(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function C(g){return g.nodes}function E(g){return g.links}function A(g,P){var T=g.get(P);if(!T)throw new Error(\"missing: \"+P);return T}var L=function(){var g=0,P=0,T=1,z=1,O=24,V=8,G=p,Z=s,H=C,N=E,j=32,re=2/3;function oe(){var Se={nodes:H.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),Me(Se),ke(Se),me(Se,j),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se==\"function\"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se==\"function\"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(O=+Se,oe):O},oe.nodePadding=function(Se){return arguments.length?(V=+Se,oe):V},oe.nodes=function(Se){return arguments.length?(H=typeof Se==\"function\"?Se:u(Se),oe):H},oe.links=function(Se){return arguments.length?(N=typeof Se==\"function\"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,T=+Se[0],z=+Se[1],oe):[T-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],T=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[T,z]]},oe.iterations=function(Se){return arguments.length?(j=+Se,oe):j};function _e(Se){Se.nodes.forEach(function(Ae,De){Ae.index=De,Ae.sourceLinks=[],Ae.targetLinks=[]});var Le=r.map(Se.nodes,G);Se.links.forEach(function(Ae,De){Ae.index=De;var Pe=Ae.source,ge=Ae.target;typeof Pe!=\"object\"&&(Pe=Ae.source=A(Le,Pe)),typeof ge!=\"object\"&&(ge=Ae.target=A(Le,ge)),Pe.sourceLinks.push(Ae),ge.targetLinks.push(Ae)})}function Me(Se){Se.nodes.forEach(function(Le){Le.value=Math.max(t.sum(Le.sourceLinks,d),t.sum(Le.targetLinks,d))})}function ke(Se){var Le,Ae,De;for(Le=Se.nodes,Ae=[],De=0;Le.length;++De,Le=Ae,Ae=[])Le.forEach(function(ge){ge.depth=De,ge.sourceLinks.forEach(function(Fe){Ae.indexOf(Fe.target)<0&&Ae.push(Fe.target)})});for(Le=Se.nodes,Ae=[],De=0;Le.length;++De,Le=Ae,Ae=[])Le.forEach(function(ge){ge.height=De,ge.targetLinks.forEach(function(Fe){Ae.indexOf(Fe.source)<0&&Ae.push(Fe.source)})});var Pe=(T-g-O)/(De-1);Se.nodes.forEach(function(ge){ge.x1=(ge.x0=g+Math.max(0,Math.min(De-1,Math.floor(Z.call(null,ge,De))))*Pe)+O})}function me(Se){var Le=r.nest().key(function(Ze){return Ze.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(Ze){return Ze.values});Pe(),ce();for(var Ae=1,De=j;De>0;--De)Fe(Ae*=.99),ce(),ge(Ae),ce();function Pe(){var Ze=t.max(Le,function(Wt){return Wt.length}),ct=re*(z-P)/(Ze-1);V>ct&&(V=ct);var pt=t.min(Le,function(Wt){return(z-P-(Wt.length-1)*V)/t.sum(Wt,d)});Le.forEach(function(Wt){Wt.forEach(function(st,lt){st.y1=(st.y0=lt)+st.value*pt})}),Se.links.forEach(function(Wt){Wt.width=Wt.value*pt})}function ge(Ze){Le.forEach(function(ct){ct.forEach(function(pt){if(pt.targetLinks.length){var Wt=(t.sum(pt.targetLinks,x)/t.sum(pt.targetLinks,d)-v(pt))*Ze;pt.y0+=Wt,pt.y1+=Wt}})})}function Fe(Ze){Le.slice().reverse().forEach(function(ct){ct.forEach(function(pt){if(pt.sourceLinks.length){var Wt=(t.sum(pt.sourceLinks,b)/t.sum(pt.sourceLinks,d)-v(pt))*Ze;pt.y0+=Wt,pt.y1+=Wt}})})}function ce(){Le.forEach(function(Ze){var ct,pt,Wt=P,st=Ze.length,lt;for(Ze.sort(h),lt=0;lt<st;++lt)ct=Ze[lt],pt=Wt-ct.y0,pt>0&&(ct.y0+=pt,ct.y1+=pt),Wt=ct.y1+V;if(pt=Wt-V-z,pt>0)for(Wt=ct.y0-=pt,ct.y1-=pt,lt=st-2;lt>=0;--lt)ct=Ze[lt],pt=ct.y1+V-Wt,pt>0&&(ct.y0-=pt,ct.y1-=pt),Wt=ct.y0})}}function ie(Se){Se.nodes.forEach(function(Le){Le.sourceLinks.sort(f),Le.targetLinks.sort(c)}),Se.nodes.forEach(function(Le){var Ae=Le.y0,De=Ae;Le.sourceLinks.forEach(function(Pe){Pe.y0=Ae+Pe.width/2,Ae+=Pe.width}),Le.targetLinks.forEach(function(Pe){Pe.y1=De+Pe.width/2,De+=Pe.width})})}return oe};function _(g){return[g.source.x1,g.y0]}function k(g){return[g.target.x0,g.y1]}var M=function(){return n.linkHorizontal().source(_).target(k)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,\"__esModule\",{value:!0})})});var AWe=ye((tbr,TWe)=>{var KXt=UJ();TWe.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(A){delete o[E][A],a[A]&&u(A)})}function c(E){var A=!1;i.push(E),a[E]=!0;var L,_;for(L=0;L<s[E].length;L++)_=s[E][L],_===l?(f(l,i),A=!0):a[_]||(A=c(_));if(A)u(E);else for(L=0;L<s[E].length;L++){_=s[E][L];var k=o[_];k||(k={},o[_]=k),k[_]=!0}return i.pop(),A}function f(E,A){var L=[].concat(A).concat(E);r?r(c):n.push(L)}function h(E){for(var A=0;A<t.length;A++)A<E&&(t[A]=[]),t[A]=t[A].filter(function(L){return L>=E})}function d(E){h(E);for(var A=t,L=KXt(A),_=L.components.filter(function(O){return O.length>1}),k=1/0,M,g=0;g<_.length;g++)for(var P=0;P<_[g].length;P++)_[g][P]<k&&(k=_[g][P],M=g);var T=_[M];if(!T)return!1;var z=t.map(function(O,V){return T.indexOf(V)===-1?[]:O.filter(function(G){return T.indexOf(G)!==-1})});return{leastVertex:k,adjList:z}}l=0;for(var v=t.length;l<v;){var x=d(l);if(l=x.leastVertex,s=x.adjList,s){for(var b=0;b<s.length;b++)for(var p=0;p<s[b].length;p++){var C=s[b][p];a[+C]=!1,o[C]={}}c(l),l=l+1}else l=v}if(!r)return n}});var MWe=ye((T7,SWe)=>{(function(e,t){typeof T7==\"object\"&&typeof SWe!=\"undefined\"?t(T7,iC(),g7(),VJ(),AWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(T7,function(e,t,r,n,i){\"use strict\";i=i&&i.hasOwnProperty(\"default\")?i.default:i;function a(st){return st.target.depth}function o(st){return st.depth}function s(st,lt){return lt-1-st.height}function l(st,lt){return st.sourceLinks.length?st.depth:lt-1}function u(st){return st.targetLinks.length?st.depth:st.sourceLinks.length?t.min(st.sourceLinks,a)-1:0}function c(st){return function(){return st}}var f=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(st){return typeof st}:function(st){return st&&typeof Symbol==\"function\"&&st.constructor===Symbol&&st!==Symbol.prototype?\"symbol\":typeof st};function h(st,lt){return v(st.source,lt.source)||st.index-lt.index}function d(st,lt){return v(st.target,lt.target)||st.index-lt.index}function v(st,lt){return st.partOfCycle===lt.partOfCycle?st.y0-lt.y0:st.circularLinkType===\"top\"||lt.circularLinkType===\"bottom\"?-1:1}function x(st){return st.value}function b(st){return(st.y0+st.y1)/2}function p(st){return b(st.source)}function C(st){return b(st.target)}function E(st){return st.index}function A(st){return st.nodes}function L(st){return st.links}function _(st,lt){var Gt=st.get(lt);if(!Gt)throw new Error(\"missing: \"+lt);return Gt}function k(st,lt){return lt(st)}var M=25,g=10,P=.3;function T(){var st=0,lt=0,Gt=1,Nt=1,$t=24,sr,wr=E,ur=l,Qe=A,Et=L,er=32,Ut=2,Ft,bt=null;function yt(){var dt={nodes:Qe.apply(null,arguments),links:Et.apply(null,arguments)};Yt(dt),z(dt,wr,bt),lr(dt),ei(dt),O(dt,wr),Wr(dt,er,wr),Ur(dt);for(var Ge=4,Je=0;Je<Ge;Je++)Fe(dt,Nt,wr),ce(dt,Nt,wr),De(dt,lt,Nt,wr),Fe(dt,Nt,wr),ce(dt,Nt,wr);return Wt(dt,lt,Nt),j(dt,Ut,Nt,wr),dt}yt.nodeId=function(dt){return arguments.length?(wr=typeof dt==\"function\"?dt:c(dt),yt):wr},yt.nodeAlign=function(dt){return arguments.length?(ur=typeof dt==\"function\"?dt:c(dt),yt):ur},yt.nodeWidth=function(dt){return arguments.length?($t=+dt,yt):$t},yt.nodePadding=function(dt){return arguments.length?(sr=+dt,yt):sr},yt.nodes=function(dt){return arguments.length?(Qe=typeof dt==\"function\"?dt:c(dt),yt):Qe},yt.links=function(dt){return arguments.length?(Et=typeof dt==\"function\"?dt:c(dt),yt):Et},yt.size=function(dt){return arguments.length?(st=lt=0,Gt=+dt[0],Nt=+dt[1],yt):[Gt-st,Nt-lt]},yt.extent=function(dt){return arguments.length?(st=+dt[0][0],Gt=+dt[1][0],lt=+dt[0][1],Nt=+dt[1][1],yt):[[st,lt],[Gt,Nt]]},yt.iterations=function(dt){return arguments.length?(er=+dt,yt):er},yt.circularLinkGap=function(dt){return arguments.length?(Ut=+dt,yt):Ut},yt.nodePaddingRatio=function(dt){return arguments.length?(Ft=+dt,yt):Ft},yt.sortNodes=function(dt){return arguments.length?(bt=dt,yt):bt},yt.update=function(dt){return O(dt,wr),Ur(dt),dt.links.forEach(function(Ge){Ge.circular&&(Ge.circularLinkType=Ge.y0+Ge.y1<Nt?\"top\":\"bottom\",Ge.source.circularLinkType=Ge.circularLinkType,Ge.target.circularLinkType=Ge.circularLinkType)}),Fe(dt,Nt,wr,!1),ce(dt,Nt,wr),j(dt,Ut,Nt,wr),dt};function Yt(dt){dt.nodes.forEach(function(Je,je){Je.index=je,Je.sourceLinks=[],Je.targetLinks=[]});var Ge=r.map(dt.nodes,wr);return dt.links.forEach(function(Je,je){Je.index=je;var $e=Je.source,wt=Je.target;(typeof $e==\"undefined\"?\"undefined\":f($e))!==\"object\"&&($e=Je.source=_(Ge,$e)),(typeof wt==\"undefined\"?\"undefined\":f(wt))!==\"object\"&&(wt=Je.target=_(Ge,wt)),$e.sourceLinks.push(Je),wt.targetLinks.push(Je)}),dt}function lr(dt){dt.nodes.forEach(function(Ge){Ge.partOfCycle=!1,Ge.value=Math.max(t.sum(Ge.sourceLinks,x),t.sum(Ge.targetLinks,x)),Ge.sourceLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)}),Ge.targetLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)})})}function Tr(dt){var Ge=0,Je=0,je=0,$e=0,wt=t.max(dt.nodes,function(Ie){return Ie.column});return dt.links.forEach(function(Ie){Ie.circular&&(Ie.circularLinkType==\"top\"?Ge=Ge+Ie.width:Je=Je+Ie.width,Ie.target.column==0&&($e=$e+Ie.width),Ie.source.column==wt&&(je=je+Ie.width))}),Ge=Ge>0?Ge+M+g:Ge,Je=Je>0?Je+M+g:Je,je=je>0?je+M+g:je,$e=$e>0?$e+M+g:$e,{top:Ge,bottom:Je,left:$e,right:je}}function Rr(dt,Ge){var Je=t.max(dt.nodes,function(vt){return vt.column}),je=Gt-st,$e=Nt-lt,wt=je+Ge.right+Ge.left,Ie=$e+Ge.top+Ge.bottom,xe=je/wt,Ce=$e/Ie;return st=st*xe+Ge.left,Gt=Ge.right==0?Gt:Gt*xe,lt=lt*Ce+Ge.top,Nt=Nt*Ce,dt.nodes.forEach(function(vt){vt.x0=st+vt.column*((Gt-st-$t)/Je),vt.x1=vt.x0+$t}),Ce}function ei(dt){var Ge,Je,je;for(Ge=dt.nodes,Je=[],je=0;Ge.length;++je,Ge=Je,Je=[])Ge.forEach(function($e){$e.depth=je,$e.sourceLinks.forEach(function(wt){Je.indexOf(wt.target)<0&&!wt.circular&&Je.push(wt.target)})});for(Ge=dt.nodes,Je=[],je=0;Ge.length;++je,Ge=Je,Je=[])Ge.forEach(function($e){$e.height=je,$e.targetLinks.forEach(function(wt){Je.indexOf(wt.source)<0&&!wt.circular&&Je.push(wt.source)})});dt.nodes.forEach(function($e){$e.column=Math.floor(ur.call(null,$e,je))})}function Wr(dt,Ge,Je){var je=r.nest().key(function(vt){return vt.column}).sortKeys(t.ascending).entries(dt.nodes).map(function(vt){return vt.values});Ie(Je),Ce();for(var $e=1,wt=Ge;wt>0;--wt)xe($e*=.99,Je),Ce();function Ie(vt){if(Ft){var nr=1/0;je.forEach(function(di){var Jr=Nt*Ft/(di.length+1);nr=Jr<nr?Jr:nr}),sr=nr}var ir=t.min(je,function(di){return(Nt-lt-(di.length-1)*sr)/t.sum(di,x)});ir=ir*P,dt.links.forEach(function(di){di.width=di.value*ir});var pr=Tr(dt),oi=Rr(dt,pr);ir=ir*oi,dt.links.forEach(function(di){di.width=di.value*ir}),je.forEach(function(di){var Jr=di.length;di.forEach(function(fi,Hi){fi.depth==je.length-1&&Jr==1||fi.depth==0&&Jr==1?(fi.y0=Nt/2-fi.value*ir,fi.y1=fi.y0+fi.value*ir):fi.partOfCycle?Z(fi,vt)==0?(fi.y0=Nt/2+Hi,fi.y1=fi.y0+fi.value*ir):fi.circularLinkType==\"top\"?(fi.y0=lt+Hi,fi.y1=fi.y0+fi.value*ir):(fi.y0=Nt-fi.value*ir-Hi,fi.y1=fi.y0+fi.value*ir):pr.top==0||pr.bottom==0?(fi.y0=(Nt-lt)/Jr*Hi,fi.y1=fi.y0+fi.value*ir):(fi.y0=(Nt-lt)/2-Jr/2+Hi,fi.y1=fi.y0+fi.value*ir)})})}function xe(vt,nr){var ir=je.length;je.forEach(function(pr){var oi=pr.length,di=pr[0].depth;pr.forEach(function(Jr){var fi;if((Jr.sourceLinks.length||Jr.targetLinks.length)&&!(Jr.partOfCycle&&Z(Jr,nr)>0))if(di==0&&oi==1)fi=Jr.y1-Jr.y0,Jr.y0=Nt/2-fi/2,Jr.y1=Nt/2+fi/2;else if(di==ir-1&&oi==1)fi=Jr.y1-Jr.y0,Jr.y0=Nt/2-fi/2,Jr.y1=Nt/2+fi/2;else{var Hi=0,Pn=t.mean(Jr.sourceLinks,C),wn=t.mean(Jr.targetLinks,p);Pn&&wn?Hi=(Pn+wn)/2:Hi=Pn||wn;var pn=(Hi-b(Jr))*vt;Jr.y0+=pn,Jr.y1+=pn}})})}function Ce(){je.forEach(function(vt){var nr,ir,pr=lt,oi=vt.length,di;for(vt.sort(v),di=0;di<oi;++di)nr=vt[di],ir=pr-nr.y0,ir>0&&(nr.y0+=ir,nr.y1+=ir),pr=nr.y1+sr;if(ir=pr-sr-Nt,ir>0)for(pr=nr.y0-=ir,nr.y1-=ir,di=oi-2;di>=0;--di)nr=vt[di],ir=nr.y1+sr-pr,ir>0&&(nr.y0-=ir,nr.y1-=ir),pr=nr.y0})}}function Ur(dt){dt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),dt.nodes.forEach(function(Ge){var Je=Ge.y0,je=Je,$e=Ge.y1,wt=$e;Ge.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=$e-Ie.width/2,$e=$e-Ie.width):(Ie.y0=Je+Ie.width/2,Je+=Ie.width)}),Ge.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=wt-Ie.width/2,wt=wt-Ie.width):(Ie.y1=je+Ie.width/2,je+=Ie.width)})})}return yt}function z(st,lt,Gt){var Nt=0;if(Gt===null){for(var $t=[],sr=0;sr<st.links.length;sr++){var wr=st.links[sr],ur=wr.source.index,Qe=wr.target.index;$t[ur]||($t[ur]=[]),$t[Qe]||($t[Qe]=[]),$t[ur].indexOf(Qe)===-1&&$t[ur].push(Qe)}var Et=i($t);Et.sort(function(bt,yt){return bt.length-yt.length});var er={};for(sr=0;sr<Et.length;sr++){var Ut=Et[sr],Ft=Ut.slice(-2);er[Ft[0]]||(er[Ft[0]]={}),er[Ft[0]][Ft[1]]=!0}st.links.forEach(function(bt){var yt=bt.target.index,Yt=bt.source.index;yt===Yt||er[Yt]&&er[Yt][yt]?(bt.circular=!0,bt.circularLinkID=Nt,Nt=Nt+1):bt.circular=!1})}else st.links.forEach(function(bt){bt.source[Gt]<bt.target[Gt]?bt.circular=!1:(bt.circular=!0,bt.circularLinkID=Nt,Nt=Nt+1)})}function O(st,lt){var Gt=0,Nt=0;st.links.forEach(function($t){$t.circular&&($t.source.circularLinkType||$t.target.circularLinkType?$t.circularLinkType=$t.source.circularLinkType?$t.source.circularLinkType:$t.target.circularLinkType:$t.circularLinkType=Gt<Nt?\"top\":\"bottom\",$t.circularLinkType==\"top\"?Gt=Gt+1:Nt=Nt+1,st.nodes.forEach(function(sr){(k(sr,lt)==k($t.source,lt)||k(sr,lt)==k($t.target,lt))&&(sr.circularLinkType=$t.circularLinkType)}))}),st.links.forEach(function($t){$t.circular&&($t.source.circularLinkType==$t.target.circularLinkType&&($t.circularLinkType=$t.source.circularLinkType),pt($t,lt)&&($t.circularLinkType=$t.source.circularLinkType))})}function V(st){var lt=Math.abs(st.y1-st.y0),Gt=Math.abs(st.target.x0-st.source.x1);return Math.atan(Gt/lt)}function G(st,lt){return st.source.column<lt.target.column?!1:!(st.target.column>lt.source.column)}function Z(st,lt){var Gt=0;st.sourceLinks.forEach(function($t){Gt=$t.circular&&!pt($t,lt)?Gt+1:Gt});var Nt=0;return st.targetLinks.forEach(function($t){Nt=$t.circular&&!pt($t,lt)?Nt+1:Nt}),Gt+Nt}function H(st){var lt=st.source.sourceLinks,Gt=0;lt.forEach(function(sr){Gt=sr.circular?Gt+1:Gt});var Nt=st.target.targetLinks,$t=0;return Nt.forEach(function(sr){$t=sr.circular?$t+1:$t}),!(Gt>1||$t>1)}function N(st,lt,Gt){return st.sort(oe),st.forEach(function(Nt,$t){var sr=0;if(pt(Nt,Gt)&&H(Nt))Nt.circularPathData.verticalBuffer=sr+Nt.width/2;else{var wr=0;for(wr;wr<$t;wr++)if(G(st[$t],st[wr])){var ur=st[wr].circularPathData.verticalBuffer+st[wr].width/2+lt;sr=ur>sr?ur:sr}Nt.circularPathData.verticalBuffer=sr+Nt.width/2}}),st}function j(st,lt,Gt,Nt){var $t=5,sr=t.min(st.links,function(Qe){return Qe.source.y0});st.links.forEach(function(Qe){Qe.circular&&(Qe.circularPathData={})});var wr=st.links.filter(function(Qe){return Qe.circularLinkType==\"top\"});N(wr,lt,Nt);var ur=st.links.filter(function(Qe){return Qe.circularLinkType==\"bottom\"});N(ur,lt,Nt),st.links.forEach(function(Qe){if(Qe.circular){if(Qe.circularPathData.arcRadius=Qe.width+g,Qe.circularPathData.leftNodeBuffer=$t,Qe.circularPathData.rightNodeBuffer=$t,Qe.circularPathData.sourceWidth=Qe.source.x1-Qe.source.x0,Qe.circularPathData.sourceX=Qe.source.x0+Qe.circularPathData.sourceWidth,Qe.circularPathData.targetX=Qe.target.x0,Qe.circularPathData.sourceY=Qe.y0,Qe.circularPathData.targetY=Qe.y1,pt(Qe,Nt)&&H(Qe))Qe.circularPathData.leftSmallArcRadius=g+Qe.width/2,Qe.circularPathData.leftLargeArcRadius=g+Qe.width/2,Qe.circularPathData.rightSmallArcRadius=g+Qe.width/2,Qe.circularPathData.rightLargeArcRadius=g+Qe.width/2,Qe.circularLinkType==\"bottom\"?(Qe.circularPathData.verticalFullExtent=Qe.source.y1+M+Qe.circularPathData.verticalBuffer,Qe.circularPathData.verticalLeftInnerExtent=Qe.circularPathData.verticalFullExtent-Qe.circularPathData.leftLargeArcRadius,Qe.circularPathData.verticalRightInnerExtent=Qe.circularPathData.verticalFullExtent-Qe.circularPathData.rightLargeArcRadius):(Qe.circularPathData.verticalFullExtent=Qe.source.y0-M-Qe.circularPathData.verticalBuffer,Qe.circularPathData.verticalLeftInnerExtent=Qe.circularPathData.verticalFullExtent+Qe.circularPathData.leftLargeArcRadius,Qe.circularPathData.verticalRightInnerExtent=Qe.circularPathData.verticalFullExtent+Qe.circularPathData.rightLargeArcRadius);else{var Et=Qe.source.column,er=Qe.circularLinkType,Ut=st.links.filter(function(yt){return yt.source.column==Et&&yt.circularLinkType==er});Qe.circularLinkType==\"bottom\"?Ut.sort(Me):Ut.sort(_e);var Ft=0;Ut.forEach(function(yt,Yt){yt.circularLinkID==Qe.circularLinkID&&(Qe.circularPathData.leftSmallArcRadius=g+Qe.width/2+Ft,Qe.circularPathData.leftLargeArcRadius=g+Qe.width/2+Yt*lt+Ft),Ft=Ft+yt.width}),Et=Qe.target.column,Ut=st.links.filter(function(yt){return yt.target.column==Et&&yt.circularLinkType==er}),Qe.circularLinkType==\"bottom\"?Ut.sort(me):Ut.sort(ke),Ft=0,Ut.forEach(function(yt,Yt){yt.circularLinkID==Qe.circularLinkID&&(Qe.circularPathData.rightSmallArcRadius=g+Qe.width/2+Ft,Qe.circularPathData.rightLargeArcRadius=g+Qe.width/2+Yt*lt+Ft),Ft=Ft+yt.width}),Qe.circularLinkType==\"bottom\"?(Qe.circularPathData.verticalFullExtent=Math.max(Gt,Qe.source.y1,Qe.target.y1)+M+Qe.circularPathData.verticalBuffer,Qe.circularPathData.verticalLeftInnerExtent=Qe.circularPathData.verticalFullExtent-Qe.circularPathData.leftLargeArcRadius,Qe.circularPathData.verticalRightInnerExtent=Qe.circularPathData.verticalFullExtent-Qe.circularPathData.rightLargeArcRadius):(Qe.circularPathData.verticalFullExtent=sr-M-Qe.circularPathData.verticalBuffer,Qe.circularPathData.verticalLeftInnerExtent=Qe.circularPathData.verticalFullExtent+Qe.circularPathData.leftLargeArcRadius,Qe.circularPathData.verticalRightInnerExtent=Qe.circularPathData.verticalFullExtent+Qe.circularPathData.rightLargeArcRadius)}Qe.circularPathData.leftInnerExtent=Qe.circularPathData.sourceX+Qe.circularPathData.leftNodeBuffer,Qe.circularPathData.rightInnerExtent=Qe.circularPathData.targetX-Qe.circularPathData.rightNodeBuffer,Qe.circularPathData.leftFullExtent=Qe.circularPathData.sourceX+Qe.circularPathData.leftLargeArcRadius+Qe.circularPathData.leftNodeBuffer,Qe.circularPathData.rightFullExtent=Qe.circularPathData.targetX-Qe.circularPathData.rightLargeArcRadius-Qe.circularPathData.rightNodeBuffer}if(Qe.circular)Qe.path=re(Qe);else{var bt=n.linkHorizontal().source(function(yt){var Yt=yt.source.x0+(yt.source.x1-yt.source.x0),lr=yt.y0;return[Yt,lr]}).target(function(yt){var Yt=yt.target.x0,lr=yt.y1;return[Yt,lr]});Qe.path=bt(Qe)}})}function re(st){var lt=\"\";return st.circularLinkType==\"top\"?lt=\"M\"+st.circularPathData.sourceX+\" \"+st.circularPathData.sourceY+\" L\"+st.circularPathData.leftInnerExtent+\" \"+st.circularPathData.sourceY+\" A\"+st.circularPathData.leftLargeArcRadius+\" \"+st.circularPathData.leftSmallArcRadius+\" 0 0 0 \"+st.circularPathData.leftFullExtent+\" \"+(st.circularPathData.sourceY-st.circularPathData.leftSmallArcRadius)+\" L\"+st.circularPathData.leftFullExtent+\" \"+st.circularPathData.verticalLeftInnerExtent+\" A\"+st.circularPathData.leftLargeArcRadius+\" \"+st.circularPathData.leftLargeArcRadius+\" 0 0 0 \"+st.circularPathData.leftInnerExtent+\" \"+st.circularPathData.verticalFullExtent+\" L\"+st.circularPathData.rightInnerExtent+\" \"+st.circularPathData.verticalFullExtent+\" A\"+st.circularPathData.rightLargeArcRadius+\" \"+st.circularPathData.rightLargeArcRadius+\" 0 0 0 \"+st.circularPathData.rightFullExtent+\" \"+st.circularPathData.verticalRightInnerExtent+\" L\"+st.circularPathData.rightFullExtent+\" \"+(st.circularPathData.targetY-st.circularPathData.rightSmallArcRadius)+\" A\"+st.circularPathData.rightLargeArcRadius+\" \"+st.circularPathData.rightSmallArcRadius+\" 0 0 0 \"+st.circularPathData.rightInnerExtent+\" \"+st.circularPathData.targetY+\" L\"+st.circularPathData.targetX+\" \"+st.circularPathData.targetY:lt=\"M\"+st.circularPathData.sourceX+\" \"+st.circularPathData.sourceY+\" L\"+st.circularPathData.leftInnerExtent+\" \"+st.circularPathData.sourceY+\" A\"+st.circularPathData.leftLargeArcRadius+\" \"+st.circularPathData.leftSmallArcRadius+\" 0 0 1 \"+st.circularPathData.leftFullExtent+\" \"+(st.circularPathData.sourceY+st.circularPathData.leftSmallArcRadius)+\" L\"+st.circularPathData.leftFullExtent+\" \"+st.circularPathData.verticalLeftInnerExtent+\" A\"+st.circularPathData.leftLargeArcRadius+\" \"+st.circularPathData.leftLargeArcRadius+\" 0 0 1 \"+st.circularPathData.leftInnerExtent+\" \"+st.circularPathData.verticalFullExtent+\" L\"+st.circularPathData.rightInnerExtent+\" \"+st.circularPathData.verticalFullExtent+\" A\"+st.circularPathData.rightLargeArcRadius+\" \"+st.circularPathData.rightLargeArcRadius+\" 0 0 1 \"+st.circularPathData.rightFullExtent+\" \"+st.circularPathData.verticalRightInnerExtent+\" L\"+st.circularPathData.rightFullExtent+\" \"+(st.circularPathData.targetY+st.circularPathData.rightSmallArcRadius)+\" A\"+st.circularPathData.rightLargeArcRadius+\" \"+st.circularPathData.rightSmallArcRadius+\" 0 0 1 \"+st.circularPathData.rightInnerExtent+\" \"+st.circularPathData.targetY+\" L\"+st.circularPathData.targetX+\" \"+st.circularPathData.targetY,lt}function oe(st,lt){return ie(st)==ie(lt)?st.circularLinkType==\"bottom\"?Me(st,lt):_e(st,lt):ie(lt)-ie(st)}function _e(st,lt){return st.y0-lt.y0}function Me(st,lt){return lt.y0-st.y0}function ke(st,lt){return st.y1-lt.y1}function me(st,lt){return lt.y1-st.y1}function ie(st){return st.target.column-st.source.column}function Se(st){return st.target.x0-st.source.x1}function Le(st,lt){var Gt=V(st),Nt=Se(lt)/Math.tan(Gt),$t=ct(st)==\"up\"?st.y1+Nt:st.y1-Nt;return $t}function Ae(st,lt){var Gt=V(st),Nt=Se(lt)/Math.tan(Gt),$t=ct(st)==\"up\"?st.y1-Nt:st.y1+Nt;return $t}function De(st,lt,Gt,Nt){st.links.forEach(function($t){if(!$t.circular&&$t.target.column-$t.source.column>1){var sr=$t.source.column+1,wr=$t.target.column-1,ur=1,Qe=wr-sr+1;for(ur=1;sr<=wr;sr++,ur++)st.nodes.forEach(function(Et){if(Et.column==sr){var er=ur/(Qe+1),Ut=Math.pow(1-er,3),Ft=3*er*Math.pow(1-er,2),bt=3*Math.pow(er,2)*(1-er),yt=Math.pow(er,3),Yt=Ut*$t.y0+Ft*$t.y0+bt*$t.y1+yt*$t.y1,lr=Yt-$t.width/2,Tr=Yt+$t.width/2,Rr;lr>Et.y0&&lr<Et.y1?(Rr=Et.y1-lr+10,Rr=Et.circularLinkType==\"bottom\"?Rr:-Rr,Et=ge(Et,Rr,lt,Gt),st.nodes.forEach(function(ei){k(ei,Nt)==k(Et,Nt)||ei.column!=Et.column||Pe(Et,ei)&&ge(ei,Rr,lt,Gt)})):Tr>Et.y0&&Tr<Et.y1?(Rr=Tr-Et.y0+10,Et=ge(Et,Rr,lt,Gt),st.nodes.forEach(function(ei){k(ei,Nt)==k(Et,Nt)||ei.column!=Et.column||ei.y0<Et.y1&&ei.y1>Et.y1&&ge(ei,Rr,lt,Gt)})):lr<Et.y0&&Tr>Et.y1&&(Rr=Tr-Et.y0+10,Et=ge(Et,Rr,lt,Gt),st.nodes.forEach(function(ei){k(ei,Nt)==k(Et,Nt)||ei.column!=Et.column||ei.y0<Et.y1&&ei.y1>Et.y1&&ge(ei,Rr,lt,Gt)}))}})}})}function Pe(st,lt){return st.y0>lt.y0&&st.y0<lt.y1||st.y1>lt.y0&&st.y1<lt.y1?!0:st.y0<lt.y0&&st.y1>lt.y1}function ge(st,lt,Gt,Nt){return st.y0+lt>=Gt&&st.y1+lt<=Nt&&(st.y0=st.y0+lt,st.y1=st.y1+lt,st.targetLinks.forEach(function($t){$t.y1=$t.y1+lt}),st.sourceLinks.forEach(function($t){$t.y0=$t.y0+lt})),st}function Fe(st,lt,Gt,Nt){st.nodes.forEach(function($t){Nt&&$t.y+($t.y1-$t.y0)>lt&&($t.y=$t.y-($t.y+($t.y1-$t.y0)-lt));var sr=st.links.filter(function(Qe){return k(Qe.source,Gt)==k($t,Gt)}),wr=sr.length;wr>1&&sr.sort(function(Qe,Et){if(!Qe.circular&&!Et.circular){if(Qe.target.column==Et.target.column)return Qe.y1-Et.y1;if(Ze(Qe,Et)){if(Qe.target.column>Et.target.column){var er=Ae(Et,Qe);return Qe.y1-er}if(Et.target.column>Qe.target.column){var Ut=Ae(Qe,Et);return Ut-Et.y1}}else return Qe.y1-Et.y1}if(Qe.circular&&!Et.circular)return Qe.circularLinkType==\"top\"?-1:1;if(Et.circular&&!Qe.circular)return Et.circularLinkType==\"top\"?1:-1;if(Qe.circular&&Et.circular)return Qe.circularLinkType===Et.circularLinkType&&Qe.circularLinkType==\"top\"?Qe.target.column===Et.target.column?Qe.target.y1-Et.target.y1:Et.target.column-Qe.target.column:Qe.circularLinkType===Et.circularLinkType&&Qe.circularLinkType==\"bottom\"?Qe.target.column===Et.target.column?Et.target.y1-Qe.target.y1:Qe.target.column-Et.target.column:Qe.circularLinkType==\"top\"?-1:1});var ur=$t.y0;sr.forEach(function(Qe){Qe.y0=ur+Qe.width/2,ur=ur+Qe.width}),sr.forEach(function(Qe,Et){if(Qe.circularLinkType==\"bottom\"){var er=Et+1,Ut=0;for(er;er<wr;er++)Ut=Ut+sr[er].width;Qe.y0=$t.y1-Ut-Qe.width/2}})})}function ce(st,lt,Gt){st.nodes.forEach(function(Nt){var $t=st.links.filter(function(ur){return k(ur.target,Gt)==k(Nt,Gt)}),sr=$t.length;sr>1&&$t.sort(function(ur,Qe){if(!ur.circular&&!Qe.circular){if(ur.source.column==Qe.source.column)return ur.y0-Qe.y0;if(Ze(ur,Qe)){if(Qe.source.column<ur.source.column){var Et=Le(Qe,ur);return ur.y0-Et}if(ur.source.column<Qe.source.column){var er=Le(ur,Qe);return er-Qe.y0}}else return ur.y0-Qe.y0}if(ur.circular&&!Qe.circular)return ur.circularLinkType==\"top\"?-1:1;if(Qe.circular&&!ur.circular)return Qe.circularLinkType==\"top\"?1:-1;if(ur.circular&&Qe.circular)return ur.circularLinkType===Qe.circularLinkType&&ur.circularLinkType==\"top\"?ur.source.column===Qe.source.column?ur.source.y1-Qe.source.y1:ur.source.column-Qe.source.column:ur.circularLinkType===Qe.circularLinkType&&ur.circularLinkType==\"bottom\"?ur.source.column===Qe.source.column?ur.source.y1-Qe.source.y1:Qe.source.column-ur.source.column:ur.circularLinkType==\"top\"?-1:1});var wr=Nt.y0;$t.forEach(function(ur){ur.y1=wr+ur.width/2,wr=wr+ur.width}),$t.forEach(function(ur,Qe){if(ur.circularLinkType==\"bottom\"){var Et=Qe+1,er=0;for(Et;Et<sr;Et++)er=er+$t[Et].width;ur.y1=Nt.y1-er-ur.width/2}})})}function Ze(st,lt){return ct(st)==ct(lt)}function ct(st){return st.y0-st.y1>0?\"up\":\"down\"}function pt(st,lt){return k(st.source,lt)==k(st.target,lt)}function Wt(st,lt,Gt){var Nt=st.nodes,$t=st.links,sr=!1,wr=!1;if($t.forEach(function(Ft){Ft.circularLinkType==\"top\"?sr=!0:Ft.circularLinkType==\"bottom\"&&(wr=!0)}),sr==!1||wr==!1){var ur=t.min(Nt,function(Ft){return Ft.y0}),Qe=t.max(Nt,function(Ft){return Ft.y1}),Et=Qe-ur,er=Gt-lt,Ut=er/Et;Nt.forEach(function(Ft){var bt=(Ft.y1-Ft.y0)*Ut;Ft.y0=(Ft.y0-ur)*Ut,Ft.y1=Ft.y0+bt}),$t.forEach(function(Ft){Ft.y0=(Ft.y0-ur)*Ut,Ft.y1=(Ft.y1-ur)*Ut,Ft.width=Ft.width*Ut})}}e.sankeyCircular=T,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,\"__esModule\",{value:!0})})});var GJ=ye((rbr,EWe)=>{\"use strict\";EWe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}});var NWe=ye((ibr,BWe)=>{\"use strict\";var CWe=mWe(),JXt=(R2(),ab(I2)).interpolateNumber,L5=Oa(),KC=wWe(),$Xt=MWe(),Nu=GJ(),P5=cd(),aw=Ca(),QXt=So(),p1=Dr(),WJ=p1.strTranslate,eZt=p1.strRotate,XJ=Km(),JC=XJ.keyFun,A7=XJ.repeat,DWe=XJ.unwrap,kWe=ru(),tZt=qa(),FWe=Kh(),rZt=FWe.CAP_SHIFT,iZt=FWe.LINE_SPACING,nZt=3;function aZt(e,t,r){var n=DWe(t),i=n.trace,a=i.domain,o=i.orientation===\"h\",s=i.node.pad,l=i.node.thickness,u={justify:KC.sankeyJustify,left:KC.sankeyLeft,right:KC.sankeyRight,center:KC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,x;v?x=$Xt.sankeyCircular().circularLinkGap(0):x=KC.sankey(),x.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(V){return V.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=x();x.nodePadding()<s&&p1.warn(\"node.pad was reduced to \",x.nodePadding(),\" to fit within the figure.\");var p,C,E;for(var A in n._groupLookup){var L=parseInt(n._groupLookup[A]),_;for(p=0;p<b.nodes.length;p++)if(b.nodes[p].pointNumber===L){_=b.nodes[p];break}if(_){var k={pointNumber:parseInt(A),x0:_.x0,x1:_.x1,y0:_.y0,y1:_.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};b.nodes.unshift(k),_.childrenNodes.unshift(k)}}function M(){for(p=0;p<b.nodes.length;p++){var V=b.nodes[p],G={},Z,H;for(C=0;C<V.targetLinks.length;C++)H=V.targetLinks[C],Z=H.source.pointNumber+\":\"+H.target.pointNumber,G.hasOwnProperty(Z)||(G[Z]=[]),G[Z].push(H);var N=Object.keys(G);for(C=0;C<N.length;C++){Z=N[C];var j=G[Z],re=0,oe={};for(E=0;E<j.length;E++)H=j[E],oe[H.label]||(oe[H.label]=0),oe[H.label]+=H.value,re+=H.value;for(E=0;E<j.length;E++)H=j[E],H.flow={value:re,labelConcentration:oe[H.label]/re,concentration:H.value/re,links:j},H.concentrationscale&&(H.color=P5(H.concentrationscale(H.flow.labelConcentration)))}var _e=0;for(C=0;C<V.sourceLinks.length;C++)_e+=V.sourceLinks[C].value;for(C=0;C<V.sourceLinks.length;C++)H=V.sourceLinks[C],H.concentrationOut=H.value/_e;var Me=0;for(C=0;C<V.targetLinks.length;C++)Me+=V.targetLinks[C].value;for(C=0;C<V.targetLinks.length;C++)H=V.targetLinks[C],H.concenrationIn=H.value/Me}}M();function g(V){V.forEach(function(G){var Z,H,N=0,j=G.length,re;for(G.sort(function(oe,_e){return oe.y0-_e.y0}),re=0;re<j;++re)Z=G[re],Z.y0>=N||(H=N-Z.y0,H>1e-6&&(Z.y0+=H,Z.y1+=H)),N=Z.y1+s})}function P(V){var G=V.map(function(_e,Me){return{x0:_e.x0,index:Me}}).sort(function(_e,Me){return _e.x0-Me.x0}),Z=[],H=-1,N,j=-1/0,re;for(p=0;p<G.length;p++){var oe=V[G[p].index];oe.x0>j+l&&(H+=1,N=oe.x0),j=oe.x0,Z[H]||(Z[H]=[]),Z[H].push(oe),re=N-oe.x0,oe.x0+=re,oe.x1+=re}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p<Math.min(i.node.x.length,i.node.y.length,b.nodes.length);p++)if(i.node.x[p]&&i.node.y[p]){var T=[i.node.x[p]*c,i.node.y[p]*f];b.nodes[p].x0=T[0]-l/2,b.nodes[p].x1=T[0]+l/2;var z=b.nodes[p].y1-b.nodes[p].y0;b.nodes[p].y0=T[1]-z/2,b.nodes[p].y1=T[1]+z/2}if(i.arrangement===\"snap\"){h=b.nodes;var O=P(h);g(O)}x.update(b)}return{circular:v,key:r,trace:i,guid:p1.randstr(),horizontal:o,width:c,height:f,nodePad:i.node.pad,nodeLineColor:i.node.line.color,nodeLineWidth:i.node.line.width,linkLineColor:i.link.line.color,linkLineWidth:i.link.line.width,linkArrowLength:i.link.arrowlen,valueFormat:i.valueformat,valueSuffix:i.valuesuffix,textFont:i.textfont,translateX:a.x[0]*e.width+e.margin.l,translateY:e.height-a.y[1]*e.height+e.margin.t,dragParallel:o?f:c,dragPerpendicular:o?c:f,arrangement:i.arrangement,sankey:x,graph:b,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function oZt(e,t,r){var n=P5(t.color),i=P5(t.hovercolor),a=t.source.label+\"|\"+t.target.label,o=a+\"__\"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:o,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:aw.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:aw.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:ZJ,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function sZt(e,t){var r=\"\",n=e.width/2,i=e.circularPathData,a=i.sourceX+i.verticalBuffer<i.targetX,o=i.rightFullExtent-i.rightLargeArcRadius-t<=i.leftFullExtent-n,s=Math.abs(i.rightFullExtent-i.leftFullExtent-n)<n;return e.circularLinkType===\"top\"?(r=\"M \"+(i.targetX-t)+\" \"+(i.targetY+n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.targetY+n)+\"A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightSmallArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent-n-t)+\" \"+(i.targetY-i.rightSmallArcRadius)+\"L \"+(i.rightFullExtent-n-t)+\" \"+i.verticalRightInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+\" L \"+(i.rightFullExtent+n-(i.rightLargeArcRadius-n)-t)+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 0 \"+(i.rightFullExtent-n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+\" L \"+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 1 \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent-n)+\" L \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent,r+=\" L \"+(i.leftFullExtent+n)+\" \"+(i.sourceY-i.leftSmallArcRadius)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+i.leftInnerExtent+\" \"+(i.sourceY+n)+\" L \"+i.sourceX+\" \"+(i.sourceY+n)+\" L \"+i.sourceX+\" \"+(i.sourceY-n)+\" L \"+i.leftInnerExtent+\" \"+(i.sourceY-n)+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftSmallArcRadius-n)+\" 0 0 0 \"+(i.leftFullExtent-n)+\" \"+(i.sourceY-i.leftSmallArcRadius)+\" L \"+(i.leftFullExtent-n)+\" \"+i.verticalLeftInnerExtent,a&&o?r+=\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent-n)+\" \"+(i.verticalFullExtent+n)+\"L\"+(i.rightFullExtent+n-t)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightFullExtent-n-t)+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:r+=\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 0 \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent,r+=\" L \"+(i.rightFullExtent+n-t)+\" \"+(i.targetY-i.rightSmallArcRadius)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 0 \"+(i.rightInnerExtent-t)+\" \"+(i.targetY-n)+\" L \"+(i.targetX-t)+\" \"+(i.targetY-n)+(t>0?\" L \"+i.targetX+\" \"+i.targetY:\"\")+\"Z\"):(r=\"M \"+(i.targetX-t)+\" \"+(i.targetY-n)+\"  L \"+(i.rightInnerExtent-t)+\" \"+(i.targetY-n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightSmallArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent-n-t)+\" \"+(i.targetY+i.rightSmallArcRadius)+\" L \"+(i.rightFullExtent-n-t)+\" \"+i.verticalRightInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightInnerExtent-n-t)+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent+n)+\" L \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent,r+=\" L \"+(i.leftFullExtent+n)+\" \"+(i.sourceY+i.leftSmallArcRadius)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+i.leftInnerExtent+\" \"+(i.sourceY-n)+\" L \"+i.sourceX+\" \"+(i.sourceY-n)+\" L \"+i.sourceX+\" \"+(i.sourceY+n)+\" L \"+i.leftInnerExtent+\" \"+(i.sourceY+n)+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent-n)+\" \"+(i.sourceY+i.leftSmallArcRadius)+\" L \"+(i.leftFullExtent-n)+\" \"+i.verticalLeftInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightFullExtent-t-n)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:r+=\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 1 \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent,r+=\" L \"+(i.rightFullExtent+n-t)+\" \"+(i.targetY+i.rightSmallArcRadius)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightInnerExtent-t)+\" \"+(i.targetY+n)+\" L \"+(i.targetX-t)+\" \"+(i.targetY+n)+(t>0?\" L \"+i.targetX+\" \"+i.targetY:\"\")+\"Z\"),r}function ZJ(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return sZt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=JXt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v=\"M\"+a+\",\"+c,x=\"C\"+l+\",\"+c+\" \"+u+\",\"+h+\" \"+o+\",\"+h,b=\"C\"+u+\",\"+d+\" \"+l+\",\"+f+\" \"+a+\",\"+f,p=n>0?\"L\"+(o+n)+\",\"+(h+r.link.width/2):\"\";return p+=\"L\"+o+\",\"+d,v+x+p+b+\"Z\"}return t}function lZt(e,t){var r=P5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s=\"node_\"+t.pointNumber;return t.group&&(s=p1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:aw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join(\"_\"),interactionState:e.interactionState,figure:e}}function jJ(e){e.attr(\"transform\",function(t){return WJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function uZt(e){e.call(jJ)}function zWe(e,t){e.call(uZt),t.attr(\"d\",ZJ())}function LWe(e){e.attr(\"width\",function(t){return t.node.x1-t.node.x0}).attr(\"height\",function(t){return t.visibleHeight})}function HJ(e){return e.link.width>1||e.linkLineWidth>0}function PWe(e){var t=WJ(e.translateX,e.translateY);return t+(e.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function IWe(e,t,r){e.on(\".basic\",null).on(\"mouseover.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on(\"mousemove.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on(\"mouseout.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on(\"click.basic\",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function cZt(e,t,r,n){var i=L5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on(\"dragstart\",function(a){if(a.arrangement!==\"fixed\"&&(p1.ensureSingle(n._fullLayout._infolayer,\"g\",\"dragcover\",function(s){n._fullLayout._dragCover=s}),p1.raiseToTop(this),a.interactionState.dragInProgress=a.node,RWe(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement===\"snap\")){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):fZt(e,o,a,n),hZt(e,t,a,o,n)}}).on(\"drag\",function(a){if(a.arrangement!==\"fixed\"){var o=L5.event.x,s=L5.event.y;a.arrangement===\"snap\"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement===\"freeform\"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),RWe(a.node),a.arrangement!==\"snap\"&&(a.sankey.update(a.graph),zWe(e.filter(qWe(a)),t))}}).on(\"dragend\",function(a){if(a.arrangement!==\"fixed\"){a.interactionState.dragInProgress=!1;for(var o=0;o<a.node.childrenNodes.length;o++)a.node.childrenNodes[o].x=a.node.x,a.node.childrenNodes[o].y=a.node.y;a.arrangement!==\"snap\"&&OWe(a,n)}});e.on(\".drag\",null).call(i)}function fZt(e,t,r,n){pZt(r.graph.nodes);var i=r.graph.nodes.filter(function(a){return a.originalX===r.node.originalX}).filter(function(a){return!a.partOfGroup});r.forceLayouts[t]=CWe.forceSimulation(i).alphaDecay(0).force(\"collide\",CWe.forceCollide().radius(function(a){return a.dy/2+r.nodePad/2}).strength(1).iterations(Nu.forceIterations)).force(\"constrain\",dZt(e,t,i,r,n)).stop()}function hZt(e,t,r,n,i){window.requestAnimationFrame(function a(){var o;for(o=0;o<Nu.forceTicksPerFrame;o++)r.forceLayouts[n].tick();var s=r.graph.nodes;if(gZt(s),r.sankey.update(r.graph),zWe(e.filter(qWe(r)),t),r.forceLayouts[n].alpha()>0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,OWe(r,i)}})}function dZt(e,t,r,n){return function(){for(var a=0,o=0;o<r.length;o++){var s=r[o];s===n.interactionState.dragInProgress?(s.x=s.lastDraggedX,s.y=s.lastDraggedY):(s.vx=(s.originalX-s.x)/Nu.forceTicksPerFrame,s.y=Math.min(n.size-s.dy/2,Math.max(s.dy/2,s.y))),a=Math.max(a,Math.abs(s.vx),Math.abs(s.vy))}!n.interactionState.dragInProgress&&a<.1&&n.forceLayouts[t].alpha()>0&&n.forceLayouts[t].alpha(0)}}function OWe(e,t){for(var r=[],n=[],i=0;i<e.graph.nodes.length;i++){var a=(e.graph.nodes[i].x0+e.graph.nodes[i].x1)/2,o=(e.graph.nodes[i].y0+e.graph.nodes[i].y1)/2;r.push(a/e.figure.width),n.push(o/e.figure.height)}tZt.call(\"_guiRestyle\",t,{\"node.x\":[r],\"node.y\":[n]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function vZt(e){var t=[],r;for(r=0;r<e.length;r++)e[r].originalX=(e[r].x0+e[r].x1)/2,e[r].originalY=(e[r].y0+e[r].y1)/2,t.indexOf(e[r].originalX)===-1&&t.push(e[r].originalX);for(t.sort(function(n,i){return n-i}),r=0;r<e.length;r++)e[r].originalLayerIndex=t.indexOf(e[r].originalX),e[r].originalLayer=e[r].originalLayerIndex/(t.length-1)}function RWe(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function qWe(e){return function(t){return t.node.originalX===e.node.originalX}}function pZt(e){for(var t=0;t<e.length;t++)e[t].y=(e[t].y0+e[t].y1)/2,e[t].x=(e[t].x0+e[t].x1)/2}function gZt(e){for(var t=0;t<e.length;t++)e[t].y0=e[t].y-e[t].dy/2,e[t].y1=e[t].y0+e[t].dy,e[t].x0=e[t].x-e[t].dx/2,e[t].x1=e[t].x0+e[t].dx}BWe.exports=function(e,t,r,n,i){var a=e._context.staticPlot,o=!1;p1.ensureSingle(e._fullLayout._infolayer,\"g\",\"first-render\",function(){o=!0});var s=e._fullLayout._dragCover,l=r.filter(function(b){return DWe(b).trace.visible}).map(aZt.bind(null,n)),u=t.selectAll(\".\"+Nu.cn.sankey).data(l,JC);u.exit().remove(),u.enter().append(\"g\").classed(Nu.cn.sankey,!0).style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"shape-rendering\",\"geometricPrecision\").style(\"pointer-events\",a?\"none\":\"auto\").attr(\"transform\",PWe),u.each(function(b,p){e._fullData[p]._sankey=b;var C=\"bgsankey-\"+b.trace.uid+\"-\"+p;p1.ensureSingle(e._fullLayout._draggers,\"rect\",C),e._fullData[p]._bgRect=L5.select(\".\"+C),e._fullData[p]._bgRect.style(\"pointer-events\",a?\"none\":\"all\").attr(\"width\",b.width).attr(\"height\",b.height).attr(\"x\",b.translateX).attr(\"y\",b.translateY).classed(\"bgsankey\",!0).style({fill:\"transparent\",\"stroke-width\":0})}),u.transition().ease(Nu.ease).duration(Nu.duration).attr(\"transform\",PWe);var c=u.selectAll(\".\"+Nu.cn.sankeyLinks).data(A7,JC);c.enter().append(\"g\").classed(Nu.cn.sankeyLinks,!0).style(\"fill\",\"none\");var f=c.selectAll(\".\"+Nu.cn.sankeyLink).data(function(b){var p=b.graph.links;return p.filter(function(C){return C.value}).map(oZt.bind(null,b))},JC);f.enter().append(\"path\").classed(Nu.cn.sankeyLink,!0).call(IWe,u,i.linkEvents),f.style(\"stroke\",function(b){return HJ(b)?aw.tinyRGB(P5(b.linkLineColor)):b.tinyColorHue}).style(\"stroke-opacity\",function(b){return HJ(b)?aw.opacity(b.linkLineColor):b.tinyColorAlpha}).style(\"fill\",function(b){return b.tinyColorHue}).style(\"fill-opacity\",function(b){return b.tinyColorAlpha}).style(\"stroke-width\",function(b){return HJ(b)?b.linkLineWidth:1}).attr(\"d\",ZJ()),f.style(\"opacity\",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",1),f.exit().transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",0).remove();var h=u.selectAll(\".\"+Nu.cn.sankeyNodeSet).data(A7,JC);h.enter().append(\"g\").classed(Nu.cn.sankeyNodeSet,!0),h.style(\"cursor\",function(b){switch(b.arrangement){case\"fixed\":return\"default\";case\"perpendicular\":return\"ns-resize\";default:return\"move\"}});var d=h.selectAll(\".\"+Nu.cn.sankeyNode).data(function(b){var p=b.graph.nodes;return vZt(p),p.map(lZt.bind(null,b))},JC);d.enter().append(\"g\").classed(Nu.cn.sankeyNode,!0).call(jJ).style(\"opacity\",function(b){return(e._context.staticPlot||o)&&!b.partOfGroup?1:0}),d.call(IWe,u,i.nodeEvents).call(cZt,f,i,e),d.transition().ease(Nu.ease).duration(Nu.duration).call(jJ).style(\"opacity\",function(b){return b.partOfGroup?0:1}),d.exit().transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",0).remove();var v=d.selectAll(\".\"+Nu.cn.nodeRect).data(A7);v.enter().append(\"rect\").classed(Nu.cn.nodeRect,!0).call(LWe),v.style(\"stroke-width\",function(b){return b.nodeLineWidth}).style(\"stroke\",function(b){return aw.tinyRGB(P5(b.nodeLineColor))}).style(\"stroke-opacity\",function(b){return aw.opacity(b.nodeLineColor)}).style(\"fill\",function(b){return b.tinyColorHue}).style(\"fill-opacity\",function(b){return b.tinyColorAlpha}),v.transition().ease(Nu.ease).duration(Nu.duration).call(LWe);var x=d.selectAll(\".\"+Nu.cn.nodeLabel).data(A7);x.enter().append(\"text\").classed(Nu.cn.nodeLabel,!0).style(\"cursor\",\"default\"),x.attr(\"data-notex\",1).text(function(b){return b.node.label}).each(function(b){var p=L5.select(this);QXt.font(p,b.textFont),kWe.convertToTspans(p,e)}).attr(\"text-anchor\",function(b){return b.horizontal&&b.left?\"end\":\"start\"}).attr(\"transform\",function(b){var p=L5.select(this),C=kWe.lineCount(p),E=b.textFont.size*((C-1)*iZt-rZt),A=b.nodeLineWidth/2+nZt,L=((b.horizontal?b.visibleHeight:b.visibleWidth)-E)/2;b.horizontal&&(b.left?A=-A:A+=b.visibleWidth);var _=b.horizontal?\"\":\"scale(-1,1)\"+eZt(90);return WJ(b.horizontal?A:L,b.horizontal?L:A)+_}),x.transition().ease(Nu.ease).duration(Nu.duration)}});var JJ=ye((nbr,YWe)=>{\"use strict\";var Xv=Oa(),KJ=Dr(),S7=KJ.numberFormat,mZt=NWe(),I5=vf(),yZt=Ca(),Ax=GJ().cn,$C=KJ._;function UWe(e){return e!==\"\"}function R5(e,t){return e.filter(function(r){return r.key===t.traceId})}function VWe(e,t){Xv.select(e).select(\"path\").style(\"fill-opacity\",t),Xv.select(e).select(\"rect\").style(\"fill-opacity\",t)}function GWe(e){Xv.select(e).select(\"text.name\").style(\"fill\",\"black\")}function HWe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function jWe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function WWe(e,t,r){t&&r&&R5(r,t).selectAll(\".\"+Ax.sankeyLink).filter(HWe(t)).call(XWe.bind(0,t,r,!1))}function YJ(e,t,r){t&&r&&R5(r,t).selectAll(\".\"+Ax.sankeyLink).filter(HWe(t)).call(ZWe.bind(0,t,r,!1))}function XWe(e,t,r,n){n.style(\"fill\",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style(\"fill-opacity\",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==\"\"&&R5(t,e).selectAll(\".\"+Ax.sankeyLink).filter(function(o){return o.link.label===a}).style(\"fill\",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style(\"fill-opacity\",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&R5(t,e).selectAll(\".\"+Ax.sankeyNode).filter(jWe(e)).call(WWe)}function ZWe(e,t,r,n){n.style(\"fill\",function(i){return i.tinyColorHue}).style(\"fill-opacity\",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==\"\"&&R5(t,e).selectAll(\".\"+Ax.sankeyLink).filter(function(o){return o.link.label===a}).style(\"fill\",function(o){return o.tinyColorHue}).style(\"fill-opacity\",function(o){return o.tinyColorAlpha})}),r&&R5(t,e).selectAll(Ax.sankeyNode).filter(jWe(e)).call(YJ)}function Ef(e,t){var r=e.hoverlabel||{},n=KJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}YWe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o<t._fullData.length;o++)if(t._fullData[o].visible&&t._fullData[o].type===Ax.sankey&&!t._fullData[o]._viewInitial){var s=t._fullData[o].node;t._fullData[o]._viewInitial={node:{groups:s.groups.slice(),x:s.x.slice(),y:s.y.slice()}}}var l=function(L,_){var k=_.link;k.originalEvent=Xv.event,t._hoverdata=[k],I5.click(t,{target:!0})},u=function(L,_,k){t._fullLayout.hovermode!==!1&&(Xv.select(L).call(XWe.bind(0,_,k,!0)),_.link.trace.link.hoverinfo!==\"skip\"&&(_.link.fullData=_.link.trace,t.emit(\"plotly_hover\",{event:Xv.event,points:[_.link]})))},c=$C(t,\"source:\")+\" \",f=$C(t,\"target:\")+\" \",h=$C(t,\"concentration:\")+\" \",d=$C(t,\"incoming flow count:\")+\" \",v=$C(t,\"outgoing flow count:\")+\" \",x=function(L,_){if(t._fullLayout.hovermode===!1)return;var k=_.link.trace.link;if(k.hoverinfo===\"none\"||k.hoverinfo===\"skip\")return;var M=[];function g(Z){var H,N;Z.circular?(H=(Z.circularPathData.leftInnerExtent+Z.circularPathData.rightInnerExtent)/2,N=Z.circularPathData.verticalFullExtent):(H=(Z.source.x1+Z.target.x0)/2,N=(Z.y0+Z.y1)/2);var j=[H,N];return Z.trace.orientation===\"v\"&&j.reverse(),j[0]+=_.parent.translateX,j[1]+=_.parent.translateY,j}for(var P=0,T=0;T<_.flow.links.length;T++){var z=_.flow.links[T];if(!(t._fullLayout.hovermode===\"closest\"&&_.link.pointNumber!==z.pointNumber)){_.link.pointNumber===z.pointNumber&&(P=T),z.fullData=z.trace,k=_.link.trace.link;var O=g(z),V={valueLabel:S7(_.valueFormat)(z.value)+_.valueSuffix};M.push({x:O[0],y:O[1],name:V.valueLabel,text:[z.label||\"\",c+z.source.label,f+z.target.label,z.concentrationscale?h+S7(\"%0.2f\")(z.flow.labelConcentration):\"\"].filter(UWe).join(\"<br>\"),color:Ef(k,\"bgcolor\")||yZt.addOpacity(z.color,1),borderColor:Ef(k,\"bordercolor\"),fontFamily:Ef(k,\"font.family\"),fontSize:Ef(k,\"font.size\"),fontColor:Ef(k,\"font.color\"),fontWeight:Ef(k,\"font.weight\"),fontStyle:Ef(k,\"font.style\"),fontVariant:Ef(k,\"font.variant\"),fontTextcase:Ef(k,\"font.textcase\"),fontLineposition:Ef(k,\"font.lineposition\"),fontShadow:Ef(k,\"font.shadow\"),nameLength:Ef(k,\"namelength\"),textAlign:Ef(k,\"align\"),idealAlign:Xv.event.x<O[0]?\"right\":\"left\",hovertemplate:k.hovertemplate,hovertemplateLabels:V,eventData:[z]})}}var G=I5.loneHover(M,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,anchorIndex:P});G.each(function(){var Z=this;_.link.concentrationscale||VWe(Z,.65),GWe(Z)})},b=function(L,_,k){t._fullLayout.hovermode!==!1&&(Xv.select(L).call(ZWe.bind(0,_,k,!0)),_.link.trace.link.hoverinfo!==\"skip\"&&(_.link.fullData=_.link.trace,t.emit(\"plotly_unhover\",{event:Xv.event,points:[_.link]})),I5.loneUnhover(n._hoverlayer.node()))},p=function(L,_,k){var M=_.node;M.originalEvent=Xv.event,t._hoverdata=[M],Xv.select(L).call(YJ,_,k),I5.click(t,{target:!0})},C=function(L,_,k){t._fullLayout.hovermode!==!1&&(Xv.select(L).call(WWe,_,k),_.node.trace.node.hoverinfo!==\"skip\"&&(_.node.fullData=_.node.trace,t.emit(\"plotly_hover\",{event:Xv.event,points:[_.node]})))},E=function(L,_){if(t._fullLayout.hovermode!==!1){var k=_.node.trace.node;if(!(k.hoverinfo===\"none\"||k.hoverinfo===\"skip\")){var M=Xv.select(L).select(\".\"+Ax.nodeRect),g=t._fullLayout._paperdiv.node().getBoundingClientRect(),P=M.node().getBoundingClientRect(),T=P.left-2-g.left,z=P.right+2-g.left,O=P.top+P.height/4-g.top,V={valueLabel:S7(_.valueFormat)(_.node.value)+_.valueSuffix};_.node.fullData=_.node.trace,t._fullLayout._calcInverseTransform(t);var G=t._fullLayout._invScaleX,Z=t._fullLayout._invScaleY,H=I5.loneHover({x0:G*T,x1:G*z,y:Z*O,name:S7(_.valueFormat)(_.node.value)+_.valueSuffix,text:[_.node.label,d+_.node.targetLinks.length,v+_.node.sourceLinks.length].filter(UWe).join(\"<br>\"),color:Ef(k,\"bgcolor\")||_.tinyColorHue,borderColor:Ef(k,\"bordercolor\"),fontFamily:Ef(k,\"font.family\"),fontSize:Ef(k,\"font.size\"),fontColor:Ef(k,\"font.color\"),fontWeight:Ef(k,\"font.weight\"),fontStyle:Ef(k,\"font.style\"),fontVariant:Ef(k,\"font.variant\"),fontTextcase:Ef(k,\"font.textcase\"),fontLineposition:Ef(k,\"font.lineposition\"),fontShadow:Ef(k,\"font.shadow\"),nameLength:Ef(k,\"namelength\"),textAlign:Ef(k,\"align\"),idealAlign:\"left\",hovertemplate:k.hovertemplate,hovertemplateLabels:V,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});VWe(H,.85),GWe(H)}}},A=function(L,_,k){t._fullLayout.hovermode!==!1&&(Xv.select(L).call(YJ,_,k),_.node.trace.node.hoverinfo!==\"skip\"&&(_.node.fullData=_.node.trace,t.emit(\"plotly_unhover\",{event:Xv.event,points:[_.node]})),I5.loneUnhover(n._hoverlayer.node()))};mZt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:x,unhover:b,select:l},nodeEvents:{hover:C,follow:E,unhover:A,select:p}})}});var KWe=ye(ow=>{\"use strict\";var _Zt=mc().overrideAll,xZt=Id().getModuleCalcData,bZt=JJ(),wZt=B1(),TZt=Tg(),AZt=yv(),SZt=zf().prepSelect,$J=Dr(),MZt=qa(),M7=\"sankey\";ow.name=M7;ow.baseLayoutAttrOverrides=_Zt({hoverlabel:wZt.hoverlabel},\"plot\",\"nested\");ow.plot=function(e){var t=xZt(e.calcdata,M7)[0];bZt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(M7),a=t._has&&t._has(M7);i&&!a&&(n._paperdiv.selectAll(\".sankey\").remove(),n._paperdiv.selectAll(\".bgsankey\").remove())};ow.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)EZt(e,t)};function EZt(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,a=n.dragmode===\"pan\"?\"move\":\"crosshair\",o=r._bgRect;if(o&&!(i===\"pan\"||i===\"zoom\")){TZt(o,a);var s={_id:\"x\",c2p:$J.identity,_offset:r._sankey.translateX,_length:r._sankey.width},l={_id:\"y\",c2p:$J.identity,_offset:r._sankey.translateY,_length:r._sankey.height},u={gd:e,element:o.node(),plotinfo:{id:t,xaxis:s,yaxis:l,fillRangeItems:$J.noop},subplot:t,xaxes:[s],yaxes:[l],doneFnCompleted:function(c){var f=e._fullData[t],h,d=f.node.groups.slice(),v=[];function x(E){for(var A=f._sankey.graph.nodes,L=0;L<A.length;L++)if(A[L].pointNumber===E)return A[L]}for(var b=0;b<c.length;b++){var p=x(c[b].pointNumber);if(p)if(p.group){for(var C=0;C<p.childrenNodes.length;C++)v.push(p.childrenNodes[C].pointNumber);d[p.pointNumber-f.node._count]=!1}else v.push(p.pointNumber)}h=d.filter(Boolean).concat([v]),MZt.call(\"_guiRestyle\",e,{\"node.groups\":[h]},t)}};u.prepFn=function(c,f,h){SZt(c,f,h,u,i)},AZt.init(u)}}});var $We=ye((obr,JWe)=>{\"use strict\";JWe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s<o.length;s++){var l=o[s];if(!l.partOfGroup){var u=[(l.x0+l.x1)/2,(l.y0+l.y1)/2];a.orientation===\"v\"&&u.reverse(),r&&r.contains(u,!1,s,t)&&i.push({pointNumber:l.pointNumber})}}return i}});var eXe=ye((sbr,QWe)=>{\"use strict\";QWe.exports={attributes:NJ(),supplyDefaults:iWe(),calc:lWe(),plot:JJ(),moduleType:\"trace\",name:\"sankey\",basePlotModule:KWe(),selectPoints:$We(),categories:[\"noOpacity\"],meta:{}}});var rXe=ye((lbr,tXe)=>{\"use strict\";tXe.exports=eXe()});var nXe=ye(D5=>{\"use strict\";var iXe=Mc();D5.name=\"indicator\";D5.plot=function(e,t,r,n){iXe.plotBasePlot(D5.name,e,t,r,n)};D5.clean=function(e,t,r,n){iXe.cleanBasePlot(D5.name,e,t,r,n)}});var e$=ye((cbr,cXe)=>{\"use strict\";var Sx=Ao().extendFlat,oXe=Ao().extendDeep,CZt=mc().overrideAll,sXe=ec(),lXe=Eh(),kZt=kc().attributes,Bf=Rd(),LZt=pl().templatedArray,E7=GT(),aXe=df().descriptionOnlyNumbers,QJ=sXe({editType:\"plot\",colorEditType:\"plot\"}),QC={color:{valType:\"color\",editType:\"plot\"},line:{color:{valType:\"color\",dflt:lXe.defaultLine,editType:\"plot\"},width:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},thickness:{valType:\"number\",min:0,max:1,dflt:1,editType:\"plot\"},editType:\"calc\"},uXe={valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},PZt=LZt(\"step\",oXe({},QC,{range:uXe}));cXe.exports={mode:{valType:\"flaglist\",editType:\"calc\",flags:[\"number\",\"delta\",\"gauge\"],dflt:\"number\"},value:{valType:\"number\",editType:\"calc\",anim:!0},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},domain:kZt({name:\"indicator\",trace:!0,editType:\"calc\"}),title:{text:{valType:\"string\",editType:\"plot\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},font:Sx({},QJ,{}),editType:\"plot\"},number:{valueformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:aXe(\"value\")},font:Sx({},QJ,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"plot\"},delta:{reference:{valType:\"number\",editType:\"calc\"},position:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],dflt:\"bottom\",editType:\"plot\"},relative:{valType:\"boolean\",editType:\"plot\",dflt:!1},valueformat:{valType:\"string\",editType:\"plot\",description:aXe(\"value\")},increasing:{symbol:{valType:\"string\",dflt:E7.INCREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:E7.INCREASING.COLOR,editType:\"plot\"},editType:\"plot\"},decreasing:{symbol:{valType:\"string\",dflt:E7.DECREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:E7.DECREASING.COLOR,editType:\"plot\"},editType:\"plot\"},font:Sx({},QJ,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"calc\"},gauge:{shape:{valType:\"enumerated\",editType:\"plot\",dflt:\"angular\",values:[\"angular\",\"bullet\"]},bar:oXe({},QC,{color:{dflt:\"green\"}}),bgcolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:lXe.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},axis:CZt({range:uXe,visible:Sx({},Bf.visible,{dflt:!0}),tickmode:Bf.minor.tickmode,nticks:Bf.nticks,tick0:Bf.tick0,dtick:Bf.dtick,tickvals:Bf.tickvals,ticktext:Bf.ticktext,ticks:Sx({},Bf.ticks,{dflt:\"outside\"}),ticklen:Bf.ticklen,tickwidth:Bf.tickwidth,tickcolor:Bf.tickcolor,ticklabelstep:Bf.ticklabelstep,showticklabels:Bf.showticklabels,labelalias:Bf.labelalias,tickfont:sXe({}),tickangle:Bf.tickangle,tickformat:Bf.tickformat,tickformatstops:Bf.tickformatstops,tickprefix:Bf.tickprefix,showtickprefix:Bf.showtickprefix,ticksuffix:Bf.ticksuffix,showticksuffix:Bf.showticksuffix,separatethousands:Bf.separatethousands,exponentformat:Bf.exponentformat,minexponent:Bf.minexponent,showexponent:Bf.showexponent,editType:\"plot\"},\"plot\"),steps:PZt,threshold:{line:{color:Sx({},QC.line.color,{}),width:Sx({},QC.line.width,{dflt:1}),editType:\"plot\"},thickness:Sx({},QC.thickness,{dflt:.85}),value:{valType:\"number\",editType:\"calc\",dflt:!1},editType:\"plot\"},editType:\"plot\"}}});var t$=ye((fbr,fXe)=>{\"use strict\";fXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var vXe=ye((hbr,dXe)=>{\"use strict\";var ey=Dr(),k7=e$(),IZt=kc().defaults,hXe=pl(),RZt=Yd(),C7=t$(),DZt=xb(),FZt=T3(),zZt=e_(),OZt=t_();function qZt(e,t,r,n){function i(_,k){return ey.coerce(e,t,k7,_,k)}IZt(t,n,i),i(\"mode\"),t._hasNumber=t.mode.indexOf(\"number\")!==-1,t._hasDelta=t.mode.indexOf(\"delta\")!==-1,t._hasGauge=t.mode.indexOf(\"gauge\")!==-1;var a=i(\"value\");t._range=[0,typeof a==\"number\"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i(\"number.valueformat\");var l=ey.extendFlat({},n.font);l.size=void 0,ey.coerceFont(i,\"number.font\",l),t.number.font.size===void 0&&(t.number.font.size=C7.defaultNumberFontSize,o[0]=!0),i(\"number.prefix\"),i(\"number.suffix\"),s=t.number.font.size}var u;if(t._hasDelta){var c=ey.extendFlat({},n.font);c.size=void 0,ey.coerceFont(i,\"delta.font\",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||C7.defaultNumberFontSize),o[1]=!0),i(\"delta.reference\",t.value),i(\"delta.relative\"),i(\"delta.valueformat\",t.delta.relative?\"2%\":\"\"),i(\"delta.increasing.symbol\"),i(\"delta.increasing.color\"),i(\"delta.decreasing.symbol\"),i(\"delta.decreasing.color\"),i(\"delta.position\"),i(\"delta.prefix\"),i(\"delta.suffix\"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=ey.extendFlat({},n.font);f.size=.25*(s||u||C7.defaultNumberFontSize),ey.coerceFont(i,\"title.font\",f),i(\"title.text\");var h,d,v,x;function b(_,k){return ey.coerce(h,d,k7.gauge,_,k)}function p(_,k){return ey.coerce(v,x,k7.gauge.axis,_,k)}if(t._hasGauge){h=e.gauge,h||(h={}),d=hXe.newContainer(t,\"gauge\"),b(\"shape\");var C=t._isBullet=t.gauge.shape===\"bullet\";C||i(\"title.align\",\"center\");var E=t._isAngular=t.gauge.shape===\"angular\";E||i(\"align\",\"center\"),b(\"bgcolor\",n.paper_bgcolor),b(\"borderwidth\"),b(\"bordercolor\"),b(\"bar.color\"),b(\"bar.line.color\"),b(\"bar.line.width\");var A=C7.valueThickness*(t.gauge.shape===\"bullet\"?.5:1);b(\"bar.thickness\",A),RZt(h,d,{name:\"steps\",handleItemDefaults:BZt}),b(\"threshold.value\"),b(\"threshold.thickness\"),b(\"threshold.line.width\"),b(\"threshold.line.color\"),v={},h&&(v=h.axis||{}),x=hXe.newContainer(d,\"axis\"),p(\"visible\"),t._range=p(\"range\",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};DZt(v,x,p,\"linear\"),OZt(v,x,p,\"linear\",L),zZt(v,x,p,\"linear\",L),FZt(v,x,p,L)}else i(\"title.align\",\"center\"),i(\"align\",\"center\"),t._isAngular=t._isBullet=!1;t._length=null}function BZt(e,t){function r(n,i){return ey.coerce(e,t,k7.gauge.steps,n,i)}r(\"color\"),r(\"line.color\"),r(\"line.width\"),r(\"range\"),r(\"thickness\")}dXe.exports={supplyDefaults:qZt}});var gXe=ye((dbr,pXe)=>{\"use strict\";function NZt(e,t){var r=[],n=t.value;typeof t._lastValue!=\"number\"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference==\"number\"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}pXe.exports={calc:NZt}});var wXe=ye((vbr,bXe)=>{\"use strict\";var fw=Oa(),UZt=(R2(),ab(I2)).interpolate,mXe=(R2(),ab(I2)).interpolateNumber,Mx=Dr(),VZt=Mx.strScale,tk=Mx.strTranslate,GZt=Mx.rad2deg,HZt=Kh().MID_SHIFT,cw=So(),sw=t$(),P7=ru(),sv=ho(),jZt=t4(),WZt=oI(),XZt=Rd(),F5=Ca(),r$={left:\"start\",center:\"middle\",right:\"end\"},lw={left:0,center:.5,right:1},yXe=/[yzafpnµmkMGTPEZY]/;function rk(e){return e&&e.duration>0}bXe.exports=function(t,r,n,i){var a=t._fullLayout,o;rk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,\"trace\").each(function(s){var l=s[0],u=l.trace,c=fw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,x={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=x.l+x.w/2,p=x.t+x.h/2,C=Math.min(x.w/2,x.h),E=sw.innerRadius*C,A,L,_,k=u.align||\"center\";if(L=p,!f)A=x.l+lw[k]*x.w,_=function(H){return _Xe(H,x.w,x.h)};else if(h&&(A=b,L=p+C/2,_=function(H){return $Zt(H,.9*E)}),d){var M=sw.bulletPadding,g=1-sw.bulletNumberDomainSize+M;A=x.l+(g+(1-g)*lw[k])*x.w,_=function(H){return _Xe(H,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}KZt(t,c,s,{numbersX:A,numbersY:L,numbersScaler:_,transitionOpts:n,onComplete:o});var P,T;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},T={range:u.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll(\"g.angular\").data(h?s:[]);z.exit().remove();var O=c.selectAll(\"g.angularaxis\").data(h?s:[]);O.exit().remove(),h&&YZt(t,c,s,{radius:C,innerRadius:E,gauge:z,layer:O,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var V=c.selectAll(\"g.bullet\").data(d?s:[]);V.exit().remove();var G=c.selectAll(\"g.bulletaxis\").data(d?s:[]);G.exit().remove(),d&&ZZt(t,c,s,{gauge:V,layer:G,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var Z=c.selectAll(\"text.title\").data(s);Z.exit().remove(),Z.enter().append(\"text\").classed(\"title\",!0),Z.attr(\"text-anchor\",function(){return d?r$.right:r$[u.title.align]}).text(u.title.text).call(cw.font,u.title.font).call(P7.convertToTspans,t),Z.attr(\"transform\",function(){var H=x.l+x.w*lw[u.title.align],N,j=sw.titlePadding,re=cw.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=cw.bBox(O.node());N=oe.top-j-re.bottom}else N=x.t+x.h/2-C/2-re.bottom-j;d&&(N=L-(re.top+re.bottom)/2,H=x.l-sw.bulletPadding*x.w)}else N=u._numbersTop-j-re.bottom;return tk(H,N)})})};function ZZt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,x,b,p;a.enter().append(\"g\").classed(\"bullet\",!0),a.attr(\"transform\",tk(u.l,u.t)),o.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),o.selectAll(\"g.xbulletaxistick,path,text\").remove();var C=u.h,E=i.gauge.bar.thickness*C,A=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=ek(e,i.gauge.axis),d._id=\"xbulletaxis\",d.domain=[A,L],d.setScale(),v=sv.calcTicks(d),x=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks===\"inside\"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:x}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:x,labelFns:sv.makeLabelFns(d,p)}));function _(O){O.attr(\"width\",function(V){return Math.max(0,d.c2p(V.range[1])-d.c2p(V.range[0]))}).attr(\"x\",function(V){return d.c2p(V.range[0])}).attr(\"y\",function(V){return .5*(1-V.thickness)*C}).attr(\"height\",function(V){return V.thickness*C})}var k=[s].concat(i.gauge.steps),M=a.selectAll(\"g.bg-bullet\").data(k);M.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),M.select(\"rect\").call(_).call(uw),M.exit().remove();var g=a.selectAll(\"g.value-bullet\").data([i.gauge.bar]);g.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),g.select(\"rect\").attr(\"height\",E).attr(\"y\",(C-E)/2).call(uw),rk(f)?g.select(\"rect\").transition().duration(f.duration).ease(f.easing).each(\"end\",function(){h&&h()}).each(\"interrupt\",function(){h&&h()}).attr(\"width\",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select(\"rect\").attr(\"width\",typeof r[0].y==\"number\"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),T=a.selectAll(\"g.threshold-bullet\").data(P);T.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),T.select(\"line\").attr(\"x1\",d.c2p(i.gauge.threshold.value)).attr(\"x2\",d.c2p(i.gauge.threshold.value)).attr(\"y1\",(1-i.gauge.threshold.thickness)/2*C).attr(\"y2\",(1-(1-i.gauge.threshold.thickness)/2)*C).call(F5.stroke,i.gauge.threshold.line.color).style(\"stroke-width\",i.gauge.threshold.line.width),T.exit().remove();var z=a.selectAll(\"g.gauge-outline\").data([l]);z.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),z.select(\"rect\").call(_).call(uw),z.exit().remove()}function YZt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,x=Math.PI/2;function b(_e){var Me=i.gauge.axis.range[0],ke=i.gauge.axis.range[1],me=(_e-Me)/(ke-Me)*Math.PI-x;return me<-x?-x:me>x?x:me}function p(_e){return fw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-x)}function C(_e){_e.attr(\"d\",function(Me){return p(Me.thickness).startAngle(b(Me.range[0])).endAngle(b(Me.range[1]))()})}var E,A,L,_;f.enter().append(\"g\").classed(\"angular\",!0),f.attr(\"transform\",tk(c[0],c[1])),h.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),h.selectAll(\"g.xangularaxistick,path,text\").remove(),E=ek(e,i.gauge.axis),E.type=\"linear\",E.range=i.gauge.axis.range,E._id=\"xangularaxis\",E.ticklabeloverflow=\"allow\",E.setScale();var k=function(_e){return(E.range[0]-_e.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},g=sv.makeLabelFns(E,0),P=g.labelStandoff;M.xFn=function(_e){var Me=k(_e);return Math.cos(Me)*P},M.yFn=function(_e){var Me=k(_e),ke=Math.sin(Me)>0?.2:1;return-Math.sin(Me)*(P+_e.fontSize*ke)+Math.abs(Math.cos(Me))*(_e.fontSize*HZt)},M.anchorFn=function(_e){var Me=k(_e),ke=Math.cos(Me);return Math.abs(ke)<.1?\"middle\":ke>0?\"start\":\"end\"},M.heightFn=function(_e,Me,ke){var me=k(_e);return-.5*(1+Math.sin(me))*ke};var T=function(_e){return tk(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return T(k(_e))};var z=function(_e){var Me=k(_e);return T(Me)+\"rotate(\"+-GZt(Me)+\")\"};if(A=sv.calcTicks(E),_=sv.getTickSigns(E)[2],E.visible){_=E.ticks===\"inside\"?-1:1;var O=(E.linewidth||1)/2;sv.drawTicks(e,E,{vals:A,layer:h,path:\"M\"+_*O+\",0h\"+_*E.ticklen,transFn:z}),sv.drawLabels(e,E,{vals:A,layer:h,transFn:L,labelFns:M})}var V=[l].concat(i.gauge.steps),G=f.selectAll(\"g.bg-arc\").data(V);G.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),G.select(\"path\").call(C).call(uw),G.exit().remove();var Z=p(i.gauge.bar.thickness),H=f.selectAll(\"g.value-arc\").data([i.gauge.bar]);H.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var N=H.select(\"path\");rk(d)?(N.transition().duration(d.duration).ease(d.easing).each(\"end\",function(){v&&v()}).each(\"interrupt\",function(){v&&v()}).attrTween(\"d\",JZt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr(\"d\",typeof r[0].y==\"number\"?Z.endAngle(b(r[0].y)):\"M0,0Z\"),N.call(uw),H.exit().remove(),V=[];var j=i.gauge.threshold.value;(j||j===0)&&V.push({range:[j,j],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll(\"g.threshold-arc\").data(V);re.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),re.select(\"path\").call(C).call(uw),re.exit().remove();var oe=f.selectAll(\"g.gauge-outline\").data([u]);oe.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),oe.select(\"path\").call(C).call(uw),oe.exit().remove()}function KZt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||\"center\",l=r$[s],u=n.transitionOpts,c=n.onComplete,f=Mx.ensureSingle(t,\"g\",\"numbers\"),h,d,v,x=[];i._hasNumber&&x.push(\"number\"),i._hasDelta&&(x.push(\"delta\"),i.delta.position===\"left\"&&x.reverse());var b=f.selectAll(\"text\").data(x);b.enter().append(\"text\"),b.attr(\"text-anchor\",function(){return l}).attr(\"class\",function(T){return T}).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),b.exit().remove();function p(T,z,O,V){if(T.match(\"s\")&&O>=0!=V>=0&&!z(O).slice(-1).match(yXe)&&!z(V).slice(-1).match(yXe)){var G=T.slice().replace(\"s\",\"f\").replace(/\\d+/,function(H){return parseInt(H)-1}),Z=ek(e,{tickformat:G});return function(H){return Math.abs(H)<1?sv.tickText(Z,H).text:z(H)}}else return z}function C(){var T=ek(e,{tickformat:i.number.valueformat},i._range);T.setScale(),sv.prepTicks(T);var z=function(H){return sv.tickText(T,H).text},O=i.number.suffix,V=i.number.prefix,G=f.select(\"text.number\");function Z(){var H=typeof r[0].y==\"number\"?V+z(r[0].y)+O:\"-\";G.text(H).call(cw.font,i.number.font).call(P7.convertToTspans,e)}return rk(u)?G.transition().duration(u.duration).ease(u.easing).each(\"end\",function(){Z(),c&&c()}).each(\"interrupt\",function(){Z(),c&&c()}).attrTween(\"text\",function(){var H=fw.select(this),N=mXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var j=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(re){H.text(V+j(N(re))+O)}}):Z(),h=xXe(V+z(r[0].y)+O,i.number.font,l,e),G}function E(){var T=ek(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),sv.prepTicks(T);var z=function(re){return sv.tickText(T,re).text},O=i.delta.suffix,V=i.delta.prefix,G=function(re){var oe=i.delta.relative?re.relativeDelta:re.delta;return oe},Z=function(re,oe){return re===0||typeof re!=\"number\"||isNaN(re)?\"-\":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+V+oe(re)+O},H=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select(\"text.delta\");N.call(cw.font,i.delta.font).call(F5.fill,H({delta:i._deltaLastValue}));function j(){N.text(Z(G(r[0]),z)).call(F5.fill,H(r[0])).call(P7.convertToTspans,e)}return rk(u)?N.transition().duration(u.duration).ease(u.easing).tween(\"text\",function(){var re=fw.select(this),oe=G(r[0]),_e=i._deltaLastValue,Me=p(i.delta.valueformat,z,_e,oe),ke=mXe(_e,oe);return i._deltaLastValue=oe,function(me){re.text(Z(ke(me),Me)),re.call(F5.fill,H({delta:ke(me)}))}}).each(\"end\",function(){j(),c&&c()}).each(\"interrupt\",function(){j(),c&&c()}):j(),d=xXe(Z(G(r[0]),z),i.delta.font,l,e),N}var A=i.mode+i.align,L;if(i._hasDelta&&(L=E(),A+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,A+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(C(),A+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var _=[(h.left+h.right)/2,(h.top+h.bottom)/2],k=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,g,P=.75*i.delta.font.size;i.delta.position===\"left\"&&(M=L7(i,\"deltaPos\",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+P),A,Math.min),g=_[1]-k[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position===\"right\"&&(M=L7(i,\"deltaPos\",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+P,A,Math.max),g=_[1]-k[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position===\"bottom\"&&(M=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position===\"top\"&&(M=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:M,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr(\"transform\",function(){var T=n.numbersScaler(v);A+=T[2];var z=L7(i,\"numbersScale\",1,T[0],A,Math.min),O;i._scaleNumbers||(z=1),i._isAngular?O=o-z*v.bottom:O=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+O;var V=v[s];s===\"center\"&&(V=(v.left+v.right)/2);var G=a-z*V;return G=L7(i,\"numbersTranslate\",0,G,A,Math.max),tk(G,O)+VZt(z)})}function uw(e){e.each(function(t){F5.stroke(fw.select(this),t.line.color)}).each(function(t){F5.fill(fw.select(this),t.color)}).style(\"stroke-width\",function(t){return t.line.width})}function JZt(e,t,r){return function(){var n=UZt(t,r);return function(i){return e.endAngle(n(i))()}}}function ek(e,t,r){var n=e._fullLayout,i=Mx.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},t),a={type:\"linear\",_id:\"x\"+t._id},o={letter:\"x\",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Mx.coerce(i,a,XZt,l,u)}return jZt(i,a,s,o,n),WZt(i,a,s,o),a}function _Xe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+\"x\"+r]}function $Zt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function xXe(e,t,r,n){var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),a=fw.select(i);return a.text(e).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",e).call(P7.convertToTspans,n).call(cw.font,t),cw.bBox(a.node())}function L7(e,t,r,n,i,a){var o=\"_cache\"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var AXe=ye((pbr,TXe)=>{\"use strict\";TXe.exports={moduleType:\"trace\",name:\"indicator\",basePlotModule:nXe(),categories:[\"svg\",\"noOpacity\",\"noHover\"],animatable:!0,attributes:e$(),supplyDefaults:vXe().supplyDefaults,calc:gXe().calc,plot:wXe(),meta:{}}});var MXe=ye((gbr,SXe)=>{\"use strict\";SXe.exports=AXe()});var i$=ye((ybr,LXe)=>{\"use strict\";var EXe=Nb(),I7=Ao().extendFlat,QZt=mc().overrideAll,CXe=ec(),eYt=kc().attributes,kXe=df().descriptionOnlyNumbers,mbr=LXe.exports=QZt({domain:eYt({name:\"table\",trace:!0}),columnwidth:{valType:\"number\",arrayOk:!0,dflt:null},columnorder:{valType:\"data_array\"},header:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:kXe(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:28},align:I7({},EXe.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:I7({},CXe({arrayOk:!0}))},cells:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:kXe(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:20},align:I7({},EXe.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:I7({},CXe({arrayOk:!0}))}},\"calc\",\"from-root\")});var IXe=ye((_br,PXe)=>{\"use strict\";var n$=Dr(),tYt=i$(),rYt=kc().defaults;function iYt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s<n;s++)o.push(s);t(\"columnorder\",o)}PXe.exports=function(t,r,n,i){function a(o,s){return n$.coerce(t,r,tYt,o,s)}rYt(r,i,a),a(\"columnwidth\"),a(\"header.values\"),a(\"header.format\"),a(\"header.align\"),a(\"header.prefix\"),a(\"header.suffix\"),a(\"header.height\"),a(\"header.line.width\"),a(\"header.line.color\"),a(\"header.fill.color\"),n$.coerceFont(a,\"header.font\",i.font),iYt(r,a),a(\"cells.values\"),a(\"cells.format\"),a(\"cells.align\"),a(\"cells.prefix\"),a(\"cells.suffix\"),a(\"cells.height\"),a(\"cells.line.width\"),a(\"cells.line.color\"),a(\"cells.fill.color\"),n$.coerceFont(a,\"cells.font\",i.font),r._length=null}});var DXe=ye((xbr,RXe)=>{\"use strict\";var nYt=Km().wrap;RXe.exports=function(){return nYt({})}});var a$=ye((bbr,FXe)=>{\"use strict\";FXe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\\$.*\\$$/,goldenRatio:1.618,lineBreaker:\"<br>\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\"cubic-out\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\"cubic-out\",uplift:5,wrapSpacer:\" \",wrapSplitCharacter:\" \",cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}});var HXe=ye((wbr,GXe)=>{\"use strict\";var zXe=a$(),s$=Ao().extendFlat,aYt=Eo(),oYt=vv().isTypedArray,R7=vv().isArrayOrTypedArray;GXe.exports=function(t,r){var n=o$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=o$(r.header.values);a.length&&!a[0].length&&(a[0]=[\"\"],a=o$(a));var o=a.concat(i(n).map(function(){return VXe((a[0]||[\"\"]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[zXe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(OXe,0),d=u-h,v=d+zXe.uplift,x=NXe(f,v),b=NXe(c,h),p=BXe(b,[]),C=BXe(x,p),E={},A=r._fullInput.columnorder;R7(A)&&(A=Array.from(A)),A=A.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var T=R7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return aYt(T)?Number(T):1}),_=L.reduce(OXe,0);L=L.map(function(g){return g/_*l});var k=Math.max(l$(r.header.line.width),l$(r.cells.line.width)),M={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:k,height:u,columnOrder:A,groupHeight:u,rowBlocks:C,headerRowBlocks:p,scrollY:0,cells:s$({},r.cells,{values:n}),headerCells:s$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var T=E[g];E[g]=(T||0)+1;var z=g+\"__\"+E[g];return{key:z,label:g,specIndex:P,xIndex:A[P],xScale:qXe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(g){g.calcdata=M,g.x=qXe(g)}),M};function l$(e){if(R7(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,l$(e[r]));return t}return e}function OXe(e,t){return e+t}function o$(e){var t=e.slice(),r=1/0,n=0,i;for(i=0;i<t.length;i++)oYt(t[i])?t[i]=Array.from(t[i]):R7(t[i])||(t[i]=[t[i]]),r=Math.min(r,t[i].length),n=Math.max(n,t[i].length);if(r!==n)for(i=0;i<t.length;i++){var a=n-t[i].length;a&&(t[i]=t[i].concat(VXe(a)))}return t}function VXe(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=\"\";return t}function qXe(e){return e.calcdata.columns.reduce(function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t},0)}function BXe(e,t){var r=Object.keys(e);return r.map(function(n){return s$({},e[n],{auxiliaryBlocks:t})})}function NXe(e,t){for(var r={},n,i=0,a=0,o=UXe(),s=0,l=0,u=0;u<e.length;u++)n=e[u],o.rows.push({rowIndex:u,rowHeight:n}),a+=n,(a>=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=UXe(),i+=a,s=u+1,a=0);return r}function UXe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var jXe=ye(u$=>{\"use strict\";var D7=Ao().extendFlat;u$.splitToPanels=function(e){var t=[0,0],r=D7({},e,{key:\"header\",type:\"header\",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:D7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=D7({},e,{key:\"cells1\",type:\"cells\",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=D7({},e,{key:\"cells2\",type:\"cells\",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};u$.splitToCells=function(e){var t=sYt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r==\"string\"&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function sYt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var _$=ye((Abr,rZe)=>{\"use strict\";var Ya=a$(),tf=Oa(),c$=Dr(),lYt=c$.numberFormat,Uu=Km(),f$=So(),uYt=ru(),cYt=Dr().raiseToTop,og=Dr().strTranslate,fYt=Dr().cancelTransition,hYt=HXe(),$Xe=jXe(),WXe=Ca();rZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll(\".\"+Ya.cn.table).data(r.map(function(C){var E=Uu.unwrap(C),A=E.trace;return hYt(t,A)}),Uu.keyFun);i.exit().remove(),i.enter().append(\"g\").classed(Ya.cn.table,!0).attr(\"overflow\",\"visible\").style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"overflow\",\"visible\").style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"all\"),i.attr(\"width\",function(C){return C.width+C.size.l+C.size.r}).attr(\"height\",function(C){return C.height+C.size.t+C.size.b}).attr(\"transform\",function(C){return og(C.translateX,C.translateY)});var a=i.selectAll(\".\"+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append(\"g\").classed(Ya.cn.tableControlView,!0).style(\"box-sizing\",\"content-box\");if(n){var s=\"onwheel\"in document?\"wheel\":\"mousewheel\";o.on(\"mousemove\",function(C){a.filter(function(E){return C===E}).call(ik,t)}).on(s,function(C){if(!C.scrollbarState.wheeling){C.scrollbarState.wheeling=!0;var E=C.scrollY+tf.event.deltaY,A=z7(t,a,null,E)(C);A||(tf.event.stopPropagation(),tf.event.preventDefault()),C.scrollbarState.wheeling=!1}}).call(ik,t,!0)}a.attr(\"transform\",function(C){return og(C.size.l,C.size.t)});var l=a.selectAll(\".\"+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append(\"rect\").classed(Ya.cn.scrollBackground,!0).attr(\"fill\",\"none\"),l.attr(\"width\",function(C){return C.width}).attr(\"height\",function(C){return C.height}),a.each(function(C){f$.setClipUrl(tf.select(this),XXe(t,C),t)});var u=a.selectAll(\".\"+Ya.cn.yColumn).data(function(C){return C.columns},Uu.keyFun);u.enter().append(\"g\").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr(\"transform\",function(C){return og(C.x,0)}),n&&u.call(tf.behavior.drag().origin(function(C){var E=tf.select(this);return KXe(E,C,-Ya.uplift),cYt(this),C.calcdata.columnDragInProgress=!0,ik(a.filter(function(A){return C.calcdata.key===A.key}),t),C}).on(\"drag\",function(C){var E=tf.select(this),A=function(k){return(C===k?tf.event.x:k.x)+k.columnWidth/2};C.x=Math.max(-Ya.overdrag,Math.min(C.calcdata.width+Ya.overdrag-C.columnWidth,tf.event.x));var L=QXe(u).filter(function(k){return k.calcdata.key===C.calcdata.key}),_=L.sort(function(k,M){return A(k)-A(M)});_.forEach(function(k,M){k.xIndex=M,k.x=C===k?k.x:k.xScale(k)}),u.filter(function(k){return C!==k}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr(\"transform\",function(k){return og(k.x,0)}),E.call(fYt).attr(\"transform\",og(C.x,-Ya.uplift))}).on(\"dragend\",function(C){var E=tf.select(this),A=C.calcdata;C.x=C.xScale(C),C.calcdata.columnDragInProgress=!1,KXe(E,C,0),wYt(t,A,A.columns.map(function(L){return L.xIndex}))})),u.each(function(C){f$.setClipUrl(tf.select(this),ZXe(t,C),t)});var c=u.selectAll(\".\"+Ya.cn.columnBlock).data($Xe.splitToPanels,Uu.keyFun);c.enter().append(\"g\").classed(Ya.cn.columnBlock,!0).attr(\"id\",function(C){return C.key}),c.style(\"cursor\",function(C){return C.dragHandle?\"ew-resize\":C.calcdata.scrollbarState.barWiggleRoom?\"ns-resize\":\"default\"});var f=c.filter(TYt),h=c.filter(g$);n&&h.call(tf.behavior.drag().origin(function(C){return tf.event.stopPropagation(),C}).on(\"drag\",z7(t,a,-1)).on(\"dragend\",function(){})),h$(t,a,f,c),h$(t,a,h,c);var d=a.selectAll(\".\"+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append(\"clipPath\").classed(Ya.cn.scrollAreaClip,!0).attr(\"id\",function(C){return XXe(t,C)});var v=d.selectAll(\".\"+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append(\"rect\").classed(Ya.cn.scrollAreaClipRect,!0).attr(\"x\",-Ya.overdrag).attr(\"y\",-Ya.uplift).attr(\"fill\",\"none\"),v.attr(\"width\",function(C){return C.width+2*Ya.overdrag}).attr(\"height\",function(C){return C.height+Ya.uplift});var x=u.selectAll(\".\"+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);x.enter().append(\"g\").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll(\".\"+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append(\"clipPath\").classed(Ya.cn.columnBoundaryClippath,!0),b.attr(\"id\",function(C){return ZXe(t,C)});var p=b.selectAll(\".\"+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append(\"rect\").classed(Ya.cn.columnBoundaryRect,!0).attr(\"fill\",\"none\"),p.attr(\"width\",function(C){return C.columnWidth+2*F7(C)}).attr(\"height\",function(C){return C.calcdata.height+2*F7(C)+Ya.uplift}).attr(\"x\",function(C){return-F7(C)}).attr(\"y\",function(C){return-F7(C)}),m$(null,h,a)};function F7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function XXe(e,t){return\"clip\"+e._fullLayout._uid+\"_scrollAreaBottomClip_\"+t.key}function ZXe(e,t){return\"clip\"+e._fullLayout._uid+\"_columnBoundaryClippath_\"+t.calcdata.key+\"_\"+t.specIndex}function QXe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function ik(e,t,r){function n(u){var c=u.rowBlocks;return v$(c,c.length-1)+(c.length?O7(c[c.length-1],1/0):1)}var i=e.selectAll(\".\"+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append(\"g\").classed(Ya.cn.scrollbarKit,!0).style(\"shape-rendering\",\"geometricPrecision\"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-d$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr(\"transform\",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return og(c,d$(u))});var a=i.selectAll(\".\"+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append(\"g\").classed(Ya.cn.scrollbar,!0);var o=a.selectAll(\".\"+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append(\"g\").classed(Ya.cn.scrollbarSlider,!0),o.attr(\"transform\",function(u){return og(0,u.scrollbarState.topY||0)});var s=o.selectAll(\".\"+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append(\"line\").classed(Ya.cn.scrollbarGlyph,!0).attr(\"stroke\",\"black\").attr(\"stroke-width\",Ya.scrollbarWidth).attr(\"stroke-linecap\",\"round\").attr(\"y1\",Ya.scrollbarWidth/2),s.attr(\"y2\",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr(\"stroke-opacity\",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr(\"stroke-opacity\",0);var l=a.selectAll(\".\"+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append(\"line\").classed(Ya.cn.scrollbarCaptureZone,!0).attr(\"stroke\",\"white\").attr(\"stroke-opacity\",.01).attr(\"stroke-width\",Ya.scrollbarCaptureWidth).attr(\"stroke-linecap\",\"butt\").attr(\"y1\",0).on(\"mousedown\",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||z7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on(\"drag\",z7(t,e)).on(\"dragend\",function(){})),l.attr(\"y2\",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function h$(e,t,r,n){var i=dYt(r),a=vYt(i);yYt(a);var o=pYt(a);xYt(o);var s=mYt(a),l=gYt(s);_Yt(l),eZe(l,t,n,e),y$(a)}function dYt(e){var t=e.selectAll(\".\"+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append(\"g\").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function vYt(e){var t=e.selectAll(\".\"+Ya.cn.columnCell).data($Xe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append(\"g\").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function pYt(e){var t=e.selectAll(\".\"+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"rect\").classed(Ya.cn.cellRect,!0),t}function gYt(e){var t=e.selectAll(\".\"+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"text\").classed(Ya.cn.cellText,!0).style(\"cursor\",function(){return\"auto\"}).on(\"mousedown\",function(){tf.event.stopPropagation()}),t}function mYt(e){var t=e.selectAll(\".\"+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"g\").classed(Ya.cn.cellTextHolder,!0).style(\"shape-rendering\",\"geometricPrecision\"),t}function yYt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Zv(n.size,i,r),color:Zv(n.color,i,r),family:Zv(n.family,i,r),weight:Zv(n.weight,i,r),style:Zv(n.style,i,r),variant:Zv(n.variant,i,r),textcase:Zv(n.textcase,i,r),lineposition:Zv(n.lineposition,i,r),shadow:Zv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Zv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Zv(t.calcdata.cells.line.width,i,r),t.font=a})}function _Yt(e){e.each(function(t){f$.font(tf.select(this),t.font)})}function xYt(e){e.attr(\"width\",function(t){return t.column.columnWidth}).attr(\"stroke-width\",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);WXe.stroke(r,Zv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),WXe.fill(r,Zv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function eZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s==\"string\",u=l&&s.match(/<br>/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=bYt(s);i.latex=f;var h=f?\"\":Zv(i.calcdata.cells.prefix,a,o)||\"\",d=f?\"\":Zv(i.calcdata.cells.suffix,a,o)||\"\",v=f?null:Zv(i.calcdata.cells.format,a,o)||null,x=h+(v?lYt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=YXe(x)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?YXe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var C=Ya.wrapSplitCharacter===\" \"?x.replace(/<a href=/ig,\"<a_href=\"):x,E=C.split(Ya.wrapSplitCharacter),A=Ya.wrapSplitCharacter===\" \"?E.map(function(L){return L.replace(/<a_href=/ig,\"<a href=\")}):E;i.fragments=A.map(function(L){return{text:L,width:null}}),i.fragments.push({fragment:Ya.wrapSpacer,width:null}),p=A.join(Ya.lineBreaker)+Ya.lineBreaker+Ya.wrapSpacer}else delete i.fragments,p=x;return p}).attr(\"dy\",function(i){return i.needsConvertToTspans?0:\"0.75em\"}).each(function(i){var a=this,o=tf.select(a),s=i.wrappingNeeded?SYt:MYt;i.needsConvertToTspans?uYt.convertToTspans(o,n,s(r,a,t,n,i)):tf.select(a.parentNode).attr(\"transform\",function(l){return og(tZe(l),Ya.cellPad)}).attr(\"text-anchor\",function(l){return{left:\"start\",center:\"middle\",right:\"end\"}[l.align]})})}function bYt(e){return typeof e==\"string\"&&e.match(Ya.latexCheck)}function YXe(e){return e.indexOf(Ya.wrapSplitCharacter)!==-1}function wYt(e,t,r){var n=t.gdColumnsOriginalOrder;t.gdColumns.sort(function(i,a){return r[n.indexOf(i)]-r[n.indexOf(a)]}),t.columnorder=r,e.emit(\"plotly_restyle\")}function Zv(e,t,r){if(c$.isArrayOrTypedArray(e)){var n=e[Math.min(t,e.length-1)];return c$.isArrayOrTypedArray(n)?n[Math.min(r,n.length-1)]:n}else return e}function KXe(e,t,r){e.transition().ease(Ya.releaseTransitionEase).duration(Ya.releaseTransitionDuration).attr(\"transform\",og(t.x,r))}function g$(e){return e.type===\"cells\"}function TYt(e){return e.type===\"header\"}function d$(e){var t=e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[];return t.reduce(function(r,n){return r+O7(n,1/0)},0)}function AYt(e,t,r){for(var n=[],i=0,a=0;a<e.length;a++){for(var o=e[a],s=o.rows,l=0,u=0;u<s.length;u++)l+=s[u].rowHeight;o.allRowsHeight=l;var c=i+l,f=t,h=f+r;f<c&&h>i&&n.push(a),i+=l}return n}function m$(e,t,r){var n=QXe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=v$(i,i.length),s=n.calcdata.groupHeight-d$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=AYt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr(\"transform\",function(c){var f=v$(c.rowBlocks,c.page)-c.scrollY;return og(0,f)}),e&&(JXe(e,r,t,u,n.prevPages,n,0),JXe(e,r,t,u,n.prevPages,n,1),ik(r,e))}}function z7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll(\".\"+Ya.cn.yColumn).selectAll(\".\"+Ya.cn.columnBlock).filter(g$);return m$(e,c,s),o.scrollY===u}}function JXe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});h$(e,t,l,r),i[o]=n[o]}))}function SYt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll(\"tspan.line\").each(function(x,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value=\"\";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll(\"tspan.line\").remove(),eZe(a.select(\".\"+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(y$)}}function MYt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=p$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll(\".\"+Ya.cn.columnCell).call(y$),m$(null,e.filter(g$),0),ik(r,n,!0)),o.attr(\"transform\",function(){var d=this,v=d.parentNode,x=v.getBoundingClientRect(),b=tf.select(d.parentNode).select(\".\"+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),C=b.top-x.top+(p?p.matrix.f:Ya.cellPad);return og(tZe(i,tf.select(d.parentNode).select(\".\"+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),C)}),i.settledY=!0}}}function tZe(e,t){switch(e.align){case\"left\":return Ya.cellPad;case\"right\":return e.column.columnWidth-(t||0)-Ya.cellPad;case\"center\":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function y$(e){e.attr(\"transform\",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+O7(s,1/0)},0),n=p$(t),i=O7(n,t.key),a=i+r;return og(0,a)}).selectAll(\".\"+Ya.cn.cellRect).attr(\"height\",function(t){return CYt(p$(t),t.key).rowHeight})}function v$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=EYt(e[n]);return r}function O7(e,t){for(var r=0,n=0;n<e.rows.length&&e.rows[n].rowIndex<t;n++)r+=e.rows[n].rowHeight;return r}function EYt(e){var t=e.allRowsHeight;if(t!==void 0)return t;for(var r=0,n=0;n<e.rows.length;n++)r+=e.rows[n].rowHeight;return e.allRowsHeight=r,r}function p$(e){return e.rowBlocks[e.page]}function CYt(e,t){return e.rows[t-e.firstRowIndex]}});var iZe=ye(B7=>{\"use strict\";var kYt=Id().getModuleCalcData,LYt=_$(),q7=\"table\";B7.name=q7;B7.plot=function(e){var t=kYt(e.calcdata,q7)[0];t.length&&LYt(e,t)};B7.clean=function(e,t,r,n){var i=n._has&&n._has(q7),a=t._has&&t._has(q7);i&&!a&&n._paperdiv.selectAll(\".table\").remove()}});var aZe=ye((Mbr,nZe)=>{\"use strict\";nZe.exports={attributes:i$(),supplyDefaults:IXe(),calc:DXe(),plot:_$(),moduleType:\"trace\",name:\"table\",basePlotModule:iZe(),categories:[\"noOpacity\"],meta:{}}});var sZe=ye((Ebr,oZe)=>{\"use strict\";oZe.exports=aZe()});var hZe=ye((Cbr,fZe)=>{\"use strict\";var lZe=ec(),uZe=Eh(),x$=Rd(),PYt=df().descriptionWithDates,IYt=mc().overrideAll,cZe=Pd().dash,b$=Ao().extendFlat;fZe.exports={color:{valType:\"color\",editType:\"calc\"},smoothing:{valType:\"number\",dflt:1,min:0,max:1.3,editType:\"calc\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"calc\"},font:lZe({editType:\"calc\"}),offset:{valType:\"number\",dflt:10,editType:\"calc\"},editType:\"calc\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autotypenumbers:x$.autotypenumbers,autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",editType:\"calc\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}]},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cheatertype:{valType:\"enumerated\",values:[\"index\",\"value\"],dflt:\"value\",editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"linear\",\"array\"],dflt:\"array\",editType:\"calc\"},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},tickvals:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},showticklabels:{valType:\"enumerated\",values:[\"start\",\"end\",\"both\",\"none\"],dflt:\"start\",editType:\"calc\"},labelalias:b$({},x$.labelalias,{editType:\"calc\"}),tickfont:lZe({editType:\"calc\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"calc\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"calc\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"calc\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"calc\",description:PYt(\"tick label\")},tickformatstops:IYt(x$.tickformatstops,\"calc\",\"from-root\"),categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},labelpadding:{valType:\"integer\",dflt:10,editType:\"calc\"},labelprefix:{valType:\"string\",editType:\"calc\"},labelsuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showline:{valType:\"boolean\",dflt:!1,editType:\"calc\"},linecolor:{valType:\"color\",dflt:uZe.defaultLine,editType:\"calc\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},gridcolor:{valType:\"color\",editType:\"calc\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},griddash:b$({},cZe,{editType:\"calc\"}),showgrid:{valType:\"boolean\",dflt:!0,editType:\"calc\"},minorgridcount:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},minorgridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},minorgriddash:b$({},cZe,{editType:\"calc\"}),minorgridcolor:{valType:\"color\",dflt:uZe.lightLine,editType:\"calc\"},startline:{valType:\"boolean\",editType:\"calc\"},startlinecolor:{valType:\"color\",editType:\"calc\"},startlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endline:{valType:\"boolean\",editType:\"calc\"},endlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endlinecolor:{valType:\"color\",editType:\"calc\"},tick0:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},dtick:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},arraytick0:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},arraydtick:{valType:\"integer\",min:1,dflt:1,editType:\"calc\"},editType:\"calc\"}});var U7=ye((kbr,pZe)=>{\"use strict\";var RYt=ec(),dZe=hZe(),vZe=Eh(),N7=RYt({editType:\"calc\"}),DYt=pf().zorder;N7.family.dflt='\"Open Sans\", verdana, arial, sans-serif';N7.size.dflt=12;N7.color.dflt=vZe.defaultLine;pZe.exports={carpet:{valType:\"string\",editType:\"calc\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},a:{valType:\"data_array\",editType:\"calc\"},a0:{valType:\"number\",dflt:0,editType:\"calc\"},da:{valType:\"number\",dflt:1,editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},b0:{valType:\"number\",dflt:0,editType:\"calc\"},db:{valType:\"number\",dflt:1,editType:\"calc\"},cheaterslope:{valType:\"number\",dflt:1,editType:\"calc\"},aaxis:dZe,baxis:dZe,font:N7,color:{valType:\"color\",dflt:vZe.defaultLine,editType:\"plot\"},zorder:DYt}});var yZe=ye((Lbr,mZe)=>{\"use strict\";var gZe=Dr().isArray1D;mZe.exports=function(t,r,n){var i=n(\"x\"),a=i&&i.length,o=n(\"y\"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||gZe(i))&&(!s||gZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var bZe=ye((Pbr,xZe)=>{\"use strict\";var FYt=U7(),_Ze=Ca().addOpacity,zYt=qa(),nk=Dr(),OYt=xb(),qYt=e_(),BYt=t_(),NYt=iI(),UYt=ym(),VYt=L3();xZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=FYt[i+\"axis\"];function s(g,P){return nk.coerce(t,r,o,g,P)}function l(g,P){return nk.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s(\"autotypenumbers\",n.autotypenumbersDflt);var u=s(\"type\");if(u===\"-\"&&(n.data&&GYt(r,n.data),r.type===\"-\"?r.type=\"linear\":u=t.type=r.type),s(\"smoothing\"),s(\"cheatertype\"),s(\"showticklabels\"),s(\"labelprefix\",i+\" = \"),s(\"labelsuffix\"),s(\"showtickprefix\"),s(\"showticksuffix\"),s(\"separatethousands\"),s(\"tickformat\"),s(\"exponentformat\"),s(\"minexponent\"),s(\"showexponent\"),s(\"categoryorder\"),s(\"tickmode\"),s(\"tickvals\"),s(\"ticktext\"),s(\"tick0\"),s(\"dtick\"),r.tickmode===\"array\"&&(s(\"arraytick0\"),s(\"arraydtick\")),s(\"labelpadding\"),r._hovertitle=i,u===\"date\"){var c=zYt.getComponentMethod(\"calendars\",\"handleDefaults\");c(t,r,\"calendar\",n.calendar)}UYt(r,n.fullLayout),r.c2p=nk.identity;var f=s(\"color\",n.dfltColor),h=f===t.color?f:a.color,d=s(\"title.text\");d&&(nk.coerceFont(s,\"title.font\",a,{overrideDflt:{size:nk.bigFont(a.size),color:h}}),s(\"title.offset\")),s(\"tickangle\");var v=s(\"autorange\",!r.isValidRange(t.range));v&&s(\"rangemode\"),s(\"range\"),r.cleanRange(),s(\"fixedrange\"),OYt(t,r,s,u),BYt(t,r,s,u,n),qYt(t,r,s,u,n),NYt(t,r,s,{data:n.data,dataAttr:i});var x=l(\"gridcolor\",_Ze(f,.3)),b=l(\"gridwidth\"),p=l(\"griddash\"),C=s(\"showgrid\");C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=l(\"startlinecolor\",f),A=l(\"startlinewidth\",b),L=s(\"startline\",r.showgrid||!!E||!!A);L||(delete r.startlinecolor,delete r.startlinewidth);var _=l(\"endlinecolor\",f),k=l(\"endlinewidth\",b),M=s(\"endline\",r.showgrid||!!_||!!k);return M||(delete r.endlinecolor,delete r.endlinewidth),C?(s(\"minorgridcount\"),s(\"minorgridwidth\",b),s(\"minorgriddash\",p),s(\"minorgridcolor\",_Ze(x,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels===\"none\"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s(\"tickmode\"),r};function GYt(e,t){if(e.type===\"-\"){var r=e._id,n=r.charAt(0),i=n+\"calendar\",a=e[i];e.type=VYt(t,a,{autotypenumbers:e.autotypenumbers})}}});var TZe=ye((Ibr,wZe)=>{\"use strict\";var HYt=bZe(),jYt=pl();wZe.exports=function(t,r,n,i,a){var o=i(\"a\");o||(i(\"da\"),i(\"a0\"));var s=i(\"b\");s||(i(\"db\"),i(\"b0\")),WYt(t,r,n,a)};function WYt(e,t,r,n){var i=[\"aaxis\",\"baxis\"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=jYt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:\"x\",id:o+\"axis\",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};HYt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!==\"-\"&&(e[a]={type:s.type})})}});var MZe=ye((Rbr,SZe)=>{\"use strict\";var AZe=Dr(),XYt=yZe(),ZYt=TZe(),YYt=U7(),KYt=Eh();SZe.exports=function(t,r,n,i){function a(l,u){return AZe.coerce(t,r,YYt,l,u)}r._clipPathId=\"clip\"+r.uid+\"carpet\";var o=a(\"color\",KYt.defaultLine);if(AZe.coerceFont(a,\"font\",i.font),a(\"carpet\"),ZYt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=XYt(t,r,a);s||(r.visible=!1),r._cheater&&a(\"cheaterslope\"),a(\"zorder\")}});var w$=ye((Dbr,EZe)=>{\"use strict\";var JYt=Dr().isArrayOrTypedArray;EZe.exports=function(t,r,n){var i;for(JYt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i<r.length;i++)t[i]=n(r[i]);return t}});var T$=ye((Fbr,CZe)=>{\"use strict\";CZe.exports=function(t,r,n){if(t.length===0)return\"\";var i,a=[],o=n?3:1;for(i=0;i<t.length;i+=o)a.push(t[i]+\",\"+r[i]),n&&i<t.length-o&&(a.push(\"C\"),a.push([t[i+1]+\",\"+r[i+1],t[i+2]+\",\"+r[i+2]+\" \"].join(\" \")));return a.join(n?\"\":\"L\")}});var LZe=ye((zbr,kZe)=>{\"use strict\";kZe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var qZe=ye((Obr,OZe)=>{\"use strict\";var j7=Oa(),V7=So(),G7=w$(),RZe=T$(),ak=LZe(),A$=ru(),Np=Dr(),DZe=Np.strRotate,H7=Np.strTranslate,FZe=Kh();OZe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Np.makeTraceGroups(i,n,\"trace\").each(function(c){var f=j7.select(this),h=c[0],d=h.trace,v=d.aaxis,x=d.baxis,b=Np.ensureSingle(f,\"g\",\"minorlayer\"),p=Np.ensureSingle(f,\"g\",\"majorlayer\"),C=Np.ensureSingle(f,\"g\",\"boundarylayer\"),E=Np.ensureSingle(f,\"g\",\"labellayer\");f.style(\"opacity\",d.opacity),z5(o,s,p,v,\"a\",v._gridlines,!0,a),z5(o,s,p,x,\"b\",x._gridlines,!0,a),z5(o,s,b,v,\"a\",v._minorgridlines,!0,a),z5(o,s,b,x,\"b\",x._minorgridlines,!0,a),z5(o,s,C,v,\"a-boundary\",v._boundarylines,a),z5(o,s,C,x,\"b-boundary\",x._boundarylines,a);var A=PZe(t,o,s,d,h,E,v._labels,\"a-label\"),L=PZe(t,o,s,d,h,E,x._labels,\"b-label\");QYt(t,E,d,h,o,s,A,L),$Yt(d,h,u,o,s)})};function $Yt(e,t,r,n,i){var a,o,s,l,u=r.select(\"#\"+e._clipPathId);u.size()||(u=r.append(\"clipPath\").classed(\"carpetclip\",!0));var c=Np.ensureSingle(u,\"path\",\"carpetboundary\"),f=t.clipsegments,h=[];for(l=0;l<f.length;l++)a=f[l],o=G7([],a.x,n.c2p),s=G7([],a.y,i.c2p),h.push(RZe(o,s,a.bicubic));var d=\"M\"+h.join(\"L\")+\"Z\";u.attr(\"id\",e._clipPathId),c.attr(\"d\",d)}function z5(e,t,r,n,i,a,o){var s=\"const-\"+i+\"-lines\",l=r.selectAll(\".\"+s).data(a);l.enter().append(\"path\").classed(s,!0).style(\"vector-effect\",o?\"none\":\"non-scaling-stroke\"),l.each(function(u){var c=u,f=c.x,h=c.y,d=G7([],f,e.c2p),v=G7([],h,t.c2p),x=\"M\"+RZe(d,v,c.smoothing),b=j7.select(this);b.attr(\"d\",x).style(\"stroke-width\",c.width).style(\"stroke\",c.color).style(\"stroke-dasharray\",V7.dashStyle(c.dash,c.width)).style(\"fill\",\"none\")}),l.exit().remove()}function PZe(e,t,r,n,i,a,o,s){var l=a.selectAll(\"text.\"+s).data(o);l.enter().append(\"text\").classed(s,!0);var u=0,c={};return l.each(function(f,h){var d;if(f.axis.tickangle===\"auto\")d=ak(n,t,r,f.xy,f.dxy);else{var v=(f.axis.tickangle+180)*Math.PI/180;d=ak(n,t,r,f.xy,[Math.cos(v),Math.sin(v)])}h||(c={angle:d.angle,flip:d.flip});var x=(f.endAnchor?-1:1)*d.flip,b=j7.select(this).attr({\"text-anchor\":x>0?\"start\":\"end\",\"data-notex\":1}).call(V7.font,f.font).text(f.text).call(A$.convertToTspans,e),p=V7.bBox(this);b.attr(\"transform\",H7(d.p[0],d.p[1])+DZe(d.angle)+H7(f.axis.labelpadding*x,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function QYt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Np.aggNums(Math.min,null,r.a),d=Np.aggNums(Math.max,null,r.a),v=Np.aggNums(Math.min,null,r.b),x=Np.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Np.extendFlat(o,ak(r,i,a,c,r.dxydb_rough(l,u))),IZe(e,t,r,n,c,f,r.aaxis,i,a,o,\"a-title\"),l=h,u=.5*(v+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Np.extendFlat(s,ak(r,i,a,c,r.dxyda_rough(l,u))),IZe(e,t,r,n,c,f,r.baxis,i,a,s,\"b-title\")}var zZe=FZe.LINE_SPACING,eKt=(1-FZe.MID_SHIFT)/zZe+1;function IZe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll(\"text.\"+c).data(f),d=u.maxExtent;h.enter().append(\"text\").classed(c,!0),h.each(function(){var v=ak(r,s,l,i,a);[\"start\",\"both\"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,C=p>90&&p<270,E=j7.select(this);E.text(o.title.text).call(A$.convertToTspans,e),C&&(d=(-A$.lineCount(E)+eKt)*zZe*x-d),E.attr(\"transform\",H7(v.p[0],v.p[1])+DZe(v.angle)+H7(0,d)).attr(\"text-anchor\",\"middle\").call(V7.font,o.title.font)}),h.exit().remove()}});var NZe=ye((qbr,BZe)=>{\"use strict\";var W7=Dr().isArrayOrTypedArray;BZe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=W7(e)?e.length:e,f=W7(t)?t.length:t,h=W7(e)?e:null,d=W7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,x=1/0,b=-1/0;for(i=0;i<f;i++)for(u[i]=[],l=d?(d[i]-d[0])*o:i/(f-1),n=0;n<c;n++)s=h?(h[n]-h[0])*a:n/(c-1),v=s-l*r,x=Math.min(v,x),b=Math.max(v,b),u[i][n]=v;var p=1/(b-x),C=-x*p;for(i=0;i<f;i++)for(n=0;n<c;n++)u[i][n]=p*u[i][n]+C;return u}});var HZe=ye((Bbr,GZe)=>{\"use strict\";var UZe=Dr().isArrayOrTypedArray;GZe.exports=function(e){return VZe(e,0)};function VZe(e,t){if(!UZe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a<i;a++){var o=e[a];if(UZe(o)){var s=VZe(o,t+1);s&&(r=Math.min(s[0],r),n=Math.max(s[1],n))}else r=Math.min(o,r),n=Math.max(o,n)}return[r,n]}});var WZe=ye((Nbr,jZe)=>{\"use strict\";var tKt=ho(),Ex=Ao().extendFlat;jZe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,p,C=t[\"_\"+r],E=t[r+\"axis\"],A=E._gridlines=[],L=E._minorgridlines=[],_=E._boundarylines=[],k=t[\"_\"+n],M=t[n+\"axis\"];E.tickmode===\"array\"&&(E.tickvals=C.slice());var g=t._xctrl,P=t._yctrl,T=g[0].length,z=g.length,O=t._a.length,V=t._b.length;tKt.prepTicks(E),E.tickmode===\"array\"&&delete E.tickvals;var G=E.smoothing?3:1;function Z(N){var j,re,oe,_e,Me,ke,me,ie,Se,Le,Ae,De,Pe=[],ge=[],Fe={};if(r===\"b\")for(re=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(V-2,re))),_e=re-oe,Fe.length=V,Fe.crossLength=O,Fe.xy=function(ce){return t.evalxy([],ce,re)},Fe.dxy=function(ce,Ze){return t.dxydi([],ce,oe,Ze,_e)},j=0;j<O;j++)ke=Math.min(O-2,j),me=j-ke,ie=t.evalxy([],j,re),M.smoothing&&j>0&&(Se=t.dxydi([],j-1,oe,0,_e),Pe.push(Me[0]+Se[0]/3),ge.push(Me[1]+Se[1]/3),Le=t.dxydi([],j-1,oe,1,_e),Pe.push(ie[0]-Le[0]/3),ge.push(ie[1]-Le[1]/3)),Pe.push(ie[0]),ge.push(ie[1]),Me=ie;else for(j=t.a2i(N),ke=Math.floor(Math.max(0,Math.min(O-2,j))),me=j-ke,Fe.length=O,Fe.crossLength=V,Fe.xy=function(ce){return t.evalxy([],j,ce)},Fe.dxy=function(ce,Ze){return t.dxydj([],ke,ce,me,Ze)},re=0;re<V;re++)oe=Math.min(V-2,re),_e=re-oe,ie=t.evalxy([],j,re),M.smoothing&&re>0&&(Ae=t.dxydj([],ke,re-1,me,0),Pe.push(Me[0]+Ae[0]/3),ge.push(Me[1]+Ae[1]/3),De=t.dxydj([],ke,re-1,me,1),Pe.push(ie[0]-De[0]/3),ge.push(ie[1]-De[1]/3)),Pe.push(ie[0]),ge.push(ie[1]),Me=ie;return Fe.axisLetter=r,Fe.axis=E,Fe.crossAxis=M,Fe.value=N,Fe.constvar=n,Fe.index=f,Fe.x=Pe,Fe.y=ge,Fe.smoothing=M.smoothing,Fe}function H(N){var j,re,oe,_e,Me,ke=[],me=[],ie={};if(ie.length=C.length,ie.crossLength=k.length,r===\"b\")for(oe=Math.max(0,Math.min(V-2,N)),Me=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Le){return t.dxydi([],Se,oe,Le,Me)},j=0;j<T;j++)ke[j]=g[N*G][j],me[j]=P[N*G][j];else for(re=Math.max(0,Math.min(O-2,N)),_e=Math.min(1,Math.max(0,N-re)),ie.xy=function(Se){return t.evalxy([],N,Se)},ie.dxy=function(Se,Le){return t.dxydj([],re,Se,_e,Le)},j=0;j<z;j++)ke[j]=g[j][N*G],me[j]=P[j][N*G];return ie.axisLetter=r,ie.axis=E,ie.crossAxis=M,ie.value=C[N],ie.constvar=n,ie.index=N,ie.x=ke,ie.y=me,ie.smoothing=M.smoothing,ie}if(E.tickmode===\"array\"){for(s=5e-15,l=[Math.floor((C.length-1-E.arraytick0)/E.arraydtick*(1+s)),Math.ceil(-E.arraytick0/E.arraydtick/(1+s))].sort(function(N,j){return N-j}),u=l[0]-1,c=l[1]+1,f=u;f<c;f++)a=E.arraytick0+E.arraydtick*f,!(a<0||a>C.length-1)&&A.push(Ex(H(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u;f<c;f++)if(o=E.arraytick0+E.arraydtick*f,v=Math.min(o+E.arraydtick,C.length-1),!(o<0||o>C.length-1)&&!(v<0||v>C.length-1))for(x=C[o],b=C[v],i=0;i<E.minorgridcount;i++)p=v-o,!(p<=0)&&(d=x+(b-x)*(i+1)/(E.minorgridcount+1)*(E.arraydtick/p),!(d<C[0]||d>C[C.length-1])&&L.push(Ex(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&_.push(Ex(H(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(H(C.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((C[C.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((C[0]-E.tick0)/E.dtick/(1+s))].sort(function(N,j){return N-j}),u=l[0],c=l[1],f=u;f<=c;f++)h=E.tick0+E.dtick*f,A.push(Ex(Z(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u-1;f<c+1;f++)for(h=E.tick0+E.dtick*f,i=0;i<E.minorgridcount;i++)d=h+E.dtick*(i+1)/(E.minorgridcount+1),!(d<C[0]||d>C[C.length-1])&&L.push(Ex(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&_.push(Ex(Z(C[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(Z(C[C.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var KZe=ye((Ubr,YZe)=>{\"use strict\";var XZe=ho(),ZZe=Ao().extendFlat;YZe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n<u.length;n++)s=u[n],[\"start\",\"both\"].indexOf(r.showticklabels)!==-1&&(i=XZe.tickText(r,s.value),ZZe(i,{prefix:a,suffix:o,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i)),[\"end\",\"both\"].indexOf(r.showticklabels)!==-1&&(i=XZe.tickText(r,s.value),ZZe(i,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i))}});var $Ze=ye((Vbr,JZe)=>{\"use strict\";JZe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var eYe=ye((Gbr,QZe)=>{\"use strict\";var rKt=Dr();QZe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var Me=0,ke,me=0;return oe>0&&(ke=t[_e][oe-1])!==void 0&&(me++,Me+=ke),oe<u-1&&(ke=t[_e][oe+1])!==void 0&&(me++,Me+=ke),_e>0&&(ke=t[_e-1][oe])!==void 0&&(me++,Me+=ke),_e<c-1&&(ke=t[_e+1][oe])!==void 0&&(me++,Me+=ke),Me/Math.max(1,me)}var h=0;for(i=0;i<u;i++)for(a=0;a<c;a++)t[a][i]===void 0&&(s.push(i),l.push(a),t[a][i]=f(i,a)),h=Math.max(h,Math.abs(t[a][i]));if(!s.length)return t;var d,v,x,b,p,C,E,A,L,_,k,M=1e-5,g=0,P=100,T=0,z=s.length;do{for(g=0,o=0;o<z;o++){i=s[o],a=l[o];var O=0,V=0,G,Z,H,N,j,re;i===0?(j=Math.min(u-1,2),H=r[j],N=r[1],G=t[a][j],Z=t[a][1],V+=Z+(Z-G)*(r[0]-N)/(N-H),O++):i===u-1&&(j=Math.max(0,u-3),H=r[j],N=r[u-2],G=t[a][j],Z=t[a][u-2],V+=Z+(Z-G)*(r[u-1]-N)/(N-H),O++),(i===0||i===u-1)&&a>0&&a<c-1&&(d=n[a+1]-n[a],v=n[a]-n[a-1],V+=(v*t[a+1][i]+d*t[a-1][i])/(v+d),O++),a===0?(re=Math.min(c-1,2),H=n[re],N=n[1],G=t[re][i],Z=t[1][i],V+=Z+(Z-G)*(n[0]-N)/(N-H),O++):a===c-1&&(re=Math.max(0,c-3),H=n[re],N=n[c-2],G=t[re][i],Z=t[c-2][i],V+=Z+(Z-G)*(n[c-1]-N)/(N-H),O++),(a===0||a===c-1)&&i>0&&i<u-1&&(d=r[i+1]-r[i],v=r[i]-r[i-1],V+=(v*t[a][i+1]+d*t[a][i-1])/(v+d),O++),O?V/=O:(x=r[i+1]-r[i],b=r[i]-r[i-1],p=n[a+1]-n[a],C=n[a]-n[a-1],E=x*b*(x+b),A=p*C*(p+C),V=(E*(C*t[a+1][i]+p*t[a-1][i])+A*(b*t[a][i+1]+x*t[a][i-1]))/(A*(b+x)+E*(C+p))),L=V-t[a][i],_=L/h,g+=_*_,k=O?0:.85,t[a][i]+=L*(1+k)}g=Math.sqrt(g)}while(T++<P&&g>M);return rKt.log(\"Smoother converged to\",g,\"after\",T,\"iterations\"),t}});var rYe=ye((Hbr,tYe)=>{\"use strict\";tYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var aYe=ye((jbr,nYe)=>{\"use strict\";var iYe=.5;nYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,iYe/2),c=Math.pow(s*s+l*l,iYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var sYe=ye((Wbr,oYe)=>{\"use strict\";var S$=aYe(),X7=Dr().ensureArray;function O5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}oYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,x,b,p=n[0].length,C=n.length,E=a?3*p-2:p,A=o?3*C-2:C;for(t=X7(t,A),r=X7(r,A),u=0;u<A;u++)t[u]=X7(t[u],E),r[u]=X7(r[u],E);for(l=0,c=0;l<C;l++,c+=o?3:1)for(f=t[c],h=r[c],d=n[l],v=i[l],s=0,u=0;s<p;s++,u+=a?3:1)f[u]=d[s],h[u]=v[s];if(a)for(l=0,c=0;l<C;l++,c+=o?3:1){for(s=1,u=3;s<p-1;s++,u+=3)x=S$([n[l][s-1],i[l][s-1]],[n[l][s],i[l][s]],[n[l][s+1],i[l][s+1]],a),t[c][u-1]=x[0][0],r[c][u-1]=x[0][1],t[c][u+1]=x[1][0],r[c][u+1]=x[1][1];b=O5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=b[0],r[c][1]=b[1],b=O5([t[c][E-1],r[c][E-1]],[t[c][E-3],r[c][E-3]],[t[c][E-4],r[c][E-4]]),t[c][E-2]=b[0],r[c][E-2]=b[1]}if(o)for(u=0;u<E;u++){for(c=3;c<A-3;c+=3)x=S$([t[c-3][u],r[c-3][u]],[t[c][u],r[c][u]],[t[c+3][u],r[c+3][u]],o),t[c-1][u]=x[0][0],r[c-1][u]=x[0][1],t[c+1][u]=x[1][0],r[c+1][u]=x[1][1];b=O5([t[0][u],r[0][u]],[t[2][u],r[2][u]],[t[3][u],r[3][u]]),t[1][u]=b[0],r[1][u]=b[1],b=O5([t[A-1][u],r[A-1][u]],[t[A-3][u],r[A-3][u]],[t[A-4][u],r[A-4][u]]),t[A-2][u]=b[0],r[A-2][u]=b[1]}if(a&&o)for(c=1;c<A;c+=(c+1)%3===0?2:1){for(u=3;u<E-3;u+=3)x=S$([t[c][u-3],r[c][u-3]],[t[c][u],r[c][u]],[t[c][u+3],r[c][u+3]],a),t[c][u-1]=.5*(t[c][u-1]+x[0][0]),r[c][u-1]=.5*(r[c][u-1]+x[0][1]),t[c][u+1]=.5*(t[c][u+1]+x[1][0]),r[c][u+1]=.5*(r[c][u+1]+x[1][1]);b=O5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=.5*(t[c][1]+b[0]),r[c][1]=.5*(r[c][1]+b[1]),b=O5([t[c][E-1],r[c][E-1]],[t[c][E-3],r[c][E-3]],[t[c][E-4],r[c][E-4]]),t[c][E-2]=.5*(t[c][E-2]+b[0]),r[c][E-2]=.5*(r[c][E-2]+b[1])}return[t,r]}});var uYe=ye((Xbr,lYe)=>{\"use strict\";lYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,x,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),C=Math.max(0,Math.min(1,l-b)),E=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var A=C*C,L=A*C,_=1-C,k=_*_,M=k*_,g=E*E,P=g*E,T=1-E,z=T*T,O=z*T;for(x=0;x<e.length;x++)v=e[x],c=M*v[p][b]+3*(k*C*v[p][b+1]+_*A*v[p][b+2])+L*v[p][b+3],f=M*v[p+1][b]+3*(k*C*v[p+1][b+1]+_*A*v[p+1][b+2])+L*v[p+1][b+3],h=M*v[p+2][b]+3*(k*C*v[p+2][b+1]+_*A*v[p+2][b+2])+L*v[p+2][b+3],d=M*v[p+3][b]+3*(k*C*v[p+3][b+1]+_*A*v[p+3][b+2])+L*v[p+3][b+3],s[x]=O*c+3*(z*E*f+T*g*h)+P*d;return s}:n?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,x,b,p,C,E;c*=3;var A=h*h,L=A*h,_=1-h,k=_*_,M=k*_,g=1-d;for(C=0;C<e.length;C++)E=e[C],v=g*E[f][c]+d*E[f+1][c],x=g*E[f][c+1]+d*E[f+1][c+1],b=g*E[f][c+2]+d*E[f+1][c+1],p=g*E[f][c+3]+d*E[f+1][c+1],s[C]=M*v+3*(k*h*x+_*A*b)+L*p;return s}:i?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,x,b,p,C,E;f*=3;var A=d*d,L=A*d,_=1-d,k=_*_,M=k*_,g=1-h;for(C=0;C<e.length;C++)E=e[C],v=g*E[f][c]+h*E[f][c+1],x=g*E[f+1][c]+h*E[f+1][c+1],b=g*E[f+2][c]+h*E[f+2][c+1],p=g*E[f+3][c]+h*E[f+3][c+1],s[C]=M*v+3*(k*d*x+_*A*b)+L*p;return s}:function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,x,b,p,C=1-d,E=1-h;for(b=0;b<e.length;b++)p=e[b],v=E*p[f][c]+h*p[f][c+1],x=E*p[f+1][c]+h*p[f+1][c+1],s[b]=C*v+d*x;return s}}});var fYe=ye((Zbr,cYe)=>{\"use strict\";cYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,x=1-o,b=x*x,p=x*o*2,C=-3*b,E=3*(b-p),A=3*(p-v),L=3*v,_=s*s,k=_*s,M=1-s,g=M*M,P=g*M;for(d=0;d<e.length;d++)h=e[d],l=C*h[a][i]+E*h[a][i+1]+A*h[a][i+2]+L*h[a][i+3],u=C*h[a+1][i]+E*h[a+1][i+1]+A*h[a+1][i+2]+L*h[a+1][i+3],c=C*h[a+2][i]+E*h[a+2][i+1]+A*h[a+2][i+2]+L*h[a+2][i+3],f=C*h[a+3][i]+E*h[a+3][i+1]+A*h[a+3][i+2]+L*h[a+3][i+3],n[d]=P*l+3*(g*s*u+M*_*c)+k*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;i*=3;var h=o*o,d=1-o,v=d*d,x=d*o*2,b=-3*v,p=3*(v-x),C=3*(x-h),E=3*h,A=1-s;for(c=0;c<e.length;c++)f=e[c],l=b*f[a][i]+p*f[a][i+1]+C*f[a][i+2]+E*f[a][i+3],u=b*f[a+1][i]+p*f[a+1][i+1]+C*f[a+1][i+2]+E*f[a+1][i+3],n[c]=A*l+s*u;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;a*=3;var v=s*s,x=v*s,b=1-s,p=b*b,C=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a][i+1]-d[a][i],u=d[a+1][i+1]-d[a+1][i],c=d[a+2][i+1]-d[a+2][i],f=d[a+3][i+1]-d[a+3][i],n[h]=C*l+3*(p*s*u+b*v*c)+x*f;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-s;for(c=0;c<e.length;c++)f=e[c],l=f[a][i+1]-f[a][i],u=f[a+1][i+1]-f[a+1][i],n[c]=h*l+s*u;return n}}});var dYe=ye((Ybr,hYe)=>{\"use strict\";hYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,x=v*o,b=1-o,p=b*b,C=p*b,E=s*s,A=1-s,L=A*A,_=A*s*2,k=-3*L,M=3*(L-_),g=3*(_-E),P=3*E;for(d=0;d<e.length;d++)h=e[d],l=k*h[a][i]+M*h[a+1][i]+g*h[a+2][i]+P*h[a+3][i],u=k*h[a][i+1]+M*h[a+1][i+1]+g*h[a+2][i+1]+P*h[a+3][i+1],c=k*h[a][i+2]+M*h[a+1][i+2]+g*h[a+2][i+2]+P*h[a+3][i+2],f=k*h[a][i+3]+M*h[a+1][i+3]+g*h[a+2][i+3]+P*h[a+3][i+3],n[d]=C*l+3*(p*o*u+b*v*c)+x*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3;var v=s*s,x=v*s,b=1-s,p=b*b,C=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a+1][i]-d[a][i],u=d[a+1][i+1]-d[a][i+1],c=d[a+1][i+2]-d[a][i+2],f=d[a+1][i+3]-d[a][i+3],n[h]=C*l+3*(p*s*u+b*v*c)+x*f;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;a*=3;var h=1-o,d=s*s,v=1-s,x=v*v,b=v*s*2,p=-3*x,C=3*(x-b),E=3*(b-d),A=3*d;for(c=0;c<e.length;c++)f=e[c],l=p*f[a][i]+C*f[a+1][i]+E*f[a+2][i]+A*f[a+3][i],u=p*f[a][i+1]+C*f[a+1][i+1]+E*f[a+2][i+1]+A*f[a+3][i+1],n[c]=h*l+o*u;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-o;for(c=0;c<e.length;c++)f=e[c],l=f[a+1][i]-f[a][i],u=f[a+1][i+1]-f[a][i+1],n[c]=h*l+o*u;return n}}});var mYe=ye((Kbr,gYe)=>{\"use strict\";var vYe=rYe(),pYe=P6().findBin,iKt=sYe(),nKt=uYe(),aKt=fYe(),oKt=dYe();gYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*vYe.RELATIVE_CULL_TOLERANCE,x=d*vYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=x,f+=x,t.isVisible=function(b,p){return b>l&&b<u&&p>c&&p<f},t.isOccluded=function(b,p){return b<l||b>u||p<c||p>f},t.setScale=function(){var b=t._x,p=t._y,C=iKt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=C[0],t._yctrl=C[1],t.evalxy=nKt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=aKt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=oKt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),C=b[0]-p;return(1-C)*r[p]+C*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),C=b[1]-p;return(1-C)*n[p]+C*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(pYe(b,r),i-2)),C=r[p],E=r[p+1];return Math.max(0,Math.min(i-1,p+(b-C)/(E-C)))},t.b2j=function(b){var p=Math.max(0,Math.min(pYe(b,n),a-2)),C=n[p],E=n[p+1];return Math.max(0,Math.min(a-1,p+(b-C)/(E-C)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,C){if(!C&&(b<r[0]||b>r[i-1]|p<n[0]||p>n[a-1]))return[!1,!1];var E=t.a2i(b),A=t.b2j(p),L=t.evalxy([],E,A);if(C){var _=0,k=0,M=[],g,P,T,z;b<r[0]?(g=0,P=0,_=(b-r[0])/(r[1]-r[0])):b>r[i-1]?(g=i-2,P=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(E))),P=E-g),p<n[0]?(T=0,z=0,k=(p-n[0])/(n[1]-n[0])):p>n[a-1]?(T=a-2,z=1,k=(p-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(A))),z=A-T),_&&(t.dxydi(M,g,T,P,z),L[0]+=M[0]*_,L[1]+=M[1]*_),k&&(t.dxydj(M,g,T,P,z),L[0]+=M[0]*k,L[1]+=M[1]*k)}return L},t.c2p=function(b,p,C){return[p.c2p(b[0]),C.c2p(b[1])]},t.p2x=function(b,p,C){return[p.p2c(b[0]),C.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,C,E){var A=t.dxydi(null,b,p,C,E),L=t.dadi(b,C);return[A[0]/L,A[1]/L]},t.dxydb=function(b,p,C,E){var A=t.dxydj(null,b,p,C,E),L=t.dbdj(p,E);return[A[0]/L,A[1]/L]},t.dxyda_rough=function(b,p,C){var E=h*(C||.1),A=t.ab2xy(b+E,p,!0),L=t.ab2xy(b-E,p,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dxydb_rough=function(b,p,C){var E=d*(C||.1),A=t.ab2xy(b,p+E,!0),L=t.ab2xy(b,p-E,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var SYe=ye((Jbr,AYe)=>{\"use strict\";var Z7=ho(),yYe=Dr().isArray1D,sKt=NZe(),_Ye=HZe(),xYe=WZe(),bYe=KZe(),lKt=$Ze(),wYe=r8(),TYe=eYe(),uKt=e8(),cKt=mYe();AYe.exports=function(t,r){var n=Z7.getFromId(t,r.xaxis),i=Z7.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&yYe(s)&&u.push(\"x\"),l&&yYe(l)&&u.push(\"y\"),u.length&&uKt(r,a,o,\"a\",\"b\",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype===\"index\"?c.length:c,v=o.cheatertype===\"index\"?f.length:f;s=sKt(d,v,r.cheaterslope)}r._x=s=wYe(s),r._y=l=wYe(l),TYe(s,c,f),TYe(l,c,f),cKt(r),r.setScale();var x=_Ye(s),b=_Ye(l),p=.5*(x[1]-x[0]),C=.5*(x[1]+x[0]),E=.5*(b[1]-b[0]),A=.5*(b[1]+b[0]),L=1.3;return x=[C-p*L,C+p*L],b=[A-E*L,A+E*L],r._extremes[n._id]=Z7.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=Z7.findExtremes(i,b,{padded:!0}),xYe(r,\"a\",\"b\"),xYe(r,\"b\",\"a\"),bYe(r,a),bYe(r,o),h.clipsegments=lKt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var EYe=ye(($br,MYe)=>{\"use strict\";MYe.exports={attributes:U7(),supplyDefaults:MZe(),plot:qZe(),calc:SYe(),animatable:!0,isContainer:!0,moduleType:\"trace\",name:\"carpet\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"carpet\",\"carpetAxis\",\"notLegendIsolatable\",\"noMultiCategory\",\"noHover\",\"noSortingByValue\"],meta:{}}});var kYe=ye((Qbr,CYe)=>{\"use strict\";CYe.exports=EYe()});var M$=ye((e2r,PYe)=>{\"use strict\";var fKt=Eg(),u0=pf(),hKt=Gl(),dKt=Qo().hovertemplateAttrs,vKt=Qo().texttemplateAttrs,LYe=Tu(),Cx=Ao().extendFlat,sg=u0.marker,q5=u0.line,pKt=sg.line;PYe.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:Cx({},u0.mode,{dflt:\"markers\"}),text:Cx({},u0.text,{}),texttemplate:vKt({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:Cx({},u0.hovertext,{}),line:{color:q5.color,width:q5.width,dash:q5.dash,backoff:q5.backoff,shape:Cx({},q5.shape,{values:[\"linear\",\"spline\"]}),smoothing:q5.smoothing,editType:\"calc\"},connectgaps:u0.connectgaps,fill:Cx({},u0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:fKt(),marker:Cx({symbol:sg.symbol,opacity:sg.opacity,maxdisplayed:sg.maxdisplayed,angle:sg.angle,angleref:sg.angleref,standoff:sg.standoff,size:sg.size,sizeref:sg.sizeref,sizemin:sg.sizemin,sizemode:sg.sizemode,line:Cx({width:pKt.width,editType:\"calc\"},LYe(\"marker.line\")),gradient:sg.gradient,editType:\"calc\"},LYe(\"marker\")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:Cx({},hKt.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:u0.hoveron,hovertemplate:dKt(),zorder:u0.zorder}});var FYe=ye((t2r,DYe)=>{\"use strict\";var IYe=Dr(),gKt=Sm(),B5=Ru(),mKt=$p(),yKt=R0(),RYe=J3(),_Kt=D0(),xKt=Ig(),bKt=M$();DYe.exports=function(t,r,n,i){function a(h,d){return IYe.coerce(t,r,bKt,h,d)}a(\"carpet\"),r.xaxis=\"x\",r.yaxis=\"y\";var o=a(\"a\"),s=a(\"b\"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"text\"),a(\"texttemplate\"),a(\"hovertext\");var u=l<gKt.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"mode\",u),B5.hasMarkers(r)&&mKt(t,r,n,i,a,{gradient:!0}),B5.hasLines(r)&&(yKt(t,r,n,i,a,{backoff:!0}),RYe(t,r,a),a(\"connectgaps\")),B5.hasText(r)&&_Kt(t,r,i,a);var c=[];(B5.hasMarkers(r)||B5.hasText(r))&&(a(\"marker.maxdisplayed\"),c.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(xKt(t,r,n,a),B5.hasLines(r)||RYe(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&c.push(\"fills\");var f=a(\"hoveron\",c.join(\"+\")||\"points\");f!==\"fills\"&&a(\"hovertemplate\"),a(\"zorder\"),IYe.coerceSelectionMarkerOpacity(r,a)}});var OYe=ye((r2r,zYe)=>{\"use strict\";zYe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var Y7=ye((i2r,qYe)=>{\"use strict\";qYe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i<r;i++){var a=e._fullData[i];if(a.index!==t.index&&a.type===\"carpet\"&&(n||(n=a),a.carpet===t.carpet))return a}return n}});var UYe=ye((n2r,NYe)=>{\"use strict\";var BYe=Eo(),wKt=F0(),TKt=Cm(),AKt=z0(),SKt=O0().calcMarkerSize,MKt=Y7();NYe.exports=function(t,r){var n=r._carpetTrace=MKt(t,r);if(!(!n||!n.visible||n.visible===\"legendonly\")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i<a;i++)if(s=r.a[i],l=r.b[i],BYe(s)&&BYe(l)){var c=n.ab2xy(+s,+l,!0),f=n.isVisible(+s,+l);f||(u=!0),o[i]={x:c[0],y:c[1],a:s,b:l,vis:f}}else o[i]={x:!1,y:!1};return r._needsCull=u,o[0].carpet=n,o[0].trace=r,SKt(r,a),wKt(t,r),TKt(o,r),AKt(o,r),o}}});var HYe=ye((a2r,GYe)=>{\"use strict\";var EKt=iT(),VYe=ho(),CKt=So();GYe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=VYe.getFromId(t,l.xaxis||\"x\"),c=VYe.getFromId(t,l.yaxis||\"y\"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a<n.length;a++)o=n[a][0].trace,o._xA=u,o._yA=c;for(EKt(t,f,n,i),a=0;a<n.length;a++)o=n[a][0].trace,s=i.selectAll(\"g.trace\"+o.uid+\" .js-line\"),CKt.setClipUrl(s,n[a][0].carpet._clipPathId,t)}});var WYe=ye((o2r,jYe)=>{\"use strict\";var kKt=sT(),LKt=Dr().fillText;jYe.exports=function(t,r,n,i){var a=kKt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var x=[];function b(E,A){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,\"\"):L=E._hovertitle,x.push(L+\": \"+A.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,C=p.split(\"+\");C.indexOf(\"all\")!==-1&&(C=[\"a\",\"b\",\"text\"]),C.indexOf(\"a\")!==-1&&b(d.aaxis,f.a),C.indexOf(\"b\")!==-1&&b(d.baxis,f.b),x.push(\"y: \"+o.yLabel),C.indexOf(\"text\")!==-1&&LKt(f,h,x),o.extraText=x.join(\"<br>\")}return a}});var ZYe=ye((s2r,XYe)=>{\"use strict\";XYe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var KYe=ye((l2r,YYe)=>{\"use strict\";YYe.exports={attributes:M$(),supplyDefaults:FYe(),colorbar:$d(),formatLabels:OYe(),calc:UYe(),plot:HYe(),style:ap().style,styleOnSelect:ap().styleOnSelect,hoverPoints:WYe(),selectPoints:lT(),eventData:ZYe(),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:vh(),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}});var $Ye=ye((u2r,JYe)=>{\"use strict\";JYe.exports=KYe()});var E$=ye((c2r,QYe)=>{\"use strict\";var lg=ET(),g1=E4(),PKt=Tu(),IKt=Ao().extendFlat,ty=g1.contours;QYe.exports=IKt({carpet:{valType:\"string\",editType:\"calc\"},z:lg.z,a:lg.x,a0:lg.x0,da:lg.dx,b:lg.y,b0:lg.y0,db:lg.dy,text:lg.text,hovertext:lg.hovertext,transpose:lg.transpose,atype:lg.xtype,btype:lg.ytype,fillcolor:g1.fillcolor,autocontour:g1.autocontour,ncontours:g1.ncontours,contours:{type:ty.type,start:ty.start,end:ty.end,size:ty.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:ty.showlines,showlabels:ty.showlabels,labelfont:ty.labelfont,labelformat:ty.labelformat,operation:ty.operation,value:ty.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:g1.line.color,width:g1.line.width,dash:g1.line.dash,smoothing:g1.line.smoothing,editType:\"plot\"},zorder:g1.zorder},PKt(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var C$=ye((f2r,rKe)=>{\"use strict\";var eKe=Dr(),RKt=JI(),tKe=E$(),DKt=AG(),FKt=b8(),zKt=w8();rKe.exports=function(t,r,n,i){function a(u,c){return eKe.coerce(t,r,tKe,u,c)}function o(u){return eKe.coerce2(t,r,tKe,u)}if(a(\"carpet\"),t.a&&t.b){var s=RKt(t,r,a,i,\"a\",\"b\");if(!s){r.visible=!1;return}a(\"text\");var l=a(\"contours.type\")===\"constraint\";l?DKt(t,r,a,i,n,{hasHover:!1}):(FKt(t,r,a,o),zKt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a(\"zorder\")}});var oKe=ye((h2r,aKe)=>{\"use strict\";var OKt=gv(),iKe=Dr(),qKt=e8(),BKt=r8(),NKt=i8(),UKt=n8(),nKe=XV(),VKt=C$(),GKt=Y7(),HKt=hG();aKe.exports=function(t,r){var n=r._carpetTrace=GKt(t,r);if(!(!n||!n.visible||n.visible===\"legendonly\")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),VKt(a,r,r._defaultColor,t._fullLayout)}var o=jKt(t,r);return HKt(r,r._z),o}};function jKt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,iKe.isArray1D(t.z)&&qKt(t,n,i,\"a\",\"b\",[\"z\"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,\"_a\"):[],l=l?i.makeCalcdata(t,\"_b\"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=BKt(t._z||t.z,t.transpose),t._emptypoints=UKt(f),NKt(f,t._emptypoints);var h=iKe.maxRowLength(f),d=t.xtype===\"scaled\"?\"\":a,v=nKe(t,d,o,s,h,n),x=t.ytype===\"scaled\"?\"\":l,b=nKe(t,x,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type===\"levels\"&&t.contours.coloring!==\"none\"&&OKt(e,t,{vals:f,containerStr:\"\",cLetter:\"z\"}),[p]}});var lKe=ye((d2r,sKe)=>{\"use strict\";var WKt=Dr().isArrayOrTypedArray;sKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,p=WKt(r)?\"a\":\"b\",C=p===\"a\"?e.aaxis:e.baxis,E=C.smoothing,A=p===\"a\"?e.a2i:e.b2j,L=p===\"a\"?r:n,_=p===\"a\"?n:r,k=p===\"a\"?t.a.length:t.b.length,M=p===\"a\"?t.b.length:t.a.length,g=Math.floor(p===\"a\"?e.b2j(_):e.a2i(_)),P=p===\"a\"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};E&&(o=Math.max(0,Math.min(M-2,g)),s=g-o,a=p===\"a\"?function(_e,Me){return e.dxydi([],_e,o,Me,s)}:function(_e,Me){return e.dxydj([],o,_e,s,Me)});var T=A(L[0]),z=A(L[1]),O=T<z?1:-1,V=(z-T)*1e-8,G=O>0?Math.floor:Math.ceil,Z=O>0?Math.ceil:Math.floor,H=O>0?Math.min:Math.max,N=O>0?Math.max:Math.min,j=G(T+V),re=Z(z-V);c=P(T);var oe=[[c]];for(i=j;i*O<re*O;i+=O)l=[],v=N(T,i),x=H(z,i+O),b=x-v,u=Math.max(0,Math.min(k-2,Math.floor(.5*(v+x)))),f=P(x),E&&(h=a(u,v-u),d=a(u,x-u),l.push([c[0]+h[0]/3*b,c[1]+h[1]/3*b]),l.push([f[0]-d[0]/3*b,f[1]-d[1]/3*b])),l.push(f),oe.push(l),c=f;return oe}});var pKe=ye((v2r,vKe)=>{\"use strict\";var J7=Oa(),$7=w$(),dKe=T$(),ok=So(),m1=Dr(),XKt=vG(),ZKt=pG(),hw=S8(),K7=k4(),YKt=_G(),KKt=yG(),JKt=xG(),$Kt=Y7(),uKe=lKe();vKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,\"contour\").each(function(s){var l=J7.select(this),u=s[0],c=u.trace,f=c._carpetTrace=$Kt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible===\"legendonly\")return;var d=u.a,v=u.b,x=c.contours,b=KKt(x,r,u),p=x.type===\"constraint\",C=x._operation,E=p?C===\"=\"?\"lines\":\"fill\":x.coloring;function A(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];XKt(b);var _=(d[d.length-1]-d[0])*1e-8,k=(v[v.length-1]-v[0])*1e-8;ZKt(b,_,k);var M=b;x.type===\"constraint\"&&(M=YKt(b,C)),QKt(b,A);var g,P,T,z,O=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=$7([],g.x,a.c2p),T=$7([],g.y,o.c2p),P.reverse(),T.reverse(),O.push(dKe(P,T,g.bicubic));var V=\"M\"+O.join(\"L\")+\"Z\";rJt(l,h.clipsegments,a,o,p,E),iJt(c,l,a,o,M,L,A,f,h,E,V),eJt(l,b,t,u,x,r,f),ok.setClipUrl(l,f._clipPathId,t)})};function QKt(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;r<e.length;r++){for(a=e[r],o=a.pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(c=a.edgepaths[n],l=[],i=0;i<c.length;i++)l[i]=t(c[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(c=a.paths[n],u=[],i=0;i<c.length;i++)u[i]=t(c[i]);s.push(u)}}}function eJt(e,t,r,n,i,a,o){var s=r._context.staticPlot,l=m1.ensureSingle(e,\"g\",\"contourlines\"),u=i.showlines!==!1,c=i.showlabels,f=u&&c,h=hw.createLines(l,u||c,t,s),d=hw.createLineClip(l,f,r,n.trace.uid),v=e.selectAll(\"g.contourlabels\").data(c?[0]:[]);if(v.exit().remove(),v.enter().append(\"g\").classed(\"contourlabels\",!0),c){var x=a.xaxis,b=a.yaxis,p=x._length,C=b._length,E=[[[0,0],[p,0],[p,C],[0,C]]],A=[];m1.clearLocationCache();var L=hw.labelFormatter(r,n),_=ok.tester.append(\"text\").attr(\"data-notex\",1).call(ok.font,i.labelfont),k={left:0,right:p,center:p/2,top:0,bottom:C,middle:C/2},M=Math.sqrt(p*p+C*C),g=K7.LABELDISTANCE*M/Math.max(1,t.length/K7.LABELINCREASE);h.each(function(P){var T=hw.calcTextOpts(P.level,L,_,r);J7.select(this).selectAll(\"path\").each(function(z){var O=this,V=m1.getVisibleSegment(O,k,T.height/2);if(V&&(tJt(O,z,P,V,o,T.height),!(V.len<(T.width+T.height)*K7.LABELMIN)))for(var G=Math.min(Math.ceil(V.len/g),K7.LABELMAX),Z=0;Z<G;Z++){var H=hw.findBestTextLocation(O,V,T,A,k);if(!H)break;hw.addLabelData(H,T,A,E)}})}),_.remove(),hw.drawLabels(v,A,r,d,f?E:null)}c&&!u&&h.remove()}function tJt(e,t,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)t===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],u=i.a[i.a.length-1],c=i.b[0],f=i.b[i.b.length-1];function h(p,C){var E=0,A,L=.1;return(Math.abs(p[0]-l)<L||Math.abs(p[0]-u)<L)&&(A=fKe(i.dxydb_rough(p[0],p[1],L)),E=Math.max(E,a*hKe(C,A)/2)),(Math.abs(p[1]-c)<L||Math.abs(p[1]-f)<L)&&(A=fKe(i.dxyda_rough(p[0],p[1],L)),E=Math.max(E,a*hKe(C,A)/2)),E}var d=cKe(e,0,1),v=cKe(e,n.total,n.total-1),x=h(o[0],d),b=n.total-h(o[o.length-1],v);n.min<x&&(n.min=x),n.max>b&&(n.max=b),n.len=n.max-n.min}function cKe(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function fKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function hKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function rJt(e,t,r,n,i,a){var o,s,l,u,c=m1.ensureSingle(e,\"g\",\"contourbg\"),f=c.selectAll(\"path\").data(a===\"fill\"&&!i?[0]:[]);f.enter().append(\"path\"),f.exit().remove();var h=[];for(u=0;u<t.length;u++)o=t[u],s=$7([],o.x,r.c2p),l=$7([],o.y,n.c2p),h.push(dKe(s,l,o.bicubic));f.attr(\"d\",\"M\"+h.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}function iJt(e,t,r,n,i,a,o,s,l,u,c){var f=u===\"fill\";f&&JKt(i,e.contours);var h=m1.ensureSingle(t,\"g\",\"contourfill\"),d=h.selectAll(\"path\").data(f?i:[]);d.enter().append(\"path\"),d.exit().remove(),d.each(function(v){var x=(v.prefixBoundary?c:\"\")+nJt(e,v,a,o,s,l,r,n);x?J7.select(this).attr(\"d\",x).style(\"stroke\",\"none\"):J7.select(this).remove()})}function nJt(e,t,r,n,i,a,o,s){var l,u=\"\",c=t.edgepaths.map(function(T,z){return z}),f=!0,h,d,v,x,b,p,C=Math.abs(r[0][0]-r[2][0])*1e-4,E=Math.abs(r[0][1]-r[2][1])*1e-4;function A(T){return Math.abs(T[1]-r[0][1])<E}function L(T){return Math.abs(T[1]-r[2][1])<E}function _(T){return Math.abs(T[0]-r[0][0])<C}function k(T){return Math.abs(T[0]-r[2][0])<C}function M(T,z){var O,V,G,Z,H=\"\";for(A(T)&&!k(T)||L(T)&&!_(T)?(Z=i.aaxis,G=uKe(i,a,[T[0],z[0]],.5*(T[1]+z[1]))):(Z=i.baxis,G=uKe(i,a,.5*(T[0]+z[0]),[T[1],z[1]])),O=1;O<G.length;O++)for(H+=Z.smoothing?\"C\":\"L\",V=0;V<G[O].length;V++){var N=G[O][V];H+=[o.c2p(N[0]),s.c2p(N[1])]+\" \"}return H}for(l=0,h=null;c.length;){var g=t.edgepaths[l][0];for(h&&(u+=M(h,g)),p=ok.smoothopen(t.edgepaths[l].map(n),t.smoothing),u+=f?p:p.replace(/^M/,\"L\"),c.splice(c.indexOf(l),1),h=t.edgepaths[l][t.edgepaths[l].length-1],x=-1,v=0;v<4;v++){if(!h){m1.log(\"Missing end?\",l,t);break}for(A(h)&&!k(h)?d=r[1]:_(h)?d=r[0]:L(h)?d=r[3]:k(h)&&(d=r[2]),b=0;b<t.edgepaths.length;b++){var P=t.edgepaths[b][0];Math.abs(h[0]-d[0])<C?Math.abs(h[0]-P[0])<C&&(P[1]-h[1])*(d[1]-P[1])>=0&&(d=P,x=b):Math.abs(h[1]-d[1])<E?Math.abs(h[1]-P[1])<E&&(P[0]-h[0])*(d[0]-P[0])>=0&&(d=P,x=b):m1.log(\"endpt to newendpt is not vert. or horz.\",h,d,P)}if(x>=0)break;u+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log(\"unclosed perimeter path\");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+\"Z\",h=null)}for(l=0;l<t.paths.length;l++)u+=ok.smoothclosed(t.paths[l].map(n),t.smoothing);return u}});var mKe=ye((p2r,gKe)=>{\"use strict\";gKe.exports={attributes:E$(),supplyDefaults:C$(),colorbar:C8(),calc:oKe(),plot:pKe(),style:E8(),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}});var _Ke=ye((g2r,yKe)=>{\"use strict\";yKe.exports=mKe()});var e9=ye((m2r,AKe)=>{\"use strict\";var Q7=Dr().extendFlat,sk=pf(),xKe=df().axisHoverFormat,wKe=Pd().dash,aJt=i3(),TKe=GT(),oJt=TKe.INCREASING.COLOR,sJt=TKe.DECREASING.COLOR,k$=sk.line;function bKe(e){return{line:{color:Q7({},k$.color,{dflt:e}),width:k$.width,dash:wKe,editType:\"style\"},editType:\"style\"}}AKe.exports={xperiod:sk.xperiod,xperiod0:sk.xperiod0,xperiodalignment:sk.xperiodalignment,xhoverformat:xKe(\"x\"),yhoverformat:xKe(\"y\"),x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},open:{valType:\"data_array\",editType:\"calc\"},high:{valType:\"data_array\",editType:\"calc\"},low:{valType:\"data_array\",editType:\"calc\"},close:{valType:\"data_array\",editType:\"calc\"},line:{width:Q7({},k$.width,{}),dash:Q7({},wKe,{}),editType:\"style\"},increasing:bKe(oJt),decreasing:bKe(sJt),text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},tickwidth:{valType:\"number\",min:0,max:.5,dflt:.3,editType:\"calc\"},hoverlabel:Q7({},aJt.hoverlabel,{split:{valType:\"boolean\",dflt:!1,editType:\"style\"}}),zorder:sk.zorder}});var L$=ye((y2r,SKe)=>{\"use strict\";var lJt=qa(),uJt=Dr();SKe.exports=function(t,r,n,i){var a=n(\"x\"),o=n(\"open\"),s=n(\"high\"),l=n(\"low\"),u=n(\"close\");n(\"hoverlabel.split\");var c=lJt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");if(c(t,r,[\"x\"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,uJt.minRowLength(a))),r._length=f,f}}});var CKe=ye((_2r,EKe)=>{\"use strict\";var cJt=Dr(),fJt=L$(),hJt=Pg(),dJt=e9();EKe.exports=function(t,r,n,i){function a(s,l){return cJt.coerce(t,r,dJt,s,l)}var o=fJt(t,r,a,i);if(!o){r.visible=!1;return}hJt(t,r,i,a,{x:!0}),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"line.width\"),a(\"line.dash\"),MKe(t,r,a,\"increasing\"),MKe(t,r,a,\"decreasing\"),a(\"text\"),a(\"hovertext\"),a(\"tickwidth\"),i._requestRangeslider[r.xaxis]=!0,a(\"zorder\")};function MKe(e,t,r,n){r(n+\".line.color\"),r(n+\".line.width\",t.line.width),r(n+\".line.dash\",t.line.dash)}});var P$=ye((x2r,LKe)=>{\"use strict\";var N5=Dr(),t9=N5._,r9=ho(),vJt=Rg(),lk=hs().BADNUM;function pJt(e,t){var r=r9.getFromId(e,t.xaxis),n=r9.getFromId(e,t.yaxis),i=mJt(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=kKe(e,t,o,s,n,gJt);return t._extremes[r._id]=r9.findExtremes(r,s,{vpad:a/2}),l.length?(N5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function gJt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function kKe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,\"open\"),s=i.makeCalcdata(t,\"high\"),l=i.makeCalcdata(t,\"low\"),u=i.makeCalcdata(t,\"close\"),c=N5.isArrayOrTypedArray(t.text),f=N5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,x=[],b=0;b<n.length;b++){var p=n[b],C=o[b],E=s[b],A=l[b],L=u[b];if(p!==lk&&C!==lk&&E!==lk&&A!==lk&&L!==lk){L===C?d!==null&&L!==d&&(h=L>d):h=L>C,d=L;var _=a(C,E,A,L);_.pos=p,_.yc=(C+L)/2,_.i=b,_.dir=h?\"increasing\":\"decreasing\",_.x=_.pos,_.y=[A,E],v&&(_.orig_p=r[b]),c&&(_.tx=t.text[b]),f&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:p,empty:!0})}return t._extremes[i._id]=r9.findExtremes(i,N5.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:t9(e,\"open:\")+\" \",high:t9(e,\"high:\")+\" \",low:t9(e,\"low:\")+\" \",close:t9(e,\"close:\")+\" \"}}),x}function mJt(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o<i.length;o++){var s=i[o];if(s.type===\"ohlc\"&&s.visible===!0&&s.xaxis===t._id){a.push(s);var l=t.makeCalcdata(s,\"x\");s._origX=l;var u=vJt(r,t,\"x\",l).vals;s._xcalc=u;var c=N5.distinctVals(u).minDiff;c&&isFinite(c)&&(n=Math.min(n,c))}}for(n===1/0&&(n=1),o=0;o<a.length;o++)a[o]._minDiff=n}return n*r.tickwidth}LKe.exports={calc:pJt,calcCommon:kKe}});var RKe=ye((b2r,IKe)=>{\"use strict\";var yJt=Oa(),PKe=Dr();IKe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;PKe.makeTraceGroups(i,n,\"trace ohlc\").each(function(l){var u=yJt.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll(\"path\").data(PKe.identity);v.enter().append(\"path\"),v.exit().remove(),v.attr(\"d\",function(x){if(x.empty)return\"M0,0Z\";var b=o.c2p(x.pos-d,!0),p=o.c2p(x.pos+d,!0),C=s?(b+p)/2:o.c2p(x.pos,!0),E=a.c2p(x.o,!0),A=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return\"M\"+b+\",\"+E+\"H\"+C+\"M\"+C+\",\"+A+\"V\"+L+\"M\"+p+\",\"+_+\"H\"+C})})}});var FKe=ye((w2r,DKe)=>{\"use strict\";var I$=Oa(),_Jt=So(),xJt=Ca();DKe.exports=function(t,r,n){var i=n||I$.select(t).selectAll(\"g.ohlclayer\").selectAll(\"g.trace\");i.style(\"opacity\",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;I$.select(this).selectAll(\"path\").each(function(s){if(!s.empty){var l=o[s.dir].line;I$.select(this).style(\"fill\",\"none\").call(xJt.stroke,l.color).call(_Jt.dashLine,l.dash,l.width).style(\"opacity\",o.selectedpoints&&!s.selected?.3:1)}})})}});var D$=ye((T2r,NKe)=>{\"use strict\";var R$=ho(),bJt=Dr(),i9=vf(),wJt=Ca(),TJt=Dr().fillText,zKe=GT(),AJt={increasing:zKe.INCREASING.SYMBOL,decreasing:zKe.DECREASING.SYMBOL};function SJt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?qKe(e,t,r,n):BKe(e,t,r,n)}function OKe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l===\"ohlc\"?\"l\":\"min\",c=l===\"ohlc\"?\"h\":\"max\",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},x=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function C(P){var T=v(P);return i9.inbox(T-b,T+b,f)}function E(P){var T=P[u],z=P[c];return T===z||i9.inbox(T-r,z-r,f)}function A(P){return(C(P)+E(P))/2}var L=i9.getDistanceFunction(n,C,E,A);if(i9.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var k=_.dir,M=o[k],g=M.line.color;return wJt.opacity(g)&&M.line.width?e.color=g:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=A(_)*h/f,e.xSpike=a.c2p(_.pos,!0),e}function qKe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=OKe(e,t,r,n);if(!u)return[];var c=u.index,f=i[c],h=f.hi||o.hoverinfo,d=h.split(\"+\"),v=h===\"all\",x=v||d.indexOf(\"y\")!==-1;if(!x)return[];for(var b=[\"high\",\"open\",\"close\",\"low\"],p={},C=0;C<b.length;C++){var E=b[C],A=o[E][u.index],L=a.c2p(A,!0),_;A in p?(_=p[A],_.yLabel+=\"<br>\"+s.labels[E]+R$.hoverLabelText(a,A,o.yhoverformat)):(_=bJt.extendFlat({},u),_.y0=_.y1=L,_.yLabelVal=A,_.yLabel=s.labels[E]+R$.hoverLabelText(a,A,o.yhoverformat),_.name=\"\",l.push(_),p[A]=_)}return l}function BKe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=OKe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(A){return s.labels[A]+R$.hoverLabelText(a,o[A][f],o.yhoverformat)}var v=c.hi||o.hoverinfo,x=v.split(\"+\"),b=v===\"all\",p=b||x.indexOf(\"y\")!==-1,C=b||x.indexOf(\"text\")!==-1,E=p?[d(\"open\"),d(\"high\"),d(\"low\"),d(\"close\")+\"  \"+AJt[h]]:[];return C&&TJt(c,o,E),l.extraText=E.join(\"<br>\"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}NKe.exports={hoverPoints:SJt,hoverSplit:qKe,hoverOnPoints:BKe}});var F$=ye((A2r,UKe)=>{\"use strict\";UKe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++){var u=n[s];r.contains([i.c2p(u.pos+l),a.c2p(u.yc)],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.pos),y:a.c2d(u.yc)}),u.selected=1):u.selected=0}return o}});var GKe=ye((S2r,VKe)=>{\"use strict\";VKe.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"showLegend\"],meta:{},attributes:e9(),supplyDefaults:CKe(),calc:P$().calc,plot:RKe(),style:FKe(),hoverPoints:D$().hoverPoints,selectPoints:F$()}});var jKe=ye((M2r,HKe)=>{\"use strict\";HKe.exports=GKe()});var O$=ye((E2r,ZKe)=>{\"use strict\";var z$=Dr().extendFlat,WKe=df().axisHoverFormat,c0=e9(),U5=y4();function XKe(e){return{line:{color:z$({},U5.line.color,{dflt:e}),width:U5.line.width,editType:\"style\"},fillcolor:U5.fillcolor,editType:\"style\"}}ZKe.exports={xperiod:c0.xperiod,xperiod0:c0.xperiod0,xperiodalignment:c0.xperiodalignment,xhoverformat:WKe(\"x\"),yhoverformat:WKe(\"y\"),x:c0.x,open:c0.open,high:c0.high,low:c0.low,close:c0.close,line:{width:z$({},U5.line.width,{}),editType:\"style\"},increasing:XKe(c0.increasing.line.color.dflt),decreasing:XKe(c0.decreasing.line.color.dflt),text:c0.text,hovertext:c0.hovertext,whiskerwidth:z$({},U5.whiskerwidth,{dflt:0}),hoverlabel:c0.hoverlabel,zorder:U5.zorder}});var JKe=ye((C2r,KKe)=>{\"use strict\";var MJt=Dr(),EJt=Ca(),CJt=L$(),kJt=Pg(),LJt=O$();KKe.exports=function(t,r,n,i){function a(s,l){return MJt.coerce(t,r,LJt,s,l)}var o=CJt(t,r,a,i);if(!o){r.visible=!1;return}kJt(t,r,i,a,{x:!0}),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"line.width\"),YKe(t,r,a,\"increasing\"),YKe(t,r,a,\"decreasing\"),a(\"text\"),a(\"hovertext\"),a(\"whiskerwidth\"),i._requestRangeslider[r.xaxis]=!0,a(\"zorder\")};function YKe(e,t,r,n){var i=r(n+\".line.color\");r(n+\".line.width\",t.line.width),r(n+\".fillcolor\",EJt.addOpacity(i,.5))}});var tJe=ye((k2r,eJe)=>{\"use strict\";var $Ke=Dr(),QKe=ho(),PJt=Rg(),IJt=P$().calcCommon;eJe.exports=function(e,t){var r=e._fullLayout,n=QKe.getFromId(e,t.xaxis),i=QKe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,\"x\"),o=PJt(t,n,\"x\",a).vals,s=IJt(e,t,a,o,i,RJt);return s.length?($Ke.extendFlat(s[0].t,{num:r._numBoxes,dPos:$Ke.distinctVals(o).minDiff/2,posLetter:\"x\",valLetter:\"y\"}),r._numBoxes++,s):[{t:{empty:!0}}]};function RJt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var iJe=ye((L2r,rJe)=>{\"use strict\";rJe.exports={moduleType:\"trace\",name:\"candlestick\",basePlotModule:vh(),categories:[\"cartesian\",\"svg\",\"showLegend\",\"candlestick\",\"boxLayout\"],meta:{},attributes:O$(),layoutAttributes:_4(),supplyLayoutDefaults:jI().supplyLayoutDefaults,crossTraceCalc:XI().crossTraceCalc,supplyDefaults:JKe(),calc:tJe(),plot:ZI().plot,layerName:\"boxlayer\",style:YI().style,hoverPoints:D$().hoverPoints,selectPoints:F$()}});var aJe=ye((P2r,nJe)=>{\"use strict\";nJe.exports=iJe()});var B$=ye((I2r,oJe)=>{\"use strict\";var a9=Dr(),DJt=ym(),n9=a9.deg2rad,q$=a9.rad2deg;oJe.exports=function(t,r,n){switch(DJt(t,n),t._id){case\"x\":case\"radialaxis\":FJt(t,r);break;case\"angularaxis\":qJt(t,r);break}};function FJt(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function zJt(e,t){return t===\"degrees\"?n9(e):e}function OJt(e,t){return t===\"degrees\"?q$(e):e}function qJt(e,t){var r=e.type;if(r===\"linear\"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return zJt(n(a),o)},e.c2d=function(a,o){return i(OJt(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c<l;c++)u[c]=f(s[c]);else{var h=o+\"0\",d=\"d\"+o,v=h in a?f(a[h]):0,x=a[d]?f(a[d]):(e.period||2*Math.PI)/l;for(u=new Array(l),c=0;c<l;c++)u[c]=v+c*x}return u},e.setGeometry=function(){var a=t.sector,o=a.map(n9),s={clockwise:-1,counterclockwise:1}[e.direction],l=n9(e.rotation),u=function(p){return s*p+l},c=function(p){return(p-l)/s},f,h,d,v;switch(r){case\"linear\":h=f=a9.identity,v=n9,d=q$,e.range=a9.isFullCircle(o)?[a[0],a[0]+360]:o.map(c).map(q$);break;case\"category\":var x=e._categories.length,b=e.period?Math.max(e.period,x):x;b===0&&(b=1),h=v=function(p){return p*2*Math.PI/b},f=d=function(p){return p*b/Math.PI/2},e.range=[0,b];break}e.c2g=function(p){return u(h(p))},e.g2c=function(p){return f(c(p))},e.t2g=function(p){return u(v(p))},e.g2t=function(p){return d(c(p))}}}});var o9=ye((R2r,sJe)=>{\"use strict\";sJe.exports={attr:\"subplot\",name:\"polar\",axisNames:[\"angularaxis\",\"radialaxis\"],axisName2dataArray:{angularaxis:\"theta\",radialaxis:\"r\"},layerNames:[\"draglayer\",\"plotbg\",\"backplot\",\"angular-grid\",\"radial-grid\",\"frontplot\",\"angular-line\",\"radial-line\",\"angular-axis\",\"radial-axis\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var l9=ye((D2r,hJe)=>{\"use strict\";var dw=Dr(),lJe=MM().tester,N$=dw.findIndexOfMin,cJe=dw.isAngleInsideSector,BJt=dw.angleDelta,uJe=dw.angleDist;function NJt(e,t,r,n,i){if(!cJe(t,n))return!1;var a,o;r[0]<r[1]?(a=r[0],o=r[1]):(a=r[1],o=r[0]);var s=lJe(V5(a,n[0],n[1],i)),l=lJe(V5(o,n[0],n[1],i)),u=[e*Math.cos(t),e*Math.sin(t)];return l.contains(u)&&!s.contains(u)}function fJe(e,t,r,n){var i,a,o=n[0],s=n[1],l=s9(Math.sin(t)-Math.sin(e)),u=s9(Math.cos(t)-Math.cos(e)),c=Math.tan(r),f=s9(1/c),h=l/u,d=s-h*o;return f?l&&u?(i=d/(c-h),a=c*i):u?(i=s*f,a=s):(i=o,a=o*c):l&&u?(i=0,a=d):u?(i=0,a=s):i=a=NaN,[i,a]}function UJt(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,t*u+i+n],[c,t*c+i+n]]}function VJt(e,t){var r=t.length,n=new Array(r+1),i;for(i=0;i<r;i++){var a=t[i];n[i]=[e*Math.cos(a),e*Math.sin(a)]}return n[i]=n[0].slice(),n}function GJt(e,t,r,n){var i=n.length,a=[],o,s;function l(p){return[e*Math.cos(p),e*Math.sin(p)]}function u(p,C,E){return fJe(p,C,E,l(p))}function c(p){return dw.mod(p,i)}function f(p){return cJe(p,[t,r])}var h=N$(n,function(p){return f(p)?uJe(p,t):1/0}),d=u(n[h],n[c(h-1)],t);for(a.push(d),o=h,s=0;s<i;o++,s++){var v=n[c(o)];if(!f(v))break;a.push(l(v))}var x=N$(n,function(p){return f(p)?uJe(p,r):1/0}),b=u(n[x],n[c(x+1)],r);return a.push(b),a.push([0,0]),a.push(a[0].slice()),a}function V5(e,t,r,n){return dw.isFullCircle([t,r])?VJt(e,n):GJt(e,t,r,n)}function HJt(e,t,r,n){for(var i=1/0,a=1/0,o=V5(e,t,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]}function jJt(e,t){var r=function(a){var o=BJt(a,e);return o>0?o:1/0},n=N$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function s9(e){return Math.abs(e)>1e-10?e:0}function U$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a<n;a++){var o=e[a];i[a]=[t+o[0],r-o[1]]}return i}function WJt(e,t,r,n,i,a){var o=V5(e,t,r,n);return\"M\"+U$(o,i,a).join(\"L\")}function XJt(e,t,r,n,i,a,o){var s,l;e<t?(s=e,l=t):(s=t,l=e);var u=U$(V5(s,r,n,i),a,o),c=U$(V5(l,r,n,i),a,o);return\"M\"+c.reverse().join(\"L\")+\"M\"+u.join(\"L\")}hJe.exports={isPtInsidePolygon:NJt,findPolygonOffset:HJt,findEnclosingVertexAngles:jJt,findIntersectionXY:fJe,findXYatLength:UJt,clampTiny:s9,pathPolygon:WJt,pathPolygonAnnulus:XJt}});var V$=ye((F2r,pJe)=>{\"use strict\";function dJe(e){return e<0?-1:e>0?1:0}function G5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function H5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function vJe(e,t){return t*e.radius}function ZJt(e,t,r,n){var i=H5(e,G5([r,t])),a=i[0],o=i[1],s=H5(e,G5([n,t])),l=s[0],u=s[1];if(t===0)return[\"M\"+a+\",\"+o,\"L\"+l+\",\"+u].join(\" \");var c=vJe(e,1/Math.abs(t));return[\"M\"+a+\",\"+o,\"A\"+c+\",\"+c+\" 0 0,\"+(t<0?1:0)+\" \"+l+\",\"+u].join(\" \")}function YJt(e,t,r,n){var i=vJe(e,1/(t+1)),a=H5(e,G5([t,r])),o=a[0],s=a[1],l=H5(e,G5([t,n])),u=l[0],c=l[1];if(dJe(r)!==dJe(n)){var f=H5(e,G5([t,0])),h=f[0],d=f[1];return[\"M\"+o+\",\"+s,\"A\"+i+\",\"+i+\" 0 0,\"+(0<r?0:1)+\" \"+h+\",\"+d,\"A\"+i+\",\"+i+\" 0 0,\"+(n<0?0:1)+u+\",\"+c].join(\" \")}return[\"M\"+o+\",\"+s,\"A\"+i+\",\"+i+\" 0 0,\"+(n<r?0:1)+\" \"+u+\",\"+c].join(\" \")}pJe.exports={smith:G5,reactanceArc:ZJt,resistanceArc:YJt,smithTransform:H5}});var j$=ye((z2r,AJe)=>{\"use strict\";var vw=Oa(),KJt=cd(),gw=qa(),Xc=Dr(),ry=Xc.strRotate,xd=Xc.strTranslate,G$=Ca(),uk=So(),JJt=Mc(),hp=ho(),$Jt=ym(),QJt=B$(),e$t=wg().doAutoRange,y1=qN(),f9=yv(),gJe=vf(),t$t=Mb(),r$t=zf().prepSelect,i$t=zf().selectOnClick,H$=zf().clearOutline,mJe=Tg(),yJe=hM(),_Je=xM().redrawReglTraces,n$t=Kh().MID_SHIFT,kx=o9(),_1=l9(),h9=V$(),u9=h9.smith,a$t=h9.reactanceArc,o$t=h9.resistanceArc,c9=h9.smithTransform,s$t=Xc._,xJe=Xc.mod,Lx=Xc.deg2rad,pw=Xc.rad2deg;function bJe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i=\"clip\"+n._uid+t;this.clipIds.forTraces=i+\"-for-traces\",this.clipPaths.forTraces=n._clips.append(\"clipPath\").attr(\"id\",this.clipIds.forTraces),this.clipPaths.forTraces.append(\"path\"),this.framework=n[\"_\"+(r?\"smith\":\"polar\")+\"layer\"].append(\"g\").attr(\"class\",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Nd=bJe.prototype;AJe.exports=function(t,r,n){return new bJe(t,r,n)};Nd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){i=!0;break}}r._hasClipOnAxisFalse=i,r.updateLayers(t,n),r.updateLayout(t,n),JJt.generalUpdatePerTraceModule(r.gd,r,e,n),r.updateFx(t,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)};Nd.updateLayers=function(e,t){var r=this,n=r.isSmith,i=r.layers,a=r.getRadial(t),o=r.getAngular(t),s=kx.layerNames,l=s.indexOf(\"frontplot\"),u=s.slice(0,l),c=o.layer===\"below traces\",f=a.layer===\"below traces\";c&&u.push(\"angular-line\"),f&&u.push(\"radial-line\"),c&&u.push(\"angular-axis\"),f&&u.push(\"radial-axis\"),u.push(\"frontplot\"),c||u.push(\"angular-line\"),f||u.push(\"radial-line\"),c||u.push(\"angular-axis\"),f||u.push(\"radial-axis\");var h=(n?\"smith\":\"polar\")+\"sublayer\",d=r.framework.selectAll(\".\"+h).data(u,String);d.enter().append(\"g\").attr(\"class\",function(v){return h+\" \"+v}).each(function(v){var x=i[v]=vw.select(this);switch(v){case\"frontplot\":n||x.append(\"g\").classed(\"barlayer\",!0),x.append(\"g\").classed(\"scatterlayer\",!0);break;case\"backplot\":x.append(\"g\").classed(\"maplayer\",!0);break;case\"plotbg\":i.bg=x.append(\"path\");break;case\"radial-grid\":x.style(\"fill\",\"none\");break;case\"angular-grid\":x.style(\"fill\",\"none\");break;case\"radial-line\":x.append(\"line\").style(\"fill\",\"none\");break;case\"angular-line\":x.append(\"path\").style(\"fill\",\"none\");break}}),d.order()};Nd.updateLayout=function(e,t){var r=this,n=r.layers,i=e._size,a=r.getRadial(t),o=r.getAngular(t),s=t.domain.x,l=t.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-l[1]);var u=r.xLength=i.w*(s[1]-s[0]),c=r.yLength=i.h*(l[1]-l[0]),f=r.getSector(t);r.sectorInRad=f.map(Lx);var h=r.sectorBBox=l$t(f),d=h[2]-h[0],v=h[3]-h[1],x=c/u,b=Math.abs(v/d),p,C,E,A,L;x>b?(p=u,C=u*b,L=(c-C)/i.h/2,E=[s[0],s[1]],A=[l[0]+L,l[1]-L]):(p=c/b,C=c,L=(u-p)/i.w/2,E=[s[0]+L,s[1]-L],A=[l[0],l[1]]),r.xLength2=p,r.yLength2=C,r.xDomain2=E,r.yDomain2=A;var _=r.xOffset2=i.l+i.w*E[0],k=r.yOffset2=i.t+i.h*(1-A[1]),M=r.radius=p/d,g=r.innerRadius=r.getHole(t)*M,P=r.cx=_-M*h[0],T=r.cy=k+M*h[3],z=r.cxx=P-_,O=r.cyy=T-k,V=a.side,G;V===\"counterclockwise\"?(G=V,V=\"top\"):V===\"clockwise\"&&(G=V,V=\"bottom\"),r.radialAxis=r.mockAxis(e,t,a,{_id:\"x\",side:V,_trueSide:G,domain:[g/i.w,M/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:\"right\",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:\"x\",domain:E}),r.yaxis=r.mockCartesianAxis(e,t,{_id:\"y\",domain:A});var Z=r.pathSubplot();r.clipPaths.forTraces.select(\"path\").attr(\"d\",Z).attr(\"transform\",xd(z,O)),n.frontplot.attr(\"transform\",xd(_,k)).call(uk.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr(\"d\",Z).attr(\"transform\",xd(P,T)).call(G$.fill,t.bgcolor)};Nd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return QJt(i,t,e),i};Nd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:\"linear\"},r);$Jt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a===\"x\"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Nd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);e$t(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,\"gregorian\"),i.r2l(o[1],null,\"gregorian\")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]<i._rl[1]?i._rl[1]=Math.min(i._rl[1],l):i._rl[0]=Math.min(i._rl[0],l)}};Nd.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getRadial(t),c=xJe(r.getSector(t)[0],360),f=r.radialAxis,h=o<a,d=r.isSmith;d||(r.fillViewInitialKey(\"radialaxis.angle\",u.angle),r.fillViewInitialKey(\"radialaxis.range\",f.range.slice()),f.setGeometry()),f.tickangle===\"auto\"&&c>90&&c<=270&&(f.tickangle=180);var v=d?function(M){var g=c9(r,u9([M.x,0]));return xd(g[0]-s,g[1]-l)}:function(M){return xd(f.l2p(M.x)+o,0)},x=d?function(M){return o$t(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=wJe(u);if(r.radialTickLayout!==b&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,C=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return hp.tickText(f,M,!0,!1)}):hp.calcTicks(f),E=d?C:hp.clipEnds(f,C),A=hp.getTickSigns(f)[2];d&&((f.ticks===\"top\"&&f.side===\"bottom\"||f.ticks===\"bottom\"&&f.side===\"top\")&&(A=-A),f.ticks===\"top\"&&f.side===\"top\"&&(p=-f.ticklen),f.ticks===\"bottom\"&&f.side===\"bottom\"&&(p=f.ticklen)),hp.drawTicks(n,f,{vals:C,layer:i[\"radial-axis\"],path:hp.makeTickPath(f,0,A),transFn:v,crisp:!1}),hp.drawGrid(n,f,{vals:E,layer:i[\"radial-grid\"],path:x,transFn:Xc.noop,crisp:!1}),hp.drawLabels(n,f,{vals:C,layer:i[\"radial-axis\"],transFn:v,labelFns:hp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?pw(TJe(Lx(u.angle),r.vangles)):u.angle,_=xd(s,l),k=_+ry(-L);ck(i[\"radial-axis\"],h&&(u.showticklabels||u.ticks),{transform:k}),ck(i[\"radial-grid\"],h&&u.showgrid,{transform:d?\"\":_}),ck(i[\"radial-line\"].select(\"line\"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:k}).attr(\"stroke-width\",u.linewidth).call(G$.stroke,u.linecolor)};Nd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+\"title\",c=0;if(l.title){var f=uk.bBox(n.layers[\"radial-axis\"].node()).height,h=l.title.font.size,d=l.side;c=d===\"top\"?h:d===\"counterclockwise\"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,x=Lx(v),b=Math.cos(x),p=Math.sin(x),C=o+a/2*b+c*p,E=s-a/2*p+c*b;n.layers[\"radial-axis-title\"]=t$t.draw(i,u,{propContainer:l,propName:n.id+\".radialaxis.title\",placeholder:s$t(i,\"Click to enter radial axis title\"),attributes:{x:C,y:E,\"text-anchor\":\"middle\"},transform:{rotate:-v}})}};Nd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey(\"angularaxis.rotation\",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=c9(r,u9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type===\"linear\"&&c.thetaunit===\"radians\"&&(c.tick0=pw(c.tick0),c.dtick=pw(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=c9(r,u9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},x=f?function(g){var P=c9(r,u9([0,g.x])),T=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+ry(-pw(T))}:function(g){var P=h(g);return d(P)+ry(-pw(P))},b=f?function(g){return a$t(r,g.x,0,1/0)}:function(g){var P=h(g),T=Math.cos(P),z=Math.sin(P);return\"M\"+[s+o*T,l-o*z]+\"L\"+[s+a*T,l-a*z]},p=hp.makeLabelFns(c,0),C=p.labelStandoff,E={};E.xFn=function(g){var P=h(g);return Math.cos(P)*C},E.yFn=function(g){var P=h(g),T=Math.sin(P)>0?.2:1;return-Math.sin(P)*(C+g.fontSize*T)+Math.abs(Math.cos(P))*(g.fontSize*n$t)},E.anchorFn=function(g){var P=h(g),T=Math.cos(P);return Math.abs(T)<.1?\"middle\":T>0?\"start\":\"end\"},E.heightFn=function(g,P,T){var z=h(g);return-.5*(1+Math.sin(z))*T};var A=wJe(u);r.angularTickLayout!==A&&(i[\"angular-axis\"].selectAll(\".\"+c._id+\"tick\").remove(),r.angularTickLayout=A);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return hp.tickText(c,g,!0,!1)}):hp.calcTicks(c);f&&(L[0].text=\"\\u221E\",L[0].fontSize*=1.75);var _;if(t.gridshape===\"linear\"?(_=L.map(h),Xc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,c.type===\"category\"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var k=c.ticks===\"inside\"?-1:1,M=(c.linewidth||1)/2;hp.drawTicks(n,c,{vals:L,layer:i[\"angular-axis\"],path:\"M\"+k*M+\",0h\"+k*c.ticklen,transFn:x,crisp:!1}),hp.drawGrid(n,c,{vals:L,layer:i[\"angular-grid\"],path:b,transFn:Xc.noop,crisp:!1}),hp.drawLabels(n,c,{vals:L,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:v,labelFns:E})}ck(i[\"angular-line\"].select(\"path\"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr(\"stroke-width\",u.linewidth).call(G$.stroke,u.linecolor)};Nd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Nd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=kx.MINZOOM,s=kx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,x=t.vangles,b=t.radialAxis,p=_1.clampTiny,C=_1.findXYatLength,E=_1.findEnclosingVertexAngles,A=kx.cornerHalfWidth,L=kx.cornerLen/2,_,k,M=y1.makeDragger(i,\"path\",\"maindrag\",e.dragmode===!1?\"none\":\"crosshair\");vw.select(M).attr(\"d\",t.pathSubplot()).attr(\"transform\",xd(c,f)),M.onmousemove=function(ce){gJe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||f9.unhover(n,ce)};var g={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,T,z,O,V,G,Z,H,N;function j(ce,Ze){return Math.sqrt(ce*ce+Ze*Ze)}function re(ce,Ze){return j(ce-h,Ze-d)}function oe(ce,Ze){return Math.atan2(d-Ze,ce-h)}function _e(ce,Ze){return[ce*Math.cos(Ze),ce*Math.sin(-Ze)]}function Me(ce,Ze){if(ce===0)return t.pathSector(2*A);var ct=L/ce,pt=Ze-ct,Wt=Ze+ct,st=Math.max(0,Math.min(ce,l)),lt=st-A,Gt=st+A;return\"M\"+_e(lt,pt)+\"A\"+[lt,lt]+\" 0,0,0 \"+_e(lt,Wt)+\"L\"+_e(Gt,Wt)+\"A\"+[Gt,Gt]+\" 0,0,1 \"+_e(Gt,pt)+\"Z\"}function ke(ce,Ze,ct){if(ce===0)return t.pathSector(2*A);var pt=_e(ce,Ze),Wt=_e(ce,ct),st=p((pt[0]+Wt[0])/2),lt=p((pt[1]+Wt[1])/2),Gt,Nt;if(st&&lt){var $t=lt/st,sr=-1/$t,wr=C(A,$t,st,lt);Gt=C(L,sr,wr[0][0],wr[0][1]),Nt=C(L,sr,wr[1][0],wr[1][1])}else{var ur,Qe;lt?(ur=L,Qe=A):(ur=A,Qe=L),Gt=[[st-ur,lt-Qe],[st+ur,lt-Qe]],Nt=[[st-ur,lt+Qe],[st+ur,lt+Qe]]}return\"M\"+Gt.join(\"L\")+\"L\"+Nt.reverse().join(\"L\")+\"Z\"}function me(){z=null,O=null,V=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=KJt(ce.bgcolor).getLuminance(),H=y1.makeZoombox(a,Z,c,f,V),H.attr(\"fill-rule\",\"evenodd\"),N=y1.makeCorners(a,c,f),H$(n)}function ie(ce,Ze){return Ze=Math.max(Math.min(Ze,l),u),ce<s?ce=0:l-ce<s?ce=l:Ze<s?Ze=0:l-Ze<s&&(Ze=l),Math.abs(Ze-ce)>o?(ce<Ze?(z=ce,O=Ze):(z=Ze,O=ce),!0):(z=null,O=null,!1)}function Se(ce,Ze){ce=ce||V,Ze=Ze||\"M0,0Z\",H.attr(\"d\",ce),N.attr(\"d\",Ze),y1.transitionZoombox(H,N,G,Z),G=!0;var ct={};ge(ct),n.emit(\"plotly_relayouting\",ct)}function Le(ce,Ze){ce=ce*_,Ze=Ze*k;var ct=P+ce,pt=T+Ze,Wt=re(P,T),st=Math.min(re(ct,pt),l),lt=oe(P,T),Gt,Nt;ie(Wt,st)&&(Gt=V+t.pathSector(O),z&&(Gt+=t.pathSector(z)),Nt=Me(z,lt)+Me(O,lt)),Se(Gt,Nt)}function Ae(ce,Ze,ct,pt){var Wt=_1.findIntersectionXY(ct,pt,ct,[ce-h,d-Ze]);return j(Wt[0],Wt[1])}function De(ce,Ze){var ct=P+ce,pt=T+Ze,Wt=oe(P,T),st=oe(ct,pt),lt=E(Wt,x),Gt=E(st,x),Nt=Ae(P,T,lt[0],lt[1]),$t=Math.min(Ae(ct,pt,Gt[0],Gt[1]),l),sr,wr;ie(Nt,$t)&&(sr=V+t.pathSector(O),z&&(sr+=t.pathSector(z)),wr=[ke(z,lt[0],lt[1]),ke(O,lt[0],lt[1])].join(\" \")),Se(sr,wr)}function Pe(){if(y1.removeZoombox(n),!(z===null||O===null)){var ce={};ge(ce),y1.showDoubleClickNotifier(n),gw.call(\"_guiRelayout\",n,ce)}}function ge(ce){var Ze=b._rl,ct=(Ze[1]-Ze[0])/(1-u/l)/l,pt=[Ze[0]+(z-u)*ct,Ze[0]+(O-u)*ct];ce[t.id+\".radialaxis.range\"]=pt}function Fe(ce,Ze){var ct=n._fullLayout.clickmode;if(y1.removeZoombox(n),ce===2){var pt={};for(var Wt in t.viewInitial)pt[t.id+\".\"+Wt]=t.viewInitial[Wt];n.emit(\"plotly_doubleclick\",null),gw.call(\"_guiRelayout\",n,pt)}ct.indexOf(\"select\")>-1&&ce===1&&i$t(Ze,n,[t.xaxis],[t.yaxis],t.id,g),ct.indexOf(\"event\")>-1&&gJe.click(n,Ze,t.id)}g.prepFn=function(ce,Ze,ct){var pt=n._fullLayout.dragmode,Wt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var st=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,k=n._fullLayout._invScaleY;var lt=Xc.apply3DTransform(st)(Ze-Wt.left,ct-Wt.top);if(P=lt[0],T=lt[1],x){var Gt=_1.findPolygonOffset(l,v[0],v[1],x);P+=h+Gt[0],T+=d+Gt[1]}switch(pt){case\"zoom\":g.clickFn=Fe,r||(x?g.moveFn=De:g.moveFn=Le,g.doneFn=Pe,me(ce,Ze,ct));break;case\"select\":case\"lasso\":r$t(ce,Ze,ct,g,pt);break}},f9.init(g)};Nd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=kx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Lx(n.radialAxisAngle),v=c._rl,x=v[0],b=v[1],p=v[r],C=.75*(v[1]-v[0])/(1-n.getHole(t))/o,E,A,L;r?(E=l+(o+h)*Math.cos(d),A=u-(o+h)*Math.sin(d),L=\"radialdrag\"):(E=l+(s-h)*Math.cos(d),A=u-(s-h)*Math.sin(d),L=\"radialdrag-inner\");var _=y1.makeRectDragger(a,L,\"crosshair\",-h,-h,f,f),k={element:_,gd:i};e.dragmode===!1&&(k.dragmode=!1),ck(vw.select(_),c.visible&&s<o,{transform:xd(E,A)});var M,g,P;function T(Z,H){if(M)M(Z,H);else{var N=[Z,-H],j=[Math.cos(d),Math.sin(d)],re=Math.abs(Xc.dot(N,j)/Math.sqrt(Xc.dot(N,N)));isNaN(re)||(M=re<.5?V:G)}var oe={};z(oe),i.emit(\"plotly_relayouting\",oe)}function z(Z){g!==null?Z[n.id+\".radialaxis.angle\"]=g:P!==null&&(Z[n.id+\".radialaxis.range[\"+r+\"]\"]=P)}function O(){g!==null?gw.call(\"_guiRelayout\",i,n.id+\".radialaxis.angle\",g):P!==null&&gw.call(\"_guiRelayout\",i,n.id+\".radialaxis.range[\"+r+\"]\",P)}function V(Z,H){if(r!==0){var N=E+Z,j=A+H;g=Math.atan2(u-j,N-l),n.vangles&&(g=TJe(g,n.vangles)),g=pw(g);var re=xd(l,u)+ry(-g);a[\"radial-axis\"].attr(\"transform\",re),a[\"radial-line\"].select(\"line\").attr(\"transform\",re);var oe=n.gd._fullLayout,_e=oe[n.id];n.updateRadialAxisTitle(oe,_e,g)}}function G(Z,H){var N=Xc.dot([Z,-H],[Math.cos(d),Math.sin(d)]);if(P=p-C*N,C>0!=(r?P>x:P<b)){P=null;return}var j=i._fullLayout,re=j[n.id];c.range[r]=P,c._rl[r]=P,n.updateRadialAxis(j,re),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var oe=!1;for(var _e in n.traceHash){var Me=n.traceHash[_e],ke=Xc.filterVisible(Me),me=Me[0][0].trace._module;me.plot(i,n,ke,re),gw.traceIs(_e,\"gl\")&&ke.length&&(oe=!0)}oe&&(yJe(i),_Je(i))}k.prepFn=function(){M=null,g=null,P=null,k.moveFn=T,k.doneFn=O,H$(i)},k.clampFn=function(Z,H){return Math.sqrt(Z*Z+H*H)<kx.MINDRAG&&(Z=0,H=0),[Z,H]},f9.init(k)};Nd.updateAngularDrag=function(e){var t=this,r=t.gd,n=t.layers,i=t.radius,a=t.angularAxis,o=t.cx,s=t.cy,l=t.cxx,u=t.cyy,c=kx.angularDragBoxSize,f=y1.makeDragger(n,\"path\",\"angulardrag\",e.dragmode===!1?\"none\":\"move\"),h={element:f,gd:r};e.dragmode===!1?h.dragmode=!1:vw.select(f).attr(\"d\",t.pathAnnulus(i,i+c)).attr(\"transform\",xd(o,s)).call(mJe,\"move\");function d(P,T){return Math.atan2(u+c-T,P-l-c)}var v=n.frontplot.select(\".scatterlayer\").selectAll(\".trace\"),x=v.selectAll(\".point\"),b=v.selectAll(\".textpoint\"),p,C,E,A,L,_;function k(P,T){var z=t.gd._fullLayout,O=z[t.id],V=p+P*e._invScaleX,G=C+T*e._invScaleY,Z=d(V,G),H=pw(Z-_);if(A=E+H,n.frontplot.attr(\"transform\",xd(t.xOffset2,t.yOffset2)+ry([-H,l,u])),t.vangles){L=t.radialAxisAngle+H;var N=xd(o,s)+ry(-H),j=xd(o,s)+ry(-L);n.bg.attr(\"transform\",N),n[\"radial-grid\"].attr(\"transform\",N),n[\"radial-axis\"].attr(\"transform\",j),n[\"radial-line\"].select(\"line\").attr(\"transform\",j),t.updateRadialAxisTitle(z,O,L)}else t.clipPaths.forTraces.select(\"path\").attr(\"transform\",xd(l,u)+ry(H));x.each(function(){var ie=vw.select(this),Se=uk.getTranslate(ie);ie.attr(\"transform\",xd(Se.x,Se.y)+ry([H]))}),b.each(function(){var ie=vw.select(this),Se=ie.select(\"text\"),Le=uk.getTranslate(ie);ie.attr(\"transform\",ry([H,Se.attr(\"x\"),Se.attr(\"y\")])+xd(Le.x,Le.y))}),a.rotation=Xc.modHalf(A,360),t.updateAngularAxis(z,O),t._hasClipOnAxisFalse&&!Xc.isFullCircle(t.sectorInRad)&&v.call(uk.hideOutsideRangePoints,t);var re=!1;for(var oe in t.traceHash)if(gw.traceIs(oe,\"gl\")){var _e=t.traceHash[oe],Me=Xc.filterVisible(_e),ke=_e[0][0].trace._module;ke.plot(r,t,Me,O),Me.length&&(re=!0)}re&&(yJe(r),_Je(r));var me={};M(me),r.emit(\"plotly_relayouting\",me)}function M(P){P[t.id+\".angularaxis.rotation\"]=A,t.vangles&&(P[t.id+\".radialaxis.angle\"]=L)}function g(){b.select(\"text\").attr(\"transform\",null);var P={};M(P),gw.call(\"_guiRelayout\",r,P)}h.prepFn=function(P,T,z){var O=e[t.id];E=O.angularaxis.rotation;var V=f.getBoundingClientRect();p=T-V.left,C=z-V.top,r._fullLayout._calcInverseTransform(r);var G=Xc.apply3DTransform(e._invTransform)(p,C);p=G[0],C=G[1],_=d(p,C),h.moveFn=k,h.doneFn=g,H$(r)},t.vangles&&!Xc.isFullCircle(t.sectorInRad)&&(h.prepFn=Xc.noop,mJe(vw.select(f),null)),f9.init(h)};Nd.isPtInside=function(e){if(this.isSmith)return!0;var t=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(e.theta),i=this.radialAxis,a=i.c2l(e.r),o=i._rl,s=r?_1.isPtInsidePolygon:Xc.isPtInsideSector;return s(a,n,o,t,r)};Nd.pathArc=function(e){var t=this.sectorInRad,r=this.vangles,n=r?_1.pathPolygon:Xc.pathArc;return n(e,t[0],t[1],r)};Nd.pathSector=function(e){var t=this.sectorInRad,r=this.vangles,n=r?_1.pathPolygon:Xc.pathSector;return n(e,t[0],t[1],r)};Nd.pathAnnulus=function(e,t){var r=this.sectorInRad,n=this.vangles,i=n?_1.pathPolygonAnnulus:Xc.pathAnnulus;return i(e,t,r[0],r[1],n)};Nd.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)};Nd.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)};function wJe(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return\"side\"in e&&(t+=e.side),t}function l$t(e){var t=e[0],r=e[1],n=r-t,i=xJe(t,360),a=i+n,o=Math.cos(Lx(i)),s=Math.sin(Lx(i)),l=Math.cos(Lx(a)),u=Math.sin(Lx(a)),c,f,h,d;return i<=90&&a>=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function TJe(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function ck(e,t,r){return t?(e.attr(\"display\",null),e.attr(r)):e&&e.attr(\"display\",\"none\"),e}});var W$=ye((O2r,LJe)=>{\"use strict\";var u$t=Eh(),ss=Rd(),c$t=kc().attributes,f0=Dr().extendFlat,SJe=mc().overrideAll,MJe=SJe({color:ss.color,showline:f0({},ss.showline,{dflt:!0}),linecolor:ss.linecolor,linewidth:ss.linewidth,showgrid:f0({},ss.showgrid,{dflt:!0}),gridcolor:ss.gridcolor,gridwidth:ss.gridwidth,griddash:ss.griddash},\"plot\",\"from-root\"),EJe=SJe({tickmode:ss.minor.tickmode,nticks:ss.nticks,tick0:ss.tick0,dtick:ss.dtick,tickvals:ss.tickvals,ticktext:ss.ticktext,ticks:ss.ticks,ticklen:ss.ticklen,tickwidth:ss.tickwidth,tickcolor:ss.tickcolor,ticklabelstep:ss.ticklabelstep,showticklabels:ss.showticklabels,labelalias:ss.labelalias,minorloglabels:ss.minorloglabels,showtickprefix:ss.showtickprefix,tickprefix:ss.tickprefix,showticksuffix:ss.showticksuffix,ticksuffix:ss.ticksuffix,showexponent:ss.showexponent,exponentformat:ss.exponentformat,minexponent:ss.minexponent,separatethousands:ss.separatethousands,tickfont:ss.tickfont,tickangle:ss.tickangle,tickformat:ss.tickformat,tickformatstops:ss.tickformatstops,layer:ss.layer},\"plot\",\"from-root\"),CJe={visible:f0({},ss.visible,{dflt:!0}),type:f0({},ss.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:ss.autotypenumbers,autorangeoptions:{minallowed:ss.autorangeoptions.minallowed,maxallowed:ss.autorangeoptions.maxallowed,clipmin:ss.autorangeoptions.clipmin,clipmax:ss.autorangeoptions.clipmax,include:ss.autorangeoptions.include,editType:\"plot\"},autorange:f0({},ss.autorange,{editType:\"plot\"}),rangemode:{valType:\"enumerated\",values:[\"tozero\",\"nonnegative\",\"normal\"],dflt:\"tozero\",editType:\"calc\"},minallowed:f0({},ss.minallowed,{editType:\"plot\"}),maxallowed:f0({},ss.maxallowed,{editType:\"plot\"}),range:f0({},ss.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],editType:\"plot\"}),categoryorder:ss.categoryorder,categoryarray:ss.categoryarray,angle:{valType:\"angle\",editType:\"plot\"},autotickangles:ss.autotickangles,side:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"clockwise\",editType:\"plot\"},title:{text:f0({},ss.title.text,{editType:\"plot\",dflt:\"\"}),font:f0({},ss.title.font,{editType:\"plot\"}),editType:\"plot\"},hoverformat:ss.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"};f0(CJe,MJe,EJe);var kJe={visible:f0({},ss.visible,{dflt:!0}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"category\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:ss.autotypenumbers,categoryorder:ss.categoryorder,categoryarray:ss.categoryarray,thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\"],dflt:\"degrees\",editType:\"calc\"},period:{valType:\"number\",editType:\"calc\",min:0},direction:{valType:\"enumerated\",values:[\"counterclockwise\",\"clockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",editType:\"calc\"},hoverformat:ss.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"};f0(kJe,MJe,EJe);LJe.exports={domain:c$t({name:\"polar\",editType:\"plot\"}),sector:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],dflt:[0,360],editType:\"plot\"},hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},bgcolor:{valType:\"color\",editType:\"plot\",dflt:u$t.background},radialaxis:CJe,angularaxis:kJe,gridshape:{valType:\"enumerated\",values:[\"circular\",\"linear\"],dflt:\"circular\",editType:\"plot\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"}});var DJe=ye((q2r,RJe)=>{\"use strict\";var d9=Dr(),f$t=Ca(),h$t=pl(),d$t=C_(),v$t=Id().getSubplotData,p$t=xb(),g$t=T3(),m$t=e_(),y$t=t_(),_$t=iI(),x$t=QM(),b$t=gB(),w$t=L3(),IJe=W$(),T$t=B$(),v9=o9(),PJe=v9.axisNames;function A$t(e,t,r,n){var i=r(\"bgcolor\");n.bgColor=f$t.combine(i,n.paper_bgcolor);var a=r(\"sector\");r(\"hole\");var o=v$t(n.fullData,v9.name,n.id),s=n.layoutOut,l;function u(H,N){return r(l+\".\"+H,N)}for(var c=0;c<PJe.length;c++){l=PJe[c],d9.isPlainObject(e[l])||(e[l]={});var f=e[l],h=h$t.newContainer(t,l);h._id=h._name=l,h._attr=n.id+\".\"+l,h._traceIndices=o.map(function(H){return H.index});var d=v9.axisName2dataArray[l],v=S$t(f,h,u,o,d,n);_$t(f,h,u,{axData:o,dataAttr:d});var x=u(\"visible\");switch(T$t(h,t,s),u(\"uirevision\",t.uirevision),h._m=1,l){case\"radialaxis\":u(\"minallowed\"),u(\"maxallowed\");var b=u(\"range\"),p=h.getAutorangeDflt(b),C=u(\"autorange\",p),E;b&&(b[0]===null&&b[1]===null||(b[0]===null||b[1]===null)&&(C===\"reversed\"||C===!0)||b[0]!==null&&(C===\"min\"||C===\"max reversed\")||b[1]!==null&&(C===\"max\"||C===\"min reversed\"))&&(b=void 0,delete h.range,h.autorange=!0,E=!0),E||(p=h.getAutorangeDflt(b),C=u(\"autorange\",p)),f.autorange=C,C&&(b$t(u,C,b),(v===\"linear\"||v===\"-\")&&u(\"rangemode\"),h.isReversed()&&(h._m=-1)),h.cleanRange(\"range\",{dfltRange:[0,1]});break;case\"angularaxis\":if(v===\"date\"){d9.log(\"Polar plots do not support date angular axes yet.\");for(var A=0;A<o.length;A++)o[A].visible=!1;v=f.type=h.type=\"linear\"}u(v===\"linear\"?\"thetaunit\":\"period\");var L=u(\"direction\");u(\"rotation\",{counterclockwise:0,clockwise:90}[L]);break}if(y$t(f,h,u,h.type,{tickSuffixDflt:h.thetaunit===\"degrees\"?\"\\xB0\":void 0}),x){var _,k,M,g,P,T,z,O,V,G,Z=n.font||{};_=u(\"color\"),k=_===f.color?_:Z.color,M=Z.size,g=Z.family,P=Z.weight,T=Z.style,z=Z.variant,O=Z.textcase,V=Z.lineposition,G=Z.shadow,p$t(f,h,u,h.type),m$t(f,h,u,h.type,{font:{weight:P,style:T,variant:z,textcase:O,lineposition:V,shadow:G,color:k,size:M,family:g},noAutotickangles:l===\"angularaxis\",noTicklabelshift:!0,noTicklabelstandoff:!0}),g$t(f,h,u,{outerTicks:!0}),x$t(f,h,u,{dfltColor:_,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:IJe[l]}),u(\"layer\"),l===\"radialaxis\"&&(u(\"side\"),u(\"angle\",a[0]),u(\"title.text\"),d9.coerceFont(u,\"title.font\",{weight:P,style:T,variant:z,textcase:O,lineposition:V,shadow:G,color:k,size:d9.bigFont(M),family:g}))}v!==\"category\"&&u(\"hoverformat\"),h._input=f}t.angularaxis.type===\"category\"&&r(\"gridshape\")}function S$t(e,t,r,n,i,a){var o=r(\"autotypenumbers\",a.autotypenumbersDflt),s=r(\"type\");if(s===\"-\"){for(var l,u=0;u<n.length;u++)if(n[u].visible){l=n[u];break}l&&l[i]&&(t.type=w$t(l[i],\"gregorian\",{noMultiCategory:!0,autotypenumbers:o})),t.type===\"-\"?t.type=\"linear\":e.type=t.type}return t.type}RJe.exports=function(t,r,n){d$t(t,r,n,{type:v9.name,attributes:IJe,handleDefaults:A$t,font:r.font,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})}});var p9=ye((B2r,BJe)=>{\"use strict\";var M$t=Id().getSubplotCalcData,E$t=Dr().counterRegex,C$t=j$(),zJe=o9(),OJe=zJe.attr,mw=zJe.name,FJe=E$t(mw),qJe={};qJe[OJe]={valType:\"subplotid\",dflt:mw,editType:\"calc\"};function k$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i<n.length;i++){var a=n[i],o=M$t(r,mw,a),s=t[a]._subplot;s||(s=C$t(e,a),t[a]._subplot=s),s.plot(o,t,e._promises)}}function L$t(e,t,r,n){for(var i=n._subplots[mw]||[],a=n._has&&n._has(\"gl\"),o=t._has&&t._has(\"gl\"),s=a&&!o,l=0;l<i.length;l++){var u=i[l],c=n[u]._subplot;if(!t[u]&&c){c.framework.remove(),c.layers[\"radial-axis-title\"].remove();for(var f in c.clipPaths)c.clipPaths[f].remove()}s&&c._scene&&(c._scene.destroy(),c._scene=null)}}BJe.exports={attr:OJe,name:mw,idRoot:mw,idRegex:FJe,attrRegex:FJe,attributes:qJe,layoutAttributes:W$(),supplyLayoutDefaults:DJe(),plot:k$t,clean:L$t,toSVG:vh().toSVG}});var fk=ye((N2r,NJe)=>{\"use strict\";var P$t=Qo().hovertemplateAttrs,I$t=Qo().texttemplateAttrs,g9=Ao().extendFlat,R$t=Eg(),h0=pf(),D$t=Gl(),j5=h0.line;NJe.exports={mode:h0.mode,r:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},theta:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},r0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dr:{valType:\"number\",dflt:1,editType:\"calc\"},theta0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dtheta:{valType:\"number\",editType:\"calc\"},thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\",\"gradians\"],dflt:\"degrees\",editType:\"calc+clearAxisTypes\"},text:h0.text,texttemplate:I$t({editType:\"plot\"},{keys:[\"r\",\"theta\",\"text\"]}),hovertext:h0.hovertext,line:{color:j5.color,width:j5.width,dash:j5.dash,backoff:j5.backoff,shape:g9({},j5.shape,{values:[\"linear\",\"spline\"]}),smoothing:j5.smoothing,editType:\"calc\"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:g9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:g9({},h0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:R$t(),hoverinfo:g9({},D$t.hoverinfo,{flags:[\"r\",\"theta\",\"text\",\"name\"]}),hoveron:h0.hoveron,hovertemplate:P$t(),selected:h0.selected,unselected:h0.unselected}});var y9=ye((U2r,GJe)=>{\"use strict\";var m9=Dr(),W5=Ru(),F$t=$p(),z$t=R0(),UJe=J3(),O$t=D0(),q$t=Ig(),B$t=Sm().PTS_LINESONLY,N$t=fk();function U$t(e,t,r,n){function i(s,l){return m9.coerce(e,t,N$t,s,l)}var a=VJe(e,t,n,i);if(!a){t.visible=!1;return}i(\"thetaunit\"),i(\"mode\",a<B$t?\"lines+markers\":\"lines\"),i(\"text\"),i(\"hovertext\"),t.hoveron!==\"fills\"&&i(\"hovertemplate\"),W5.hasMarkers(t)&&F$t(e,t,r,n,i,{gradient:!0}),W5.hasLines(t)&&(z$t(e,t,r,n,i,{backoff:!0}),UJe(e,t,i),i(\"connectgaps\")),W5.hasText(t)&&(i(\"texttemplate\"),O$t(e,t,n,i));var o=[];(W5.hasMarkers(t)||W5.hasText(t))&&(i(\"cliponaxis\"),i(\"marker.maxdisplayed\"),o.push(\"points\")),i(\"fill\"),t.fill!==\"none\"&&(q$t(e,t,r,i),W5.hasLines(t)||UJe(e,t,i)),(t.fill===\"tonext\"||t.fill===\"toself\")&&o.push(\"fills\"),i(\"hoveron\",o.join(\"+\")||\"points\"),m9.coerceSelectionMarkerOpacity(t,i)}function VJe(e,t,r,n){var i=n(\"r\"),a=n(\"theta\");m9.isTypedArray(i)&&(t.r=i=Array.from(i)),m9.isTypedArray(a)&&(t.theta=a=Array.from(a));var o;if(i)a?o=Math.min(i.length,a.length):(o=i.length,n(\"theta0\"),n(\"dtheta\"));else{if(!a)return 0;o=t.theta.length,n(\"r0\"),n(\"dr\")}return t._length=o,o}GJe.exports={handleRThetaDefaults:VJe,supplyDefaults:U$t}});var _9=ye((V2r,jJe)=>{\"use strict\";var V$t=Dr(),HJe=ho();jJe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=HJe.tickText(o,l,!0).text;var u=s.thetaunit===\"degrees\"?V$t.rad2deg(t.theta):t.theta;return i.thetaLabel=HJe.tickText(s,u,!0).text,i}});var ZJe=ye((G2r,XJe)=>{\"use strict\";var WJe=Eo(),G$t=hs().BADNUM,H$t=ho(),j$t=F0(),W$t=Cm(),X$t=z0(),Z$t=O0().calcMarkerSize;XJe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,\"r\"),l=o.makeCalcdata(r,\"theta\"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};WJe(h)&&WJe(d)?(v.r=h,v.theta=d):v.r=G$t}var x=Z$t(r,u);return r._extremes.x=H$t.findExtremes(a,s,{ppad:x}),j$t(t,r),W$t(c,r),X$t(c,r),c}});var JJe=ye((H2r,KJe)=>{\"use strict\";var Y$t=iT(),YJe=hs().BADNUM;KJe.exports=function(t,r,n){for(var i=r.layers.frontplot.select(\"g.scatterlayer\"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c<n.length;c++)for(var f=n[c],h=0;h<f.length;h++){h===0&&(f[0].trace._xA=a,f[0].trace._yA=o);var d=f[h],v=d.r;if(v===YJe)d.x=d.y=YJe;else{var x=l.c2g(v),b=u.c2g(d.theta);d.x=x*Math.cos(b),d.y=x*Math.sin(b)}}Y$t(t,s,n,i)}});var x9=ye((j2r,QJe)=>{\"use strict\";var K$t=sT();function J$t(e,t,r,n){var i=K$t(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,$Je(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function $Je(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"r\",a._hovertitle=\"\\u03B8\";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+\": \"+d)}if(!t.hovertemplate){var f=l.split(\"+\");f.indexOf(\"all\")!==-1&&(f=[\"r\",\"theta\",\"text\"]),f.indexOf(\"r\")!==-1&&c(i,n.rLabel),f.indexOf(\"theta\")!==-1&&c(a,n.thetaLabel),f.indexOf(\"text\")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}QJe.exports={hoverPoints:J$t,makeHoverPointText:$Je}});var t$e=ye((W2r,e$e)=>{\"use strict\";e$e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:p9(),categories:[\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:fk(),supplyDefaults:y9().supplyDefaults,colorbar:$d(),formatLabels:_9(),calc:ZJe(),plot:JJe(),style:ap().style,styleOnSelect:ap().styleOnSelect,hoverPoints:x9().hoverPoints,selectPoints:lT(),meta:{}}});var i$e=ye((X2r,r$e)=>{\"use strict\";r$e.exports=t$e()});var X$=ye((Z2r,n$e)=>{\"use strict\";var Up=fk(),x1=sC(),$$t=Qo().texttemplateAttrs;n$e.exports={mode:Up.mode,r:Up.r,theta:Up.theta,r0:Up.r0,dr:Up.dr,theta0:Up.theta0,dtheta:Up.dtheta,thetaunit:Up.thetaunit,text:Up.text,texttemplate:$$t({editType:\"plot\"},{keys:[\"r\",\"theta\",\"text\"]}),hovertext:Up.hovertext,hovertemplate:Up.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:\"calc\"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Up.hoverinfo,selected:Up.selected,unselected:Up.unselected}});var s$e=ye((Y2r,o$e)=>{\"use strict\";var a$e=Dr(),Z$=Ru(),Q$t=y9().handleRThetaDefaults,eQt=$p(),tQt=R0(),rQt=D0(),iQt=Ig(),nQt=Sm().PTS_LINESONLY,aQt=X$();o$e.exports=function(t,r,n,i){function a(s,l){return a$e.coerce(t,r,aQt,s,l)}var o=Q$t(t,r,i,a);if(!o){r.visible=!1;return}a(\"thetaunit\"),a(\"mode\",o<nQt?\"lines+markers\":\"lines\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&a(\"hovertemplate\"),Z$.hasMarkers(r)&&eQt(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0}),Z$.hasLines(r)&&(tQt(t,r,n,i,a),a(\"connectgaps\")),Z$.hasText(r)&&(a(\"texttemplate\"),rQt(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),a(\"fill\"),r.fill!==\"none\"&&iQt(t,r,n,a),a$e.coerceSelectionMarkerOpacity(r,a)}});var u$e=ye((K2r,l$e)=>{\"use strict\";var oQt=_9();l$e.exports=function(t,r,n){var i=t.i;return\"r\"in t||(t.r=r._r[i]),\"theta\"in t||(t.theta=r._theta[i]),oQt(t,r,n)}});var f$e=ye((J2r,c$e)=>{\"use strict\";var sQt=F0(),lQt=O0().calcMarkerSize,uQt=Y2(),cQt=ho(),fQt=ox().TOO_MANY_POINTS;c$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,\"r\"),l=r._theta=o.makeCalcdata(r,\"theta\"),u=r._length,c={};u<s.length&&(s=s.slice(0,u)),u<l.length&&(l=l.slice(0,u)),c.r=s,c.theta=l,sQt(t,r);var f=c.opts=uQt.style(t,r),h;return u<fQt?h=lQt(r,u):f.marker&&(h=2*(f.marker.sizeAvg||Math.max(f.marker.size,3))),r._extremes.x=cQt.findExtremes(a,s,{ppad:h}),[{x:!1,y:!1,t:c,trace:r}]}});var d$e=ye(($2r,h$e)=>{\"use strict\";var hQt=qF(),dQt=x9().makeHoverPointText;function vQt(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=hQt.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,dQt(f,h,c,u),l}}h$e.exports={hoverPoints:vQt}});var p$e=ye((Q2r,v$e)=>{\"use strict\";v$e.exports={moduleType:\"trace\",name:\"scatterpolargl\",basePlotModule:p9(),categories:[\"gl\",\"regl\",\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:X$(),supplyDefaults:s$e(),colorbar:$d(),formatLabels:u$e(),calc:f$e(),hoverPoints:d$e().hoverPoints,selectPoints:oY(),meta:{}}});var g$e=ye((ewr,Y$)=>{\"use strict\";var pQt=UF(),gQt=Eo(),mQt=cK(),yQt=iY(),b9=Y2(),w9=Dr(),_Qt=ox().TOO_MANY_POINTS,xQt={};Y$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=yQt(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,x,b=h.slice(),p=d.slice();for(x=0;x<h.length;x++)r.isPtInside({r:h[x],theta:d[x]})||(b[x]=NaN,p[x]=NaN);var C=new Array(f*2),E=Array(f),A=Array(f);for(x=0;x<f;x++){var L=b[x],_,k;if(gQt(L)){var M=i.c2g(L),g=a.c2g(p[x],u.thetaunit);_=M*Math.cos(g),k=M*Math.sin(g)}else _=k=NaN;E[x]=C[x*2]=_,A[x]=C[x*2+1]=k}c.tree=pQt(C),v.marker&&f>=_Qt&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=C),v.line&&C.length>1&&w9.extendFlat(v.line,b9.linePositions(t,u,C)),v.text&&(w9.extendFlat(v.text,{positions:C},b9.textPosition(t,u,v.text,v.marker)),w9.extendFlat(v.textSel,{positions:C},b9.textPosition(t,u,v.text,v.markerSel)),w9.extendFlat(v.textUnsel,{positions:C},b9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=E,c.y=A,c.rawx=E,c.rawy=A,c.r=h,c.theta=d,c.positions=C,c._scene=o,c.index=o.count,o.count++}}),mQt(t,r,n)}};Y$.exports.reglPrecompiled=xQt});var _$e=ye((twr,y$e)=>{\"use strict\";var m$e=p$e();m$e.plot=g$e();y$e.exports=m$e});var b$e=ye((rwr,x$e)=>{\"use strict\";x$e.exports=_$e()});var K$=ye((iwr,w$e)=>{\"use strict\";var bQt=Qo().hovertemplateAttrs,X5=Ao().extendFlat,Px=fk(),Ix=Lm();w$e.exports={r:Px.r,theta:Px.theta,r0:Px.r0,dr:Px.dr,theta0:Px.theta0,dtheta:Px.dtheta,thetaunit:Px.thetaunit,base:X5({},Ix.base,{}),offset:X5({},Ix.offset,{}),width:X5({},Ix.width,{}),text:X5({},Ix.text,{}),hovertext:X5({},Ix.hovertext,{}),marker:wQt(),hoverinfo:Px.hoverinfo,hovertemplate:bQt(),selected:Ix.selected,unselected:Ix.unselected};function wQt(){var e=X5({},Ix.marker);return delete e.cornerradius,e}});var J$=ye((nwr,T$e)=>{\"use strict\";T$e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},bargap:{valType:\"number\",dflt:.1,min:0,max:1,editType:\"calc\"}}});var M$e=ye((awr,S$e)=>{\"use strict\";var A$e=Dr(),TQt=y9().handleRThetaDefaults,AQt=BI(),SQt=K$();S$e.exports=function(t,r,n,i){function a(s,l){return A$e.coerce(t,r,SQt,s,l)}var o=TQt(t,r,i,a);if(!o){r.visible=!1;return}a(\"thetaunit\"),a(\"base\"),a(\"offset\"),a(\"width\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),AQt(t,r,a,n,i),A$e.coerceSelectionMarkerOpacity(r,a)}});var C$e=ye((owr,E$e)=>{\"use strict\";var MQt=Dr(),EQt=J$();E$e.exports=function(e,t,r){var n={},i;function a(l,u){return MQt.coerce(e[i]||{},t[i],EQt,l,u)}for(var o=0;o<r.length;o++){var s=r[o];s.type===\"barpolar\"&&s.visible===!0&&(i=s.subplot,n[i]||(a(\"barmode\"),a(\"bargap\"),n[i]=1))}}});var $$=ye((swr,P$e)=>{\"use strict\";var k$e=pv().hasColorscale,L$e=gv(),CQt=Dr().isArrayOrTypedArray,kQt=v4(),LQt=Hb().setGroupPositions,PQt=z0(),IQt=qa().traceIs,RQt=Dr().extendFlat;function DQt(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,\"r\"),s=a.makeCalcdata(t,\"theta\"),l=t._length,u=new Array(l),c=o,f=s,h=0;h<l;h++)u[h]={p:f[h],s:c[h]};function d(v){var x=t[v];x!==void 0&&(t[\"_\"+v]=CQt(x)?a.makeCalcdata(t,v):a.d2c(x,t.thetaunit))}return a.type===\"linear\"&&(d(\"width\"),d(\"offset\")),k$e(t,\"marker\")&&L$e(e,t,{vals:t.marker.color,containerStr:\"marker\",cLetter:\"c\"}),k$e(t,\"marker.line\")&&L$e(e,t,{vals:t.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),kQt(u,t),PQt(u,t),u}function FQt(e,t,r){for(var n=e.calcdata,i=[],a=0;a<n.length;a++){var o=n[a],s=o[0].trace;s.visible===!0&&IQt(s,\"bar\")&&s.subplot===r&&i.push(o)}var l=RQt({},t.radialaxis,{_id:\"x\"}),u=t.angularaxis;LQt(e,u,l,i,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}P$e.exports={calc:DQt,crossTraceCalc:FQt}});var D$e=ye((lwr,R$e)=>{\"use strict\";var I$e=Oa(),T9=Eo(),Z5=Dr(),zQt=So(),Q$=l9();R$e.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=OQt(r),c=r.layers.frontplot.select(\"g.barlayer\");Z5.makeTraceGroups(c,n,\"trace bars\").each(function(){var f=I$e.select(this),h=Z5.ensureSingle(f,\"g\",\"points\"),d=h.selectAll(\"g.point\").data(Z5.identity);d.enter().append(\"g\").style(\"vector-effect\",i?\"none\":\"non-scaling-stroke\").style(\"stroke-miterlimit\",2).classed(\"point\",!0),d.exit().remove(),d.each(function(v){var x=I$e.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),C=v.thetag0=l.c2g(v.p0),E=v.thetag1=l.c2g(v.p1),A;if(!T9(b)||!T9(p)||!T9(C)||!T9(E)||b===p||C===E)A=\"M0,0Z\";else{var L=s.c2g(v.s1),_=(C+E)/2;v.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],A=u(b,p,C,E)}Z5.ensureSingle(x,\"path\").attr(\"d\",A)}),zQt.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function OQt(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;Z5.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=Q$.findEnclosingVertexAngles(s,e.vangles)[0],c=Q$.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return Q$.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return Z5.pathAnnulus(n,i,a,o,t,r)}}});var z$e=ye((uwr,F$e)=>{\"use strict\";var qQt=vf(),eQ=Dr(),BQt=TT().getTraceColor,NQt=eQ.fillText,UQt=x9().makeHoverPointText,VQt=l9().isPtInsidePolygon;F$e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?VQt:eQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var x=function(E){return c(d,v,[E.rp0,E.rp1],[E.thetag0,E.thetag1],u)?f+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(qQt.getClosest(i,x,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var C=eQ.extendFlat({},p,{r:p.s,theta:p.p});return NQt(p,a,t),UQt(C,a,o,t),t.hovertemplate=a.hovertemplate,t.color=BQt(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign=\"left\"),[t]}}});var q$e=ye((cwr,O$e)=>{\"use strict\";O$e.exports={moduleType:\"trace\",name:\"barpolar\",basePlotModule:p9(),categories:[\"polar\",\"bar\",\"showLegend\"],attributes:K$(),layoutAttributes:J$(),supplyDefaults:M$e(),supplyLayoutDefaults:C$e(),calc:$$().calc,crossTraceCalc:$$().crossTraceCalc,plot:D$e(),colorbar:$d(),formatLabels:_9(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:z$e(),selectPoints:AT(),meta:{}}});var N$e=ye((fwr,B$e)=>{\"use strict\";B$e.exports=q$e()});var tQ=ye((hwr,U$e)=>{\"use strict\";U$e.exports={attr:\"subplot\",name:\"smith\",axisNames:[\"realaxis\",\"imaginaryaxis\"],axisName2dataArray:{imaginaryaxis:\"imag\",realaxis:\"real\"}}});var rQ=ye((dwr,j$e)=>{\"use strict\";var GQt=Eh(),Nf=Rd(),HQt=kc().attributes,Rx=Dr().extendFlat,V$e=mc().overrideAll,G$e=V$e({color:Nf.color,showline:Rx({},Nf.showline,{dflt:!0}),linecolor:Nf.linecolor,linewidth:Nf.linewidth,showgrid:Rx({},Nf.showgrid,{dflt:!0}),gridcolor:Nf.gridcolor,gridwidth:Nf.gridwidth,griddash:Nf.griddash},\"plot\",\"from-root\"),H$e=V$e({ticklen:Nf.ticklen,tickwidth:Rx({},Nf.tickwidth,{dflt:2}),tickcolor:Nf.tickcolor,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,showtickprefix:Nf.showtickprefix,tickprefix:Nf.tickprefix,showticksuffix:Nf.showticksuffix,ticksuffix:Nf.ticksuffix,tickfont:Nf.tickfont,tickformat:Nf.tickformat,hoverformat:Nf.hoverformat,layer:Nf.layer},\"plot\",\"from-root\"),jQt=Rx({visible:Rx({},Nf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:\"data_array\",editType:\"plot\"},tickangle:Rx({},Nf.tickangle,{dflt:90}),ticks:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"\"],editType:\"ticks\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},editType:\"calc\"},G$e,H$e),WQt=Rx({visible:Rx({},Nf.visible,{dflt:!0}),tickvals:{valType:\"data_array\",editType:\"plot\"},ticks:Nf.ticks,editType:\"calc\"},G$e,H$e);j$e.exports={domain:HQt({name:\"smith\",editType:\"plot\"}),bgcolor:{valType:\"color\",editType:\"plot\",dflt:GQt.background},realaxis:jQt,imaginaryaxis:WQt,editType:\"calc\"}});var Z$e=ye((vwr,X$e)=>{\"use strict\";var Y5=Dr(),XQt=Ca(),ZQt=pl(),YQt=C_(),KQt=Id().getSubplotData,JQt=t_(),$Qt=e_(),QQt=QM(),eer=ym(),K5=rQ(),iQ=tQ(),W$e=iQ.axisNames,ter=ier(function(e){return Y5.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function rer(e,t,r,n){var i=r(\"bgcolor\");n.bgColor=XQt.combine(i,n.paper_bgcolor);var a=KQt(n.fullData,iQ.name,n.id),o=n.layoutOut,s;function l(L,_){return r(s+\".\"+L,_)}for(var u=0;u<W$e.length;u++){s=W$e[u],Y5.isPlainObject(e[s])||(e[s]={});var c=e[s],f=ZQt.newContainer(t,s);f._id=f._name=s,f._attr=n.id+\".\"+s,f._traceIndices=a.map(function(L){return L.index});var h=l(\"visible\");if(f.type=\"linear\",eer(f,o),JQt(c,f,l,f.type),h){var d=s===\"realaxis\";if(d&&l(\"side\"),d)l(\"tickvals\");else{var v=ter(t.realaxis.tickvals||K5.realaxis.tickvals.dflt);l(\"tickvals\",v)}Y5.isTypedArray(f.tickvals)&&(f.tickvals=Array.from(f.tickvals));var x,b,p,C,E=n.font||{};h&&(x=l(\"color\"),b=x===c.color?x:E.color,p=E.size,C=E.family),$Qt(c,f,l,f.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!d,noExp:!0,font:{color:b,size:p,family:C}}),Y5.coerce2(e,t,K5,s+\".ticklen\"),Y5.coerce2(e,t,K5,s+\".tickwidth\"),Y5.coerce2(e,t,K5,s+\".tickcolor\",t.color);var A=l(\"ticks\");A||(delete t[s].ticklen,delete t[s].tickwidth,delete t[s].tickcolor),QQt(c,f,l,{dfltColor:x,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:K5[s]}),l(\"layer\")}l(\"hoverformat\"),delete f.type,f._input=c}}X$e.exports=function(t,r,n){YQt(t,r,n,{noUirevision:!0,type:iQ.name,attributes:K5,handleDefaults:rer,font:r.font,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})};function ier(e,t){var r={};return function(n){var i=t?t(n):n;if(i in r)return r[i];var a=e(n);return r[i]=a,a}}});var eQe=ye((pwr,Q$e)=>{\"use strict\";var ner=Id().getSubplotCalcData,aer=Dr().counterRegex,oer=j$(),K$e=tQ(),J$e=K$e.attr,yw=K$e.name,Y$e=aer(yw),$$e={};$$e[J$e]={valType:\"subplotid\",dflt:yw,editType:\"calc\"};function ser(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[yw],i=0;i<n.length;i++){var a=n[i],o=ner(r,yw,a),s=t[a]._subplot;s||(s=oer(e,a,!0),t[a]._subplot=s),s.plot(o,t,e._promises)}}function ler(e,t,r,n){for(var i=n._subplots[yw]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!t[o]&&s){s.framework.remove();for(var l in s.clipPaths)s.clipPaths[l].remove()}}}Q$e.exports={attr:J$e,name:yw,idRoot:yw,idRegex:Y$e,attrRegex:Y$e,attributes:$$e,layoutAttributes:rQ(),supplyLayoutDefaults:Z$e(),plot:ser,clean:ler,toSVG:vh().toSVG}});var nQ=ye((gwr,tQe)=>{\"use strict\";var uer=Qo().hovertemplateAttrs,cer=Qo().texttemplateAttrs,A9=Ao().extendFlat,fer=Eg(),d0=pf(),her=Gl(),J5=d0.line;tQe.exports={mode:d0.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:d0.text,texttemplate:cer({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:d0.hovertext,line:{color:J5.color,width:J5.width,dash:J5.dash,backoff:J5.backoff,shape:A9({},J5.shape,{values:[\"linear\",\"spline\"]}),smoothing:J5.smoothing,editType:\"calc\"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:A9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:A9({},d0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:fer(),hoverinfo:A9({},her.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:d0.hoveron,hovertemplate:uer(),selected:d0.selected,unselected:d0.unselected}});var nQe=ye((mwr,iQe)=>{\"use strict\";var S9=Dr(),$5=Ru(),der=$p(),ver=R0(),rQe=J3(),per=D0(),ger=Ig(),mer=Sm().PTS_LINESONLY,yer=nQ();iQe.exports=function(t,r,n,i){function a(l,u){return S9.coerce(t,r,yer,l,u)}var o=_er(t,r,i,a);if(!o){r.visible=!1;return}a(\"mode\",o<mer?\"lines+markers\":\"lines\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&a(\"hovertemplate\"),$5.hasMarkers(r)&&der(t,r,n,i,a,{gradient:!0}),$5.hasLines(r)&&(ver(t,r,n,i,a,{backoff:!0}),rQe(t,r,a),a(\"connectgaps\")),$5.hasText(r)&&(a(\"texttemplate\"),per(t,r,i,a));var s=[];($5.hasMarkers(r)||$5.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),s.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(ger(t,r,n,a),$5.hasLines(r)||rQe(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&s.push(\"fills\"),a(\"hoveron\",s.join(\"+\")||\"points\"),S9.coerceSelectionMarkerOpacity(r,a)};function _er(e,t,r,n){var i=n(\"real\"),a=n(\"imag\"),o;return i&&a&&(o=Math.min(i.length,a.length)),S9.isTypedArray(i)&&(t.real=i=Array.from(i)),S9.isTypedArray(a)&&(t.imag=a=Array.from(a)),t._length=o,o}});var sQe=ye((ywr,oQe)=>{\"use strict\";var aQe=ho();oQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=aQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=aQe.tickText(a.angularAxis,t.imag,!0).text,i}});var cQe=ye((_wr,uQe)=>{\"use strict\";var lQe=Eo(),xer=hs().BADNUM,ber=F0(),wer=Cm(),Ter=z0(),Aer=O0().calcMarkerSize;uQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,\"real\"),l=o.makeCalcdata(r,\"imag\"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};lQe(h)&&lQe(d)?(v.real=h,v.imag=d):v.real=xer}return Aer(r,u),ber(t,r),wer(c,r),Ter(c,r),c}});var dQe=ye((xwr,hQe)=>{\"use strict\";var Ser=iT(),fQe=hs().BADNUM,Mer=V$(),Eer=Mer.smith;hQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select(\"g.scatterlayer\"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l<n.length;l++)for(var u=n[l],c=0;c<u.length;c++){c===0&&(u[0].trace._xA=a,u[0].trace._yA=o);var f=u[c],h=f.real;if(h===fQe)f.x=f.y=fQe;else{var d=Eer([h,f.imag]);f.x=d[0],f.y=d[1]}}Ser(t,s,n,i)}});var gQe=ye((bwr,pQe)=>{\"use strict\";var Cer=sT();function ker(e,t,r,n){var i=Cer(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,vQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function vQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"real\",a._hovertitle=\"imag\";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+\": \"+d)}if(!t.hovertemplate){var f=l.split(\"+\");f.indexOf(\"all\")!==-1&&(f=[\"real\",\"imag\",\"text\"]),f.indexOf(\"real\")!==-1&&c(i,n.realLabel),f.indexOf(\"imag\")!==-1&&c(a,n.imagLabel),f.indexOf(\"text\")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}pQe.exports={hoverPoints:ker,makeHoverPointText:vQe}});var yQe=ye((wwr,mQe)=>{\"use strict\";mQe.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:eQe(),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:nQ(),supplyDefaults:nQe(),colorbar:$d(),formatLabels:sQe(),calc:cQe(),plot:dQe(),style:ap().style,styleOnSelect:ap().styleOnSelect,hoverPoints:gQe().hoverPoints,selectPoints:lT(),meta:{}}});var xQe=ye((Twr,_Qe)=>{\"use strict\";_Qe.exports=yQe()});var Ev=ye((Awr,wQe)=>{var E9=Fh();function bQe(){this.regionalOptions=[],this.regionalOptions[\"\"]={invalidCalendar:\"Calendar {0} not found\",invalidDate:\"Invalid {0} date\",invalidMonth:\"Invalid {0} month\",invalidYear:\"Invalid {0} year\",differentCalendars:\"Cannot mix {0} and {1} dates\"},this.local=this.regionalOptions[\"\"],this.calendars={},this._localCals={}}E9(bQe.prototype,{instance:function(e,t){e=(e||\"gregorian\").toLowerCase(),t=t||\"\";var r=this._localCals[e+\"-\"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+\"-\"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[\"\"].invalidCalendar).replace(/\\{0\\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n==\"string\"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+\"\").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n=\"\",i=0;r>0;){var a=r%10;n=(a===0?\"\":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function aQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name)}function M9(e,t){return e=\"\"+e,\"000000\".substring(0,t-e.length)+e}E9(aQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,\"y\")},month:function(e){return arguments.length===0?this._month:this.set(e,\"m\")},day:function(e){return arguments.length===0?this._day:this.set(e,\"d\")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Hs.local.differentCalendars||Hs.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this._calendar.local.name).replace(/\\{1\\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?\"-\":\"\")+M9(Math.abs(this.year()),4)+\"-\"+M9(this.month(),2)+\"-\"+M9(this.day(),2)}});function oQ(){this.shortYearCutoff=\"+10\"}E9(oQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate),r=e.day(),t=e.month(),e=e.year()),new aQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Hs.local.invalidYear||Hs.regionalOptions[\"\"].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Hs.local.invalidYear||Hs.regionalOptions[\"\"].invalidYear);return(t.year()<0?\"-\":\"\")+M9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Hs.local.invalidYear||Hs.regionalOptions[\"\"].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Hs.local.invalidMonth||Hs.regionalOptions[\"\"].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Hs.local.invalidMonth||Hs.regionalOptions[\"\"].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Hs.local.invalidYear||Hs.regionalOptions[\"\"].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r===\"d\"||r===\"w\"){var n=e.toJD()+t*(r===\"w\"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r===\"y\"?t:0),o=e.monthOfYear()+(r===\"m\"?t:0),i=e.day(),s=function(c){for(;o<c.minMonth;)a--,o+=c.monthsInYear(a);for(var f=c.monthsInYear(a);o>f-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r===\"y\"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r===\"m\"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n===\"y\"||n===\"m\")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,\"y\"],m:[1,this.monthsInYear(-1),\"m\"],w:[this.daysInWeek(),this.daysInYear(-1),\"d\"],d:[1,this.daysInYear(-1),\"d\"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate);var n=r===\"y\"?t:e.year(),i=r===\"m\"?t:e.month(),a=r===\"d\"?t:e.day();return(r===\"y\"||r===\"m\")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate);return Hs.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(Hs.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(this._validateLevel===0&&this.name!==e.calendar().name)throw(Hs.local.differentCalendars||Hs.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this.local.name).replace(/\\{1\\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(e,t,r))throw n.replace(/\\{0\\}/,this.local.name);var i=this.newDate(e,t,r);return this._validateLevel--,i}catch(a){throw this._validateLevel--,a}}});function sQ(e){this.local=this.regionalOptions[e]||this.regionalOptions[\"\"]}sQ.prototype=new oQ;E9(sQ.prototype,{name:\"Gregorian\",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Gregorian\",epochs:[\"BCE\",\"CE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Hs.local.invalidYear||Hs.regionalOptions[\"\"].invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===0&&(r%100!==0||r%400===0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Hs.local.invalidMonth||Hs.regionalOptions[\"\"].invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var i=Math.floor(e/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+a-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-186721625e-2)/36524.25);r=t+1+r-Math.floor(r/4);var n=r+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(o*30.6001),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Hs.local.invalidDate||Hs.regionalOptions[\"\"].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Hs=wQe.exports=new bQe;Hs.cdate=aQ;Hs.baseCalendar=oQ;Hs.calendars.gregorian=sQ});var TQe=ye(()=>{var lQ=Fh(),Ud=Ev();lQ(Ud.regionalOptions[\"\"],{invalidArguments:\"Invalid arguments\",invalidFormat:\"Cannot format a date from another calendar\",missingNumberAt:\"Missing number at position {0}\",unknownNameAt:\"Unknown name at position {0}\",unexpectedLiteralAt:\"Unexpected literal at position {0}\",unexpectedText:\"Additional text found at end\"});Ud.local=Ud.regionalOptions[\"\"];lQ(Ud.cdate.prototype,{formatDate:function(e,t){return typeof e!=\"string\"&&(t=e,e=\"\"),this._calendar.formatDate(e||\"\",this,t)}});lQ(Ud.baseCalendar.prototype,{UNIX_EPOCH:Ud.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Ud.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:\"yyyy-mm-dd\",COOKIE:\"D, dd M yyyy\",FULL:\"DD, MM d, yyyy\",ISO_8601:\"yyyy-mm-dd\",JULIAN:\"J\",RFC_822:\"D, d M yy\",RFC_850:\"DD, dd-M-yy\",RFC_1036:\"D, d M yy\",RFC_1123:\"D, d M yyyy\",RFC_2822:\"D, d M yyyy\",RSS:\"D, d M yy\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yyyy-mm-dd\",formatDate:function(e,t,r){if(typeof e!=\"string\"&&(r=t,t=e,e=\"\"),!t)return\"\";if(t.calendar()!==this)throw Ud.local.invalidFormat||Ud.regionalOptions[\"\"].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(A,L){for(var _=1;E+_<e.length&&e.charAt(E+_)===A;)_++;return E+=_-1,Math.floor(_/(L||1))>1},c=function(A,L,_,k){var M=\"\"+L;if(u(A,k))for(;M.length<_;)M=\"0\"+M;return M},f=function(A,L,_,k){return u(A)?k[L]:_[L]},h=this,d=function(A){return typeof a==\"function\"?a.call(h,A,u(\"m\")):b(c(\"m\",A.month(),2))},v=function(A,L){return L?typeof s==\"function\"?s.call(h,A):s[A.month()-h.minMonth]:typeof o==\"function\"?o.call(h,A):o[A.month()-h.minMonth]},x=this.local.digits,b=function(A){return r.localNumbers&&x?x(A):A},p=\"\",C=!1,E=0;E<e.length;E++)if(C)e.charAt(E)===\"'\"&&!u(\"'\")?C=!1:p+=e.charAt(E);else switch(e.charAt(E)){case\"d\":p+=b(c(\"d\",t.day(),2));break;case\"D\":p+=f(\"D\",t.dayOfWeek(),n,i);break;case\"o\":p+=c(\"o\",t.dayOfYear(),3);break;case\"w\":p+=c(\"w\",t.weekOfYear(),2);break;case\"m\":p+=d(t);break;case\"M\":p+=v(t,u(\"M\"));break;case\"y\":p+=u(\"y\",2)?t.year():(t.year()%100<10?\"0\":\"\")+t.year()%100;break;case\"Y\":u(\"Y\",2),p+=t.formatYear();break;case\"J\":p+=t.toJD();break;case\"@\":p+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\"!\":p+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\"'\":u(\"'\")?p+=\"'\":C=!0;break;default:p+=e.charAt(E)}return p},parseDate:function(e,t,r){if(t==null)throw Ud.local.invalidArguments||Ud.regionalOptions[\"\"].invalidArguments;if(t=typeof t==\"object\"?t.toString():t+\"\",t===\"\")return null;e=e||this.local.dateFormat,r=r||{};var n=r.shortYearCutoff||this.shortYearCutoff;n=typeof n!=\"string\"?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,c=-1,f=-1,h=-1,d=-1,v=-1,x=!1,b=!1,p=function(z,O){for(var V=1;g+V<e.length&&e.charAt(g+V)===z;)V++;return g+=V-1,Math.floor(V/(O||1))>1},C=function(z,O){var V=p(z,O),G=[2,3,V?4:2,V?4:2,10,11,20][\"oyYJ@!\".indexOf(z)+1],Z=new RegExp(\"^-?\\\\d{1,\"+G+\"}\"),H=t.substring(M).match(Z);if(!H)throw(Ud.local.missingNumberAt||Ud.regionalOptions[\"\"].missingNumberAt).replace(/\\{0\\}/,M);return M+=H[0].length,parseInt(H[0],10)},E=this,A=function(){if(typeof s==\"function\"){p(\"m\");var z=s.call(E,t.substring(M));return M+=z.length,z}return C(\"m\")},L=function(z,O,V,G){for(var Z=p(z,G)?V:O,H=0;H<Z.length;H++)if(t.substr(M,Z[H].length).toLowerCase()===Z[H].toLowerCase())return M+=Z[H].length,H+E.minMonth;throw(Ud.local.unknownNameAt||Ud.regionalOptions[\"\"].unknownNameAt).replace(/\\{0\\}/,M)},_=function(){if(typeof u==\"function\"){var z=p(\"M\")?u.call(E,t.substring(M)):l.call(E,t.substring(M));return M+=z.length,z}return L(\"M\",l,u)},k=function(){if(t.charAt(M)!==e.charAt(g))throw(Ud.local.unexpectedLiteralAt||Ud.regionalOptions[\"\"].unexpectedLiteralAt).replace(/\\{0\\}/,M);M++},M=0,g=0;g<e.length;g++)if(b)e.charAt(g)===\"'\"&&!p(\"'\")?b=!1:k();else switch(e.charAt(g)){case\"d\":d=C(\"d\");break;case\"D\":L(\"D\",i,a);break;case\"o\":v=C(\"o\");break;case\"w\":C(\"w\");break;case\"m\":h=A();break;case\"M\":h=_();break;case\"y\":var P=g;x=!p(\"y\",2),g=P,f=C(\"y\",2);break;case\"Y\":f=C(\"Y\",2);break;case\"J\":c=C(\"J\")+.5,t.charAt(M)===\".\"&&(M++,C(\"J\"));break;case\"@\":c=C(\"@\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\"!\":c=C(\"!\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\"*\":M=t.length;break;case\"'\":p(\"'\")?k():b=!0;break;default:k()}if(M<t.length)throw Ud.local.unexpectedText||Ud.regionalOptions[\"\"].unexpectedText;if(f===-1?f=this.today().year():f<100&&x&&(f+=n===-1?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),typeof h==\"string\"&&(h=o.call(this,f,h)),v>-1){h=1,d=v;for(var T=this.daysInMonth(f,h);d>T;T=this.daysInMonth(f,h))h++,d-=T}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!=\"object\"&&(i=n,n=r,r=null),typeof n!=\"string\"&&(i=n,n=\"\");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||\"d\"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e==\"string\"?o(e):typeof e==\"number\"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,\"d\"):a.newDate(e),e}})});var AQe=ye(()=>{var Dx=Ev(),Ler=Fh(),uQ=Dx.instance();function C9(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}C9.prototype=new Dx.baseCalendar;Ler(C9.prototype,{name:\"Chinese\",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{\"\":{name:\"Chinese\",epochs:[\"BEC\",\"EC\"],monthNumbers:function(e,t){if(typeof e==\"string\"){var r=e.match(Ier);return r?r[0]:\"\"}var n=this._validateYear(e),i=e.month(),a=\"\"+this.toChineseMonth(n,i);return t&&a.length<2&&(a=\"0\"+a),this.isIntercalaryMonth(n,i)&&(a+=\"i\"),a},monthNames:function(e){if(typeof e==\"string\"){var t=e.match(Rer);return t?t[0]:\"\"}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"][i-1];return this.isIntercalaryMonth(r,n)&&(a=\"\\u95F0\"+a),a},monthNamesShort:function(e){if(typeof e==\"string\"){var t=e.match(Der);return t?t[0]:\"\"}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=[\"\\u4E00\",\"\\u4E8C\",\"\\u4E09\",\"\\u56DB\",\"\\u4E94\",\"\\u516D\",\"\\u4E03\",\"\\u516B\",\"\\u4E5D\",\"\\u5341\",\"\\u5341\\u4E00\",\"\\u5341\\u4E8C\"][i-1];return this.isIntercalaryMonth(r,n)&&(a=\"\\u95F0\"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]===\"\\u95F0\"&&(n=!0,t=t.substring(1)),t[t.length-1]===\"\\u6708\"&&(t=t.substring(0,t.length-1)),r=1+[\"\\u4E00\",\"\\u4E8C\",\"\\u4E09\",\"\\u56DB\",\"\\u4E94\",\"\\u516D\",\"\\u4E03\",\"\\u516B\",\"\\u4E5D\",\"\\u5341\",\"\\u5341\\u4E00\",\"\\u5341\\u4E8C\"].indexOf(t);else{var i=t[t.length-1];n=i===\"i\"||i===\"I\"}var a=this.toMonthIndex(e,r,n);return a},dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!=\"number\"||e<1888||e>2111)throw t.replace(/\\{0\\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Dx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Dx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var i;return r?t<r?i=t+1:i=t:i=t+1,i},intercalaryMonth:function(e){e=this._validateYear(e);var t=Fx[e-Fx[0]],r=t>>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Dx.local.invalidyear),i=zx[n-zx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=uQ.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),\"d\");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Fx[e-Fx[0]],n=r>>13,i=n?12:11;if(t>i)throw Dx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Dx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=zer(e,a,r,i);return uQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=uQ.fromJD(e),r=Fer(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(Per),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(C9.prototype).add.call(this,e,t,r);if(r===\"y\"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var Per=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m,Ier=/^\\d?\\d[iI]?/m,Rer=/^闰?十?[一二三四五六七八九]?月/m,Der=/^闰?十?[一二三四五六七八九]?/m;Dx.calendars.chinese=C9;var Fx=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],zx=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function Fer(e,t,r,n){var i,a;if(typeof e==\"object\")i=e,a=t||{};else{var o=typeof e==\"number\"&&e>=1888&&e<=2111;if(!o)throw new Error(\"Solar year outside range 1888-2111\");var s=typeof t==\"number\"&&t>=1&&t<=12;if(!s)throw new Error(\"Solar month outside range 1 - 12\");var l=typeof r==\"number\"&&r>=1&&r<=31;if(!l)throw new Error(\"Solar day outside range 1 - 31\");i={year:e,month:t,day:r},a=n||{}}var u=zx[i.year-zx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=zx[a.year-zx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,x=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-x)/(24*3600*1e3));var p=Fx[a.year-Fx[0]],C;for(C=0;C<13;C++){var E=p&1<<12-C?30:29;if(v<E)break;v-=E}var A=p>>13;return!A||C<A?(a.isIntercalary=!1,a.month=1+C):C===A?(a.isIntercalary=!0,a.month=C):(a.isIntercalary=!1,a.month=C),a.day=1+v,a}function zer(e,t,r,n,i){var a,o;if(typeof e==\"object\")o=e,a=t||{};else{var s=typeof e==\"number\"&&e>=1888&&e<=2111;if(!s)throw new Error(\"Lunar year outside range 1888-2111\");var l=typeof t==\"number\"&&t>=1&&t<=12;if(!l)throw new Error(\"Lunar month outside range 1 - 12\");var u=typeof r==\"number\"&&r>=1&&r<=30;if(!u)throw new Error(\"Lunar day outside range 1 - 30\");var c;typeof n==\"object\"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=Fx[o.year-Fx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var x=0;x<v;x++){var b=h&1<<12-x?30:29;f+=b}var p=zx[o.year-zx[0]],C=p>>9&4095,E=p>>5&15,A=p&31,L=new Date(C,E-1,A+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var SQe=ye(()=>{var _w=Ev(),Oer=Fh();function cQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}cQ.prototype=new _w.baseCalendar;Oer(cQ.prototype,{name:\"Coptic\",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Coptic\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Thout\",\"Paopi\",\"Hathor\",\"Koiak\",\"Tobi\",\"Meshir\",\"Paremhat\",\"Paremoude\",\"Pashons\",\"Paoni\",\"Epip\",\"Mesori\",\"Pi Kogi Enavot\"],monthNamesShort:[\"Tho\",\"Pao\",\"Hath\",\"Koi\",\"Tob\",\"Mesh\",\"Pat\",\"Pad\",\"Pash\",\"Pao\",\"Epi\",\"Meso\",\"PiK\"],dayNames:[\"Tkyriaka\",\"Pesnau\",\"Pshoment\",\"Peftoou\",\"Ptiou\",\"Psoou\",\"Psabbaton\"],dayNamesShort:[\"Tky\",\"Pes\",\"Psh\",\"Pef\",\"Pti\",\"Pso\",\"Psa\"],dayNamesMin:[\"Tk\",\"Pes\",\"Psh\",\"Pef\",\"Pt\",\"Pso\",\"Psa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,_w.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,_w.local.invalidYear||_w.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,_w.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,_w.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});_w.calendars.coptic=cQ});var MQe=ye(()=>{var b1=Ev(),qer=Fh();function fQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}fQ.prototype=new b1.baseCalendar;qer(fQ.prototype,{name:\"Discworld\",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Discworld\",epochs:[\"BUC\",\"UC\"],monthNames:[\"Ick\",\"Offle\",\"February\",\"March\",\"April\",\"May\",\"June\",\"Grune\",\"August\",\"Spune\",\"Sektober\",\"Ember\",\"December\"],monthNamesShort:[\"Ick\",\"Off\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Gru\",\"Aug\",\"Spu\",\"Sek\",\"Emb\",\"Dec\"],dayNames:[\"Sunday\",\"Octeday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Oct\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Oc\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,b1.local.invalidDate);return{century:Ber[Math.floor((n.year()-1)/100)+1]||\"\"}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var Ber={20:\"Fruitbat\",21:\"Anchovy\"};b1.calendars.discworld=fQ});var EQe=ye(()=>{var xw=Ev(),Ner=Fh();function hQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}hQ.prototype=new xw.baseCalendar;Ner(hQ.prototype,{name:\"Ethiopian\",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Ethiopian\",epochs:[\"BEE\",\"EE\"],monthNames:[\"Meskerem\",\"Tikemet\",\"Hidar\",\"Tahesas\",\"Tir\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehase\",\"Pagume\"],monthNamesShort:[\"Mes\",\"Tik\",\"Hid\",\"Tah\",\"Tir\",\"Yek\",\"Meg\",\"Mia\",\"Gen\",\"Sen\",\"Ham\",\"Neh\",\"Pag\"],dayNames:[\"Ehud\",\"Segno\",\"Maksegno\",\"Irob\",\"Hamus\",\"Arb\",\"Kidame\"],dayNamesShort:[\"Ehu\",\"Seg\",\"Mak\",\"Iro\",\"Ham\",\"Arb\",\"Kid\"],dayNamesMin:[\"Eh\",\"Se\",\"Ma\",\"Ir\",\"Ha\",\"Ar\",\"Ki\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,xw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,xw.local.invalidYear||xw.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,xw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,xw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});xw.calendars.ethiopian=hQ});var CQe=ye(()=>{var Ox=Ev(),Uer=Fh();function dQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}dQ.prototype=new Ox.baseCalendar;Uer(dQ.prototype,{name:\"Hebrew\",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{\"\":{name:\"Hebrew\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Nisan\",\"Iyar\",\"Sivan\",\"Tammuz\",\"Av\",\"Elul\",\"Tishrei\",\"Cheshvan\",\"Kislev\",\"Tevet\",\"Shevat\",\"Adar\",\"Adar II\"],monthNamesShort:[\"Nis\",\"Iya\",\"Siv\",\"Tam\",\"Av\",\"Elu\",\"Tis\",\"Che\",\"Kis\",\"Tev\",\"She\",\"Ada\",\"Ad2\"],dayNames:[\"Yom Rishon\",\"Yom Sheni\",\"Yom Shlishi\",\"Yom Revi'i\",\"Yom Chamishi\",\"Yom Shishi\",\"Yom Shabbat\"],dayNamesShort:[\"Ris\",\"She\",\"Shl\",\"Rev\",\"Cha\",\"Shi\",\"Sha\"],dayNamesMin:[\"Ri\",\"She\",\"Shl\",\"Re\",\"Ch\",\"Shi\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ox.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,k9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ox.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ox.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Ox.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&k9(this.daysInYear(e),10)===5?30:t===9&&k9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Ox.local.invalidDate);return{yearType:(this.leapYear(n)?\"embolismic\":\"common\")+\" \"+[\"deficient\",\"regular\",\"complete\"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Ox.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o<t;o++)a+=this.daysInMonth(e,o)}else for(var o=7;o<t;o++)a+=this.daysInMonth(e,o);return a},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return k9(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e),n=this._delay1(e+1);return n-r===356?2:r-t===382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/35975351)-1;e>=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function k9(e,t){return e-t*Math.floor(e/t)}Ox.calendars.hebrew=dQ});var kQe=ye(()=>{var hk=Ev(),Ver=Fh();function vQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}vQ.prototype=new hk.baseCalendar;Ver(vQ.prototype,{name:\"Islamic\",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Islamic\",epochs:[\"BH\",\"AH\"],monthNames:[\"Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' al-thani\",\"Jumada al-awwal\",\"Jumada al-thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-ahad\",\"Yawm al-ithnayn\",\"Yawm ath-thulaathaa'\",\"Yawm al-arbi'aa'\",\"Yawm al-kham\\u012Bs\",\"Yawm al-jum'a\",\"Yawm as-sabt\"],dayNamesShort:[\"Aha\",\"Ith\",\"Thu\",\"Arb\",\"Kha\",\"Jum\",\"Sab\"],dayNamesMin:[\"Ah\",\"It\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,hk.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,hk.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,hk.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});hk.calendars.islamic=vQ});var LQe=ye(()=>{var dk=Ev(),Ger=Fh();function pQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}pQ.prototype=new dk.baseCalendar;Ger(pQ.prototype,{name:\"Julian\",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Julian\",epochs:[\"BC\",\"AD\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,dk.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,dk.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,dk.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});dk.calendars.julian=pQ});var IQe=ye(()=>{var ug=Ev(),Her=Fh();function mQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}mQ.prototype=new ug.baseCalendar;Her(mQ.prototype,{name:\"Mayan\",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{\"\":{name:\"Mayan\",epochs:[\"\",\"\"],monthNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],monthNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],dayNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesMin:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],digits:null,dateFormat:\"YYYY.m.d\",firstDay:0,isRTL:!1,haabMonths:[\"Pop\",\"Uo\",\"Zip\",\"Zotz\",\"Tzec\",\"Xul\",\"Yaxkin\",\"Mol\",\"Chen\",\"Yax\",\"Zac\",\"Ceh\",\"Mac\",\"Kankin\",\"Muan\",\"Pax\",\"Kayab\",\"Cumku\",\"Uayeb\"],tzolkinMonths:[\"Imix\",\"Ik\",\"Akbal\",\"Kan\",\"Chicchan\",\"Cimi\",\"Manik\",\"Lamat\",\"Muluc\",\"Oc\",\"Chuen\",\"Eb\",\"Ben\",\"Ix\",\"Men\",\"Cib\",\"Caban\",\"Etznab\",\"Cauac\",\"Ahau\"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+\".\"+n+\".\"+e%20},forYear:function(e){if(e=e.split(\".\"),e.length<3)throw\"Invalid Mayan year\";for(var t=0,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw\"Invalid Mayan year\";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,ug.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,ug.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,ug.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=gQ(e+8+17*20,365);return[Math.floor(t/20)+1,gQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[PQe(e+20,20),PQe(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function gQ(e,t){return e-t*Math.floor(e/t)}function PQe(e,t){return gQ(e-1,t)+1}ug.calendars.mayan=mQ});var DQe=ye(()=>{var bw=Ev(),jer=Fh();function yQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}yQ.prototype=new bw.baseCalendar;var RQe=bw.instance(\"gregorian\");jer(yQ.prototype,{name:\"Nanakshahi\",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Nanakshahi\",epochs:[\"BN\",\"AN\"],monthNames:[\"Chet\",\"Vaisakh\",\"Jeth\",\"Harh\",\"Sawan\",\"Bhadon\",\"Assu\",\"Katak\",\"Maghar\",\"Poh\",\"Magh\",\"Phagun\"],monthNamesShort:[\"Che\",\"Vai\",\"Jet\",\"Har\",\"Saw\",\"Bha\",\"Ass\",\"Kat\",\"Mgr\",\"Poh\",\"Mgh\",\"Pha\"],dayNames:[\"Somvaar\",\"Mangalvar\",\"Budhvaar\",\"Veervaar\",\"Shukarvaar\",\"Sanicharvaar\",\"Etvaar\"],dayNamesShort:[\"Som\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bw.local.invalidYear||bw.regionalOptions[\"\"].invalidYear);return RQe.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,bw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o<n.month();o++)a+=this.daysPerMonth[o-1];return a+RQe.toJD(i+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});bw.calendars.nanakshahi=yQ});var FQe=ye(()=>{var ww=Ev(),Wer=Fh();function _Q(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}_Q.prototype=new ww.baseCalendar;Wer(_Q.prototype,{name:\"Nepali\",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{\"\":{name:\"Nepali\",epochs:[\"BBS\",\"ABS\"],monthNames:[\"Baisakh\",\"Jestha\",\"Ashadh\",\"Shrawan\",\"Bhadra\",\"Ashwin\",\"Kartik\",\"Mangsir\",\"Paush\",\"Mangh\",\"Falgun\",\"Chaitra\"],monthNamesShort:[\"Bai\",\"Je\",\"As\",\"Shra\",\"Bha\",\"Ash\",\"Kar\",\"Mang\",\"Pau\",\"Ma\",\"Fal\",\"Chai\"],dayNames:[\"Aaitabaar\",\"Sombaar\",\"Manglbaar\",\"Budhabaar\",\"Bihibaar\",\"Shukrabaar\",\"Shanibaar\"],dayNamesShort:[\"Aaita\",\"Som\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ww.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]==\"undefined\")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,ww.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]==\"undefined\"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,\"d\").toJD()},fromJD:function(e){var t=ww.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)typeof this.NEPALI_CALENDAR_DATA[r]==\"undefined\"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}});ww.calendars.nepali=_Q});var zQe=ye(()=>{var Q5=Ev(),Xer=Fh();function P9(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}function L9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}P9.prototype=new Q5.baseCalendar;Xer(P9.prototype,{name:\"Persian\",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Persian\",epochs:[\"BP\",\"AP\"],monthNames:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Dey\",\"Bahman\",\"Esfand\"],monthNamesShort:[\"Far\",\"Ord\",\"Kho\",\"Tir\",\"Mor\",\"Sha\",\"Meh\",\"Aba\",\"Aza\",\"Dey\",\"Bah\",\"Esf\"],dayNames:[\"Yekshanbeh\",\"Doshanbeh\",\"Seshanbeh\",\"Chah\\u0101rshanbeh\",\"Panjshanbeh\",\"Jom'eh\",\"Shanbeh\"],dayNamesShort:[\"Yek\",\"Do\",\"Se\",\"Cha\",\"Panj\",\"Jom\",\"Sha\"],dayNamesMin:[\"Ye\",\"Do\",\"Se\",\"Ch\",\"Pa\",\"Jo\",\"Sh\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Q5.local.invalidYear);return L9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Q5.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,Q5.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a<e;a++)L9(a)&&i++;else if(e<0)for(var a=e;a<0;a++)L9(a)&&i--;return r+(t<=7?(t-1)*31:(t-1)*30+6)+(e>0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,L9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});Q5.calendars.persian=P9;Q5.calendars.jalali=P9});var OQe=ye(()=>{var Tw=Ev(),Zer=Fh(),I9=Tw.instance();function xQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}xQ.prototype=new Tw.baseCalendar;Zer(xQ.prototype,{name:\"Taiwan\",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Taiwan\",epochs:[\"BROC\",\"ROC\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Tw.local.invalidYear),r=this._t2gYear(t.year());return I9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return I9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Tw.local.invalidDate),i=this._t2gYear(n.year());return I9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=I9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Tw.calendars.taiwan=xQ});var qQe=ye(()=>{var Aw=Ev(),Yer=Fh(),R9=Aw.instance();function bQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}bQ.prototype=new Aw.baseCalendar;Yer(bQ.prototype,{name:\"Thai\",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Thai\",epochs:[\"BBE\",\"BE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Aw.local.invalidYear),r=this._t2gYear(t.year());return R9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return R9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Aw.local.invalidDate),i=this._t2gYear(n.year());return R9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=R9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});Aw.calendars.thai=bQ});var BQe=ye(()=>{var Sw=Ev(),Ker=Fh();function wQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}wQ.prototype=new Sw.baseCalendar;Ker(wQ.prototype,{name:\"UmmAlQura\",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Umm al-Qura\",epochs:[\"BH\",\"AH\"],monthNames:[\"Al-Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' Al-Thani\",\"Jumada Al-Awwal\",\"Jumada Al-Thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-Ahad\",\"Yawm al-Ithnain\",\"Yawm al-Thal\\u0101th\\u0101\\u2019\",\"Yawm al-Arba\\u2018\\u0101\\u2019\",\"Yawm al-Kham\\u012Bs\",\"Yawm al-Jum\\u2018a\",\"Yawm al-Sabt\"],dayNamesMin:[\"Ah\",\"Ith\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Sw.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Sw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;a<qx.length;a++){if(qx[a]>n)return qx[i]-qx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,Sw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+qx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<qx.length&&!(qx[n]>t);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-qx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=Sw.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\\{0\\}/,this.local.name);return i}});Sw.calendars.ummalqura=wQ;var qx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var UQe=ye((t3r,NQe)=>{\"use strict\";NQe.exports=Ev();TQe();AQe();SQe();MQe();EQe();CQe();kQe();LQe();IQe();DQe();FQe();zQe();OQe();qQe();BQe()});var ZQe=ye((r3r,XQe)=>{\"use strict\";var GQe=UQe(),vk=Dr(),HQe=hs(),Jer=HQe.EPOCHJD,$er=HQe.ONEDAY,SQ={valType:\"enumerated\",values:vk.sortObjectKeys(GQe.calendars),editType:\"calc\",dflt:\"gregorian\"},jQe=function(e,t,r,n){var i={};return i[r]=SQ,vk.coerce(e,t,i,r,n)},Qer=function(e,t,r,n){for(var i=0;i<r.length;i++)jQe(e,t,r[i]+\"calendar\",n.calendar)},etr={chinese:\"2000-01-01\",coptic:\"2000-01-01\",discworld:\"2000-01-01\",ethiopian:\"2000-01-01\",hebrew:\"5000-01-01\",islamic:\"1000-01-01\",julian:\"2000-01-01\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-01\",nepali:\"2000-01-01\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-01\",thai:\"2000-01-01\",ummalqura:\"1400-01-01\"},ttr={chinese:\"2000-01-02\",coptic:\"2000-01-03\",discworld:\"2000-01-03\",ethiopian:\"2000-01-05\",hebrew:\"5000-01-01\",islamic:\"1000-01-02\",julian:\"2000-01-03\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-05\",nepali:\"2000-01-05\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-04\",thai:\"2000-01-04\",ummalqura:\"1400-01-06\"},rtr={chinese:[\"2000-01-01\",\"2001-01-01\"],coptic:[\"1700-01-01\",\"1701-01-01\"],discworld:[\"1800-01-01\",\"1801-01-01\"],ethiopian:[\"2000-01-01\",\"2001-01-01\"],hebrew:[\"5700-01-01\",\"5701-01-01\"],islamic:[\"1400-01-01\",\"1401-01-01\"],julian:[\"2000-01-01\",\"2001-01-01\"],mayan:[\"5200-01-01\",\"5201-01-01\"],nanakshahi:[\"0500-01-01\",\"0501-01-01\"],nepali:[\"2000-01-01\",\"2001-01-01\"],persian:[\"1400-01-01\",\"1401-01-01\"],jalali:[\"1400-01-01\",\"1401-01-01\"],taiwan:[\"0100-01-01\",\"0101-01-01\"],thai:[\"2500-01-01\",\"2501-01-01\"],ummalqura:[\"1400-01-01\",\"1401-01-01\"]},D9=\"##\",itr={d:{0:\"dd\",\"-\":\"d\"},e:{0:\"d\",\"-\":\"d\"},a:{0:\"D\",\"-\":\"D\"},A:{0:\"DD\",\"-\":\"DD\"},j:{0:\"oo\",\"-\":\"o\"},W:{0:\"ww\",\"-\":\"w\"},m:{0:\"mm\",\"-\":\"m\"},b:{0:\"M\",\"-\":\"M\"},B:{0:\"MM\",\"-\":\"MM\"},y:{0:\"yy\",\"-\":\"yy\"},Y:{0:\"yyyy\",\"-\":\"yyyy\"},U:D9,w:D9,c:{0:\"D M d %X yyyy\",\"-\":\"D M d %X yyyy\"},x:{0:\"mm/dd/yyyy\",\"-\":\"mm/dd/yyyy\"}};function ntr(e,t,r){for(var n=Math.floor((t+.05)/$er)+Jer,i=WQe(r).fromJD(n),a=0,o,s,l,u,c;(a=e.indexOf(\"%\",a))!==-1;)o=e.charAt(a+1),o===\"0\"||o===\"-\"||o===\"_\"?(l=3,s=e.charAt(a+2),o===\"_\"&&(o=\"-\")):(s=o,o=\"0\",l=2),u=itr[s],u?(u===D9?c=D9:c=i.formatDate(u[o]),e=e.substr(0,a)+c+e.substr(a+l),a+=c.length):a+=l;return e}var VQe={};function WQe(e){var t=VQe[e];return t||(t=VQe[e]=GQe.instance(e),t)}function pk(e){return vk.extendFlat({},SQ,{description:e})}function MQ(e){return\"Sets the calendar system to use with `\"+e+\"` date data.\"}var AQ={xcalendar:pk(MQ(\"x\"))},iy=vk.extendFlat({},AQ,{ycalendar:pk(MQ(\"y\"))}),TQ=vk.extendFlat({},iy,{zcalendar:pk(MQ(\"z\"))}),eS=pk([\"Sets the calendar system to use for `range` and `tick0`\",\"if this is a date axis. This does not set the calendar for\",\"interpreting data on this axis, that's specified in the trace\",\"or via the global `layout.calendar`\"].join(\" \"));XQe.exports={moduleType:\"component\",name:\"calendars\",schema:{traces:{scatter:iy,bar:iy,box:iy,heatmap:iy,contour:iy,histogram:iy,histogram2d:iy,histogram2dcontour:iy,scatter3d:TQ,surface:TQ,mesh3d:TQ,scattergl:iy,ohlc:AQ,candlestick:AQ},layout:{calendar:pk([\"Sets the default calendar system to use for interpreting and\",\"displaying dates throughout the plot.\"].join(\" \"))},subplots:{xaxis:{calendar:eS},yaxis:{calendar:eS},scene:{xaxis:{calendar:eS},yaxis:{calendar:eS},zaxis:{calendar:eS}},polar:{radialaxis:{calendar:eS}}}},layoutAttributes:SQ,handleDefaults:jQe,handleTraceDefaults:Qer,CANONICAL_SUNDAY:ttr,CANONICAL_TICK:etr,DFLTRANGE:rtr,getCal:WQe,worldCalFmt:ntr}});var KQe=ye((i3r,YQe)=>{\"use strict\";YQe.exports=ZQe()});var atr=ye((n3r,$Qe)=>{var JQe=tye();JQe.register([i1e(),H1e(),ixe(),Txe(),zxe(),Ibe(),jbe(),P2e(),owe(),Uwe(),E3e(),BEe(),ECe(),m6e(),nLe(),DLe(),iPe(),EIe(),WIe(),c8e(),w8e(),z8e(),J8e(),dRe(),NDe(),oFe(),TBe(),TNe(),RUe(),nVe(),dGe(),CGe(),$Ge(),uje(),Aje(),Zje(),rXe(),MXe(),sZe(),kYe(),$Ye(),_Ke(),jKe(),aJe(),i$e(),b$e(),N$e(),xQe(),KQe()]);$Qe.exports=JQe});return atr();})();\n",
       "/*!\n",
       " * The buffer module from node.js, for the browser.\n",
       " *\n",
       " * @author   Feross Aboukhadijeh <https://feross.org>\n",
       " * @license  MIT\n",
       " */\n",
       "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\n",
       "/*!\n",
       " * Determine if an object is a Buffer\n",
       " *\n",
       " * @author   Feross Aboukhadijeh <https://feross.org>\n",
       " * @license  MIT\n",
       " */\n",
       "/*!\n",
       " * pad-left <https://github.com/jonschlinkert/pad-left>\n",
       " *\n",
       " * Copyright (c) 2014-2015, Jon Schlinkert.\n",
       " * Licensed under the MIT license.\n",
       " */\n",
       "/*!\n",
       " * repeat-string <https://github.com/jonschlinkert/repeat-string>\n",
       " *\n",
       " * Copyright (c) 2014-2015, Jon Schlinkert.\n",
       " * Licensed under the MIT License.\n",
       " */\n",
       "/*! Bundled license information:\n",
       "\n",
       "native-promise-only/lib/npo.src.js:\n",
       "  (*! Native Promise Only\n",
       "      v0.8.1 (c) Kyle Simpson\n",
       "      MIT License: http://getify.mit-license.org\n",
       "  *)\n",
       "\n",
       "polybooljs/index.js:\n",
       "  (*\n",
       "   * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc\n",
       "   * @license MIT\n",
       "   * @preserve Project Home: https://github.com/voidqk/polybooljs\n",
       "   *)\n",
       "\n",
       "ieee754/index.js:\n",
       "  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n",
       "\n",
       "buffer/index.js:\n",
       "  (*!\n",
       "   * The buffer module from node.js, for the browser.\n",
       "   *\n",
       "   * @author   Feross Aboukhadijeh <https://feross.org>\n",
       "   * @license  MIT\n",
       "   *)\n",
       "\n",
       "safe-buffer/index.js:\n",
       "  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n",
       "\n",
       "assert/build/internal/util/comparisons.js:\n",
       "  (*!\n",
       "   * The buffer module from node.js, for the browser.\n",
       "   *\n",
       "   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n",
       "   * @license  MIT\n",
       "   *)\n",
       "\n",
       "object-assign/index.js:\n",
       "  (*\n",
       "  object-assign\n",
       "  (c) Sindre Sorhus\n",
       "  @license MIT\n",
       "  *)\n",
       "\n",
       "maplibre-gl/dist/maplibre-gl.js:\n",
       "  (**\n",
       "   * MapLibre GL JS\n",
       "   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt\n",
       "   *)\n",
       "*/\n",
       "\n",
       "window.Plotly = Plotly;\n",
       "return Plotly;\n",
       "}));</script>                <div id=\"5f9725ca-5485-40fa-960e-5ea7a9ee524e\" class=\"plotly-graph-div\" style=\"height:1250px; width:1050px;\"></div>            <script type=\"text/javascript\">                window.PLOTLYENV=window.PLOTLYENV || {};                                if (document.getElementById(\"5f9725ca-5485-40fa-960e-5ea7a9ee524e\")) {                    Plotly.newPlot(                        \"5f9725ca-5485-40fa-960e-5ea7a9ee524e\",                        [{\"marker\":{\"color\":\"#D55E00\"},\"orientation\":\"h\",\"x\":[0.2196070990305375,0.22112605335423635,0.2230600371092869,0.22476172598728575,0.23172255067516068],\"y\":[\"China  \",\"Russia  \",\"express  \",\"Ukraine  \",\"president  \"],\"type\":\"bar\",\"xaxis\":\"x\",\"yaxis\":\"y\"},{\"marker\":{\"color\":\"#0072B2\"},\"orientation\":\"h\",\"x\":[0.3629062608025789,0.36827098852725076,0.38294834577406167,0.4048923584236192,0.5658672148980598],\"y\":[\"pipeline  \",\"Beixi  \",\"energy  \",\"oil  \",\"natural gas  \"],\"type\":\"bar\",\"xaxis\":\"x2\",\"yaxis\":\"y2\"},{\"marker\":{\"color\":\"#CC79A7\"},\"orientation\":\"h\",\"x\":[0.4763371952955724,0.5125131833774809,0.545480948556322,0.5920016696759428,0.6042231477021212],\"y\":[\"Virus  \",\"Vaccination  \",\"cases  \",\"vaccine  \",\"COVID-19  \"],\"type\":\"bar\",\"xaxis\":\"x3\",\"yaxis\":\"y3\"},{\"marker\":{\"color\":\"#E69F00\"},\"orientation\":\"h\",\"x\":[0.4475415237544148,0.45155649172793183,0.4673857862294773,0.4773684656197996,0.5271035611082974],\"y\":[\"die  \",\"earthquake  \",\"occur  \",\"fire  \",\"fire  \"],\"type\":\"bar\",\"xaxis\":\"x4\",\"yaxis\":\"y4\"},{\"marker\":{\"color\":\"#56B4E9\"},\"orientation\":\"h\",\"x\":[0.3821050499077854,0.42694943153435133,0.43897147861830876,0.47224126865124283,0.5211107124904162],\"y\":[\"Extradition  \",\"gender  \",\"shooting  \",\"abortion  \",\"Assange  \"],\"type\":\"bar\",\"xaxis\":\"x5\",\"yaxis\":\"y5\"},{\"marker\":{\"color\":\"#009E73\"},\"orientation\":\"h\",\"x\":[0.45211467690711726,0.47031816916142505,0.48396174921012197,0.4948551884195625,0.6665182982894593],\"y\":[\"Elon  \",\"rt  \",\"Twitter  \",\"Tesla  \",\"Musk  \"],\"type\":\"bar\",\"xaxis\":\"x6\",\"yaxis\":\"y6\"},{\"marker\":{\"color\":\"#F0E442\"},\"orientation\":\"h\",\"x\":[0.4081827603799685,0.43987665220428274,0.4961259757864695,0.5059061469858993,0.5717047516848464],\"y\":[\"Discover  \",\"panda  \",\"one  \",\"zoo  \",\"robot  \"],\"type\":\"bar\",\"xaxis\":\"x7\",\"yaxis\":\"y7\"},{\"marker\":{\"color\":\"#D55E00\"},\"orientation\":\"h\",\"x\":[0.615444137612378,0.6237349186591237,0.6261097896882006,0.628287342056872,0.7299494971606176],\"y\":[\"athlete  \",\"Yeva  \",\"Valley  \",\"doping  \",\"winter olympics  \"],\"type\":\"bar\",\"xaxis\":\"x8\",\"yaxis\":\"y8\"},{\"marker\":{\"color\":\"#0072B2\"},\"orientation\":\"h\",\"x\":[0.5952331155903581,0.6080078762569057,0.6286442047626166,0.7004397010875243,0.8486354412492751],\"y\":[\"U.K.  \",\"Boris  \",\"conservative party  \",\"british prime minister  \",\"Johnson  \"],\"type\":\"bar\",\"xaxis\":\"x9\",\"yaxis\":\"y9\"},{\"marker\":{\"color\":\"#CC79A7\"},\"orientation\":\"h\",\"x\":[0.9911729758382682,1.0169866254467372,1.021050513810626,1.2471339732375413,1.2699446532555225],\"y\":[\"Azov Camp  \",\"resident  \",\"tell  \",\"Mali  \",\"upol  \"],\"type\":\"bar\",\"xaxis\":\"x10\",\"yaxis\":\"y10\"},{\"marker\":{\"color\":\"#E69F00\"},\"orientation\":\"h\",\"x\":[0.9581284213018741,1.0178034865551664,1.0564408606617441,1.1178596213347816,1.4296958070363348],\"y\":[\"policy  \",\"European Union  \",\"diplomatic  \",\"advanced  \",\"Borelli  \"],\"type\":\"bar\",\"xaxis\":\"x11\",\"yaxis\":\"y11\"},{\"marker\":{\"color\":\"#56B4E9\"},\"orientation\":\"h\",\"x\":[0.8385634550196068,1.0380235900231132,1.0816558317786185,1.116635607871127,1.2012871856342495],\"y\":[\"Berlusconi  \",\"football  \",\"chelsea  \",\"Abramovich  \",\"club  \"],\"type\":\"bar\",\"xaxis\":\"x12\",\"yaxis\":\"y12\"},{\"marker\":{\"color\":\"#009E73\"},\"orientation\":\"h\",\"x\":[1.0001075135873183,1.0088654087158007,1.0697490758614903,1.1067915684143257,1.8665380739617232],\"y\":[\"Convention  \",\"object  \",\"mine  \",\"montreux  \",\"Bosporus  \"],\"type\":\"bar\",\"xaxis\":\"x13\",\"yaxis\":\"y13\"}],                        {\"template\":{\"data\":{\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"white\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"white\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"#C8D4E3\",\"linecolor\":\"#C8D4E3\",\"minorgridcolor\":\"#C8D4E3\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"#C8D4E3\",\"linecolor\":\"#C8D4E3\",\"minorgridcolor\":\"#C8D4E3\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"choropleth\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"contourcarpet\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"contour\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmap\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2dcontour\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2d\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"mesh3d\"}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"parcoords\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}],\"scatter3d\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatter3d\"}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattercarpet\"}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergeo\"}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergl\"}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattermapbox\"}],\"scattermap\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattermap\"}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolargl\"}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolar\"}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterternary\"}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"surface\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}]},\"layout\":{\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"autotypenumbers\":\"strict\",\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]],\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]},\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"geo\":{\"bgcolor\":\"white\",\"lakecolor\":\"white\",\"landcolor\":\"white\",\"showlakes\":true,\"showland\":true,\"subunitcolor\":\"#C8D4E3\"},\"hoverlabel\":{\"align\":\"left\"},\"hovermode\":\"closest\",\"mapbox\":{\"style\":\"light\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"white\",\"polar\":{\"angularaxis\":{\"gridcolor\":\"#EBF0F8\",\"linecolor\":\"#EBF0F8\",\"ticks\":\"\"},\"bgcolor\":\"white\",\"radialaxis\":{\"gridcolor\":\"#EBF0F8\",\"linecolor\":\"#EBF0F8\",\"ticks\":\"\"}},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"white\",\"gridcolor\":\"#DFE8F3\",\"gridwidth\":2,\"linecolor\":\"#EBF0F8\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"#EBF0F8\"},\"yaxis\":{\"backgroundcolor\":\"white\",\"gridcolor\":\"#DFE8F3\",\"gridwidth\":2,\"linecolor\":\"#EBF0F8\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"#EBF0F8\"},\"zaxis\":{\"backgroundcolor\":\"white\",\"gridcolor\":\"#DFE8F3\",\"gridwidth\":2,\"linecolor\":\"#EBF0F8\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"#EBF0F8\"}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"ternary\":{\"aaxis\":{\"gridcolor\":\"#DFE8F3\",\"linecolor\":\"#A2B1C6\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"#DFE8F3\",\"linecolor\":\"#A2B1C6\",\"ticks\":\"\"},\"bgcolor\":\"white\",\"caxis\":{\"gridcolor\":\"#DFE8F3\",\"linecolor\":\"#A2B1C6\",\"ticks\":\"\"}},\"title\":{\"x\":0.05},\"xaxis\":{\"automargin\":true,\"gridcolor\":\"#EBF0F8\",\"linecolor\":\"#EBF0F8\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"#EBF0F8\",\"zerolinewidth\":2},\"yaxis\":{\"automargin\":true,\"gridcolor\":\"#EBF0F8\",\"linecolor\":\"#EBF0F8\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"#EBF0F8\",\"zerolinewidth\":2}}},\"xaxis\":{\"anchor\":\"y\",\"domain\":[0.0,0.2333333333333333],\"showgrid\":true},\"yaxis\":{\"anchor\":\"x\",\"domain\":[0.8639999999999999,0.9999999999999999],\"showgrid\":true},\"xaxis2\":{\"anchor\":\"y2\",\"domain\":[0.3833333333333333,0.6166666666666666],\"showgrid\":true},\"yaxis2\":{\"anchor\":\"x2\",\"domain\":[0.8639999999999999,0.9999999999999999],\"showgrid\":true},\"xaxis3\":{\"anchor\":\"y3\",\"domain\":[0.7666666666666666,0.9999999999999999],\"showgrid\":true},\"yaxis3\":{\"anchor\":\"x3\",\"domain\":[0.8639999999999999,0.9999999999999999],\"showgrid\":true},\"xaxis4\":{\"anchor\":\"y4\",\"domain\":[0.0,0.2333333333333333],\"showgrid\":true},\"yaxis4\":{\"anchor\":\"x4\",\"domain\":[0.6479999999999999,0.7839999999999999],\"showgrid\":true},\"xaxis5\":{\"anchor\":\"y5\",\"domain\":[0.3833333333333333,0.6166666666666666],\"showgrid\":true},\"yaxis5\":{\"anchor\":\"x5\",\"domain\":[0.6479999999999999,0.7839999999999999],\"showgrid\":true},\"xaxis6\":{\"anchor\":\"y6\",\"domain\":[0.7666666666666666,0.9999999999999999],\"showgrid\":true},\"yaxis6\":{\"anchor\":\"x6\",\"domain\":[0.6479999999999999,0.7839999999999999],\"showgrid\":true},\"xaxis7\":{\"anchor\":\"y7\",\"domain\":[0.0,0.2333333333333333],\"showgrid\":true},\"yaxis7\":{\"anchor\":\"x7\",\"domain\":[0.43199999999999994,0.568],\"showgrid\":true},\"xaxis8\":{\"anchor\":\"y8\",\"domain\":[0.3833333333333333,0.6166666666666666],\"showgrid\":true},\"yaxis8\":{\"anchor\":\"x8\",\"domain\":[0.43199999999999994,0.568],\"showgrid\":true},\"xaxis9\":{\"anchor\":\"y9\",\"domain\":[0.7666666666666666,0.9999999999999999],\"showgrid\":true},\"yaxis9\":{\"anchor\":\"x9\",\"domain\":[0.43199999999999994,0.568],\"showgrid\":true},\"xaxis10\":{\"anchor\":\"y10\",\"domain\":[0.0,0.2333333333333333],\"showgrid\":true},\"yaxis10\":{\"anchor\":\"x10\",\"domain\":[0.21599999999999997,0.352],\"showgrid\":true},\"xaxis11\":{\"anchor\":\"y11\",\"domain\":[0.3833333333333333,0.6166666666666666],\"showgrid\":true},\"yaxis11\":{\"anchor\":\"x11\",\"domain\":[0.21599999999999997,0.352],\"showgrid\":true},\"xaxis12\":{\"anchor\":\"y12\",\"domain\":[0.7666666666666666,0.9999999999999999],\"showgrid\":true},\"yaxis12\":{\"anchor\":\"x12\",\"domain\":[0.21599999999999997,0.352],\"showgrid\":true},\"xaxis13\":{\"anchor\":\"y13\",\"domain\":[0.0,0.2333333333333333],\"showgrid\":true},\"yaxis13\":{\"anchor\":\"x13\",\"domain\":[0.0,0.13599999999999998],\"showgrid\":true},\"xaxis14\":{\"anchor\":\"y14\",\"domain\":[0.3833333333333333,0.6166666666666666],\"showgrid\":true},\"yaxis14\":{\"anchor\":\"x14\",\"domain\":[0.0,0.13599999999999998],\"showgrid\":true},\"xaxis15\":{\"anchor\":\"y15\",\"domain\":[0.7666666666666666,0.9999999999999999],\"showgrid\":true},\"yaxis15\":{\"anchor\":\"x15\",\"domain\":[0.0,0.13599999999999998],\"showgrid\":true},\"annotations\":[{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Russia_Ukraine\",\"x\":0.11666666666666665,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.9999999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Sri Lanka\",\"x\":0.49999999999999994,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.9999999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Energy\",\"x\":0.8833333333333333,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.9999999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Japan_disaster\",\"x\":0.11666666666666665,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.7839999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Pandemic\",\"x\":0.49999999999999994,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.7839999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Elon_Musk\",\"x\":0.8833333333333333,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.7839999999999999,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Zoo\",\"x\":0.11666666666666665,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.568,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Olympics\",\"x\":0.49999999999999994,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.568,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Weapon\",\"x\":0.8833333333333333,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.568,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"China_border\",\"x\":0.11666666666666665,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.352,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"EU\",\"x\":0.49999999999999994,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.352,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Exchange_rate\",\"x\":0.8833333333333333,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.352,\"yanchor\":\"bottom\",\"yref\":\"paper\"},{\"font\":{\"size\":16},\"showarrow\":false,\"text\":\"Football\",\"x\":0.11666666666666665,\"xanchor\":\"center\",\"xref\":\"paper\",\"y\":0.13599999999999998,\"yanchor\":\"bottom\",\"yref\":\"paper\"}],\"title\":{\"font\":{\"size\":22,\"color\":\"Black\"},\"text\":\"\\u003cb\\u003eRussia's Narrative On Weibo\\u003c\\u002fb\\u003e\",\"x\":0.5,\"xanchor\":\"center\",\"yanchor\":\"top\"},\"hoverlabel\":{\"font\":{\"size\":16,\"family\":\"Rockwell\"},\"bgcolor\":\"white\"},\"margin\":{\"l\":100,\"r\":20,\"t\":100,\"b\":20},\"showlegend\":false,\"width\":1050,\"height\":1250},                        {\"responsive\": true}                    )                };            </script>        </div>\n",
       "</body>\n",
       "</html>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import itertools\n",
    "import numpy as np\n",
    "from typing import List, Union\n",
    "\n",
    "import plotly.graph_objects as go\n",
    "from plotly.subplots import make_subplots\n",
    "from pygtrans import Translate\n",
    "from IPython.display import HTML\n",
    "\n",
    "# define translation function\n",
    "def translate_text(text, source_lang='zh-CN', target_lang='en'):\n",
    "    client = Translate(target=target_lang, source=source_lang)\n",
    "    translation = client.translate(text)\n",
    "    return translation.translatedText\n",
    "\n",
    "# define custom visualization function\n",
    "def customvis(topic_model,\n",
    "              custom_topic_labels,\n",
    "              topics: List[int] = None,\n",
    "              top_n_topics: int = None,\n",
    "              n_words: int = 5,\n",
    "              custom_labels: bool = True,\n",
    "              title: str = \"<b>Topic of Apple Safety</b>\",\n",
    "              width: int = 350,\n",
    "              height: int = 250) -> go.Figure:\n",
    "\n",
    "    colors = itertools.cycle([\"#D55E00\", \"#0072B2\", \"#CC79A7\", \"#E69F00\", \"#56B4E9\", \"#009E73\", \"#F0E442\"])\n",
    "\n",
    "    if topics is None:\n",
    "        if top_n_topics is None:\n",
    "            top_n_topics = len(custom_topic_labels)\n",
    "        topics = sorted(topic_model.get_topic_freq().Topic.to_list())[1:top_n_topics+1]\n",
    "\n",
    "    if custom_labels:\n",
    "        subplot_titles = [custom_topic_labels.get(topic, f\"Topic {topic}\") for topic in topics]\n",
    "    else:\n",
    "        subplot_titles = [f\"Topic {topic}\" for topic in topics]\n",
    "\n",
    "    columns = 3\n",
    "    rows = int(np.ceil(len(topics) / columns))\n",
    "    fig = make_subplots(rows=rows,\n",
    "                        cols=columns,\n",
    "                        shared_xaxes=False,\n",
    "                        horizontal_spacing=0.15,\n",
    "                        vertical_spacing=.4 / rows if rows > 1 else 0,\n",
    "                        subplot_titles=subplot_titles)\n",
    "\n",
    "    row = 1\n",
    "    column = 1\n",
    "    for topic in topics:\n",
    "        words, scores = zip(*[(translate_text(word), score) for word, score in topic_model.get_topic(topic)[:n_words]])\n",
    "        words = [word + \"  \" for word in words][::-1]\n",
    "        scores = list(scores)[::-1]\n",
    "\n",
    "        fig.add_trace(\n",
    "            go.Bar(x=scores,\n",
    "                   y=words,\n",
    "                   orientation='h',\n",
    "                   marker_color=next(colors)),\n",
    "            row=row, col=column)\n",
    "\n",
    "        if column == columns:\n",
    "            column = 1\n",
    "            row += 1\n",
    "        else:\n",
    "            column += 1\n",
    "\n",
    "    fig.update_layout(\n",
    "        template=\"plotly_white\",\n",
    "        showlegend=False,\n",
    "        title={\n",
    "            'text': title,\n",
    "            'x': .5,\n",
    "            'xanchor': 'center',\n",
    "            'yanchor': 'top',\n",
    "            'font': dict(size=22, color=\"Black\")\n",
    "        },\n",
    "        width=width*columns,\n",
    "        height=height*rows if rows > 1 else height * 1.3,\n",
    "        hoverlabel=dict(bgcolor=\"white\", font_size=16, font_family=\"Rockwell\"),\n",
    "        margin=dict(l=100, r=20, t=100, b=20)\n",
    "    )\n",
    "\n",
    "    fig.update_xaxes(showgrid=True)\n",
    "    fig.update_yaxes(showgrid=True)\n",
    "\n",
    "    return fig\n",
    "\n",
    "fig = customvis(topic_model, custom_topic_labels, top_n_topics=None, title=\"<b>Russia's Narrative On Weibo</b>\")\n",
    "\n",
    "# \n",
    "HTML(fig.to_html())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "prq",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
